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
/* HEADER *********************************************************************************/ /*! \file Meta/MetaFunction/Impl/BooleanOpsImpl.h \author <NAME> (100%) \par email: <EMAIL> \brief Not, Or, And, XOR ... */ /* HEADER END *****************************************************************************/ #ifndef _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ #define _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ #include "TraitsImpl.h" #include "../../types/Constant.h" #include "utils/function/Function.h" namespace MP { namespace Lib { struct Not : public Ut::Function_t { template <typename Ty> constexpr auto operator () (Ty&& value) const noexcept { return !value; } }; struct And : public Ut::Function_t { template <typename ... Ty> constexpr auto operator () (Ty&& ... argv) const noexcept { return (argv && ...); } }; struct Or : public Ut::Function_t { template <typename ... Ty> constexpr auto operator () (Ty&& ... argv) const noexcept { return (argv || ...); } }; } } namespace MPL = ::MP::Lib; #endif
18.69
58
(translation_unit) "/* HEADER *********************************************************************************/ \n/*! \n\file Meta/MetaFunction/Impl/BooleanOpsImpl.h \n\author <NAME> (100%) \n\par email: <EMAIL> \n\brief \n Not, Or, And, XOR ... \n \n*/ \n/* HEADER END *****************************************************************************/ \n#ifndef _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ \n#define _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ \n \n#include "TraitsImpl.h" \n \n#include "../../types/Constant.h" \n#include "utils/function/Function.h" \n \n \nnamespace MP \n{ \n namespace Lib \n { \n struct Not : public Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }; \n \n struct And : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }; \n \n struct Or : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }; \n } \n} \n \nnamespace MPL = ::MP::Lib; \n \n \n \n \n#endif \n \n" (comment) "/* HEADER *********************************************************************************/" (comment) "/*! \n\file Meta/MetaFunction/Impl/BooleanOpsImpl.h \n\author <NAME> (100%) \n\par email: <EMAIL> \n\brief \n Not, Or, And, XOR ... \n \n*/" (comment) "/* HEADER END *****************************************************************************/" (preproc_ifdef) "#ifndef _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ \n#define _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ \n \n#include "TraitsImpl.h" \n \n#include "../../types/Constant.h" \n#include "utils/function/Function.h" \n \n \nnamespace MP \n{ \n namespace Lib \n { \n struct Not : public Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }; \n \n struct And : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }; \n \n struct Or : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }; \n } \n} \n \nnamespace MPL = ::MP::Lib; \n \n \n \n \n#endif" (#ifndef) "#ifndef" (identifier) "_META_FN_BOOLEAN_OPERATIONS_IMPL_H_" (preproc_def) "#define _META_FN_BOOLEAN_OPERATIONS_IMPL_H_ \n" (#define) "#define" (identifier) "_META_FN_BOOLEAN_OPERATIONS_IMPL_H_" (preproc_include) "#include "TraitsImpl.h" \n" (#include) "#include" (string_literal) ""TraitsImpl.h"" (") """ (string_content) "TraitsImpl.h" (") """ (preproc_include) "#include "../../types/Constant.h" \n" (#include) "#include" (string_literal) ""../../types/Constant.h"" (") """ (string_content) "../../types/Constant.h" (") """ (preproc_include) "#include "utils/function/Function.h" \n" (#include) "#include" (string_literal) ""utils/function/Function.h"" (") """ (string_content) "utils/function/Function.h" (") """ (function_definition) "namespace MP \n{ \n namespace Lib \n { \n struct Not : public Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }; \n \n struct And : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }; \n \n struct Or : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }; \n } \n}" (type_identifier) "namespace" (identifier) "MP" (compound_statement) "{ \n namespace Lib \n { \n struct Not : public Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }; \n \n struct And : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }; \n \n struct Or : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }; \n } \n}" ({) "{" (function_definition) "namespace Lib \n { \n struct Not : public Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }; \n \n struct And : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }; \n \n struct Or : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }; \n }" (type_identifier) "namespace" (identifier) "Lib" (compound_statement) "{ \n struct Not : public Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }; \n \n struct And : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }; \n \n struct Or : public Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }; \n }" ({) "{" (declaration) "struct Not : public" (struct_specifier) "struct Not" (struct) "struct" (type_identifier) "Not" (ERROR) ":" (:) ":" (identifier) "public" (;) "" (labeled_statement) "Ut::Function_t \n { \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }" (statement_identifier) "Ut" (:) ":" (ERROR) ":Function_t" (:) ":" (identifier) "Function_t" (compound_statement) "{ \n template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept \n { \n return !value; \n } \n }" ({) "{" (expression_statement) "template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept" (binary_expression) "template <typename Ty> \n constexpr auto operator () (Ty&& value) const noexcept" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "Ty" (identifier) "Ty" (>) ">" (ERROR) "constexpr auto operator () (Ty&& value) const" (identifier) "constexpr" (identifier) "auto" (call_expression) "operator () (Ty&& value)" (call_expression) "operator ()" (identifier) "operator" (argument_list) "()" (() "(" ()) ")" (argument_list) "(Ty&& value)" (() "(" (binary_expression) "Ty&& value" (identifier) "Ty" (&&) "&&" (identifier) "value" ()) ")" (identifier) "const" (identifier) "noexcept" (;) "" (compound_statement) "{ \n return !value; \n }" ({) "{" (return_statement) "return !value;" (return) "return" (unary_expression) "!value" (!) "!" (identifier) "value" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (declaration) "struct And : public" (struct_specifier) "struct And" (struct) "struct" (type_identifier) "And" (ERROR) ":" (:) ":" (identifier) "public" (;) "" (labeled_statement) "Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }" (statement_identifier) "Ut" (:) ":" (ERROR) ":Function_t" (:) ":" (identifier) "Function_t" (compound_statement) "{ \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv && ...); \n } \n }" ({) "{" (expression_statement) "template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept" (binary_expression) "template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "... Ty" (...) "..." (identifier) "Ty" (>) ">" (ERROR) "constexpr auto operator () (Ty&& ... argv) const" (identifier) "constexpr" (identifier) "auto" (call_expression) "operator () (Ty&& ... argv)" (call_expression) "operator ()" (identifier) "operator" (argument_list) "()" (() "(" ()) ")" (argument_list) "(Ty&& ... argv)" (() "(" (binary_expression) "Ty&& ... argv" (identifier) "Ty" (&&) "&&" (ERROR) "..." (.) "." (.) "." (.) "." (identifier) "argv" ()) ")" (identifier) "const" (identifier) "noexcept" (;) "" (compound_statement) "{ \n return (argv && ...); \n }" ({) "{" (return_statement) "return (argv && ...);" (return) "return" (parenthesized_expression) "(argv && ...)" (() "(" (identifier) "argv" (ERROR) "&& ..." (&&) "&&" (.) "." (.) "." (.) "." ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (declaration) "struct Or : public" (struct_specifier) "struct Or" (struct) "struct" (type_identifier) "Or" (ERROR) ":" (:) ":" (identifier) "public" (;) "" (labeled_statement) "Ut::Function_t \n { \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }" (statement_identifier) "Ut" (:) ":" (ERROR) ":Function_t" (:) ":" (identifier) "Function_t" (compound_statement) "{ \n template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept \n { \n return (argv || ...); \n } \n }" ({) "{" (expression_statement) "template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept" (binary_expression) "template <typename ... Ty> \n constexpr auto operator () (Ty&& ... argv) const noexcept" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "... Ty" (...) "..." (identifier) "Ty" (>) ">" (ERROR) "constexpr auto operator () (Ty&& ... argv) const" (identifier) "constexpr" (identifier) "auto" (call_expression) "operator () (Ty&& ... argv)" (call_expression) "operator ()" (identifier) "operator" (argument_list) "()" (() "(" ()) ")" (argument_list) "(Ty&& ... argv)" (() "(" (binary_expression) "Ty&& ... argv" (identifier) "Ty" (&&) "&&" (ERROR) "..." (.) "." (.) "." (.) "." (identifier) "argv" ()) ")" (identifier) "const" (identifier) "noexcept" (;) "" (compound_statement) "{ \n return (argv || ...); \n }" ({) "{" (return_statement) "return (argv || ...);" (return) "return" (parenthesized_expression) "(argv || ...)" (() "(" (identifier) "argv" (ERROR) "|| ..." (||) "||" (.) "." (.) "." (.) "." ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (declaration) "namespace MPL = ::MP::Lib;" (type_identifier) "namespace" (init_declarator) "MPL = ::MP::Lib" (identifier) "MPL" (=) "=" (ERROR) "::MP::" (:) ":" (:) ":" (identifier) "MP" (:) ":" (:) ":" (identifier) "Lib" (;) ";" (#endif) "#endif"
244
17
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 18.69, "nodes": 131, "errors": 0, "source_hash": "5ef55805aedfda127af5ccaab224755f46200471a360b94a2113c4176f30d57a", "categorized_nodes": 94}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _META_FN_BOOLEAN_OPERATIONS_IMPL_H_\r\n#define _META_FN_BOOLEAN_OPERATIONS_IMPL_H_\r\n\r\n#include \"TraitsImpl.h\"\r\n\r\n#include \"../../types/Constant.h\"\r\n#include \"utils/function/Function.h\"\r\n\r\n\r\nnamespace MP\r\n{\r\n\tnamespace Lib\r\n\t{\r\n\t\tstruct Not : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& value) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn !value;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct And : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv && ...);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct Or : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv || ...);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n}\r\n\r\nnamespace MPL = ::MP::Lib;\r\n\r\n\r\n\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 122, 130], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 57, "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": "_META_FN_BOOLEAN_OPERATIONS_IMPL_H_", "parent": 0, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 43}}, {"id": 3, "type": "preproc_def", "text": "#define _META_FN_BOOLEAN_OPERATIONS_IMPL_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": "_META_FN_BOOLEAN_OPERATIONS_IMPL_H_", "parent": 3, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 43}}, {"id": 6, "type": "preproc_include", "text": "#include \"TraitsImpl.h\"\r\n", "parent": 0, "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": "\"TraitsImpl.h\"", "parent": 6, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include \"../../types/Constant.h\"\r\n", "parent": 0, "children": [10, 11], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"../../types/Constant.h\"", "parent": 9, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 33}}, {"id": 12, "type": "preproc_include", "text": "#include \"utils/function/Function.h\"\r\n", "parent": 0, "children": [13, 14], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"utils/function/Function.h\"", "parent": 12, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 36}}, {"id": 15, "type": "function_definition", "text": "namespace MP\r\n{\r\n\tnamespace Lib\r\n\t{\r\n\t\tstruct Not : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& value) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn !value;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct And : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv && ...);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct Or : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv || ...);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 9}}, {"id": 17, "type": "identifier", "text": "MP", "parent": 15, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 12}}, {"id": 18, "type": "function_definition", "text": "namespace Lib\r\n\t{\r\n\t\tstruct Not : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& value) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn !value;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct And : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv && ...);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct Or : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv || ...);\r\n\t\t\t}\r\n\t\t};\r\n\t}", "parent": 15, "children": [19, 20], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 49, "column": 2}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 10}}, {"id": 20, "type": "identifier", "text": "Lib", "parent": 18, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 14}}, {"id": 21, "type": "declaration", "text": "struct Not : public", "parent": 18, "children": [22], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 21}}, {"id": 22, "type": "struct_specifier", "text": "struct Not", "parent": 21, "children": [23, 24], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 12}}, {"id": 23, "type": "struct", "text": "struct", "parent": 22, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 8}}, {"id": 24, "type": "type_identifier", "text": "Not", "parent": 22, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 12}}, {"id": 25, "type": "labeled_statement", "text": "Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& value) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn !value;\r\n\t\t\t}\r\n\t\t}", "parent": 18, "children": [26, 27], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 30, "column": 3}}, {"id": 26, "type": "statement_identifier", "text": "Ut", "parent": 25, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 24}}, {"id": 27, "type": "ERROR", "text": ":Function_t", "parent": 25, "children": [28], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 36}}, {"id": 28, "type": "identifier", "text": "Function_t", "parent": 27, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 36}}, {"id": 29, "type": "binary_expression", "text": "template <typename Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& value) const noexcept", "parent": 25, "children": [30, 34, 36, 37, 49], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 26, "column": 57}}, {"id": 30, "type": "binary_expression", "text": "template <typename", "parent": 29, "children": [31, 32, 33], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 21}}, {"id": 31, "type": "identifier", "text": "template", "parent": 30, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 11}}, {"id": 32, "type": "<", "text": "<", "parent": 30, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 33, "type": "identifier", "text": "typename", "parent": 30, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 21}}, {"id": 34, "type": "ERROR", "text": "Ty", "parent": 29, "children": [35], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 24}}, {"id": 35, "type": "identifier", "text": "Ty", "parent": 34, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 24}}, {"id": 36, "type": ">", "text": ">", "parent": 29, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 25}}, {"id": 37, "type": "ERROR", "text": "constexpr auto operator () (Ty&& value) const", "parent": 29, "children": [38, 39, 40], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 48}}, {"id": 38, "type": "identifier", "text": "constexpr", "parent": 37, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 12}}, {"id": 39, "type": "identifier", "text": "auto", "parent": 37, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 17}}, {"id": 40, "type": "call_expression", "text": "operator () (Ty&& value)", "parent": 37, "children": [41, 44], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 42}}, {"id": 41, "type": "call_expression", "text": "operator ()", "parent": 40, "children": [42, 43], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 29}}, {"id": 42, "type": "identifier", "text": "operator", "parent": 41, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 26}}, {"id": 43, "type": "argument_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 29}}, {"id": 44, "type": "argument_list", "text": "(Ty&& value)", "parent": 40, "children": [45], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 42}}, {"id": 45, "type": "binary_expression", "text": "Ty&& value", "parent": 44, "children": [46, 47, 48], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 41}}, {"id": 46, "type": "identifier", "text": "Ty", "parent": 45, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 33}}, {"id": 47, "type": "&&", "text": "&&", "parent": 45, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 35}}, {"id": 48, "type": "identifier", "text": "value", "parent": 45, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 41}}, {"id": 49, "type": "identifier", "text": "noexcept", "parent": 29, "children": [], "start_point": {"row": 26, "column": 49}, "end_point": {"row": 26, "column": 57}}, {"id": 50, "type": "return_statement", "text": "return !value;", "parent": 25, "children": [51], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 18}}, {"id": 51, "type": "unary_expression", "text": "!value", "parent": 50, "children": [52, 53], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 17}}, {"id": 52, "type": "!", "text": "!", "parent": 51, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 12}}, {"id": 53, "type": "identifier", "text": "value", "parent": 51, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 17}}, {"id": 54, "type": "declaration", "text": "struct And : public", "parent": 18, "children": [55], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 21}}, {"id": 55, "type": "struct_specifier", "text": "struct And", "parent": 54, "children": [56, 57], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 12}}, {"id": 56, "type": "struct", "text": "struct", "parent": 55, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 8}}, {"id": 57, "type": "type_identifier", "text": "And", "parent": 55, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 12}}, {"id": 58, "type": "labeled_statement", "text": "Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv && ...);\r\n\t\t\t}\r\n\t\t}", "parent": 18, "children": [59, 60], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 39, "column": 3}}, {"id": 59, "type": "statement_identifier", "text": "Ut", "parent": 58, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 24}}, {"id": 60, "type": "ERROR", "text": ":Function_t", "parent": 58, "children": [61], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 36}}, {"id": 61, "type": "identifier", "text": "Function_t", "parent": 60, "children": [], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 36}}, {"id": 62, "type": "binary_expression", "text": "template <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept", "parent": 58, "children": [63, 67, 69, 70, 82], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 35, "column": 60}}, {"id": 63, "type": "binary_expression", "text": "template <typename", "parent": 62, "children": [64, 65, 66], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 21}}, {"id": 64, "type": "identifier", "text": "template", "parent": 63, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 11}}, {"id": 65, "type": "<", "text": "<", "parent": 63, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 66, "type": "identifier", "text": "typename", "parent": 63, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 21}}, {"id": 67, "type": "ERROR", "text": "... Ty", "parent": 62, "children": [68], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 28}}, {"id": 68, "type": "identifier", "text": "Ty", "parent": 67, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 28}}, {"id": 69, "type": ">", "text": ">", "parent": 62, "children": [], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 29}}, {"id": 70, "type": "ERROR", "text": "constexpr auto operator () (Ty&& ... argv) const", "parent": 62, "children": [71, 72, 73], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 51}}, {"id": 71, "type": "identifier", "text": "constexpr", "parent": 70, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 12}}, {"id": 72, "type": "identifier", "text": "auto", "parent": 70, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 17}}, {"id": 73, "type": "call_expression", "text": "operator () (Ty&& ... argv)", "parent": 70, "children": [74, 77], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 45}}, {"id": 74, "type": "call_expression", "text": "operator ()", "parent": 73, "children": [75, 76], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 29}}, {"id": 75, "type": "identifier", "text": "operator", "parent": 74, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 26}}, {"id": 76, "type": "argument_list", "text": "()", "parent": 74, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 29}}, {"id": 77, "type": "argument_list", "text": "(Ty&& ... argv)", "parent": 73, "children": [78], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 45}}, {"id": 78, "type": "binary_expression", "text": "Ty&& ... argv", "parent": 77, "children": [79, 80, 81], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 44}}, {"id": 79, "type": "identifier", "text": "Ty", "parent": 78, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 33}}, {"id": 80, "type": "&&", "text": "&&", "parent": 78, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 35}}, {"id": 81, "type": "identifier", "text": "argv", "parent": 78, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 44}}, {"id": 82, "type": "identifier", "text": "noexcept", "parent": 62, "children": [], "start_point": {"row": 35, "column": 52}, "end_point": {"row": 35, "column": 60}}, {"id": 83, "type": "return_statement", "text": "return (argv && ...);", "parent": 58, "children": [84], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 25}}, {"id": 84, "type": "parenthesized_expression", "text": "(argv && ...)", "parent": 83, "children": [85, 86], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 24}}, {"id": 85, "type": "identifier", "text": "argv", "parent": 84, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 16}}, {"id": 86, "type": "ERROR", "text": "&& ...", "parent": 84, "children": [87], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 23}}, {"id": 87, "type": "&&", "text": "&&", "parent": 86, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 19}}, {"id": 88, "type": "declaration", "text": "struct Or : public", "parent": 18, "children": [89], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 20}}, {"id": 89, "type": "struct_specifier", "text": "struct Or", "parent": 88, "children": [90, 91], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 11}}, {"id": 90, "type": "struct", "text": "struct", "parent": 89, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 8}}, {"id": 91, "type": "type_identifier", "text": "Or", "parent": 89, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 11}}, {"id": 92, "type": "labeled_statement", "text": "Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv || ...);\r\n\t\t\t}\r\n\t\t}", "parent": 18, "children": [93, 94], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 48, "column": 3}}, {"id": 93, "type": "statement_identifier", "text": "Ut", "parent": 92, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 23}}, {"id": 94, "type": "ERROR", "text": ":Function_t", "parent": 92, "children": [95], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 35}}, {"id": 95, "type": "identifier", "text": "Function_t", "parent": 94, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 35}}, {"id": 96, "type": "binary_expression", "text": "template <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept", "parent": 92, "children": [97, 101, 103, 104, 116], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 44, "column": 60}}, {"id": 97, "type": "binary_expression", "text": "template <typename", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 21}}, {"id": 98, "type": "identifier", "text": "template", "parent": 97, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 11}}, {"id": 99, "type": "<", "text": "<", "parent": 97, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 100, "type": "identifier", "text": "typename", "parent": 97, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 21}}, {"id": 101, "type": "ERROR", "text": "... Ty", "parent": 96, "children": [102], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 28}}, {"id": 102, "type": "identifier", "text": "Ty", "parent": 101, "children": [], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 28}}, {"id": 103, "type": ">", "text": ">", "parent": 96, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 29}}, {"id": 104, "type": "ERROR", "text": "constexpr auto operator () (Ty&& ... argv) const", "parent": 96, "children": [105, 106, 107], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 51}}, {"id": 105, "type": "identifier", "text": "constexpr", "parent": 104, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 12}}, {"id": 106, "type": "identifier", "text": "auto", "parent": 104, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 17}}, {"id": 107, "type": "call_expression", "text": "operator () (Ty&& ... argv)", "parent": 104, "children": [108, 111], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 45}}, {"id": 108, "type": "call_expression", "text": "operator ()", "parent": 107, "children": [109, 110], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 29}}, {"id": 109, "type": "identifier", "text": "operator", "parent": 108, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 26}}, {"id": 110, "type": "argument_list", "text": "()", "parent": 108, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 29}}, {"id": 111, "type": "argument_list", "text": "(Ty&& ... argv)", "parent": 107, "children": [112], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 45}}, {"id": 112, "type": "binary_expression", "text": "Ty&& ... argv", "parent": 111, "children": [113, 114, 115], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 44}}, {"id": 113, "type": "identifier", "text": "Ty", "parent": 112, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 33}}, {"id": 114, "type": "&&", "text": "&&", "parent": 112, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 35}}, {"id": 115, "type": "identifier", "text": "argv", "parent": 112, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 44}}, {"id": 116, "type": "identifier", "text": "noexcept", "parent": 96, "children": [], "start_point": {"row": 44, "column": 52}, "end_point": {"row": 44, "column": 60}}, {"id": 117, "type": "return_statement", "text": "return (argv || ...);", "parent": 92, "children": [118], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 25}}, {"id": 118, "type": "parenthesized_expression", "text": "(argv || ...)", "parent": 117, "children": [119, 120], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 24}}, {"id": 119, "type": "identifier", "text": "argv", "parent": 118, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 16}}, {"id": 120, "type": "ERROR", "text": "|| ...", "parent": 118, "children": [121], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 23}}, {"id": 121, "type": "||", "text": "||", "parent": 120, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 19}}, {"id": 122, "type": "declaration", "text": "namespace MPL = ::MP::Lib;", "parent": 0, "children": [123, 124], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 26}}, {"id": 123, "type": "type_identifier", "text": "namespace", "parent": 122, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 9}}, {"id": 124, "type": "init_declarator", "text": "MPL = ::MP::Lib", "parent": 122, "children": [125, 126, 127, 129], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 25}}, {"id": 125, "type": "identifier", "text": "MPL", "parent": 124, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 13}}, {"id": 126, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 15}}, {"id": 127, "type": "ERROR", "text": "::MP::", "parent": 124, "children": [128], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 22}}, {"id": 128, "type": "identifier", "text": "MP", "parent": 127, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 20}}, {"id": 129, "type": "identifier", "text": "Lib", "parent": 124, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 25}}, {"id": 130, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18], "variables": [21, 54, 88, 122], "classes": [22, 23, 55, 56, 89, 90], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [29, 30, 40, 41, 45, 51, 62, 63, 73, 74, 78, 84, 96, 97, 107, 108, 112, 118], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 20, 24, 26, 28, 31, 33, 35, 38, 39, 42, 46, 48, 49, 53, 57, 59, 61, 64, 66, 68, 71, 72, 75, 79, 81, 82, 85, 91, 93, 95, 98, 100, 102, 105, 106, 109, 113, 115, 116, 119, 123, 125, 128, 129, 130], "returns": [50, 83, 117], "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": "Not", "text_snippet": "namespace MP\r\n{\r\n\tnamespace Lib\r\n\t{\r\n\t\tstruct Not : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typenam"}, {"node_id": 18, "universal_type": "function", "name": "Not", "text_snippet": "namespace Lib\r\n\t{\r\n\t\tstruct Not : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename Ty>\r\n\t\t\tconstexp"}], "class_declarations": [{"node_id": 22, "universal_type": "class", "name": "Not", "text_snippet": "struct Not"}, {"node_id": 23, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 55, "universal_type": "class", "name": "And", "text_snippet": "struct And"}, {"node_id": 56, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 89, "universal_type": "class", "name": "Or", "text_snippet": "struct Or"}, {"node_id": 90, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"TraitsImpl.h\"\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"../../types/Constant.h\"\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"utils/function/Function.h\"\r\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/* HEADER *********************************************************************************/\r\n/*!\r\n\\file\tMeta/MetaFunction/Impl/BooleanOpsImpl.h\r\n\\author <NAME> (100%)\r\n\\par email: <EMAIL>\r\n\\brief\r\n\tNot, Or, And, XOR ...\r\n\r\n*/\r\n/* HEADER END *****************************************************************************/\r\n#ifndef _META_FN_BOOLEAN_OPERATIONS_IMPL_H_\r\n#define _META_FN_BOOLEAN_OPERATIONS_IMPL_H_\r\n\r\n#include \"TraitsImpl.h\"\r\n\r\n#include \"../../types/Constant.h\"\r\n#include \"utils/function/Function.h\"\r\n\r\n\r\nnamespace MP\r\n{\r\n\tnamespace Lib\r\n\t{\r\n\t\tstruct Not : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& value) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn !value;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct And : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv && ...);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tstruct Or : public Ut::Function_t\r\n\t\t{\r\n\t\t\ttemplate <typename ... Ty>\r\n\t\t\tconstexpr auto operator () (Ty&& ... argv) const noexcept\r\n\t\t\t{\r\n\t\t\t\treturn (argv || ...);\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n}\r\n\r\nnamespace MPL = ::MP::Lib;\r\n\r\n\r\n\r\n\r\n#endif\r\n\r\n"}
200
c
#include <libcgc.h> #include "libc.h" #define ACK_TRIES 3 size_t MY_TID = TID_K; size_t PIPE_RECV = tid2recvpipe(TID_K); char * STR_THREAD_NAME = "K"; char * consume_bytes(char **curr, char *end, size_t len); int syscall_dispatch(char **curr, char *end); int syscall_futex(unsigned char syscall, char **curr, char *end); int syscall_pause(unsigned char syscall, char **curr, char *end); int syscall_sendmsg(unsigned char syscall, char **curr, char *end); void _syscall_sendmsg(unsigned char recursions, unsigned char msg); #ifdef DEBUG_STACK int get_esp(void); #endif
36.87
15
(translation_unit) "#include <libcgc.h>\n#include "libc.h"\n\n#define ACK_TRIES 3\n\nsize_t MY_TID = TID_K;\nsize_t PIPE_RECV = tid2recvpipe(TID_K);\nchar * STR_THREAD_NAME = "K";\n\nchar * consume_bytes(char **curr, char *end, size_t len);\n\nint syscall_dispatch(char **curr, char *end);\nint syscall_futex(unsigned char syscall, char **curr, char *end);\nint syscall_pause(unsigned char syscall, char **curr, char *end);\nint syscall_sendmsg(unsigned char syscall, char **curr, char *end);\nvoid _syscall_sendmsg(unsigned char recursions, unsigned char msg);\n\n#ifdef DEBUG_STACK\nint get_esp(void);\n#endif\n" (preproc_include) "#include <libcgc.h>\n" (#include) "#include" (system_lib_string) "<libcgc.h>" (preproc_include) "#include "libc.h"\n" (#include) "#include" (string_literal) ""libc.h"" (") """ (string_content) "libc.h" (") """ (preproc_def) "#define ACK_TRIES 3\n" (#define) "#define" (identifier) "ACK_TRIES" (preproc_arg) "3" (declaration) "size_t MY_TID = TID_K;" (primitive_type) "size_t" (init_declarator) "MY_TID = TID_K" (identifier) "MY_TID" (=) "=" (identifier) "TID_K" (;) ";" (declaration) "size_t PIPE_RECV = tid2recvpipe(TID_K);" (primitive_type) "size_t" (init_declarator) "PIPE_RECV = tid2recvpipe(TID_K)" (identifier) "PIPE_RECV" (=) "=" (call_expression) "tid2recvpipe(TID_K)" (identifier) "tid2recvpipe" (argument_list) "(TID_K)" (() "(" (identifier) "TID_K" ()) ")" (;) ";" (declaration) "char * STR_THREAD_NAME = "K";" (primitive_type) "char" (init_declarator) "* STR_THREAD_NAME = "K"" (pointer_declarator) "* STR_THREAD_NAME" (*) "*" (identifier) "STR_THREAD_NAME" (=) "=" (string_literal) ""K"" (") """ (string_content) "K" (") """ (;) ";" (declaration) "char * consume_bytes(char **curr, char *end, size_t len);" (primitive_type) "char" (pointer_declarator) "* consume_bytes(char **curr, char *end, size_t len)" (*) "*" (function_declarator) "consume_bytes(char **curr, char *end, size_t len)" (identifier) "consume_bytes" (parameter_list) "(char **curr, char *end, size_t len)" (() "(" (parameter_declaration) "char **curr" (primitive_type) "char" (pointer_declarator) "**curr" (*) "*" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" (,) "," (parameter_declaration) "char *end" (primitive_type) "char" (pointer_declarator) "*end" (*) "*" (identifier) "end" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" ()) ")" (;) ";" (declaration) "int syscall_dispatch(char **curr, char *end);" (primitive_type) "int" (function_declarator) "syscall_dispatch(char **curr, char *end)" (identifier) "syscall_dispatch" (parameter_list) "(char **curr, char *end)" (() "(" (parameter_declaration) "char **curr" (primitive_type) "char" (pointer_declarator) "**curr" (*) "*" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" (,) "," (parameter_declaration) "char *end" (primitive_type) "char" (pointer_declarator) "*end" (*) "*" (identifier) "end" ()) ")" (;) ";" (declaration) "int syscall_futex(unsigned char syscall, char **curr, char *end);" (primitive_type) "int" (function_declarator) "syscall_futex(unsigned char syscall, char **curr, char *end)" (identifier) "syscall_futex" (parameter_list) "(unsigned char syscall, char **curr, char *end)" (() "(" (parameter_declaration) "unsigned char syscall" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "syscall" (,) "," (parameter_declaration) "char **curr" (primitive_type) "char" (pointer_declarator) "**curr" (*) "*" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" (,) "," (parameter_declaration) "char *end" (primitive_type) "char" (pointer_declarator) "*end" (*) "*" (identifier) "end" ()) ")" (;) ";" (declaration) "int syscall_pause(unsigned char syscall, char **curr, char *end);" (primitive_type) "int" (function_declarator) "syscall_pause(unsigned char syscall, char **curr, char *end)" (identifier) "syscall_pause" (parameter_list) "(unsigned char syscall, char **curr, char *end)" (() "(" (parameter_declaration) "unsigned char syscall" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "syscall" (,) "," (parameter_declaration) "char **curr" (primitive_type) "char" (pointer_declarator) "**curr" (*) "*" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" (,) "," (parameter_declaration) "char *end" (primitive_type) "char" (pointer_declarator) "*end" (*) "*" (identifier) "end" ()) ")" (;) ";" (declaration) "int syscall_sendmsg(unsigned char syscall, char **curr, char *end);" (primitive_type) "int" (function_declarator) "syscall_sendmsg(unsigned char syscall, char **curr, char *end)" (identifier) "syscall_sendmsg" (parameter_list) "(unsigned char syscall, char **curr, char *end)" (() "(" (parameter_declaration) "unsigned char syscall" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "syscall" (,) "," (parameter_declaration) "char **curr" (primitive_type) "char" (pointer_declarator) "**curr" (*) "*" (pointer_declarator) "*curr" (*) "*" (identifier) "curr" (,) "," (parameter_declaration) "char *end" (primitive_type) "char" (pointer_declarator) "*end" (*) "*" (identifier) "end" ()) ")" (;) ";" (declaration) "void _syscall_sendmsg(unsigned char recursions, unsigned char msg);" (primitive_type) "void" (function_declarator) "_syscall_sendmsg(unsigned char recursions, unsigned char msg)" (identifier) "_syscall_sendmsg" (parameter_list) "(unsigned char recursions, unsigned char msg)" (() "(" (parameter_declaration) "unsigned char recursions" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "recursions" (,) "," (parameter_declaration) "unsigned char msg" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "msg" ()) ")" (;) ";" (preproc_ifdef) "#ifdef DEBUG_STACK\nint get_esp(void);\n#endif" (#ifdef) "#ifdef" (identifier) "DEBUG_STACK" (declaration) "int get_esp(void);" (primitive_type) "int" (function_declarator) "get_esp(void)" (identifier) "get_esp" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (#endif) "#endif"
207
0
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 36.87, "nodes": 159, "errors": 0, "source_hash": "9f04c8e1396562caa43ec18d95568b3a17ae3215e199e91bf856e9f47938ac57", "categorized_nodes": 76}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <libcgc.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": "<libcgc.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"libc.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": "\"libc.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "preproc_def", "text": "#define ACK_TRIES 3\n", "parent": null, "children": [7, 8, 9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 8, "type": "identifier", "text": "ACK_TRIES", "parent": 6, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "preproc_arg", "text": "3", "parent": 6, "children": [], "start_point": {"row": 3, "column": 18}, "end_point": {"row": 3, "column": 19}}, {"id": 10, "type": "declaration", "text": "size_t MY_TID = TID_K;", "parent": null, "children": [11, 12], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 22}}, {"id": 11, "type": "primitive_type", "text": "size_t", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 12, "type": "init_declarator", "text": "MY_TID = TID_K", "parent": 10, "children": [13, 14, 15], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 21}}, {"id": 13, "type": "identifier", "text": "MY_TID", "parent": 12, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 13}}, {"id": 14, "type": "=", "text": "=", "parent": 12, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 15}}, {"id": 15, "type": "identifier", "text": "TID_K", "parent": 12, "children": [], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 21}}, {"id": 16, "type": "declaration", "text": "size_t PIPE_RECV = tid2recvpipe(TID_K);", "parent": null, "children": [17, 18], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 39}}, {"id": 17, "type": "primitive_type", "text": "size_t", "parent": 16, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 18, "type": "init_declarator", "text": "PIPE_RECV = tid2recvpipe(TID_K)", "parent": 16, "children": [19, 20, 21], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 38}}, {"id": 19, "type": "identifier", "text": "PIPE_RECV", "parent": 18, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 16}}, {"id": 20, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 18}}, {"id": 21, "type": "call_expression", "text": "tid2recvpipe(TID_K)", "parent": 18, "children": [22, 23], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 38}}, {"id": 22, "type": "identifier", "text": "tid2recvpipe", "parent": 21, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 31}}, {"id": 23, "type": "argument_list", "text": "(TID_K)", "parent": 21, "children": [24], "start_point": {"row": 6, "column": 31}, "end_point": {"row": 6, "column": 38}}, {"id": 24, "type": "identifier", "text": "TID_K", "parent": 23, "children": [], "start_point": {"row": 6, "column": 32}, "end_point": {"row": 6, "column": 37}}, {"id": 25, "type": "declaration", "text": "char * STR_THREAD_NAME = \"K\";", "parent": null, "children": [26, 27], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 29}}, {"id": 26, "type": "primitive_type", "text": "char", "parent": 25, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 4}}, {"id": 27, "type": "init_declarator", "text": "* STR_THREAD_NAME = \"K\"", "parent": 25, "children": [28, 31, 32], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 28}}, {"id": 28, "type": "pointer_declarator", "text": "* STR_THREAD_NAME", "parent": 27, "children": [29, 30], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 22}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 6}}, {"id": 30, "type": "identifier", "text": "STR_THREAD_NAME", "parent": 28, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 22}}, {"id": 31, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 24}}, {"id": 32, "type": "string_literal", "text": "\"K\"", "parent": 27, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 28}}, {"id": 33, "type": "declaration", "text": "char * consume_bytes(char **curr, char *end, size_t len);", "parent": null, "children": [34, 35], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 57}}, {"id": 34, "type": "primitive_type", "text": "char", "parent": 33, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 35, "type": "pointer_declarator", "text": "* consume_bytes(char **curr, char *end, size_t len)", "parent": 33, "children": [36, 37], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 56}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 6}}, {"id": 37, "type": "function_declarator", "text": "consume_bytes(char **curr, char *end, size_t len)", "parent": 35, "children": [38, 39], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 56}}, {"id": 38, "type": "identifier", "text": "consume_bytes", "parent": 37, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 20}}, {"id": 39, "type": "parameter_list", "text": "(char **curr, char *end, size_t len)", "parent": 37, "children": [40, 47, 51], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 56}}, {"id": 40, "type": "parameter_declaration", "text": "char **curr", "parent": 39, "children": [41, 42], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 32}}, {"id": 41, "type": "primitive_type", "text": "char", "parent": 40, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 25}}, {"id": 42, "type": "pointer_declarator", "text": "**curr", "parent": 40, "children": [43, 44], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 32}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 27}}, {"id": 44, "type": "pointer_declarator", "text": "*curr", "parent": 42, "children": [45, 46], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 32}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 28}}, {"id": 46, "type": "identifier", "text": "curr", "parent": 44, "children": [], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 32}}, {"id": 47, "type": "parameter_declaration", "text": "char *end", "parent": 39, "children": [48, 49], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 43}}, {"id": 48, "type": "primitive_type", "text": "char", "parent": 47, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 38}}, {"id": 49, "type": "pointer_declarator", "text": "*end", "parent": 47, "children": [50], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 43}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 40}}, {"id": 51, "type": "parameter_declaration", "text": "size_t len", "parent": 39, "children": [52, 53], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 55}}, {"id": 52, "type": "primitive_type", "text": "size_t", "parent": 51, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 51}}, {"id": 53, "type": "identifier", "text": "len", "parent": 51, "children": [], "start_point": {"row": 9, "column": 52}, "end_point": {"row": 9, "column": 55}}, {"id": 54, "type": "declaration", "text": "int syscall_dispatch(char **curr, char *end);", "parent": null, "children": [55, 56], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 45}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 56, "type": "function_declarator", "text": "syscall_dispatch(char **curr, char *end)", "parent": 54, "children": [57, 58], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 44}}, {"id": 57, "type": "identifier", "text": "syscall_dispatch", "parent": 56, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 20}}, {"id": 58, "type": "parameter_list", "text": "(char **curr, char *end)", "parent": 56, "children": [59, 66], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 44}}, {"id": 59, "type": "parameter_declaration", "text": "char **curr", "parent": 58, "children": [60, 61], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 32}}, {"id": 60, "type": "primitive_type", "text": "char", "parent": 59, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 25}}, {"id": 61, "type": "pointer_declarator", "text": "**curr", "parent": 59, "children": [62, 63], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 32}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 27}}, {"id": 63, "type": "pointer_declarator", "text": "*curr", "parent": 61, "children": [64, 65], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 32}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 28}}, {"id": 65, "type": "identifier", "text": "curr", "parent": 63, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 32}}, {"id": 66, "type": "parameter_declaration", "text": "char *end", "parent": 58, "children": [67, 68], "start_point": {"row": 11, "column": 34}, "end_point": {"row": 11, "column": 43}}, {"id": 67, "type": "primitive_type", "text": "char", "parent": 66, "children": [], "start_point": {"row": 11, "column": 34}, "end_point": {"row": 11, "column": 38}}, {"id": 68, "type": "pointer_declarator", "text": "*end", "parent": 66, "children": [69], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 43}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 40}}, {"id": 70, "type": "declaration", "text": "int syscall_futex(unsigned char syscall, char **curr, char *end);", "parent": null, "children": [71, 72], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 65}}, {"id": 71, "type": "primitive_type", "text": "int", "parent": 70, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 72, "type": "function_declarator", "text": "syscall_futex(unsigned char syscall, char **curr, char *end)", "parent": 70, "children": [73, 74], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 64}}, {"id": 73, "type": "identifier", "text": "syscall_futex", "parent": 72, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 17}}, {"id": 74, "type": "parameter_list", "text": "(unsigned char syscall, char **curr, char *end)", "parent": 72, "children": [75, 80, 87], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 64}}, {"id": 75, "type": "parameter_declaration", "text": "unsigned char syscall", "parent": 74, "children": [76, 79], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 39}}, {"id": 76, "type": "sized_type_specifier", "text": "unsigned char", "parent": 75, "children": [77, 78], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 31}}, {"id": 77, "type": "unsigned", "text": "unsigned", "parent": 76, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 26}}, {"id": 78, "type": "primitive_type", "text": "char", "parent": 76, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 31}}, {"id": 79, "type": "identifier", "text": "syscall", "parent": 75, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 39}}, {"id": 80, "type": "parameter_declaration", "text": "char **curr", "parent": 74, "children": [81, 82], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 52}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 45}}, {"id": 82, "type": "pointer_declarator", "text": "**curr", "parent": 80, "children": [83, 84], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 52}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 47}}, {"id": 84, "type": "pointer_declarator", "text": "*curr", "parent": 82, "children": [85, 86], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 52}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 48}}, {"id": 86, "type": "identifier", "text": "curr", "parent": 84, "children": [], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 52}}, {"id": 87, "type": "parameter_declaration", "text": "char *end", "parent": 74, "children": [88, 89], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 63}}, {"id": 88, "type": "primitive_type", "text": "char", "parent": 87, "children": [], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 58}}, {"id": 89, "type": "pointer_declarator", "text": "*end", "parent": 87, "children": [90], "start_point": {"row": 12, "column": 59}, "end_point": {"row": 12, "column": 63}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 12, "column": 59}, "end_point": {"row": 12, "column": 60}}, {"id": 91, "type": "declaration", "text": "int syscall_pause(unsigned char syscall, char **curr, char *end);", "parent": null, "children": [92, 93], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 65}}, {"id": 92, "type": "primitive_type", "text": "int", "parent": 91, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 3}}, {"id": 93, "type": "function_declarator", "text": "syscall_pause(unsigned char syscall, char **curr, char *end)", "parent": 91, "children": [94, 95], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 64}}, {"id": 94, "type": "identifier", "text": "syscall_pause", "parent": 93, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 17}}, {"id": 95, "type": "parameter_list", "text": "(unsigned char syscall, char **curr, char *end)", "parent": 93, "children": [96, 101, 108], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 64}}, {"id": 96, "type": "parameter_declaration", "text": "unsigned char syscall", "parent": 95, "children": [97, 100], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 39}}, {"id": 97, "type": "sized_type_specifier", "text": "unsigned char", "parent": 96, "children": [98, 99], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 31}}, {"id": 98, "type": "unsigned", "text": "unsigned", "parent": 97, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 26}}, {"id": 99, "type": "primitive_type", "text": "char", "parent": 97, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 31}}, {"id": 100, "type": "identifier", "text": "syscall", "parent": 96, "children": [], "start_point": {"row": 13, "column": 32}, "end_point": {"row": 13, "column": 39}}, {"id": 101, "type": "parameter_declaration", "text": "char **curr", "parent": 95, "children": [102, 103], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 52}}, {"id": 102, "type": "primitive_type", "text": "char", "parent": 101, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 45}}, {"id": 103, "type": "pointer_declarator", "text": "**curr", "parent": 101, "children": [104, 105], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 52}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 47}}, {"id": 105, "type": "pointer_declarator", "text": "*curr", "parent": 103, "children": [106, 107], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 52}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 48}}, {"id": 107, "type": "identifier", "text": "curr", "parent": 105, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 52}}, {"id": 108, "type": "parameter_declaration", "text": "char *end", "parent": 95, "children": [109, 110], "start_point": {"row": 13, "column": 54}, "end_point": {"row": 13, "column": 63}}, {"id": 109, "type": "primitive_type", "text": "char", "parent": 108, "children": [], "start_point": {"row": 13, "column": 54}, "end_point": {"row": 13, "column": 58}}, {"id": 110, "type": "pointer_declarator", "text": "*end", "parent": 108, "children": [111], "start_point": {"row": 13, "column": 59}, "end_point": {"row": 13, "column": 63}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 13, "column": 59}, "end_point": {"row": 13, "column": 60}}, {"id": 112, "type": "declaration", "text": "int syscall_sendmsg(unsigned char syscall, char **curr, char *end);", "parent": null, "children": [113, 114], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 67}}, {"id": 113, "type": "primitive_type", "text": "int", "parent": 112, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 3}}, {"id": 114, "type": "function_declarator", "text": "syscall_sendmsg(unsigned char syscall, char **curr, char *end)", "parent": 112, "children": [115, 116], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 66}}, {"id": 115, "type": "identifier", "text": "syscall_sendmsg", "parent": 114, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 19}}, {"id": 116, "type": "parameter_list", "text": "(unsigned char syscall, char **curr, char *end)", "parent": 114, "children": [117, 122, 129], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 66}}, {"id": 117, "type": "parameter_declaration", "text": "unsigned char syscall", "parent": 116, "children": [118, 121], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 41}}, {"id": 118, "type": "sized_type_specifier", "text": "unsigned char", "parent": 117, "children": [119, 120], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 33}}, {"id": 119, "type": "unsigned", "text": "unsigned", "parent": 118, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 28}}, {"id": 120, "type": "primitive_type", "text": "char", "parent": 118, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 33}}, {"id": 121, "type": "identifier", "text": "syscall", "parent": 117, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 41}}, {"id": 122, "type": "parameter_declaration", "text": "char **curr", "parent": 116, "children": [123, 124], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 54}}, {"id": 123, "type": "primitive_type", "text": "char", "parent": 122, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 47}}, {"id": 124, "type": "pointer_declarator", "text": "**curr", "parent": 122, "children": [125, 126], "start_point": {"row": 14, "column": 48}, "end_point": {"row": 14, "column": 54}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 14, "column": 48}, "end_point": {"row": 14, "column": 49}}, {"id": 126, "type": "pointer_declarator", "text": "*curr", "parent": 124, "children": [127, 128], "start_point": {"row": 14, "column": 49}, "end_point": {"row": 14, "column": 54}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 14, "column": 49}, "end_point": {"row": 14, "column": 50}}, {"id": 128, "type": "identifier", "text": "curr", "parent": 126, "children": [], "start_point": {"row": 14, "column": 50}, "end_point": {"row": 14, "column": 54}}, {"id": 129, "type": "parameter_declaration", "text": "char *end", "parent": 116, "children": [130, 131], "start_point": {"row": 14, "column": 56}, "end_point": {"row": 14, "column": 65}}, {"id": 130, "type": "primitive_type", "text": "char", "parent": 129, "children": [], "start_point": {"row": 14, "column": 56}, "end_point": {"row": 14, "column": 60}}, {"id": 131, "type": "pointer_declarator", "text": "*end", "parent": 129, "children": [132], "start_point": {"row": 14, "column": 61}, "end_point": {"row": 14, "column": 65}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 14, "column": 61}, "end_point": {"row": 14, "column": 62}}, {"id": 133, "type": "declaration", "text": "void _syscall_sendmsg(unsigned char recursions, unsigned char msg);", "parent": null, "children": [134, 135], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 67}}, {"id": 134, "type": "primitive_type", "text": "void", "parent": 133, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 135, "type": "function_declarator", "text": "_syscall_sendmsg(unsigned char recursions, unsigned char msg)", "parent": 133, "children": [136, 137], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 66}}, {"id": 136, "type": "identifier", "text": "_syscall_sendmsg", "parent": 135, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 21}}, {"id": 137, "type": "parameter_list", "text": "(unsigned char recursions, unsigned char msg)", "parent": 135, "children": [138, 143], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 66}}, {"id": 138, "type": "parameter_declaration", "text": "unsigned char recursions", "parent": 137, "children": [139, 142], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 46}}, {"id": 139, "type": "sized_type_specifier", "text": "unsigned char", "parent": 138, "children": [140, 141], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 35}}, {"id": 140, "type": "unsigned", "text": "unsigned", "parent": 139, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 30}}, {"id": 141, "type": "primitive_type", "text": "char", "parent": 139, "children": [], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 35}}, {"id": 142, "type": "identifier", "text": "recursions", "parent": 138, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 46}}, {"id": 143, "type": "parameter_declaration", "text": "unsigned char msg", "parent": 137, "children": [144, 147], "start_point": {"row": 15, "column": 48}, "end_point": {"row": 15, "column": 65}}, {"id": 144, "type": "sized_type_specifier", "text": "unsigned char", "parent": 143, "children": [145, 146], "start_point": {"row": 15, "column": 48}, "end_point": {"row": 15, "column": 61}}, {"id": 145, "type": "unsigned", "text": "unsigned", "parent": 144, "children": [], "start_point": {"row": 15, "column": 48}, "end_point": {"row": 15, "column": 56}}, {"id": 146, "type": "primitive_type", "text": "char", "parent": 144, "children": [], "start_point": {"row": 15, "column": 57}, "end_point": {"row": 15, "column": 61}}, {"id": 147, "type": "identifier", "text": "msg", "parent": 143, "children": [], "start_point": {"row": 15, "column": 62}, "end_point": {"row": 15, "column": 65}}, {"id": 148, "type": "preproc_ifdef", "text": "#ifdef DEBUG_STACK\nint get_esp(void);\n#endif", "parent": null, "children": [149, 150, 151, 158], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 149, "type": "#ifdef", "text": "#ifdef", "parent": 148, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 150, "type": "identifier", "text": "DEBUG_STACK", "parent": 148, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 18}}, {"id": 151, "type": "declaration", "text": "int get_esp(void);", "parent": 148, "children": [152, 153], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 18}}, {"id": 152, "type": "primitive_type", "text": "int", "parent": 151, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 153, "type": "function_declarator", "text": "get_esp(void)", "parent": 151, "children": [154, 155], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 154, "type": "identifier", "text": "get_esp", "parent": 153, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 11}}, {"id": 155, "type": "parameter_list", "text": "(void)", "parent": 153, "children": [156], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 17}}, {"id": 156, "type": "parameter_declaration", "text": "void", "parent": 155, "children": [157], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 16}}, {"id": 157, "type": "primitive_type", "text": "void", "parent": 156, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 16}}, {"id": 158, "type": "#endif", "text": "#endif", "parent": 148, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}]}, "node_categories": {"declarations": {"functions": [37, 56, 72, 93, 114, 135, 153], "variables": [10, 16, 25, 33, 40, 47, 51, 54, 59, 66, 70, 75, 80, 87, 91, 96, 101, 108, 112, 117, 122, 129, 133, 138, 143, 151, 156], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [21], "assignments": [], "loops": [], "conditionals": [8, 13, 15, 19, 22, 24, 30, 38, 46, 53, 57, 65, 73, 76, 79, 86, 94, 97, 100, 107, 115, 118, 121, 128, 136, 139, 142, 144, 147, 148, 149, 150, 154, 158], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 32], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "consume_bytes(char **curr, char *end, size_t len)"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "syscall_dispatch(char **curr, char *end)"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "syscall_futex(unsigned char syscall, char **curr, char *end)"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "syscall_pause(unsigned char syscall, char **curr, char *end)"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "syscall_sendmsg(unsigned char syscall, char **curr, char *end)"}, {"node_id": 135, "universal_type": "function", "name": "unknown", "text_snippet": "_syscall_sendmsg(unsigned char recursions, unsigned char msg)"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "get_esp(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <libcgc.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"libc.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <libcgc.h>\n#include \"libc.h\"\n\n#define ACK_TRIES 3\n\nsize_t MY_TID = TID_K;\nsize_t PIPE_RECV = tid2recvpipe(TID_K);\nchar * STR_THREAD_NAME = \"K\";\n\nchar * consume_bytes(char **curr, char *end, size_t len);\n\nint syscall_dispatch(char **curr, char *end);\nint syscall_futex(unsigned char syscall, char **curr, char *end);\nint syscall_pause(unsigned char syscall, char **curr, char *end);\nint syscall_sendmsg(unsigned char syscall, char **curr, char *end);\nvoid _syscall_sendmsg(unsigned char recursions, unsigned char msg);\n\n#ifdef DEBUG_STACK\nint get_esp(void);\n#endif\n"}
201
c
/* * * Copyright (c) 2020 The University of Waikato, Hamilton, New Zealand. * * This file is part of netstinky-ids. * * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/BSD-2-Clause * * */ /** @file * */ #ifndef SRC_IDS_SERVER_H_ #define SRC_IDS_SERVER_H_ #include <assert.h> #include <stdlib.h> #include <uv.h> #include "ids_event_list.h" /** * Sets up libuv variables for the IDS event server. * * @param loop The main event loop of the IDS * @param handle The address of an uninitialized uv_tcp_t structure * @param port the TCP port for the server to listen on * @param list a pointer to the #ids_event_list to send to clients * @return 0 if successful, -1 on error */ int setup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list); #endif /* SRC_IDS_SERVER_H_ */
26.67
33
(translation_unit) "/*\n *\n * Copyright (c) 2020 The University of Waikato, Hamilton, New Zealand.\n *\n * This file is part of netstinky-ids.\n *\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file or at\n * https://opensource.org/licenses/BSD-2-Clause\n *\n *\n */\n/** @file\n *\n */\n#ifndef SRC_IDS_SERVER_H_\n#define SRC_IDS_SERVER_H_\n\n#include <assert.h>\n#include <stdlib.h>\n\n#include <uv.h>\n\n#include "ids_event_list.h"\n\n/**\n * Sets up libuv variables for the IDS event server.\n *\n * @param loop The main event loop of the IDS\n * @param handle The address of an uninitialized uv_tcp_t structure\n * @param port the TCP port for the server to listen on\n * @param list a pointer to the #ids_event_list to send to clients\n * @return 0 if successful, -1 on error\n */\nint\nsetup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list);\n\n#endif /* SRC_IDS_SERVER_H_ */\n" (comment) "/*\n *\n * Copyright (c) 2020 The University of Waikato, Hamilton, New Zealand.\n *\n * This file is part of netstinky-ids.\n *\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file or at\n * https://opensource.org/licenses/BSD-2-Clause\n *\n *\n */" (comment) "/** @file\n *\n */" (preproc_ifdef) "#ifndef SRC_IDS_SERVER_H_\n#define SRC_IDS_SERVER_H_\n\n#include <assert.h>\n#include <stdlib.h>\n\n#include <uv.h>\n\n#include "ids_event_list.h"\n\n/**\n * Sets up libuv variables for the IDS event server.\n *\n * @param loop The main event loop of the IDS\n * @param handle The address of an uninitialized uv_tcp_t structure\n * @param port the TCP port for the server to listen on\n * @param list a pointer to the #ids_event_list to send to clients\n * @return 0 if successful, -1 on error\n */\nint\nsetup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list);\n\n#endif" (#ifndef) "#ifndef" (identifier) "SRC_IDS_SERVER_H_" (preproc_def) "#define SRC_IDS_SERVER_H_\n" (#define) "#define" (identifier) "SRC_IDS_SERVER_H_" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <uv.h>\n" (#include) "#include" (system_lib_string) "<uv.h>" (preproc_include) "#include "ids_event_list.h"\n" (#include) "#include" (string_literal) ""ids_event_list.h"" (") """ (string_content) "ids_event_list.h" (") """ (comment) "/**\n * Sets up libuv variables for the IDS event server.\n *\n * @param loop The main event loop of the IDS\n * @param handle The address of an uninitialized uv_tcp_t structure\n * @param port the TCP port for the server to listen on\n * @param list a pointer to the #ids_event_list to send to clients\n * @return 0 if successful, -1 on error\n */" (declaration) "int\nsetup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list);" (primitive_type) "int" (function_declarator) "setup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list)" (identifier) "setup_event_server" (parameter_list) "(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list)" (() "(" (parameter_declaration) "uv_loop_t *loop" (type_identifier) "uv_loop_t" (pointer_declarator) "*loop" (*) "*" (identifier) "loop" (,) "," (parameter_declaration) "uv_tcp_t *handle" (type_identifier) "uv_tcp_t" (pointer_declarator) "*handle" (*) "*" (identifier) "handle" (,) "," (parameter_declaration) "int port" (primitive_type) "int" (identifier) "port" (,) "," (parameter_declaration) "struct ids_event_list *list" (struct_specifier) "struct ids_event_list" (struct) "struct" (type_identifier) "ids_event_list" (pointer_declarator) "*list" (*) "*" (identifier) "list" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* SRC_IDS_SERVER_H_ */"
58
0
{"language": "c", "success": true, "metadata": {"lines": 33, "avg_line_length": 26.67, "nodes": 44, "errors": 0, "source_hash": "2f4b6bc79150819caa084b21d052fd0e12da4430ab39291befd4b2d4cb5a66a7", "categorized_nodes": 33}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SRC_IDS_SERVER_H_\n#define SRC_IDS_SERVER_H_\n\n#include <assert.h>\n#include <stdlib.h>\n\n#include <uv.h>\n\n#include \"ids_event_list.h\"\n\n/**\n * Sets up libuv variables for the IDS event server.\n *\n * @param loop The main event loop of the IDS\n * @param handle The address of an uninitialized uv_tcp_t structure\n * @param port the TCP port for the server to listen on\n * @param list a pointer to the #ids_event_list to send to clients\n * @return 0 if successful, -1 on error\n */\nint\nsetup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 43], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 37, "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": "SRC_IDS_SERVER_H_", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define SRC_IDS_SERVER_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": "SRC_IDS_SERVER_H_", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <assert.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": "system_lib_string", "text": "<assert.h>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <stdlib.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": "system_lib_string", "text": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <uv.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<uv.h>", "parent": 12, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 15}}, {"id": 15, "type": "preproc_include", "text": "#include \"ids_event_list.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"ids_event_list.h\"", "parent": 15, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 27}}, {"id": 18, "type": "declaration", "text": "int\nsetup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list);", "parent": 0, "children": [19, 20], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 93}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 3}}, {"id": 20, "type": "function_declarator", "text": "setup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list)", "parent": 18, "children": [21, 22], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 92}}, {"id": 21, "type": "identifier", "text": "setup_event_server", "parent": 20, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 18}}, {"id": 22, "type": "parameter_list", "text": "(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list)", "parent": 20, "children": [23, 28, 33, 36], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 92}}, {"id": 23, "type": "parameter_declaration", "text": "uv_loop_t *loop", "parent": 22, "children": [24, 25], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 34}}, {"id": 24, "type": "type_identifier", "text": "uv_loop_t", "parent": 23, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 28}}, {"id": 25, "type": "pointer_declarator", "text": "*loop", "parent": 23, "children": [26, 27], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 34}}, {"id": 26, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 30}}, {"id": 27, "type": "identifier", "text": "loop", "parent": 25, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 34}}, {"id": 28, "type": "parameter_declaration", "text": "uv_tcp_t *handle", "parent": 22, "children": [29, 30], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 52}}, {"id": 29, "type": "type_identifier", "text": "uv_tcp_t", "parent": 28, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 44}}, {"id": 30, "type": "pointer_declarator", "text": "*handle", "parent": 28, "children": [31, 32], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 52}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 46}}, {"id": 32, "type": "identifier", "text": "handle", "parent": 30, "children": [], "start_point": {"row": 35, "column": 46}, "end_point": {"row": 35, "column": 52}}, {"id": 33, "type": "parameter_declaration", "text": "int port", "parent": 22, "children": [34, 35], "start_point": {"row": 35, "column": 54}, "end_point": {"row": 35, "column": 62}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 35, "column": 54}, "end_point": {"row": 35, "column": 57}}, {"id": 35, "type": "identifier", "text": "port", "parent": 33, "children": [], "start_point": {"row": 35, "column": 58}, "end_point": {"row": 35, "column": 62}}, {"id": 36, "type": "parameter_declaration", "text": "struct ids_event_list *list", "parent": 22, "children": [37, 40], "start_point": {"row": 35, "column": 64}, "end_point": {"row": 35, "column": 91}}, {"id": 37, "type": "struct_specifier", "text": "struct ids_event_list", "parent": 36, "children": [38, 39], "start_point": {"row": 35, "column": 64}, "end_point": {"row": 35, "column": 85}}, {"id": 38, "type": "struct", "text": "struct", "parent": 37, "children": [], "start_point": {"row": 35, "column": 64}, "end_point": {"row": 35, "column": 70}}, {"id": 39, "type": "type_identifier", "text": "ids_event_list", "parent": 37, "children": [], "start_point": {"row": 35, "column": 71}, "end_point": {"row": 35, "column": 85}}, {"id": 40, "type": "pointer_declarator", "text": "*list", "parent": 36, "children": [41, 42], "start_point": {"row": 35, "column": 86}, "end_point": {"row": 35, "column": 91}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 35, "column": 86}, "end_point": {"row": 35, "column": 87}}, {"id": 42, "type": "identifier", "text": "list", "parent": 40, "children": [], "start_point": {"row": 35, "column": 87}, "end_point": {"row": 35, "column": 91}}, {"id": 43, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 6}}]}, "node_categories": {"declarations": {"functions": [20], "variables": [18, 23, 28, 33, 36], "classes": [37, 38], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 21, 24, 27, 29, 32, 35, 39, 42, 43], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 20, "universal_type": "function", "name": "port,", "text_snippet": "setup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list)"}], "class_declarations": [{"node_id": 37, "universal_type": "class", "name": "ids_event_list", "text_snippet": "struct ids_event_list"}, {"node_id": 38, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <assert.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 <uv.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"ids_event_list.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n *\n * Copyright (c) 2020 The University of Waikato, Hamilton, New Zealand.\n *\n * This file is part of netstinky-ids.\n *\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file or at\n * https://opensource.org/licenses/BSD-2-Clause\n *\n *\n */\n/** @file\n *\n */\n#ifndef SRC_IDS_SERVER_H_\n#define SRC_IDS_SERVER_H_\n\n#include <assert.h>\n#include <stdlib.h>\n\n#include <uv.h>\n\n#include \"ids_event_list.h\"\n\n/**\n * Sets up libuv variables for the IDS event server.\n *\n * @param loop The main event loop of the IDS\n * @param handle The address of an uninitialized uv_tcp_t structure\n * @param port the TCP port for the server to listen on\n * @param list a pointer to the #ids_event_list to send to clients\n * @return 0 if successful, -1 on error\n */\nint\nsetup_event_server(uv_loop_t *loop, uv_tcp_t *handle, int port, struct ids_event_list *list);\n\n#endif /* SRC_IDS_SERVER_H_ */\n"}
202
c
#include<stdio.h> void cook(int (*ary)[5]) { int score = 0; int flag = 0; for (int i = 0; i < 5; i++) { for (int j = 0; j < 4; j++) { ary[i][4] += ary[i][j]; } if (ary[i][4] > score) { score = ary[i][4]; flag = i; } } printf("%d %d\n", flag+1, score); } int main() { int arr[5][5] = {0,}; for (int i = 0; i < 5; i++) { for (int j = 0; j < 4; j++) { scanf("%d", &arr[i][j]); } } cook(arr); return 0; }
18.89
27
(translation_unit) "#include<stdio.h>\n\nvoid cook(int (*ary)[5])\n{\n int score = 0;\n int flag = 0;\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }\n printf("%d %d\n", flag+1, score);\n}\n\nint main()\n{\n int arr[5][5] = {0,};\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf("%d", &arr[i][j]);\n }\n }\n cook(arr);\n return 0;\n}" (preproc_include) "#include<stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "void cook(int (*ary)[5])\n{\n int score = 0;\n int flag = 0;\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }\n printf("%d %d\n", flag+1, score);\n}" (primitive_type) "void" (function_declarator) "cook(int (*ary)[5])" (identifier) "cook" (parameter_list) "(int (*ary)[5])" (() "(" (parameter_declaration) "int (*ary)[5]" (primitive_type) "int" (array_declarator) "(*ary)[5]" (parenthesized_declarator) "(*ary)" (() "(" (pointer_declarator) "*ary" (*) "*" (identifier) "ary" ()) ")" ([) "[" (number_literal) "5" (]) "]" ()) ")" (compound_statement) "{\n int score = 0;\n int flag = 0;\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }\n printf("%d %d\n", flag+1, score);\n}" ({) "{" (declaration) "int score = 0;" (primitive_type) "int" (init_declarator) "score = 0" (identifier) "score" (=) "=" (number_literal) "0" (;) ";" (declaration) "int flag = 0;" (primitive_type) "int" (init_declarator) "flag = 0" (identifier) "flag" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 5" (identifier) "i" (<) "<" (number_literal) "5" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }" ({) "{" (for_statement) "for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }" (for) "for" (() "(" (declaration) "int j = 0;" (primitive_type) "int" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < 4" (identifier) "j" (<) "<" (number_literal) "4" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n ary[i][4] += ary[i][j];\n }" ({) "{" (expression_statement) "ary[i][4] += ary[i][j];" (assignment_expression) "ary[i][4] += ary[i][j]" (subscript_expression) "ary[i][4]" (subscript_expression) "ary[i]" (identifier) "ary" ([) "[" (identifier) "i" (]) "]" ([) "[" (number_literal) "4" (]) "]" (+=) "+=" (subscript_expression) "ary[i][j]" (subscript_expression) "ary[i]" (identifier) "ary" ([) "[" (identifier) "i" (]) "]" ([) "[" (identifier) "j" (]) "]" (;) ";" (}) "}" (if_statement) "if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }" (if) "if" (parenthesized_expression) "(ary[i][4] > score)" (() "(" (binary_expression) "ary[i][4] > score" (subscript_expression) "ary[i][4]" (subscript_expression) "ary[i]" (identifier) "ary" ([) "[" (identifier) "i" (]) "]" ([) "[" (number_literal) "4" (]) "]" (>) ">" (identifier) "score" ()) ")" (compound_statement) "{\n score = ary[i][4];\n flag = i;\n }" ({) "{" (expression_statement) "score = ary[i][4];" (assignment_expression) "score = ary[i][4]" (identifier) "score" (=) "=" (subscript_expression) "ary[i][4]" (subscript_expression) "ary[i]" (identifier) "ary" ([) "[" (identifier) "i" (]) "]" ([) "[" (number_literal) "4" (]) "]" (;) ";" (expression_statement) "flag = i;" (assignment_expression) "flag = i" (identifier) "flag" (=) "=" (identifier) "i" (;) ";" (}) "}" (}) "}" (expression_statement) "printf("%d %d\n", flag+1, score);" (call_expression) "printf("%d %d\n", flag+1, score)" (identifier) "printf" (argument_list) "("%d %d\n", flag+1, score)" (() "(" (string_literal) ""%d %d\n"" (") """ (string_content) "%d %d" (escape_sequence) "\n" (") """ (,) "," (binary_expression) "flag+1" (identifier) "flag" (+) "+" (number_literal) "1" (,) "," (identifier) "score" ()) ")" (;) ";" (}) "}" (function_definition) "int main()\n{\n int arr[5][5] = {0,};\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf("%d", &arr[i][j]);\n }\n }\n cook(arr);\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int arr[5][5] = {0,};\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf("%d", &arr[i][j]);\n }\n }\n cook(arr);\n return 0;\n}" ({) "{" (declaration) "int arr[5][5] = {0,};" (primitive_type) "int" (init_declarator) "arr[5][5] = {0,}" (array_declarator) "arr[5][5]" (array_declarator) "arr[5]" (identifier) "arr" ([) "[" (number_literal) "5" (]) "]" ([) "[" (number_literal) "5" (]) "]" (=) "=" (initializer_list) "{0,}" ({) "{" (number_literal) "0" (,) "," (}) "}" (;) ";" (for_statement) "for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf("%d", &arr[i][j]);\n }\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < 5" (identifier) "i" (<) "<" (number_literal) "5" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for (int j = 0; j < 4; j++) {\n scanf("%d", &arr[i][j]);\n }\n }" ({) "{" (for_statement) "for (int j = 0; j < 4; j++) {\n scanf("%d", &arr[i][j]);\n }" (for) "for" (() "(" (declaration) "int j = 0;" (primitive_type) "int" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < 4" (identifier) "j" (<) "<" (number_literal) "4" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n scanf("%d", &arr[i][j]);\n }" ({) "{" (expression_statement) "scanf("%d", &arr[i][j]);" (call_expression) "scanf("%d", &arr[i][j])" (identifier) "scanf" (argument_list) "("%d", &arr[i][j])" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&arr[i][j]" (&) "&" (subscript_expression) "arr[i][j]" (subscript_expression) "arr[i]" (identifier) "arr" ([) "[" (identifier) "i" (]) "]" ([) "[" (identifier) "j" (]) "]" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) "cook(arr);" (call_expression) "cook(arr)" (identifier) "cook" (argument_list) "(arr)" (() "(" (identifier) "arr" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
273
0
{"language": "c", "success": true, "metadata": {"lines": 27, "avg_line_length": 18.89, "nodes": 160, "errors": 0, "source_hash": "05f330e1ab434aea3eddddabec711361585360f86be1579060b7019d7dbe92e1", "categorized_nodes": 110}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "void cook(int (*ary)[5])\n{\n int score = 0;\n int flag = 0;\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }\n printf(\"%d %d\\n\", flag+1, score);\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 16, "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": "cook(int (*ary)[5])", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "identifier", "text": "cook", "parent": 5, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 9}}, {"id": 7, "type": "parameter_list", "text": "(int (*ary)[5])", "parent": 5, "children": [8], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 24}}, {"id": 8, "type": "parameter_declaration", "text": "int (*ary)[5]", "parent": 7, "children": [9, 10], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 23}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 13}}, {"id": 10, "type": "array_declarator", "text": "(*ary)[5]", "parent": 8, "children": [11, 15], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 23}}, {"id": 11, "type": "parenthesized_declarator", "text": "(*ary)", "parent": 10, "children": [12], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 20}}, {"id": 12, "type": "pointer_declarator", "text": "*ary", "parent": 11, "children": [13, 14], "start_point": {"row": 2, "column": 15}, "end_point": {"row": 2, "column": 19}}, {"id": 13, "type": "*", "text": "*", "parent": 12, "children": [], "start_point": {"row": 2, "column": 15}, "end_point": {"row": 2, "column": 16}}, {"id": 14, "type": "identifier", "text": "ary", "parent": 12, "children": [], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 19}}, {"id": 15, "type": "number_literal", "text": "5", "parent": 10, "children": [], "start_point": {"row": 2, "column": 21}, "end_point": {"row": 2, "column": 22}}, {"id": 16, "type": "declaration", "text": "int score = 0;", "parent": 3, "children": [17, 18], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 18}}, {"id": 17, "type": "primitive_type", "text": "int", "parent": 16, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 7}}, {"id": 18, "type": "init_declarator", "text": "score = 0", "parent": 16, "children": [19, 20, 21], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 17}}, {"id": 19, "type": "identifier", "text": "score", "parent": 18, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 13}}, {"id": 20, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 15}}, {"id": 21, "type": "number_literal", "text": "0", "parent": 18, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 17}}, {"id": 22, "type": "declaration", "text": "int flag = 0;", "parent": 3, "children": [23, 24], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 17}}, {"id": 23, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 24, "type": "init_declarator", "text": "flag = 0", "parent": 22, "children": [25, 26, 27], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 16}}, {"id": 25, "type": "identifier", "text": "flag", "parent": 24, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 26, "type": "=", "text": "=", "parent": 24, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 14}}, {"id": 27, "type": "number_literal", "text": "0", "parent": 24, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 16}}, {"id": 28, "type": "for_statement", "text": "for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }", "parent": 3, "children": [29, 35, 39], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 14, "column": 5}}, {"id": 29, "type": "declaration", "text": "int i = 0;", "parent": 28, "children": [30, 31], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 12}}, {"id": 31, "type": "init_declarator", "text": "i = 0", "parent": 29, "children": [32, 33, 34], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 18}}, {"id": 32, "type": "identifier", "text": "i", "parent": 31, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 14}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 6, "column": 15}, "end_point": {"row": 6, "column": 16}}, {"id": 34, "type": "number_literal", "text": "0", "parent": 31, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 18}}, {"id": 35, "type": "binary_expression", "text": "i < 5", "parent": 28, "children": [36, 37, 38], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 25}}, {"id": 36, "type": "identifier", "text": "i", "parent": 35, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 21}}, {"id": 37, "type": "<", "text": "<", "parent": 35, "children": [], "start_point": {"row": 6, "column": 22}, "end_point": {"row": 6, "column": 23}}, {"id": 38, "type": "number_literal", "text": "5", "parent": 35, "children": [], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 25}}, {"id": 39, "type": "update_expression", "text": "i++", "parent": 28, "children": [40, 41], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 30}}, {"id": 40, "type": "identifier", "text": "i", "parent": 39, "children": [], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 28}}, {"id": 41, "type": "++", "text": "++", "parent": 39, "children": [], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 30}}, {"id": 42, "type": "for_statement", "text": "for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }", "parent": 28, "children": [43, 49, 53], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 9, "column": 9}}, {"id": 43, "type": "declaration", "text": "int j = 0;", "parent": 42, "children": [44, 45], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 23}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 16}}, {"id": 45, "type": "init_declarator", "text": "j = 0", "parent": 43, "children": [46, 47, 48], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 22}}, {"id": 46, "type": "identifier", "text": "j", "parent": 45, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 18}}, {"id": 47, "type": "=", "text": "=", "parent": 45, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 20}}, {"id": 48, "type": "number_literal", "text": "0", "parent": 45, "children": [], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 22}}, {"id": 49, "type": "binary_expression", "text": "j < 4", "parent": 42, "children": [50, 51, 52], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 29}}, {"id": 50, "type": "identifier", "text": "j", "parent": 49, "children": [], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 25}}, {"id": 51, "type": "<", "text": "<", "parent": 49, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 27}}, {"id": 52, "type": "number_literal", "text": "4", "parent": 49, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 29}}, {"id": 53, "type": "update_expression", "text": "j++", "parent": 42, "children": [54, 55], "start_point": {"row": 7, "column": 31}, "end_point": {"row": 7, "column": 34}}, {"id": 54, "type": "identifier", "text": "j", "parent": 53, "children": [], "start_point": {"row": 7, "column": 31}, "end_point": {"row": 7, "column": 32}}, {"id": 55, "type": "++", "text": "++", "parent": 53, "children": [], "start_point": {"row": 7, "column": 32}, "end_point": {"row": 7, "column": 34}}, {"id": 56, "type": "assignment_expression", "text": "ary[i][4] += ary[i][j]", "parent": 42, "children": [57, 62, 63], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 34}}, {"id": 57, "type": "subscript_expression", "text": "ary[i][4]", "parent": 56, "children": [58, 61], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 21}}, {"id": 58, "type": "subscript_expression", "text": "ary[i]", "parent": 57, "children": [59, 60], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 18}}, {"id": 59, "type": "identifier", "text": "ary", "parent": 58, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 15}}, {"id": 60, "type": "identifier", "text": "i", "parent": 58, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 17}}, {"id": 61, "type": "number_literal", "text": "4", "parent": 57, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 20}}, {"id": 62, "type": "+=", "text": "+=", "parent": 56, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 24}}, {"id": 63, "type": "subscript_expression", "text": "ary[i][j]", "parent": 56, "children": [64, 67], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 34}}, {"id": 64, "type": "subscript_expression", "text": "ary[i]", "parent": 63, "children": [65, 66], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 31}}, {"id": 65, "type": "identifier", "text": "ary", "parent": 64, "children": [], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 28}}, {"id": 66, "type": "identifier", "text": "i", "parent": 64, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 30}}, {"id": 67, "type": "identifier", "text": "j", "parent": 63, "children": [], "start_point": {"row": 8, "column": 32}, "end_point": {"row": 8, "column": 33}}, {"id": 68, "type": "if_statement", "text": "if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }", "parent": 28, "children": [69], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 69, "type": "parenthesized_expression", "text": "(ary[i][4] > score)", "parent": 68, "children": [70], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 30}}, {"id": 70, "type": "binary_expression", "text": "ary[i][4] > score", "parent": 69, "children": [71, 76, 77], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 29}}, {"id": 71, "type": "subscript_expression", "text": "ary[i][4]", "parent": 70, "children": [72, 75], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 21}}, {"id": 72, "type": "subscript_expression", "text": "ary[i]", "parent": 71, "children": [73, 74], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 18}}, {"id": 73, "type": "identifier", "text": "ary", "parent": 72, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 15}}, {"id": 74, "type": "identifier", "text": "i", "parent": 72, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 17}}, {"id": 75, "type": "number_literal", "text": "4", "parent": 71, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 20}}, {"id": 76, "type": ">", "text": ">", "parent": 70, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 23}}, {"id": 77, "type": "identifier", "text": "score", "parent": 70, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 29}}, {"id": 78, "type": "assignment_expression", "text": "score = ary[i][4]", "parent": 68, "children": [79, 80, 81], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 29}}, {"id": 79, "type": "identifier", "text": "score", "parent": 78, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 17}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 19}}, {"id": 81, "type": "subscript_expression", "text": "ary[i][4]", "parent": 78, "children": [82, 85], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 29}}, {"id": 82, "type": "subscript_expression", "text": "ary[i]", "parent": 81, "children": [83, 84], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 26}}, {"id": 83, "type": "identifier", "text": "ary", "parent": 82, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 23}}, {"id": 84, "type": "identifier", "text": "i", "parent": 82, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 25}}, {"id": 85, "type": "number_literal", "text": "4", "parent": 81, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 28}}, {"id": 86, "type": "assignment_expression", "text": "flag = i", "parent": 68, "children": [87, 88, 89], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 20}}, {"id": 87, "type": "identifier", "text": "flag", "parent": 86, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 16}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 89, "type": "identifier", "text": "i", "parent": 86, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 90, "type": "call_expression", "text": "printf(\"%d %d\\n\", flag+1, score)", "parent": 3, "children": [91, 92], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 36}}, {"id": 91, "type": "identifier", "text": "printf", "parent": 90, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 10}}, {"id": 92, "type": "argument_list", "text": "(\"%d %d\\n\", flag+1, score)", "parent": 90, "children": [93, 95, 99], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 36}}, {"id": 93, "type": "string_literal", "text": "\"%d %d\\n\"", "parent": 92, "children": [94], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 94, "type": "escape_sequence", "text": "\\n", "parent": 93, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 19}}, {"id": 95, "type": "binary_expression", "text": "flag+1", "parent": 92, "children": [96, 97, 98], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 28}}, {"id": 96, "type": "identifier", "text": "flag", "parent": 95, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 26}}, {"id": 97, "type": "+", "text": "+", "parent": 95, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 27}}, {"id": 98, "type": "number_literal", "text": "1", "parent": 95, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 28}}, {"id": 99, "type": "identifier", "text": "score", "parent": 92, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 35}}, {"id": 100, "type": "function_definition", "text": "int main()\n{\n int arr[5][5] = {0,};\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf(\"%d\", &arr[i][j]);\n }\n }\n cook(arr);\n return 0;\n}", "parent": null, "children": [101, 102], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 102, "type": "function_declarator", "text": "main()", "parent": 100, "children": [103, 104], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 10}}, {"id": 103, "type": "identifier", "text": "main", "parent": 102, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 8}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 10}}, {"id": 105, "type": "declaration", "text": "int arr[5][5] = {0,};", "parent": 100, "children": [106, 107], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 25}}, {"id": 106, "type": "primitive_type", "text": "int", "parent": 105, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 107, "type": "init_declarator", "text": "arr[5][5] = {0,}", "parent": 105, "children": [108, 113, 114], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 24}}, {"id": 108, "type": "array_declarator", "text": "arr[5][5]", "parent": 107, "children": [109, 112], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 17}}, {"id": 109, "type": "array_declarator", "text": "arr[5]", "parent": 108, "children": [110, 111], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 14}}, {"id": 110, "type": "identifier", "text": "arr", "parent": 109, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 11}}, {"id": 111, "type": "number_literal", "text": "5", "parent": 109, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 112, "type": "number_literal", "text": "5", "parent": 108, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 16}}, {"id": 113, "type": "=", "text": "=", "parent": 107, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 19}}, {"id": 114, "type": "initializer_list", "text": "{0,}", "parent": 107, "children": [115], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 24}}, {"id": 115, "type": "number_literal", "text": "0", "parent": 114, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 22}}, {"id": 116, "type": "for_statement", "text": "for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf(\"%d\", &arr[i][j]);\n }\n }", "parent": 100, "children": [117, 123, 127], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 25, "column": 5}}, {"id": 117, "type": "declaration", "text": "int i = 0;", "parent": 116, "children": [118, 119], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 19}}, {"id": 118, "type": "primitive_type", "text": "int", "parent": 117, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 12}}, {"id": 119, "type": "init_declarator", "text": "i = 0", "parent": 117, "children": [120, 121, 122], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 18}}, {"id": 120, "type": "identifier", "text": "i", "parent": 119, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 14}}, {"id": 121, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 122, "type": "number_literal", "text": "0", "parent": 119, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 18}}, {"id": 123, "type": "binary_expression", "text": "i < 5", "parent": 116, "children": [124, 125, 126], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 25}}, {"id": 124, "type": "identifier", "text": "i", "parent": 123, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 21}}, {"id": 125, "type": "<", "text": "<", "parent": 123, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 23}}, {"id": 126, "type": "number_literal", "text": "5", "parent": 123, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 127, "type": "update_expression", "text": "i++", "parent": 116, "children": [128, 129], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 30}}, {"id": 128, "type": "identifier", "text": "i", "parent": 127, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 28}}, {"id": 129, "type": "++", "text": "++", "parent": 127, "children": [], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 30}}, {"id": 130, "type": "for_statement", "text": "for (int j = 0; j < 4; j++) {\n scanf(\"%d\", &arr[i][j]);\n }", "parent": 116, "children": [131, 137, 141], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 24, "column": 9}}, {"id": 131, "type": "declaration", "text": "int j = 0;", "parent": 130, "children": [132, 133], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 23}}, {"id": 132, "type": "primitive_type", "text": "int", "parent": 131, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 16}}, {"id": 133, "type": "init_declarator", "text": "j = 0", "parent": 131, "children": [134, 135, 136], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 22}}, {"id": 134, "type": "identifier", "text": "j", "parent": 133, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 18}}, {"id": 135, "type": "=", "text": "=", "parent": 133, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 133, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 22}}, {"id": 137, "type": "binary_expression", "text": "j < 4", "parent": 130, "children": [138, 139, 140], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 29}}, {"id": 138, "type": "identifier", "text": "j", "parent": 137, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 25}}, {"id": 139, "type": "<", "text": "<", "parent": 137, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 27}}, {"id": 140, "type": "number_literal", "text": "4", "parent": 137, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 29}}, {"id": 141, "type": "update_expression", "text": "j++", "parent": 130, "children": [142, 143], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 34}}, {"id": 142, "type": "identifier", "text": "j", "parent": 141, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 32}}, {"id": 143, "type": "++", "text": "++", "parent": 141, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 34}}, {"id": 144, "type": "call_expression", "text": "scanf(\"%d\", &arr[i][j])", "parent": 130, "children": [145, 146], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 35}}, {"id": 145, "type": "identifier", "text": "scanf", "parent": 144, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 17}}, {"id": 146, "type": "argument_list", "text": "(\"%d\", &arr[i][j])", "parent": 144, "children": [147, 148], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 35}}, {"id": 147, "type": "string_literal", "text": "\"%d\"", "parent": 146, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 22}}, {"id": 148, "type": "pointer_expression", "text": "&arr[i][j]", "parent": 146, "children": [149], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 34}}, {"id": 149, "type": "subscript_expression", "text": "arr[i][j]", "parent": 148, "children": [150, 153], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 34}}, {"id": 150, "type": "subscript_expression", "text": "arr[i]", "parent": 149, "children": [151, 152], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 31}}, {"id": 151, "type": "identifier", "text": "arr", "parent": 150, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 28}}, {"id": 152, "type": "identifier", "text": "i", "parent": 150, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 30}}, {"id": 153, "type": "identifier", "text": "j", "parent": 149, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 33}}, {"id": 154, "type": "call_expression", "text": "cook(arr)", "parent": 100, "children": [155, 156], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 13}}, {"id": 155, "type": "identifier", "text": "cook", "parent": 154, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 8}}, {"id": 156, "type": "argument_list", "text": "(arr)", "parent": 154, "children": [157], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 13}}, {"id": 157, "type": "identifier", "text": "arr", "parent": 156, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 12}}, {"id": 158, "type": "return_statement", "text": "return 0;", "parent": 100, "children": [159], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 13}}, {"id": 159, "type": "number_literal", "text": "0", "parent": 158, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}]}, "node_categories": {"declarations": {"functions": [3, 5, 100, 102], "variables": [8, 16, 22, 29, 43, 105, 117, 131], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [35, 39, 49, 53, 57, 58, 63, 64, 69, 70, 71, 72, 81, 82, 90, 95, 123, 127, 137, 141, 144, 148, 149, 150, 154], "assignments": [56, 78, 86], "loops": [28, 42, 116, 130], "conditionals": [6, 14, 19, 25, 32, 36, 40, 46, 50, 54, 59, 60, 65, 66, 67, 68, 73, 74, 77, 79, 83, 84, 87, 89, 91, 96, 99, 103, 110, 120, 124, 128, 134, 138, 142, 145, 151, 152, 153, 155, 157], "returns": [158], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 15, 21, 27, 34, 38, 48, 52, 61, 75, 85, 93, 98, 111, 112, 115, 122, 126, 136, 140, 147, 159], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "cook", "text_snippet": "void cook(int (*ary)[5])\n{\n int score = 0;\n int flag = 0;\n for (int i = 0; i < 5; i++) {\n "}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "cook(int (*ary)[5])"}, {"node_id": 100, "universal_type": "function", "name": "main", "text_snippet": "int main()\n{\n int arr[5][5] = {0,};\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j <"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\n\nvoid cook(int (*ary)[5])\n{\n int score = 0;\n int flag = 0;\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n ary[i][4] += ary[i][j];\n }\n if (ary[i][4] > score) {\n score = ary[i][4];\n flag = i;\n }\n }\n printf(\"%d %d\\n\", flag+1, score);\n}\n\nint main()\n{\n int arr[5][5] = {0,};\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 4; j++) {\n scanf(\"%d\", &arr[i][j]);\n }\n }\n cook(arr);\n return 0;\n}"}
203
c
// // Created by <NAME> on 28/12/2021. // #ifndef SFM_SCENE_RECONSTRUCTION_H #define SFM_SCENE_RECONSTRUCTION_H #include <set> #include "filters/filter.h" #include "triangulation/triangulator.h" #include "bundle-adjustment/bundle_adjuster.h" #include "image.h" #include "features.h" #include "camera.h" #include "matches.h" #include "point_cloud.h" #include "pose.h" #include "image_pair.h" class SceneReconstruction { private: std::vector<Image>& _mImages; std::map<ImageID, Pose> _mCameraPoses; std::set<ImageID> _mDoneViews; std::set<ImageID> _mGoodViews; PointCloud _pointCloud; std::vector<Camera>& _mCameras; std::vector<Features>& _mImageFeatures; Matches& _mFeatureMatchMatrix; cv::Ptr<Triangulator> _triangulator; cv::Ptr<BundleAdjuster> _bundleAdjuster; std::vector<cv::Ptr<Filter>> _filters; void initialise(std::vector<ImagePair> baselines); bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D); void camerasToPlyFile(const std::string& cameraFile, bool showRotation); public: SceneReconstruction(std::vector<Image>& mImages, std::vector<Camera>& mCameras, std::vector<Features>& mImageFeatures, Matches& mFeatureMatchMatrix, const cv::Ptr<Triangulator>& triangulator, const cv::Ptr<BundleAdjuster>& bundleAdjuster, std::vector<cv::Ptr<Filter>>& filters); SceneReconstruction(std::vector<Image> &mImages, std::vector<Camera> &mCameras, std::vector<Features> &mImageFeatures, Matches &mFeatureMatchMatrix, ImagePair& baselinePair, const cv::Ptr<Triangulator>& triangulator, const cv::Ptr<BundleAdjuster>& bundleAdjuster, std::vector<cv::Ptr<Filter>>& filters); void registerMoreImages(); bool registerImage(ImageID imageId); bool adjustBundle(); bool applyFilters(); void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile); void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes); void report(const std::string& report); }; #endif //SFM_SCENE_RECONSTRUCTION_H
39.53
58
(translation_unit) "//\n// Created by <NAME> on 28/12/2021.\n//\n\n#ifndef SFM_SCENE_RECONSTRUCTION_H\n#define SFM_SCENE_RECONSTRUCTION_H\n\n#include <set>\n#include "filters/filter.h"\n#include "triangulation/triangulator.h"\n#include "bundle-adjustment/bundle_adjuster.h"\n\n#include "image.h"\n#include "features.h"\n#include "camera.h"\n#include "matches.h"\n#include "point_cloud.h"\n#include "pose.h"\n#include "image_pair.h"\n\nclass SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n};\n#endif //SFM_SCENE_RECONSTRUCTION_H\n" (comment) "//" (comment) "// Created by <NAME> on 28/12/2021." (comment) "//" (preproc_ifdef) "#ifndef SFM_SCENE_RECONSTRUCTION_H\n#define SFM_SCENE_RECONSTRUCTION_H\n\n#include <set>\n#include "filters/filter.h"\n#include "triangulation/triangulator.h"\n#include "bundle-adjustment/bundle_adjuster.h"\n\n#include "image.h"\n#include "features.h"\n#include "camera.h"\n#include "matches.h"\n#include "point_cloud.h"\n#include "pose.h"\n#include "image_pair.h"\n\nclass SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n};\n#endif" (#ifndef) "#ifndef" (identifier) "SFM_SCENE_RECONSTRUCTION_H" (preproc_def) "#define SFM_SCENE_RECONSTRUCTION_H\n" (#define) "#define" (identifier) "SFM_SCENE_RECONSTRUCTION_H" (preproc_include) "#include <set>\n" (#include) "#include" (system_lib_string) "<set>" (preproc_include) "#include "filters/filter.h"\n" (#include) "#include" (string_literal) ""filters/filter.h"" (") """ (string_content) "filters/filter.h" (") """ (preproc_include) "#include "triangulation/triangulator.h"\n" (#include) "#include" (string_literal) ""triangulation/triangulator.h"" (") """ (string_content) "triangulation/triangulator.h" (") """ (preproc_include) "#include "bundle-adjustment/bundle_adjuster.h"\n" (#include) "#include" (string_literal) ""bundle-adjustment/bundle_adjuster.h"" (") """ (string_content) "bundle-adjustment/bundle_adjuster.h" (") """ (preproc_include) "#include "image.h"\n" (#include) "#include" (string_literal) ""image.h"" (") """ (string_content) "image.h" (") """ (preproc_include) "#include "features.h"\n" (#include) "#include" (string_literal) ""features.h"" (") """ (string_content) "features.h" (") """ (preproc_include) "#include "camera.h"\n" (#include) "#include" (string_literal) ""camera.h"" (") """ (string_content) "camera.h" (") """ (preproc_include) "#include "matches.h"\n" (#include) "#include" (string_literal) ""matches.h"" (") """ (string_content) "matches.h" (") """ (preproc_include) "#include "point_cloud.h"\n" (#include) "#include" (string_literal) ""point_cloud.h"" (") """ (string_content) "point_cloud.h" (") """ (preproc_include) "#include "pose.h"\n" (#include) "#include" (string_literal) ""pose.h"" (") """ (string_content) "pose.h" (") """ (preproc_include) "#include "image_pair.h"\n" (#include) "#include" (string_literal) ""image_pair.h"" (") """ (string_content) "image_pair.h" (") """ (function_definition) "class SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n}" (type_identifier) "class" (identifier) "SceneReconstruction" (compound_statement) "{\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n}" ({) "{" (labeled_statement) "private:\n std::vector<Image>& _mImages;" (statement_identifier) "private" (:) ":" (labeled_statement) "std::vector<Image>& _mImages;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<Image>& _mImages;" (binary_expression) "vector<Image>& _mImages" (binary_expression) "vector<Image" (identifier) "vector" (<) "<" (identifier) "Image" (>) ">" (pointer_expression) "& _mImages" (&) "&" (identifier) "_mImages" (;) ";" (labeled_statement) "std::map<ImageID, Pose> _mCameraPoses;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "map<ImageID, Pose> _mCameraPoses;" (comma_expression) "map<ImageID, Pose> _mCameraPoses" (binary_expression) "map<ImageID" (identifier) "map" (<) "<" (identifier) "ImageID" (,) "," (binary_expression) "Pose> _mCameraPoses" (identifier) "Pose" (>) ">" (identifier) "_mCameraPoses" (;) ";" (labeled_statement) "std::set<ImageID> _mDoneViews;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "set<ImageID> _mDoneViews;" (binary_expression) "set<ImageID> _mDoneViews" (binary_expression) "set<ImageID" (identifier) "set" (<) "<" (identifier) "ImageID" (>) ">" (identifier) "_mDoneViews" (;) ";" (labeled_statement) "std::set<ImageID> _mGoodViews;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "set<ImageID> _mGoodViews;" (binary_expression) "set<ImageID> _mGoodViews" (binary_expression) "set<ImageID" (identifier) "set" (<) "<" (identifier) "ImageID" (>) ">" (identifier) "_mGoodViews" (;) ";" (declaration) "PointCloud _pointCloud;" (type_identifier) "PointCloud" (identifier) "_pointCloud" (;) ";" (labeled_statement) "std::vector<Camera>& _mCameras;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<Camera>& _mCameras;" (binary_expression) "vector<Camera>& _mCameras" (binary_expression) "vector<Camera" (identifier) "vector" (<) "<" (identifier) "Camera" (>) ">" (pointer_expression) "& _mCameras" (&) "&" (identifier) "_mCameras" (;) ";" (labeled_statement) "std::vector<Features>& _mImageFeatures;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<Features>& _mImageFeatures;" (binary_expression) "vector<Features>& _mImageFeatures" (binary_expression) "vector<Features" (identifier) "vector" (<) "<" (identifier) "Features" (>) ">" (pointer_expression) "& _mImageFeatures" (&) "&" (identifier) "_mImageFeatures" (;) ";" (expression_statement) "Matches& _mFeatureMatchMatrix;" (binary_expression) "Matches& _mFeatureMatchMatrix" (identifier) "Matches" (&) "&" (identifier) "_mFeatureMatchMatrix" (;) ";" (labeled_statement) "cv::Ptr<Triangulator> _triangulator;" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Ptr<Triangulator> _triangulator;" (binary_expression) "Ptr<Triangulator> _triangulator" (binary_expression) "Ptr<Triangulator" (identifier) "Ptr" (<) "<" (identifier) "Triangulator" (>) ">" (identifier) "_triangulator" (;) ";" (labeled_statement) "cv::Ptr<BundleAdjuster> _bundleAdjuster;" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Ptr<BundleAdjuster> _bundleAdjuster;" (binary_expression) "Ptr<BundleAdjuster> _bundleAdjuster" (binary_expression) "Ptr<BundleAdjuster" (identifier) "Ptr" (<) "<" (identifier) "BundleAdjuster" (>) ">" (identifier) "_bundleAdjuster" (;) ";" (labeled_statement) "std::vector<cv::Ptr<Filter>> _filters;" (statement_identifier) "std" (ERROR) "::vector<cv:" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Ptr<Filter>> _filters;" (binary_expression) "Ptr<Filter>> _filters" (identifier) "Ptr" (<) "<" (binary_expression) "Filter>> _filters" (identifier) "Filter" (>>) ">>" (identifier) "_filters" (;) ";" (declaration) "void initialise(std::vector<ImagePair> baselines);" (primitive_type) "void" (function_declarator) "initialise(std::vector<ImagePair> baselines)" (identifier) "initialise" (parameter_list) "(std::vector<ImagePair> baselines)" (() "(" (parameter_declaration) "std::vector<ImagePair> baselines" (type_identifier) "std" (ERROR) "::vector<ImagePair>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "ImagePair" (>) ">" (identifier) "baselines" ()) ")" (;) ";" (declaration) "bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);" (primitive_type) "bool" (function_declarator) "registerImage(ImageID imageId, Image2D3DMatch& match2D3D)" (identifier) "registerImage" (parameter_list) "(ImageID imageId, Image2D3DMatch& match2D3D)" (() "(" (parameter_declaration) "ImageID imageId" (type_identifier) "ImageID" (identifier) "imageId" (,) "," (parameter_declaration) "Image2D3DMatch& match2D3D" (type_identifier) "Image2D3DMatch" (ERROR) "&" (&) "&" (identifier) "match2D3D" ()) ")" (;) ";" (declaration) "void camerasToPlyFile(const std::string& cameraFile, bool showRotation);" (primitive_type) "void" (function_declarator) "camerasToPlyFile(const std::string& cameraFile, bool showRotation)" (identifier) "camerasToPlyFile" (parameter_list) "(const std::string& cameraFile, bool showRotation)" (() "(" (parameter_declaration) "const std::string& cameraFile" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "cameraFile" (,) "," (parameter_declaration) "bool showRotation" (primitive_type) "bool" (identifier) "showRotation" ()) ")" (;) ";" (labeled_statement) "public:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const" (statement_identifier) "public" (:) ":" (labeled_statement) "SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const" (statement_identifier) "SceneReconstruction" (ERROR) "(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std:" (() "(" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (comma_expression) "vector<Image>& mImages,\n std" (binary_expression) "vector<Image>& mImages" (binary_expression) "vector<Image" (identifier) "vector" (<) "<" (identifier) "Image" (>) ">" (pointer_expression) "& mImages" (&) "&" (identifier) "mImages" (,) "," (identifier) "std" (:) ":" (:) ":" (comma_expression) "vector<Camera>& mCameras,\n std" (binary_expression) "vector<Camera>& mCameras" (binary_expression) "vector<Camera" (identifier) "vector" (<) "<" (identifier) "Camera" (>) ">" (pointer_expression) "& mCameras" (&) "&" (identifier) "mCameras" (,) "," (identifier) "std" (:) ":" (:) ":" (expression_statement) "vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const" (comma_expression) "vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const" (binary_expression) "vector<Features>& mImageFeatures" (binary_expression) "vector<Features" (identifier) "vector" (<) "<" (identifier) "Features" (>) ">" (pointer_expression) "& mImageFeatures" (&) "&" (identifier) "mImageFeatures" (,) "," (comma_expression) "Matches& mFeatureMatchMatrix,\n const" (binary_expression) "Matches& mFeatureMatchMatrix" (identifier) "Matches" (&) "&" (identifier) "mFeatureMatchMatrix" (,) "," (identifier) "const" (;) "" (labeled_statement) "cv::Ptr<Triangulator>& triangulator,\n const" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Ptr<Triangulator>& triangulator,\n const" (comma_expression) "Ptr<Triangulator>& triangulator,\n const" (binary_expression) "Ptr<Triangulator>& triangulator" (binary_expression) "Ptr<Triangulator" (identifier) "Ptr" (<) "<" (identifier) "Triangulator" (>) ">" (pointer_expression) "& triangulator" (&) "&" (identifier) "triangulator" (,) "," (identifier) "const" (;) "" (labeled_statement) "cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);" (statement_identifier) "cv" (ERROR) "::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv:" (:) ":" (:) ":" (comma_expression) "Ptr<BundleAdjuster>& bundleAdjuster,\n std" (binary_expression) "Ptr<BundleAdjuster>& bundleAdjuster" (binary_expression) "Ptr<BundleAdjuster" (identifier) "Ptr" (<) "<" (identifier) "BundleAdjuster" (>) ">" (pointer_expression) "& bundleAdjuster" (&) "&" (identifier) "bundleAdjuster" (,) "," (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Ptr<Filter>>& filters);" (binary_expression) "Ptr<Filter>>& filters" (identifier) "Ptr" (<) "<" (binary_expression) "Filter>>& filters" (identifier) "Filter" (>>) ">>" (pointer_expression) "& filters" (&) "&" (identifier) "filters" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const" (statement_identifier) "SceneReconstruction" (ERROR) "(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std:" (() "(" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (comma_expression) "vector<Image> &mImages,\n std" (binary_expression) "vector<Image> &mImages" (binary_expression) "vector<Image" (identifier) "vector" (<) "<" (identifier) "Image" (>) ">" (pointer_expression) "&mImages" (&) "&" (identifier) "mImages" (,) "," (identifier) "std" (:) ":" (:) ":" (comma_expression) "vector<Camera> &mCameras,\n std" (binary_expression) "vector<Camera> &mCameras" (binary_expression) "vector<Camera" (identifier) "vector" (<) "<" (identifier) "Camera" (>) ">" (pointer_expression) "&mCameras" (&) "&" (identifier) "mCameras" (,) "," (identifier) "std" (:) ":" (:) ":" (expression_statement) "vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const" (comma_expression) "vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const" (binary_expression) "vector<Features> &mImageFeatures" (binary_expression) "vector<Features" (identifier) "vector" (<) "<" (identifier) "Features" (>) ">" (pointer_expression) "&mImageFeatures" (&) "&" (identifier) "mImageFeatures" (,) "," (comma_expression) "Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const" (binary_expression) "Matches &mFeatureMatchMatrix" (identifier) "Matches" (&) "&" (identifier) "mFeatureMatchMatrix" (,) "," (comma_expression) "ImagePair& baselinePair,\n const" (binary_expression) "ImagePair& baselinePair" (identifier) "ImagePair" (&) "&" (identifier) "baselinePair" (,) "," (identifier) "const" (;) "" (labeled_statement) "cv::Ptr<Triangulator>& triangulator,\n const" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Ptr<Triangulator>& triangulator,\n const" (comma_expression) "Ptr<Triangulator>& triangulator,\n const" (binary_expression) "Ptr<Triangulator>& triangulator" (binary_expression) "Ptr<Triangulator" (identifier) "Ptr" (<) "<" (identifier) "Triangulator" (>) ">" (pointer_expression) "& triangulator" (&) "&" (identifier) "triangulator" (,) "," (identifier) "const" (;) "" (labeled_statement) "cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);" (statement_identifier) "cv" (ERROR) "::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv:" (:) ":" (:) ":" (comma_expression) "Ptr<BundleAdjuster>& bundleAdjuster,\n std" (binary_expression) "Ptr<BundleAdjuster>& bundleAdjuster" (binary_expression) "Ptr<BundleAdjuster" (identifier) "Ptr" (<) "<" (identifier) "BundleAdjuster" (>) ">" (pointer_expression) "& bundleAdjuster" (&) "&" (identifier) "bundleAdjuster" (,) "," (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Ptr<Filter>>& filters);" (binary_expression) "Ptr<Filter>>& filters" (identifier) "Ptr" (<) "<" (binary_expression) "Filter>>& filters" (identifier) "Filter" (>>) ">>" (pointer_expression) "& filters" (&) "&" (identifier) "filters" (ERROR) ")" ()) ")" (;) ";" (declaration) "void registerMoreImages();" (primitive_type) "void" (function_declarator) "registerMoreImages()" (identifier) "registerMoreImages" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool registerImage(ImageID imageId);" (primitive_type) "bool" (function_declarator) "registerImage(ImageID imageId)" (identifier) "registerImage" (parameter_list) "(ImageID imageId)" (() "(" (parameter_declaration) "ImageID imageId" (type_identifier) "ImageID" (identifier) "imageId" ()) ")" (;) ";" (declaration) "bool adjustBundle();" (primitive_type) "bool" (function_declarator) "adjustBundle()" (identifier) "adjustBundle" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool applyFilters();" (primitive_type) "bool" (function_declarator) "applyFilters()" (identifier) "applyFilters" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);" (primitive_type) "void" (function_declarator) "toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile)" (identifier) "toPlyFile" (parameter_list) "(const std::string& pointCloudFile, const std::string& cameraFile)" (() "(" (parameter_declaration) "const std::string& pointCloudFile" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "pointCloudFile" (,) "," (parameter_declaration) "const std::string& cameraFile" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "cameraFile" ()) ")" (;) ";" (declaration) "void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);" (primitive_type) "void" (function_declarator) "outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes)" (identifier) "outputToFiles" (parameter_list) "(const std::string& outputDirectory, const std::set<OutputType>& outputTypes)" (() "(" (parameter_declaration) "const std::string& outputDirectory" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "outputDirectory" (,) "," (parameter_declaration) "const std::set<OutputType>& outputTypes" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::set<OutputType>&" (:) ":" (:) ":" (identifier) "set" (<) "<" (identifier) "OutputType" (>) ">" (&) "&" (identifier) "outputTypes" ()) ")" (;) ";" (declaration) "void report(const std::string& report);" (primitive_type) "void" (function_declarator) "report(const std::string& report)" (identifier) "report" (parameter_list) "(const std::string& report)" (() "(" (parameter_declaration) "const std::string& report" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "report" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//SFM_SCENE_RECONSTRUCTION_H"
643
25
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 39.53, "nodes": 396, "errors": 0, "source_hash": "bb84924e9045419f9674e613716c267cae1c803c76bf3de6e2e836b3571e9886", "categorized_nodes": 293}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SFM_SCENE_RECONSTRUCTION_H\n#define SFM_SCENE_RECONSTRUCTION_H\n\n#include <set>\n#include \"filters/filter.h\"\n#include \"triangulation/triangulator.h\"\n#include \"bundle-adjustment/bundle_adjuster.h\"\n\n#include \"image.h\"\n#include \"features.h\"\n#include \"camera.h\"\n#include \"matches.h\"\n#include \"point_cloud.h\"\n#include \"pose.h\"\n#include \"image_pair.h\"\n\nclass SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n};\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 395], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "SFM_SCENE_RECONSTRUCTION_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 34}}, {"id": 3, "type": "preproc_def", "text": "#define SFM_SCENE_RECONSTRUCTION_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 5, "type": "identifier", "text": "SFM_SCENE_RECONSTRUCTION_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 34}}, {"id": 6, "type": "preproc_include", "text": "#include <set>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<set>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 14}}, {"id": 9, "type": "preproc_include", "text": "#include \"filters/filter.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"filters/filter.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 27}}, {"id": 12, "type": "preproc_include", "text": "#include \"triangulation/triangulator.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"triangulation/triangulator.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 39}}, {"id": 15, "type": "preproc_include", "text": "#include \"bundle-adjustment/bundle_adjuster.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"bundle-adjustment/bundle_adjuster.h\"", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 46}}, {"id": 18, "type": "preproc_include", "text": "#include \"image.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"image.h\"", "parent": 18, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 18}}, {"id": 21, "type": "preproc_include", "text": "#include \"features.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"features.h\"", "parent": 21, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 21}}, {"id": 24, "type": "preproc_include", "text": "#include \"camera.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"camera.h\"", "parent": 24, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 27, "type": "preproc_include", "text": "#include \"matches.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"matches.h\"", "parent": 27, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 20}}, {"id": 30, "type": "preproc_include", "text": "#include \"point_cloud.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"point_cloud.h\"", "parent": 30, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 24}}, {"id": 33, "type": "preproc_include", "text": "#include \"pose.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"pose.h\"", "parent": 33, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 17}}, {"id": 36, "type": "preproc_include", "text": "#include \"image_pair.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"image_pair.h\"", "parent": 36, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 23}}, {"id": 39, "type": "function_definition", "text": "class SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n}", "parent": 0, "children": [40], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 40, "type": "identifier", "text": "SceneReconstruction", "parent": 39, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 25}}, {"id": 41, "type": "labeled_statement", "text": "private:\n std::vector<Image>& _mImages;", "parent": 39, "children": [42], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 33}}, {"id": 42, "type": "labeled_statement", "text": "std::vector<Image>& _mImages;", "parent": 41, "children": [43], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 33}}, {"id": 43, "type": "statement_identifier", "text": "std", "parent": 42, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 7}}, {"id": 44, "type": "binary_expression", "text": "vector<Image>& _mImages", "parent": 42, "children": [45, 49, 50], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 32}}, {"id": 45, "type": "binary_expression", "text": "vector<Image", "parent": 44, "children": [46, 47, 48], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 21}}, {"id": 46, "type": "identifier", "text": "vector", "parent": 45, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 15}}, {"id": 47, "type": "<", "text": "<", "parent": 45, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 16}}, {"id": 48, "type": "identifier", "text": "Image", "parent": 45, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 21}}, {"id": 49, "type": ">", "text": ">", "parent": 44, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 22}}, {"id": 50, "type": "pointer_expression", "text": "& _mImages", "parent": 44, "children": [51], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 32}}, {"id": 51, "type": "identifier", "text": "_mImages", "parent": 50, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 32}}, {"id": 52, "type": "labeled_statement", "text": "std::map<ImageID, Pose> _mCameraPoses;", "parent": 39, "children": [53], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 42}}, {"id": 53, "type": "statement_identifier", "text": "std", "parent": 52, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 7}}, {"id": 54, "type": "comma_expression", "text": "map<ImageID, Pose> _mCameraPoses", "parent": 52, "children": [55, 59], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 41}}, {"id": 55, "type": "binary_expression", "text": "map<ImageID", "parent": 54, "children": [56, 57, 58], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 20}}, {"id": 56, "type": "identifier", "text": "map", "parent": 55, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 12}}, {"id": 57, "type": "<", "text": "<", "parent": 55, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 58, "type": "identifier", "text": "ImageID", "parent": 55, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 20}}, {"id": 59, "type": "binary_expression", "text": "Pose> _mCameraPoses", "parent": 54, "children": [60, 61, 62], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 41}}, {"id": 60, "type": "identifier", "text": "Pose", "parent": 59, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 26}}, {"id": 61, "type": ">", "text": ">", "parent": 59, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 27}}, {"id": 62, "type": "identifier", "text": "_mCameraPoses", "parent": 59, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 41}}, {"id": 63, "type": "labeled_statement", "text": "std::set<ImageID> _mDoneViews;", "parent": 39, "children": [64], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 34}}, {"id": 64, "type": "statement_identifier", "text": "std", "parent": 63, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 7}}, {"id": 65, "type": "binary_expression", "text": "set<ImageID> _mDoneViews", "parent": 63, "children": [66, 70, 71], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 33}}, {"id": 66, "type": "binary_expression", "text": "set<ImageID", "parent": 65, "children": [67, 68, 69], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 20}}, {"id": 67, "type": "identifier", "text": "set", "parent": 66, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 12}}, {"id": 68, "type": "<", "text": "<", "parent": 66, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 13}}, {"id": 69, "type": "identifier", "text": "ImageID", "parent": 66, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 20}}, {"id": 70, "type": ">", "text": ">", "parent": 65, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 21}}, {"id": 71, "type": "identifier", "text": "_mDoneViews", "parent": 65, "children": [], "start_point": {"row": 24, "column": 22}, "end_point": {"row": 24, "column": 33}}, {"id": 72, "type": "labeled_statement", "text": "std::set<ImageID> _mGoodViews;", "parent": 39, "children": [73], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 34}}, {"id": 73, "type": "statement_identifier", "text": "std", "parent": 72, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 7}}, {"id": 74, "type": "binary_expression", "text": "set<ImageID> _mGoodViews", "parent": 72, "children": [75, 79, 80], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 33}}, {"id": 75, "type": "binary_expression", "text": "set<ImageID", "parent": 74, "children": [76, 77, 78], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 20}}, {"id": 76, "type": "identifier", "text": "set", "parent": 75, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 12}}, {"id": 77, "type": "<", "text": "<", "parent": 75, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 78, "type": "identifier", "text": "ImageID", "parent": 75, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 20}}, {"id": 79, "type": ">", "text": ">", "parent": 74, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 21}}, {"id": 80, "type": "identifier", "text": "_mGoodViews", "parent": 74, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 33}}, {"id": 81, "type": "declaration", "text": "PointCloud _pointCloud;", "parent": 39, "children": [82, 83], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 27}}, {"id": 82, "type": "type_identifier", "text": "PointCloud", "parent": 81, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 14}}, {"id": 83, "type": "identifier", "text": "_pointCloud", "parent": 81, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 26}}, {"id": 84, "type": "labeled_statement", "text": "std::vector<Camera>& _mCameras;", "parent": 39, "children": [85], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 35}}, {"id": 85, "type": "statement_identifier", "text": "std", "parent": 84, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 7}}, {"id": 86, "type": "binary_expression", "text": "vector<Camera>& _mCameras", "parent": 84, "children": [87, 91, 92], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 34}}, {"id": 87, "type": "binary_expression", "text": "vector<Camera", "parent": 86, "children": [88, 89, 90], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 22}}, {"id": 88, "type": "identifier", "text": "vector", "parent": 87, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 15}}, {"id": 89, "type": "<", "text": "<", "parent": 87, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 90, "type": "identifier", "text": "Camera", "parent": 87, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 22}}, {"id": 91, "type": ">", "text": ">", "parent": 86, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 23}}, {"id": 92, "type": "pointer_expression", "text": "& _mCameras", "parent": 86, "children": [93], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 34}}, {"id": 93, "type": "identifier", "text": "_mCameras", "parent": 92, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 34}}, {"id": 94, "type": "labeled_statement", "text": "std::vector<Features>& _mImageFeatures;", "parent": 39, "children": [95], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 43}}, {"id": 95, "type": "statement_identifier", "text": "std", "parent": 94, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 7}}, {"id": 96, "type": "binary_expression", "text": "vector<Features>& _mImageFeatures", "parent": 94, "children": [97, 101, 102], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 42}}, {"id": 97, "type": "binary_expression", "text": "vector<Features", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 24}}, {"id": 98, "type": "identifier", "text": "vector", "parent": 97, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 15}}, {"id": 99, "type": "<", "text": "<", "parent": 97, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 16}}, {"id": 100, "type": "identifier", "text": "Features", "parent": 97, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 24}}, {"id": 101, "type": ">", "text": ">", "parent": 96, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 25}}, {"id": 102, "type": "pointer_expression", "text": "& _mImageFeatures", "parent": 96, "children": [103], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 42}}, {"id": 103, "type": "identifier", "text": "_mImageFeatures", "parent": 102, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 42}}, {"id": 104, "type": "binary_expression", "text": "Matches& _mFeatureMatchMatrix", "parent": 39, "children": [105, 106], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 33}}, {"id": 105, "type": "identifier", "text": "Matches", "parent": 104, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 11}}, {"id": 106, "type": "identifier", "text": "_mFeatureMatchMatrix", "parent": 104, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 33}}, {"id": 107, "type": "labeled_statement", "text": "cv::Ptr<Triangulator> _triangulator;", "parent": 39, "children": [108], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 40}}, {"id": 108, "type": "statement_identifier", "text": "cv", "parent": 107, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 6}}, {"id": 109, "type": "binary_expression", "text": "Ptr<Triangulator> _triangulator", "parent": 107, "children": [110, 114, 115], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 39}}, {"id": 110, "type": "binary_expression", "text": "Ptr<Triangulator", "parent": 109, "children": [111, 112, 113], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 24}}, {"id": 111, "type": "identifier", "text": "Ptr", "parent": 110, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 11}}, {"id": 112, "type": "<", "text": "<", "parent": 110, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 12}}, {"id": 113, "type": "identifier", "text": "Triangulator", "parent": 110, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 24}}, {"id": 114, "type": ">", "text": ">", "parent": 109, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 25}}, {"id": 115, "type": "identifier", "text": "_triangulator", "parent": 109, "children": [], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 39}}, {"id": 116, "type": "labeled_statement", "text": "cv::Ptr<BundleAdjuster> _bundleAdjuster;", "parent": 39, "children": [117], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 44}}, {"id": 117, "type": "statement_identifier", "text": "cv", "parent": 116, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 6}}, {"id": 118, "type": "binary_expression", "text": "Ptr<BundleAdjuster> _bundleAdjuster", "parent": 116, "children": [119, 123, 124], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 43}}, {"id": 119, "type": "binary_expression", "text": "Ptr<BundleAdjuster", "parent": 118, "children": [120, 121, 122], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 26}}, {"id": 120, "type": "identifier", "text": "Ptr", "parent": 119, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 121, "type": "<", "text": "<", "parent": 119, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}, {"id": 122, "type": "identifier", "text": "BundleAdjuster", "parent": 119, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 26}}, {"id": 123, "type": ">", "text": ">", "parent": 118, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 27}}, {"id": 124, "type": "identifier", "text": "_bundleAdjuster", "parent": 118, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 43}}, {"id": 125, "type": "labeled_statement", "text": "std::vector<cv::Ptr<Filter>> _filters;", "parent": 39, "children": [126, 127], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 42}}, {"id": 126, "type": "statement_identifier", "text": "std", "parent": 125, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 7}}, {"id": 127, "type": "ERROR", "text": "::vector<cv:", "parent": 125, "children": [128], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 19}}, {"id": 128, "type": "binary_expression", "text": "vector<cv", "parent": 127, "children": [129, 130, 131], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 18}}, {"id": 129, "type": "identifier", "text": "vector", "parent": 128, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 15}}, {"id": 130, "type": "<", "text": "<", "parent": 128, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 16}}, {"id": 131, "type": "identifier", "text": "cv", "parent": 128, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 18}}, {"id": 132, "type": "binary_expression", "text": "Ptr<Filter>> _filters", "parent": 125, "children": [133, 134, 135], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 41}}, {"id": 133, "type": "identifier", "text": "Ptr", "parent": 132, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 23}}, {"id": 134, "type": "<", "text": "<", "parent": 132, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 24}}, {"id": 135, "type": "binary_expression", "text": "Filter>> _filters", "parent": 132, "children": [136, 137, 138], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 41}}, {"id": 136, "type": "identifier", "text": "Filter", "parent": 135, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 30}}, {"id": 137, "type": ">>", "text": ">>", "parent": 135, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 32}}, {"id": 138, "type": "identifier", "text": "_filters", "parent": 135, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 41}}, {"id": 139, "type": "declaration", "text": "void initialise(std::vector<ImagePair> baselines);", "parent": 39, "children": [140, 141], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 54}}, {"id": 140, "type": "primitive_type", "text": "void", "parent": 139, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 141, "type": "function_declarator", "text": "initialise(std::vector<ImagePair> baselines)", "parent": 139, "children": [142, 143], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 53}}, {"id": 142, "type": "identifier", "text": "initialise", "parent": 141, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 19}}, {"id": 143, "type": "parameter_list", "text": "(std::vector<ImagePair> baselines)", "parent": 141, "children": [144], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 53}}, {"id": 144, "type": "parameter_declaration", "text": "std::vector<ImagePair> baselines", "parent": 143, "children": [145, 146, 151], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 52}}, {"id": 145, "type": "type_identifier", "text": "std", "parent": 144, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 23}}, {"id": 146, "type": "ERROR", "text": "::vector<ImagePair>", "parent": 144, "children": [147, 148, 149, 150], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 42}}, {"id": 147, "type": "identifier", "text": "vector", "parent": 146, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 31}}, {"id": 148, "type": "<", "text": "<", "parent": 146, "children": [], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 32}}, {"id": 149, "type": "identifier", "text": "ImagePair", "parent": 146, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 41}}, {"id": 150, "type": ">", "text": ">", "parent": 146, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 36, "column": 42}}, {"id": 151, "type": "identifier", "text": "baselines", "parent": 144, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 52}}, {"id": 152, "type": "declaration", "text": "bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);", "parent": 39, "children": [153, 154], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 67}}, {"id": 153, "type": "primitive_type", "text": "bool", "parent": 152, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 154, "type": "function_declarator", "text": "registerImage(ImageID imageId, Image2D3DMatch& match2D3D)", "parent": 152, "children": [155, 156], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 66}}, {"id": 155, "type": "identifier", "text": "registerImage", "parent": 154, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 22}}, {"id": 156, "type": "parameter_list", "text": "(ImageID imageId, Image2D3DMatch& match2D3D)", "parent": 154, "children": [157, 160], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 66}}, {"id": 157, "type": "parameter_declaration", "text": "ImageID imageId", "parent": 156, "children": [158, 159], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 38}}, {"id": 158, "type": "type_identifier", "text": "ImageID", "parent": 157, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 30}}, {"id": 159, "type": "identifier", "text": "imageId", "parent": 157, "children": [], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 38, "column": 38}}, {"id": 160, "type": "parameter_declaration", "text": "Image2D3DMatch& match2D3D", "parent": 156, "children": [161, 162], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 65}}, {"id": 161, "type": "type_identifier", "text": "Image2D3DMatch", "parent": 160, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 54}}, {"id": 162, "type": "identifier", "text": "match2D3D", "parent": 160, "children": [], "start_point": {"row": 38, "column": 56}, "end_point": {"row": 38, "column": 65}}, {"id": 163, "type": "declaration", "text": "void camerasToPlyFile(const std::string& cameraFile, bool showRotation);", "parent": 39, "children": [164, 165], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 76}}, {"id": 164, "type": "primitive_type", "text": "void", "parent": 163, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 165, "type": "function_declarator", "text": "camerasToPlyFile(const std::string& cameraFile, bool showRotation)", "parent": 163, "children": [166, 167], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 75}}, {"id": 166, "type": "identifier", "text": "camerasToPlyFile", "parent": 165, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 25}}, {"id": 167, "type": "parameter_list", "text": "(const std::string& cameraFile, bool showRotation)", "parent": 165, "children": [168, 173], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 75}}, {"id": 168, "type": "parameter_declaration", "text": "const std::string& cameraFile", "parent": 167, "children": [169, 170, 172], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 55}}, {"id": 169, "type": "type_identifier", "text": "std", "parent": 168, "children": [], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 35}}, {"id": 170, "type": "ERROR", "text": "::string&", "parent": 168, "children": [171], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 44}}, {"id": 171, "type": "identifier", "text": "string", "parent": 170, "children": [], "start_point": {"row": 40, "column": 37}, "end_point": {"row": 40, "column": 43}}, {"id": 172, "type": "identifier", "text": "cameraFile", "parent": 168, "children": [], "start_point": {"row": 40, "column": 45}, "end_point": {"row": 40, "column": 55}}, {"id": 173, "type": "parameter_declaration", "text": "bool showRotation", "parent": 167, "children": [174, 175], "start_point": {"row": 40, "column": 57}, "end_point": {"row": 40, "column": 74}}, {"id": 174, "type": "primitive_type", "text": "bool", "parent": 173, "children": [], "start_point": {"row": 40, "column": 57}, "end_point": {"row": 40, "column": 61}}, {"id": 175, "type": "identifier", "text": "showRotation", "parent": 173, "children": [], "start_point": {"row": 40, "column": 62}, "end_point": {"row": 40, "column": 74}}, {"id": 176, "type": "labeled_statement", "text": "public:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const", "parent": 39, "children": [177], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 48, "column": 29}}, {"id": 177, "type": "labeled_statement", "text": "SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const", "parent": 176, "children": [178, 179], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 48, "column": 29}}, {"id": 178, "type": "statement_identifier", "text": "SceneReconstruction", "parent": 177, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 23}}, {"id": 179, "type": "ERROR", "text": "(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std:", "parent": 177, "children": [180, 182, 192], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 46, "column": 28}}, {"id": 180, "type": "type_descriptor", "text": "std", "parent": 179, "children": [181], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 27}}, {"id": 181, "type": "type_identifier", "text": "std", "parent": 180, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 27}}, {"id": 182, "type": "comma_expression", "text": "vector<Image>& mImages,\n std", "parent": 179, "children": [183, 191], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 45, "column": 27}}, {"id": 183, "type": "binary_expression", "text": "vector<Image>& mImages", "parent": 182, "children": [184, 188, 189], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 51}}, {"id": 184, "type": "binary_expression", "text": "vector<Image", "parent": 183, "children": [185, 186, 187], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 41}}, {"id": 185, "type": "identifier", "text": "vector", "parent": 184, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 35}}, {"id": 186, "type": "<", "text": "<", "parent": 184, "children": [], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 36}}, {"id": 187, "type": "identifier", "text": "Image", "parent": 184, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 41}}, {"id": 188, "type": ">", "text": ">", "parent": 183, "children": [], "start_point": {"row": 44, "column": 41}, "end_point": {"row": 44, "column": 42}}, {"id": 189, "type": "pointer_expression", "text": "& mImages", "parent": 183, "children": [190], "start_point": {"row": 44, "column": 42}, "end_point": {"row": 44, "column": 51}}, {"id": 190, "type": "identifier", "text": "mImages", "parent": 189, "children": [], "start_point": {"row": 44, "column": 44}, "end_point": {"row": 44, "column": 51}}, {"id": 191, "type": "identifier", "text": "std", "parent": 182, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 27}}, {"id": 192, "type": "comma_expression", "text": "vector<Camera>& mCameras,\n std", "parent": 179, "children": [193, 201], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 46, "column": 27}}, {"id": 193, "type": "binary_expression", "text": "vector<Camera>& mCameras", "parent": 192, "children": [194, 198, 199], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 53}}, {"id": 194, "type": "binary_expression", "text": "vector<Camera", "parent": 193, "children": [195, 196, 197], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 42}}, {"id": 195, "type": "identifier", "text": "vector", "parent": 194, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 35}}, {"id": 196, "type": "<", "text": "<", "parent": 194, "children": [], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 36}}, {"id": 197, "type": "identifier", "text": "Camera", "parent": 194, "children": [], "start_point": {"row": 45, "column": 36}, "end_point": {"row": 45, "column": 42}}, {"id": 198, "type": ">", "text": ">", "parent": 193, "children": [], "start_point": {"row": 45, "column": 42}, "end_point": {"row": 45, "column": 43}}, {"id": 199, "type": "pointer_expression", "text": "& mCameras", "parent": 193, "children": [200], "start_point": {"row": 45, "column": 43}, "end_point": {"row": 45, "column": 53}}, {"id": 200, "type": "identifier", "text": "mCameras", "parent": 199, "children": [], "start_point": {"row": 45, "column": 45}, "end_point": {"row": 45, "column": 53}}, {"id": 201, "type": "identifier", "text": "std", "parent": 192, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 27}}, {"id": 202, "type": "comma_expression", "text": "vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const", "parent": 177, "children": [203, 211], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 48, "column": 29}}, {"id": 203, "type": "binary_expression", "text": "vector<Features>& mImageFeatures", "parent": 202, "children": [204, 208, 209], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 61}}, {"id": 204, "type": "binary_expression", "text": "vector<Features", "parent": 203, "children": [205, 206, 207], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 44}}, {"id": 205, "type": "identifier", "text": "vector", "parent": 204, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 35}}, {"id": 206, "type": "<", "text": "<", "parent": 204, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 36}}, {"id": 207, "type": "identifier", "text": "Features", "parent": 204, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 44}}, {"id": 208, "type": ">", "text": ">", "parent": 203, "children": [], "start_point": {"row": 46, "column": 44}, "end_point": {"row": 46, "column": 45}}, {"id": 209, "type": "pointer_expression", "text": "& mImageFeatures", "parent": 203, "children": [210], "start_point": {"row": 46, "column": 45}, "end_point": {"row": 46, "column": 61}}, {"id": 210, "type": "identifier", "text": "mImageFeatures", "parent": 209, "children": [], "start_point": {"row": 46, "column": 47}, "end_point": {"row": 46, "column": 61}}, {"id": 211, "type": "comma_expression", "text": "Matches& mFeatureMatchMatrix,\n const", "parent": 202, "children": [212], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 48, "column": 29}}, {"id": 212, "type": "binary_expression", "text": "Matches& mFeatureMatchMatrix", "parent": 211, "children": [213, 214], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 52}}, {"id": 213, "type": "identifier", "text": "Matches", "parent": 212, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 31}}, {"id": 214, "type": "identifier", "text": "mFeatureMatchMatrix", "parent": 212, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 52}}, {"id": 215, "type": "labeled_statement", "text": "cv::Ptr<Triangulator>& triangulator,\n const", "parent": 39, "children": [216], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 49, "column": 29}}, {"id": 216, "type": "statement_identifier", "text": "cv", "parent": 215, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 32}}, {"id": 217, "type": "comma_expression", "text": "Ptr<Triangulator>& triangulator,\n const", "parent": 215, "children": [218], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 49, "column": 29}}, {"id": 218, "type": "binary_expression", "text": "Ptr<Triangulator>& triangulator", "parent": 217, "children": [219, 223, 224], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 65}}, {"id": 219, "type": "binary_expression", "text": "Ptr<Triangulator", "parent": 218, "children": [220, 221, 222], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 50}}, {"id": 220, "type": "identifier", "text": "Ptr", "parent": 219, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 37}}, {"id": 221, "type": "<", "text": "<", "parent": 219, "children": [], "start_point": {"row": 48, "column": 37}, "end_point": {"row": 48, "column": 38}}, {"id": 222, "type": "identifier", "text": "Triangulator", "parent": 219, "children": [], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 50}}, {"id": 223, "type": ">", "text": ">", "parent": 218, "children": [], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 51}}, {"id": 224, "type": "pointer_expression", "text": "& triangulator", "parent": 218, "children": [225], "start_point": {"row": 48, "column": 51}, "end_point": {"row": 48, "column": 65}}, {"id": 225, "type": "identifier", "text": "triangulator", "parent": 224, "children": [], "start_point": {"row": 48, "column": 53}, "end_point": {"row": 48, "column": 65}}, {"id": 226, "type": "labeled_statement", "text": "cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);", "parent": 39, "children": [227, 228], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 50, "column": 63}}, {"id": 227, "type": "statement_identifier", "text": "cv", "parent": 226, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 32}}, {"id": 228, "type": "ERROR", "text": "::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv:", "parent": 226, "children": [229, 239], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 50, "column": 39}}, {"id": 229, "type": "comma_expression", "text": "Ptr<BundleAdjuster>& bundleAdjuster,\n std", "parent": 228, "children": [230, 238], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 50, "column": 27}}, {"id": 230, "type": "binary_expression", "text": "Ptr<BundleAdjuster>& bundleAdjuster", "parent": 229, "children": [231, 235, 236], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 69}}, {"id": 231, "type": "binary_expression", "text": "Ptr<BundleAdjuster", "parent": 230, "children": [232, 233, 234], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 52}}, {"id": 232, "type": "identifier", "text": "Ptr", "parent": 231, "children": [], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 37}}, {"id": 233, "type": "<", "text": "<", "parent": 231, "children": [], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 38}}, {"id": 234, "type": "identifier", "text": "BundleAdjuster", "parent": 231, "children": [], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 52}}, {"id": 235, "type": ">", "text": ">", "parent": 230, "children": [], "start_point": {"row": 49, "column": 52}, "end_point": {"row": 49, "column": 53}}, {"id": 236, "type": "pointer_expression", "text": "& bundleAdjuster", "parent": 230, "children": [237], "start_point": {"row": 49, "column": 53}, "end_point": {"row": 49, "column": 69}}, {"id": 237, "type": "identifier", "text": "bundleAdjuster", "parent": 236, "children": [], "start_point": {"row": 49, "column": 55}, "end_point": {"row": 49, "column": 69}}, {"id": 238, "type": "identifier", "text": "std", "parent": 229, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 27}}, {"id": 239, "type": "binary_expression", "text": "vector<cv", "parent": 228, "children": [240, 241, 242], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 38}}, {"id": 240, "type": "identifier", "text": "vector", "parent": 239, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 35}}, {"id": 241, "type": "<", "text": "<", "parent": 239, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 36}}, {"id": 242, "type": "identifier", "text": "cv", "parent": 239, "children": [], "start_point": {"row": 50, "column": 36}, "end_point": {"row": 50, "column": 38}}, {"id": 243, "type": "binary_expression", "text": "Ptr<Filter>>& filters", "parent": 226, "children": [244, 245, 246], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 61}}, {"id": 244, "type": "identifier", "text": "Ptr", "parent": 243, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 43}}, {"id": 245, "type": "<", "text": "<", "parent": 243, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 44}}, {"id": 246, "type": "binary_expression", "text": "Filter>>& filters", "parent": 243, "children": [247, 248, 249], "start_point": {"row": 50, "column": 44}, "end_point": {"row": 50, "column": 61}}, {"id": 247, "type": "identifier", "text": "Filter", "parent": 246, "children": [], "start_point": {"row": 50, "column": 44}, "end_point": {"row": 50, "column": 50}}, {"id": 248, "type": ">>", "text": ">>", "parent": 246, "children": [], "start_point": {"row": 50, "column": 50}, "end_point": {"row": 50, "column": 52}}, {"id": 249, "type": "pointer_expression", "text": "& filters", "parent": 246, "children": [250], "start_point": {"row": 50, "column": 52}, "end_point": {"row": 50, "column": 61}}, {"id": 250, "type": "identifier", "text": "filters", "parent": 249, "children": [], "start_point": {"row": 50, "column": 54}, "end_point": {"row": 50, "column": 61}}, {"id": 251, "type": "labeled_statement", "text": "SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const", "parent": 39, "children": [252, 253], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 57, "column": 29}}, {"id": 252, "type": "statement_identifier", "text": "SceneReconstruction", "parent": 251, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 23}}, {"id": 253, "type": "ERROR", "text": "(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std:", "parent": 251, "children": [254, 256, 266], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 54, "column": 28}}, {"id": 254, "type": "type_descriptor", "text": "std", "parent": 253, "children": [255], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 27}}, {"id": 255, "type": "type_identifier", "text": "std", "parent": 254, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 27}}, {"id": 256, "type": "comma_expression", "text": "vector<Image> &mImages,\n std", "parent": 253, "children": [257, 265], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 53, "column": 27}}, {"id": 257, "type": "binary_expression", "text": "vector<Image> &mImages", "parent": 256, "children": [258, 262, 263], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 51}}, {"id": 258, "type": "binary_expression", "text": "vector<Image", "parent": 257, "children": [259, 260, 261], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 41}}, {"id": 259, "type": "identifier", "text": "vector", "parent": 258, "children": [], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 35}}, {"id": 260, "type": "<", "text": "<", "parent": 258, "children": [], "start_point": {"row": 52, "column": 35}, "end_point": {"row": 52, "column": 36}}, {"id": 261, "type": "identifier", "text": "Image", "parent": 258, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 41}}, {"id": 262, "type": ">", "text": ">", "parent": 257, "children": [], "start_point": {"row": 52, "column": 41}, "end_point": {"row": 52, "column": 42}}, {"id": 263, "type": "pointer_expression", "text": "&mImages", "parent": 257, "children": [264], "start_point": {"row": 52, "column": 43}, "end_point": {"row": 52, "column": 51}}, {"id": 264, "type": "identifier", "text": "mImages", "parent": 263, "children": [], "start_point": {"row": 52, "column": 44}, "end_point": {"row": 52, "column": 51}}, {"id": 265, "type": "identifier", "text": "std", "parent": 256, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 27}}, {"id": 266, "type": "comma_expression", "text": "vector<Camera> &mCameras,\n std", "parent": 253, "children": [267, 275], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 54, "column": 27}}, {"id": 267, "type": "binary_expression", "text": "vector<Camera> &mCameras", "parent": 266, "children": [268, 272, 273], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 53}}, {"id": 268, "type": "binary_expression", "text": "vector<Camera", "parent": 267, "children": [269, 270, 271], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 42}}, {"id": 269, "type": "identifier", "text": "vector", "parent": 268, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 35}}, {"id": 270, "type": "<", "text": "<", "parent": 268, "children": [], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 36}}, {"id": 271, "type": "identifier", "text": "Camera", "parent": 268, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 42}}, {"id": 272, "type": ">", "text": ">", "parent": 267, "children": [], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 43}}, {"id": 273, "type": "pointer_expression", "text": "&mCameras", "parent": 267, "children": [274], "start_point": {"row": 53, "column": 44}, "end_point": {"row": 53, "column": 53}}, {"id": 274, "type": "identifier", "text": "mCameras", "parent": 273, "children": [], "start_point": {"row": 53, "column": 45}, "end_point": {"row": 53, "column": 53}}, {"id": 275, "type": "identifier", "text": "std", "parent": 266, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 27}}, {"id": 276, "type": "comma_expression", "text": "vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const", "parent": 251, "children": [277, 285], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 57, "column": 29}}, {"id": 277, "type": "binary_expression", "text": "vector<Features> &mImageFeatures", "parent": 276, "children": [278, 282, 283], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 61}}, {"id": 278, "type": "binary_expression", "text": "vector<Features", "parent": 277, "children": [279, 280, 281], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 44}}, {"id": 279, "type": "identifier", "text": "vector", "parent": 278, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 35}}, {"id": 280, "type": "<", "text": "<", "parent": 278, "children": [], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 36}}, {"id": 281, "type": "identifier", "text": "Features", "parent": 278, "children": [], "start_point": {"row": 54, "column": 36}, "end_point": {"row": 54, "column": 44}}, {"id": 282, "type": ">", "text": ">", "parent": 277, "children": [], "start_point": {"row": 54, "column": 44}, "end_point": {"row": 54, "column": 45}}, {"id": 283, "type": "pointer_expression", "text": "&mImageFeatures", "parent": 277, "children": [284], "start_point": {"row": 54, "column": 46}, "end_point": {"row": 54, "column": 61}}, {"id": 284, "type": "identifier", "text": "mImageFeatures", "parent": 283, "children": [], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 61}}, {"id": 285, "type": "comma_expression", "text": "Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const", "parent": 276, "children": [286, 289], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 57, "column": 29}}, {"id": 286, "type": "binary_expression", "text": "Matches &mFeatureMatchMatrix", "parent": 285, "children": [287, 288], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 52}}, {"id": 287, "type": "identifier", "text": "Matches", "parent": 286, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 31}}, {"id": 288, "type": "identifier", "text": "mFeatureMatchMatrix", "parent": 286, "children": [], "start_point": {"row": 55, "column": 33}, "end_point": {"row": 55, "column": 52}}, {"id": 289, "type": "comma_expression", "text": "ImagePair& baselinePair,\n const", "parent": 285, "children": [290], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 57, "column": 29}}, {"id": 290, "type": "binary_expression", "text": "ImagePair& baselinePair", "parent": 289, "children": [291, 292], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 47}}, {"id": 291, "type": "identifier", "text": "ImagePair", "parent": 290, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 33}}, {"id": 292, "type": "identifier", "text": "baselinePair", "parent": 290, "children": [], "start_point": {"row": 56, "column": 35}, "end_point": {"row": 56, "column": 47}}, {"id": 293, "type": "labeled_statement", "text": "cv::Ptr<Triangulator>& triangulator,\n const", "parent": 39, "children": [294], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 58, "column": 29}}, {"id": 294, "type": "statement_identifier", "text": "cv", "parent": 293, "children": [], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 32}}, {"id": 295, "type": "comma_expression", "text": "Ptr<Triangulator>& triangulator,\n const", "parent": 293, "children": [296], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 58, "column": 29}}, {"id": 296, "type": "binary_expression", "text": "Ptr<Triangulator>& triangulator", "parent": 295, "children": [297, 301, 302], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 65}}, {"id": 297, "type": "binary_expression", "text": "Ptr<Triangulator", "parent": 296, "children": [298, 299, 300], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 50}}, {"id": 298, "type": "identifier", "text": "Ptr", "parent": 297, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 37}}, {"id": 299, "type": "<", "text": "<", "parent": 297, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 38}}, {"id": 300, "type": "identifier", "text": "Triangulator", "parent": 297, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 50}}, {"id": 301, "type": ">", "text": ">", "parent": 296, "children": [], "start_point": {"row": 57, "column": 50}, "end_point": {"row": 57, "column": 51}}, {"id": 302, "type": "pointer_expression", "text": "& triangulator", "parent": 296, "children": [303], "start_point": {"row": 57, "column": 51}, "end_point": {"row": 57, "column": 65}}, {"id": 303, "type": "identifier", "text": "triangulator", "parent": 302, "children": [], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 65}}, {"id": 304, "type": "labeled_statement", "text": "cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);", "parent": 39, "children": [305, 306], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 59, "column": 63}}, {"id": 305, "type": "statement_identifier", "text": "cv", "parent": 304, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 32}}, {"id": 306, "type": "ERROR", "text": "::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv:", "parent": 304, "children": [307, 317], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 59, "column": 39}}, {"id": 307, "type": "comma_expression", "text": "Ptr<BundleAdjuster>& bundleAdjuster,\n std", "parent": 306, "children": [308, 316], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 59, "column": 27}}, {"id": 308, "type": "binary_expression", "text": "Ptr<BundleAdjuster>& bundleAdjuster", "parent": 307, "children": [309, 313, 314], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 69}}, {"id": 309, "type": "binary_expression", "text": "Ptr<BundleAdjuster", "parent": 308, "children": [310, 311, 312], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 52}}, {"id": 310, "type": "identifier", "text": "Ptr", "parent": 309, "children": [], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 37}}, {"id": 311, "type": "<", "text": "<", "parent": 309, "children": [], "start_point": {"row": 58, "column": 37}, "end_point": {"row": 58, "column": 38}}, {"id": 312, "type": "identifier", "text": "BundleAdjuster", "parent": 309, "children": [], "start_point": {"row": 58, "column": 38}, "end_point": {"row": 58, "column": 52}}, {"id": 313, "type": ">", "text": ">", "parent": 308, "children": [], "start_point": {"row": 58, "column": 52}, "end_point": {"row": 58, "column": 53}}, {"id": 314, "type": "pointer_expression", "text": "& bundleAdjuster", "parent": 308, "children": [315], "start_point": {"row": 58, "column": 53}, "end_point": {"row": 58, "column": 69}}, {"id": 315, "type": "identifier", "text": "bundleAdjuster", "parent": 314, "children": [], "start_point": {"row": 58, "column": 55}, "end_point": {"row": 58, "column": 69}}, {"id": 316, "type": "identifier", "text": "std", "parent": 307, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 27}}, {"id": 317, "type": "binary_expression", "text": "vector<cv", "parent": 306, "children": [318, 319, 320], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 38}}, {"id": 318, "type": "identifier", "text": "vector", "parent": 317, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 35}}, {"id": 319, "type": "<", "text": "<", "parent": 317, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 36}}, {"id": 320, "type": "identifier", "text": "cv", "parent": 317, "children": [], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 38}}, {"id": 321, "type": "binary_expression", "text": "Ptr<Filter>>& filters", "parent": 304, "children": [322, 323, 324], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 61}}, {"id": 322, "type": "identifier", "text": "Ptr", "parent": 321, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 43}}, {"id": 323, "type": "<", "text": "<", "parent": 321, "children": [], "start_point": {"row": 59, "column": 43}, "end_point": {"row": 59, "column": 44}}, {"id": 324, "type": "binary_expression", "text": "Filter>>& filters", "parent": 321, "children": [325, 326, 327], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 61}}, {"id": 325, "type": "identifier", "text": "Filter", "parent": 324, "children": [], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 50}}, {"id": 326, "type": ">>", "text": ">>", "parent": 324, "children": [], "start_point": {"row": 59, "column": 50}, "end_point": {"row": 59, "column": 52}}, {"id": 327, "type": "pointer_expression", "text": "& filters", "parent": 324, "children": [328], "start_point": {"row": 59, "column": 52}, "end_point": {"row": 59, "column": 61}}, {"id": 328, "type": "identifier", "text": "filters", "parent": 327, "children": [], "start_point": {"row": 59, "column": 54}, "end_point": {"row": 59, "column": 61}}, {"id": 329, "type": "declaration", "text": "void registerMoreImages();", "parent": 39, "children": [330, 331], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 30}}, {"id": 330, "type": "primitive_type", "text": "void", "parent": 329, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 8}}, {"id": 331, "type": "function_declarator", "text": "registerMoreImages()", "parent": 329, "children": [332, 333], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 29}}, {"id": 332, "type": "identifier", "text": "registerMoreImages", "parent": 331, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 27}}, {"id": 333, "type": "parameter_list", "text": "()", "parent": 331, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 29}}, {"id": 334, "type": "declaration", "text": "bool registerImage(ImageID imageId);", "parent": 39, "children": [335, 336], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 40}}, {"id": 335, "type": "primitive_type", "text": "bool", "parent": 334, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 8}}, {"id": 336, "type": "function_declarator", "text": "registerImage(ImageID imageId)", "parent": 334, "children": [337, 338], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 39}}, {"id": 337, "type": "identifier", "text": "registerImage", "parent": 336, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 22}}, {"id": 338, "type": "parameter_list", "text": "(ImageID imageId)", "parent": 336, "children": [339], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 39}}, {"id": 339, "type": "parameter_declaration", "text": "ImageID imageId", "parent": 338, "children": [340, 341], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 38}}, {"id": 340, "type": "type_identifier", "text": "ImageID", "parent": 339, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 30}}, {"id": 341, "type": "identifier", "text": "imageId", "parent": 339, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 38}}, {"id": 342, "type": "declaration", "text": "bool adjustBundle();", "parent": 39, "children": [343, 344], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 24}}, {"id": 343, "type": "primitive_type", "text": "bool", "parent": 342, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 8}}, {"id": 344, "type": "function_declarator", "text": "adjustBundle()", "parent": 342, "children": [345, 346], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 23}}, {"id": 345, "type": "identifier", "text": "adjustBundle", "parent": 344, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 21}}, {"id": 346, "type": "parameter_list", "text": "()", "parent": 344, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 23}}, {"id": 347, "type": "declaration", "text": "bool applyFilters();", "parent": 39, "children": [348, 349], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 24}}, {"id": 348, "type": "primitive_type", "text": "bool", "parent": 347, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 8}}, {"id": 349, "type": "function_declarator", "text": "applyFilters()", "parent": 347, "children": [350, 351], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 23}}, {"id": 350, "type": "identifier", "text": "applyFilters", "parent": 349, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 21}}, {"id": 351, "type": "parameter_list", "text": "()", "parent": 349, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 23}}, {"id": 352, "type": "declaration", "text": "void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);", "parent": 39, "children": [353, 354], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 85}}, {"id": 353, "type": "primitive_type", "text": "void", "parent": 352, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 8}}, {"id": 354, "type": "function_declarator", "text": "toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile)", "parent": 352, "children": [355, 356], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 84}}, {"id": 355, "type": "identifier", "text": "toPlyFile", "parent": 354, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 18}}, {"id": 356, "type": "parameter_list", "text": "(const std::string& pointCloudFile, const std::string& cameraFile)", "parent": 354, "children": [357, 362], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 84}}, {"id": 357, "type": "parameter_declaration", "text": "const std::string& pointCloudFile", "parent": 356, "children": [358, 359, 361], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 52}}, {"id": 358, "type": "type_identifier", "text": "std", "parent": 357, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 28}}, {"id": 359, "type": "ERROR", "text": "::string&", "parent": 357, "children": [360], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 37}}, {"id": 360, "type": "identifier", "text": "string", "parent": 359, "children": [], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 36}}, {"id": 361, "type": "identifier", "text": "pointCloudFile", "parent": 357, "children": [], "start_point": {"row": 69, "column": 38}, "end_point": {"row": 69, "column": 52}}, {"id": 362, "type": "parameter_declaration", "text": "const std::string& cameraFile", "parent": 356, "children": [363, 364, 366], "start_point": {"row": 69, "column": 54}, "end_point": {"row": 69, "column": 83}}, {"id": 363, "type": "type_identifier", "text": "std", "parent": 362, "children": [], "start_point": {"row": 69, "column": 60}, "end_point": {"row": 69, "column": 63}}, {"id": 364, "type": "ERROR", "text": "::string&", "parent": 362, "children": [365], "start_point": {"row": 69, "column": 63}, "end_point": {"row": 69, "column": 72}}, {"id": 365, "type": "identifier", "text": "string", "parent": 364, "children": [], "start_point": {"row": 69, "column": 65}, "end_point": {"row": 69, "column": 71}}, {"id": 366, "type": "identifier", "text": "cameraFile", "parent": 362, "children": [], "start_point": {"row": 69, "column": 73}, "end_point": {"row": 69, "column": 83}}, {"id": 367, "type": "declaration", "text": "void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);", "parent": 39, "children": [368, 369], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 100}}, {"id": 368, "type": "primitive_type", "text": "void", "parent": 367, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 8}}, {"id": 369, "type": "function_declarator", "text": "outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes)", "parent": 367, "children": [370, 371], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 99}}, {"id": 370, "type": "identifier", "text": "outputToFiles", "parent": 369, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 22}}, {"id": 371, "type": "parameter_list", "text": "(const std::string& outputDirectory, const std::set<OutputType>& outputTypes)", "parent": 369, "children": [372, 377], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 99}}, {"id": 372, "type": "parameter_declaration", "text": "const std::string& outputDirectory", "parent": 371, "children": [373, 374, 376], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 57}}, {"id": 373, "type": "type_identifier", "text": "std", "parent": 372, "children": [], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 32}}, {"id": 374, "type": "ERROR", "text": "::string&", "parent": 372, "children": [375], "start_point": {"row": 71, "column": 32}, "end_point": {"row": 71, "column": 41}}, {"id": 375, "type": "identifier", "text": "string", "parent": 374, "children": [], "start_point": {"row": 71, "column": 34}, "end_point": {"row": 71, "column": 40}}, {"id": 376, "type": "identifier", "text": "outputDirectory", "parent": 372, "children": [], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 57}}, {"id": 377, "type": "parameter_declaration", "text": "const std::set<OutputType>& outputTypes", "parent": 371, "children": [378, 379, 384], "start_point": {"row": 71, "column": 59}, "end_point": {"row": 71, "column": 98}}, {"id": 378, "type": "type_identifier", "text": "std", "parent": 377, "children": [], "start_point": {"row": 71, "column": 65}, "end_point": {"row": 71, "column": 68}}, {"id": 379, "type": "ERROR", "text": "::set<OutputType>&", "parent": 377, "children": [380, 381, 382, 383], "start_point": {"row": 71, "column": 68}, "end_point": {"row": 71, "column": 86}}, {"id": 380, "type": "identifier", "text": "set", "parent": 379, "children": [], "start_point": {"row": 71, "column": 70}, "end_point": {"row": 71, "column": 73}}, {"id": 381, "type": "<", "text": "<", "parent": 379, "children": [], "start_point": {"row": 71, "column": 73}, "end_point": {"row": 71, "column": 74}}, {"id": 382, "type": "identifier", "text": "OutputType", "parent": 379, "children": [], "start_point": {"row": 71, "column": 74}, "end_point": {"row": 71, "column": 84}}, {"id": 383, "type": ">", "text": ">", "parent": 379, "children": [], "start_point": {"row": 71, "column": 84}, "end_point": {"row": 71, "column": 85}}, {"id": 384, "type": "identifier", "text": "outputTypes", "parent": 377, "children": [], "start_point": {"row": 71, "column": 87}, "end_point": {"row": 71, "column": 98}}, {"id": 385, "type": "declaration", "text": "void report(const std::string& report);", "parent": 39, "children": [386, 387], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 43}}, {"id": 386, "type": "primitive_type", "text": "void", "parent": 385, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 8}}, {"id": 387, "type": "function_declarator", "text": "report(const std::string& report)", "parent": 385, "children": [388, 389], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 42}}, {"id": 388, "type": "identifier", "text": "report", "parent": 387, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 15}}, {"id": 389, "type": "parameter_list", "text": "(const std::string& report)", "parent": 387, "children": [390], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 42}}, {"id": 390, "type": "parameter_declaration", "text": "const std::string& report", "parent": 389, "children": [391, 392, 394], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 41}}, {"id": 391, "type": "type_identifier", "text": "std", "parent": 390, "children": [], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 25}}, {"id": 392, "type": "ERROR", "text": "::string&", "parent": 390, "children": [393], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 34}}, {"id": 393, "type": "identifier", "text": "string", "parent": 392, "children": [], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 73, "column": 33}}, {"id": 394, "type": "identifier", "text": "report", "parent": 390, "children": [], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 41}}, {"id": 395, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39, 141, 154, 165, 331, 336, 344, 349, 354, 369, 387], "variables": [81, 139, 144, 152, 157, 160, 163, 168, 173, 329, 334, 339, 342, 347, 352, 357, 362, 367, 372, 377, 385, 390], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37], "modules": [], "enums": []}, "statements": {"expressions": [44, 45, 50, 54, 55, 59, 65, 66, 74, 75, 86, 87, 92, 96, 97, 102, 104, 109, 110, 118, 119, 128, 132, 135, 182, 183, 184, 189, 192, 193, 194, 199, 202, 203, 204, 209, 211, 212, 217, 218, 219, 224, 229, 230, 231, 236, 239, 243, 246, 249, 256, 257, 258, 263, 266, 267, 268, 273, 276, 277, 278, 283, 285, 286, 289, 290, 295, 296, 297, 302, 307, 308, 309, 314, 317, 321, 324, 327], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 40, 43, 46, 48, 51, 53, 56, 58, 60, 62, 64, 67, 69, 71, 73, 76, 78, 80, 82, 83, 85, 88, 90, 93, 95, 98, 100, 103, 105, 106, 108, 111, 113, 115, 117, 120, 122, 124, 126, 129, 131, 133, 136, 138, 142, 145, 147, 149, 151, 155, 158, 159, 161, 162, 166, 169, 171, 172, 175, 178, 181, 185, 187, 190, 191, 195, 197, 200, 201, 205, 207, 210, 213, 214, 216, 220, 222, 225, 227, 232, 234, 237, 238, 240, 242, 244, 247, 250, 252, 255, 259, 261, 264, 265, 269, 271, 274, 275, 279, 281, 284, 287, 288, 291, 292, 294, 298, 300, 303, 305, 310, 312, 315, 316, 318, 320, 322, 325, 328, 332, 337, 340, 341, 345, 350, 355, 358, 360, 361, 363, 365, 366, 370, 373, 375, 376, 378, 380, 382, 384, 388, 391, 393, 394, 395], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "SceneReconstruction", "text_snippet": "class SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "initialise(std::vector<ImagePair> baselines)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "registerImage(ImageID imageId, Image2D3DMatch& match2D3D)"}, {"node_id": 165, "universal_type": "function", "name": "showRotation)", "text_snippet": "camerasToPlyFile(const std::string& cameraFile, bool showRotation)"}, {"node_id": 331, "universal_type": "function", "name": "unknown", "text_snippet": "registerMoreImages()"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "registerImage(ImageID imageId)"}, {"node_id": 344, "universal_type": "function", "name": "unknown", "text_snippet": "adjustBundle()"}, {"node_id": 349, "universal_type": "function", "name": "unknown", "text_snippet": "applyFilters()"}, {"node_id": 354, "universal_type": "function", "name": "unknown", "text_snippet": "toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile)"}, {"node_id": 369, "universal_type": "function", "name": "unknown", "text_snippet": "outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes)"}, {"node_id": 387, "universal_type": "function", "name": "unknown", "text_snippet": "report(const std::string& report)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <set>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"filters/filter.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"triangulation/triangulator.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"bundle-adjustment/bundle_adjuster.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"image.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"features.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"camera.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"matches.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"point_cloud.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"pose.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"image_pair.h\"\n"}, {"node_id": 37, "text": "#include"}]}, "original_source_code": "//\n// Created by <NAME> on 28/12/2021.\n//\n\n#ifndef SFM_SCENE_RECONSTRUCTION_H\n#define SFM_SCENE_RECONSTRUCTION_H\n\n#include <set>\n#include \"filters/filter.h\"\n#include \"triangulation/triangulator.h\"\n#include \"bundle-adjustment/bundle_adjuster.h\"\n\n#include \"image.h\"\n#include \"features.h\"\n#include \"camera.h\"\n#include \"matches.h\"\n#include \"point_cloud.h\"\n#include \"pose.h\"\n#include \"image_pair.h\"\n\nclass SceneReconstruction {\nprivate:\n std::vector<Image>& _mImages;\n std::map<ImageID, Pose> _mCameraPoses;\n std::set<ImageID> _mDoneViews;\n std::set<ImageID> _mGoodViews;\n PointCloud _pointCloud;\n\n std::vector<Camera>& _mCameras;\n std::vector<Features>& _mImageFeatures;\n Matches& _mFeatureMatchMatrix;\n\n cv::Ptr<Triangulator> _triangulator;\n cv::Ptr<BundleAdjuster> _bundleAdjuster;\n std::vector<cv::Ptr<Filter>> _filters;\n\n void initialise(std::vector<ImagePair> baselines);\n\n bool registerImage(ImageID imageId, Image2D3DMatch& match2D3D);\n\n void camerasToPlyFile(const std::string& cameraFile, bool showRotation);\n\n\npublic:\n SceneReconstruction(std::vector<Image>& mImages,\n std::vector<Camera>& mCameras,\n std::vector<Features>& mImageFeatures,\n Matches& mFeatureMatchMatrix,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n SceneReconstruction(std::vector<Image> &mImages,\n std::vector<Camera> &mCameras,\n std::vector<Features> &mImageFeatures,\n Matches &mFeatureMatchMatrix,\n ImagePair& baselinePair,\n const cv::Ptr<Triangulator>& triangulator,\n const cv::Ptr<BundleAdjuster>& bundleAdjuster,\n std::vector<cv::Ptr<Filter>>& filters);\n\n void registerMoreImages();\n\n bool registerImage(ImageID imageId);\n\n bool adjustBundle();\n\n bool applyFilters();\n\n void toPlyFile(const std::string& pointCloudFile, const std::string& cameraFile);\n\n void outputToFiles(const std::string& outputDirectory, const std::set<OutputType>& outputTypes);\n\n void report(const std::string& report);\n};\n#endif //SFM_SCENE_RECONSTRUCTION_H\n"}
204
c
///////////////////////////////////////////////////////////////////////////// // Name: wx/qt/colour.h // Purpose: wxColour class implementation for wxQt // Author: <NAME> // Created: 2010-05-12 // Copyright: (c) 2010 <NAME> // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_QT_COLOUR_H_ #define _WX_QT_COLOUR_H_ #include <QtGui/QColor> class WXDLLIMPEXP_CORE wxColour : public wxColourBase { public: DEFINE_STD_WXCOLOUR_CONSTRUCTORS wxColour(const QColor& color) : m_qtColor(color) {} virtual bool IsOk() const { return m_qtColor.isValid(); } unsigned char Red() const { return m_qtColor.red(); } unsigned char Green() const { return m_qtColor.green(); } unsigned char Blue() const { return m_qtColor.blue(); } unsigned char Alpha() const { return m_qtColor.alpha(); } bool operator==(const wxColour& color) const { return m_qtColor == color.m_qtColor; } bool operator!=(const wxColour& color) const { return m_qtColor != color.m_qtColor; } int GetPixel() const; QColor GetHandle() const { return m_qtColor; }; protected: virtual void InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) { m_qtColor.setRgb(r, g, b, a); } private: QColor m_qtColor; wxDECLARE_DYNAMIC_CLASS(wxColour); }; #endif // _WX_QT_COLOUR_H_
38.28
36
(translation_unit) "/////////////////////////////////////////////////////////////////////////////\n// Name: wx/qt/colour.h\n// Purpose: wxColour class implementation for wxQt\n// Author: <NAME>\n// Created: 2010-05-12\n// Copyright: (c) 2010 <NAME>\n// Licence: wxWindows licence\n/////////////////////////////////////////////////////////////////////////////\n\n#ifndef _WX_QT_COLOUR_H_\n#define _WX_QT_COLOUR_H_\n\n#include <QtGui/QColor>\n\nclass WXDLLIMPEXP_CORE wxColour : public wxColourBase\n{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; };\n\nprotected:\n virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)\n { m_qtColor.setRgb(r, g, b, a); }\n\nprivate:\n QColor m_qtColor;\n\n wxDECLARE_DYNAMIC_CLASS(wxColour);\n};\n\n#endif // _WX_QT_COLOUR_H_\n" (comment) "/////////////////////////////////////////////////////////////////////////////" (comment) "// Name: wx/qt/colour.h" (comment) "// Purpose: wxColour class implementation for wxQt" (comment) "// Author: <NAME>" (comment) "// Created: 2010-05-12" (comment) "// Copyright: (c) 2010 <NAME>" (comment) "// Licence: wxWindows licence" (comment) "/////////////////////////////////////////////////////////////////////////////" (preproc_ifdef) "#ifndef _WX_QT_COLOUR_H_\n#define _WX_QT_COLOUR_H_\n\n#include <QtGui/QColor>\n\nclass WXDLLIMPEXP_CORE wxColour : public wxColourBase\n{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; };\n\nprotected:\n virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)\n { m_qtColor.setRgb(r, g, b, a); }\n\nprivate:\n QColor m_qtColor;\n\n wxDECLARE_DYNAMIC_CLASS(wxColour);\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "_WX_QT_COLOUR_H_" (preproc_def) "#define _WX_QT_COLOUR_H_\n" (#define) "#define" (identifier) "_WX_QT_COLOUR_H_" (preproc_include) "#include <QtGui/QColor>\n" (#include) "#include" (system_lib_string) "<QtGui/QColor>" (declaration) "class WXDLLIMPEXP_CORE" (type_identifier) "class" (identifier) "WXDLLIMPEXP_CORE" (;) "" (labeled_statement) "wxColour : public wxColourBase\n{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; }" (statement_identifier) "wxColour" (:) ":" (ERROR) "public wxColourBase" (type_identifier) "public" (identifier) "wxColourBase" (compound_statement) "{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; }" ({) "{" (labeled_statement) "public:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}" (statement_identifier) "public" (:) ":" (ERROR) "DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color)" (type_identifier) "DEFINE_STD_WXCOLOUR_CONSTRUCTORS" (function_declarator) "wxColour(const QColor& color) : m_qtColor(color)" (identifier) "wxColour" (parameter_list) "(const QColor& color)" (() "(" (parameter_declaration) "const QColor& color" (type_qualifier) "const" (const) "const" (type_identifier) "QColor" (ERROR) "&" (&) "&" (identifier) "color" ()) ")" (ERROR) ":" (:) ":" (call_expression) "m_qtColor(color)" (identifier) "m_qtColor" (argument_list) "(color)" (() "(" (identifier) "color" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (ERROR) "virtual bool IsOk() const" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (function_declarator) "IsOk()" (identifier) "IsOk" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor.isValid(); }" ({) "{" (return_statement) "return m_qtColor.isValid();" (return) "return" (call_expression) "m_qtColor.isValid()" (field_expression) "m_qtColor.isValid" (identifier) "m_qtColor" (.) "." (field_identifier) "isValid" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "unsigned char Red() const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (function_declarator) "Red()" (identifier) "Red" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor.red(); }" ({) "{" (return_statement) "return m_qtColor.red();" (return) "return" (call_expression) "m_qtColor.red()" (field_expression) "m_qtColor.red" (identifier) "m_qtColor" (.) "." (field_identifier) "red" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "unsigned char Green() const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (function_declarator) "Green()" (identifier) "Green" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor.green(); }" ({) "{" (return_statement) "return m_qtColor.green();" (return) "return" (call_expression) "m_qtColor.green()" (field_expression) "m_qtColor.green" (identifier) "m_qtColor" (.) "." (field_identifier) "green" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "unsigned char Blue() const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (function_declarator) "Blue()" (identifier) "Blue" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor.blue(); }" ({) "{" (return_statement) "return m_qtColor.blue();" (return) "return" (call_expression) "m_qtColor.blue()" (field_expression) "m_qtColor.blue" (identifier) "m_qtColor" (.) "." (field_identifier) "blue" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "unsigned char Alpha() const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (function_declarator) "Alpha()" (identifier) "Alpha" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor.alpha(); }" ({) "{" (return_statement) "return m_qtColor.alpha();" (return) "return" (call_expression) "m_qtColor.alpha()" (field_expression) "m_qtColor.alpha" (identifier) "m_qtColor" (.) "." (field_identifier) "alpha" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "bool operator==(const wxColour& color) const" (primitive_type) "bool" (identifier) "operator" (==) "==" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "wxColour" (pointer_expression) "& color" (&) "&" (identifier) "color" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor == color.m_qtColor; }" ({) "{" (return_statement) "return m_qtColor == color.m_qtColor;" (return) "return" (binary_expression) "m_qtColor == color.m_qtColor" (identifier) "m_qtColor" (==) "==" (field_expression) "color.m_qtColor" (identifier) "color" (.) "." (field_identifier) "m_qtColor" (;) ";" (}) "}" (ERROR) "bool operator!=(const wxColour& color) const" (primitive_type) "bool" (identifier) "operator" (!=) "!=" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "wxColour" (pointer_expression) "& color" (&) "&" (identifier) "color" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_qtColor != color.m_qtColor; }" ({) "{" (return_statement) "return m_qtColor != color.m_qtColor;" (return) "return" (binary_expression) "m_qtColor != color.m_qtColor" (identifier) "m_qtColor" (!=) "!=" (field_expression) "color.m_qtColor" (identifier) "color" (.) "." (field_identifier) "m_qtColor" (;) ";" (}) "}" (ERROR) "int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor;" (primitive_type) "int" (function_declarator) "GetPixel()" (identifier) "GetPixel" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n\n QColor GetHandle() const { return m_qtColor;" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (type_identifier) "QColor" (ERROR) "GetHandle() const { return" (function_declarator) "GetHandle() const" (identifier) "GetHandle" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" ({) "{" (return) "return" (identifier) "m_qtColor" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (labeled_statement) "protected:\n virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)\n { m_qtColor.setRgb(r, g, b, a); }" (statement_identifier) "protected" (:) ":" (ERROR) "virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)" (identifier) "InitRGBA" (parameter_list) "(ChannelType r, ChannelType g, ChannelType b, ChannelType a)" (() "(" (parameter_declaration) "ChannelType r" (type_identifier) "ChannelType" (identifier) "r" (,) "," (parameter_declaration) "ChannelType g" (type_identifier) "ChannelType" (identifier) "g" (,) "," (parameter_declaration) "ChannelType b" (type_identifier) "ChannelType" (identifier) "b" (,) "," (parameter_declaration) "ChannelType a" (type_identifier) "ChannelType" (identifier) "a" ()) ")" (compound_statement) "{ m_qtColor.setRgb(r, g, b, a); }" ({) "{" (expression_statement) "m_qtColor.setRgb(r, g, b, a);" (call_expression) "m_qtColor.setRgb(r, g, b, a)" (field_expression) "m_qtColor.setRgb" (identifier) "m_qtColor" (.) "." (field_identifier) "setRgb" (argument_list) "(r, g, b, a)" (() "(" (identifier) "r" (,) "," (identifier) "g" (,) "," (identifier) "b" (,) "," (identifier) "a" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n QColor m_qtColor;" (statement_identifier) "private" (:) ":" (declaration) "QColor m_qtColor;" (type_identifier) "QColor" (identifier) "m_qtColor" (;) ";" (expression_statement) "wxDECLARE_DYNAMIC_CLASS(wxColour);" (call_expression) "wxDECLARE_DYNAMIC_CLASS(wxColour)" (identifier) "wxDECLARE_DYNAMIC_CLASS" (argument_list) "(wxColour)" (() "(" (identifier) "wxColour" ()) ")" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// _WX_QT_COLOUR_H_"
332
18
{"language": "c", "success": true, "metadata": {"lines": 36, "avg_line_length": 38.28, "nodes": 171, "errors": 0, "source_hash": "028653fe062aef7d3a28c23d96d10635a63f4a8ba56b668b5d786f36f229cc29", "categorized_nodes": 119}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _WX_QT_COLOUR_H_\n#define _WX_QT_COLOUR_H_\n\n#include <QtGui/QColor>\n\nclass WXDLLIMPEXP_CORE wxColour : public wxColourBase\n{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; };\n\nprotected:\n virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)\n { m_qtColor.setRgb(r, g, b, a); }\n\nprivate:\n QColor m_qtColor;\n\n wxDECLARE_DYNAMIC_CLASS(wxColour);\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 11, 133, 162, 170], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 2, "type": "identifier", "text": "_WX_QT_COLOUR_H_", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define _WX_QT_COLOUR_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "identifier", "text": "_WX_QT_COLOUR_H_", "parent": 3, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include <QtGui/QColor>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<QtGui/QColor>", "parent": 6, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 23}}, {"id": 9, "type": "declaration", "text": "class WXDLLIMPEXP_CORE", "parent": 0, "children": [10], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 22}}, {"id": 10, "type": "identifier", "text": "WXDLLIMPEXP_CORE", "parent": 9, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 22}}, {"id": 11, "type": "labeled_statement", "text": "wxColour : public wxColourBase\n{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; }", "parent": 0, "children": [12, 13], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 34, "column": 50}}, {"id": 12, "type": "statement_identifier", "text": "wxColour", "parent": 11, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 31}}, {"id": 13, "type": "ERROR", "text": "public wxColourBase", "parent": 11, "children": [14], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 53}}, {"id": 14, "type": "identifier", "text": "wxColourBase", "parent": 13, "children": [], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 53}}, {"id": 15, "type": "labeled_statement", "text": "public:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}", "parent": 11, "children": [16], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 18, "column": 55}}, {"id": 16, "type": "ERROR", "text": "DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color)", "parent": 15, "children": [17, 18], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 18, "column": 52}}, {"id": 17, "type": "type_identifier", "text": "DEFINE_STD_WXCOLOUR_CONSTRUCTORS", "parent": 16, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 36}}, {"id": 18, "type": "function_declarator", "text": "wxColour(const QColor& color) : m_qtColor(color)", "parent": 16, "children": [19, 20, 24], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 52}}, {"id": 19, "type": "identifier", "text": "wxColour", "parent": 18, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 12}}, {"id": 20, "type": "parameter_list", "text": "(const QColor& color)", "parent": 18, "children": [21], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 33}}, {"id": 21, "type": "parameter_declaration", "text": "const QColor& color", "parent": 20, "children": [22, 23], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 32}}, {"id": 22, "type": "type_identifier", "text": "QColor", "parent": 21, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 25}}, {"id": 23, "type": "identifier", "text": "color", "parent": 21, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 32}}, {"id": 24, "type": "call_expression", "text": "m_qtColor(color)", "parent": 18, "children": [25, 26], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 18, "column": 52}}, {"id": 25, "type": "identifier", "text": "m_qtColor", "parent": 24, "children": [], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 18, "column": 45}}, {"id": 26, "type": "argument_list", "text": "(color)", "parent": 24, "children": [27], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 52}}, {"id": 27, "type": "identifier", "text": "color", "parent": 26, "children": [], "start_point": {"row": 18, "column": 46}, "end_point": {"row": 18, "column": 51}}, {"id": 28, "type": "ERROR", "text": "virtual bool IsOk() const", "parent": 11, "children": [29, 30, 32], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 29}}, {"id": 29, "type": "type_identifier", "text": "virtual", "parent": 28, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 11}}, {"id": 30, "type": "ERROR", "text": "bool", "parent": 28, "children": [31], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 16}}, {"id": 31, "type": "identifier", "text": "bool", "parent": 30, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 16}}, {"id": 32, "type": "function_declarator", "text": "IsOk()", "parent": 28, "children": [33, 34], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 23}}, {"id": 33, "type": "identifier", "text": "IsOk", "parent": 32, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 21}}, {"id": 34, "type": "parameter_list", "text": "()", "parent": 32, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 23}}, {"id": 35, "type": "return_statement", "text": "return m_qtColor.isValid();", "parent": 11, "children": [36], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 59}}, {"id": 36, "type": "call_expression", "text": "m_qtColor.isValid()", "parent": 35, "children": [37, 40], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 58}}, {"id": 37, "type": "field_expression", "text": "m_qtColor.isValid", "parent": 36, "children": [38, 39], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 56}}, {"id": 38, "type": "identifier", "text": "m_qtColor", "parent": 37, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 48}}, {"id": 39, "type": "field_identifier", "text": "isValid", "parent": 37, "children": [], "start_point": {"row": 20, "column": 49}, "end_point": {"row": 20, "column": 56}}, {"id": 40, "type": "argument_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 58}}, {"id": 41, "type": "ERROR", "text": "unsigned char Red() const", "parent": 11, "children": [42, 45], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 29}}, {"id": 42, "type": "sized_type_specifier", "text": "unsigned char", "parent": 41, "children": [43, 44], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 17}}, {"id": 43, "type": "unsigned", "text": "unsigned", "parent": 42, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 44, "type": "primitive_type", "text": "char", "parent": 42, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 17}}, {"id": 45, "type": "function_declarator", "text": "Red()", "parent": 41, "children": [46, 47], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 23}}, {"id": 46, "type": "identifier", "text": "Red", "parent": 45, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 21}}, {"id": 47, "type": "parameter_list", "text": "()", "parent": 45, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 23}}, {"id": 48, "type": "return_statement", "text": "return m_qtColor.red();", "parent": 11, "children": [49], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 55}}, {"id": 49, "type": "call_expression", "text": "m_qtColor.red()", "parent": 48, "children": [50, 53], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 54}}, {"id": 50, "type": "field_expression", "text": "m_qtColor.red", "parent": 49, "children": [51, 52], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 52}}, {"id": 51, "type": "identifier", "text": "m_qtColor", "parent": 50, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 48}}, {"id": 52, "type": "field_identifier", "text": "red", "parent": 50, "children": [], "start_point": {"row": 22, "column": 49}, "end_point": {"row": 22, "column": 52}}, {"id": 53, "type": "argument_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 22, "column": 52}, "end_point": {"row": 22, "column": 54}}, {"id": 54, "type": "ERROR", "text": "unsigned char Green() const", "parent": 11, "children": [55, 58], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 31}}, {"id": 55, "type": "sized_type_specifier", "text": "unsigned char", "parent": 54, "children": [56, 57], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 17}}, {"id": 56, "type": "unsigned", "text": "unsigned", "parent": 55, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 12}}, {"id": 57, "type": "primitive_type", "text": "char", "parent": 55, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 17}}, {"id": 58, "type": "function_declarator", "text": "Green()", "parent": 54, "children": [59, 60], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 25}}, {"id": 59, "type": "identifier", "text": "Green", "parent": 58, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 23}}, {"id": 60, "type": "parameter_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 25}}, {"id": 61, "type": "return_statement", "text": "return m_qtColor.green();", "parent": 11, "children": [62], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 59}}, {"id": 62, "type": "call_expression", "text": "m_qtColor.green()", "parent": 61, "children": [63, 66], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 58}}, {"id": 63, "type": "field_expression", "text": "m_qtColor.green", "parent": 62, "children": [64, 65], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 56}}, {"id": 64, "type": "identifier", "text": "m_qtColor", "parent": 63, "children": [], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 50}}, {"id": 65, "type": "field_identifier", "text": "green", "parent": 63, "children": [], "start_point": {"row": 23, "column": 51}, "end_point": {"row": 23, "column": 56}}, {"id": 66, "type": "argument_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 23, "column": 56}, "end_point": {"row": 23, "column": 58}}, {"id": 67, "type": "ERROR", "text": "unsigned char Blue() const", "parent": 11, "children": [68, 71], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 31}}, {"id": 68, "type": "sized_type_specifier", "text": "unsigned char", "parent": 67, "children": [69, 70], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 17}}, {"id": 69, "type": "unsigned", "text": "unsigned", "parent": 68, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 12}}, {"id": 70, "type": "primitive_type", "text": "char", "parent": 68, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 17}}, {"id": 71, "type": "function_declarator", "text": "Blue()", "parent": 67, "children": [72, 73], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 24}}, {"id": 72, "type": "identifier", "text": "Blue", "parent": 71, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 22}}, {"id": 73, "type": "parameter_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 24, "column": 22}, "end_point": {"row": 24, "column": 24}}, {"id": 74, "type": "return_statement", "text": "return m_qtColor.blue();", "parent": 11, "children": [75], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 58}}, {"id": 75, "type": "call_expression", "text": "m_qtColor.blue()", "parent": 74, "children": [76, 79], "start_point": {"row": 24, "column": 41}, "end_point": {"row": 24, "column": 57}}, {"id": 76, "type": "field_expression", "text": "m_qtColor.blue", "parent": 75, "children": [77, 78], "start_point": {"row": 24, "column": 41}, "end_point": {"row": 24, "column": 55}}, {"id": 77, "type": "identifier", "text": "m_qtColor", "parent": 76, "children": [], "start_point": {"row": 24, "column": 41}, "end_point": {"row": 24, "column": 50}}, {"id": 78, "type": "field_identifier", "text": "blue", "parent": 76, "children": [], "start_point": {"row": 24, "column": 51}, "end_point": {"row": 24, "column": 55}}, {"id": 79, "type": "argument_list", "text": "()", "parent": 75, "children": [], "start_point": {"row": 24, "column": 55}, "end_point": {"row": 24, "column": 57}}, {"id": 80, "type": "ERROR", "text": "unsigned char Alpha() const", "parent": 11, "children": [81, 84], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 31}}, {"id": 81, "type": "sized_type_specifier", "text": "unsigned char", "parent": 80, "children": [82, 83], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 17}}, {"id": 82, "type": "unsigned", "text": "unsigned", "parent": 81, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 12}}, {"id": 83, "type": "primitive_type", "text": "char", "parent": 81, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 17}}, {"id": 84, "type": "function_declarator", "text": "Alpha()", "parent": 80, "children": [85, 86], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 25}}, {"id": 85, "type": "identifier", "text": "Alpha", "parent": 84, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 23}}, {"id": 86, "type": "parameter_list", "text": "()", "parent": 84, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 25}}, {"id": 87, "type": "return_statement", "text": "return m_qtColor.alpha();", "parent": 11, "children": [88], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 59}}, {"id": 88, "type": "call_expression", "text": "m_qtColor.alpha()", "parent": 87, "children": [89, 92], "start_point": {"row": 25, "column": 41}, "end_point": {"row": 25, "column": 58}}, {"id": 89, "type": "field_expression", "text": "m_qtColor.alpha", "parent": 88, "children": [90, 91], "start_point": {"row": 25, "column": 41}, "end_point": {"row": 25, "column": 56}}, {"id": 90, "type": "identifier", "text": "m_qtColor", "parent": 89, "children": [], "start_point": {"row": 25, "column": 41}, "end_point": {"row": 25, "column": 50}}, {"id": 91, "type": "field_identifier", "text": "alpha", "parent": 89, "children": [], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 56}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 88, "children": [], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 58}}, {"id": 93, "type": "ERROR", "text": "bool operator==(const wxColour& color) const", "parent": 11, "children": [94, 95, 96, 97, 98], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 48}}, {"id": 94, "type": "primitive_type", "text": "bool", "parent": 93, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 95, "type": "identifier", "text": "operator", "parent": 93, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 17}}, {"id": 96, "type": "==", "text": "==", "parent": 93, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 19}}, {"id": 97, "type": "type_identifier", "text": "wxColour", "parent": 93, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 34}}, {"id": 98, "type": "pointer_expression", "text": "& color", "parent": 93, "children": [99], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 41}}, {"id": 99, "type": "identifier", "text": "color", "parent": 98, "children": [], "start_point": {"row": 27, "column": 36}, "end_point": {"row": 27, "column": 41}}, {"id": 100, "type": "return_statement", "text": "return m_qtColor == color.m_qtColor;", "parent": 11, "children": [101], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 46}}, {"id": 101, "type": "binary_expression", "text": "m_qtColor == color.m_qtColor", "parent": 100, "children": [102, 103, 104], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 45}}, {"id": 102, "type": "identifier", "text": "m_qtColor", "parent": 101, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 26}}, {"id": 103, "type": "==", "text": "==", "parent": 101, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 29}}, {"id": 104, "type": "field_expression", "text": "color.m_qtColor", "parent": 101, "children": [105, 106], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 45}}, {"id": 105, "type": "identifier", "text": "color", "parent": 104, "children": [], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 35}}, {"id": 106, "type": "field_identifier", "text": "m_qtColor", "parent": 104, "children": [], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 45}}, {"id": 107, "type": "ERROR", "text": "bool operator!=(const wxColour& color) const", "parent": 11, "children": [108, 109, 110, 111, 112], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 48}}, {"id": 108, "type": "primitive_type", "text": "bool", "parent": 107, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 8}}, {"id": 109, "type": "identifier", "text": "operator", "parent": 107, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 17}}, {"id": 110, "type": "!=", "text": "!=", "parent": 107, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 19}}, {"id": 111, "type": "type_identifier", "text": "wxColour", "parent": 107, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 34}}, {"id": 112, "type": "pointer_expression", "text": "& color", "parent": 107, "children": [113], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 41}}, {"id": 113, "type": "identifier", "text": "color", "parent": 112, "children": [], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 41}}, {"id": 114, "type": "return_statement", "text": "return m_qtColor != color.m_qtColor;", "parent": 11, "children": [115], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 46}}, {"id": 115, "type": "binary_expression", "text": "m_qtColor != color.m_qtColor", "parent": 114, "children": [116, 117, 118], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 45}}, {"id": 116, "type": "identifier", "text": "m_qtColor", "parent": 115, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 26}}, {"id": 117, "type": "!=", "text": "!=", "parent": 115, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 29}}, {"id": 118, "type": "field_expression", "text": "color.m_qtColor", "parent": 115, "children": [119, 120], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 45}}, {"id": 119, "type": "identifier", "text": "color", "parent": 118, "children": [], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 35}}, {"id": 120, "type": "field_identifier", "text": "m_qtColor", "parent": 118, "children": [], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 45}}, {"id": 121, "type": "ERROR", "text": "int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor;", "parent": 11, "children": [122, 123, 126], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 34, "column": 48}}, {"id": 122, "type": "primitive_type", "text": "int", "parent": 121, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 7}}, {"id": 123, "type": "function_declarator", "text": "GetPixel()", "parent": 121, "children": [124, 125], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 18}}, {"id": 124, "type": "identifier", "text": "GetPixel", "parent": 123, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 16}}, {"id": 125, "type": "parameter_list", "text": "()", "parent": 123, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 18}}, {"id": 126, "type": "declaration", "text": "const;\n\n QColor GetHandle() const { return m_qtColor;", "parent": 121, "children": [127, 128, 132], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 34, "column": 48}}, {"id": 127, "type": "type_identifier", "text": "QColor", "parent": 126, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 128, "type": "ERROR", "text": "GetHandle() const { return", "parent": 126, "children": [129], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 37}}, {"id": 129, "type": "function_declarator", "text": "GetHandle() const", "parent": 128, "children": [130, 131], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 28}}, {"id": 130, "type": "identifier", "text": "GetHandle", "parent": 129, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 20}}, {"id": 131, "type": "parameter_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 22}}, {"id": 132, "type": "identifier", "text": "m_qtColor", "parent": 126, "children": [], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 47}}, {"id": 133, "type": "labeled_statement", "text": "protected:\n virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)\n { m_qtColor.setRgb(r, g, b, a); }", "parent": 0, "children": [134], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 39, "column": 41}}, {"id": 134, "type": "ERROR", "text": "virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)", "parent": 133, "children": [135, 136, 138], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 38, "column": 72}}, {"id": 135, "type": "type_identifier", "text": "virtual", "parent": 134, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 11}}, {"id": 136, "type": "ERROR", "text": "void", "parent": 134, "children": [137], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 16}}, {"id": 137, "type": "identifier", "text": "void", "parent": 136, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 16}}, {"id": 138, "type": "function_declarator", "text": "InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)", "parent": 134, "children": [139, 140], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 72}}, {"id": 139, "type": "identifier", "text": "InitRGBA", "parent": 138, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 12}}, {"id": 140, "type": "parameter_list", "text": "(ChannelType r, ChannelType g, ChannelType b, ChannelType a)", "parent": 138, "children": [141, 144, 147, 150], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 72}}, {"id": 141, "type": "parameter_declaration", "text": "ChannelType r", "parent": 140, "children": [142, 143], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 26}}, {"id": 142, "type": "type_identifier", "text": "ChannelType", "parent": 141, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 24}}, {"id": 143, "type": "identifier", "text": "r", "parent": 141, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 26}}, {"id": 144, "type": "parameter_declaration", "text": "ChannelType g", "parent": 140, "children": [145, 146], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 41}}, {"id": 145, "type": "type_identifier", "text": "ChannelType", "parent": 144, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 39}}, {"id": 146, "type": "identifier", "text": "g", "parent": 144, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 41}}, {"id": 147, "type": "parameter_declaration", "text": "ChannelType b", "parent": 140, "children": [148, 149], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 56}}, {"id": 148, "type": "type_identifier", "text": "ChannelType", "parent": 147, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 54}}, {"id": 149, "type": "identifier", "text": "b", "parent": 147, "children": [], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 56}}, {"id": 150, "type": "parameter_declaration", "text": "ChannelType a", "parent": 140, "children": [151, 152], "start_point": {"row": 38, "column": 58}, "end_point": {"row": 38, "column": 71}}, {"id": 151, "type": "type_identifier", "text": "ChannelType", "parent": 150, "children": [], "start_point": {"row": 38, "column": 58}, "end_point": {"row": 38, "column": 69}}, {"id": 152, "type": "identifier", "text": "a", "parent": 150, "children": [], "start_point": {"row": 38, "column": 70}, "end_point": {"row": 38, "column": 71}}, {"id": 153, "type": "call_expression", "text": "m_qtColor.setRgb(r, g, b, a)", "parent": 133, "children": [154, 157], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 38}}, {"id": 154, "type": "field_expression", "text": "m_qtColor.setRgb", "parent": 153, "children": [155, 156], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 26}}, {"id": 155, "type": "identifier", "text": "m_qtColor", "parent": 154, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 19}}, {"id": 156, "type": "field_identifier", "text": "setRgb", "parent": 154, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 26}}, {"id": 157, "type": "argument_list", "text": "(r, g, b, a)", "parent": 153, "children": [158, 159, 160, 161], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 38}}, {"id": 158, "type": "identifier", "text": "r", "parent": 157, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 159, "type": "identifier", "text": "g", "parent": 157, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 31}}, {"id": 160, "type": "identifier", "text": "b", "parent": 157, "children": [], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 34}}, {"id": 161, "type": "identifier", "text": "a", "parent": 157, "children": [], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 37}}, {"id": 162, "type": "labeled_statement", "text": "private:\n QColor m_qtColor;", "parent": 0, "children": [163], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 21}}, {"id": 163, "type": "declaration", "text": "QColor m_qtColor;", "parent": 162, "children": [164, 165], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 21}}, {"id": 164, "type": "type_identifier", "text": "QColor", "parent": 163, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 10}}, {"id": 165, "type": "identifier", "text": "m_qtColor", "parent": 163, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 20}}, {"id": 166, "type": "call_expression", "text": "wxDECLARE_DYNAMIC_CLASS(wxColour)", "parent": 0, "children": [167, 168], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 37}}, {"id": 167, "type": "identifier", "text": "wxDECLARE_DYNAMIC_CLASS", "parent": 166, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 27}}, {"id": 168, "type": "argument_list", "text": "(wxColour)", "parent": 166, "children": [169], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 37}}, {"id": 169, "type": "identifier", "text": "wxColour", "parent": 168, "children": [], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 36}}, {"id": 170, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}]}, "node_categories": {"declarations": {"functions": [18, 32, 45, 58, 71, 84, 123, 129, 138], "variables": [9, 21, 126, 141, 144, 147, 150, 163], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [24, 36, 37, 49, 50, 62, 63, 75, 76, 88, 89, 98, 101, 104, 112, 115, 118, 153, 154, 166], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 14, 17, 19, 22, 23, 25, 27, 29, 31, 33, 38, 39, 42, 46, 51, 52, 55, 59, 64, 65, 68, 72, 77, 78, 81, 85, 90, 91, 95, 97, 99, 102, 105, 106, 109, 111, 113, 116, 119, 120, 124, 127, 130, 132, 135, 137, 139, 142, 143, 145, 146, 148, 149, 151, 152, 155, 156, 158, 159, 160, 161, 164, 165, 167, 169, 170], "returns": [35, 48, 61, 74, 87, 100, 114], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "wxColour(const QColor& color) : m_qtColor(color)"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "IsOk()"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "Red()"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "Green()"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "Blue()"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "Alpha()"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "GetPixel()"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "GetHandle() const"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QtGui/QColor>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/////////////////////////////////////////////////////////////////////////////\n// Name: wx/qt/colour.h\n// Purpose: wxColour class implementation for wxQt\n// Author: <NAME>\n// Created: 2010-05-12\n// Copyright: (c) 2010 <NAME>\n// Licence: wxWindows licence\n/////////////////////////////////////////////////////////////////////////////\n\n#ifndef _WX_QT_COLOUR_H_\n#define _WX_QT_COLOUR_H_\n\n#include <QtGui/QColor>\n\nclass WXDLLIMPEXP_CORE wxColour : public wxColourBase\n{\npublic:\n DEFINE_STD_WXCOLOUR_CONSTRUCTORS\n wxColour(const QColor& color) : m_qtColor(color) {}\n\n virtual bool IsOk() const { return m_qtColor.isValid(); }\n\n unsigned char Red() const { return m_qtColor.red(); }\n unsigned char Green() const { return m_qtColor.green(); }\n unsigned char Blue() const { return m_qtColor.blue(); }\n unsigned char Alpha() const { return m_qtColor.alpha(); }\n\n bool operator==(const wxColour& color) const\n { return m_qtColor == color.m_qtColor; }\n bool operator!=(const wxColour& color) const\n { return m_qtColor != color.m_qtColor; }\n\n int GetPixel() const;\n\n QColor GetHandle() const { return m_qtColor; };\n\nprotected:\n virtual void\n InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a)\n { m_qtColor.setRgb(r, g, b, a); }\n\nprivate:\n QColor m_qtColor;\n\n wxDECLARE_DYNAMIC_CLASS(wxColour);\n};\n\n#endif // _WX_QT_COLOUR_H_\n"}
205
c
#ifndef __QPSOLVER_H__ #define __QPSOLVER_H__ #include <stdbool.h> #include "matrix.h" #if VERBOSE_MESSAGE == 0 #define VERBOSE_PRINT(...) #else #define VERBOSE_PRINT(...) printf(__VA_ARGS__) #endif #if DEBUG_MESSAGE == 0 #define DEBUG_PRINT_MATRIX(...) #define DEBUG_PRINT_VAR(...) #define DEBUG_PRINT(...) #else #define DEBUG_PRINT_MATRIX PRINT_MATRIX #define DEBUG_PRINT_VAR PRINT_VAR #define DEBUG_PRINT(...) printf(__VA_ARGS__) #endif /* return state of qp solver */ #define QP_SUCCESS_SOLVED 0 #define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1 #define QP_ERROR_NO_OBJECTIVE_FUNCTION 2 #define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3 #define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4 /* return state of phase1 (feasibility) solver */ #define QP_PHASE1_FEASIBLE 0 #define QP_PHASE1_INFEASIBLE 1 typedef struct { /* slack variable parameters for feasibility problem */ double s_margin; double beta; /* log barrier parameters*/ double t_init; double t_max; double mu; /* gradient descent */ double step_size; //not used, replaced with backtracking line search /* backtracking line search parameters*/ double backtracking_alpha; double backtracking_beta; /* stop criterions */ double eps; int max_iters; int iters; } phase1_param; typedef struct { /* log barrier parameters*/ double t_init; double t_max; double mu; /* stop criterions */ double eps; int max_iters; int iters; } phase2_param; typedef struct { /* optimization variable */ vector_t *x; /* cost function */ matrix_t *P; vector_t *q; /* equality constraint */ matrix_t *A_eq; vector_t *b_eq; /* inequality constraints */ vector_t *lb; //lower bound inequality vector_t *ub; //upper bound inequality matrix_t *A; //affine inequality matrix vector_t *b; //affine inequality vector /* parameters of phase1 (feasibility) solver */ phase1_param phase1; /* parameters of phase2 (quadratic programming) solver */ phase2_param phase2; } qp_t; void qp_set_default(qp_t *qp); void qp_config_phase1(qp_t *qp, phase1_param *phase1_config); void qp_config_phase2(qp_t *qp, phase2_param *phase2_config); bool qp_start_point_feasibility_check(qp_t *qp); void qp_solve_set_optimization_variable(qp_t *qp, vector_t *x); void qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q); void qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b); void qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub); void qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb); void qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b); int qp_solve_start(qp_t *qp); #endif
30.19
86
(translation_unit) "#ifndef __QPSOLVER_H__\n#define __QPSOLVER_H__\n\n#include <stdbool.h>\n#include "matrix.h"\n\n#if VERBOSE_MESSAGE == 0\n#define VERBOSE_PRINT(...)\n#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n#if DEBUG_MESSAGE == 0\n#define DEBUG_PRINT_MATRIX(...)\n#define DEBUG_PRINT_VAR(...)\n#define DEBUG_PRINT(...)\n#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n/* return state of qp solver */\n#define QP_SUCCESS_SOLVED 0\n#define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1\n#define QP_ERROR_NO_OBJECTIVE_FUNCTION 2\n#define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3\n#define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4\n\n/* return state of phase1 (feasibility) solver */\n#define QP_PHASE1_FEASIBLE 0\n#define QP_PHASE1_INFEASIBLE 1\n\ntypedef struct {\n /* slack variable parameters for feasibility problem */\n double s_margin;\n double beta;\n\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* gradient descent */\n double step_size; //not used, replaced with backtracking line search\n\n /* backtracking line search parameters*/\n double backtracking_alpha;\n double backtracking_beta;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n} phase1_param;\n\ntypedef struct {\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n} phase2_param;\n\ntypedef struct {\n /* optimization variable */\n vector_t *x;\n\n /* cost function */\n matrix_t *P;\n vector_t *q;\n\n /* equality constraint */\n matrix_t *A_eq;\n vector_t *b_eq;\n\n /* inequality constraints */\n vector_t *lb; //lower bound inequality\n vector_t *ub; //upper bound inequality\n matrix_t *A; //affine inequality matrix\n vector_t *b; //affine inequality vector\n\n /* parameters of phase1 (feasibility) solver */\n phase1_param phase1;\n\n /* parameters of phase2 (quadratic programming) solver */\n phase2_param phase2;\n} qp_t;\n\nvoid qp_set_default(qp_t *qp);\nvoid qp_config_phase1(qp_t *qp, phase1_param *phase1_config);\nvoid qp_config_phase2(qp_t *qp, phase2_param *phase2_config);\nbool qp_start_point_feasibility_check(qp_t *qp);\nvoid qp_solve_set_optimization_variable(qp_t *qp, vector_t *x);\nvoid qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q);\nvoid qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nvoid qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub);\nvoid qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb);\nvoid qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nint qp_solve_start(qp_t *qp);\n\n#endif\n" (preproc_ifdef) "#ifndef __QPSOLVER_H__\n#define __QPSOLVER_H__\n\n#include <stdbool.h>\n#include "matrix.h"\n\n#if VERBOSE_MESSAGE == 0\n#define VERBOSE_PRINT(...)\n#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n#if DEBUG_MESSAGE == 0\n#define DEBUG_PRINT_MATRIX(...)\n#define DEBUG_PRINT_VAR(...)\n#define DEBUG_PRINT(...)\n#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n/* return state of qp solver */\n#define QP_SUCCESS_SOLVED 0\n#define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1\n#define QP_ERROR_NO_OBJECTIVE_FUNCTION 2\n#define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3\n#define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4\n\n/* return state of phase1 (feasibility) solver */\n#define QP_PHASE1_FEASIBLE 0\n#define QP_PHASE1_INFEASIBLE 1\n\ntypedef struct {\n /* slack variable parameters for feasibility problem */\n double s_margin;\n double beta;\n\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* gradient descent */\n double step_size; //not used, replaced with backtracking line search\n\n /* backtracking line search parameters*/\n double backtracking_alpha;\n double backtracking_beta;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n} phase1_param;\n\ntypedef struct {\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n} phase2_param;\n\ntypedef struct {\n /* optimization variable */\n vector_t *x;\n\n /* cost function */\n matrix_t *P;\n vector_t *q;\n\n /* equality constraint */\n matrix_t *A_eq;\n vector_t *b_eq;\n\n /* inequality constraints */\n vector_t *lb; //lower bound inequality\n vector_t *ub; //upper bound inequality\n matrix_t *A; //affine inequality matrix\n vector_t *b; //affine inequality vector\n\n /* parameters of phase1 (feasibility) solver */\n phase1_param phase1;\n\n /* parameters of phase2 (quadratic programming) solver */\n phase2_param phase2;\n} qp_t;\n\nvoid qp_set_default(qp_t *qp);\nvoid qp_config_phase1(qp_t *qp, phase1_param *phase1_config);\nvoid qp_config_phase2(qp_t *qp, phase2_param *phase2_config);\nbool qp_start_point_feasibility_check(qp_t *qp);\nvoid qp_solve_set_optimization_variable(qp_t *qp, vector_t *x);\nvoid qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q);\nvoid qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nvoid qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub);\nvoid qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb);\nvoid qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nint qp_solve_start(qp_t *qp);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__QPSOLVER_H__" (preproc_def) "#define __QPSOLVER_H__\n" (#define) "#define" (identifier) "__QPSOLVER_H__" (preproc_include) "#include <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_include) "#include "matrix.h"\n" (#include) "#include" (string_literal) ""matrix.h"" (") """ (string_content) "matrix.h" (") """ (preproc_if) "#if VERBOSE_MESSAGE == 0\n#define VERBOSE_PRINT(...)\n#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n#endif" (#if) "#if" (binary_expression) "VERBOSE_MESSAGE == 0" (identifier) "VERBOSE_MESSAGE" (==) "==" (number_literal) "0" ( ) "\n" (preproc_function_def) "#define VERBOSE_PRINT(...)\n" (#define) "#define" (identifier) "VERBOSE_PRINT" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (preproc_else) "#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n" (#else) "#else" (preproc_function_def) "#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n" (#define) "#define" (identifier) "VERBOSE_PRINT" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (preproc_arg) "printf(__VA_ARGS__)" (#endif) "#endif" (preproc_if) "#if DEBUG_MESSAGE == 0\n#define DEBUG_PRINT_MATRIX(...)\n#define DEBUG_PRINT_VAR(...)\n#define DEBUG_PRINT(...)\n#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n#endif" (#if) "#if" (binary_expression) "DEBUG_MESSAGE == 0" (identifier) "DEBUG_MESSAGE" (==) "==" (number_literal) "0" ( ) "\n" (preproc_function_def) "#define DEBUG_PRINT_MATRIX(...)\n" (#define) "#define" (identifier) "DEBUG_PRINT_MATRIX" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (preproc_function_def) "#define DEBUG_PRINT_VAR(...)\n" (#define) "#define" (identifier) "DEBUG_PRINT_VAR" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (preproc_function_def) "#define DEBUG_PRINT(...)\n" (#define) "#define" (identifier) "DEBUG_PRINT" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (preproc_else) "#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n" (#else) "#else" (preproc_def) "#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n" (#define) "#define" (identifier) "DEBUG_PRINT_MATRIX" (preproc_arg) "PRINT_MATRIX" (preproc_def) "#define DEBUG_PRINT_VAR PRINT_VAR\n" (#define) "#define" (identifier) "DEBUG_PRINT_VAR" (preproc_arg) "PRINT_VAR" (preproc_function_def) "#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n" (#define) "#define" (identifier) "DEBUG_PRINT" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (preproc_arg) "printf(__VA_ARGS__)" (#endif) "#endif" (comment) "/* return state of qp solver */" (preproc_def) "#define QP_SUCCESS_SOLVED 0\n" (#define) "#define" (identifier) "QP_SUCCESS_SOLVED" (preproc_arg) "0" (preproc_def) "#define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1\n" (#define) "#define" (identifier) "QP_ERROR_NO_OPTIMIZATION_VARIABLE" (preproc_arg) "1" (preproc_def) "#define QP_ERROR_NO_OBJECTIVE_FUNCTION 2\n" (#define) "#define" (identifier) "QP_ERROR_NO_OBJECTIVE_FUNCTION" (preproc_arg) "2" (preproc_def) "#define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3\n" (#define) "#define" (identifier) "QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT" (preproc_arg) "3" (preproc_def) "#define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4\n" (#define) "#define" (identifier) "QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT" (preproc_arg) "4" (comment) "/* return state of phase1 (feasibility) solver */" (preproc_def) "#define QP_PHASE1_FEASIBLE 0\n" (#define) "#define" (identifier) "QP_PHASE1_FEASIBLE" (preproc_arg) "0" (preproc_def) "#define QP_PHASE1_INFEASIBLE 1\n" (#define) "#define" (identifier) "QP_PHASE1_INFEASIBLE" (preproc_arg) "1" (type_definition) "typedef struct {\n /* slack variable parameters for feasibility problem */\n double s_margin;\n double beta;\n\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* gradient descent */\n double step_size; //not used, replaced with backtracking line search\n\n /* backtracking line search parameters*/\n double backtracking_alpha;\n double backtracking_beta;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n} phase1_param;" (typedef) "typedef" (struct_specifier) "struct {\n /* slack variable parameters for feasibility problem */\n double s_margin;\n double beta;\n\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* gradient descent */\n double step_size; //not used, replaced with backtracking line search\n\n /* backtracking line search parameters*/\n double backtracking_alpha;\n double backtracking_beta;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n}" (struct) "struct" (field_declaration_list) "{\n /* slack variable parameters for feasibility problem */\n double s_margin;\n double beta;\n\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* gradient descent */\n double step_size; //not used, replaced with backtracking line search\n\n /* backtracking line search parameters*/\n double backtracking_alpha;\n double backtracking_beta;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n}" ({) "{" (comment) "/* slack variable parameters for feasibility problem */" (field_declaration) "double s_margin;" (primitive_type) "double" (field_identifier) "s_margin" (;) ";" (field_declaration) "double beta;" (primitive_type) "double" (field_identifier) "beta" (;) ";" (comment) "/* log barrier parameters*/" (field_declaration) "double t_init;" (primitive_type) "double" (field_identifier) "t_init" (;) ";" (field_declaration) "double t_max;" (primitive_type) "double" (field_identifier) "t_max" (;) ";" (field_declaration) "double mu;" (primitive_type) "double" (field_identifier) "mu" (;) ";" (comment) "/* gradient descent */" (field_declaration) "double step_size;" (primitive_type) "double" (field_identifier) "step_size" (;) ";" (comment) "//not used, replaced with backtracking line search" (comment) "/* backtracking line search parameters*/" (field_declaration) "double backtracking_alpha;" (primitive_type) "double" (field_identifier) "backtracking_alpha" (;) ";" (field_declaration) "double backtracking_beta;" (primitive_type) "double" (field_identifier) "backtracking_beta" (;) ";" (comment) "/* stop criterions */" (field_declaration) "double eps;" (primitive_type) "double" (field_identifier) "eps" (;) ";" (field_declaration) "int max_iters;" (primitive_type) "int" (field_identifier) "max_iters" (;) ";" (field_declaration) "int iters;" (primitive_type) "int" (field_identifier) "iters" (;) ";" (}) "}" (type_identifier) "phase1_param" (;) ";" (type_definition) "typedef struct {\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n} phase2_param;" (typedef) "typedef" (struct_specifier) "struct {\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n}" (struct) "struct" (field_declaration_list) "{\n /* log barrier parameters*/\n double t_init;\n double t_max;\n double mu;\n\n /* stop criterions */\n double eps;\n int max_iters;\n int iters;\n}" ({) "{" (comment) "/* log barrier parameters*/" (field_declaration) "double t_init;" (primitive_type) "double" (field_identifier) "t_init" (;) ";" (field_declaration) "double t_max;" (primitive_type) "double" (field_identifier) "t_max" (;) ";" (field_declaration) "double mu;" (primitive_type) "double" (field_identifier) "mu" (;) ";" (comment) "/* stop criterions */" (field_declaration) "double eps;" (primitive_type) "double" (field_identifier) "eps" (;) ";" (field_declaration) "int max_iters;" (primitive_type) "int" (field_identifier) "max_iters" (;) ";" (field_declaration) "int iters;" (primitive_type) "int" (field_identifier) "iters" (;) ";" (}) "}" (type_identifier) "phase2_param" (;) ";" (type_definition) "typedef struct {\n /* optimization variable */\n vector_t *x;\n\n /* cost function */\n matrix_t *P;\n vector_t *q;\n\n /* equality constraint */\n matrix_t *A_eq;\n vector_t *b_eq;\n\n /* inequality constraints */\n vector_t *lb; //lower bound inequality\n vector_t *ub; //upper bound inequality\n matrix_t *A; //affine inequality matrix\n vector_t *b; //affine inequality vector\n\n /* parameters of phase1 (feasibility) solver */\n phase1_param phase1;\n\n /* parameters of phase2 (quadratic programming) solver */\n phase2_param phase2;\n} qp_t;" (typedef) "typedef" (struct_specifier) "struct {\n /* optimization variable */\n vector_t *x;\n\n /* cost function */\n matrix_t *P;\n vector_t *q;\n\n /* equality constraint */\n matrix_t *A_eq;\n vector_t *b_eq;\n\n /* inequality constraints */\n vector_t *lb; //lower bound inequality\n vector_t *ub; //upper bound inequality\n matrix_t *A; //affine inequality matrix\n vector_t *b; //affine inequality vector\n\n /* parameters of phase1 (feasibility) solver */\n phase1_param phase1;\n\n /* parameters of phase2 (quadratic programming) solver */\n phase2_param phase2;\n}" (struct) "struct" (field_declaration_list) "{\n /* optimization variable */\n vector_t *x;\n\n /* cost function */\n matrix_t *P;\n vector_t *q;\n\n /* equality constraint */\n matrix_t *A_eq;\n vector_t *b_eq;\n\n /* inequality constraints */\n vector_t *lb; //lower bound inequality\n vector_t *ub; //upper bound inequality\n matrix_t *A; //affine inequality matrix\n vector_t *b; //affine inequality vector\n\n /* parameters of phase1 (feasibility) solver */\n phase1_param phase1;\n\n /* parameters of phase2 (quadratic programming) solver */\n phase2_param phase2;\n}" ({) "{" (comment) "/* optimization variable */" (field_declaration) "vector_t *x;" (type_identifier) "vector_t" (pointer_declarator) "*x" (*) "*" (field_identifier) "x" (;) ";" (comment) "/* cost function */" (field_declaration) "matrix_t *P;" (type_identifier) "matrix_t" (pointer_declarator) "*P" (*) "*" (field_identifier) "P" (;) ";" (field_declaration) "vector_t *q;" (type_identifier) "vector_t" (pointer_declarator) "*q" (*) "*" (field_identifier) "q" (;) ";" (comment) "/* equality constraint */" (field_declaration) "matrix_t *A_eq;" (type_identifier) "matrix_t" (pointer_declarator) "*A_eq" (*) "*" (field_identifier) "A_eq" (;) ";" (field_declaration) "vector_t *b_eq;" (type_identifier) "vector_t" (pointer_declarator) "*b_eq" (*) "*" (field_identifier) "b_eq" (;) ";" (comment) "/* inequality constraints */" (field_declaration) "vector_t *lb;" (type_identifier) "vector_t" (pointer_declarator) "*lb" (*) "*" (field_identifier) "lb" (;) ";" (comment) "//lower bound inequality" (field_declaration) "vector_t *ub;" (type_identifier) "vector_t" (pointer_declarator) "*ub" (*) "*" (field_identifier) "ub" (;) ";" (comment) "//upper bound inequality" (field_declaration) "matrix_t *A;" (type_identifier) "matrix_t" (pointer_declarator) "*A" (*) "*" (field_identifier) "A" (;) ";" (comment) "//affine inequality matrix" (field_declaration) "vector_t *b;" (type_identifier) "vector_t" (pointer_declarator) "*b" (*) "*" (field_identifier) "b" (;) ";" (comment) "//affine inequality vector" (comment) "/* parameters of phase1 (feasibility) solver */" (field_declaration) "phase1_param phase1;" (type_identifier) "phase1_param" (field_identifier) "phase1" (;) ";" (comment) "/* parameters of phase2 (quadratic programming) solver */" (field_declaration) "phase2_param phase2;" (type_identifier) "phase2_param" (field_identifier) "phase2" (;) ";" (}) "}" (type_identifier) "qp_t" (;) ";" (declaration) "void qp_set_default(qp_t *qp);" (primitive_type) "void" (function_declarator) "qp_set_default(qp_t *qp)" (identifier) "qp_set_default" (parameter_list) "(qp_t *qp)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" ()) ")" (;) ";" (declaration) "void qp_config_phase1(qp_t *qp, phase1_param *phase1_config);" (primitive_type) "void" (function_declarator) "qp_config_phase1(qp_t *qp, phase1_param *phase1_config)" (identifier) "qp_config_phase1" (parameter_list) "(qp_t *qp, phase1_param *phase1_config)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "phase1_param *phase1_config" (type_identifier) "phase1_param" (pointer_declarator) "*phase1_config" (*) "*" (identifier) "phase1_config" ()) ")" (;) ";" (declaration) "void qp_config_phase2(qp_t *qp, phase2_param *phase2_config);" (primitive_type) "void" (function_declarator) "qp_config_phase2(qp_t *qp, phase2_param *phase2_config)" (identifier) "qp_config_phase2" (parameter_list) "(qp_t *qp, phase2_param *phase2_config)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "phase2_param *phase2_config" (type_identifier) "phase2_param" (pointer_declarator) "*phase2_config" (*) "*" (identifier) "phase2_config" ()) ")" (;) ";" (declaration) "bool qp_start_point_feasibility_check(qp_t *qp);" (primitive_type) "bool" (function_declarator) "qp_start_point_feasibility_check(qp_t *qp)" (identifier) "qp_start_point_feasibility_check" (parameter_list) "(qp_t *qp)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" ()) ")" (;) ";" (declaration) "void qp_solve_set_optimization_variable(qp_t *qp, vector_t *x);" (primitive_type) "void" (function_declarator) "qp_solve_set_optimization_variable(qp_t *qp, vector_t *x)" (identifier) "qp_solve_set_optimization_variable" (parameter_list) "(qp_t *qp, vector_t *x)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "vector_t *x" (type_identifier) "vector_t" (pointer_declarator) "*x" (*) "*" (identifier) "x" ()) ")" (;) ";" (declaration) "void qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q);" (primitive_type) "void" (function_declarator) "qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q)" (identifier) "qp_solve_set_cost_function" (parameter_list) "(qp_t *qp, matrix_t *P, vector_t *q)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "matrix_t *P" (type_identifier) "matrix_t" (pointer_declarator) "*P" (*) "*" (identifier) "P" (,) "," (parameter_declaration) "vector_t *q" (type_identifier) "vector_t" (pointer_declarator) "*q" (*) "*" (identifier) "q" ()) ")" (;) ";" (declaration) "void qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b);" (primitive_type) "void" (function_declarator) "qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b)" (identifier) "qp_solve_set_equality_constraints" (parameter_list) "(qp_t *qp, matrix_t *A, vector_t *b)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "matrix_t *A" (type_identifier) "matrix_t" (pointer_declarator) "*A" (*) "*" (identifier) "A" (,) "," (parameter_declaration) "vector_t *b" (type_identifier) "vector_t" (pointer_declarator) "*b" (*) "*" (identifier) "b" ()) ")" (;) ";" (declaration) "void qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub);" (primitive_type) "void" (function_declarator) "qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub)" (identifier) "qp_solve_set_upper_bound_inequality_constraints" (parameter_list) "(qp_t *qp, vector_t *ub)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "vector_t *ub" (type_identifier) "vector_t" (pointer_declarator) "*ub" (*) "*" (identifier) "ub" ()) ")" (;) ";" (declaration) "void qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb);" (primitive_type) "void" (function_declarator) "qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb)" (identifier) "qp_solve_set_lower_bound_inequality_constraints" (parameter_list) "(qp_t *qp, vector_t *lb)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "vector_t *lb" (type_identifier) "vector_t" (pointer_declarator) "*lb" (*) "*" (identifier) "lb" ()) ")" (;) ";" (declaration) "void qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b);" (primitive_type) "void" (function_declarator) "qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b)" (identifier) "qp_solve_set_affine_inequality_constraints" (parameter_list) "(qp_t *qp, matrix_t *A, vector_t *b)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" (,) "," (parameter_declaration) "matrix_t *A" (type_identifier) "matrix_t" (pointer_declarator) "*A" (*) "*" (identifier) "A" (,) "," (parameter_declaration) "vector_t *b" (type_identifier) "vector_t" (pointer_declarator) "*b" (*) "*" (identifier) "b" ()) ")" (;) ";" (declaration) "int qp_solve_start(qp_t *qp);" (primitive_type) "int" (function_declarator) "qp_solve_start(qp_t *qp)" (identifier) "qp_solve_start" (parameter_list) "(qp_t *qp)" (() "(" (parameter_declaration) "qp_t *qp" (type_identifier) "qp_t" (pointer_declarator) "*qp" (*) "*" (identifier) "qp" ()) ")" (;) ";" (#endif) "#endif"
503
0
{"language": "c", "success": true, "metadata": {"lines": 86, "avg_line_length": 30.19, "nodes": 377, "errors": 0, "source_hash": "c3874adfd0dcd9e3c8655ebac67181cec7784f6342f723160e5f2dd71a18abfb", "categorized_nodes": 222}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __QPSOLVER_H__\n#define __QPSOLVER_H__\n\n#include <stdbool.h>\n#include \"matrix.h\"\n\n#if VERBOSE_MESSAGE == 0\n#define VERBOSE_PRINT(...)\n#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n#if DEBUG_MESSAGE == 0\n#define DEBUG_PRINT_MATRIX(...)\n#define DEBUG_PRINT_VAR(...)\n#define DEBUG_PRINT(...)\n#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n/* return state of qp solver */\n#define QP_SUCCESS_SOLVED 0\n#define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1\n#define QP_ERROR_NO_OBJECTIVE_FUNCTION 2\n#define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3\n#define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4\n\n/* return state of phase1 (feasibility) solver */\n#define QP_PHASE1_FEASIBLE 0\n#define QP_PHASE1_INFEASIBLE 1\n\ntypedef struct {\n\t/* slack variable parameters for feasibility problem */\n\tdouble s_margin;\n\tdouble beta;\n\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* gradient descent */\n\tdouble step_size; //not used, replaced with backtracking line search\n\n\t/* backtracking line search parameters*/\n\tdouble backtracking_alpha;\n\tdouble backtracking_beta;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n} phase1_param;\n\ntypedef struct {\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n} phase2_param;\n\ntypedef struct {\n\t/* optimization variable */\n\tvector_t *x;\n\n\t/* cost function */\n\tmatrix_t *P;\n\tvector_t *q;\n\n\t/* equality constraint */\n\tmatrix_t *A_eq;\n\tvector_t *b_eq;\n\n\t/* inequality constraints */\n\tvector_t *lb; //lower bound inequality\n\tvector_t *ub; //upper bound inequality\n\tmatrix_t *A; //affine inequality matrix\n\tvector_t *b; //affine inequality vector\n\n\t/* parameters of phase1 (feasibility) solver */\n\tphase1_param phase1;\n\n\t/* parameters of phase2 (quadratic programming) solver */\n\tphase2_param phase2;\n} qp_t;\n\nvoid qp_set_default(qp_t *qp);\nvoid qp_config_phase1(qp_t *qp, phase1_param *phase1_config);\nvoid qp_config_phase2(qp_t *qp, phase2_param *phase2_config);\nbool qp_start_point_feasibility_check(qp_t *qp);\nvoid qp_solve_set_optimization_variable(qp_t *qp, vector_t *x);\nvoid qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q);\nvoid qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nvoid qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub);\nvoid qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb);\nvoid qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nint qp_solve_start(qp_t *qp);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 31, 66, 70, 74, 78, 82, 86, 90, 94, 132, 155, 211, 221, 236, 251, 261, 276, 296, 316, 331, 346, 366, 376], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 105, "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": "__QPSOLVER_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define __QPSOLVER_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": "__QPSOLVER_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <stdbool.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": "<stdbool.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include \"matrix.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": "string_literal", "text": "\"matrix.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 12, "type": "preproc_if", "text": "#if VERBOSE_MESSAGE == 0\n#define VERBOSE_PRINT(...)\n#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n#endif", "parent": 0, "children": [13, 14, 18, 19, 23, 30], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 13, "type": "#if", "text": "#if", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 3}}, {"id": 14, "type": "binary_expression", "text": "VERBOSE_MESSAGE == 0", "parent": 12, "children": [15, 16, 17], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 24}}, {"id": 15, "type": "identifier", "text": "VERBOSE_MESSAGE", "parent": 14, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 19}}, {"id": 16, "type": "==", "text": "==", "parent": 14, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 22}}, {"id": 17, "type": "number_literal", "text": "0", "parent": 14, "children": [], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 24}}, {"id": 18, "type": "\n", "text": "\n", "parent": 12, "children": [], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 7, "column": 0}}, {"id": 19, "type": "preproc_function_def", "text": "#define VERBOSE_PRINT(...)\n", "parent": 12, "children": [20, 21, 22], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 20, "type": "#define", "text": "#define", "parent": 19, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 21, "type": "identifier", "text": "VERBOSE_PRINT", "parent": 19, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 21}}, {"id": 22, "type": "preproc_params", "text": "(...)", "parent": 19, "children": [], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 26}}, {"id": 23, "type": "preproc_else", "text": "#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n", "parent": 12, "children": [24, 25], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 24, "type": "#else", "text": "#else", "parent": 23, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 5}}, {"id": 25, "type": "preproc_function_def", "text": "#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n", "parent": 23, "children": [26, 27, 28, 29], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 27, "type": "identifier", "text": "VERBOSE_PRINT", "parent": 25, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 21}}, {"id": 28, "type": "preproc_params", "text": "(...)", "parent": 25, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 26}}, {"id": 29, "type": "preproc_arg", "text": "printf(__VA_ARGS__)", "parent": 25, "children": [], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 46}}, {"id": 30, "type": "#endif", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 31, "type": "preproc_if", "text": "#if DEBUG_MESSAGE == 0\n#define DEBUG_PRINT_MATRIX(...)\n#define DEBUG_PRINT_VAR(...)\n#define DEBUG_PRINT(...)\n#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n#endif", "parent": 0, "children": [32, 33, 37, 38, 42, 46, 50, 65], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 32, "type": "#if", "text": "#if", "parent": 31, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 33, "type": "binary_expression", "text": "DEBUG_MESSAGE == 0", "parent": 31, "children": [34, 35, 36], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 22}}, {"id": 34, "type": "identifier", "text": "DEBUG_MESSAGE", "parent": 33, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 17}}, {"id": 35, "type": "==", "text": "==", "parent": 33, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 20}}, {"id": 36, "type": "number_literal", "text": "0", "parent": 33, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 22}}, {"id": 37, "type": "\n", "text": "\n", "parent": 31, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 13, "column": 0}}, {"id": 38, "type": "preproc_function_def", "text": "#define DEBUG_PRINT_MATRIX(...)\n", "parent": 31, "children": [39, 40, 41], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 39, "type": "#define", "text": "#define", "parent": 38, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 40, "type": "identifier", "text": "DEBUG_PRINT_MATRIX", "parent": 38, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 26}}, {"id": 41, "type": "preproc_params", "text": "(...)", "parent": 38, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 31}}, {"id": 42, "type": "preproc_function_def", "text": "#define DEBUG_PRINT_VAR(...)\n", "parent": 31, "children": [43, 44, 45], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 43, "type": "#define", "text": "#define", "parent": 42, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 44, "type": "identifier", "text": "DEBUG_PRINT_VAR", "parent": 42, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 23}}, {"id": 45, "type": "preproc_params", "text": "(...)", "parent": 42, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 28}}, {"id": 46, "type": "preproc_function_def", "text": "#define DEBUG_PRINT(...)\n", "parent": 31, "children": [47, 48, 49], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 47, "type": "#define", "text": "#define", "parent": 46, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 48, "type": "identifier", "text": "DEBUG_PRINT", "parent": 46, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 19}}, {"id": 49, "type": "preproc_params", "text": "(...)", "parent": 46, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 24}}, {"id": 50, "type": "preproc_else", "text": "#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n", "parent": 31, "children": [51, 52, 56, 60], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 51, "type": "#else", "text": "#else", "parent": 50, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 5}}, {"id": 52, "type": "preproc_def", "text": "#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n", "parent": 50, "children": [53, 54, 55], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 53, "type": "#define", "text": "#define", "parent": 52, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 54, "type": "identifier", "text": "DEBUG_PRINT_MATRIX", "parent": 52, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 26}}, {"id": 55, "type": "preproc_arg", "text": "PRINT_MATRIX", "parent": 52, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 39}}, {"id": 56, "type": "preproc_def", "text": "#define DEBUG_PRINT_VAR PRINT_VAR\n", "parent": 50, "children": [57, 58, 59], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 58, "type": "identifier", "text": "DEBUG_PRINT_VAR", "parent": 56, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 23}}, {"id": 59, "type": "preproc_arg", "text": "PRINT_VAR", "parent": 56, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 33}}, {"id": 60, "type": "preproc_function_def", "text": "#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n", "parent": 50, "children": [61, 62, 63, 64], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 61, "type": "#define", "text": "#define", "parent": 60, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 62, "type": "identifier", "text": "DEBUG_PRINT", "parent": 60, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 19}}, {"id": 63, "type": "preproc_params", "text": "(...)", "parent": 60, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 24}}, {"id": 64, "type": "preproc_arg", "text": "printf(__VA_ARGS__)", "parent": 60, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 44}}, {"id": 65, "type": "#endif", "text": "#endif", "parent": 31, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 66, "type": "preproc_def", "text": "#define QP_SUCCESS_SOLVED 0\n", "parent": 0, "children": [67, 68, 69], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 67, "type": "#define", "text": "#define", "parent": 66, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 68, "type": "identifier", "text": "QP_SUCCESS_SOLVED", "parent": 66, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 25}}, {"id": 69, "type": "preproc_arg", "text": "0", "parent": 66, "children": [], "start_point": {"row": 23, "column": 51}, "end_point": {"row": 23, "column": 52}}, {"id": 70, "type": "preproc_def", "text": "#define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1\n", "parent": 0, "children": [71, 72, 73], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 71, "type": "#define", "text": "#define", "parent": 70, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 72, "type": "identifier", "text": "QP_ERROR_NO_OPTIMIZATION_VARIABLE", "parent": 70, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 41}}, {"id": 73, "type": "preproc_arg", "text": "1", "parent": 70, "children": [], "start_point": {"row": 24, "column": 51}, "end_point": {"row": 24, "column": 52}}, {"id": 74, "type": "preproc_def", "text": "#define QP_ERROR_NO_OBJECTIVE_FUNCTION 2\n", "parent": 0, "children": [75, 76, 77], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 75, "type": "#define", "text": "#define", "parent": 74, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 76, "type": "identifier", "text": "QP_ERROR_NO_OBJECTIVE_FUNCTION", "parent": 74, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 38}}, {"id": 77, "type": "preproc_arg", "text": "2", "parent": 74, "children": [], "start_point": {"row": 25, "column": 51}, "end_point": {"row": 25, "column": 52}}, {"id": 78, "type": "preproc_def", "text": "#define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3\n", "parent": 0, "children": [79, 80, 81], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 79, "type": "#define", "text": "#define", "parent": 78, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 80, "type": "identifier", "text": "QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT", "parent": 78, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 48}}, {"id": 81, "type": "preproc_arg", "text": "3", "parent": 78, "children": [], "start_point": {"row": 26, "column": 51}, "end_point": {"row": 26, "column": 52}}, {"id": 82, "type": "preproc_def", "text": "#define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4\n", "parent": 0, "children": [83, 84, 85], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 83, "type": "#define", "text": "#define", "parent": 82, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 84, "type": "identifier", "text": "QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT", "parent": 82, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 50}}, {"id": 85, "type": "preproc_arg", "text": "4", "parent": 82, "children": [], "start_point": {"row": 27, "column": 51}, "end_point": {"row": 27, "column": 52}}, {"id": 86, "type": "preproc_def", "text": "#define QP_PHASE1_FEASIBLE 0\n", "parent": 0, "children": [87, 88, 89], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 87, "type": "#define", "text": "#define", "parent": 86, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 88, "type": "identifier", "text": "QP_PHASE1_FEASIBLE", "parent": 86, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 26}}, {"id": 89, "type": "preproc_arg", "text": "0", "parent": 86, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 30}}, {"id": 90, "type": "preproc_def", "text": "#define QP_PHASE1_INFEASIBLE 1\n", "parent": 0, "children": [91, 92, 93], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 91, "type": "#define", "text": "#define", "parent": 90, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 92, "type": "identifier", "text": "QP_PHASE1_INFEASIBLE", "parent": 90, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 28}}, {"id": 93, "type": "preproc_arg", "text": "1", "parent": 90, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 30}}, {"id": 94, "type": "type_definition", "text": "typedef struct {\n\t/* slack variable parameters for feasibility problem */\n\tdouble s_margin;\n\tdouble beta;\n\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* gradient descent */\n\tdouble step_size; //not used, replaced with backtracking line search\n\n\t/* backtracking line search parameters*/\n\tdouble backtracking_alpha;\n\tdouble backtracking_beta;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n} phase1_param;", "parent": 0, "children": [95, 96, 131], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 54, "column": 15}}, {"id": 95, "type": "typedef", "text": "typedef", "parent": 94, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 96, "type": "struct_specifier", "text": "struct {\n\t/* slack variable parameters for feasibility problem */\n\tdouble s_margin;\n\tdouble beta;\n\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* gradient descent */\n\tdouble step_size; //not used, replaced with backtracking line search\n\n\t/* backtracking line search parameters*/\n\tdouble backtracking_alpha;\n\tdouble backtracking_beta;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n}", "parent": 94, "children": [97], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 54, "column": 1}}, {"id": 97, "type": "struct", "text": "struct", "parent": 96, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 14}}, {"id": 98, "type": "field_declaration", "text": "double s_margin;", "parent": 96, "children": [99, 100], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 17}}, {"id": 99, "type": "primitive_type", "text": "double", "parent": 98, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 100, "type": "field_identifier", "text": "s_margin", "parent": 98, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 16}}, {"id": 101, "type": "field_declaration", "text": "double beta;", "parent": 96, "children": [102, 103], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 13}}, {"id": 102, "type": "primitive_type", "text": "double", "parent": 101, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 7}}, {"id": 103, "type": "field_identifier", "text": "beta", "parent": 101, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 12}}, {"id": 104, "type": "field_declaration", "text": "double t_init;", "parent": 96, "children": [105, 106], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 15}}, {"id": 105, "type": "primitive_type", "text": "double", "parent": 104, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 7}}, {"id": 106, "type": "field_identifier", "text": "t_init", "parent": 104, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 107, "type": "field_declaration", "text": "double t_max;", "parent": 96, "children": [108, 109], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 14}}, {"id": 108, "type": "primitive_type", "text": "double", "parent": 107, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 7}}, {"id": 109, "type": "field_identifier", "text": "t_max", "parent": 107, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 13}}, {"id": 110, "type": "field_declaration", "text": "double mu;", "parent": 96, "children": [111, 112], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 11}}, {"id": 111, "type": "primitive_type", "text": "double", "parent": 110, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 7}}, {"id": 112, "type": "field_identifier", "text": "mu", "parent": 110, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 10}}, {"id": 113, "type": "field_declaration", "text": "double step_size;", "parent": 96, "children": [114, 115], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 18}}, {"id": 114, "type": "primitive_type", "text": "double", "parent": 113, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 7}}, {"id": 115, "type": "field_identifier", "text": "step_size", "parent": 113, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 17}}, {"id": 116, "type": "field_declaration", "text": "double backtracking_alpha;", "parent": 96, "children": [117, 118], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 27}}, {"id": 117, "type": "primitive_type", "text": "double", "parent": 116, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 7}}, {"id": 118, "type": "field_identifier", "text": "backtracking_alpha", "parent": 116, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 26}}, {"id": 119, "type": "field_declaration", "text": "double backtracking_beta;", "parent": 96, "children": [120, 121], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 26}}, {"id": 120, "type": "primitive_type", "text": "double", "parent": 119, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 7}}, {"id": 121, "type": "field_identifier", "text": "backtracking_beta", "parent": 119, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 25}}, {"id": 122, "type": "field_declaration", "text": "double eps;", "parent": 96, "children": [123, 124], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 12}}, {"id": 123, "type": "primitive_type", "text": "double", "parent": 122, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 7}}, {"id": 124, "type": "field_identifier", "text": "eps", "parent": 122, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 11}}, {"id": 125, "type": "field_declaration", "text": "int max_iters;", "parent": 96, "children": [126, 127], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 15}}, {"id": 126, "type": "primitive_type", "text": "int", "parent": 125, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 4}}, {"id": 127, "type": "field_identifier", "text": "max_iters", "parent": 125, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 14}}, {"id": 128, "type": "field_declaration", "text": "int iters;", "parent": 96, "children": [129, 130], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 11}}, {"id": 129, "type": "primitive_type", "text": "int", "parent": 128, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 4}}, {"id": 130, "type": "field_identifier", "text": "iters", "parent": 128, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 10}}, {"id": 131, "type": "type_identifier", "text": "phase1_param", "parent": 94, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 14}}, {"id": 132, "type": "type_definition", "text": "typedef struct {\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n} phase2_param;", "parent": 0, "children": [133, 134, 154], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 66, "column": 15}}, {"id": 133, "type": "typedef", "text": "typedef", "parent": 132, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 134, "type": "struct_specifier", "text": "struct {\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n}", "parent": 132, "children": [135], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 66, "column": 1}}, {"id": 135, "type": "struct", "text": "struct", "parent": 134, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 14}}, {"id": 136, "type": "field_declaration", "text": "double t_init;", "parent": 134, "children": [137, 138], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 15}}, {"id": 137, "type": "primitive_type", "text": "double", "parent": 136, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 7}}, {"id": 138, "type": "field_identifier", "text": "t_init", "parent": 136, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 14}}, {"id": 139, "type": "field_declaration", "text": "double t_max;", "parent": 134, "children": [140, 141], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 14}}, {"id": 140, "type": "primitive_type", "text": "double", "parent": 139, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 7}}, {"id": 141, "type": "field_identifier", "text": "t_max", "parent": 139, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 13}}, {"id": 142, "type": "field_declaration", "text": "double mu;", "parent": 134, "children": [143, 144], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 11}}, {"id": 143, "type": "primitive_type", "text": "double", "parent": 142, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 7}}, {"id": 144, "type": "field_identifier", "text": "mu", "parent": 142, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 10}}, {"id": 145, "type": "field_declaration", "text": "double eps;", "parent": 134, "children": [146, 147], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 12}}, {"id": 146, "type": "primitive_type", "text": "double", "parent": 145, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 7}}, {"id": 147, "type": "field_identifier", "text": "eps", "parent": 145, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 11}}, {"id": 148, "type": "field_declaration", "text": "int max_iters;", "parent": 134, "children": [149, 150], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 15}}, {"id": 149, "type": "primitive_type", "text": "int", "parent": 148, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 4}}, {"id": 150, "type": "field_identifier", "text": "max_iters", "parent": 148, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 14}}, {"id": 151, "type": "field_declaration", "text": "int iters;", "parent": 134, "children": [152, 153], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 11}}, {"id": 152, "type": "primitive_type", "text": "int", "parent": 151, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 4}}, {"id": 153, "type": "field_identifier", "text": "iters", "parent": 151, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 10}}, {"id": 154, "type": "type_identifier", "text": "phase2_param", "parent": 132, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 14}}, {"id": 155, "type": "type_definition", "text": "typedef struct {\n\t/* optimization variable */\n\tvector_t *x;\n\n\t/* cost function */\n\tmatrix_t *P;\n\tvector_t *q;\n\n\t/* equality constraint */\n\tmatrix_t *A_eq;\n\tvector_t *b_eq;\n\n\t/* inequality constraints */\n\tvector_t *lb; //lower bound inequality\n\tvector_t *ub; //upper bound inequality\n\tmatrix_t *A; //affine inequality matrix\n\tvector_t *b; //affine inequality vector\n\n\t/* parameters of phase1 (feasibility) solver */\n\tphase1_param phase1;\n\n\t/* parameters of phase2 (quadratic programming) solver */\n\tphase2_param phase2;\n} qp_t;", "parent": 0, "children": [156, 157, 210], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 91, "column": 7}}, {"id": 156, "type": "typedef", "text": "typedef", "parent": 155, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 7}}, {"id": 157, "type": "struct_specifier", "text": "struct {\n\t/* optimization variable */\n\tvector_t *x;\n\n\t/* cost function */\n\tmatrix_t *P;\n\tvector_t *q;\n\n\t/* equality constraint */\n\tmatrix_t *A_eq;\n\tvector_t *b_eq;\n\n\t/* inequality constraints */\n\tvector_t *lb; //lower bound inequality\n\tvector_t *ub; //upper bound inequality\n\tmatrix_t *A; //affine inequality matrix\n\tvector_t *b; //affine inequality vector\n\n\t/* parameters of phase1 (feasibility) solver */\n\tphase1_param phase1;\n\n\t/* parameters of phase2 (quadratic programming) solver */\n\tphase2_param phase2;\n}", "parent": 155, "children": [158], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 91, "column": 1}}, {"id": 158, "type": "struct", "text": "struct", "parent": 157, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 14}}, {"id": 159, "type": "field_declaration", "text": "vector_t *x;", "parent": 157, "children": [160, 161], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 13}}, {"id": 160, "type": "type_identifier", "text": "vector_t", "parent": 159, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 9}}, {"id": 161, "type": "pointer_declarator", "text": "*x", "parent": 159, "children": [162, 163], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 12}}, {"id": 162, "type": "*", "text": "*", "parent": 161, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 11}}, {"id": 163, "type": "field_identifier", "text": "x", "parent": 161, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 12}}, {"id": 164, "type": "field_declaration", "text": "matrix_t *P;", "parent": 157, "children": [165, 166], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 13}}, {"id": 165, "type": "type_identifier", "text": "matrix_t", "parent": 164, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 9}}, {"id": 166, "type": "pointer_declarator", "text": "*P", "parent": 164, "children": [167, 168], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 12}}, {"id": 167, "type": "*", "text": "*", "parent": 166, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 11}}, {"id": 168, "type": "field_identifier", "text": "P", "parent": 166, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 12}}, {"id": 169, "type": "field_declaration", "text": "vector_t *q;", "parent": 157, "children": [170, 171], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 13}}, {"id": 170, "type": "type_identifier", "text": "vector_t", "parent": 169, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 9}}, {"id": 171, "type": "pointer_declarator", "text": "*q", "parent": 169, "children": [172, 173], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 12}}, {"id": 172, "type": "*", "text": "*", "parent": 171, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 11}}, {"id": 173, "type": "field_identifier", "text": "q", "parent": 171, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 12}}, {"id": 174, "type": "field_declaration", "text": "matrix_t *A_eq;", "parent": 157, "children": [175, 176], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 16}}, {"id": 175, "type": "type_identifier", "text": "matrix_t", "parent": 174, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 9}}, {"id": 176, "type": "pointer_declarator", "text": "*A_eq", "parent": 174, "children": [177, 178], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 15}}, {"id": 177, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 11}}, {"id": 178, "type": "field_identifier", "text": "A_eq", "parent": 176, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 15}}, {"id": 179, "type": "field_declaration", "text": "vector_t *b_eq;", "parent": 157, "children": [180, 181], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 16}}, {"id": 180, "type": "type_identifier", "text": "vector_t", "parent": 179, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 9}}, {"id": 181, "type": "pointer_declarator", "text": "*b_eq", "parent": 179, "children": [182, 183], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 15}}, {"id": 182, "type": "*", "text": "*", "parent": 181, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 11}}, {"id": 183, "type": "field_identifier", "text": "b_eq", "parent": 181, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 15}}, {"id": 184, "type": "field_declaration", "text": "vector_t *lb;", "parent": 157, "children": [185, 186], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 14}}, {"id": 185, "type": "type_identifier", "text": "vector_t", "parent": 184, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 9}}, {"id": 186, "type": "pointer_declarator", "text": "*lb", "parent": 184, "children": [187, 188], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 13}}, {"id": 187, "type": "*", "text": "*", "parent": 186, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 11}}, {"id": 188, "type": "field_identifier", "text": "lb", "parent": 186, "children": [], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 13}}, {"id": 189, "type": "field_declaration", "text": "vector_t *ub;", "parent": 157, "children": [190, 191], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 14}}, {"id": 190, "type": "type_identifier", "text": "vector_t", "parent": 189, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 9}}, {"id": 191, "type": "pointer_declarator", "text": "*ub", "parent": 189, "children": [192, 193], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 13}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 11}}, {"id": 193, "type": "field_identifier", "text": "ub", "parent": 191, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 13}}, {"id": 194, "type": "field_declaration", "text": "matrix_t *A;", "parent": 157, "children": [195, 196], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 13}}, {"id": 195, "type": "type_identifier", "text": "matrix_t", "parent": 194, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 9}}, {"id": 196, "type": "pointer_declarator", "text": "*A", "parent": 194, "children": [197, 198], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 12}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 11}}, {"id": 198, "type": "field_identifier", "text": "A", "parent": 196, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 12}}, {"id": 199, "type": "field_declaration", "text": "vector_t *b;", "parent": 157, "children": [200, 201], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 13}}, {"id": 200, "type": "type_identifier", "text": "vector_t", "parent": 199, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 9}}, {"id": 201, "type": "pointer_declarator", "text": "*b", "parent": 199, "children": [202, 203], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 12}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 11}}, {"id": 203, "type": "field_identifier", "text": "b", "parent": 201, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 12}}, {"id": 204, "type": "field_declaration", "text": "phase1_param phase1;", "parent": 157, "children": [205, 206], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 21}}, {"id": 205, "type": "type_identifier", "text": "phase1_param", "parent": 204, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 13}}, {"id": 206, "type": "field_identifier", "text": "phase1", "parent": 204, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 20}}, {"id": 207, "type": "field_declaration", "text": "phase2_param phase2;", "parent": 157, "children": [208, 209], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 21}}, {"id": 208, "type": "type_identifier", "text": "phase2_param", "parent": 207, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 13}}, {"id": 209, "type": "field_identifier", "text": "phase2", "parent": 207, "children": [], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 20}}, {"id": 210, "type": "type_identifier", "text": "qp_t", "parent": 155, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 6}}, {"id": 211, "type": "declaration", "text": "void qp_set_default(qp_t *qp);", "parent": 0, "children": [212, 213], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 30}}, {"id": 212, "type": "primitive_type", "text": "void", "parent": 211, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 4}}, {"id": 213, "type": "function_declarator", "text": "qp_set_default(qp_t *qp)", "parent": 211, "children": [214, 215], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 29}}, {"id": 214, "type": "identifier", "text": "qp_set_default", "parent": 213, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 19}}, {"id": 215, "type": "parameter_list", "text": "(qp_t *qp)", "parent": 213, "children": [216], "start_point": {"row": 93, "column": 19}, "end_point": {"row": 93, "column": 29}}, {"id": 216, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 215, "children": [217, 218], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 28}}, {"id": 217, "type": "type_identifier", "text": "qp_t", "parent": 216, "children": [], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 24}}, {"id": 218, "type": "pointer_declarator", "text": "*qp", "parent": 216, "children": [219, 220], "start_point": {"row": 93, "column": 25}, "end_point": {"row": 93, "column": 28}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 93, "column": 25}, "end_point": {"row": 93, "column": 26}}, {"id": 220, "type": "identifier", "text": "qp", "parent": 218, "children": [], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 28}}, {"id": 221, "type": "declaration", "text": "void qp_config_phase1(qp_t *qp, phase1_param *phase1_config);", "parent": 0, "children": [222, 223], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 61}}, {"id": 222, "type": "primitive_type", "text": "void", "parent": 221, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 4}}, {"id": 223, "type": "function_declarator", "text": "qp_config_phase1(qp_t *qp, phase1_param *phase1_config)", "parent": 221, "children": [224, 225], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 60}}, {"id": 224, "type": "identifier", "text": "qp_config_phase1", "parent": 223, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 21}}, {"id": 225, "type": "parameter_list", "text": "(qp_t *qp, phase1_param *phase1_config)", "parent": 223, "children": [226, 231], "start_point": {"row": 94, "column": 21}, "end_point": {"row": 94, "column": 60}}, {"id": 226, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 225, "children": [227, 228], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 30}}, {"id": 227, "type": "type_identifier", "text": "qp_t", "parent": 226, "children": [], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 26}}, {"id": 228, "type": "pointer_declarator", "text": "*qp", "parent": 226, "children": [229, 230], "start_point": {"row": 94, "column": 27}, "end_point": {"row": 94, "column": 30}}, {"id": 229, "type": "*", "text": "*", "parent": 228, "children": [], "start_point": {"row": 94, "column": 27}, "end_point": {"row": 94, "column": 28}}, {"id": 230, "type": "identifier", "text": "qp", "parent": 228, "children": [], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 30}}, {"id": 231, "type": "parameter_declaration", "text": "phase1_param *phase1_config", "parent": 225, "children": [232, 233], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 59}}, {"id": 232, "type": "type_identifier", "text": "phase1_param", "parent": 231, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 44}}, {"id": 233, "type": "pointer_declarator", "text": "*phase1_config", "parent": 231, "children": [234, 235], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 59}}, {"id": 234, "type": "*", "text": "*", "parent": 233, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 46}}, {"id": 235, "type": "identifier", "text": "phase1_config", "parent": 233, "children": [], "start_point": {"row": 94, "column": 46}, "end_point": {"row": 94, "column": 59}}, {"id": 236, "type": "declaration", "text": "void qp_config_phase2(qp_t *qp, phase2_param *phase2_config);", "parent": 0, "children": [237, 238], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 61}}, {"id": 237, "type": "primitive_type", "text": "void", "parent": 236, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 4}}, {"id": 238, "type": "function_declarator", "text": "qp_config_phase2(qp_t *qp, phase2_param *phase2_config)", "parent": 236, "children": [239, 240], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 60}}, {"id": 239, "type": "identifier", "text": "qp_config_phase2", "parent": 238, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 21}}, {"id": 240, "type": "parameter_list", "text": "(qp_t *qp, phase2_param *phase2_config)", "parent": 238, "children": [241, 246], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 60}}, {"id": 241, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 240, "children": [242, 243], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 30}}, {"id": 242, "type": "type_identifier", "text": "qp_t", "parent": 241, "children": [], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 26}}, {"id": 243, "type": "pointer_declarator", "text": "*qp", "parent": 241, "children": [244, 245], "start_point": {"row": 95, "column": 27}, "end_point": {"row": 95, "column": 30}}, {"id": 244, "type": "*", "text": "*", "parent": 243, "children": [], "start_point": {"row": 95, "column": 27}, "end_point": {"row": 95, "column": 28}}, {"id": 245, "type": "identifier", "text": "qp", "parent": 243, "children": [], "start_point": {"row": 95, "column": 28}, "end_point": {"row": 95, "column": 30}}, {"id": 246, "type": "parameter_declaration", "text": "phase2_param *phase2_config", "parent": 240, "children": [247, 248], "start_point": {"row": 95, "column": 32}, "end_point": {"row": 95, "column": 59}}, {"id": 247, "type": "type_identifier", "text": "phase2_param", "parent": 246, "children": [], "start_point": {"row": 95, "column": 32}, "end_point": {"row": 95, "column": 44}}, {"id": 248, "type": "pointer_declarator", "text": "*phase2_config", "parent": 246, "children": [249, 250], "start_point": {"row": 95, "column": 45}, "end_point": {"row": 95, "column": 59}}, {"id": 249, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 95, "column": 45}, "end_point": {"row": 95, "column": 46}}, {"id": 250, "type": "identifier", "text": "phase2_config", "parent": 248, "children": [], "start_point": {"row": 95, "column": 46}, "end_point": {"row": 95, "column": 59}}, {"id": 251, "type": "declaration", "text": "bool qp_start_point_feasibility_check(qp_t *qp);", "parent": 0, "children": [252, 253], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 48}}, {"id": 252, "type": "primitive_type", "text": "bool", "parent": 251, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 4}}, {"id": 253, "type": "function_declarator", "text": "qp_start_point_feasibility_check(qp_t *qp)", "parent": 251, "children": [254, 255], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 47}}, {"id": 254, "type": "identifier", "text": "qp_start_point_feasibility_check", "parent": 253, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 37}}, {"id": 255, "type": "parameter_list", "text": "(qp_t *qp)", "parent": 253, "children": [256], "start_point": {"row": 96, "column": 37}, "end_point": {"row": 96, "column": 47}}, {"id": 256, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 255, "children": [257, 258], "start_point": {"row": 96, "column": 38}, "end_point": {"row": 96, "column": 46}}, {"id": 257, "type": "type_identifier", "text": "qp_t", "parent": 256, "children": [], "start_point": {"row": 96, "column": 38}, "end_point": {"row": 96, "column": 42}}, {"id": 258, "type": "pointer_declarator", "text": "*qp", "parent": 256, "children": [259, 260], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 46}}, {"id": 259, "type": "*", "text": "*", "parent": 258, "children": [], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 44}}, {"id": 260, "type": "identifier", "text": "qp", "parent": 258, "children": [], "start_point": {"row": 96, "column": 44}, "end_point": {"row": 96, "column": 46}}, {"id": 261, "type": "declaration", "text": "void qp_solve_set_optimization_variable(qp_t *qp, vector_t *x);", "parent": 0, "children": [262, 263], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 63}}, {"id": 262, "type": "primitive_type", "text": "void", "parent": 261, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 4}}, {"id": 263, "type": "function_declarator", "text": "qp_solve_set_optimization_variable(qp_t *qp, vector_t *x)", "parent": 261, "children": [264, 265], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 62}}, {"id": 264, "type": "identifier", "text": "qp_solve_set_optimization_variable", "parent": 263, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 39}}, {"id": 265, "type": "parameter_list", "text": "(qp_t *qp, vector_t *x)", "parent": 263, "children": [266, 271], "start_point": {"row": 97, "column": 39}, "end_point": {"row": 97, "column": 62}}, {"id": 266, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 265, "children": [267, 268], "start_point": {"row": 97, "column": 40}, "end_point": {"row": 97, "column": 48}}, {"id": 267, "type": "type_identifier", "text": "qp_t", "parent": 266, "children": [], "start_point": {"row": 97, "column": 40}, "end_point": {"row": 97, "column": 44}}, {"id": 268, "type": "pointer_declarator", "text": "*qp", "parent": 266, "children": [269, 270], "start_point": {"row": 97, "column": 45}, "end_point": {"row": 97, "column": 48}}, {"id": 269, "type": "*", "text": "*", "parent": 268, "children": [], "start_point": {"row": 97, "column": 45}, "end_point": {"row": 97, "column": 46}}, {"id": 270, "type": "identifier", "text": "qp", "parent": 268, "children": [], "start_point": {"row": 97, "column": 46}, "end_point": {"row": 97, "column": 48}}, {"id": 271, "type": "parameter_declaration", "text": "vector_t *x", "parent": 265, "children": [272, 273], "start_point": {"row": 97, "column": 50}, "end_point": {"row": 97, "column": 61}}, {"id": 272, "type": "type_identifier", "text": "vector_t", "parent": 271, "children": [], "start_point": {"row": 97, "column": 50}, "end_point": {"row": 97, "column": 58}}, {"id": 273, "type": "pointer_declarator", "text": "*x", "parent": 271, "children": [274, 275], "start_point": {"row": 97, "column": 59}, "end_point": {"row": 97, "column": 61}}, {"id": 274, "type": "*", "text": "*", "parent": 273, "children": [], "start_point": {"row": 97, "column": 59}, "end_point": {"row": 97, "column": 60}}, {"id": 275, "type": "identifier", "text": "x", "parent": 273, "children": [], "start_point": {"row": 97, "column": 60}, "end_point": {"row": 97, "column": 61}}, {"id": 276, "type": "declaration", "text": "void qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q);", "parent": 0, "children": [277, 278], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 68}}, {"id": 277, "type": "primitive_type", "text": "void", "parent": 276, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 4}}, {"id": 278, "type": "function_declarator", "text": "qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q)", "parent": 276, "children": [279, 280], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 67}}, {"id": 279, "type": "identifier", "text": "qp_solve_set_cost_function", "parent": 278, "children": [], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 31}}, {"id": 280, "type": "parameter_list", "text": "(qp_t *qp, matrix_t *P, vector_t *q)", "parent": 278, "children": [281, 286, 291], "start_point": {"row": 98, "column": 31}, "end_point": {"row": 98, "column": 67}}, {"id": 281, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 280, "children": [282, 283], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 40}}, {"id": 282, "type": "type_identifier", "text": "qp_t", "parent": 281, "children": [], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 36}}, {"id": 283, "type": "pointer_declarator", "text": "*qp", "parent": 281, "children": [284, 285], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 40}}, {"id": 284, "type": "*", "text": "*", "parent": 283, "children": [], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 38}}, {"id": 285, "type": "identifier", "text": "qp", "parent": 283, "children": [], "start_point": {"row": 98, "column": 38}, "end_point": {"row": 98, "column": 40}}, {"id": 286, "type": "parameter_declaration", "text": "matrix_t *P", "parent": 280, "children": [287, 288], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 53}}, {"id": 287, "type": "type_identifier", "text": "matrix_t", "parent": 286, "children": [], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 50}}, {"id": 288, "type": "pointer_declarator", "text": "*P", "parent": 286, "children": [289, 290], "start_point": {"row": 98, "column": 51}, "end_point": {"row": 98, "column": 53}}, {"id": 289, "type": "*", "text": "*", "parent": 288, "children": [], "start_point": {"row": 98, "column": 51}, "end_point": {"row": 98, "column": 52}}, {"id": 290, "type": "identifier", "text": "P", "parent": 288, "children": [], "start_point": {"row": 98, "column": 52}, "end_point": {"row": 98, "column": 53}}, {"id": 291, "type": "parameter_declaration", "text": "vector_t *q", "parent": 280, "children": [292, 293], "start_point": {"row": 98, "column": 55}, "end_point": {"row": 98, "column": 66}}, {"id": 292, "type": "type_identifier", "text": "vector_t", "parent": 291, "children": [], "start_point": {"row": 98, "column": 55}, "end_point": {"row": 98, "column": 63}}, {"id": 293, "type": "pointer_declarator", "text": "*q", "parent": 291, "children": [294, 295], "start_point": {"row": 98, "column": 64}, "end_point": {"row": 98, "column": 66}}, {"id": 294, "type": "*", "text": "*", "parent": 293, "children": [], "start_point": {"row": 98, "column": 64}, "end_point": {"row": 98, "column": 65}}, {"id": 295, "type": "identifier", "text": "q", "parent": 293, "children": [], "start_point": {"row": 98, "column": 65}, "end_point": {"row": 98, "column": 66}}, {"id": 296, "type": "declaration", "text": "void qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b);", "parent": 0, "children": [297, 298], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 75}}, {"id": 297, "type": "primitive_type", "text": "void", "parent": 296, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 4}}, {"id": 298, "type": "function_declarator", "text": "qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b)", "parent": 296, "children": [299, 300], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 74}}, {"id": 299, "type": "identifier", "text": "qp_solve_set_equality_constraints", "parent": 298, "children": [], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 38}}, {"id": 300, "type": "parameter_list", "text": "(qp_t *qp, matrix_t *A, vector_t *b)", "parent": 298, "children": [301, 306, 311], "start_point": {"row": 99, "column": 38}, "end_point": {"row": 99, "column": 74}}, {"id": 301, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 300, "children": [302, 303], "start_point": {"row": 99, "column": 39}, "end_point": {"row": 99, "column": 47}}, {"id": 302, "type": "type_identifier", "text": "qp_t", "parent": 301, "children": [], "start_point": {"row": 99, "column": 39}, "end_point": {"row": 99, "column": 43}}, {"id": 303, "type": "pointer_declarator", "text": "*qp", "parent": 301, "children": [304, 305], "start_point": {"row": 99, "column": 44}, "end_point": {"row": 99, "column": 47}}, {"id": 304, "type": "*", "text": "*", "parent": 303, "children": [], "start_point": {"row": 99, "column": 44}, "end_point": {"row": 99, "column": 45}}, {"id": 305, "type": "identifier", "text": "qp", "parent": 303, "children": [], "start_point": {"row": 99, "column": 45}, "end_point": {"row": 99, "column": 47}}, {"id": 306, "type": "parameter_declaration", "text": "matrix_t *A", "parent": 300, "children": [307, 308], "start_point": {"row": 99, "column": 49}, "end_point": {"row": 99, "column": 60}}, {"id": 307, "type": "type_identifier", "text": "matrix_t", "parent": 306, "children": [], "start_point": {"row": 99, "column": 49}, "end_point": {"row": 99, "column": 57}}, {"id": 308, "type": "pointer_declarator", "text": "*A", "parent": 306, "children": [309, 310], "start_point": {"row": 99, "column": 58}, "end_point": {"row": 99, "column": 60}}, {"id": 309, "type": "*", "text": "*", "parent": 308, "children": [], "start_point": {"row": 99, "column": 58}, "end_point": {"row": 99, "column": 59}}, {"id": 310, "type": "identifier", "text": "A", "parent": 308, "children": [], "start_point": {"row": 99, "column": 59}, "end_point": {"row": 99, "column": 60}}, {"id": 311, "type": "parameter_declaration", "text": "vector_t *b", "parent": 300, "children": [312, 313], "start_point": {"row": 99, "column": 62}, "end_point": {"row": 99, "column": 73}}, {"id": 312, "type": "type_identifier", "text": "vector_t", "parent": 311, "children": [], "start_point": {"row": 99, "column": 62}, "end_point": {"row": 99, "column": 70}}, {"id": 313, "type": "pointer_declarator", "text": "*b", "parent": 311, "children": [314, 315], "start_point": {"row": 99, "column": 71}, "end_point": {"row": 99, "column": 73}}, {"id": 314, "type": "*", "text": "*", "parent": 313, "children": [], "start_point": {"row": 99, "column": 71}, "end_point": {"row": 99, "column": 72}}, {"id": 315, "type": "identifier", "text": "b", "parent": 313, "children": [], "start_point": {"row": 99, "column": 72}, "end_point": {"row": 99, "column": 73}}, {"id": 316, "type": "declaration", "text": "void qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub);", "parent": 0, "children": [317, 318], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 77}}, {"id": 317, "type": "primitive_type", "text": "void", "parent": 316, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 4}}, {"id": 318, "type": "function_declarator", "text": "qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub)", "parent": 316, "children": [319, 320], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 76}}, {"id": 319, "type": "identifier", "text": "qp_solve_set_upper_bound_inequality_constraints", "parent": 318, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 52}}, {"id": 320, "type": "parameter_list", "text": "(qp_t *qp, vector_t *ub)", "parent": 318, "children": [321, 326], "start_point": {"row": 100, "column": 52}, "end_point": {"row": 100, "column": 76}}, {"id": 321, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 320, "children": [322, 323], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 61}}, {"id": 322, "type": "type_identifier", "text": "qp_t", "parent": 321, "children": [], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 57}}, {"id": 323, "type": "pointer_declarator", "text": "*qp", "parent": 321, "children": [324, 325], "start_point": {"row": 100, "column": 58}, "end_point": {"row": 100, "column": 61}}, {"id": 324, "type": "*", "text": "*", "parent": 323, "children": [], "start_point": {"row": 100, "column": 58}, "end_point": {"row": 100, "column": 59}}, {"id": 325, "type": "identifier", "text": "qp", "parent": 323, "children": [], "start_point": {"row": 100, "column": 59}, "end_point": {"row": 100, "column": 61}}, {"id": 326, "type": "parameter_declaration", "text": "vector_t *ub", "parent": 320, "children": [327, 328], "start_point": {"row": 100, "column": 63}, "end_point": {"row": 100, "column": 75}}, {"id": 327, "type": "type_identifier", "text": "vector_t", "parent": 326, "children": [], "start_point": {"row": 100, "column": 63}, "end_point": {"row": 100, "column": 71}}, {"id": 328, "type": "pointer_declarator", "text": "*ub", "parent": 326, "children": [329, 330], "start_point": {"row": 100, "column": 72}, "end_point": {"row": 100, "column": 75}}, {"id": 329, "type": "*", "text": "*", "parent": 328, "children": [], "start_point": {"row": 100, "column": 72}, "end_point": {"row": 100, "column": 73}}, {"id": 330, "type": "identifier", "text": "ub", "parent": 328, "children": [], "start_point": {"row": 100, "column": 73}, "end_point": {"row": 100, "column": 75}}, {"id": 331, "type": "declaration", "text": "void qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb);", "parent": 0, "children": [332, 333], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 77}}, {"id": 332, "type": "primitive_type", "text": "void", "parent": 331, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 4}}, {"id": 333, "type": "function_declarator", "text": "qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb)", "parent": 331, "children": [334, 335], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 76}}, {"id": 334, "type": "identifier", "text": "qp_solve_set_lower_bound_inequality_constraints", "parent": 333, "children": [], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 52}}, {"id": 335, "type": "parameter_list", "text": "(qp_t *qp, vector_t *lb)", "parent": 333, "children": [336, 341], "start_point": {"row": 101, "column": 52}, "end_point": {"row": 101, "column": 76}}, {"id": 336, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 335, "children": [337, 338], "start_point": {"row": 101, "column": 53}, "end_point": {"row": 101, "column": 61}}, {"id": 337, "type": "type_identifier", "text": "qp_t", "parent": 336, "children": [], "start_point": {"row": 101, "column": 53}, "end_point": {"row": 101, "column": 57}}, {"id": 338, "type": "pointer_declarator", "text": "*qp", "parent": 336, "children": [339, 340], "start_point": {"row": 101, "column": 58}, "end_point": {"row": 101, "column": 61}}, {"id": 339, "type": "*", "text": "*", "parent": 338, "children": [], "start_point": {"row": 101, "column": 58}, "end_point": {"row": 101, "column": 59}}, {"id": 340, "type": "identifier", "text": "qp", "parent": 338, "children": [], "start_point": {"row": 101, "column": 59}, "end_point": {"row": 101, "column": 61}}, {"id": 341, "type": "parameter_declaration", "text": "vector_t *lb", "parent": 335, "children": [342, 343], "start_point": {"row": 101, "column": 63}, "end_point": {"row": 101, "column": 75}}, {"id": 342, "type": "type_identifier", "text": "vector_t", "parent": 341, "children": [], "start_point": {"row": 101, "column": 63}, "end_point": {"row": 101, "column": 71}}, {"id": 343, "type": "pointer_declarator", "text": "*lb", "parent": 341, "children": [344, 345], "start_point": {"row": 101, "column": 72}, "end_point": {"row": 101, "column": 75}}, {"id": 344, "type": "*", "text": "*", "parent": 343, "children": [], "start_point": {"row": 101, "column": 72}, "end_point": {"row": 101, "column": 73}}, {"id": 345, "type": "identifier", "text": "lb", "parent": 343, "children": [], "start_point": {"row": 101, "column": 73}, "end_point": {"row": 101, "column": 75}}, {"id": 346, "type": "declaration", "text": "void qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b);", "parent": 0, "children": [347, 348], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 84}}, {"id": 347, "type": "primitive_type", "text": "void", "parent": 346, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 4}}, {"id": 348, "type": "function_declarator", "text": "qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b)", "parent": 346, "children": [349, 350], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 83}}, {"id": 349, "type": "identifier", "text": "qp_solve_set_affine_inequality_constraints", "parent": 348, "children": [], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 47}}, {"id": 350, "type": "parameter_list", "text": "(qp_t *qp, matrix_t *A, vector_t *b)", "parent": 348, "children": [351, 356, 361], "start_point": {"row": 102, "column": 47}, "end_point": {"row": 102, "column": 83}}, {"id": 351, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 350, "children": [352, 353], "start_point": {"row": 102, "column": 48}, "end_point": {"row": 102, "column": 56}}, {"id": 352, "type": "type_identifier", "text": "qp_t", "parent": 351, "children": [], "start_point": {"row": 102, "column": 48}, "end_point": {"row": 102, "column": 52}}, {"id": 353, "type": "pointer_declarator", "text": "*qp", "parent": 351, "children": [354, 355], "start_point": {"row": 102, "column": 53}, "end_point": {"row": 102, "column": 56}}, {"id": 354, "type": "*", "text": "*", "parent": 353, "children": [], "start_point": {"row": 102, "column": 53}, "end_point": {"row": 102, "column": 54}}, {"id": 355, "type": "identifier", "text": "qp", "parent": 353, "children": [], "start_point": {"row": 102, "column": 54}, "end_point": {"row": 102, "column": 56}}, {"id": 356, "type": "parameter_declaration", "text": "matrix_t *A", "parent": 350, "children": [357, 358], "start_point": {"row": 102, "column": 58}, "end_point": {"row": 102, "column": 69}}, {"id": 357, "type": "type_identifier", "text": "matrix_t", "parent": 356, "children": [], "start_point": {"row": 102, "column": 58}, "end_point": {"row": 102, "column": 66}}, {"id": 358, "type": "pointer_declarator", "text": "*A", "parent": 356, "children": [359, 360], "start_point": {"row": 102, "column": 67}, "end_point": {"row": 102, "column": 69}}, {"id": 359, "type": "*", "text": "*", "parent": 358, "children": [], "start_point": {"row": 102, "column": 67}, "end_point": {"row": 102, "column": 68}}, {"id": 360, "type": "identifier", "text": "A", "parent": 358, "children": [], "start_point": {"row": 102, "column": 68}, "end_point": {"row": 102, "column": 69}}, {"id": 361, "type": "parameter_declaration", "text": "vector_t *b", "parent": 350, "children": [362, 363], "start_point": {"row": 102, "column": 71}, "end_point": {"row": 102, "column": 82}}, {"id": 362, "type": "type_identifier", "text": "vector_t", "parent": 361, "children": [], "start_point": {"row": 102, "column": 71}, "end_point": {"row": 102, "column": 79}}, {"id": 363, "type": "pointer_declarator", "text": "*b", "parent": 361, "children": [364, 365], "start_point": {"row": 102, "column": 80}, "end_point": {"row": 102, "column": 82}}, {"id": 364, "type": "*", "text": "*", "parent": 363, "children": [], "start_point": {"row": 102, "column": 80}, "end_point": {"row": 102, "column": 81}}, {"id": 365, "type": "identifier", "text": "b", "parent": 363, "children": [], "start_point": {"row": 102, "column": 81}, "end_point": {"row": 102, "column": 82}}, {"id": 366, "type": "declaration", "text": "int qp_solve_start(qp_t *qp);", "parent": 0, "children": [367, 368], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 29}}, {"id": 367, "type": "primitive_type", "text": "int", "parent": 366, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 3}}, {"id": 368, "type": "function_declarator", "text": "qp_solve_start(qp_t *qp)", "parent": 366, "children": [369, 370], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 28}}, {"id": 369, "type": "identifier", "text": "qp_solve_start", "parent": 368, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 18}}, {"id": 370, "type": "parameter_list", "text": "(qp_t *qp)", "parent": 368, "children": [371], "start_point": {"row": 103, "column": 18}, "end_point": {"row": 103, "column": 28}}, {"id": 371, "type": "parameter_declaration", "text": "qp_t *qp", "parent": 370, "children": [372, 373], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 27}}, {"id": 372, "type": "type_identifier", "text": "qp_t", "parent": 371, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 23}}, {"id": 373, "type": "pointer_declarator", "text": "*qp", "parent": 371, "children": [374, 375], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 27}}, {"id": 374, "type": "*", "text": "*", "parent": 373, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 25}}, {"id": 375, "type": "identifier", "text": "qp", "parent": 373, "children": [], "start_point": {"row": 103, "column": 25}, "end_point": {"row": 103, "column": 27}}, {"id": 376, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 6}}]}, "node_categories": {"declarations": {"functions": [19, 25, 38, 42, 46, 60, 213, 223, 238, 253, 263, 278, 298, 318, 333, 348, 368], "variables": [94, 98, 101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 132, 136, 139, 142, 145, 148, 151, 155, 159, 164, 169, 174, 179, 184, 189, 194, 199, 204, 207, 211, 216, 221, 226, 231, 236, 241, 246, 251, 256, 261, 266, 271, 276, 281, 286, 291, 296, 301, 306, 311, 316, 321, 326, 331, 336, 341, 346, 351, 356, 361, 366, 371], "classes": [96, 97, 134, 135, 157, 158], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [14, 33], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 12, 13, 15, 21, 27, 30, 31, 32, 34, 40, 44, 48, 54, 58, 62, 65, 68, 72, 76, 80, 84, 88, 92, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 131, 138, 141, 144, 147, 150, 153, 154, 160, 163, 165, 168, 170, 173, 175, 178, 180, 183, 185, 188, 190, 193, 195, 198, 200, 203, 205, 206, 208, 209, 210, 214, 217, 220, 224, 227, 230, 232, 235, 239, 242, 245, 247, 250, 254, 257, 260, 264, 267, 270, 272, 275, 279, 282, 285, 287, 290, 292, 295, 299, 302, 305, 307, 310, 312, 315, 319, 322, 325, 327, 330, 334, 337, 340, 342, 345, 349, 352, 355, 357, 360, 362, 365, 369, 372, 375, 376], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 17, 36], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "#define VERBOSE_PRINT(...)\n"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "#define DEBUG_PRINT_MATRIX(...)\n"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "#define DEBUG_PRINT_VAR(...)\n"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "#define DEBUG_PRINT(...)\n"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n"}, {"node_id": 213, "universal_type": "function", "name": "unknown", "text_snippet": "qp_set_default(qp_t *qp)"}, {"node_id": 223, "universal_type": "function", "name": "unknown", "text_snippet": "qp_config_phase1(qp_t *qp, phase1_param *phase1_config)"}, {"node_id": 238, "universal_type": "function", "name": "unknown", "text_snippet": "qp_config_phase2(qp_t *qp, phase2_param *phase2_config)"}, {"node_id": 253, "universal_type": "function", "name": "unknown", "text_snippet": "qp_start_point_feasibility_check(qp_t *qp)"}, {"node_id": 263, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_set_optimization_variable(qp_t *qp, vector_t *x)"}, {"node_id": 278, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q)"}, {"node_id": 298, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b)"}, {"node_id": 318, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub)"}, {"node_id": 333, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb)"}, {"node_id": 348, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b)"}, {"node_id": 368, "universal_type": "function", "name": "unknown", "text_snippet": "qp_solve_start(qp_t *qp)"}], "class_declarations": [{"node_id": 96, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\t/* slack variable parameters for feasibility problem */\n\tdouble s_margin;\n\tdouble beta;\n\n\t"}, {"node_id": 97, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 134, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* stop criterion"}, {"node_id": 135, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 157, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\t/* optimization variable */\n\tvector_t *x;\n\n\t/* cost function */\n\tmatrix_t *P;\n\tvector_t *q"}, {"node_id": 158, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <stdbool.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"matrix.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef __QPSOLVER_H__\n#define __QPSOLVER_H__\n\n#include <stdbool.h>\n#include \"matrix.h\"\n\n#if VERBOSE_MESSAGE == 0\n#define VERBOSE_PRINT(...)\n#else\n#define VERBOSE_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n#if DEBUG_MESSAGE == 0\n#define DEBUG_PRINT_MATRIX(...)\n#define DEBUG_PRINT_VAR(...)\n#define DEBUG_PRINT(...)\n#else\n#define DEBUG_PRINT_MATRIX PRINT_MATRIX\n#define DEBUG_PRINT_VAR PRINT_VAR\n#define DEBUG_PRINT(...) printf(__VA_ARGS__)\n#endif\n\n/* return state of qp solver */\n#define QP_SUCCESS_SOLVED 0\n#define QP_ERROR_NO_OPTIMIZATION_VARIABLE 1\n#define QP_ERROR_NO_OBJECTIVE_FUNCTION 2\n#define QP_ERROR_INCOMPLETE_EQUAILITY_CONSTRAINT 3\n#define QP_ERROR_INCOMPLETE_INEQUAILITY_CONSTRAINT 4\n\n/* return state of phase1 (feasibility) solver */\n#define QP_PHASE1_FEASIBLE 0\n#define QP_PHASE1_INFEASIBLE 1\n\ntypedef struct {\n\t/* slack variable parameters for feasibility problem */\n\tdouble s_margin;\n\tdouble beta;\n\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* gradient descent */\n\tdouble step_size; //not used, replaced with backtracking line search\n\n\t/* backtracking line search parameters*/\n\tdouble backtracking_alpha;\n\tdouble backtracking_beta;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n} phase1_param;\n\ntypedef struct {\n\t/* log barrier parameters*/\n\tdouble t_init;\n\tdouble t_max;\n\tdouble mu;\n\n\t/* stop criterions */\n\tdouble eps;\n\tint max_iters;\n\tint iters;\n} phase2_param;\n\ntypedef struct {\n\t/* optimization variable */\n\tvector_t *x;\n\n\t/* cost function */\n\tmatrix_t *P;\n\tvector_t *q;\n\n\t/* equality constraint */\n\tmatrix_t *A_eq;\n\tvector_t *b_eq;\n\n\t/* inequality constraints */\n\tvector_t *lb; //lower bound inequality\n\tvector_t *ub; //upper bound inequality\n\tmatrix_t *A; //affine inequality matrix\n\tvector_t *b; //affine inequality vector\n\n\t/* parameters of phase1 (feasibility) solver */\n\tphase1_param phase1;\n\n\t/* parameters of phase2 (quadratic programming) solver */\n\tphase2_param phase2;\n} qp_t;\n\nvoid qp_set_default(qp_t *qp);\nvoid qp_config_phase1(qp_t *qp, phase1_param *phase1_config);\nvoid qp_config_phase2(qp_t *qp, phase2_param *phase2_config);\nbool qp_start_point_feasibility_check(qp_t *qp);\nvoid qp_solve_set_optimization_variable(qp_t *qp, vector_t *x);\nvoid qp_solve_set_cost_function(qp_t *qp, matrix_t *P, vector_t *q);\nvoid qp_solve_set_equality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nvoid qp_solve_set_upper_bound_inequality_constraints(qp_t *qp, vector_t *ub);\nvoid qp_solve_set_lower_bound_inequality_constraints(qp_t *qp, vector_t *lb);\nvoid qp_solve_set_affine_inequality_constraints(qp_t *qp, matrix_t *A, vector_t *b);\nint qp_solve_start(qp_t *qp);\n\n#endif\n"}
206
c
--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC +++ conversion/minctoecat/machine_indep.c @@ -1,7 +1,11 @@ #include <stdlib.h> #include <string.h> +#include <arpa/inet.h> +#include <unistd.h> /* for swab() */ #include "ecat_write.h" +void swaw( short *from, short *to, int length); + #define OK 0 #define ERROR -1
25.46
13
(translation_unit) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include "ecat_write.h"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR -1\n \n" (ERROR) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include "ecat_write.h"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR -1" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include "ecat_write.h"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR -1" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include "ecat_write.h"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include "ecat_write.h"\n \n+void swaw( short *from, short *to, int length)" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09-24 17:35:36 UTC\n++" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012-09" (binary_expression) "--- conversion/minctoecat/machine_indep.c.orig 2012" (binary_expression) "--- conversion/minctoecat" (update_expression) "--- conversion" (--) "--" (unary_expression) "- conversion" (-) "-" (identifier) "conversion" (/) "/" (identifier) "minctoecat" (/) "/" (ERROR) "machine_indep.c.orig" (field_expression) "machine_indep.c.orig" (field_expression) "machine_indep.c" (identifier) "machine_indep" (.) "." (field_identifier) "c" (.) "." (field_identifier) "orig" (number_literal) "2012" (-) "-" (number_literal) "09" (-) "-" (ERROR) "24 17:35:36" (number_literal) "24" (number_literal) "17" (:) ":" (number_literal) "35" (:) ":" (number_literal) "36" (update_expression) "UTC\n++" (identifier) "UTC" (++) "++" (+) "+" (binary_expression) "conversion/minctoecat/machine_indep.c\n@@ -1,7" (binary_expression) "conversion/minctoecat" (identifier) "conversion" (/) "/" (identifier) "minctoecat" (/) "/" (ERROR) "machine_indep.c\n@@ -1," (field_expression) "machine_indep.c" (identifier) "machine_indep" (.) "." (field_identifier) "c" (ERROR) "@@" (number_literal) "-1" (,) "," (number_literal) "7" (+) "+" (number_literal) "1" (ERROR) ",11 @@\n #include" (,) "," (number_literal) "11" (ERROR) "@@" (#include) "#include" (<) "<" (field_expression) "stdlib.h" (identifier) "stdlib" (.) "." (field_identifier) "h" (>) ">" (ERROR) "#include <" (#include) "#include" (<) "<" (field_expression) "string.h" (identifier) "string" (.) "." (field_identifier) "h" (>) ">" (binary_expression) "+#include <arpa/inet.h" (unary_expression) "+#include <arpa" (+) "+" (ERROR) "#include <" (#include) "#include" (<) "<" (identifier) "arpa" (/) "/" (field_expression) "inet.h" (identifier) "inet" (.) "." (field_identifier) "h" (>) ">" (unary_expression) "+#include <unistd.h" (+) "+" (ERROR) "#include <" (#include) "#include" (<) "<" (field_expression) "unistd.h" (identifier) "unistd" (.) "." (field_identifier) "h" (>) ">" (comment) "/* for swab() */" (ERROR) "#include" (#include) "#include" (binary_expression) ""ecat_write.h"\n \n+void swaw( short *from, short *to, int length)" (string_literal) ""ecat_write.h"" (") """ (string_content) "ecat_write.h" (") """ (+) "+" (ERROR) "void" (identifier) "void" (call_expression) "swaw( short *from, short *to, int length)" (identifier) "swaw" (argument_list) "( short *from, short *to, int length)" (() "(" (binary_expression) "short *from" (identifier) "short" (*) "*" (identifier) "from" (,) "," (binary_expression) "short *to" (identifier) "short" (*) "*" (identifier) "to" (,) "," (ERROR) "int" (identifier) "int" (identifier) "length" ()) ")" (ERROR) ";" (;) ";" (+) "+" (ERROR) "#define OK 0\n #define" (#define) "#define" (identifier) "OK" (number_literal) "0" (#define) "#define" (identifier) "ERROR" (-) "-" (number_literal) "1"
145
15
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 25.46, "nodes": 122, "errors": 0, "source_hash": "6ef612142728b6c49c7a651df26223c6c403fd4eef1886d99ccf3e3b1f0d389d", "categorized_nodes": 78}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include \"ecat_write.h\"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR -1", "parent": null, "children": [1], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 12, "column": 17}}, {"id": 1, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include \"ecat_write.h\"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR -1", "parent": 0, "children": [2, 120, 121], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 12, "column": 17}}, {"id": 2, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include \"ecat_write.h\"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR", "parent": 1, "children": [3, 113, 114, 119], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 12, "column": 14}}, {"id": 3, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include \"ecat_write.h\"\n \n+void swaw( short *from, short *to, int length)", "parent": 2, "children": [4, 92, 93, 95], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 9, "column": 47}}, {"id": 4, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h", "parent": 3, "children": [5, 83, 84], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 6, "column": 19}}, {"id": 5, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h", "parent": 4, "children": [6, 71, 72], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 5, "column": 22}}, {"id": 6, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h", "parent": 5, "children": [7, 64, 65, 68], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 4, "column": 19}}, {"id": 7, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h", "parent": 6, "children": [8, 56, 60, 61], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 3, "column": 19}}, {"id": 8, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1", "parent": 7, "children": [9, 54, 55], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 2, "column": 10}}, {"id": 9, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7", "parent": 8, "children": [10, 40, 41], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 10, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n++", "parent": 9, "children": [11, 31, 32, 37], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 2}}, {"id": 11, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09", "parent": 10, "children": [12, 29, 30], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 54}}, {"id": 12, "type": "binary_expression", "text": "--- conversion/minctoecat/machine_indep.c.orig\t2012", "parent": 11, "children": [13, 21, 22, 28], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 51}}, {"id": 13, "type": "binary_expression", "text": "--- conversion/minctoecat", "parent": 12, "children": [14, 19, 20], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 25}}, {"id": 14, "type": "update_expression", "text": "--- conversion", "parent": 13, "children": [15, 16], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 14}}, {"id": 15, "type": "--", "text": "--", "parent": 14, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 2}}, {"id": 16, "type": "unary_expression", "text": "- conversion", "parent": 14, "children": [17, 18], "start_point": {"row": 0, "column": 2}, "end_point": {"row": 0, "column": 14}}, {"id": 17, "type": "-", "text": "-", "parent": 16, "children": [], "start_point": {"row": 0, "column": 2}, "end_point": {"row": 0, "column": 3}}, {"id": 18, "type": "identifier", "text": "conversion", "parent": 16, "children": [], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 14}}, {"id": 19, "type": "/", "text": "/", "parent": 13, "children": [], "start_point": {"row": 0, "column": 14}, "end_point": {"row": 0, "column": 15}}, {"id": 20, "type": "identifier", "text": "minctoecat", "parent": 13, "children": [], "start_point": {"row": 0, "column": 15}, "end_point": {"row": 0, "column": 25}}, {"id": 21, "type": "/", "text": "/", "parent": 12, "children": [], "start_point": {"row": 0, "column": 25}, "end_point": {"row": 0, "column": 26}}, {"id": 22, "type": "ERROR", "text": "machine_indep.c.orig", "parent": 12, "children": [23], "start_point": {"row": 0, "column": 26}, "end_point": {"row": 0, "column": 46}}, {"id": 23, "type": "field_expression", "text": "machine_indep.c.orig", "parent": 22, "children": [24, 27], "start_point": {"row": 0, "column": 26}, "end_point": {"row": 0, "column": 46}}, {"id": 24, "type": "field_expression", "text": "machine_indep.c", "parent": 23, "children": [25, 26], "start_point": {"row": 0, "column": 26}, "end_point": {"row": 0, "column": 41}}, {"id": 25, "type": "identifier", "text": "machine_indep", "parent": 24, "children": [], "start_point": {"row": 0, "column": 26}, "end_point": {"row": 0, "column": 39}}, {"id": 26, "type": "field_identifier", "text": "c", "parent": 24, "children": [], "start_point": {"row": 0, "column": 40}, "end_point": {"row": 0, "column": 41}}, {"id": 27, "type": "field_identifier", "text": "orig", "parent": 23, "children": [], "start_point": {"row": 0, "column": 42}, "end_point": {"row": 0, "column": 46}}, {"id": 28, "type": "number_literal", "text": "2012", "parent": 12, "children": [], "start_point": {"row": 0, "column": 47}, "end_point": {"row": 0, "column": 51}}, {"id": 29, "type": "-", "text": "-", "parent": 11, "children": [], "start_point": {"row": 0, "column": 51}, "end_point": {"row": 0, "column": 52}}, {"id": 30, "type": "number_literal", "text": "09", "parent": 11, "children": [], "start_point": {"row": 0, "column": 52}, "end_point": {"row": 0, "column": 54}}, {"id": 31, "type": "-", "text": "-", "parent": 10, "children": [], "start_point": {"row": 0, "column": 54}, "end_point": {"row": 0, "column": 55}}, {"id": 32, "type": "ERROR", "text": "24 17:35:36", "parent": 10, "children": [33, 34, 35, 36], "start_point": {"row": 0, "column": 55}, "end_point": {"row": 0, "column": 66}}, {"id": 33, "type": "number_literal", "text": "24", "parent": 32, "children": [], "start_point": {"row": 0, "column": 55}, "end_point": {"row": 0, "column": 57}}, {"id": 34, "type": "number_literal", "text": "17", "parent": 32, "children": [], "start_point": {"row": 0, "column": 58}, "end_point": {"row": 0, "column": 60}}, {"id": 35, "type": "number_literal", "text": "35", "parent": 32, "children": [], "start_point": {"row": 0, "column": 61}, "end_point": {"row": 0, "column": 63}}, {"id": 36, "type": "number_literal", "text": "36", "parent": 32, "children": [], "start_point": {"row": 0, "column": 64}, "end_point": {"row": 0, "column": 66}}, {"id": 37, "type": "update_expression", "text": "UTC\n++", "parent": 10, "children": [38, 39], "start_point": {"row": 0, "column": 67}, "end_point": {"row": 1, "column": 2}}, {"id": 38, "type": "identifier", "text": "UTC", "parent": 37, "children": [], "start_point": {"row": 0, "column": 67}, "end_point": {"row": 0, "column": 70}}, {"id": 39, "type": "++", "text": "++", "parent": 37, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 2}}, {"id": 40, "type": "+", "text": "+", "parent": 9, "children": [], "start_point": {"row": 1, "column": 2}, "end_point": {"row": 1, "column": 3}}, {"id": 41, "type": "binary_expression", "text": "conversion/minctoecat/machine_indep.c\n@@ -1,7", "parent": 9, "children": [42, 46, 47, 53], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 2, "column": 7}}, {"id": 42, "type": "binary_expression", "text": "conversion/minctoecat", "parent": 41, "children": [43, 44, 45], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 25}}, {"id": 43, "type": "identifier", "text": "conversion", "parent": 42, "children": [], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 14}}, {"id": 44, "type": "/", "text": "/", "parent": 42, "children": [], "start_point": {"row": 1, "column": 14}, "end_point": {"row": 1, "column": 15}}, {"id": 45, "type": "identifier", "text": "minctoecat", "parent": 42, "children": [], "start_point": {"row": 1, "column": 15}, "end_point": {"row": 1, "column": 25}}, {"id": 46, "type": "/", "text": "/", "parent": 41, "children": [], "start_point": {"row": 1, "column": 25}, "end_point": {"row": 1, "column": 26}}, {"id": 47, "type": "ERROR", "text": "machine_indep.c\n@@ -1,", "parent": 41, "children": [48, 51, 52], "start_point": {"row": 1, "column": 26}, "end_point": {"row": 2, "column": 6}}, {"id": 48, "type": "field_expression", "text": "machine_indep.c", "parent": 47, "children": [49, 50], "start_point": {"row": 1, "column": 26}, "end_point": {"row": 1, "column": 41}}, {"id": 49, "type": "identifier", "text": "machine_indep", "parent": 48, "children": [], "start_point": {"row": 1, "column": 26}, "end_point": {"row": 1, "column": 39}}, {"id": 50, "type": "field_identifier", "text": "c", "parent": 48, "children": [], "start_point": {"row": 1, "column": 40}, "end_point": {"row": 1, "column": 41}}, {"id": 51, "type": "ERROR", "text": "@@", "parent": 47, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 2}}, {"id": 52, "type": "number_literal", "text": "-1", "parent": 47, "children": [], "start_point": {"row": 2, "column": 3}, "end_point": {"row": 2, "column": 5}}, {"id": 53, "type": "number_literal", "text": "7", "parent": 41, "children": [], "start_point": {"row": 2, "column": 6}, "end_point": {"row": 2, "column": 7}}, {"id": 54, "type": "+", "text": "+", "parent": 8, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 9}}, {"id": 55, "type": "number_literal", "text": "1", "parent": 8, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 10}}, {"id": 56, "type": "ERROR", "text": ",11 @@\n #include", "parent": 7, "children": [57, 58, 59], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 3, "column": 9}}, {"id": 57, "type": "number_literal", "text": "11", "parent": 56, "children": [], "start_point": {"row": 2, "column": 11}, "end_point": {"row": 2, "column": 13}}, {"id": 58, "type": "ERROR", "text": "@@", "parent": 56, "children": [], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 16}}, {"id": 59, "type": "#include", "text": "#include", "parent": 56, "children": [], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 9}}, {"id": 60, "type": "<", "text": "<", "parent": 7, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 11}}, {"id": 61, "type": "field_expression", "text": "stdlib.h", "parent": 7, "children": [62, 63], "start_point": {"row": 3, "column": 11}, "end_point": {"row": 3, "column": 19}}, {"id": 62, "type": "identifier", "text": "stdlib", "parent": 61, "children": [], "start_point": {"row": 3, "column": 11}, "end_point": {"row": 3, "column": 17}}, {"id": 63, "type": "field_identifier", "text": "h", "parent": 61, "children": [], "start_point": {"row": 3, "column": 18}, "end_point": {"row": 3, "column": 19}}, {"id": 64, "type": ">", "text": ">", "parent": 6, "children": [], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 20}}, {"id": 65, "type": "ERROR", "text": "#include <", "parent": 6, "children": [66, 67], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 11}}, {"id": 66, "type": "#include", "text": "#include", "parent": 65, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 9}}, {"id": 67, "type": "<", "text": "<", "parent": 65, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 11}}, {"id": 68, "type": "field_expression", "text": "string.h", "parent": 6, "children": [69, 70], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 19}}, {"id": 69, "type": "identifier", "text": "string", "parent": 68, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 17}}, {"id": 70, "type": "field_identifier", "text": "h", "parent": 68, "children": [], "start_point": {"row": 4, "column": 18}, "end_point": {"row": 4, "column": 19}}, {"id": 71, "type": ">", "text": ">", "parent": 5, "children": [], "start_point": {"row": 4, "column": 19}, "end_point": {"row": 4, "column": 20}}, {"id": 72, "type": "binary_expression", "text": "+#include <arpa/inet.h", "parent": 5, "children": [73, 79, 80], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 22}}, {"id": 73, "type": "unary_expression", "text": "+#include <arpa", "parent": 72, "children": [74, 75, 78], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 15}}, {"id": 74, "type": "+", "text": "+", "parent": 73, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 1}}, {"id": 75, "type": "ERROR", "text": "#include <", "parent": 73, "children": [76, 77], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 11}}, {"id": 76, "type": "#include", "text": "#include", "parent": 75, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 9}}, {"id": 77, "type": "<", "text": "<", "parent": 75, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 11}}, {"id": 78, "type": "identifier", "text": "arpa", "parent": 73, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 15}}, {"id": 79, "type": "/", "text": "/", "parent": 72, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 16}}, {"id": 80, "type": "field_expression", "text": "inet.h", "parent": 72, "children": [81, 82], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 22}}, {"id": 81, "type": "identifier", "text": "inet", "parent": 80, "children": [], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 20}}, {"id": 82, "type": "field_identifier", "text": "h", "parent": 80, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 22}}, {"id": 83, "type": ">", "text": ">", "parent": 4, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 23}}, {"id": 84, "type": "unary_expression", "text": "+#include <unistd.h", "parent": 4, "children": [85, 86, 89], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 19}}, {"id": 85, "type": "+", "text": "+", "parent": 84, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 86, "type": "ERROR", "text": "#include <", "parent": 84, "children": [87, 88], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 11}}, {"id": 87, "type": "#include", "text": "#include", "parent": 86, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 9}}, {"id": 88, "type": "<", "text": "<", "parent": 86, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 11}}, {"id": 89, "type": "field_expression", "text": "unistd.h", "parent": 84, "children": [90, 91], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 19}}, {"id": 90, "type": "identifier", "text": "unistd", "parent": 89, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 17}}, {"id": 91, "type": "field_identifier", "text": "h", "parent": 89, "children": [], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 19}}, {"id": 92, "type": ">", "text": ">", "parent": 3, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 20}}, {"id": 93, "type": "ERROR", "text": "#include", "parent": 3, "children": [94], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 9}}, {"id": 94, "type": "#include", "text": "#include", "parent": 93, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 9}}, {"id": 95, "type": "binary_expression", "text": "\"ecat_write.h\"\n \n+void swaw( short *from, short *to, int length)", "parent": 3, "children": [96, 97, 98, 100], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 9, "column": 47}}, {"id": 96, "type": "string_literal", "text": "\"ecat_write.h\"", "parent": 95, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 24}}, {"id": 97, "type": "+", "text": "+", "parent": 95, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 98, "type": "ERROR", "text": "void", "parent": 95, "children": [99], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 5}}, {"id": 99, "type": "identifier", "text": "void", "parent": 98, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 5}}, {"id": 100, "type": "call_expression", "text": "swaw( short *from, short *to, int length)", "parent": 95, "children": [101, 102], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 47}}, {"id": 101, "type": "identifier", "text": "swaw", "parent": 100, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 10}}, {"id": 102, "type": "argument_list", "text": "( short *from, short *to, int length)", "parent": 100, "children": [103, 106, 110, 112], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 47}}, {"id": 103, "type": "binary_expression", "text": "short *from", "parent": 102, "children": [104, 105], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 23}}, {"id": 104, "type": "identifier", "text": "short", "parent": 103, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 17}}, {"id": 105, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 19}}, {"id": 106, "type": "binary_expression", "text": "short *to", "parent": 102, "children": [107, 108, 109], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 34}}, {"id": 107, "type": "identifier", "text": "short", "parent": 106, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 30}}, {"id": 108, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 32}}, {"id": 109, "type": "identifier", "text": "to", "parent": 106, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 34}}, {"id": 110, "type": "ERROR", "text": "int", "parent": 102, "children": [111], "start_point": {"row": 9, "column": 36}, "end_point": {"row": 9, "column": 39}}, {"id": 111, "type": "identifier", "text": "int", "parent": 110, "children": [], "start_point": {"row": 9, "column": 36}, "end_point": {"row": 9, "column": 39}}, {"id": 112, "type": "identifier", "text": "length", "parent": 102, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 46}}, {"id": 113, "type": "+", "text": "+", "parent": 2, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 114, "type": "ERROR", "text": "#define OK 0\n #define", "parent": 2, "children": [115, 116, 117, 118], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 115, "type": "#define", "text": "#define", "parent": 114, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 8}}, {"id": 116, "type": "identifier", "text": "OK", "parent": 114, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 11}}, {"id": 117, "type": "number_literal", "text": "0", "parent": 114, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 13}}, {"id": 118, "type": "#define", "text": "#define", "parent": 114, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 119, "type": "identifier", "text": "ERROR", "parent": 2, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 14}}, {"id": 120, "type": "-", "text": "-", "parent": 1, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 121, "type": "number_literal", "text": "1", "parent": 1, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 17}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [59, 66, 76, 87, 94], "modules": [], "enums": []}, "statements": {"expressions": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 23, 24, 37, 41, 42, 48, 61, 68, 72, 73, 80, 84, 89, 95, 100, 103, 106], "assignments": [], "loops": [], "conditionals": [18, 20, 25, 26, 27, 38, 43, 45, 49, 50, 62, 63, 69, 70, 78, 81, 82, 90, 91, 99, 101, 104, 107, 109, 111, 112, 116, 119], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [28, 30, 33, 34, 35, 36, 52, 53, 55, 57, 96, 117, 121], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 59, "text": "#include"}, {"node_id": 66, "text": "#include"}, {"node_id": 76, "text": "#include"}, {"node_id": 87, "text": "#include"}, {"node_id": 94, "text": "#include"}]}, "original_source_code": "--- conversion/minctoecat/machine_indep.c.orig\t2012-09-24 17:35:36 UTC\n+++ conversion/minctoecat/machine_indep.c\n@@ -1,7 +1,11 @@\n #include <stdlib.h>\n #include <string.h>\n+#include <arpa/inet.h>\n+#include <unistd.h> /* for swab() */\n #include \"ecat_write.h\"\n \n+void swaw( short *from, short *to, int length);\n+\n #define OK 0\n #define ERROR -1\n \n"}
207
c
#include<stdio.h> int main(){ // int lenght=8, breadth=4; // int area = lenght*breadth; // printf("The area of the rectangle is %d", area); float lenght, breadth; printf("What is the value of the lenght? \n"); scanf("%f", &lenght); printf("What is the value of the breadth? \n"); scanf("%f", &breadth); printf("The area of the rectangle is %f", lenght*breadth); return 0; }
28.93
14
(translation_unit) "#include<stdio.h>\n\nint main(){\n // int lenght=8, breadth=4;\n // int area = lenght*breadth;\n \n // printf("The area of the rectangle is %d", area);\n\n float lenght, breadth;\n printf("What is the value of the lenght? \n");\n scanf("%f", &lenght);\n printf("What is the value of the breadth? \n");\n scanf("%f", &breadth);\n printf("The area of the rectangle is %f", lenght*breadth);\n\n return 0;\n}" (preproc_include) "#include<stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "int main(){\n // int lenght=8, breadth=4;\n // int area = lenght*breadth;\n \n // printf("The area of the rectangle is %d", area);\n\n float lenght, breadth;\n printf("What is the value of the lenght? \n");\n scanf("%f", &lenght);\n printf("What is the value of the breadth? \n");\n scanf("%f", &breadth);\n printf("The area of the rectangle is %f", lenght*breadth);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n // int lenght=8, breadth=4;\n // int area = lenght*breadth;\n \n // printf("The area of the rectangle is %d", area);\n\n float lenght, breadth;\n printf("What is the value of the lenght? \n");\n scanf("%f", &lenght);\n printf("What is the value of the breadth? \n");\n scanf("%f", &breadth);\n printf("The area of the rectangle is %f", lenght*breadth);\n\n return 0;\n}" ({) "{" (comment) "// int lenght=8, breadth=4;" (comment) "// int area = lenght*breadth;" (comment) "// printf("The area of the rectangle is %d", area);" (declaration) "float lenght, breadth;" (primitive_type) "float" (identifier) "lenght" (,) "," (identifier) "breadth" (;) ";" (expression_statement) "printf("What is the value of the lenght? \n");" (call_expression) "printf("What is the value of the lenght? \n")" (identifier) "printf" (argument_list) "("What is the value of the lenght? \n")" (() "(" (string_literal) ""What is the value of the lenght? \n"" (") """ (string_content) "What is the value of the lenght? " (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &lenght);" (call_expression) "scanf("%f", &lenght)" (identifier) "scanf" (argument_list) "("%f", &lenght)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&lenght" (&) "&" (identifier) "lenght" ()) ")" (;) ";" (expression_statement) "printf("What is the value of the breadth? \n");" (call_expression) "printf("What is the value of the breadth? \n")" (identifier) "printf" (argument_list) "("What is the value of the breadth? \n")" (() "(" (string_literal) ""What is the value of the breadth? \n"" (") """ (string_content) "What is the value of the breadth? " (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%f", &breadth);" (call_expression) "scanf("%f", &breadth)" (identifier) "scanf" (argument_list) "("%f", &breadth)" (() "(" (string_literal) ""%f"" (") """ (string_content) "%f" (") """ (,) "," (pointer_expression) "&breadth" (&) "&" (identifier) "breadth" ()) ")" (;) ";" (expression_statement) "printf("The area of the rectangle is %f", lenght*breadth);" (call_expression) "printf("The area of the rectangle is %f", lenght*breadth)" (identifier) "printf" (argument_list) "("The area of the rectangle is %f", lenght*breadth)" (() "(" (string_literal) ""The area of the rectangle is %f"" (") """ (string_content) "The area of the rectangle is %f" (") """ (,) "," (binary_expression) "lenght*breadth" (identifier) "lenght" (*) "*" (identifier) "breadth" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
97
0
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 28.93, "nodes": 44, "errors": 0, "source_hash": "0bce1f8e73dee65c1ccf22f182c99c60e81f5c521c89d589fefd44f6608a47a1", "categorized_nodes": 33}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "int main(){\n // int lenght=8, breadth=4;\n // int area = lenght*breadth;\n \n // printf(\"The area of the rectangle is %d\", area);\n\n float lenght, breadth;\n printf(\"What is the value of the lenght? \\n\");\n scanf(\"%f\", &lenght);\n printf(\"What is the value of the breadth? \\n\");\n scanf(\"%f\", &breadth);\n printf(\"The area of the rectangle is %f\", lenght*breadth);\n\n return 0;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 10}}, {"id": 8, "type": "declaration", "text": "float lenght, breadth;", "parent": 3, "children": [9, 10, 11], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 26}}, {"id": 9, "type": "primitive_type", "text": "float", "parent": 8, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 9}}, {"id": 10, "type": "identifier", "text": "lenght", "parent": 8, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 16}}, {"id": 11, "type": "identifier", "text": "breadth", "parent": 8, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 25}}, {"id": 12, "type": "call_expression", "text": "printf(\"What is the value of the lenght? \\n\")", "parent": 3, "children": [13, 14], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 49}}, {"id": 13, "type": "identifier", "text": "printf", "parent": 12, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 10}}, {"id": 14, "type": "argument_list", "text": "(\"What is the value of the lenght? \\n\")", "parent": 12, "children": [15], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 49}}, {"id": 15, "type": "string_literal", "text": "\"What is the value of the lenght? \\n\"", "parent": 14, "children": [16], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 48}}, {"id": 16, "type": "escape_sequence", "text": "\\n", "parent": 15, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 47}}, {"id": 17, "type": "call_expression", "text": "scanf(\"%f\", &lenght)", "parent": 3, "children": [18, 19], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 24}}, {"id": 18, "type": "identifier", "text": "scanf", "parent": 17, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 9}}, {"id": 19, "type": "argument_list", "text": "(\"%f\", &lenght)", "parent": 17, "children": [20, 21], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 24}}, {"id": 20, "type": "string_literal", "text": "\"%f\"", "parent": 19, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 14}}, {"id": 21, "type": "pointer_expression", "text": "&lenght", "parent": 19, "children": [22], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 23}}, {"id": 22, "type": "identifier", "text": "lenght", "parent": 21, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 23}}, {"id": 23, "type": "call_expression", "text": "printf(\"What is the value of the breadth? \\n\")", "parent": 3, "children": [24, 25], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 50}}, {"id": 24, "type": "identifier", "text": "printf", "parent": 23, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 10}}, {"id": 25, "type": "argument_list", "text": "(\"What is the value of the breadth? \\n\")", "parent": 23, "children": [26], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 50}}, {"id": 26, "type": "string_literal", "text": "\"What is the value of the breadth? \\n\"", "parent": 25, "children": [27], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 49}}, {"id": 27, "type": "escape_sequence", "text": "\\n", "parent": 26, "children": [], "start_point": {"row": 11, "column": 46}, "end_point": {"row": 11, "column": 48}}, {"id": 28, "type": "call_expression", "text": "scanf(\"%f\", &breadth)", "parent": 3, "children": [29, 30], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 25}}, {"id": 29, "type": "identifier", "text": "scanf", "parent": 28, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 9}}, {"id": 30, "type": "argument_list", "text": "(\"%f\", &breadth)", "parent": 28, "children": [31, 32], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 25}}, {"id": 31, "type": "string_literal", "text": "\"%f\"", "parent": 30, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 32, "type": "pointer_expression", "text": "&breadth", "parent": 30, "children": [33], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 24}}, {"id": 33, "type": "identifier", "text": "breadth", "parent": 32, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 24}}, {"id": 34, "type": "call_expression", "text": "printf(\"The area of the rectangle is %f\", lenght*breadth)", "parent": 3, "children": [35, 36], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 61}}, {"id": 35, "type": "identifier", "text": "printf", "parent": 34, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 36, "type": "argument_list", "text": "(\"The area of the rectangle is %f\", lenght*breadth)", "parent": 34, "children": [37, 38], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 61}}, {"id": 37, "type": "string_literal", "text": "\"The area of the rectangle is %f\"", "parent": 36, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 44}}, {"id": 38, "type": "binary_expression", "text": "lenght*breadth", "parent": 36, "children": [39, 40, 41], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 60}}, {"id": 39, "type": "identifier", "text": "lenght", "parent": 38, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 52}}, {"id": 40, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 13, "column": 52}, "end_point": {"row": 13, "column": 53}}, {"id": 41, "type": "identifier", "text": "breadth", "parent": 38, "children": [], "start_point": {"row": 13, "column": 53}, "end_point": {"row": 13, "column": 60}}, {"id": 42, "type": "return_statement", "text": "return 0;", "parent": 3, "children": [43], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 13}}, {"id": 43, "type": "number_literal", "text": "0", "parent": 42, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 12}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [12, 17, 21, 23, 28, 32, 34, 38], "assignments": [], "loops": [], "conditionals": [6, 10, 11, 13, 18, 22, 24, 29, 33, 35, 39, 41], "returns": [42], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 15, 20, 26, 31, 37, 43], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "main", "text_snippet": "int main(){\n // int lenght=8, breadth=4;\n // int area = lenght*breadth;\n \n // printf(\"Th"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\n\nint main(){\n // int lenght=8, breadth=4;\n // int area = lenght*breadth;\n \n // printf(\"The area of the rectangle is %d\", area);\n\n float lenght, breadth;\n printf(\"What is the value of the lenght? \\n\");\n scanf(\"%f\", &lenght);\n printf(\"What is the value of the breadth? \\n\");\n scanf(\"%f\", &breadth);\n printf(\"The area of the rectangle is %f\", lenght*breadth);\n\n return 0;\n}"}
208
c
/* Copyright 2018 Canaan Inc. * * 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. */ #include <stdio.h> #include "kpu.h" #include "sysctl.h" #include "plic.h" #include "utils.h" #include <float.h> #include "fpioa.h" #include "lcd.h" #include "dvp.h" #include "ov2640.h" #include "image_process.h" #include "board_config.h" #include "gpiohs.h" #define INCBIN_STYLE INCBIN_STYLE_SNAKE #define INCBIN_PREFIX #include "incbin.h" #define PROB_THRESH (0.7f) #define PLL0_OUTPUT_FREQ 800000000UL #define PLL1_OUTPUT_FREQ 400000000UL volatile uint32_t g_ai_done_flag; volatile uint8_t g_dvp_finish_flag; static image_t kpu_image, display_image, crop_image; kpu_model_context_t task; INCBIN(model, "class.kmodel"); static int ai_done(void* userdata) { g_ai_done_flag = 1; float *features; size_t count; kpu_get_output(&task, 0, (uint8_t **)&features, &count); count /= sizeof(float); size_t i; for (i = 0; i < count; i++) { if (i % 64 == 0) printf("\n"); printf("%f, ", features[i]); } printf("\n"); return 0; } static int dvp_irq(void *ctx) { if (dvp_get_interrupt(DVP_STS_FRAME_FINISH)) { dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); dvp_clear_interrupt(DVP_STS_FRAME_FINISH); g_dvp_finish_flag = 1; } else { dvp_start_convert(); dvp_clear_interrupt(DVP_STS_FRAME_START); } return 0; } static void io_init(void) { /* Init DVP IO map and function settings */ fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST); fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN); fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK); fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC); fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF); fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK); fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK); fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA); /* Init SPI IO map and function settings */ fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO); fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3); fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK); fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO); sysctl_set_spi0_dvp_data(1); // LCD Backlight fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO); gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT); gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW); } static void io_set_power(void) { /* Set dvp and spi pin to 1.8V */ sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18); sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18); } int argmax(float* src, size_t count) { float max = FLT_MIN; size_t i, max_i = 0; for (i = 0; i < count; i++) { if (src[i] > max) { max = src[i]; max_i = i; } } return max_i; } int main() { /* Set CPU and dvp clk */ sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ); sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ); sysctl_clock_enable(SYSCTL_CLOCK_AI); // uarths_init(); plic_init(); io_set_power(); io_init(); /* LCD init */ printf("LCD init\n"); lcd_init(); lcd_set_direction(DIR_YX_RLDU); lcd_clear(BLACK); /* DVP init */ printf("DVP init\n"); dvp_init(8); dvp_set_xclk_rate(24000000); dvp_enable_burst(); dvp_set_output_enable(0, 1); dvp_set_output_enable(1, 1); dvp_set_image_format(DVP_CFG_RGB_FORMAT); dvp_set_image_size(320, 240); ov2640_init(); kpu_image.pixel = 3; kpu_image.width = 320; kpu_image.height = 240; image_init(&kpu_image); display_image.pixel = 2; display_image.width = 320; display_image.height = 240; image_init(&display_image); crop_image.pixel = 3; crop_image.width = 224; crop_image.height = 224; image_init(&crop_image); dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2)); dvp_set_display_addr((uint32_t)display_image.addr); dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); dvp_disable_auto(); /* DVP interrupt config */ printf("DVP interrupt config\n"); plic_set_priority(IRQN_DVP_INTERRUPT, 1); plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL); plic_irq_enable(IRQN_DVP_INTERRUPT); /* init model */ if (kpu_load_kmodel(&task, model_data) != 0) { printf("Cannot load kmodel.\n"); return(-1); } sysctl_enable_irq(); /* system start */ printf("System start\n"); while (1) { g_dvp_finish_flag = 0; dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH); dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1); while (g_dvp_finish_flag == 0) ; image_crop(&kpu_image, &crop_image, 48, 8); g_ai_done_flag = 0; if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) { printf("Cannot run kmodel.\n"); return(-1); } while (!g_ai_done_flag); float *features; size_t output_size; kpu_get_output(&task, 0, &features, &output_size); size_t cls = argmax(features, 5); const char *text = NULL; switch (cls) { case 0: text = "daisy"; break; case 1: text = "dandelion"; break; case 2: text = "roses"; break; case 3: text = "sunflowers"; break; case 4: text = "tulip"; break; } /* display pic*/ if (features[cls] > PROB_THRESH) ram_draw_string(display_image.addr, 150, 20, text, RED); lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr); } }
27.57
239
(translation_unit) "/* Copyright 2018 Canaan Inc. \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#include <stdio.h> \n#include "kpu.h" \n#include "sysctl.h" \n#include "plic.h" \n#include "utils.h" \n#include <float.h> \n#include "fpioa.h" \n#include "lcd.h" \n#include "dvp.h" \n#include "ov2640.h" \n#include "image_process.h" \n#include "board_config.h" \n#include "gpiohs.h" \n#define INCBIN_STYLE INCBIN_STYLE_SNAKE \n#define INCBIN_PREFIX \n#include "incbin.h" \n \n#define PROB_THRESH (0.7f) \n \n#define PLL0_OUTPUT_FREQ 800000000UL \n#define PLL1_OUTPUT_FREQ 400000000UL \n \nvolatile uint32_t g_ai_done_flag; \nvolatile uint8_t g_dvp_finish_flag; \nstatic image_t kpu_image, display_image, crop_image; \n \nkpu_model_context_t task; \n \nINCBIN(model, "class.kmodel"); \n \nstatic int ai_done(void* userdata) \n{ \n g_ai_done_flag = 1; \n float *features; \n size_t count; \n kpu_get_output(&task, 0, (uint8_t **)&features, &count); \n count /= sizeof(float); \n \n size_t i; \n for (i = 0; i < count; i++) \n { \n if (i % 64 == 0) \n printf("\n"); \n printf("%f, ", features[i]); \n } \n \n printf("\n"); \n return 0; \n} \n \nstatic int dvp_irq(void *ctx) \n{ \n if (dvp_get_interrupt(DVP_STS_FRAME_FINISH)) \n { \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_clear_interrupt(DVP_STS_FRAME_FINISH); \n g_dvp_finish_flag = 1; \n } \n else \n { \n dvp_start_convert(); \n dvp_clear_interrupt(DVP_STS_FRAME_START); \n } \n return 0; \n} \n \nstatic void io_init(void) \n{ \n /* Init DVP IO map and function settings */ \n fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST); \n fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN); \n fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK); \n fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC); \n fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF); \n fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK); \n fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK); \n fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA); \n \n /* Init SPI IO map and function settings */ \n fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO); \n fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3); \n fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK); \n fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO); \n \n sysctl_set_spi0_dvp_data(1); \n \n // LCD Backlight \n fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO); \n gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT); \n gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW); \n} \n \nstatic void io_set_power(void) \n{ \n /* Set dvp and spi pin to 1.8V */ \n sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18); \n sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18); \n} \n \nint argmax(float* src, size_t count) \n{ \n float max = FLT_MIN; \n size_t i, max_i = 0; \n for (i = 0; i < count; i++) \n { \n if (src[i] > max) \n { \n max = src[i]; \n max_i = i; \n } \n } \n \n return max_i; \n} \n \nint main() \n{ \n /* Set CPU and dvp clk */ \n sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ); \n sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ); \n sysctl_clock_enable(SYSCTL_CLOCK_AI); \n // uarths_init(); \n plic_init(); \n io_set_power(); \n io_init(); \n \n /* LCD init */ \n printf("LCD init\n"); \n lcd_init(); \n lcd_set_direction(DIR_YX_RLDU); \n lcd_clear(BLACK); \n /* DVP init */ \n printf("DVP init\n"); \n dvp_init(8); \n dvp_set_xclk_rate(24000000); \n dvp_enable_burst(); \n dvp_set_output_enable(0, 1); \n dvp_set_output_enable(1, 1); \n dvp_set_image_format(DVP_CFG_RGB_FORMAT); \n dvp_set_image_size(320, 240); \n ov2640_init(); \n \n kpu_image.pixel = 3; \n kpu_image.width = 320; \n kpu_image.height = 240; \n image_init(&kpu_image); \n display_image.pixel = 2; \n display_image.width = 320; \n display_image.height = 240; \n image_init(&display_image); \n crop_image.pixel = 3; \n crop_image.width = 224; \n crop_image.height = 224; \n image_init(&crop_image); \n dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2)); \n dvp_set_display_addr((uint32_t)display_image.addr); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_disable_auto(); \n /* DVP interrupt config */ \n printf("DVP interrupt config\n"); \n plic_set_priority(IRQN_DVP_INTERRUPT, 1); \n plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL); \n plic_irq_enable(IRQN_DVP_INTERRUPT); \n /* init model */ \n if (kpu_load_kmodel(&task, model_data) != 0) \n { \n printf("Cannot load kmodel.\n"); \n return(-1); \n } \n sysctl_enable_irq(); \n \n /* system start */ \n printf("System start\n"); \n while (1) \n { \n g_dvp_finish_flag = 0; \n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1); \n while (g_dvp_finish_flag == 0) \n ; \n \n image_crop(&kpu_image, &crop_image, 48, 8); \n \n g_ai_done_flag = 0; \n \n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) \n { \n printf("Cannot run kmodel.\n"); \n return(-1); \n } \n while (!g_ai_done_flag); \n \n float *features; \n size_t output_size; \n kpu_get_output(&task, 0, &features, &output_size); \n \n size_t cls = argmax(features, 5); \n \n const char *text = NULL; \n switch (cls) \n { \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n } \n \n /* display pic*/ \n if (features[cls] > PROB_THRESH) \n ram_draw_string(display_image.addr, 150, 20, text, RED); \n lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr); \n } \n \n}" (comment) "/* Copyright 2018 Canaan Inc. \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_include) "#include <stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include "kpu.h" \n" (#include) "#include" (string_literal) ""kpu.h"" (") """ (string_content) "kpu.h" (") """ (preproc_include) "#include "sysctl.h" \n" (#include) "#include" (string_literal) ""sysctl.h"" (") """ (string_content) "sysctl.h" (") """ (preproc_include) "#include "plic.h" \n" (#include) "#include" (string_literal) ""plic.h"" (") """ (string_content) "plic.h" (") """ (preproc_include) "#include "utils.h" \n" (#include) "#include" (string_literal) ""utils.h"" (") """ (string_content) "utils.h" (") """ (preproc_include) "#include <float.h> \n" (#include) "#include" (system_lib_string) "<float.h>" (preproc_include) "#include "fpioa.h" \n" (#include) "#include" (string_literal) ""fpioa.h"" (") """ (string_content) "fpioa.h" (") """ (preproc_include) "#include "lcd.h" \n" (#include) "#include" (string_literal) ""lcd.h"" (") """ (string_content) "lcd.h" (") """ (preproc_include) "#include "dvp.h" \n" (#include) "#include" (string_literal) ""dvp.h"" (") """ (string_content) "dvp.h" (") """ (preproc_include) "#include "ov2640.h" \n" (#include) "#include" (string_literal) ""ov2640.h"" (") """ (string_content) "ov2640.h" (") """ (preproc_include) "#include "image_process.h" \n" (#include) "#include" (string_literal) ""image_process.h"" (") """ (string_content) "image_process.h" (") """ (preproc_include) "#include "board_config.h" \n" (#include) "#include" (string_literal) ""board_config.h"" (") """ (string_content) "board_config.h" (") """ (preproc_include) "#include "gpiohs.h" \n" (#include) "#include" (string_literal) ""gpiohs.h"" (") """ (string_content) "gpiohs.h" (") """ (preproc_def) "#define INCBIN_STYLE INCBIN_STYLE_SNAKE \n" (#define) "#define" (identifier) "INCBIN_STYLE" (preproc_arg) "INCBIN_STYLE_SNAKE " (preproc_def) "#define INCBIN_PREFIX \n" (#define) "#define" (identifier) "INCBIN_PREFIX" (preproc_include) "#include "incbin.h" \n" (#include) "#include" (string_literal) ""incbin.h"" (") """ (string_content) "incbin.h" (") """ (preproc_def) "#define PROB_THRESH (0.7f) \n" (#define) "#define" (identifier) "PROB_THRESH" (preproc_arg) "(0.7f) " (preproc_def) "#define PLL0_OUTPUT_FREQ 800000000UL \n" (#define) "#define" (identifier) "PLL0_OUTPUT_FREQ" (preproc_arg) "800000000UL " (preproc_def) "#define PLL1_OUTPUT_FREQ 400000000UL \n" (#define) "#define" (identifier) "PLL1_OUTPUT_FREQ" (preproc_arg) "400000000UL " (declaration) "volatile uint32_t g_ai_done_flag;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint32_t" (identifier) "g_ai_done_flag" (;) ";" (declaration) "volatile uint8_t g_dvp_finish_flag;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint8_t" (identifier) "g_dvp_finish_flag" (;) ";" (declaration) "static image_t kpu_image, display_image, crop_image;" (storage_class_specifier) "static" (static) "static" (type_identifier) "image_t" (identifier) "kpu_image" (,) "," (identifier) "display_image" (,) "," (identifier) "crop_image" (;) ";" (declaration) "kpu_model_context_t task;" (type_identifier) "kpu_model_context_t" (identifier) "task" (;) ";" (expression_statement) "INCBIN(model, "class.kmodel");" (call_expression) "INCBIN(model, "class.kmodel")" (identifier) "INCBIN" (argument_list) "(model, "class.kmodel")" (() "(" (identifier) "model" (,) "," (string_literal) ""class.kmodel"" (") """ (string_content) "class.kmodel" (") """ ()) ")" (;) ";" (function_definition) "static int ai_done(void* userdata) \n{ \n g_ai_done_flag = 1; \n float *features; \n size_t count; \n kpu_get_output(&task, 0, (uint8_t **)&features, &count); \n count /= sizeof(float); \n \n size_t i; \n for (i = 0; i < count; i++) \n { \n if (i % 64 == 0) \n printf("\n"); \n printf("%f, ", features[i]); \n } \n \n printf("\n"); \n return 0; \n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "ai_done(void* userdata)" (identifier) "ai_done" (parameter_list) "(void* userdata)" (() "(" (parameter_declaration) "void* userdata" (primitive_type) "void" (pointer_declarator) "* userdata" (*) "*" (identifier) "userdata" ()) ")" (compound_statement) "{ \n g_ai_done_flag = 1; \n float *features; \n size_t count; \n kpu_get_output(&task, 0, (uint8_t **)&features, &count); \n count /= sizeof(float); \n \n size_t i; \n for (i = 0; i < count; i++) \n { \n if (i % 64 == 0) \n printf("\n"); \n printf("%f, ", features[i]); \n } \n \n printf("\n"); \n return 0; \n}" ({) "{" (expression_statement) "g_ai_done_flag = 1;" (assignment_expression) "g_ai_done_flag = 1" (identifier) "g_ai_done_flag" (=) "=" (number_literal) "1" (;) ";" (declaration) "float *features;" (primitive_type) "float" (pointer_declarator) "*features" (*) "*" (identifier) "features" (;) ";" (declaration) "size_t count;" (primitive_type) "size_t" (identifier) "count" (;) ";" (expression_statement) "kpu_get_output(&task, 0, (uint8_t **)&features, &count);" (call_expression) "kpu_get_output(&task, 0, (uint8_t **)&features, &count)" (identifier) "kpu_get_output" (argument_list) "(&task, 0, (uint8_t **)&features, &count)" (() "(" (pointer_expression) "&task" (&) "&" (identifier) "task" (,) "," (number_literal) "0" (,) "," (cast_expression) "(uint8_t **)&features" (() "(" (type_descriptor) "uint8_t **" (primitive_type) "uint8_t" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&features" (&) "&" (identifier) "features" (,) "," (pointer_expression) "&count" (&) "&" (identifier) "count" ()) ")" (;) ";" (expression_statement) "count /= sizeof(float);" (assignment_expression) "count /= sizeof(float)" (identifier) "count" (/=) "/=" (sizeof_expression) "sizeof(float)" (sizeof) "sizeof" (() "(" (type_descriptor) "float" (primitive_type) "float" ()) ")" (;) ";" (declaration) "size_t i;" (primitive_type) "size_t" (identifier) "i" (;) ";" (for_statement) "for (i = 0; i < count; i++) \n { \n if (i % 64 == 0) \n printf("\n"); \n printf("%f, ", features[i]); \n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < count" (identifier) "i" (<) "<" (identifier) "count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n if (i % 64 == 0) \n printf("\n"); \n printf("%f, ", features[i]); \n }" ({) "{" (if_statement) "if (i % 64 == 0) \n printf("\n");" (if) "if" (parenthesized_expression) "(i % 64 == 0)" (() "(" (binary_expression) "i % 64 == 0" (binary_expression) "i % 64" (identifier) "i" (%) "%" (number_literal) "64" (==) "==" (number_literal) "0" ()) ")" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("%f, ", features[i]);" (call_expression) "printf("%f, ", features[i])" (identifier) "printf" (argument_list) "("%f, ", features[i])" (() "(" (string_literal) ""%f, "" (") """ (string_content) "%f, " (") """ (,) "," (subscript_expression) "features[i]" (identifier) "features" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int dvp_irq(void *ctx) \n{ \n if (dvp_get_interrupt(DVP_STS_FRAME_FINISH)) \n { \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_clear_interrupt(DVP_STS_FRAME_FINISH); \n g_dvp_finish_flag = 1; \n } \n else \n { \n dvp_start_convert(); \n dvp_clear_interrupt(DVP_STS_FRAME_START); \n } \n return 0; \n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "dvp_irq(void *ctx)" (identifier) "dvp_irq" (parameter_list) "(void *ctx)" (() "(" (parameter_declaration) "void *ctx" (primitive_type) "void" (pointer_declarator) "*ctx" (*) "*" (identifier) "ctx" ()) ")" (compound_statement) "{ \n if (dvp_get_interrupt(DVP_STS_FRAME_FINISH)) \n { \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_clear_interrupt(DVP_STS_FRAME_FINISH); \n g_dvp_finish_flag = 1; \n } \n else \n { \n dvp_start_convert(); \n dvp_clear_interrupt(DVP_STS_FRAME_START); \n } \n return 0; \n}" ({) "{" (if_statement) "if (dvp_get_interrupt(DVP_STS_FRAME_FINISH)) \n { \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_clear_interrupt(DVP_STS_FRAME_FINISH); \n g_dvp_finish_flag = 1; \n } \n else \n { \n dvp_start_convert(); \n dvp_clear_interrupt(DVP_STS_FRAME_START); \n }" (if) "if" (parenthesized_expression) "(dvp_get_interrupt(DVP_STS_FRAME_FINISH))" (() "(" (call_expression) "dvp_get_interrupt(DVP_STS_FRAME_FINISH)" (identifier) "dvp_get_interrupt" (argument_list) "(DVP_STS_FRAME_FINISH)" (() "(" (identifier) "DVP_STS_FRAME_FINISH" ()) ")" ()) ")" (compound_statement) "{ \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_clear_interrupt(DVP_STS_FRAME_FINISH); \n g_dvp_finish_flag = 1; \n }" ({) "{" (expression_statement) "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);" (call_expression) "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)" (identifier) "dvp_config_interrupt" (argument_list) "(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)" (() "(" (binary_expression) "DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE" (identifier) "DVP_CFG_START_INT_ENABLE" (|) "|" (identifier) "DVP_CFG_FINISH_INT_ENABLE" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "dvp_clear_interrupt(DVP_STS_FRAME_FINISH);" (call_expression) "dvp_clear_interrupt(DVP_STS_FRAME_FINISH)" (identifier) "dvp_clear_interrupt" (argument_list) "(DVP_STS_FRAME_FINISH)" (() "(" (identifier) "DVP_STS_FRAME_FINISH" ()) ")" (;) ";" (expression_statement) "g_dvp_finish_flag = 1;" (assignment_expression) "g_dvp_finish_flag = 1" (identifier) "g_dvp_finish_flag" (=) "=" (number_literal) "1" (;) ";" (}) "}" (else_clause) "else \n { \n dvp_start_convert(); \n dvp_clear_interrupt(DVP_STS_FRAME_START); \n }" (else) "else" (compound_statement) "{ \n dvp_start_convert(); \n dvp_clear_interrupt(DVP_STS_FRAME_START); \n }" ({) "{" (expression_statement) "dvp_start_convert();" (call_expression) "dvp_start_convert()" (identifier) "dvp_start_convert" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "dvp_clear_interrupt(DVP_STS_FRAME_START);" (call_expression) "dvp_clear_interrupt(DVP_STS_FRAME_START)" (identifier) "dvp_clear_interrupt" (argument_list) "(DVP_STS_FRAME_START)" (() "(" (identifier) "DVP_STS_FRAME_START" ()) ")" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static void io_init(void) \n{ \n /* Init DVP IO map and function settings */ \n fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST); \n fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN); \n fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK); \n fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC); \n fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF); \n fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK); \n fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK); \n fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA); \n \n /* Init SPI IO map and function settings */ \n fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO); \n fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3); \n fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK); \n fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO); \n \n sysctl_set_spi0_dvp_data(1); \n \n // LCD Backlight \n fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO); \n gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT); \n gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW); \n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "io_init(void)" (identifier) "io_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n /* Init DVP IO map and function settings */ \n fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST); \n fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN); \n fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK); \n fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC); \n fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF); \n fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK); \n fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK); \n fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA); \n \n /* Init SPI IO map and function settings */ \n fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO); \n fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3); \n fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK); \n fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO); \n \n sysctl_set_spi0_dvp_data(1); \n \n // LCD Backlight \n fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO); \n gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT); \n gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW); \n}" ({) "{" (comment) "/* Init DVP IO map and function settings */" (expression_statement) "fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST);" (call_expression) "fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST)" (identifier) "fpioa_set_function" (argument_list) "(OV_RST_PIN, FUNC_CMOS_RST)" (() "(" (identifier) "OV_RST_PIN" (,) "," (identifier) "FUNC_CMOS_RST" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN);" (call_expression) "fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN)" (identifier) "fpioa_set_function" (argument_list) "(OV_PWDN_PIN, FUNC_CMOS_PWDN)" (() "(" (identifier) "OV_PWDN_PIN" (,) "," (identifier) "FUNC_CMOS_PWDN" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK);" (call_expression) "fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK)" (identifier) "fpioa_set_function" (argument_list) "(OV_XCLK_PIN, FUNC_CMOS_XCLK)" (() "(" (identifier) "OV_XCLK_PIN" (,) "," (identifier) "FUNC_CMOS_XCLK" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC);" (call_expression) "fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC)" (identifier) "fpioa_set_function" (argument_list) "(OV_VSYNC_PIN, FUNC_CMOS_VSYNC)" (() "(" (identifier) "OV_VSYNC_PIN" (,) "," (identifier) "FUNC_CMOS_VSYNC" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF);" (call_expression) "fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF)" (identifier) "fpioa_set_function" (argument_list) "(OV_HREF_PIN, FUNC_CMOS_HREF)" (() "(" (identifier) "OV_HREF_PIN" (,) "," (identifier) "FUNC_CMOS_HREF" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK);" (call_expression) "fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK)" (identifier) "fpioa_set_function" (argument_list) "(OV_PCLK_PIN, FUNC_CMOS_PCLK)" (() "(" (identifier) "OV_PCLK_PIN" (,) "," (identifier) "FUNC_CMOS_PCLK" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK);" (call_expression) "fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK)" (identifier) "fpioa_set_function" (argument_list) "(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK)" (() "(" (identifier) "OV_SCCB_SCLK_PIN" (,) "," (identifier) "FUNC_SCCB_SCLK" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA);" (call_expression) "fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA)" (identifier) "fpioa_set_function" (argument_list) "(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA)" (() "(" (identifier) "OV_SCCB_SDA_PIN" (,) "," (identifier) "FUNC_SCCB_SDA" ()) ")" (;) ";" (comment) "/* Init SPI IO map and function settings */" (expression_statement) "fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO);" (call_expression) "fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO)" (identifier) "fpioa_set_function" (argument_list) "(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO)" (() "(" (identifier) "LCD_DC_PIN" (,) "," (binary_expression) "FUNC_GPIOHS0 + LCD_DC_IO" (identifier) "FUNC_GPIOHS0" (+) "+" (identifier) "LCD_DC_IO" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3);" (call_expression) "fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3)" (identifier) "fpioa_set_function" (argument_list) "(LCD_CS_PIN, FUNC_SPI0_SS3)" (() "(" (identifier) "LCD_CS_PIN" (,) "," (identifier) "FUNC_SPI0_SS3" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK);" (call_expression) "fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK)" (identifier) "fpioa_set_function" (argument_list) "(LCD_RW_PIN, FUNC_SPI0_SCLK)" (() "(" (identifier) "LCD_RW_PIN" (,) "," (identifier) "FUNC_SPI0_SCLK" ()) ")" (;) ";" (expression_statement) "fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO);" (call_expression) "fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO)" (identifier) "fpioa_set_function" (argument_list) "(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO)" (() "(" (identifier) "LCD_RST_PIN" (,) "," (binary_expression) "FUNC_GPIOHS0 + LCD_RST_IO" (identifier) "FUNC_GPIOHS0" (+) "+" (identifier) "LCD_RST_IO" ()) ")" (;) ";" (expression_statement) "sysctl_set_spi0_dvp_data(1);" (call_expression) "sysctl_set_spi0_dvp_data(1)" (identifier) "sysctl_set_spi0_dvp_data" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (comment) "// LCD Backlight " (expression_statement) "fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO);" (call_expression) "fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO)" (identifier) "fpioa_set_function" (argument_list) "(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO)" (() "(" (identifier) "LCD_BLIGHT_PIN" (,) "," (binary_expression) "FUNC_GPIOHS0 + LCD_BLIGHT_IO" (identifier) "FUNC_GPIOHS0" (+) "+" (identifier) "LCD_BLIGHT_IO" ()) ")" (;) ";" (expression_statement) "gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT);" (call_expression) "gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT)" (identifier) "gpiohs_set_drive_mode" (argument_list) "(LCD_BLIGHT_IO, GPIO_DM_OUTPUT)" (() "(" (identifier) "LCD_BLIGHT_IO" (,) "," (identifier) "GPIO_DM_OUTPUT" ()) ")" (;) ";" (expression_statement) "gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW);" (call_expression) "gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW)" (identifier) "gpiohs_set_pin" (argument_list) "(LCD_BLIGHT_IO, GPIO_PV_LOW)" (() "(" (identifier) "LCD_BLIGHT_IO" (,) "," (identifier) "GPIO_PV_LOW" ()) ")" (;) ";" (}) "}" (function_definition) "static void io_set_power(void) \n{ \n /* Set dvp and spi pin to 1.8V */ \n sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18); \n sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18); \n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "io_set_power(void)" (identifier) "io_set_power" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n /* Set dvp and spi pin to 1.8V */ \n sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18); \n sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18); \n}" ({) "{" (comment) "/* Set dvp and spi pin to 1.8V */" (expression_statement) "sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18);" (call_expression) "sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18)" (identifier) "sysctl_set_power_mode" (argument_list) "(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18)" (() "(" (identifier) "SYSCTL_POWER_BANK6" (,) "," (identifier) "SYSCTL_POWER_V18" ()) ")" (;) ";" (expression_statement) "sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18);" (call_expression) "sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18)" (identifier) "sysctl_set_power_mode" (argument_list) "(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18)" (() "(" (identifier) "SYSCTL_POWER_BANK7" (,) "," (identifier) "SYSCTL_POWER_V18" ()) ")" (;) ";" (}) "}" (function_definition) "int argmax(float* src, size_t count) \n{ \n float max = FLT_MIN; \n size_t i, max_i = 0; \n for (i = 0; i < count; i++) \n { \n if (src[i] > max) \n { \n max = src[i]; \n max_i = i; \n } \n } \n \n return max_i; \n}" (primitive_type) "int" (function_declarator) "argmax(float* src, size_t count)" (identifier) "argmax" (parameter_list) "(float* src, size_t count)" (() "(" (parameter_declaration) "float* src" (primitive_type) "float" (pointer_declarator) "* src" (*) "*" (identifier) "src" (,) "," (parameter_declaration) "size_t count" (primitive_type) "size_t" (identifier) "count" ()) ")" (compound_statement) "{ \n float max = FLT_MIN; \n size_t i, max_i = 0; \n for (i = 0; i < count; i++) \n { \n if (src[i] > max) \n { \n max = src[i]; \n max_i = i; \n } \n } \n \n return max_i; \n}" ({) "{" (declaration) "float max = FLT_MIN;" (primitive_type) "float" (init_declarator) "max = FLT_MIN" (identifier) "max" (=) "=" (identifier) "FLT_MIN" (;) ";" (declaration) "size_t i, max_i = 0;" (primitive_type) "size_t" (identifier) "i" (,) "," (init_declarator) "max_i = 0" (identifier) "max_i" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (i = 0; i < count; i++) \n { \n if (src[i] > max) \n { \n max = src[i]; \n max_i = i; \n } \n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < count" (identifier) "i" (<) "<" (identifier) "count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n if (src[i] > max) \n { \n max = src[i]; \n max_i = i; \n } \n }" ({) "{" (if_statement) "if (src[i] > max) \n { \n max = src[i]; \n max_i = i; \n }" (if) "if" (parenthesized_expression) "(src[i] > max)" (() "(" (binary_expression) "src[i] > max" (subscript_expression) "src[i]" (identifier) "src" ([) "[" (identifier) "i" (]) "]" (>) ">" (identifier) "max" ()) ")" (compound_statement) "{ \n max = src[i]; \n max_i = i; \n }" ({) "{" (expression_statement) "max = src[i];" (assignment_expression) "max = src[i]" (identifier) "max" (=) "=" (subscript_expression) "src[i]" (identifier) "src" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "max_i = i;" (assignment_expression) "max_i = i" (identifier) "max_i" (=) "=" (identifier) "i" (;) ";" (}) "}" (}) "}" (return_statement) "return max_i;" (return) "return" (identifier) "max_i" (;) ";" (}) "}" (function_definition) "int main() \n{ \n /* Set CPU and dvp clk */ \n sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ); \n sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ); \n sysctl_clock_enable(SYSCTL_CLOCK_AI); \n // uarths_init(); \n plic_init(); \n io_set_power(); \n io_init(); \n \n /* LCD init */ \n printf("LCD init\n"); \n lcd_init(); \n lcd_set_direction(DIR_YX_RLDU); \n lcd_clear(BLACK); \n /* DVP init */ \n printf("DVP init\n"); \n dvp_init(8); \n dvp_set_xclk_rate(24000000); \n dvp_enable_burst(); \n dvp_set_output_enable(0, 1); \n dvp_set_output_enable(1, 1); \n dvp_set_image_format(DVP_CFG_RGB_FORMAT); \n dvp_set_image_size(320, 240); \n ov2640_init(); \n \n kpu_image.pixel = 3; \n kpu_image.width = 320; \n kpu_image.height = 240; \n image_init(&kpu_image); \n display_image.pixel = 2; \n display_image.width = 320; \n display_image.height = 240; \n image_init(&display_image); \n crop_image.pixel = 3; \n crop_image.width = 224; \n crop_image.height = 224; \n image_init(&crop_image); \n dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2)); \n dvp_set_display_addr((uint32_t)display_image.addr); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_disable_auto(); \n /* DVP interrupt config */ \n printf("DVP interrupt config\n"); \n plic_set_priority(IRQN_DVP_INTERRUPT, 1); \n plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL); \n plic_irq_enable(IRQN_DVP_INTERRUPT); \n /* init model */ \n if (kpu_load_kmodel(&task, model_data) != 0) \n { \n printf("Cannot load kmodel.\n"); \n return(-1); \n } \n sysctl_enable_irq(); \n \n /* system start */ \n printf("System start\n"); \n while (1) \n { \n g_dvp_finish_flag = 0; \n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1); \n while (g_dvp_finish_flag == 0) \n ; \n \n image_crop(&kpu_image, &crop_image, 48, 8); \n \n g_ai_done_flag = 0; \n \n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) \n { \n printf("Cannot run kmodel.\n"); \n return(-1); \n } \n while (!g_ai_done_flag); \n \n float *features; \n size_t output_size; \n kpu_get_output(&task, 0, &features, &output_size); \n \n size_t cls = argmax(features, 5); \n \n const char *text = NULL; \n switch (cls) \n { \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n } \n \n /* display pic*/ \n if (features[cls] > PROB_THRESH) \n ram_draw_string(display_image.addr, 150, 20, text, RED); \n lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr); \n } \n \n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n /* Set CPU and dvp clk */ \n sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ); \n sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ); \n sysctl_clock_enable(SYSCTL_CLOCK_AI); \n // uarths_init(); \n plic_init(); \n io_set_power(); \n io_init(); \n \n /* LCD init */ \n printf("LCD init\n"); \n lcd_init(); \n lcd_set_direction(DIR_YX_RLDU); \n lcd_clear(BLACK); \n /* DVP init */ \n printf("DVP init\n"); \n dvp_init(8); \n dvp_set_xclk_rate(24000000); \n dvp_enable_burst(); \n dvp_set_output_enable(0, 1); \n dvp_set_output_enable(1, 1); \n dvp_set_image_format(DVP_CFG_RGB_FORMAT); \n dvp_set_image_size(320, 240); \n ov2640_init(); \n \n kpu_image.pixel = 3; \n kpu_image.width = 320; \n kpu_image.height = 240; \n image_init(&kpu_image); \n display_image.pixel = 2; \n display_image.width = 320; \n display_image.height = 240; \n image_init(&display_image); \n crop_image.pixel = 3; \n crop_image.width = 224; \n crop_image.height = 224; \n image_init(&crop_image); \n dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2)); \n dvp_set_display_addr((uint32_t)display_image.addr); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0); \n dvp_disable_auto(); \n /* DVP interrupt config */ \n printf("DVP interrupt config\n"); \n plic_set_priority(IRQN_DVP_INTERRUPT, 1); \n plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL); \n plic_irq_enable(IRQN_DVP_INTERRUPT); \n /* init model */ \n if (kpu_load_kmodel(&task, model_data) != 0) \n { \n printf("Cannot load kmodel.\n"); \n return(-1); \n } \n sysctl_enable_irq(); \n \n /* system start */ \n printf("System start\n"); \n while (1) \n { \n g_dvp_finish_flag = 0; \n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1); \n while (g_dvp_finish_flag == 0) \n ; \n \n image_crop(&kpu_image, &crop_image, 48, 8); \n \n g_ai_done_flag = 0; \n \n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) \n { \n printf("Cannot run kmodel.\n"); \n return(-1); \n } \n while (!g_ai_done_flag); \n \n float *features; \n size_t output_size; \n kpu_get_output(&task, 0, &features, &output_size); \n \n size_t cls = argmax(features, 5); \n \n const char *text = NULL; \n switch (cls) \n { \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n } \n \n /* display pic*/ \n if (features[cls] > PROB_THRESH) \n ram_draw_string(display_image.addr, 150, 20, text, RED); \n lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr); \n } \n \n}" ({) "{" (comment) "/* Set CPU and dvp clk */" (expression_statement) "sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ);" (call_expression) "sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ)" (identifier) "sysctl_pll_set_freq" (argument_list) "(SYSCTL_PLL0, PLL0_OUTPUT_FREQ)" (() "(" (identifier) "SYSCTL_PLL0" (,) "," (identifier) "PLL0_OUTPUT_FREQ" ()) ")" (;) ";" (expression_statement) "sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ);" (call_expression) "sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ)" (identifier) "sysctl_pll_set_freq" (argument_list) "(SYSCTL_PLL1, PLL1_OUTPUT_FREQ)" (() "(" (identifier) "SYSCTL_PLL1" (,) "," (identifier) "PLL1_OUTPUT_FREQ" ()) ")" (;) ";" (expression_statement) "sysctl_clock_enable(SYSCTL_CLOCK_AI);" (call_expression) "sysctl_clock_enable(SYSCTL_CLOCK_AI)" (identifier) "sysctl_clock_enable" (argument_list) "(SYSCTL_CLOCK_AI)" (() "(" (identifier) "SYSCTL_CLOCK_AI" ()) ")" (;) ";" (comment) "// uarths_init(); " (expression_statement) "plic_init();" (call_expression) "plic_init()" (identifier) "plic_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "io_set_power();" (call_expression) "io_set_power()" (identifier) "io_set_power" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "io_init();" (call_expression) "io_init()" (identifier) "io_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* LCD init */" (expression_statement) "printf("LCD init\n");" (call_expression) "printf("LCD init\n")" (identifier) "printf" (argument_list) "("LCD init\n")" (() "(" (string_literal) ""LCD init\n"" (") """ (string_content) "LCD init" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "lcd_init();" (call_expression) "lcd_init()" (identifier) "lcd_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "lcd_set_direction(DIR_YX_RLDU);" (call_expression) "lcd_set_direction(DIR_YX_RLDU)" (identifier) "lcd_set_direction" (argument_list) "(DIR_YX_RLDU)" (() "(" (identifier) "DIR_YX_RLDU" ()) ")" (;) ";" (expression_statement) "lcd_clear(BLACK);" (call_expression) "lcd_clear(BLACK)" (identifier) "lcd_clear" (argument_list) "(BLACK)" (() "(" (identifier) "BLACK" ()) ")" (;) ";" (comment) "/* DVP init */" (expression_statement) "printf("DVP init\n");" (call_expression) "printf("DVP init\n")" (identifier) "printf" (argument_list) "("DVP init\n")" (() "(" (string_literal) ""DVP init\n"" (") """ (string_content) "DVP init" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "dvp_init(8);" (call_expression) "dvp_init(8)" (identifier) "dvp_init" (argument_list) "(8)" (() "(" (number_literal) "8" ()) ")" (;) ";" (expression_statement) "dvp_set_xclk_rate(24000000);" (call_expression) "dvp_set_xclk_rate(24000000)" (identifier) "dvp_set_xclk_rate" (argument_list) "(24000000)" (() "(" (number_literal) "24000000" ()) ")" (;) ";" (expression_statement) "dvp_enable_burst();" (call_expression) "dvp_enable_burst()" (identifier) "dvp_enable_burst" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "dvp_set_output_enable(0, 1);" (call_expression) "dvp_set_output_enable(0, 1)" (identifier) "dvp_set_output_enable" (argument_list) "(0, 1)" (() "(" (number_literal) "0" (,) "," (number_literal) "1" ()) ")" (;) ";" (expression_statement) "dvp_set_output_enable(1, 1);" (call_expression) "dvp_set_output_enable(1, 1)" (identifier) "dvp_set_output_enable" (argument_list) "(1, 1)" (() "(" (number_literal) "1" (,) "," (number_literal) "1" ()) ")" (;) ";" (expression_statement) "dvp_set_image_format(DVP_CFG_RGB_FORMAT);" (call_expression) "dvp_set_image_format(DVP_CFG_RGB_FORMAT)" (identifier) "dvp_set_image_format" (argument_list) "(DVP_CFG_RGB_FORMAT)" (() "(" (identifier) "DVP_CFG_RGB_FORMAT" ()) ")" (;) ";" (expression_statement) "dvp_set_image_size(320, 240);" (call_expression) "dvp_set_image_size(320, 240)" (identifier) "dvp_set_image_size" (argument_list) "(320, 240)" (() "(" (number_literal) "320" (,) "," (number_literal) "240" ()) ")" (;) ";" (expression_statement) "ov2640_init();" (call_expression) "ov2640_init()" (identifier) "ov2640_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "kpu_image.pixel = 3;" (assignment_expression) "kpu_image.pixel = 3" (field_expression) "kpu_image.pixel" (identifier) "kpu_image" (.) "." (field_identifier) "pixel" (=) "=" (number_literal) "3" (;) ";" (expression_statement) "kpu_image.width = 320;" (assignment_expression) "kpu_image.width = 320" (field_expression) "kpu_image.width" (identifier) "kpu_image" (.) "." (field_identifier) "width" (=) "=" (number_literal) "320" (;) ";" (expression_statement) "kpu_image.height = 240;" (assignment_expression) "kpu_image.height = 240" (field_expression) "kpu_image.height" (identifier) "kpu_image" (.) "." (field_identifier) "height" (=) "=" (number_literal) "240" (;) ";" (expression_statement) "image_init(&kpu_image);" (call_expression) "image_init(&kpu_image)" (identifier) "image_init" (argument_list) "(&kpu_image)" (() "(" (pointer_expression) "&kpu_image" (&) "&" (identifier) "kpu_image" ()) ")" (;) ";" (expression_statement) "display_image.pixel = 2;" (assignment_expression) "display_image.pixel = 2" (field_expression) "display_image.pixel" (identifier) "display_image" (.) "." (field_identifier) "pixel" (=) "=" (number_literal) "2" (;) ";" (expression_statement) "display_image.width = 320;" (assignment_expression) "display_image.width = 320" (field_expression) "display_image.width" (identifier) "display_image" (.) "." (field_identifier) "width" (=) "=" (number_literal) "320" (;) ";" (expression_statement) "display_image.height = 240;" (assignment_expression) "display_image.height = 240" (field_expression) "display_image.height" (identifier) "display_image" (.) "." (field_identifier) "height" (=) "=" (number_literal) "240" (;) ";" (expression_statement) "image_init(&display_image);" (call_expression) "image_init(&display_image)" (identifier) "image_init" (argument_list) "(&display_image)" (() "(" (pointer_expression) "&display_image" (&) "&" (identifier) "display_image" ()) ")" (;) ";" (expression_statement) "crop_image.pixel = 3;" (assignment_expression) "crop_image.pixel = 3" (field_expression) "crop_image.pixel" (identifier) "crop_image" (.) "." (field_identifier) "pixel" (=) "=" (number_literal) "3" (;) ";" (expression_statement) "crop_image.width = 224;" (assignment_expression) "crop_image.width = 224" (field_expression) "crop_image.width" (identifier) "crop_image" (.) "." (field_identifier) "width" (=) "=" (number_literal) "224" (;) ";" (expression_statement) "crop_image.height = 224;" (assignment_expression) "crop_image.height = 224" (field_expression) "crop_image.height" (identifier) "crop_image" (.) "." (field_identifier) "height" (=) "=" (number_literal) "224" (;) ";" (expression_statement) "image_init(&crop_image);" (call_expression) "image_init(&crop_image)" (identifier) "image_init" (argument_list) "(&crop_image)" (() "(" (pointer_expression) "&crop_image" (&) "&" (identifier) "crop_image" ()) ")" (;) ";" (expression_statement) "dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2));" (call_expression) "dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2))" (identifier) "dvp_set_ai_addr" (argument_list) "((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2))" (() "(" (cast_expression) "(uint32_t)kpu_image.addr" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (field_expression) "kpu_image.addr" (identifier) "kpu_image" (.) "." (field_identifier) "addr" (,) "," (cast_expression) "(uint32_t)(kpu_image.addr + 320 * 240)" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (parenthesized_expression) "(kpu_image.addr + 320 * 240)" (() "(" (binary_expression) "kpu_image.addr + 320 * 240" (field_expression) "kpu_image.addr" (identifier) "kpu_image" (.) "." (field_identifier) "addr" (+) "+" (binary_expression) "320 * 240" (number_literal) "320" (*) "*" (number_literal) "240" ()) ")" (,) "," (cast_expression) "(uint32_t)(kpu_image.addr + 320 * 240 * 2)" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (parenthesized_expression) "(kpu_image.addr + 320 * 240 * 2)" (() "(" (binary_expression) "kpu_image.addr + 320 * 240 * 2" (field_expression) "kpu_image.addr" (identifier) "kpu_image" (.) "." (field_identifier) "addr" (+) "+" (binary_expression) "320 * 240 * 2" (binary_expression) "320 * 240" (number_literal) "320" (*) "*" (number_literal) "240" (*) "*" (number_literal) "2" ()) ")" ()) ")" (;) ";" (expression_statement) "dvp_set_display_addr((uint32_t)display_image.addr);" (call_expression) "dvp_set_display_addr((uint32_t)display_image.addr)" (identifier) "dvp_set_display_addr" (argument_list) "((uint32_t)display_image.addr)" (() "(" (cast_expression) "(uint32_t)display_image.addr" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (field_expression) "display_image.addr" (identifier) "display_image" (.) "." (field_identifier) "addr" ()) ")" (;) ";" (expression_statement) "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);" (call_expression) "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)" (identifier) "dvp_config_interrupt" (argument_list) "(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)" (() "(" (binary_expression) "DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE" (identifier) "DVP_CFG_START_INT_ENABLE" (|) "|" (identifier) "DVP_CFG_FINISH_INT_ENABLE" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "dvp_disable_auto();" (call_expression) "dvp_disable_auto()" (identifier) "dvp_disable_auto" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* DVP interrupt config */" (expression_statement) "printf("DVP interrupt config\n");" (call_expression) "printf("DVP interrupt config\n")" (identifier) "printf" (argument_list) "("DVP interrupt config\n")" (() "(" (string_literal) ""DVP interrupt config\n"" (") """ (string_content) "DVP interrupt config" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "plic_set_priority(IRQN_DVP_INTERRUPT, 1);" (call_expression) "plic_set_priority(IRQN_DVP_INTERRUPT, 1)" (identifier) "plic_set_priority" (argument_list) "(IRQN_DVP_INTERRUPT, 1)" (() "(" (identifier) "IRQN_DVP_INTERRUPT" (,) "," (number_literal) "1" ()) ")" (;) ";" (expression_statement) "plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL);" (call_expression) "plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL)" (identifier) "plic_irq_register" (argument_list) "(IRQN_DVP_INTERRUPT, dvp_irq, NULL)" (() "(" (identifier) "IRQN_DVP_INTERRUPT" (,) "," (identifier) "dvp_irq" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (expression_statement) "plic_irq_enable(IRQN_DVP_INTERRUPT);" (call_expression) "plic_irq_enable(IRQN_DVP_INTERRUPT)" (identifier) "plic_irq_enable" (argument_list) "(IRQN_DVP_INTERRUPT)" (() "(" (identifier) "IRQN_DVP_INTERRUPT" ()) ")" (;) ";" (comment) "/* init model */" (if_statement) "if (kpu_load_kmodel(&task, model_data) != 0) \n { \n printf("Cannot load kmodel.\n"); \n return(-1); \n }" (if) "if" (parenthesized_expression) "(kpu_load_kmodel(&task, model_data) != 0)" (() "(" (binary_expression) "kpu_load_kmodel(&task, model_data) != 0" (call_expression) "kpu_load_kmodel(&task, model_data)" (identifier) "kpu_load_kmodel" (argument_list) "(&task, model_data)" (() "(" (pointer_expression) "&task" (&) "&" (identifier) "task" (,) "," (identifier) "model_data" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{ \n printf("Cannot load kmodel.\n"); \n return(-1); \n }" ({) "{" (expression_statement) "printf("Cannot load kmodel.\n");" (call_expression) "printf("Cannot load kmodel.\n")" (identifier) "printf" (argument_list) "("Cannot load kmodel.\n")" (() "(" (string_literal) ""Cannot load kmodel.\n"" (") """ (string_content) "Cannot load kmodel." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return(-1);" (return) "return" (parenthesized_expression) "(-1)" (() "(" (number_literal) "-1" ()) ")" (;) ";" (}) "}" (expression_statement) "sysctl_enable_irq();" (call_expression) "sysctl_enable_irq()" (identifier) "sysctl_enable_irq" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* system start */" (expression_statement) "printf("System start\n");" (call_expression) "printf("System start\n")" (identifier) "printf" (argument_list) "("System start\n")" (() "(" (string_literal) ""System start\n"" (") """ (string_content) "System start" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (while_statement) "while (1) \n { \n g_dvp_finish_flag = 0; \n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1); \n while (g_dvp_finish_flag == 0) \n ; \n \n image_crop(&kpu_image, &crop_image, 48, 8); \n \n g_ai_done_flag = 0; \n \n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) \n { \n printf("Cannot run kmodel.\n"); \n return(-1); \n } \n while (!g_ai_done_flag); \n \n float *features; \n size_t output_size; \n kpu_get_output(&task, 0, &features, &output_size); \n \n size_t cls = argmax(features, 5); \n \n const char *text = NULL; \n switch (cls) \n { \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n } \n \n /* display pic*/ \n if (features[cls] > PROB_THRESH) \n ram_draw_string(display_image.addr, 150, 20, text, RED); \n lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr); \n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{ \n g_dvp_finish_flag = 0; \n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH); \n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1); \n while (g_dvp_finish_flag == 0) \n ; \n \n image_crop(&kpu_image, &crop_image, 48, 8); \n \n g_ai_done_flag = 0; \n \n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) \n { \n printf("Cannot run kmodel.\n"); \n return(-1); \n } \n while (!g_ai_done_flag); \n \n float *features; \n size_t output_size; \n kpu_get_output(&task, 0, &features, &output_size); \n \n size_t cls = argmax(features, 5); \n \n const char *text = NULL; \n switch (cls) \n { \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n } \n \n /* display pic*/ \n if (features[cls] > PROB_THRESH) \n ram_draw_string(display_image.addr, 150, 20, text, RED); \n lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr); \n }" ({) "{" (expression_statement) "g_dvp_finish_flag = 0;" (assignment_expression) "g_dvp_finish_flag = 0" (identifier) "g_dvp_finish_flag" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH);" (call_expression) "dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH)" (identifier) "dvp_clear_interrupt" (argument_list) "(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH)" (() "(" (binary_expression) "DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH" (identifier) "DVP_STS_FRAME_START" (|) "|" (identifier) "DVP_STS_FRAME_FINISH" ()) ")" (;) ";" (expression_statement) "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1);" (call_expression) "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1)" (identifier) "dvp_config_interrupt" (argument_list) "(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1)" (() "(" (binary_expression) "DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE" (identifier) "DVP_CFG_START_INT_ENABLE" (|) "|" (identifier) "DVP_CFG_FINISH_INT_ENABLE" (,) "," (number_literal) "1" ()) ")" (;) ";" (while_statement) "while (g_dvp_finish_flag == 0) \n ;" (while) "while" (parenthesized_expression) "(g_dvp_finish_flag == 0)" (() "(" (binary_expression) "g_dvp_finish_flag == 0" (identifier) "g_dvp_finish_flag" (==) "==" (number_literal) "0" ()) ")" (expression_statement) ";" (;) ";" (expression_statement) "image_crop(&kpu_image, &crop_image, 48, 8);" (call_expression) "image_crop(&kpu_image, &crop_image, 48, 8)" (identifier) "image_crop" (argument_list) "(&kpu_image, &crop_image, 48, 8)" (() "(" (pointer_expression) "&kpu_image" (&) "&" (identifier) "kpu_image" (,) "," (pointer_expression) "&crop_image" (&) "&" (identifier) "crop_image" (,) "," (number_literal) "48" (,) "," (number_literal) "8" ()) ")" (;) ";" (expression_statement) "g_ai_done_flag = 0;" (assignment_expression) "g_ai_done_flag = 0" (identifier) "g_ai_done_flag" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0) \n { \n printf("Cannot run kmodel.\n"); \n return(-1); \n }" (if) "if" (parenthesized_expression) "(kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0)" (() "(" (binary_expression) "kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0" (call_expression) "kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL)" (identifier) "kpu_run_kmodel" (argument_list) "(&task, crop_image.addr, 5, ai_done, NULL)" (() "(" (pointer_expression) "&task" (&) "&" (identifier) "task" (,) "," (field_expression) "crop_image.addr" (identifier) "crop_image" (.) "." (field_identifier) "addr" (,) "," (number_literal) "5" (,) "," (identifier) "ai_done" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{ \n printf("Cannot run kmodel.\n"); \n return(-1); \n }" ({) "{" (expression_statement) "printf("Cannot run kmodel.\n");" (call_expression) "printf("Cannot run kmodel.\n")" (identifier) "printf" (argument_list) "("Cannot run kmodel.\n")" (() "(" (string_literal) ""Cannot run kmodel.\n"" (") """ (string_content) "Cannot run kmodel." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return(-1);" (return) "return" (parenthesized_expression) "(-1)" (() "(" (number_literal) "-1" ()) ")" (;) ";" (}) "}" (while_statement) "while (!g_ai_done_flag);" (while) "while" (parenthesized_expression) "(!g_ai_done_flag)" (() "(" (unary_expression) "!g_ai_done_flag" (!) "!" (identifier) "g_ai_done_flag" ()) ")" (expression_statement) ";" (;) ";" (declaration) "float *features;" (primitive_type) "float" (pointer_declarator) "*features" (*) "*" (identifier) "features" (;) ";" (declaration) "size_t output_size;" (primitive_type) "size_t" (identifier) "output_size" (;) ";" (expression_statement) "kpu_get_output(&task, 0, &features, &output_size);" (call_expression) "kpu_get_output(&task, 0, &features, &output_size)" (identifier) "kpu_get_output" (argument_list) "(&task, 0, &features, &output_size)" (() "(" (pointer_expression) "&task" (&) "&" (identifier) "task" (,) "," (number_literal) "0" (,) "," (pointer_expression) "&features" (&) "&" (identifier) "features" (,) "," (pointer_expression) "&output_size" (&) "&" (identifier) "output_size" ()) ")" (;) ";" (declaration) "size_t cls = argmax(features, 5);" (primitive_type) "size_t" (init_declarator) "cls = argmax(features, 5)" (identifier) "cls" (=) "=" (call_expression) "argmax(features, 5)" (identifier) "argmax" (argument_list) "(features, 5)" (() "(" (identifier) "features" (,) "," (number_literal) "5" ()) ")" (;) ";" (declaration) "const char *text = NULL;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "*text = NULL" (pointer_declarator) "*text" (*) "*" (identifier) "text" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (switch_statement) "switch (cls) \n { \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n }" (switch) "switch" (parenthesized_expression) "(cls)" (() "(" (identifier) "cls" ()) ")" (compound_statement) "{ \n case 0: \n text = "daisy"; \n break; \n case 1: \n text = "dandelion"; \n break; \n case 2: \n text = "roses"; \n break; \n case 3: \n text = "sunflowers"; \n break; \n case 4: \n text = "tulip"; \n break; \n }" ({) "{" (case_statement) "case 0: \n text = "daisy"; \n break;" (case) "case" (number_literal) "0" (:) ":" (expression_statement) "text = "daisy";" (assignment_expression) "text = "daisy"" (identifier) "text" (=) "=" (string_literal) ""daisy"" (") """ (string_content) "daisy" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 1: \n text = "dandelion"; \n break;" (case) "case" (number_literal) "1" (:) ":" (expression_statement) "text = "dandelion";" (assignment_expression) "text = "dandelion"" (identifier) "text" (=) "=" (string_literal) ""dandelion"" (") """ (string_content) "dandelion" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 2: \n text = "roses"; \n break;" (case) "case" (number_literal) "2" (:) ":" (expression_statement) "text = "roses";" (assignment_expression) "text = "roses"" (identifier) "text" (=) "=" (string_literal) ""roses"" (") """ (string_content) "roses" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 3: \n text = "sunflowers"; \n break;" (case) "case" (number_literal) "3" (:) ":" (expression_statement) "text = "sunflowers";" (assignment_expression) "text = "sunflowers"" (identifier) "text" (=) "=" (string_literal) ""sunflowers"" (") """ (string_content) "sunflowers" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 4: \n text = "tulip"; \n break;" (case) "case" (number_literal) "4" (:) ":" (expression_statement) "text = "tulip";" (assignment_expression) "text = "tulip"" (identifier) "text" (=) "=" (string_literal) ""tulip"" (") """ (string_content) "tulip" (") """ (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (comment) "/* display pic*/" (if_statement) "if (features[cls] > PROB_THRESH) \n ram_draw_string(display_image.addr, 150, 20, text, RED);" (if) "if" (parenthesized_expression) "(features[cls] > PROB_THRESH)" (() "(" (binary_expression) "features[cls] > PROB_THRESH" (subscript_expression) "features[cls]" (identifier) "features" ([) "[" (identifier) "cls" (]) "]" (>) ">" (identifier) "PROB_THRESH" ()) ")" (expression_statement) "ram_draw_string(display_image.addr, 150, 20, text, RED);" (call_expression) "ram_draw_string(display_image.addr, 150, 20, text, RED)" (identifier) "ram_draw_string" (argument_list) "(display_image.addr, 150, 20, text, RED)" (() "(" (field_expression) "display_image.addr" (identifier) "display_image" (.) "." (field_identifier) "addr" (,) "," (number_literal) "150" (,) "," (number_literal) "20" (,) "," (identifier) "text" (,) "," (identifier) "RED" ()) ")" (;) ";" (expression_statement) "lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr);" (call_expression) "lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr)" (identifier) "lcd_draw_picture" (argument_list) "(0, 0, 320, 240, (uint32_t *)display_image.addr)" (() "(" (number_literal) "0" (,) "," (number_literal) "0" (,) "," (number_literal) "320" (,) "," (number_literal) "240" (,) "," (cast_expression) "(uint32_t *)display_image.addr" (() "(" (type_descriptor) "uint32_t *" (primitive_type) "uint32_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "display_image.addr" (identifier) "display_image" (.) "." (field_identifier) "addr" ()) ")" (;) ";" (}) "}" (}) "}"
1,507
0
{"language": "c", "success": true, "metadata": {"lines": 239, "avg_line_length": 27.57, "nodes": 827, "errors": 0, "source_hash": "83eac9474edb9a661cbf7cdabb6c6a9acb98326fe451688425cf5882224a85b6", "categorized_nodes": 603}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include \"kpu.h\"\r\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": "string_literal", "text": "\"kpu.h\"", "parent": 3, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include \"sysctl.h\"\r\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": "\"sysctl.h\"", "parent": 6, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"plic.h\"\r\n", "parent": null, "children": [10, 11], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"plic.h\"", "parent": 9, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include \"utils.h\"\r\n", "parent": null, "children": [13, 14], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"utils.h\"", "parent": 12, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <float.h>\r\n", "parent": null, "children": [16, 17], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<float.h>", "parent": 15, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include \"fpioa.h\"\r\n", "parent": null, "children": [19, 20], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"fpioa.h\"", "parent": 18, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 18}}, {"id": 21, "type": "preproc_include", "text": "#include \"lcd.h\"\r\n", "parent": null, "children": [22, 23], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"lcd.h\"", "parent": 21, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 16}}, {"id": 24, "type": "preproc_include", "text": "#include \"dvp.h\"\r\n", "parent": null, "children": [25, 26], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"dvp.h\"", "parent": 24, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 16}}, {"id": 27, "type": "preproc_include", "text": "#include \"ov2640.h\"\r\n", "parent": null, "children": [28, 29], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"ov2640.h\"", "parent": 27, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 30, "type": "preproc_include", "text": "#include \"image_process.h\"\r\n", "parent": null, "children": [31, 32], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"image_process.h\"", "parent": 30, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 26}}, {"id": 33, "type": "preproc_include", "text": "#include \"board_config.h\"\r\n", "parent": null, "children": [34, 35], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"board_config.h\"", "parent": 33, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 25}}, {"id": 36, "type": "preproc_include", "text": "#include \"gpiohs.h\"\r\n", "parent": null, "children": [37, 38], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"gpiohs.h\"", "parent": 36, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 19}}, {"id": 39, "type": "preproc_def", "text": "#define INCBIN_STYLE INCBIN_STYLE_SNAKE\r\n", "parent": null, "children": [40, 41, 42], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 41, "type": "identifier", "text": "INCBIN_STYLE", "parent": 39, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 20}}, {"id": 42, "type": "preproc_arg", "text": "INCBIN_STYLE_SNAKE\r", "parent": 39, "children": [], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 40}}, {"id": 43, "type": "preproc_def", "text": "#define INCBIN_PREFIX\r\n", "parent": null, "children": [44, 45], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 45, "type": "identifier", "text": "INCBIN_PREFIX", "parent": 43, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 21}}, {"id": 46, "type": "preproc_include", "text": "#include \"incbin.h\"\r\n", "parent": null, "children": [47, 48], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 47, "type": "#include", "text": "#include", "parent": 46, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 48, "type": "string_literal", "text": "\"incbin.h\"", "parent": 46, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 19}}, {"id": 49, "type": "preproc_def", "text": "#define PROB_THRESH (0.7f)\r\n", "parent": null, "children": [50, 51, 52], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 50, "type": "#define", "text": "#define", "parent": 49, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 51, "type": "identifier", "text": "PROB_THRESH", "parent": 49, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 19}}, {"id": 52, "type": "preproc_arg", "text": "(0.7f)\r", "parent": 49, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 31}}, {"id": 53, "type": "preproc_def", "text": "#define PLL0_OUTPUT_FREQ 800000000UL\r\n", "parent": null, "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": "PLL0_OUTPUT_FREQ", "parent": 53, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 24}}, {"id": 56, "type": "preproc_arg", "text": "800000000UL\r", "parent": 53, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 37}}, {"id": 57, "type": "preproc_def", "text": "#define PLL1_OUTPUT_FREQ 400000000UL\r\n", "parent": null, "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": "PLL1_OUTPUT_FREQ", "parent": 57, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 24}}, {"id": 60, "type": "preproc_arg", "text": "400000000UL\r", "parent": 57, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 37}}, {"id": 61, "type": "declaration", "text": "volatile uint32_t g_ai_done_flag;", "parent": null, "children": [62, 64, 65], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 33}}, {"id": 62, "type": "type_qualifier", "text": "volatile", "parent": 61, "children": [63], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 63, "type": "volatile", "text": "volatile", "parent": 62, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 64, "type": "primitive_type", "text": "uint32_t", "parent": 61, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 17}}, {"id": 65, "type": "identifier", "text": "g_ai_done_flag", "parent": 61, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 32}}, {"id": 66, "type": "declaration", "text": "volatile uint8_t g_dvp_finish_flag;", "parent": null, "children": [67, 69, 70], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 35}}, {"id": 67, "type": "type_qualifier", "text": "volatile", "parent": 66, "children": [68], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 68, "type": "volatile", "text": "volatile", "parent": 67, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 69, "type": "primitive_type", "text": "uint8_t", "parent": 66, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 16}}, {"id": 70, "type": "identifier", "text": "g_dvp_finish_flag", "parent": 66, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 34}}, {"id": 71, "type": "declaration", "text": "static image_t kpu_image, display_image, crop_image;", "parent": null, "children": [72, 73, 74, 75], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 52}}, {"id": 72, "type": "type_identifier", "text": "image_t", "parent": 71, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 14}}, {"id": 73, "type": "identifier", "text": "kpu_image", "parent": 71, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 24}}, {"id": 74, "type": "identifier", "text": "display_image", "parent": 71, "children": [], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 39}}, {"id": 75, "type": "identifier", "text": "crop_image", "parent": 71, "children": [], "start_point": {"row": 38, "column": 41}, "end_point": {"row": 38, "column": 51}}, {"id": 76, "type": "declaration", "text": "kpu_model_context_t task;", "parent": null, "children": [77, 78], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 25}}, {"id": 77, "type": "type_identifier", "text": "kpu_model_context_t", "parent": 76, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 19}}, {"id": 78, "type": "identifier", "text": "task", "parent": 76, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 24}}, {"id": 79, "type": "call_expression", "text": "INCBIN(model, \"class.kmodel\")", "parent": null, "children": [80, 81], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 29}}, {"id": 80, "type": "identifier", "text": "INCBIN", "parent": 79, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 6}}, {"id": 81, "type": "argument_list", "text": "(model, \"class.kmodel\")", "parent": 79, "children": [82, 83], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 29}}, {"id": 82, "type": "identifier", "text": "model", "parent": 81, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 12}}, {"id": 83, "type": "string_literal", "text": "\"class.kmodel\"", "parent": 81, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 28}}, {"id": 84, "type": "function_definition", "text": "static int ai_done(void* userdata)\r\n{\r\n g_ai_done_flag = 1;\r\n float *features;\r\n size_t count;\r\n kpu_get_output(&task, 0, (uint8_t **)&features, &count);\r\n count /= sizeof(float);\r\n\r\n size_t i;\r\n for (i = 0; i < count; i++)\r\n {\r\n if (i % 64 == 0)\r\n printf(\"\\n\");\r\n printf(\"%f, \", features[i]);\r\n }\r\n\r\n printf(\"\\n\");\r\n return 0;\r\n}", "parent": null, "children": [85, 86], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 84, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 10}}, {"id": 86, "type": "function_declarator", "text": "ai_done(void* userdata)", "parent": 84, "children": [87, 88], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 34}}, {"id": 87, "type": "identifier", "text": "ai_done", "parent": 86, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 18}}, {"id": 88, "type": "parameter_list", "text": "(void* userdata)", "parent": 86, "children": [89], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 34}}, {"id": 89, "type": "parameter_declaration", "text": "void* userdata", "parent": 88, "children": [90, 91], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 33}}, {"id": 90, "type": "primitive_type", "text": "void", "parent": 89, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 23}}, {"id": 91, "type": "pointer_declarator", "text": "* userdata", "parent": 89, "children": [92, 93], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 33}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 24}}, {"id": 93, "type": "identifier", "text": "userdata", "parent": 91, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 33}}, {"id": 94, "type": "assignment_expression", "text": "g_ai_done_flag = 1", "parent": 84, "children": [95, 96, 97], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 22}}, {"id": 95, "type": "identifier", "text": "g_ai_done_flag", "parent": 94, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 18}}, {"id": 96, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 97, "type": "number_literal", "text": "1", "parent": 94, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 98, "type": "declaration", "text": "float *features;", "parent": 84, "children": [99, 100], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 20}}, {"id": 99, "type": "primitive_type", "text": "float", "parent": 98, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 9}}, {"id": 100, "type": "pointer_declarator", "text": "*features", "parent": 98, "children": [101, 102], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 19}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 102, "type": "identifier", "text": "features", "parent": 100, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 19}}, {"id": 103, "type": "declaration", "text": "size_t count;", "parent": 84, "children": [104, 105], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 17}}, {"id": 104, "type": "primitive_type", "text": "size_t", "parent": 103, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 10}}, {"id": 105, "type": "identifier", "text": "count", "parent": 103, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 16}}, {"id": 106, "type": "call_expression", "text": "kpu_get_output(&task, 0, (uint8_t **)&features, &count)", "parent": 84, "children": [107, 108], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 59}}, {"id": 107, "type": "identifier", "text": "kpu_get_output", "parent": 106, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 18}}, {"id": 108, "type": "argument_list", "text": "(&task, 0, (uint8_t **)&features, &count)", "parent": 106, "children": [109, 111, 112, 121], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 59}}, {"id": 109, "type": "pointer_expression", "text": "&task", "parent": 108, "children": [110], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 24}}, {"id": 110, "type": "identifier", "text": "task", "parent": 109, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 24}}, {"id": 111, "type": "number_literal", "text": "0", "parent": 108, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 27}}, {"id": 112, "type": "cast_expression", "text": "(uint8_t **)&features", "parent": 108, "children": [113, 119], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 50}}, {"id": 113, "type": "type_descriptor", "text": "uint8_t **", "parent": 112, "children": [114, 115], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 40}}, {"id": 114, "type": "primitive_type", "text": "uint8_t", "parent": 113, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 37}}, {"id": 115, "type": "abstract_pointer_declarator", "text": "**", "parent": 113, "children": [116, 117], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 40}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 39}}, {"id": 117, "type": "abstract_pointer_declarator", "text": "*", "parent": 115, "children": [118], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 40}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 40}}, {"id": 119, "type": "pointer_expression", "text": "&features", "parent": 112, "children": [120], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 50}}, {"id": 120, "type": "identifier", "text": "features", "parent": 119, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 50}}, {"id": 121, "type": "pointer_expression", "text": "&count", "parent": 108, "children": [122], "start_point": {"row": 49, "column": 52}, "end_point": {"row": 49, "column": 58}}, {"id": 122, "type": "identifier", "text": "count", "parent": 121, "children": [], "start_point": {"row": 49, "column": 53}, "end_point": {"row": 49, "column": 58}}, {"id": 123, "type": "assignment_expression", "text": "count /= sizeof(float)", "parent": 84, "children": [124, 125, 126], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 26}}, {"id": 124, "type": "identifier", "text": "count", "parent": 123, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 9}}, {"id": 125, "type": "/=", "text": "/=", "parent": 123, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 12}}, {"id": 126, "type": "sizeof_expression", "text": "sizeof(float)", "parent": 123, "children": [127], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 26}}, {"id": 127, "type": "type_descriptor", "text": "float", "parent": 126, "children": [128], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 25}}, {"id": 128, "type": "primitive_type", "text": "float", "parent": 127, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 25}}, {"id": 129, "type": "declaration", "text": "size_t i;", "parent": 84, "children": [130, 131], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 13}}, {"id": 130, "type": "primitive_type", "text": "size_t", "parent": 129, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 10}}, {"id": 131, "type": "identifier", "text": "i", "parent": 129, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 12}}, {"id": 132, "type": "for_statement", "text": "for (i = 0; i < count; i++)\r\n {\r\n if (i % 64 == 0)\r\n printf(\"\\n\");\r\n printf(\"%f, \", features[i]);\r\n }", "parent": 84, "children": [133, 137, 141], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 58, "column": 5}}, {"id": 133, "type": "assignment_expression", "text": "i = 0", "parent": 132, "children": [134, 135, 136], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 14}}, {"id": 134, "type": "identifier", "text": "i", "parent": 133, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 10}}, {"id": 135, "type": "=", "text": "=", "parent": 133, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 12}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 133, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 14}}, {"id": 137, "type": "binary_expression", "text": "i < count", "parent": 132, "children": [138, 139, 140], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 25}}, {"id": 138, "type": "identifier", "text": "i", "parent": 137, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 17}}, {"id": 139, "type": "<", "text": "<", "parent": 137, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 19}}, {"id": 140, "type": "identifier", "text": "count", "parent": 137, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 25}}, {"id": 141, "type": "update_expression", "text": "i++", "parent": 132, "children": [142, 143], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 30}}, {"id": 142, "type": "identifier", "text": "i", "parent": 141, "children": [], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 28}}, {"id": 143, "type": "++", "text": "++", "parent": 141, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 30}}, {"id": 144, "type": "if_statement", "text": "if (i % 64 == 0)\r\n printf(\"\\n\");", "parent": 132, "children": [145], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 56, "column": 25}}, {"id": 145, "type": "parenthesized_expression", "text": "(i % 64 == 0)", "parent": 144, "children": [146], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 24}}, {"id": 146, "type": "binary_expression", "text": "i % 64 == 0", "parent": 145, "children": [147, 151, 152], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 23}}, {"id": 147, "type": "binary_expression", "text": "i % 64", "parent": 146, "children": [148, 149, 150], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 18}}, {"id": 148, "type": "identifier", "text": "i", "parent": 147, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 13}}, {"id": 149, "type": "%", "text": "%", "parent": 147, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 15}}, {"id": 150, "type": "number_literal", "text": "64", "parent": 147, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 18}}, {"id": 151, "type": "==", "text": "==", "parent": 146, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 21}}, {"id": 152, "type": "number_literal", "text": "0", "parent": 146, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 153, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 144, "children": [154, 155], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 24}}, {"id": 154, "type": "identifier", "text": "printf", "parent": 153, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 18}}, {"id": 155, "type": "argument_list", "text": "(\"\\n\")", "parent": 153, "children": [156], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 24}}, {"id": 156, "type": "string_literal", "text": "\"\\n\"", "parent": 155, "children": [157], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 23}}, {"id": 157, "type": "escape_sequence", "text": "\\n", "parent": 156, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 22}}, {"id": 158, "type": "call_expression", "text": "printf(\"%f, \", features[i])", "parent": 132, "children": [159, 160], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 35}}, {"id": 159, "type": "identifier", "text": "printf", "parent": 158, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 14}}, {"id": 160, "type": "argument_list", "text": "(\"%f, \", features[i])", "parent": 158, "children": [161, 162], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 35}}, {"id": 161, "type": "string_literal", "text": "\"%f, \"", "parent": 160, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 21}}, {"id": 162, "type": "subscript_expression", "text": "features[i]", "parent": 160, "children": [163, 164], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 34}}, {"id": 163, "type": "identifier", "text": "features", "parent": 162, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 31}}, {"id": 164, "type": "identifier", "text": "i", "parent": 162, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 33}}, {"id": 165, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 84, "children": [166, 167], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 16}}, {"id": 166, "type": "identifier", "text": "printf", "parent": 165, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 10}}, {"id": 167, "type": "argument_list", "text": "(\"\\n\")", "parent": 165, "children": [168], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 16}}, {"id": 168, "type": "string_literal", "text": "\"\\n\"", "parent": 167, "children": [169], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 15}}, {"id": 169, "type": "escape_sequence", "text": "\\n", "parent": 168, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 14}}, {"id": 170, "type": "return_statement", "text": "return 0;", "parent": 84, "children": [171], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 13}}, {"id": 171, "type": "number_literal", "text": "0", "parent": 170, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 172, "type": "function_definition", "text": "static int dvp_irq(void *ctx)\r\n{\r\n if (dvp_get_interrupt(DVP_STS_FRAME_FINISH))\r\n {\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);\r\n dvp_clear_interrupt(DVP_STS_FRAME_FINISH);\r\n g_dvp_finish_flag = 1;\r\n }\r\n else\r\n {\r\n dvp_start_convert();\r\n dvp_clear_interrupt(DVP_STS_FRAME_START);\r\n }\r\n return 0;\r\n}", "parent": null, "children": [173, 174], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 78, "column": 1}}, {"id": 173, "type": "primitive_type", "text": "int", "parent": 172, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 10}}, {"id": 174, "type": "function_declarator", "text": "dvp_irq(void *ctx)", "parent": 172, "children": [175, 176], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 29}}, {"id": 175, "type": "identifier", "text": "dvp_irq", "parent": 174, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 18}}, {"id": 176, "type": "parameter_list", "text": "(void *ctx)", "parent": 174, "children": [177], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 29}}, {"id": 177, "type": "parameter_declaration", "text": "void *ctx", "parent": 176, "children": [178, 179], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 28}}, {"id": 178, "type": "primitive_type", "text": "void", "parent": 177, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 23}}, {"id": 179, "type": "pointer_declarator", "text": "*ctx", "parent": 177, "children": [180, 181], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 28}}, {"id": 180, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 25}}, {"id": 181, "type": "identifier", "text": "ctx", "parent": 179, "children": [], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 28}}, {"id": 182, "type": "if_statement", "text": "if (dvp_get_interrupt(DVP_STS_FRAME_FINISH))\r\n {\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);\r\n dvp_clear_interrupt(DVP_STS_FRAME_FINISH);\r\n g_dvp_finish_flag = 1;\r\n }\r\n else\r\n {\r\n dvp_start_convert();\r\n dvp_clear_interrupt(DVP_STS_FRAME_START);\r\n }", "parent": 172, "children": [183, 203], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 76, "column": 5}}, {"id": 183, "type": "parenthesized_expression", "text": "(dvp_get_interrupt(DVP_STS_FRAME_FINISH))", "parent": 182, "children": [184], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 48}}, {"id": 184, "type": "call_expression", "text": "dvp_get_interrupt(DVP_STS_FRAME_FINISH)", "parent": 183, "children": [185, 186], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 47}}, {"id": 185, "type": "identifier", "text": "dvp_get_interrupt", "parent": 184, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 25}}, {"id": 186, "type": "argument_list", "text": "(DVP_STS_FRAME_FINISH)", "parent": 184, "children": [187], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 47}}, {"id": 187, "type": "identifier", "text": "DVP_STS_FRAME_FINISH", "parent": 186, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 46}}, {"id": 188, "type": "call_expression", "text": "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)", "parent": 182, "children": [189, 190], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 85}}, {"id": 189, "type": "identifier", "text": "dvp_config_interrupt", "parent": 188, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 28}}, {"id": 190, "type": "argument_list", "text": "(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)", "parent": 188, "children": [191, 194], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 85}}, {"id": 191, "type": "binary_expression", "text": "DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE", "parent": 190, "children": [192, 193], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 81}}, {"id": 192, "type": "identifier", "text": "DVP_CFG_START_INT_ENABLE", "parent": 191, "children": [], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 53}}, {"id": 193, "type": "identifier", "text": "DVP_CFG_FINISH_INT_ENABLE", "parent": 191, "children": [], "start_point": {"row": 68, "column": 56}, "end_point": {"row": 68, "column": 81}}, {"id": 194, "type": "number_literal", "text": "0", "parent": 190, "children": [], "start_point": {"row": 68, "column": 83}, "end_point": {"row": 68, "column": 84}}, {"id": 195, "type": "call_expression", "text": "dvp_clear_interrupt(DVP_STS_FRAME_FINISH)", "parent": 182, "children": [196, 197], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 49}}, {"id": 196, "type": "identifier", "text": "dvp_clear_interrupt", "parent": 195, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 27}}, {"id": 197, "type": "argument_list", "text": "(DVP_STS_FRAME_FINISH)", "parent": 195, "children": [198], "start_point": {"row": 69, "column": 27}, "end_point": {"row": 69, "column": 49}}, {"id": 198, "type": "identifier", "text": "DVP_STS_FRAME_FINISH", "parent": 197, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 48}}, {"id": 199, "type": "assignment_expression", "text": "g_dvp_finish_flag = 1", "parent": 182, "children": [200, 201, 202], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 29}}, {"id": 200, "type": "identifier", "text": "g_dvp_finish_flag", "parent": 199, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 25}}, {"id": 201, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 27}}, {"id": 202, "type": "number_literal", "text": "1", "parent": 199, "children": [], "start_point": {"row": 70, "column": 28}, "end_point": {"row": 70, "column": 29}}, {"id": 203, "type": "else_clause", "text": "else\r\n {\r\n dvp_start_convert();\r\n dvp_clear_interrupt(DVP_STS_FRAME_START);\r\n }", "parent": 182, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 76, "column": 5}}, {"id": 204, "type": "call_expression", "text": "dvp_start_convert()", "parent": 203, "children": [205, 206], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 27}}, {"id": 205, "type": "identifier", "text": "dvp_start_convert", "parent": 204, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 25}}, {"id": 206, "type": "argument_list", "text": "()", "parent": 204, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 27}}, {"id": 207, "type": "call_expression", "text": "dvp_clear_interrupt(DVP_STS_FRAME_START)", "parent": 203, "children": [208, 209], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 48}}, {"id": 208, "type": "identifier", "text": "dvp_clear_interrupt", "parent": 207, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 27}}, {"id": 209, "type": "argument_list", "text": "(DVP_STS_FRAME_START)", "parent": 207, "children": [210], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 48}}, {"id": 210, "type": "identifier", "text": "DVP_STS_FRAME_START", "parent": 209, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 47}}, {"id": 211, "type": "return_statement", "text": "return 0;", "parent": 172, "children": [212], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 13}}, {"id": 212, "type": "number_literal", "text": "0", "parent": 211, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 12}}, {"id": 213, "type": "function_definition", "text": "static void io_init(void)\r\n{\r\n /* Init DVP IO map and function settings */\r\n fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST);\r\n fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN);\r\n fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK);\r\n fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC);\r\n fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF);\r\n fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK);\r\n fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK);\r\n fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA);\r\n\r\n /* Init SPI IO map and function settings */\r\n fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO);\r\n fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3);\r\n fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK);\r\n fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO);\r\n\r\n sysctl_set_spi0_dvp_data(1);\r\n\r\n // LCD Backlight\r\n fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO);\r\n gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT);\r\n gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW);\r\n}", "parent": null, "children": [214, 215], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 214, "type": "primitive_type", "text": "void", "parent": 213, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 11}}, {"id": 215, "type": "function_declarator", "text": "io_init(void)", "parent": 213, "children": [216, 217], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 25}}, {"id": 216, "type": "identifier", "text": "io_init", "parent": 215, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 19}}, {"id": 217, "type": "parameter_list", "text": "(void)", "parent": 215, "children": [218], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 25}}, {"id": 218, "type": "parameter_declaration", "text": "void", "parent": 217, "children": [219], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 24}}, {"id": 219, "type": "primitive_type", "text": "void", "parent": 218, "children": [], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 24}}, {"id": 220, "type": "call_expression", "text": "fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST)", "parent": 213, "children": [221, 222], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 49}}, {"id": 221, "type": "identifier", "text": "fpioa_set_function", "parent": 220, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 22}}, {"id": 222, "type": "argument_list", "text": "(OV_RST_PIN, FUNC_CMOS_RST)", "parent": 220, "children": [223, 224], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 49}}, {"id": 223, "type": "identifier", "text": "OV_RST_PIN", "parent": 222, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 33}}, {"id": 224, "type": "identifier", "text": "FUNC_CMOS_RST", "parent": 222, "children": [], "start_point": {"row": 83, "column": 35}, "end_point": {"row": 83, "column": 48}}, {"id": 225, "type": "call_expression", "text": "fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN)", "parent": 213, "children": [226, 227], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 51}}, {"id": 226, "type": "identifier", "text": "fpioa_set_function", "parent": 225, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 22}}, {"id": 227, "type": "argument_list", "text": "(OV_PWDN_PIN, FUNC_CMOS_PWDN)", "parent": 225, "children": [228, 229], "start_point": {"row": 84, "column": 22}, "end_point": {"row": 84, "column": 51}}, {"id": 228, "type": "identifier", "text": "OV_PWDN_PIN", "parent": 227, "children": [], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 34}}, {"id": 229, "type": "identifier", "text": "FUNC_CMOS_PWDN", "parent": 227, "children": [], "start_point": {"row": 84, "column": 36}, "end_point": {"row": 84, "column": 50}}, {"id": 230, "type": "call_expression", "text": "fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK)", "parent": 213, "children": [231, 232], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 51}}, {"id": 231, "type": "identifier", "text": "fpioa_set_function", "parent": 230, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 22}}, {"id": 232, "type": "argument_list", "text": "(OV_XCLK_PIN, FUNC_CMOS_XCLK)", "parent": 230, "children": [233, 234], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 51}}, {"id": 233, "type": "identifier", "text": "OV_XCLK_PIN", "parent": 232, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 34}}, {"id": 234, "type": "identifier", "text": "FUNC_CMOS_XCLK", "parent": 232, "children": [], "start_point": {"row": 85, "column": 36}, "end_point": {"row": 85, "column": 50}}, {"id": 235, "type": "call_expression", "text": "fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC)", "parent": 213, "children": [236, 237], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 53}}, {"id": 236, "type": "identifier", "text": "fpioa_set_function", "parent": 235, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 22}}, {"id": 237, "type": "argument_list", "text": "(OV_VSYNC_PIN, FUNC_CMOS_VSYNC)", "parent": 235, "children": [238, 239], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 53}}, {"id": 238, "type": "identifier", "text": "OV_VSYNC_PIN", "parent": 237, "children": [], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 35}}, {"id": 239, "type": "identifier", "text": "FUNC_CMOS_VSYNC", "parent": 237, "children": [], "start_point": {"row": 86, "column": 37}, "end_point": {"row": 86, "column": 52}}, {"id": 240, "type": "call_expression", "text": "fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF)", "parent": 213, "children": [241, 242], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 51}}, {"id": 241, "type": "identifier", "text": "fpioa_set_function", "parent": 240, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 22}}, {"id": 242, "type": "argument_list", "text": "(OV_HREF_PIN, FUNC_CMOS_HREF)", "parent": 240, "children": [243, 244], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 51}}, {"id": 243, "type": "identifier", "text": "OV_HREF_PIN", "parent": 242, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 34}}, {"id": 244, "type": "identifier", "text": "FUNC_CMOS_HREF", "parent": 242, "children": [], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 50}}, {"id": 245, "type": "call_expression", "text": "fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK)", "parent": 213, "children": [246, 247], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 51}}, {"id": 246, "type": "identifier", "text": "fpioa_set_function", "parent": 245, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 22}}, {"id": 247, "type": "argument_list", "text": "(OV_PCLK_PIN, FUNC_CMOS_PCLK)", "parent": 245, "children": [248, 249], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 51}}, {"id": 248, "type": "identifier", "text": "OV_PCLK_PIN", "parent": 247, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 34}}, {"id": 249, "type": "identifier", "text": "FUNC_CMOS_PCLK", "parent": 247, "children": [], "start_point": {"row": 88, "column": 36}, "end_point": {"row": 88, "column": 50}}, {"id": 250, "type": "call_expression", "text": "fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK)", "parent": 213, "children": [251, 252], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 56}}, {"id": 251, "type": "identifier", "text": "fpioa_set_function", "parent": 250, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 22}}, {"id": 252, "type": "argument_list", "text": "(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK)", "parent": 250, "children": [253, 254], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 56}}, {"id": 253, "type": "identifier", "text": "OV_SCCB_SCLK_PIN", "parent": 252, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 39}}, {"id": 254, "type": "identifier", "text": "FUNC_SCCB_SCLK", "parent": 252, "children": [], "start_point": {"row": 89, "column": 41}, "end_point": {"row": 89, "column": 55}}, {"id": 255, "type": "call_expression", "text": "fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA)", "parent": 213, "children": [256, 257], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 54}}, {"id": 256, "type": "identifier", "text": "fpioa_set_function", "parent": 255, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 22}}, {"id": 257, "type": "argument_list", "text": "(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA)", "parent": 255, "children": [258, 259], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 54}}, {"id": 258, "type": "identifier", "text": "OV_SCCB_SDA_PIN", "parent": 257, "children": [], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 38}}, {"id": 259, "type": "identifier", "text": "FUNC_SCCB_SDA", "parent": 257, "children": [], "start_point": {"row": 90, "column": 40}, "end_point": {"row": 90, "column": 53}}, {"id": 260, "type": "call_expression", "text": "fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO)", "parent": 213, "children": [261, 262], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 60}}, {"id": 261, "type": "identifier", "text": "fpioa_set_function", "parent": 260, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 22}}, {"id": 262, "type": "argument_list", "text": "(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO)", "parent": 260, "children": [263, 264], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 60}}, {"id": 263, "type": "identifier", "text": "LCD_DC_PIN", "parent": 262, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 33}}, {"id": 264, "type": "binary_expression", "text": "FUNC_GPIOHS0 + LCD_DC_IO", "parent": 262, "children": [265, 266, 267], "start_point": {"row": 93, "column": 35}, "end_point": {"row": 93, "column": 59}}, {"id": 265, "type": "identifier", "text": "FUNC_GPIOHS0", "parent": 264, "children": [], "start_point": {"row": 93, "column": 35}, "end_point": {"row": 93, "column": 47}}, {"id": 266, "type": "+", "text": "+", "parent": 264, "children": [], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 49}}, {"id": 267, "type": "identifier", "text": "LCD_DC_IO", "parent": 264, "children": [], "start_point": {"row": 93, "column": 50}, "end_point": {"row": 93, "column": 59}}, {"id": 268, "type": "call_expression", "text": "fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3)", "parent": 213, "children": [269, 270], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 49}}, {"id": 269, "type": "identifier", "text": "fpioa_set_function", "parent": 268, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 22}}, {"id": 270, "type": "argument_list", "text": "(LCD_CS_PIN, FUNC_SPI0_SS3)", "parent": 268, "children": [271, 272], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 49}}, {"id": 271, "type": "identifier", "text": "LCD_CS_PIN", "parent": 270, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 33}}, {"id": 272, "type": "identifier", "text": "FUNC_SPI0_SS3", "parent": 270, "children": [], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 48}}, {"id": 273, "type": "call_expression", "text": "fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK)", "parent": 213, "children": [274, 275], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 50}}, {"id": 274, "type": "identifier", "text": "fpioa_set_function", "parent": 273, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 22}}, {"id": 275, "type": "argument_list", "text": "(LCD_RW_PIN, FUNC_SPI0_SCLK)", "parent": 273, "children": [276, 277], "start_point": {"row": 95, "column": 22}, "end_point": {"row": 95, "column": 50}}, {"id": 276, "type": "identifier", "text": "LCD_RW_PIN", "parent": 275, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 33}}, {"id": 277, "type": "identifier", "text": "FUNC_SPI0_SCLK", "parent": 275, "children": [], "start_point": {"row": 95, "column": 35}, "end_point": {"row": 95, "column": 49}}, {"id": 278, "type": "call_expression", "text": "fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO)", "parent": 213, "children": [279, 280], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 62}}, {"id": 279, "type": "identifier", "text": "fpioa_set_function", "parent": 278, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 22}}, {"id": 280, "type": "argument_list", "text": "(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO)", "parent": 278, "children": [281, 282], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 62}}, {"id": 281, "type": "identifier", "text": "LCD_RST_PIN", "parent": 280, "children": [], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 34}}, {"id": 282, "type": "binary_expression", "text": "FUNC_GPIOHS0 + LCD_RST_IO", "parent": 280, "children": [283, 284, 285], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 61}}, {"id": 283, "type": "identifier", "text": "FUNC_GPIOHS0", "parent": 282, "children": [], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 48}}, {"id": 284, "type": "+", "text": "+", "parent": 282, "children": [], "start_point": {"row": 96, "column": 49}, "end_point": {"row": 96, "column": 50}}, {"id": 285, "type": "identifier", "text": "LCD_RST_IO", "parent": 282, "children": [], "start_point": {"row": 96, "column": 51}, "end_point": {"row": 96, "column": 61}}, {"id": 286, "type": "call_expression", "text": "sysctl_set_spi0_dvp_data(1)", "parent": 213, "children": [287, 288], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 31}}, {"id": 287, "type": "identifier", "text": "sysctl_set_spi0_dvp_data", "parent": 286, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 28}}, {"id": 288, "type": "argument_list", "text": "(1)", "parent": 286, "children": [289], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 31}}, {"id": 289, "type": "number_literal", "text": "1", "parent": 288, "children": [], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 30}}, {"id": 290, "type": "call_expression", "text": "fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO)", "parent": 213, "children": [291, 292], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 68}}, {"id": 291, "type": "identifier", "text": "fpioa_set_function", "parent": 290, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 22}}, {"id": 292, "type": "argument_list", "text": "(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO)", "parent": 290, "children": [293, 294], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 68}}, {"id": 293, "type": "identifier", "text": "LCD_BLIGHT_PIN", "parent": 292, "children": [], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 37}}, {"id": 294, "type": "binary_expression", "text": "FUNC_GPIOHS0 + LCD_BLIGHT_IO", "parent": 292, "children": [295, 296, 297], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 67}}, {"id": 295, "type": "identifier", "text": "FUNC_GPIOHS0", "parent": 294, "children": [], "start_point": {"row": 101, "column": 39}, "end_point": {"row": 101, "column": 51}}, {"id": 296, "type": "+", "text": "+", "parent": 294, "children": [], "start_point": {"row": 101, "column": 52}, "end_point": {"row": 101, "column": 53}}, {"id": 297, "type": "identifier", "text": "LCD_BLIGHT_IO", "parent": 294, "children": [], "start_point": {"row": 101, "column": 54}, "end_point": {"row": 101, "column": 67}}, {"id": 298, "type": "call_expression", "text": "gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT)", "parent": 213, "children": [299, 300], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 56}}, {"id": 299, "type": "identifier", "text": "gpiohs_set_drive_mode", "parent": 298, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 25}}, {"id": 300, "type": "argument_list", "text": "(LCD_BLIGHT_IO, GPIO_DM_OUTPUT)", "parent": 298, "children": [301, 302], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 56}}, {"id": 301, "type": "identifier", "text": "LCD_BLIGHT_IO", "parent": 300, "children": [], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 39}}, {"id": 302, "type": "identifier", "text": "GPIO_DM_OUTPUT", "parent": 300, "children": [], "start_point": {"row": 102, "column": 41}, "end_point": {"row": 102, "column": 55}}, {"id": 303, "type": "call_expression", "text": "gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW)", "parent": 213, "children": [304, 305], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 46}}, {"id": 304, "type": "identifier", "text": "gpiohs_set_pin", "parent": 303, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 18}}, {"id": 305, "type": "argument_list", "text": "(LCD_BLIGHT_IO, GPIO_PV_LOW)", "parent": 303, "children": [306, 307], "start_point": {"row": 103, "column": 18}, "end_point": {"row": 103, "column": 46}}, {"id": 306, "type": "identifier", "text": "LCD_BLIGHT_IO", "parent": 305, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 32}}, {"id": 307, "type": "identifier", "text": "GPIO_PV_LOW", "parent": 305, "children": [], "start_point": {"row": 103, "column": 34}, "end_point": {"row": 103, "column": 45}}, {"id": 308, "type": "function_definition", "text": "static void io_set_power(void)\r\n{\r\n /* Set dvp and spi pin to 1.8V */\r\n sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18);\r\n sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18);\r\n}", "parent": null, "children": [309, 310], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 309, "type": "primitive_type", "text": "void", "parent": 308, "children": [], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 11}}, {"id": 310, "type": "function_declarator", "text": "io_set_power(void)", "parent": 308, "children": [311, 312], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 30}}, {"id": 311, "type": "identifier", "text": "io_set_power", "parent": 310, "children": [], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 24}}, {"id": 312, "type": "parameter_list", "text": "(void)", "parent": 310, "children": [313], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 30}}, {"id": 313, "type": "parameter_declaration", "text": "void", "parent": 312, "children": [314], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 29}}, {"id": 314, "type": "primitive_type", "text": "void", "parent": 313, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 29}}, {"id": 315, "type": "call_expression", "text": "sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18)", "parent": 308, "children": [316, 317], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 63}}, {"id": 316, "type": "identifier", "text": "sysctl_set_power_mode", "parent": 315, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 25}}, {"id": 317, "type": "argument_list", "text": "(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18)", "parent": 315, "children": [318, 319], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 63}}, {"id": 318, "type": "identifier", "text": "SYSCTL_POWER_BANK6", "parent": 317, "children": [], "start_point": {"row": 109, "column": 26}, "end_point": {"row": 109, "column": 44}}, {"id": 319, "type": "identifier", "text": "SYSCTL_POWER_V18", "parent": 317, "children": [], "start_point": {"row": 109, "column": 46}, "end_point": {"row": 109, "column": 62}}, {"id": 320, "type": "call_expression", "text": "sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18)", "parent": 308, "children": [321, 322], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 63}}, {"id": 321, "type": "identifier", "text": "sysctl_set_power_mode", "parent": 320, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 25}}, {"id": 322, "type": "argument_list", "text": "(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18)", "parent": 320, "children": [323, 324], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 63}}, {"id": 323, "type": "identifier", "text": "SYSCTL_POWER_BANK7", "parent": 322, "children": [], "start_point": {"row": 110, "column": 26}, "end_point": {"row": 110, "column": 44}}, {"id": 324, "type": "identifier", "text": "SYSCTL_POWER_V18", "parent": 322, "children": [], "start_point": {"row": 110, "column": 46}, "end_point": {"row": 110, "column": 62}}, {"id": 325, "type": "function_definition", "text": "int argmax(float* src, size_t count)\r\n{\r\n float max = FLT_MIN;\r\n size_t i, max_i = 0;\r\n for (i = 0; i < count; i++)\r\n {\r\n if (src[i] > max)\r\n {\r\n max = src[i];\r\n max_i = i;\r\n }\r\n }\r\n\r\n return max_i;\r\n}", "parent": null, "children": [326, 327], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 127, "column": 1}}, {"id": 326, "type": "primitive_type", "text": "int", "parent": 325, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 3}}, {"id": 327, "type": "function_declarator", "text": "argmax(float* src, size_t count)", "parent": 325, "children": [328, 329], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 36}}, {"id": 328, "type": "identifier", "text": "argmax", "parent": 327, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 10}}, {"id": 329, "type": "parameter_list", "text": "(float* src, size_t count)", "parent": 327, "children": [330, 335], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 36}}, {"id": 330, "type": "parameter_declaration", "text": "float* src", "parent": 329, "children": [331, 332], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 21}}, {"id": 331, "type": "primitive_type", "text": "float", "parent": 330, "children": [], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 16}}, {"id": 332, "type": "pointer_declarator", "text": "* src", "parent": 330, "children": [333, 334], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 21}}, {"id": 333, "type": "*", "text": "*", "parent": 332, "children": [], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 17}}, {"id": 334, "type": "identifier", "text": "src", "parent": 332, "children": [], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 21}}, {"id": 335, "type": "parameter_declaration", "text": "size_t count", "parent": 329, "children": [336, 337], "start_point": {"row": 113, "column": 23}, "end_point": {"row": 113, "column": 35}}, {"id": 336, "type": "primitive_type", "text": "size_t", "parent": 335, "children": [], "start_point": {"row": 113, "column": 23}, "end_point": {"row": 113, "column": 29}}, {"id": 337, "type": "identifier", "text": "count", "parent": 335, "children": [], "start_point": {"row": 113, "column": 30}, "end_point": {"row": 113, "column": 35}}, {"id": 338, "type": "declaration", "text": "float max = FLT_MIN;", "parent": 325, "children": [339, 340], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 24}}, {"id": 339, "type": "primitive_type", "text": "float", "parent": 338, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 9}}, {"id": 340, "type": "init_declarator", "text": "max = FLT_MIN", "parent": 338, "children": [341, 342, 343], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 23}}, {"id": 341, "type": "identifier", "text": "max", "parent": 340, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 13}}, {"id": 342, "type": "=", "text": "=", "parent": 340, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 15}}, {"id": 343, "type": "identifier", "text": "FLT_MIN", "parent": 340, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 23}}, {"id": 344, "type": "declaration", "text": "size_t i, max_i = 0;", "parent": 325, "children": [345, 346, 347], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 24}}, {"id": 345, "type": "primitive_type", "text": "size_t", "parent": 344, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 10}}, {"id": 346, "type": "identifier", "text": "i", "parent": 344, "children": [], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 12}}, {"id": 347, "type": "init_declarator", "text": "max_i = 0", "parent": 344, "children": [348, 349, 350], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 23}}, {"id": 348, "type": "identifier", "text": "max_i", "parent": 347, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 19}}, {"id": 349, "type": "=", "text": "=", "parent": 347, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 21}}, {"id": 350, "type": "number_literal", "text": "0", "parent": 347, "children": [], "start_point": {"row": 116, "column": 22}, "end_point": {"row": 116, "column": 23}}, {"id": 351, "type": "for_statement", "text": "for (i = 0; i < count; i++)\r\n {\r\n if (src[i] > max)\r\n {\r\n max = src[i];\r\n max_i = i;\r\n }\r\n }", "parent": 325, "children": [352, 356, 360], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 124, "column": 5}}, {"id": 352, "type": "assignment_expression", "text": "i = 0", "parent": 351, "children": [353, 354, 355], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 14}}, {"id": 353, "type": "identifier", "text": "i", "parent": 352, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 10}}, {"id": 354, "type": "=", "text": "=", "parent": 352, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 12}}, {"id": 355, "type": "number_literal", "text": "0", "parent": 352, "children": [], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 14}}, {"id": 356, "type": "binary_expression", "text": "i < count", "parent": 351, "children": [357, 358, 359], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 25}}, {"id": 357, "type": "identifier", "text": "i", "parent": 356, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 17}}, {"id": 358, "type": "<", "text": "<", "parent": 356, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 19}}, {"id": 359, "type": "identifier", "text": "count", "parent": 356, "children": [], "start_point": {"row": 117, "column": 20}, "end_point": {"row": 117, "column": 25}}, {"id": 360, "type": "update_expression", "text": "i++", "parent": 351, "children": [361, 362], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 30}}, {"id": 361, "type": "identifier", "text": "i", "parent": 360, "children": [], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 28}}, {"id": 362, "type": "++", "text": "++", "parent": 360, "children": [], "start_point": {"row": 117, "column": 28}, "end_point": {"row": 117, "column": 30}}, {"id": 363, "type": "if_statement", "text": "if (src[i] > max)\r\n {\r\n max = src[i];\r\n max_i = i;\r\n }", "parent": 351, "children": [364], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 123, "column": 9}}, {"id": 364, "type": "parenthesized_expression", "text": "(src[i] > max)", "parent": 363, "children": [365], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 25}}, {"id": 365, "type": "binary_expression", "text": "src[i] > max", "parent": 364, "children": [366, 369, 370], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 24}}, {"id": 366, "type": "subscript_expression", "text": "src[i]", "parent": 365, "children": [367, 368], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 18}}, {"id": 367, "type": "identifier", "text": "src", "parent": 366, "children": [], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 15}}, {"id": 368, "type": "identifier", "text": "i", "parent": 366, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 17}}, {"id": 369, "type": ">", "text": ">", "parent": 365, "children": [], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 20}}, {"id": 370, "type": "identifier", "text": "max", "parent": 365, "children": [], "start_point": {"row": 119, "column": 21}, "end_point": {"row": 119, "column": 24}}, {"id": 371, "type": "assignment_expression", "text": "max = src[i]", "parent": 363, "children": [372, 373, 374], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 24}}, {"id": 372, "type": "identifier", "text": "max", "parent": 371, "children": [], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 15}}, {"id": 373, "type": "=", "text": "=", "parent": 371, "children": [], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 17}}, {"id": 374, "type": "subscript_expression", "text": "src[i]", "parent": 371, "children": [375, 376], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 24}}, {"id": 375, "type": "identifier", "text": "src", "parent": 374, "children": [], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 21}}, {"id": 376, "type": "identifier", "text": "i", "parent": 374, "children": [], "start_point": {"row": 121, "column": 22}, "end_point": {"row": 121, "column": 23}}, {"id": 377, "type": "assignment_expression", "text": "max_i = i", "parent": 363, "children": [378, 379, 380], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 21}}, {"id": 378, "type": "identifier", "text": "max_i", "parent": 377, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 17}}, {"id": 379, "type": "=", "text": "=", "parent": 377, "children": [], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 19}}, {"id": 380, "type": "identifier", "text": "i", "parent": 377, "children": [], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 21}}, {"id": 381, "type": "return_statement", "text": "return max_i;", "parent": 325, "children": [382], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 17}}, {"id": 382, "type": "identifier", "text": "max_i", "parent": 381, "children": [], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 16}}, {"id": 383, "type": "function_definition", "text": "int main()\r\n{\r\n /* Set CPU and dvp clk */\r\n sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ);\r\n sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ);\r\n sysctl_clock_enable(SYSCTL_CLOCK_AI);\r\n // uarths_init();\r\n plic_init();\r\n io_set_power();\r\n io_init();\r\n \r\n /* LCD init */\r\n printf(\"LCD init\\n\");\r\n lcd_init();\r\n lcd_set_direction(DIR_YX_RLDU);\r\n lcd_clear(BLACK);\r\n /* DVP init */\r\n printf(\"DVP init\\n\");\r\n dvp_init(8);\r\n dvp_set_xclk_rate(24000000);\r\n dvp_enable_burst();\r\n dvp_set_output_enable(0, 1);\r\n dvp_set_output_enable(1, 1);\r\n dvp_set_image_format(DVP_CFG_RGB_FORMAT);\r\n dvp_set_image_size(320, 240);\r\n ov2640_init();\r\n\r\n kpu_image.pixel = 3;\r\n kpu_image.width = 320;\r\n kpu_image.height = 240;\r\n image_init(&kpu_image);\r\n display_image.pixel = 2;\r\n display_image.width = 320;\r\n display_image.height = 240;\r\n image_init(&display_image);\r\n crop_image.pixel = 3;\r\n crop_image.width = 224;\r\n crop_image.height = 224;\r\n image_init(&crop_image);\r\n dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2));\r\n dvp_set_display_addr((uint32_t)display_image.addr);\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);\r\n dvp_disable_auto();\r\n /* DVP interrupt config */\r\n printf(\"DVP interrupt config\\n\");\r\n plic_set_priority(IRQN_DVP_INTERRUPT, 1);\r\n plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL);\r\n plic_irq_enable(IRQN_DVP_INTERRUPT);\r\n /* init model */\r\n if (kpu_load_kmodel(&task, model_data) != 0)\r\n {\r\n printf(\"Cannot load kmodel.\\n\");\r\n return(-1);\r\n }\r\n sysctl_enable_irq();\r\n \r\n /* system start */\r\n printf(\"System start\\n\");\r\n while (1)\r\n {\r\n g_dvp_finish_flag = 0;\r\n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH);\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1);\r\n while (g_dvp_finish_flag == 0)\r\n ;\r\n \r\n image_crop(&kpu_image, &crop_image, 48, 8);\r\n\r\n g_ai_done_flag = 0;\r\n\r\n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0)\r\n {\r\n printf(\"Cannot run kmodel.\\n\");\r\n return(-1);\r\n }\r\n\t\twhile (!g_ai_done_flag);\r\n\r\n float *features;\r\n size_t output_size;\r\n kpu_get_output(&task, 0, &features, &output_size);\r\n\r\n size_t cls = argmax(features, 5);\r\n\r\n const char *text = NULL;\r\n switch (cls)\r\n {\r\n case 0:\r\n text = \"daisy\";\r\n break;\r\n case 1:\r\n text = \"dandelion\";\r\n break;\r\n case 2:\r\n text = \"roses\";\r\n break;\r\n case 3:\r\n text = \"sunflowers\";\r\n break;\r\n case 4:\r\n text = \"tulip\";\r\n break;\r\n }\r\n \r\n /* display pic*/\r\n if (features[cls] > PROB_THRESH)\r\n\t\t\tram_draw_string(display_image.addr, 150, 20, text, RED);\r\n\t\tlcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr);\r\n }\r\n \r\n}", "parent": null, "children": [384, 385], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 238, "column": 1}}, {"id": 384, "type": "primitive_type", "text": "int", "parent": 383, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 3}}, {"id": 385, "type": "function_declarator", "text": "main()", "parent": 383, "children": [386, 387], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 10}}, {"id": 386, "type": "identifier", "text": "main", "parent": 385, "children": [], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 8}}, {"id": 387, "type": "parameter_list", "text": "()", "parent": 385, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 10}}, {"id": 388, "type": "call_expression", "text": "sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ)", "parent": 383, "children": [389, 390], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 54}}, {"id": 389, "type": "identifier", "text": "sysctl_pll_set_freq", "parent": 388, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 23}}, {"id": 390, "type": "argument_list", "text": "(SYSCTL_PLL0, PLL0_OUTPUT_FREQ)", "parent": 388, "children": [391, 392], "start_point": {"row": 132, "column": 23}, "end_point": {"row": 132, "column": 54}}, {"id": 391, "type": "identifier", "text": "SYSCTL_PLL0", "parent": 390, "children": [], "start_point": {"row": 132, "column": 24}, "end_point": {"row": 132, "column": 35}}, {"id": 392, "type": "identifier", "text": "PLL0_OUTPUT_FREQ", "parent": 390, "children": [], "start_point": {"row": 132, "column": 37}, "end_point": {"row": 132, "column": 53}}, {"id": 393, "type": "call_expression", "text": "sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ)", "parent": 383, "children": [394, 395], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 54}}, {"id": 394, "type": "identifier", "text": "sysctl_pll_set_freq", "parent": 393, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 23}}, {"id": 395, "type": "argument_list", "text": "(SYSCTL_PLL1, PLL1_OUTPUT_FREQ)", "parent": 393, "children": [396, 397], "start_point": {"row": 133, "column": 23}, "end_point": {"row": 133, "column": 54}}, {"id": 396, "type": "identifier", "text": "SYSCTL_PLL1", "parent": 395, "children": [], "start_point": {"row": 133, "column": 24}, "end_point": {"row": 133, "column": 35}}, {"id": 397, "type": "identifier", "text": "PLL1_OUTPUT_FREQ", "parent": 395, "children": [], "start_point": {"row": 133, "column": 37}, "end_point": {"row": 133, "column": 53}}, {"id": 398, "type": "call_expression", "text": "sysctl_clock_enable(SYSCTL_CLOCK_AI)", "parent": 383, "children": [399, 400], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 40}}, {"id": 399, "type": "identifier", "text": "sysctl_clock_enable", "parent": 398, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 23}}, {"id": 400, "type": "argument_list", "text": "(SYSCTL_CLOCK_AI)", "parent": 398, "children": [401], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 40}}, {"id": 401, "type": "identifier", "text": "SYSCTL_CLOCK_AI", "parent": 400, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 39}}, {"id": 402, "type": "call_expression", "text": "plic_init()", "parent": 383, "children": [403, 404], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 15}}, {"id": 403, "type": "identifier", "text": "plic_init", "parent": 402, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 13}}, {"id": 404, "type": "argument_list", "text": "()", "parent": 402, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 15}}, {"id": 405, "type": "call_expression", "text": "io_set_power()", "parent": 383, "children": [406, 407], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 18}}, {"id": 406, "type": "identifier", "text": "io_set_power", "parent": 405, "children": [], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 16}}, {"id": 407, "type": "argument_list", "text": "()", "parent": 405, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 18}}, {"id": 408, "type": "call_expression", "text": "io_init()", "parent": 383, "children": [409, 410], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 13}}, {"id": 409, "type": "identifier", "text": "io_init", "parent": 408, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 11}}, {"id": 410, "type": "argument_list", "text": "()", "parent": 408, "children": [], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 13}}, {"id": 411, "type": "call_expression", "text": "printf(\"LCD init\\n\")", "parent": 383, "children": [412, 413], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 24}}, {"id": 412, "type": "identifier", "text": "printf", "parent": 411, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 10}}, {"id": 413, "type": "argument_list", "text": "(\"LCD init\\n\")", "parent": 411, "children": [414], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 141, "column": 24}}, {"id": 414, "type": "string_literal", "text": "\"LCD init\\n\"", "parent": 413, "children": [415], "start_point": {"row": 141, "column": 11}, "end_point": {"row": 141, "column": 23}}, {"id": 415, "type": "escape_sequence", "text": "\\n", "parent": 414, "children": [], "start_point": {"row": 141, "column": 20}, "end_point": {"row": 141, "column": 22}}, {"id": 416, "type": "call_expression", "text": "lcd_init()", "parent": 383, "children": [417, 418], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 14}}, {"id": 417, "type": "identifier", "text": "lcd_init", "parent": 416, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 12}}, {"id": 418, "type": "argument_list", "text": "()", "parent": 416, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 14}}, {"id": 419, "type": "call_expression", "text": "lcd_set_direction(DIR_YX_RLDU)", "parent": 383, "children": [420, 421], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 34}}, {"id": 420, "type": "identifier", "text": "lcd_set_direction", "parent": 419, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 21}}, {"id": 421, "type": "argument_list", "text": "(DIR_YX_RLDU)", "parent": 419, "children": [422], "start_point": {"row": 143, "column": 21}, "end_point": {"row": 143, "column": 34}}, {"id": 422, "type": "identifier", "text": "DIR_YX_RLDU", "parent": 421, "children": [], "start_point": {"row": 143, "column": 22}, "end_point": {"row": 143, "column": 33}}, {"id": 423, "type": "call_expression", "text": "lcd_clear(BLACK)", "parent": 383, "children": [424, 425], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 20}}, {"id": 424, "type": "identifier", "text": "lcd_clear", "parent": 423, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 13}}, {"id": 425, "type": "argument_list", "text": "(BLACK)", "parent": 423, "children": [426], "start_point": {"row": 144, "column": 13}, "end_point": {"row": 144, "column": 20}}, {"id": 426, "type": "identifier", "text": "BLACK", "parent": 425, "children": [], "start_point": {"row": 144, "column": 14}, "end_point": {"row": 144, "column": 19}}, {"id": 427, "type": "call_expression", "text": "printf(\"DVP init\\n\")", "parent": 383, "children": [428, 429], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 24}}, {"id": 428, "type": "identifier", "text": "printf", "parent": 427, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 10}}, {"id": 429, "type": "argument_list", "text": "(\"DVP init\\n\")", "parent": 427, "children": [430], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 24}}, {"id": 430, "type": "string_literal", "text": "\"DVP init\\n\"", "parent": 429, "children": [431], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 23}}, {"id": 431, "type": "escape_sequence", "text": "\\n", "parent": 430, "children": [], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 22}}, {"id": 432, "type": "call_expression", "text": "dvp_init(8)", "parent": 383, "children": [433, 434], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 15}}, {"id": 433, "type": "identifier", "text": "dvp_init", "parent": 432, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 12}}, {"id": 434, "type": "argument_list", "text": "(8)", "parent": 432, "children": [435], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 15}}, {"id": 435, "type": "number_literal", "text": "8", "parent": 434, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 14}}, {"id": 436, "type": "call_expression", "text": "dvp_set_xclk_rate(24000000)", "parent": 383, "children": [437, 438], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 31}}, {"id": 437, "type": "identifier", "text": "dvp_set_xclk_rate", "parent": 436, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 21}}, {"id": 438, "type": "argument_list", "text": "(24000000)", "parent": 436, "children": [439], "start_point": {"row": 148, "column": 21}, "end_point": {"row": 148, "column": 31}}, {"id": 439, "type": "number_literal", "text": "24000000", "parent": 438, "children": [], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 30}}, {"id": 440, "type": "call_expression", "text": "dvp_enable_burst()", "parent": 383, "children": [441, 442], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 22}}, {"id": 441, "type": "identifier", "text": "dvp_enable_burst", "parent": 440, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 20}}, {"id": 442, "type": "argument_list", "text": "()", "parent": 440, "children": [], "start_point": {"row": 149, "column": 20}, "end_point": {"row": 149, "column": 22}}, {"id": 443, "type": "call_expression", "text": "dvp_set_output_enable(0, 1)", "parent": 383, "children": [444, 445], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 31}}, {"id": 444, "type": "identifier", "text": "dvp_set_output_enable", "parent": 443, "children": [], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 25}}, {"id": 445, "type": "argument_list", "text": "(0, 1)", "parent": 443, "children": [446, 447], "start_point": {"row": 150, "column": 25}, "end_point": {"row": 150, "column": 31}}, {"id": 446, "type": "number_literal", "text": "0", "parent": 445, "children": [], "start_point": {"row": 150, "column": 26}, "end_point": {"row": 150, "column": 27}}, {"id": 447, "type": "number_literal", "text": "1", "parent": 445, "children": [], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 30}}, {"id": 448, "type": "call_expression", "text": "dvp_set_output_enable(1, 1)", "parent": 383, "children": [449, 450], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 31}}, {"id": 449, "type": "identifier", "text": "dvp_set_output_enable", "parent": 448, "children": [], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 25}}, {"id": 450, "type": "argument_list", "text": "(1, 1)", "parent": 448, "children": [451, 452], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 31}}, {"id": 451, "type": "number_literal", "text": "1", "parent": 450, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 27}}, {"id": 452, "type": "number_literal", "text": "1", "parent": 450, "children": [], "start_point": {"row": 151, "column": 29}, "end_point": {"row": 151, "column": 30}}, {"id": 453, "type": "call_expression", "text": "dvp_set_image_format(DVP_CFG_RGB_FORMAT)", "parent": 383, "children": [454, 455], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 44}}, {"id": 454, "type": "identifier", "text": "dvp_set_image_format", "parent": 453, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 24}}, {"id": 455, "type": "argument_list", "text": "(DVP_CFG_RGB_FORMAT)", "parent": 453, "children": [456], "start_point": {"row": 152, "column": 24}, "end_point": {"row": 152, "column": 44}}, {"id": 456, "type": "identifier", "text": "DVP_CFG_RGB_FORMAT", "parent": 455, "children": [], "start_point": {"row": 152, "column": 25}, "end_point": {"row": 152, "column": 43}}, {"id": 457, "type": "call_expression", "text": "dvp_set_image_size(320, 240)", "parent": 383, "children": [458, 459], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 32}}, {"id": 458, "type": "identifier", "text": "dvp_set_image_size", "parent": 457, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 22}}, {"id": 459, "type": "argument_list", "text": "(320, 240)", "parent": 457, "children": [460, 461], "start_point": {"row": 153, "column": 22}, "end_point": {"row": 153, "column": 32}}, {"id": 460, "type": "number_literal", "text": "320", "parent": 459, "children": [], "start_point": {"row": 153, "column": 23}, "end_point": {"row": 153, "column": 26}}, {"id": 461, "type": "number_literal", "text": "240", "parent": 459, "children": [], "start_point": {"row": 153, "column": 28}, "end_point": {"row": 153, "column": 31}}, {"id": 462, "type": "call_expression", "text": "ov2640_init()", "parent": 383, "children": [463, 464], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 17}}, {"id": 463, "type": "identifier", "text": "ov2640_init", "parent": 462, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 15}}, {"id": 464, "type": "argument_list", "text": "()", "parent": 462, "children": [], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 17}}, {"id": 465, "type": "assignment_expression", "text": "kpu_image.pixel = 3", "parent": 383, "children": [466, 469, 470], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 23}}, {"id": 466, "type": "field_expression", "text": "kpu_image.pixel", "parent": 465, "children": [467, 468], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 19}}, {"id": 467, "type": "identifier", "text": "kpu_image", "parent": 466, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 13}}, {"id": 468, "type": "field_identifier", "text": "pixel", "parent": 466, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 19}}, {"id": 469, "type": "=", "text": "=", "parent": 465, "children": [], "start_point": {"row": 156, "column": 20}, "end_point": {"row": 156, "column": 21}}, {"id": 470, "type": "number_literal", "text": "3", "parent": 465, "children": [], "start_point": {"row": 156, "column": 22}, "end_point": {"row": 156, "column": 23}}, {"id": 471, "type": "assignment_expression", "text": "kpu_image.width = 320", "parent": 383, "children": [472, 475, 476], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 25}}, {"id": 472, "type": "field_expression", "text": "kpu_image.width", "parent": 471, "children": [473, 474], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 19}}, {"id": 473, "type": "identifier", "text": "kpu_image", "parent": 472, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 13}}, {"id": 474, "type": "field_identifier", "text": "width", "parent": 472, "children": [], "start_point": {"row": 157, "column": 14}, "end_point": {"row": 157, "column": 19}}, {"id": 475, "type": "=", "text": "=", "parent": 471, "children": [], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 21}}, {"id": 476, "type": "number_literal", "text": "320", "parent": 471, "children": [], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 25}}, {"id": 477, "type": "assignment_expression", "text": "kpu_image.height = 240", "parent": 383, "children": [478, 481, 482], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 26}}, {"id": 478, "type": "field_expression", "text": "kpu_image.height", "parent": 477, "children": [479, 480], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 20}}, {"id": 479, "type": "identifier", "text": "kpu_image", "parent": 478, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 13}}, {"id": 480, "type": "field_identifier", "text": "height", "parent": 478, "children": [], "start_point": {"row": 158, "column": 14}, "end_point": {"row": 158, "column": 20}}, {"id": 481, "type": "=", "text": "=", "parent": 477, "children": [], "start_point": {"row": 158, "column": 21}, "end_point": {"row": 158, "column": 22}}, {"id": 482, "type": "number_literal", "text": "240", "parent": 477, "children": [], "start_point": {"row": 158, "column": 23}, "end_point": {"row": 158, "column": 26}}, {"id": 483, "type": "call_expression", "text": "image_init(&kpu_image)", "parent": 383, "children": [484, 485], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 26}}, {"id": 484, "type": "identifier", "text": "image_init", "parent": 483, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 14}}, {"id": 485, "type": "argument_list", "text": "(&kpu_image)", "parent": 483, "children": [486], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 26}}, {"id": 486, "type": "pointer_expression", "text": "&kpu_image", "parent": 485, "children": [487], "start_point": {"row": 159, "column": 15}, "end_point": {"row": 159, "column": 25}}, {"id": 487, "type": "identifier", "text": "kpu_image", "parent": 486, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 25}}, {"id": 488, "type": "assignment_expression", "text": "display_image.pixel = 2", "parent": 383, "children": [489, 492, 493], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 27}}, {"id": 489, "type": "field_expression", "text": "display_image.pixel", "parent": 488, "children": [490, 491], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 23}}, {"id": 490, "type": "identifier", "text": "display_image", "parent": 489, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 17}}, {"id": 491, "type": "field_identifier", "text": "pixel", "parent": 489, "children": [], "start_point": {"row": 160, "column": 18}, "end_point": {"row": 160, "column": 23}}, {"id": 492, "type": "=", "text": "=", "parent": 488, "children": [], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 25}}, {"id": 493, "type": "number_literal", "text": "2", "parent": 488, "children": [], "start_point": {"row": 160, "column": 26}, "end_point": {"row": 160, "column": 27}}, {"id": 494, "type": "assignment_expression", "text": "display_image.width = 320", "parent": 383, "children": [495, 498, 499], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 29}}, {"id": 495, "type": "field_expression", "text": "display_image.width", "parent": 494, "children": [496, 497], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 23}}, {"id": 496, "type": "identifier", "text": "display_image", "parent": 495, "children": [], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 17}}, {"id": 497, "type": "field_identifier", "text": "width", "parent": 495, "children": [], "start_point": {"row": 161, "column": 18}, "end_point": {"row": 161, "column": 23}}, {"id": 498, "type": "=", "text": "=", "parent": 494, "children": [], "start_point": {"row": 161, "column": 24}, "end_point": {"row": 161, "column": 25}}, {"id": 499, "type": "number_literal", "text": "320", "parent": 494, "children": [], "start_point": {"row": 161, "column": 26}, "end_point": {"row": 161, "column": 29}}, {"id": 500, "type": "assignment_expression", "text": "display_image.height = 240", "parent": 383, "children": [501, 504, 505], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 30}}, {"id": 501, "type": "field_expression", "text": "display_image.height", "parent": 500, "children": [502, 503], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 24}}, {"id": 502, "type": "identifier", "text": "display_image", "parent": 501, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 17}}, {"id": 503, "type": "field_identifier", "text": "height", "parent": 501, "children": [], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 24}}, {"id": 504, "type": "=", "text": "=", "parent": 500, "children": [], "start_point": {"row": 162, "column": 25}, "end_point": {"row": 162, "column": 26}}, {"id": 505, "type": "number_literal", "text": "240", "parent": 500, "children": [], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 30}}, {"id": 506, "type": "call_expression", "text": "image_init(&display_image)", "parent": 383, "children": [507, 508], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 163, "column": 30}}, {"id": 507, "type": "identifier", "text": "image_init", "parent": 506, "children": [], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 163, "column": 14}}, {"id": 508, "type": "argument_list", "text": "(&display_image)", "parent": 506, "children": [509], "start_point": {"row": 163, "column": 14}, "end_point": {"row": 163, "column": 30}}, {"id": 509, "type": "pointer_expression", "text": "&display_image", "parent": 508, "children": [510], "start_point": {"row": 163, "column": 15}, "end_point": {"row": 163, "column": 29}}, {"id": 510, "type": "identifier", "text": "display_image", "parent": 509, "children": [], "start_point": {"row": 163, "column": 16}, "end_point": {"row": 163, "column": 29}}, {"id": 511, "type": "assignment_expression", "text": "crop_image.pixel = 3", "parent": 383, "children": [512, 515, 516], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 24}}, {"id": 512, "type": "field_expression", "text": "crop_image.pixel", "parent": 511, "children": [513, 514], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 20}}, {"id": 513, "type": "identifier", "text": "crop_image", "parent": 512, "children": [], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 14}}, {"id": 514, "type": "field_identifier", "text": "pixel", "parent": 512, "children": [], "start_point": {"row": 164, "column": 15}, "end_point": {"row": 164, "column": 20}}, {"id": 515, "type": "=", "text": "=", "parent": 511, "children": [], "start_point": {"row": 164, "column": 21}, "end_point": {"row": 164, "column": 22}}, {"id": 516, "type": "number_literal", "text": "3", "parent": 511, "children": [], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 24}}, {"id": 517, "type": "assignment_expression", "text": "crop_image.width = 224", "parent": 383, "children": [518, 521, 522], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 26}}, {"id": 518, "type": "field_expression", "text": "crop_image.width", "parent": 517, "children": [519, 520], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 20}}, {"id": 519, "type": "identifier", "text": "crop_image", "parent": 518, "children": [], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 14}}, {"id": 520, "type": "field_identifier", "text": "width", "parent": 518, "children": [], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 20}}, {"id": 521, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 165, "column": 21}, "end_point": {"row": 165, "column": 22}}, {"id": 522, "type": "number_literal", "text": "224", "parent": 517, "children": [], "start_point": {"row": 165, "column": 23}, "end_point": {"row": 165, "column": 26}}, {"id": 523, "type": "assignment_expression", "text": "crop_image.height = 224", "parent": 383, "children": [524, 527, 528], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 27}}, {"id": 524, "type": "field_expression", "text": "crop_image.height", "parent": 523, "children": [525, 526], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 21}}, {"id": 525, "type": "identifier", "text": "crop_image", "parent": 524, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 14}}, {"id": 526, "type": "field_identifier", "text": "height", "parent": 524, "children": [], "start_point": {"row": 166, "column": 15}, "end_point": {"row": 166, "column": 21}}, {"id": 527, "type": "=", "text": "=", "parent": 523, "children": [], "start_point": {"row": 166, "column": 22}, "end_point": {"row": 166, "column": 23}}, {"id": 528, "type": "number_literal", "text": "224", "parent": 523, "children": [], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 27}}, {"id": 529, "type": "call_expression", "text": "image_init(&crop_image)", "parent": 383, "children": [530, 531], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 27}}, {"id": 530, "type": "identifier", "text": "image_init", "parent": 529, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 14}}, {"id": 531, "type": "argument_list", "text": "(&crop_image)", "parent": 529, "children": [532], "start_point": {"row": 167, "column": 14}, "end_point": {"row": 167, "column": 27}}, {"id": 532, "type": "pointer_expression", "text": "&crop_image", "parent": 531, "children": [533], "start_point": {"row": 167, "column": 15}, "end_point": {"row": 167, "column": 26}}, {"id": 533, "type": "identifier", "text": "crop_image", "parent": 532, "children": [], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 26}}, {"id": 534, "type": "call_expression", "text": "dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2))", "parent": 383, "children": [535, 536], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 129}}, {"id": 535, "type": "identifier", "text": "dvp_set_ai_addr", "parent": 534, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 19}}, {"id": 536, "type": "argument_list", "text": "((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2))", "parent": 534, "children": [537, 543, 556], "start_point": {"row": 168, "column": 19}, "end_point": {"row": 168, "column": 129}}, {"id": 537, "type": "cast_expression", "text": "(uint32_t)kpu_image.addr", "parent": 536, "children": [538, 540], "start_point": {"row": 168, "column": 20}, "end_point": {"row": 168, "column": 44}}, {"id": 538, "type": "type_descriptor", "text": "uint32_t", "parent": 537, "children": [539], "start_point": {"row": 168, "column": 21}, "end_point": {"row": 168, "column": 29}}, {"id": 539, "type": "primitive_type", "text": "uint32_t", "parent": 538, "children": [], "start_point": {"row": 168, "column": 21}, "end_point": {"row": 168, "column": 29}}, {"id": 540, "type": "field_expression", "text": "kpu_image.addr", "parent": 537, "children": [541, 542], "start_point": {"row": 168, "column": 30}, "end_point": {"row": 168, "column": 44}}, {"id": 541, "type": "identifier", "text": "kpu_image", "parent": 540, "children": [], "start_point": {"row": 168, "column": 30}, "end_point": {"row": 168, "column": 39}}, {"id": 542, "type": "field_identifier", "text": "addr", "parent": 540, "children": [], "start_point": {"row": 168, "column": 40}, "end_point": {"row": 168, "column": 44}}, {"id": 543, "type": "cast_expression", "text": "(uint32_t)(kpu_image.addr + 320 * 240)", "parent": 536, "children": [544, 546], "start_point": {"row": 168, "column": 46}, "end_point": {"row": 168, "column": 84}}, {"id": 544, "type": "type_descriptor", "text": "uint32_t", "parent": 543, "children": [545], "start_point": {"row": 168, "column": 47}, "end_point": {"row": 168, "column": 55}}, {"id": 545, "type": "primitive_type", "text": "uint32_t", "parent": 544, "children": [], "start_point": {"row": 168, "column": 47}, "end_point": {"row": 168, "column": 55}}, {"id": 546, "type": "parenthesized_expression", "text": "(kpu_image.addr + 320 * 240)", "parent": 543, "children": [547], "start_point": {"row": 168, "column": 56}, "end_point": {"row": 168, "column": 84}}, {"id": 547, "type": "binary_expression", "text": "kpu_image.addr + 320 * 240", "parent": 546, "children": [548, 551, 552], "start_point": {"row": 168, "column": 57}, "end_point": {"row": 168, "column": 83}}, {"id": 548, "type": "field_expression", "text": "kpu_image.addr", "parent": 547, "children": [549, 550], "start_point": {"row": 168, "column": 57}, "end_point": {"row": 168, "column": 71}}, {"id": 549, "type": "identifier", "text": "kpu_image", "parent": 548, "children": [], "start_point": {"row": 168, "column": 57}, "end_point": {"row": 168, "column": 66}}, {"id": 550, "type": "field_identifier", "text": "addr", "parent": 548, "children": [], "start_point": {"row": 168, "column": 67}, "end_point": {"row": 168, "column": 71}}, {"id": 551, "type": "+", "text": "+", "parent": 547, "children": [], "start_point": {"row": 168, "column": 72}, "end_point": {"row": 168, "column": 73}}, {"id": 552, "type": "binary_expression", "text": "320 * 240", "parent": 547, "children": [553, 554, 555], "start_point": {"row": 168, "column": 74}, "end_point": {"row": 168, "column": 83}}, {"id": 553, "type": "number_literal", "text": "320", "parent": 552, "children": [], "start_point": {"row": 168, "column": 74}, "end_point": {"row": 168, "column": 77}}, {"id": 554, "type": "*", "text": "*", "parent": 552, "children": [], "start_point": {"row": 168, "column": 78}, "end_point": {"row": 168, "column": 79}}, {"id": 555, "type": "number_literal", "text": "240", "parent": 552, "children": [], "start_point": {"row": 168, "column": 80}, "end_point": {"row": 168, "column": 83}}, {"id": 556, "type": "cast_expression", "text": "(uint32_t)(kpu_image.addr + 320 * 240 * 2)", "parent": 536, "children": [557, 559], "start_point": {"row": 168, "column": 86}, "end_point": {"row": 168, "column": 128}}, {"id": 557, "type": "type_descriptor", "text": "uint32_t", "parent": 556, "children": [558], "start_point": {"row": 168, "column": 87}, "end_point": {"row": 168, "column": 95}}, {"id": 558, "type": "primitive_type", "text": "uint32_t", "parent": 557, "children": [], "start_point": {"row": 168, "column": 87}, "end_point": {"row": 168, "column": 95}}, {"id": 559, "type": "parenthesized_expression", "text": "(kpu_image.addr + 320 * 240 * 2)", "parent": 556, "children": [560], "start_point": {"row": 168, "column": 96}, "end_point": {"row": 168, "column": 128}}, {"id": 560, "type": "binary_expression", "text": "kpu_image.addr + 320 * 240 * 2", "parent": 559, "children": [561, 564, 565], "start_point": {"row": 168, "column": 97}, "end_point": {"row": 168, "column": 127}}, {"id": 561, "type": "field_expression", "text": "kpu_image.addr", "parent": 560, "children": [562, 563], "start_point": {"row": 168, "column": 97}, "end_point": {"row": 168, "column": 111}}, {"id": 562, "type": "identifier", "text": "kpu_image", "parent": 561, "children": [], "start_point": {"row": 168, "column": 97}, "end_point": {"row": 168, "column": 106}}, {"id": 563, "type": "field_identifier", "text": "addr", "parent": 561, "children": [], "start_point": {"row": 168, "column": 107}, "end_point": {"row": 168, "column": 111}}, {"id": 564, "type": "+", "text": "+", "parent": 560, "children": [], "start_point": {"row": 168, "column": 112}, "end_point": {"row": 168, "column": 113}}, {"id": 565, "type": "binary_expression", "text": "320 * 240 * 2", "parent": 560, "children": [566, 570, 571], "start_point": {"row": 168, "column": 114}, "end_point": {"row": 168, "column": 127}}, {"id": 566, "type": "binary_expression", "text": "320 * 240", "parent": 565, "children": [567, 568, 569], "start_point": {"row": 168, "column": 114}, "end_point": {"row": 168, "column": 123}}, {"id": 567, "type": "number_literal", "text": "320", "parent": 566, "children": [], "start_point": {"row": 168, "column": 114}, "end_point": {"row": 168, "column": 117}}, {"id": 568, "type": "*", "text": "*", "parent": 566, "children": [], "start_point": {"row": 168, "column": 118}, "end_point": {"row": 168, "column": 119}}, {"id": 569, "type": "number_literal", "text": "240", "parent": 566, "children": [], "start_point": {"row": 168, "column": 120}, "end_point": {"row": 168, "column": 123}}, {"id": 570, "type": "*", "text": "*", "parent": 565, "children": [], "start_point": {"row": 168, "column": 124}, "end_point": {"row": 168, "column": 125}}, {"id": 571, "type": "number_literal", "text": "2", "parent": 565, "children": [], "start_point": {"row": 168, "column": 126}, "end_point": {"row": 168, "column": 127}}, {"id": 572, "type": "call_expression", "text": "dvp_set_display_addr((uint32_t)display_image.addr)", "parent": 383, "children": [573, 574], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 54}}, {"id": 573, "type": "identifier", "text": "dvp_set_display_addr", "parent": 572, "children": [], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 24}}, {"id": 574, "type": "argument_list", "text": "((uint32_t)display_image.addr)", "parent": 572, "children": [575], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 54}}, {"id": 575, "type": "cast_expression", "text": "(uint32_t)display_image.addr", "parent": 574, "children": [576, 578], "start_point": {"row": 169, "column": 25}, "end_point": {"row": 169, "column": 53}}, {"id": 576, "type": "type_descriptor", "text": "uint32_t", "parent": 575, "children": [577], "start_point": {"row": 169, "column": 26}, "end_point": {"row": 169, "column": 34}}, {"id": 577, "type": "primitive_type", "text": "uint32_t", "parent": 576, "children": [], "start_point": {"row": 169, "column": 26}, "end_point": {"row": 169, "column": 34}}, {"id": 578, "type": "field_expression", "text": "display_image.addr", "parent": 575, "children": [579, 580], "start_point": {"row": 169, "column": 35}, "end_point": {"row": 169, "column": 53}}, {"id": 579, "type": "identifier", "text": "display_image", "parent": 578, "children": [], "start_point": {"row": 169, "column": 35}, "end_point": {"row": 169, "column": 48}}, {"id": 580, "type": "field_identifier", "text": "addr", "parent": 578, "children": [], "start_point": {"row": 169, "column": 49}, "end_point": {"row": 169, "column": 53}}, {"id": 581, "type": "call_expression", "text": "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)", "parent": 383, "children": [582, 583], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 81}}, {"id": 582, "type": "identifier", "text": "dvp_config_interrupt", "parent": 581, "children": [], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 24}}, {"id": 583, "type": "argument_list", "text": "(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0)", "parent": 581, "children": [584, 587], "start_point": {"row": 170, "column": 24}, "end_point": {"row": 170, "column": 81}}, {"id": 584, "type": "binary_expression", "text": "DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE", "parent": 583, "children": [585, 586], "start_point": {"row": 170, "column": 25}, "end_point": {"row": 170, "column": 77}}, {"id": 585, "type": "identifier", "text": "DVP_CFG_START_INT_ENABLE", "parent": 584, "children": [], "start_point": {"row": 170, "column": 25}, "end_point": {"row": 170, "column": 49}}, {"id": 586, "type": "identifier", "text": "DVP_CFG_FINISH_INT_ENABLE", "parent": 584, "children": [], "start_point": {"row": 170, "column": 52}, "end_point": {"row": 170, "column": 77}}, {"id": 587, "type": "number_literal", "text": "0", "parent": 583, "children": [], "start_point": {"row": 170, "column": 79}, "end_point": {"row": 170, "column": 80}}, {"id": 588, "type": "call_expression", "text": "dvp_disable_auto()", "parent": 383, "children": [589, 590], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 22}}, {"id": 589, "type": "identifier", "text": "dvp_disable_auto", "parent": 588, "children": [], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 20}}, {"id": 590, "type": "argument_list", "text": "()", "parent": 588, "children": [], "start_point": {"row": 171, "column": 20}, "end_point": {"row": 171, "column": 22}}, {"id": 591, "type": "call_expression", "text": "printf(\"DVP interrupt config\\n\")", "parent": 383, "children": [592, 593], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 36}}, {"id": 592, "type": "identifier", "text": "printf", "parent": 591, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 10}}, {"id": 593, "type": "argument_list", "text": "(\"DVP interrupt config\\n\")", "parent": 591, "children": [594], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 36}}, {"id": 594, "type": "string_literal", "text": "\"DVP interrupt config\\n\"", "parent": 593, "children": [595], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 35}}, {"id": 595, "type": "escape_sequence", "text": "\\n", "parent": 594, "children": [], "start_point": {"row": 173, "column": 32}, "end_point": {"row": 173, "column": 34}}, {"id": 596, "type": "call_expression", "text": "plic_set_priority(IRQN_DVP_INTERRUPT, 1)", "parent": 383, "children": [597, 598], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 174, "column": 44}}, {"id": 597, "type": "identifier", "text": "plic_set_priority", "parent": 596, "children": [], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 174, "column": 21}}, {"id": 598, "type": "argument_list", "text": "(IRQN_DVP_INTERRUPT, 1)", "parent": 596, "children": [599, 600], "start_point": {"row": 174, "column": 21}, "end_point": {"row": 174, "column": 44}}, {"id": 599, "type": "identifier", "text": "IRQN_DVP_INTERRUPT", "parent": 598, "children": [], "start_point": {"row": 174, "column": 22}, "end_point": {"row": 174, "column": 40}}, {"id": 600, "type": "number_literal", "text": "1", "parent": 598, "children": [], "start_point": {"row": 174, "column": 42}, "end_point": {"row": 174, "column": 43}}, {"id": 601, "type": "call_expression", "text": "plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL)", "parent": 383, "children": [602, 603], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 56}}, {"id": 602, "type": "identifier", "text": "plic_irq_register", "parent": 601, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 21}}, {"id": 603, "type": "argument_list", "text": "(IRQN_DVP_INTERRUPT, dvp_irq, NULL)", "parent": 601, "children": [604, 605, 606], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 56}}, {"id": 604, "type": "identifier", "text": "IRQN_DVP_INTERRUPT", "parent": 603, "children": [], "start_point": {"row": 175, "column": 22}, "end_point": {"row": 175, "column": 40}}, {"id": 605, "type": "identifier", "text": "dvp_irq", "parent": 603, "children": [], "start_point": {"row": 175, "column": 42}, "end_point": {"row": 175, "column": 49}}, {"id": 606, "type": "null", "text": "NULL", "parent": 603, "children": [607], "start_point": {"row": 175, "column": 51}, "end_point": {"row": 175, "column": 55}}, {"id": 607, "type": "NULL", "text": "NULL", "parent": 606, "children": [], "start_point": {"row": 175, "column": 51}, "end_point": {"row": 175, "column": 55}}, {"id": 608, "type": "call_expression", "text": "plic_irq_enable(IRQN_DVP_INTERRUPT)", "parent": 383, "children": [609, 610], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 39}}, {"id": 609, "type": "identifier", "text": "plic_irq_enable", "parent": 608, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 19}}, {"id": 610, "type": "argument_list", "text": "(IRQN_DVP_INTERRUPT)", "parent": 608, "children": [611], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 39}}, {"id": 611, "type": "identifier", "text": "IRQN_DVP_INTERRUPT", "parent": 610, "children": [], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 38}}, {"id": 612, "type": "if_statement", "text": "if (kpu_load_kmodel(&task, model_data) != 0)\r\n {\r\n printf(\"Cannot load kmodel.\\n\");\r\n return(-1);\r\n }", "parent": 383, "children": [613], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 182, "column": 5}}, {"id": 613, "type": "parenthesized_expression", "text": "(kpu_load_kmodel(&task, model_data) != 0)", "parent": 612, "children": [614], "start_point": {"row": 178, "column": 7}, "end_point": {"row": 178, "column": 48}}, {"id": 614, "type": "binary_expression", "text": "kpu_load_kmodel(&task, model_data) != 0", "parent": 613, "children": [615, 621, 622], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 47}}, {"id": 615, "type": "call_expression", "text": "kpu_load_kmodel(&task, model_data)", "parent": 614, "children": [616, 617], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 42}}, {"id": 616, "type": "identifier", "text": "kpu_load_kmodel", "parent": 615, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 23}}, {"id": 617, "type": "argument_list", "text": "(&task, model_data)", "parent": 615, "children": [618, 620], "start_point": {"row": 178, "column": 23}, "end_point": {"row": 178, "column": 42}}, {"id": 618, "type": "pointer_expression", "text": "&task", "parent": 617, "children": [619], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 29}}, {"id": 619, "type": "identifier", "text": "task", "parent": 618, "children": [], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 29}}, {"id": 620, "type": "identifier", "text": "model_data", "parent": 617, "children": [], "start_point": {"row": 178, "column": 31}, "end_point": {"row": 178, "column": 41}}, {"id": 621, "type": "!=", "text": "!=", "parent": 614, "children": [], "start_point": {"row": 178, "column": 43}, "end_point": {"row": 178, "column": 45}}, {"id": 622, "type": "number_literal", "text": "0", "parent": 614, "children": [], "start_point": {"row": 178, "column": 46}, "end_point": {"row": 178, "column": 47}}, {"id": 623, "type": "call_expression", "text": "printf(\"Cannot load kmodel.\\n\")", "parent": 612, "children": [624, 625], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 39}}, {"id": 624, "type": "identifier", "text": "printf", "parent": 623, "children": [], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 14}}, {"id": 625, "type": "argument_list", "text": "(\"Cannot load kmodel.\\n\")", "parent": 623, "children": [626], "start_point": {"row": 180, "column": 14}, "end_point": {"row": 180, "column": 39}}, {"id": 626, "type": "string_literal", "text": "\"Cannot load kmodel.\\n\"", "parent": 625, "children": [627], "start_point": {"row": 180, "column": 15}, "end_point": {"row": 180, "column": 38}}, {"id": 627, "type": "escape_sequence", "text": "\\n", "parent": 626, "children": [], "start_point": {"row": 180, "column": 35}, "end_point": {"row": 180, "column": 37}}, {"id": 628, "type": "return_statement", "text": "return(-1);", "parent": 612, "children": [629], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 19}}, {"id": 629, "type": "parenthesized_expression", "text": "(-1)", "parent": 628, "children": [630], "start_point": {"row": 181, "column": 14}, "end_point": {"row": 181, "column": 18}}, {"id": 630, "type": "number_literal", "text": "-1", "parent": 629, "children": [], "start_point": {"row": 181, "column": 15}, "end_point": {"row": 181, "column": 17}}, {"id": 631, "type": "call_expression", "text": "sysctl_enable_irq()", "parent": 383, "children": [632, 633], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 23}}, {"id": 632, "type": "identifier", "text": "sysctl_enable_irq", "parent": 631, "children": [], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 21}}, {"id": 633, "type": "argument_list", "text": "()", "parent": 631, "children": [], "start_point": {"row": 183, "column": 21}, "end_point": {"row": 183, "column": 23}}, {"id": 634, "type": "call_expression", "text": "printf(\"System start\\n\")", "parent": 383, "children": [635, 636], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 28}}, {"id": 635, "type": "identifier", "text": "printf", "parent": 634, "children": [], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 10}}, {"id": 636, "type": "argument_list", "text": "(\"System start\\n\")", "parent": 634, "children": [637], "start_point": {"row": 186, "column": 10}, "end_point": {"row": 186, "column": 28}}, {"id": 637, "type": "string_literal", "text": "\"System start\\n\"", "parent": 636, "children": [638], "start_point": {"row": 186, "column": 11}, "end_point": {"row": 186, "column": 27}}, {"id": 638, "type": "escape_sequence", "text": "\\n", "parent": 637, "children": [], "start_point": {"row": 186, "column": 24}, "end_point": {"row": 186, "column": 26}}, {"id": 639, "type": "while_statement", "text": "while (1)\r\n {\r\n g_dvp_finish_flag = 0;\r\n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH);\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1);\r\n while (g_dvp_finish_flag == 0)\r\n ;\r\n \r\n image_crop(&kpu_image, &crop_image, 48, 8);\r\n\r\n g_ai_done_flag = 0;\r\n\r\n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0)\r\n {\r\n printf(\"Cannot run kmodel.\\n\");\r\n return(-1);\r\n }\r\n\t\twhile (!g_ai_done_flag);\r\n\r\n float *features;\r\n size_t output_size;\r\n kpu_get_output(&task, 0, &features, &output_size);\r\n\r\n size_t cls = argmax(features, 5);\r\n\r\n const char *text = NULL;\r\n switch (cls)\r\n {\r\n case 0:\r\n text = \"daisy\";\r\n break;\r\n case 1:\r\n text = \"dandelion\";\r\n break;\r\n case 2:\r\n text = \"roses\";\r\n break;\r\n case 3:\r\n text = \"sunflowers\";\r\n break;\r\n case 4:\r\n text = \"tulip\";\r\n break;\r\n }\r\n \r\n /* display pic*/\r\n if (features[cls] > PROB_THRESH)\r\n\t\t\tram_draw_string(display_image.addr, 150, 20, text, RED);\r\n\t\tlcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr);\r\n }", "parent": 383, "children": [640], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 236, "column": 5}}, {"id": 640, "type": "parenthesized_expression", "text": "(1)", "parent": 639, "children": [641], "start_point": {"row": 187, "column": 10}, "end_point": {"row": 187, "column": 13}}, {"id": 641, "type": "number_literal", "text": "1", "parent": 640, "children": [], "start_point": {"row": 187, "column": 11}, "end_point": {"row": 187, "column": 12}}, {"id": 642, "type": "assignment_expression", "text": "g_dvp_finish_flag = 0", "parent": 639, "children": [643, 644, 645], "start_point": {"row": 189, "column": 8}, "end_point": {"row": 189, "column": 29}}, {"id": 643, "type": "identifier", "text": "g_dvp_finish_flag", "parent": 642, "children": [], "start_point": {"row": 189, "column": 8}, "end_point": {"row": 189, "column": 25}}, {"id": 644, "type": "=", "text": "=", "parent": 642, "children": [], "start_point": {"row": 189, "column": 26}, "end_point": {"row": 189, "column": 27}}, {"id": 645, "type": "number_literal", "text": "0", "parent": 642, "children": [], "start_point": {"row": 189, "column": 28}, "end_point": {"row": 189, "column": 29}}, {"id": 646, "type": "call_expression", "text": "dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH)", "parent": 639, "children": [647, 648], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 71}}, {"id": 647, "type": "identifier", "text": "dvp_clear_interrupt", "parent": 646, "children": [], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 27}}, {"id": 648, "type": "argument_list", "text": "(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH)", "parent": 646, "children": [649], "start_point": {"row": 190, "column": 27}, "end_point": {"row": 190, "column": 71}}, {"id": 649, "type": "binary_expression", "text": "DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH", "parent": 648, "children": [650, 651], "start_point": {"row": 190, "column": 28}, "end_point": {"row": 190, "column": 70}}, {"id": 650, "type": "identifier", "text": "DVP_STS_FRAME_START", "parent": 649, "children": [], "start_point": {"row": 190, "column": 28}, "end_point": {"row": 190, "column": 47}}, {"id": 651, "type": "identifier", "text": "DVP_STS_FRAME_FINISH", "parent": 649, "children": [], "start_point": {"row": 190, "column": 50}, "end_point": {"row": 190, "column": 70}}, {"id": 652, "type": "call_expression", "text": "dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1)", "parent": 639, "children": [653, 654], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 85}}, {"id": 653, "type": "identifier", "text": "dvp_config_interrupt", "parent": 652, "children": [], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 28}}, {"id": 654, "type": "argument_list", "text": "(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1)", "parent": 652, "children": [655, 658], "start_point": {"row": 191, "column": 28}, "end_point": {"row": 191, "column": 85}}, {"id": 655, "type": "binary_expression", "text": "DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE", "parent": 654, "children": [656, 657], "start_point": {"row": 191, "column": 29}, "end_point": {"row": 191, "column": 81}}, {"id": 656, "type": "identifier", "text": "DVP_CFG_START_INT_ENABLE", "parent": 655, "children": [], "start_point": {"row": 191, "column": 29}, "end_point": {"row": 191, "column": 53}}, {"id": 657, "type": "identifier", "text": "DVP_CFG_FINISH_INT_ENABLE", "parent": 655, "children": [], "start_point": {"row": 191, "column": 56}, "end_point": {"row": 191, "column": 81}}, {"id": 658, "type": "number_literal", "text": "1", "parent": 654, "children": [], "start_point": {"row": 191, "column": 83}, "end_point": {"row": 191, "column": 84}}, {"id": 659, "type": "while_statement", "text": "while (g_dvp_finish_flag == 0)\r\n ;", "parent": 639, "children": [660], "start_point": {"row": 192, "column": 8}, "end_point": {"row": 193, "column": 13}}, {"id": 660, "type": "parenthesized_expression", "text": "(g_dvp_finish_flag == 0)", "parent": 659, "children": [661], "start_point": {"row": 192, "column": 14}, "end_point": {"row": 192, "column": 38}}, {"id": 661, "type": "binary_expression", "text": "g_dvp_finish_flag == 0", "parent": 660, "children": [662, 663, 664], "start_point": {"row": 192, "column": 15}, "end_point": {"row": 192, "column": 37}}, {"id": 662, "type": "identifier", "text": "g_dvp_finish_flag", "parent": 661, "children": [], "start_point": {"row": 192, "column": 15}, "end_point": {"row": 192, "column": 32}}, {"id": 663, "type": "==", "text": "==", "parent": 661, "children": [], "start_point": {"row": 192, "column": 33}, "end_point": {"row": 192, "column": 35}}, {"id": 664, "type": "number_literal", "text": "0", "parent": 661, "children": [], "start_point": {"row": 192, "column": 36}, "end_point": {"row": 192, "column": 37}}, {"id": 665, "type": "call_expression", "text": "image_crop(&kpu_image, &crop_image, 48, 8)", "parent": 639, "children": [666, 667], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 50}}, {"id": 666, "type": "identifier", "text": "image_crop", "parent": 665, "children": [], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 18}}, {"id": 667, "type": "argument_list", "text": "(&kpu_image, &crop_image, 48, 8)", "parent": 665, "children": [668, 670, 672, 673], "start_point": {"row": 195, "column": 18}, "end_point": {"row": 195, "column": 50}}, {"id": 668, "type": "pointer_expression", "text": "&kpu_image", "parent": 667, "children": [669], "start_point": {"row": 195, "column": 19}, "end_point": {"row": 195, "column": 29}}, {"id": 669, "type": "identifier", "text": "kpu_image", "parent": 668, "children": [], "start_point": {"row": 195, "column": 20}, "end_point": {"row": 195, "column": 29}}, {"id": 670, "type": "pointer_expression", "text": "&crop_image", "parent": 667, "children": [671], "start_point": {"row": 195, "column": 31}, "end_point": {"row": 195, "column": 42}}, {"id": 671, "type": "identifier", "text": "crop_image", "parent": 670, "children": [], "start_point": {"row": 195, "column": 32}, "end_point": {"row": 195, "column": 42}}, {"id": 672, "type": "number_literal", "text": "48", "parent": 667, "children": [], "start_point": {"row": 195, "column": 44}, "end_point": {"row": 195, "column": 46}}, {"id": 673, "type": "number_literal", "text": "8", "parent": 667, "children": [], "start_point": {"row": 195, "column": 48}, "end_point": {"row": 195, "column": 49}}, {"id": 674, "type": "assignment_expression", "text": "g_ai_done_flag = 0", "parent": 639, "children": [675, 676, 677], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 26}}, {"id": 675, "type": "identifier", "text": "g_ai_done_flag", "parent": 674, "children": [], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 22}}, {"id": 676, "type": "=", "text": "=", "parent": 674, "children": [], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 24}}, {"id": 677, "type": "number_literal", "text": "0", "parent": 674, "children": [], "start_point": {"row": 197, "column": 25}, "end_point": {"row": 197, "column": 26}}, {"id": 678, "type": "if_statement", "text": "if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0)\r\n {\r\n printf(\"Cannot run kmodel.\\n\");\r\n return(-1);\r\n }", "parent": 639, "children": [679], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 203, "column": 9}}, {"id": 679, "type": "parenthesized_expression", "text": "(kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0)", "parent": 678, "children": [680], "start_point": {"row": 199, "column": 11}, "end_point": {"row": 199, "column": 74}}, {"id": 680, "type": "binary_expression", "text": "kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0", "parent": 679, "children": [681, 693, 694], "start_point": {"row": 199, "column": 12}, "end_point": {"row": 199, "column": 73}}, {"id": 681, "type": "call_expression", "text": "kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL)", "parent": 680, "children": [682, 683], "start_point": {"row": 199, "column": 12}, "end_point": {"row": 199, "column": 68}}, {"id": 682, "type": "identifier", "text": "kpu_run_kmodel", "parent": 681, "children": [], "start_point": {"row": 199, "column": 12}, "end_point": {"row": 199, "column": 26}}, {"id": 683, "type": "argument_list", "text": "(&task, crop_image.addr, 5, ai_done, NULL)", "parent": 681, "children": [684, 686, 689, 690, 691], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 68}}, {"id": 684, "type": "pointer_expression", "text": "&task", "parent": 683, "children": [685], "start_point": {"row": 199, "column": 27}, "end_point": {"row": 199, "column": 32}}, {"id": 685, "type": "identifier", "text": "task", "parent": 684, "children": [], "start_point": {"row": 199, "column": 28}, "end_point": {"row": 199, "column": 32}}, {"id": 686, "type": "field_expression", "text": "crop_image.addr", "parent": 683, "children": [687, 688], "start_point": {"row": 199, "column": 34}, "end_point": {"row": 199, "column": 49}}, {"id": 687, "type": "identifier", "text": "crop_image", "parent": 686, "children": [], "start_point": {"row": 199, "column": 34}, "end_point": {"row": 199, "column": 44}}, {"id": 688, "type": "field_identifier", "text": "addr", "parent": 686, "children": [], "start_point": {"row": 199, "column": 45}, "end_point": {"row": 199, "column": 49}}, {"id": 689, "type": "number_literal", "text": "5", "parent": 683, "children": [], "start_point": {"row": 199, "column": 51}, "end_point": {"row": 199, "column": 52}}, {"id": 690, "type": "identifier", "text": "ai_done", "parent": 683, "children": [], "start_point": {"row": 199, "column": 54}, "end_point": {"row": 199, "column": 61}}, {"id": 691, "type": "null", "text": "NULL", "parent": 683, "children": [692], "start_point": {"row": 199, "column": 63}, "end_point": {"row": 199, "column": 67}}, {"id": 692, "type": "NULL", "text": "NULL", "parent": 691, "children": [], "start_point": {"row": 199, "column": 63}, "end_point": {"row": 199, "column": 67}}, {"id": 693, "type": "!=", "text": "!=", "parent": 680, "children": [], "start_point": {"row": 199, "column": 69}, "end_point": {"row": 199, "column": 71}}, {"id": 694, "type": "number_literal", "text": "0", "parent": 680, "children": [], "start_point": {"row": 199, "column": 72}, "end_point": {"row": 199, "column": 73}}, {"id": 695, "type": "call_expression", "text": "printf(\"Cannot run kmodel.\\n\")", "parent": 678, "children": [696, 697], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 42}}, {"id": 696, "type": "identifier", "text": "printf", "parent": 695, "children": [], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 18}}, {"id": 697, "type": "argument_list", "text": "(\"Cannot run kmodel.\\n\")", "parent": 695, "children": [698], "start_point": {"row": 201, "column": 18}, "end_point": {"row": 201, "column": 42}}, {"id": 698, "type": "string_literal", "text": "\"Cannot run kmodel.\\n\"", "parent": 697, "children": [699], "start_point": {"row": 201, "column": 19}, "end_point": {"row": 201, "column": 41}}, {"id": 699, "type": "escape_sequence", "text": "\\n", "parent": 698, "children": [], "start_point": {"row": 201, "column": 38}, "end_point": {"row": 201, "column": 40}}, {"id": 700, "type": "return_statement", "text": "return(-1);", "parent": 678, "children": [701], "start_point": {"row": 202, "column": 12}, "end_point": {"row": 202, "column": 23}}, {"id": 701, "type": "parenthesized_expression", "text": "(-1)", "parent": 700, "children": [702], "start_point": {"row": 202, "column": 18}, "end_point": {"row": 202, "column": 22}}, {"id": 702, "type": "number_literal", "text": "-1", "parent": 701, "children": [], "start_point": {"row": 202, "column": 19}, "end_point": {"row": 202, "column": 21}}, {"id": 703, "type": "while_statement", "text": "while (!g_ai_done_flag);", "parent": 639, "children": [704], "start_point": {"row": 204, "column": 2}, "end_point": {"row": 204, "column": 26}}, {"id": 704, "type": "parenthesized_expression", "text": "(!g_ai_done_flag)", "parent": 703, "children": [705], "start_point": {"row": 204, "column": 8}, "end_point": {"row": 204, "column": 25}}, {"id": 705, "type": "unary_expression", "text": "!g_ai_done_flag", "parent": 704, "children": [706, 707], "start_point": {"row": 204, "column": 9}, "end_point": {"row": 204, "column": 24}}, {"id": 706, "type": "!", "text": "!", "parent": 705, "children": [], "start_point": {"row": 204, "column": 9}, "end_point": {"row": 204, "column": 10}}, {"id": 707, "type": "identifier", "text": "g_ai_done_flag", "parent": 705, "children": [], "start_point": {"row": 204, "column": 10}, "end_point": {"row": 204, "column": 24}}, {"id": 708, "type": "declaration", "text": "float *features;", "parent": 639, "children": [709, 710], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 24}}, {"id": 709, "type": "primitive_type", "text": "float", "parent": 708, "children": [], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 13}}, {"id": 710, "type": "pointer_declarator", "text": "*features", "parent": 708, "children": [711, 712], "start_point": {"row": 206, "column": 14}, "end_point": {"row": 206, "column": 23}}, {"id": 711, "type": "*", "text": "*", "parent": 710, "children": [], "start_point": {"row": 206, "column": 14}, "end_point": {"row": 206, "column": 15}}, {"id": 712, "type": "identifier", "text": "features", "parent": 710, "children": [], "start_point": {"row": 206, "column": 15}, "end_point": {"row": 206, "column": 23}}, {"id": 713, "type": "declaration", "text": "size_t output_size;", "parent": 639, "children": [714, 715], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 207, "column": 27}}, {"id": 714, "type": "primitive_type", "text": "size_t", "parent": 713, "children": [], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 207, "column": 14}}, {"id": 715, "type": "identifier", "text": "output_size", "parent": 713, "children": [], "start_point": {"row": 207, "column": 15}, "end_point": {"row": 207, "column": 26}}, {"id": 716, "type": "call_expression", "text": "kpu_get_output(&task, 0, &features, &output_size)", "parent": 639, "children": [717, 718], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 57}}, {"id": 717, "type": "identifier", "text": "kpu_get_output", "parent": 716, "children": [], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 22}}, {"id": 718, "type": "argument_list", "text": "(&task, 0, &features, &output_size)", "parent": 716, "children": [719, 721, 722, 724], "start_point": {"row": 208, "column": 22}, "end_point": {"row": 208, "column": 57}}, {"id": 719, "type": "pointer_expression", "text": "&task", "parent": 718, "children": [720], "start_point": {"row": 208, "column": 23}, "end_point": {"row": 208, "column": 28}}, {"id": 720, "type": "identifier", "text": "task", "parent": 719, "children": [], "start_point": {"row": 208, "column": 24}, "end_point": {"row": 208, "column": 28}}, {"id": 721, "type": "number_literal", "text": "0", "parent": 718, "children": [], "start_point": {"row": 208, "column": 30}, "end_point": {"row": 208, "column": 31}}, {"id": 722, "type": "pointer_expression", "text": "&features", "parent": 718, "children": [723], "start_point": {"row": 208, "column": 33}, "end_point": {"row": 208, "column": 42}}, {"id": 723, "type": "identifier", "text": "features", "parent": 722, "children": [], "start_point": {"row": 208, "column": 34}, "end_point": {"row": 208, "column": 42}}, {"id": 724, "type": "pointer_expression", "text": "&output_size", "parent": 718, "children": [725], "start_point": {"row": 208, "column": 44}, "end_point": {"row": 208, "column": 56}}, {"id": 725, "type": "identifier", "text": "output_size", "parent": 724, "children": [], "start_point": {"row": 208, "column": 45}, "end_point": {"row": 208, "column": 56}}, {"id": 726, "type": "declaration", "text": "size_t cls = argmax(features, 5);", "parent": 639, "children": [727, 728], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 41}}, {"id": 727, "type": "primitive_type", "text": "size_t", "parent": 726, "children": [], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 14}}, {"id": 728, "type": "init_declarator", "text": "cls = argmax(features, 5)", "parent": 726, "children": [729, 730, 731], "start_point": {"row": 210, "column": 15}, "end_point": {"row": 210, "column": 40}}, {"id": 729, "type": "identifier", "text": "cls", "parent": 728, "children": [], "start_point": {"row": 210, "column": 15}, "end_point": {"row": 210, "column": 18}}, {"id": 730, "type": "=", "text": "=", "parent": 728, "children": [], "start_point": {"row": 210, "column": 19}, "end_point": {"row": 210, "column": 20}}, {"id": 731, "type": "call_expression", "text": "argmax(features, 5)", "parent": 728, "children": [732, 733], "start_point": {"row": 210, "column": 21}, "end_point": {"row": 210, "column": 40}}, {"id": 732, "type": "identifier", "text": "argmax", "parent": 731, "children": [], "start_point": {"row": 210, "column": 21}, "end_point": {"row": 210, "column": 27}}, {"id": 733, "type": "argument_list", "text": "(features, 5)", "parent": 731, "children": [734, 735], "start_point": {"row": 210, "column": 27}, "end_point": {"row": 210, "column": 40}}, {"id": 734, "type": "identifier", "text": "features", "parent": 733, "children": [], "start_point": {"row": 210, "column": 28}, "end_point": {"row": 210, "column": 36}}, {"id": 735, "type": "number_literal", "text": "5", "parent": 733, "children": [], "start_point": {"row": 210, "column": 38}, "end_point": {"row": 210, "column": 39}}, {"id": 736, "type": "declaration", "text": "const char *text = NULL;", "parent": 639, "children": [737, 738], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 32}}, {"id": 737, "type": "primitive_type", "text": "char", "parent": 736, "children": [], "start_point": {"row": 212, "column": 14}, "end_point": {"row": 212, "column": 18}}, {"id": 738, "type": "init_declarator", "text": "*text = NULL", "parent": 736, "children": [739, 742, 743], "start_point": {"row": 212, "column": 19}, "end_point": {"row": 212, "column": 31}}, {"id": 739, "type": "pointer_declarator", "text": "*text", "parent": 738, "children": [740, 741], "start_point": {"row": 212, "column": 19}, "end_point": {"row": 212, "column": 24}}, {"id": 740, "type": "*", "text": "*", "parent": 739, "children": [], "start_point": {"row": 212, "column": 19}, "end_point": {"row": 212, "column": 20}}, {"id": 741, "type": "identifier", "text": "text", "parent": 739, "children": [], "start_point": {"row": 212, "column": 20}, "end_point": {"row": 212, "column": 24}}, {"id": 742, "type": "=", "text": "=", "parent": 738, "children": [], "start_point": {"row": 212, "column": 25}, "end_point": {"row": 212, "column": 26}}, {"id": 743, "type": "null", "text": "NULL", "parent": 738, "children": [744], "start_point": {"row": 212, "column": 27}, "end_point": {"row": 212, "column": 31}}, {"id": 744, "type": "NULL", "text": "NULL", "parent": 743, "children": [], "start_point": {"row": 212, "column": 27}, "end_point": {"row": 212, "column": 31}}, {"id": 745, "type": "switch_statement", "text": "switch (cls)\r\n {\r\n case 0:\r\n text = \"daisy\";\r\n break;\r\n case 1:\r\n text = \"dandelion\";\r\n break;\r\n case 2:\r\n text = \"roses\";\r\n break;\r\n case 3:\r\n text = \"sunflowers\";\r\n break;\r\n case 4:\r\n text = \"tulip\";\r\n break;\r\n }", "parent": 639, "children": [746, 747], "start_point": {"row": 213, "column": 8}, "end_point": {"row": 230, "column": 9}}, {"id": 746, "type": "switch", "text": "switch", "parent": 745, "children": [], "start_point": {"row": 213, "column": 8}, "end_point": {"row": 213, "column": 14}}, {"id": 747, "type": "parenthesized_expression", "text": "(cls)", "parent": 745, "children": [748], "start_point": {"row": 213, "column": 15}, "end_point": {"row": 213, "column": 20}}, {"id": 748, "type": "identifier", "text": "cls", "parent": 747, "children": [], "start_point": {"row": 213, "column": 16}, "end_point": {"row": 213, "column": 19}}, {"id": 749, "type": "case_statement", "text": "case 0:\r\n text = \"daisy\";\r\n break;", "parent": 745, "children": [750, 751, 756], "start_point": {"row": 215, "column": 12}, "end_point": {"row": 217, "column": 22}}, {"id": 750, "type": "case", "text": "case", "parent": 749, "children": [], "start_point": {"row": 215, "column": 12}, "end_point": {"row": 215, "column": 16}}, {"id": 751, "type": "number_literal", "text": "0", "parent": 749, "children": [], "start_point": {"row": 215, "column": 17}, "end_point": {"row": 215, "column": 18}}, {"id": 752, "type": "assignment_expression", "text": "text = \"daisy\"", "parent": 749, "children": [753, 754, 755], "start_point": {"row": 216, "column": 16}, "end_point": {"row": 216, "column": 30}}, {"id": 753, "type": "identifier", "text": "text", "parent": 752, "children": [], "start_point": {"row": 216, "column": 16}, "end_point": {"row": 216, "column": 20}}, {"id": 754, "type": "=", "text": "=", "parent": 752, "children": [], "start_point": {"row": 216, "column": 21}, "end_point": {"row": 216, "column": 22}}, {"id": 755, "type": "string_literal", "text": "\"daisy\"", "parent": 752, "children": [], "start_point": {"row": 216, "column": 23}, "end_point": {"row": 216, "column": 30}}, {"id": 756, "type": "break_statement", "text": "break;", "parent": 749, "children": [757], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 22}}, {"id": 757, "type": "break", "text": "break", "parent": 756, "children": [], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 21}}, {"id": 758, "type": "case_statement", "text": "case 1:\r\n text = \"dandelion\";\r\n break;", "parent": 745, "children": [759, 760, 765], "start_point": {"row": 218, "column": 12}, "end_point": {"row": 220, "column": 22}}, {"id": 759, "type": "case", "text": "case", "parent": 758, "children": [], "start_point": {"row": 218, "column": 12}, "end_point": {"row": 218, "column": 16}}, {"id": 760, "type": "number_literal", "text": "1", "parent": 758, "children": [], "start_point": {"row": 218, "column": 17}, "end_point": {"row": 218, "column": 18}}, {"id": 761, "type": "assignment_expression", "text": "text = \"dandelion\"", "parent": 758, "children": [762, 763, 764], "start_point": {"row": 219, "column": 16}, "end_point": {"row": 219, "column": 34}}, {"id": 762, "type": "identifier", "text": "text", "parent": 761, "children": [], "start_point": {"row": 219, "column": 16}, "end_point": {"row": 219, "column": 20}}, {"id": 763, "type": "=", "text": "=", "parent": 761, "children": [], "start_point": {"row": 219, "column": 21}, "end_point": {"row": 219, "column": 22}}, {"id": 764, "type": "string_literal", "text": "\"dandelion\"", "parent": 761, "children": [], "start_point": {"row": 219, "column": 23}, "end_point": {"row": 219, "column": 34}}, {"id": 765, "type": "break_statement", "text": "break;", "parent": 758, "children": [766], "start_point": {"row": 220, "column": 16}, "end_point": {"row": 220, "column": 22}}, {"id": 766, "type": "break", "text": "break", "parent": 765, "children": [], "start_point": {"row": 220, "column": 16}, "end_point": {"row": 220, "column": 21}}, {"id": 767, "type": "case_statement", "text": "case 2:\r\n text = \"roses\";\r\n break;", "parent": 745, "children": [768, 769, 774], "start_point": {"row": 221, "column": 12}, "end_point": {"row": 223, "column": 22}}, {"id": 768, "type": "case", "text": "case", "parent": 767, "children": [], "start_point": {"row": 221, "column": 12}, "end_point": {"row": 221, "column": 16}}, {"id": 769, "type": "number_literal", "text": "2", "parent": 767, "children": [], "start_point": {"row": 221, "column": 17}, "end_point": {"row": 221, "column": 18}}, {"id": 770, "type": "assignment_expression", "text": "text = \"roses\"", "parent": 767, "children": [771, 772, 773], "start_point": {"row": 222, "column": 16}, "end_point": {"row": 222, "column": 30}}, {"id": 771, "type": "identifier", "text": "text", "parent": 770, "children": [], "start_point": {"row": 222, "column": 16}, "end_point": {"row": 222, "column": 20}}, {"id": 772, "type": "=", "text": "=", "parent": 770, "children": [], "start_point": {"row": 222, "column": 21}, "end_point": {"row": 222, "column": 22}}, {"id": 773, "type": "string_literal", "text": "\"roses\"", "parent": 770, "children": [], "start_point": {"row": 222, "column": 23}, "end_point": {"row": 222, "column": 30}}, {"id": 774, "type": "break_statement", "text": "break;", "parent": 767, "children": [775], "start_point": {"row": 223, "column": 16}, "end_point": {"row": 223, "column": 22}}, {"id": 775, "type": "break", "text": "break", "parent": 774, "children": [], "start_point": {"row": 223, "column": 16}, "end_point": {"row": 223, "column": 21}}, {"id": 776, "type": "case_statement", "text": "case 3:\r\n text = \"sunflowers\";\r\n break;", "parent": 745, "children": [777, 778, 783], "start_point": {"row": 224, "column": 12}, "end_point": {"row": 226, "column": 22}}, {"id": 777, "type": "case", "text": "case", "parent": 776, "children": [], "start_point": {"row": 224, "column": 12}, "end_point": {"row": 224, "column": 16}}, {"id": 778, "type": "number_literal", "text": "3", "parent": 776, "children": [], "start_point": {"row": 224, "column": 17}, "end_point": {"row": 224, "column": 18}}, {"id": 779, "type": "assignment_expression", "text": "text = \"sunflowers\"", "parent": 776, "children": [780, 781, 782], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 35}}, {"id": 780, "type": "identifier", "text": "text", "parent": 779, "children": [], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 20}}, {"id": 781, "type": "=", "text": "=", "parent": 779, "children": [], "start_point": {"row": 225, "column": 21}, "end_point": {"row": 225, "column": 22}}, {"id": 782, "type": "string_literal", "text": "\"sunflowers\"", "parent": 779, "children": [], "start_point": {"row": 225, "column": 23}, "end_point": {"row": 225, "column": 35}}, {"id": 783, "type": "break_statement", "text": "break;", "parent": 776, "children": [784], "start_point": {"row": 226, "column": 16}, "end_point": {"row": 226, "column": 22}}, {"id": 784, "type": "break", "text": "break", "parent": 783, "children": [], "start_point": {"row": 226, "column": 16}, "end_point": {"row": 226, "column": 21}}, {"id": 785, "type": "case_statement", "text": "case 4:\r\n text = \"tulip\";\r\n break;", "parent": 745, "children": [786, 787, 792], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 229, "column": 22}}, {"id": 786, "type": "case", "text": "case", "parent": 785, "children": [], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 16}}, {"id": 787, "type": "number_literal", "text": "4", "parent": 785, "children": [], "start_point": {"row": 227, "column": 17}, "end_point": {"row": 227, "column": 18}}, {"id": 788, "type": "assignment_expression", "text": "text = \"tulip\"", "parent": 785, "children": [789, 790, 791], "start_point": {"row": 228, "column": 16}, "end_point": {"row": 228, "column": 30}}, {"id": 789, "type": "identifier", "text": "text", "parent": 788, "children": [], "start_point": {"row": 228, "column": 16}, "end_point": {"row": 228, "column": 20}}, {"id": 790, "type": "=", "text": "=", "parent": 788, "children": [], "start_point": {"row": 228, "column": 21}, "end_point": {"row": 228, "column": 22}}, {"id": 791, "type": "string_literal", "text": "\"tulip\"", "parent": 788, "children": [], "start_point": {"row": 228, "column": 23}, "end_point": {"row": 228, "column": 30}}, {"id": 792, "type": "break_statement", "text": "break;", "parent": 785, "children": [793], "start_point": {"row": 229, "column": 16}, "end_point": {"row": 229, "column": 22}}, {"id": 793, "type": "break", "text": "break", "parent": 792, "children": [], "start_point": {"row": 229, "column": 16}, "end_point": {"row": 229, "column": 21}}, {"id": 794, "type": "if_statement", "text": "if (features[cls] > PROB_THRESH)\r\n\t\t\tram_draw_string(display_image.addr, 150, 20, text, RED);", "parent": 639, "children": [795], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 234, "column": 59}}, {"id": 795, "type": "parenthesized_expression", "text": "(features[cls] > PROB_THRESH)", "parent": 794, "children": [796], "start_point": {"row": 233, "column": 11}, "end_point": {"row": 233, "column": 40}}, {"id": 796, "type": "binary_expression", "text": "features[cls] > PROB_THRESH", "parent": 795, "children": [797, 800, 801], "start_point": {"row": 233, "column": 12}, "end_point": {"row": 233, "column": 39}}, {"id": 797, "type": "subscript_expression", "text": "features[cls]", "parent": 796, "children": [798, 799], "start_point": {"row": 233, "column": 12}, "end_point": {"row": 233, "column": 25}}, {"id": 798, "type": "identifier", "text": "features", "parent": 797, "children": [], "start_point": {"row": 233, "column": 12}, "end_point": {"row": 233, "column": 20}}, {"id": 799, "type": "identifier", "text": "cls", "parent": 797, "children": [], "start_point": {"row": 233, "column": 21}, "end_point": {"row": 233, "column": 24}}, {"id": 800, "type": ">", "text": ">", "parent": 796, "children": [], "start_point": {"row": 233, "column": 26}, "end_point": {"row": 233, "column": 27}}, {"id": 801, "type": "identifier", "text": "PROB_THRESH", "parent": 796, "children": [], "start_point": {"row": 233, "column": 28}, "end_point": {"row": 233, "column": 39}}, {"id": 802, "type": "call_expression", "text": "ram_draw_string(display_image.addr, 150, 20, text, RED)", "parent": 794, "children": [803, 804], "start_point": {"row": 234, "column": 3}, "end_point": {"row": 234, "column": 58}}, {"id": 803, "type": "identifier", "text": "ram_draw_string", "parent": 802, "children": [], "start_point": {"row": 234, "column": 3}, "end_point": {"row": 234, "column": 18}}, {"id": 804, "type": "argument_list", "text": "(display_image.addr, 150, 20, text, RED)", "parent": 802, "children": [805, 808, 809, 810, 811], "start_point": {"row": 234, "column": 18}, "end_point": {"row": 234, "column": 58}}, {"id": 805, "type": "field_expression", "text": "display_image.addr", "parent": 804, "children": [806, 807], "start_point": {"row": 234, "column": 19}, "end_point": {"row": 234, "column": 37}}, {"id": 806, "type": "identifier", "text": "display_image", "parent": 805, "children": [], "start_point": {"row": 234, "column": 19}, "end_point": {"row": 234, "column": 32}}, {"id": 807, "type": "field_identifier", "text": "addr", "parent": 805, "children": [], "start_point": {"row": 234, "column": 33}, "end_point": {"row": 234, "column": 37}}, {"id": 808, "type": "number_literal", "text": "150", "parent": 804, "children": [], "start_point": {"row": 234, "column": 39}, "end_point": {"row": 234, "column": 42}}, {"id": 809, "type": "number_literal", "text": "20", "parent": 804, "children": [], "start_point": {"row": 234, "column": 44}, "end_point": {"row": 234, "column": 46}}, {"id": 810, "type": "identifier", "text": "text", "parent": 804, "children": [], "start_point": {"row": 234, "column": 48}, "end_point": {"row": 234, "column": 52}}, {"id": 811, "type": "identifier", "text": "RED", "parent": 804, "children": [], "start_point": {"row": 234, "column": 54}, "end_point": {"row": 234, "column": 57}}, {"id": 812, "type": "call_expression", "text": "lcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr)", "parent": 639, "children": [813, 814], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 235, "column": 66}}, {"id": 813, "type": "identifier", "text": "lcd_draw_picture", "parent": 812, "children": [], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 235, "column": 18}}, {"id": 814, "type": "argument_list", "text": "(0, 0, 320, 240, (uint32_t *)display_image.addr)", "parent": 812, "children": [815, 816, 817, 818, 819], "start_point": {"row": 235, "column": 18}, "end_point": {"row": 235, "column": 66}}, {"id": 815, "type": "number_literal", "text": "0", "parent": 814, "children": [], "start_point": {"row": 235, "column": 19}, "end_point": {"row": 235, "column": 20}}, {"id": 816, "type": "number_literal", "text": "0", "parent": 814, "children": [], "start_point": {"row": 235, "column": 22}, "end_point": {"row": 235, "column": 23}}, {"id": 817, "type": "number_literal", "text": "320", "parent": 814, "children": [], "start_point": {"row": 235, "column": 25}, "end_point": {"row": 235, "column": 28}}, {"id": 818, "type": "number_literal", "text": "240", "parent": 814, "children": [], "start_point": {"row": 235, "column": 30}, "end_point": {"row": 235, "column": 33}}, {"id": 819, "type": "cast_expression", "text": "(uint32_t *)display_image.addr", "parent": 814, "children": [820, 824], "start_point": {"row": 235, "column": 35}, "end_point": {"row": 235, "column": 65}}, {"id": 820, "type": "type_descriptor", "text": "uint32_t *", "parent": 819, "children": [821, 822], "start_point": {"row": 235, "column": 36}, "end_point": {"row": 235, "column": 46}}, {"id": 821, "type": "primitive_type", "text": "uint32_t", "parent": 820, "children": [], "start_point": {"row": 235, "column": 36}, "end_point": {"row": 235, "column": 44}}, {"id": 822, "type": "abstract_pointer_declarator", "text": "*", "parent": 820, "children": [823], "start_point": {"row": 235, "column": 45}, "end_point": {"row": 235, "column": 46}}, {"id": 823, "type": "*", "text": "*", "parent": 822, "children": [], "start_point": {"row": 235, "column": 45}, "end_point": {"row": 235, "column": 46}}, {"id": 824, "type": "field_expression", "text": "display_image.addr", "parent": 819, "children": [825, 826], "start_point": {"row": 235, "column": 47}, "end_point": {"row": 235, "column": 65}}, {"id": 825, "type": "identifier", "text": "display_image", "parent": 824, "children": [], "start_point": {"row": 235, "column": 47}, "end_point": {"row": 235, "column": 60}}, {"id": 826, "type": "field_identifier", "text": "addr", "parent": 824, "children": [], "start_point": {"row": 235, "column": 61}, "end_point": {"row": 235, "column": 65}}]}, "node_categories": {"declarations": {"functions": [84, 86, 172, 174, 213, 215, 308, 310, 325, 327, 383, 385], "variables": [61, 66, 71, 76, 89, 98, 103, 129, 177, 218, 313, 330, 335, 338, 344, 708, 713, 726, 736], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 46, 47], "modules": [], "enums": []}, "statements": {"expressions": [79, 106, 109, 112, 119, 121, 126, 137, 141, 145, 146, 147, 153, 158, 162, 165, 183, 184, 188, 191, 195, 204, 207, 220, 225, 230, 235, 240, 245, 250, 255, 260, 264, 268, 273, 278, 282, 286, 290, 294, 298, 303, 315, 320, 356, 360, 364, 365, 366, 374, 388, 393, 398, 402, 405, 408, 411, 416, 419, 423, 427, 432, 436, 440, 443, 448, 453, 457, 462, 466, 472, 478, 483, 486, 489, 495, 501, 506, 509, 512, 518, 524, 529, 532, 534, 537, 540, 543, 546, 547, 548, 552, 556, 559, 560, 561, 565, 566, 572, 575, 578, 581, 584, 588, 591, 596, 601, 608, 613, 614, 615, 618, 623, 629, 631, 634, 640, 646, 649, 652, 655, 660, 661, 665, 668, 670, 679, 680, 681, 684, 686, 695, 701, 704, 705, 716, 719, 722, 724, 731, 747, 795, 796, 797, 802, 805, 812, 819, 824], "assignments": [94, 123, 133, 199, 352, 371, 377, 465, 471, 477, 488, 494, 500, 511, 517, 523, 642, 674, 752, 761, 770, 779, 788], "loops": [132, 351, 639, 659, 703], "conditionals": [41, 45, 51, 55, 59, 62, 65, 67, 70, 72, 73, 74, 75, 77, 78, 80, 82, 87, 93, 95, 102, 105, 107, 110, 120, 122, 124, 131, 134, 138, 140, 142, 144, 148, 154, 159, 163, 164, 166, 175, 181, 182, 185, 187, 189, 192, 193, 196, 198, 200, 205, 208, 210, 216, 221, 223, 224, 226, 228, 229, 231, 233, 234, 236, 238, 239, 241, 243, 244, 246, 248, 249, 251, 253, 254, 256, 258, 259, 261, 263, 265, 267, 269, 271, 272, 274, 276, 277, 279, 281, 283, 285, 287, 291, 293, 295, 297, 299, 301, 302, 304, 306, 307, 311, 316, 318, 319, 321, 323, 324, 328, 334, 337, 341, 343, 346, 348, 353, 357, 359, 361, 363, 367, 368, 370, 372, 375, 376, 378, 380, 382, 386, 389, 391, 392, 394, 396, 397, 399, 401, 403, 406, 409, 412, 417, 420, 422, 424, 426, 428, 433, 437, 441, 444, 449, 454, 456, 458, 463, 467, 468, 473, 474, 479, 480, 484, 487, 490, 491, 496, 497, 502, 503, 507, 510, 513, 514, 519, 520, 525, 526, 530, 533, 535, 541, 542, 549, 550, 562, 563, 573, 579, 580, 582, 585, 586, 589, 592, 597, 599, 602, 604, 605, 609, 611, 612, 616, 619, 620, 624, 632, 635, 643, 647, 650, 651, 653, 656, 657, 662, 666, 669, 671, 675, 678, 682, 685, 687, 688, 690, 696, 707, 712, 715, 717, 720, 723, 725, 729, 732, 734, 741, 745, 746, 748, 749, 750, 753, 758, 759, 762, 767, 768, 771, 776, 777, 780, 785, 786, 789, 794, 798, 799, 801, 803, 806, 807, 810, 811, 813, 825, 826], "returns": [170, 211, 381, 628, 700], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 48, 83, 97, 111, 136, 150, 152, 156, 161, 168, 171, 194, 202, 212, 289, 350, 355, 414, 430, 435, 439, 446, 447, 451, 452, 460, 461, 470, 476, 482, 493, 499, 505, 516, 522, 528, 553, 555, 567, 569, 571, 587, 594, 600, 622, 626, 630, 637, 641, 645, 658, 664, 672, 673, 677, 689, 694, 698, 702, 721, 735, 751, 755, 760, 764, 769, 773, 778, 782, 787, 791, 808, 809, 815, 816, 817, 818], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 84, "universal_type": "function", "name": "ai_done", "text_snippet": "static int ai_done(void* userdata)\r\n{\r\n g_ai_done_flag = 1;\r\n float *features;\r\n size_t cou"}, {"node_id": 86, "universal_type": "function", "name": "unknown", "text_snippet": "ai_done(void* userdata)"}, {"node_id": 172, "universal_type": "function", "name": "dvp_irq", "text_snippet": "static int dvp_irq(void *ctx)\r\n{\r\n if (dvp_get_interrupt(DVP_STS_FRAME_FINISH))\r\n {\r\n d"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "dvp_irq(void *ctx)"}, {"node_id": 213, "universal_type": "function", "name": "io_init", "text_snippet": "static void io_init(void)\r\n{\r\n /* Init DVP IO map and function settings */\r\n fpioa_set_functio"}, {"node_id": 215, "universal_type": "function", "name": "unknown", "text_snippet": "io_init(void)"}, {"node_id": 308, "universal_type": "function", "name": "io_set_power", "text_snippet": "static void io_set_power(void)\r\n{\r\n /* Set dvp and spi pin to 1.8V */\r\n sysctl_set_power_mode("}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "io_set_power(void)"}, {"node_id": 325, "universal_type": "function", "name": "argmax", "text_snippet": "int argmax(float* src, size_t count)\r\n{\r\n float max = FLT_MIN;\r\n size_t i, max_i = 0;\r\n for"}, {"node_id": 327, "universal_type": "function", "name": "unknown", "text_snippet": "argmax(float* src, size_t count)"}, {"node_id": 383, "universal_type": "function", "name": "main", "text_snippet": "int main()\r\n{\r\n /* Set CPU and dvp clk */\r\n sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ)"}, {"node_id": 385, "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"}, {"node_id": 3, "text": "#include \"kpu.h\"\r\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"sysctl.h\"\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"plic.h\"\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"utils.h\"\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <float.h>\r\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"fpioa.h\"\r\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"lcd.h\"\r\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"dvp.h\"\r\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"ov2640.h\"\r\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"image_process.h\"\r\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"board_config.h\"\r\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"gpiohs.h\"\r\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 46, "text": "#include \"incbin.h\"\r\n"}, {"node_id": 47, "text": "#include"}]}, "original_source_code": "/* Copyright 2018 Canaan Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n#include <stdio.h>\r\n#include \"kpu.h\"\r\n#include \"sysctl.h\"\r\n#include \"plic.h\"\r\n#include \"utils.h\"\r\n#include <float.h>\r\n#include \"fpioa.h\"\r\n#include \"lcd.h\"\r\n#include \"dvp.h\"\r\n#include \"ov2640.h\"\r\n#include \"image_process.h\"\r\n#include \"board_config.h\"\r\n#include \"gpiohs.h\"\r\n#define INCBIN_STYLE INCBIN_STYLE_SNAKE\r\n#define INCBIN_PREFIX\r\n#include \"incbin.h\"\r\n\r\n#define PROB_THRESH (0.7f)\r\n\r\n#define PLL0_OUTPUT_FREQ 800000000UL\r\n#define PLL1_OUTPUT_FREQ 400000000UL\r\n\r\nvolatile uint32_t g_ai_done_flag;\r\nvolatile uint8_t g_dvp_finish_flag;\r\nstatic image_t kpu_image, display_image, crop_image;\r\n\r\nkpu_model_context_t task;\r\n\r\nINCBIN(model, \"class.kmodel\");\r\n\r\nstatic int ai_done(void* userdata)\r\n{\r\n g_ai_done_flag = 1;\r\n float *features;\r\n size_t count;\r\n kpu_get_output(&task, 0, (uint8_t **)&features, &count);\r\n count /= sizeof(float);\r\n\r\n size_t i;\r\n for (i = 0; i < count; i++)\r\n {\r\n if (i % 64 == 0)\r\n printf(\"\\n\");\r\n printf(\"%f, \", features[i]);\r\n }\r\n\r\n printf(\"\\n\");\r\n return 0;\r\n}\r\n\r\nstatic int dvp_irq(void *ctx)\r\n{\r\n if (dvp_get_interrupt(DVP_STS_FRAME_FINISH))\r\n {\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);\r\n dvp_clear_interrupt(DVP_STS_FRAME_FINISH);\r\n g_dvp_finish_flag = 1;\r\n }\r\n else\r\n {\r\n dvp_start_convert();\r\n dvp_clear_interrupt(DVP_STS_FRAME_START);\r\n }\r\n return 0;\r\n}\r\n\r\nstatic void io_init(void)\r\n{\r\n /* Init DVP IO map and function settings */\r\n fpioa_set_function(OV_RST_PIN, FUNC_CMOS_RST);\r\n fpioa_set_function(OV_PWDN_PIN, FUNC_CMOS_PWDN);\r\n fpioa_set_function(OV_XCLK_PIN, FUNC_CMOS_XCLK);\r\n fpioa_set_function(OV_VSYNC_PIN, FUNC_CMOS_VSYNC);\r\n fpioa_set_function(OV_HREF_PIN, FUNC_CMOS_HREF);\r\n fpioa_set_function(OV_PCLK_PIN, FUNC_CMOS_PCLK);\r\n fpioa_set_function(OV_SCCB_SCLK_PIN, FUNC_SCCB_SCLK);\r\n fpioa_set_function(OV_SCCB_SDA_PIN, FUNC_SCCB_SDA);\r\n\r\n /* Init SPI IO map and function settings */\r\n fpioa_set_function(LCD_DC_PIN, FUNC_GPIOHS0 + LCD_DC_IO);\r\n fpioa_set_function(LCD_CS_PIN, FUNC_SPI0_SS3);\r\n fpioa_set_function(LCD_RW_PIN, FUNC_SPI0_SCLK);\r\n fpioa_set_function(LCD_RST_PIN, FUNC_GPIOHS0 + LCD_RST_IO);\r\n\r\n sysctl_set_spi0_dvp_data(1);\r\n\r\n // LCD Backlight\r\n fpioa_set_function(LCD_BLIGHT_PIN, FUNC_GPIOHS0 + LCD_BLIGHT_IO);\r\n gpiohs_set_drive_mode(LCD_BLIGHT_IO, GPIO_DM_OUTPUT);\r\n gpiohs_set_pin(LCD_BLIGHT_IO, GPIO_PV_LOW);\r\n}\r\n\r\nstatic void io_set_power(void)\r\n{\r\n /* Set dvp and spi pin to 1.8V */\r\n sysctl_set_power_mode(SYSCTL_POWER_BANK6, SYSCTL_POWER_V18);\r\n sysctl_set_power_mode(SYSCTL_POWER_BANK7, SYSCTL_POWER_V18);\r\n}\r\n\r\nint argmax(float* src, size_t count)\r\n{\r\n float max = FLT_MIN;\r\n size_t i, max_i = 0;\r\n for (i = 0; i < count; i++)\r\n {\r\n if (src[i] > max)\r\n {\r\n max = src[i];\r\n max_i = i;\r\n }\r\n }\r\n\r\n return max_i;\r\n}\r\n\r\nint main()\r\n{\r\n /* Set CPU and dvp clk */\r\n sysctl_pll_set_freq(SYSCTL_PLL0, PLL0_OUTPUT_FREQ);\r\n sysctl_pll_set_freq(SYSCTL_PLL1, PLL1_OUTPUT_FREQ);\r\n sysctl_clock_enable(SYSCTL_CLOCK_AI);\r\n // uarths_init();\r\n plic_init();\r\n io_set_power();\r\n io_init();\r\n \r\n /* LCD init */\r\n printf(\"LCD init\\n\");\r\n lcd_init();\r\n lcd_set_direction(DIR_YX_RLDU);\r\n lcd_clear(BLACK);\r\n /* DVP init */\r\n printf(\"DVP init\\n\");\r\n dvp_init(8);\r\n dvp_set_xclk_rate(24000000);\r\n dvp_enable_burst();\r\n dvp_set_output_enable(0, 1);\r\n dvp_set_output_enable(1, 1);\r\n dvp_set_image_format(DVP_CFG_RGB_FORMAT);\r\n dvp_set_image_size(320, 240);\r\n ov2640_init();\r\n\r\n kpu_image.pixel = 3;\r\n kpu_image.width = 320;\r\n kpu_image.height = 240;\r\n image_init(&kpu_image);\r\n display_image.pixel = 2;\r\n display_image.width = 320;\r\n display_image.height = 240;\r\n image_init(&display_image);\r\n crop_image.pixel = 3;\r\n crop_image.width = 224;\r\n crop_image.height = 224;\r\n image_init(&crop_image);\r\n dvp_set_ai_addr((uint32_t)kpu_image.addr, (uint32_t)(kpu_image.addr + 320 * 240), (uint32_t)(kpu_image.addr + 320 * 240 * 2));\r\n dvp_set_display_addr((uint32_t)display_image.addr);\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 0);\r\n dvp_disable_auto();\r\n /* DVP interrupt config */\r\n printf(\"DVP interrupt config\\n\");\r\n plic_set_priority(IRQN_DVP_INTERRUPT, 1);\r\n plic_irq_register(IRQN_DVP_INTERRUPT, dvp_irq, NULL);\r\n plic_irq_enable(IRQN_DVP_INTERRUPT);\r\n /* init model */\r\n if (kpu_load_kmodel(&task, model_data) != 0)\r\n {\r\n printf(\"Cannot load kmodel.\\n\");\r\n return(-1);\r\n }\r\n sysctl_enable_irq();\r\n \r\n /* system start */\r\n printf(\"System start\\n\");\r\n while (1)\r\n {\r\n g_dvp_finish_flag = 0;\r\n dvp_clear_interrupt(DVP_STS_FRAME_START | DVP_STS_FRAME_FINISH);\r\n dvp_config_interrupt(DVP_CFG_START_INT_ENABLE | DVP_CFG_FINISH_INT_ENABLE, 1);\r\n while (g_dvp_finish_flag == 0)\r\n ;\r\n \r\n image_crop(&kpu_image, &crop_image, 48, 8);\r\n\r\n g_ai_done_flag = 0;\r\n\r\n if (kpu_run_kmodel(&task, crop_image.addr, 5, ai_done, NULL) != 0)\r\n {\r\n printf(\"Cannot run kmodel.\\n\");\r\n return(-1);\r\n }\r\n\t\twhile (!g_ai_done_flag);\r\n\r\n float *features;\r\n size_t output_size;\r\n kpu_get_output(&task, 0, &features, &output_size);\r\n\r\n size_t cls = argmax(features, 5);\r\n\r\n const char *text = NULL;\r\n switch (cls)\r\n {\r\n case 0:\r\n text = \"daisy\";\r\n break;\r\n case 1:\r\n text = \"dandelion\";\r\n break;\r\n case 2:\r\n text = \"roses\";\r\n break;\r\n case 3:\r\n text = \"sunflowers\";\r\n break;\r\n case 4:\r\n text = \"tulip\";\r\n break;\r\n }\r\n \r\n /* display pic*/\r\n if (features[cls] > PROB_THRESH)\r\n\t\t\tram_draw_string(display_image.addr, 150, 20, text, RED);\r\n\t\tlcd_draw_picture(0, 0, 320, 240, (uint32_t *)display_image.addr);\r\n }\r\n \r\n}"}
209
c
#include <unistd.h> #include <errno.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> int set_flush_timeout(bdaddr_t *ba, int timeout) { int err = 0, dd; struct hci_conn_info_req *cr = 0; struct hci_request rq = { 0 }; struct { uint16_t handle; uint16_t flush_timeout; } cmd_param; struct { uint8_t status; uint16_t handle; } cmd_response; // find the connection handle to the specified bluetooth device cr = (struct hci_conn_info_req*) malloc( sizeof(struct hci_conn_info_req) + sizeof(struct hci_conn_info)); bacpy( &cr->bdaddr, ba ); cr->type = ACL_LINK; dd = hci_open_dev( hci_get_route( &cr->bdaddr ) ); if( dd < 0 ) { err = dd; goto cleanup; } err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr ); if( err ) goto cleanup; // build a command packet to send to the bluetooth microcontroller cmd_param.handle = cr->conn_info->handle; cmd_param.flush_timeout = htobs(timeout); rq.ogf = OGF_HOST_CTL; rq.ocf = 0x28; rq.cparam = &cmd_param; rq.clen = sizeof(cmd_param); rq.rparam = &cmd_response; rq.rlen = sizeof(cmd_response); rq.event = EVT_CMD_COMPLETE; // send the command and wait for the response err = hci_send_req( dd, &rq, 0 ); if( err ) goto cleanup; if( cmd_response.status ) { err = -1; errno = bt_error(cmd_response.status); } cleanup: free(cr); if( dd >= 0) close(dd); return err; }
28.2
56
(translation_unit) "#include <unistd.h>\n#include <errno.h>\n#include <stdlib.h>\n#include <sys/socket.h>\n#include <sys/ioctl.h>\n#include <bluetooth/bluetooth.h>\n#include <bluetooth/hci.h>\n#include <bluetooth/hci_lib.h>\n\nint set_flush_timeout(bdaddr_t *ba, int timeout)\n{\n int err = 0, dd;\n struct hci_conn_info_req *cr = 0;\n struct hci_request rq = { 0 };\n\n struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;\n\n struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;\n\n // find the connection handle to the specified bluetooth device\n cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info));\n bacpy( &cr->bdaddr, ba );\n cr->type = ACL_LINK;\n dd = hci_open_dev( hci_get_route( &cr->bdaddr ) );\n if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }\n err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr );\n if( err ) goto cleanup;\n\n // build a command packet to send to the bluetooth microcontroller\n cmd_param.handle = cr->conn_info->handle;\n cmd_param.flush_timeout = htobs(timeout);\n rq.ogf = OGF_HOST_CTL;\n rq.ocf = 0x28;\n rq.cparam = &cmd_param;\n rq.clen = sizeof(cmd_param);\n rq.rparam = &cmd_response;\n rq.rlen = sizeof(cmd_response);\n rq.event = EVT_CMD_COMPLETE;\n\n // send the command and wait for the response\n err = hci_send_req( dd, &rq, 0 );\n if( err ) goto cleanup;\n\n if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }\n\ncleanup:\n free(cr);\n if( dd >= 0) close(dd);\n return err;\n}\n\n\n" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <sys/socket.h>\n" (#include) "#include" (system_lib_string) "<sys/socket.h>" (preproc_include) "#include <sys/ioctl.h>\n" (#include) "#include" (system_lib_string) "<sys/ioctl.h>" (preproc_include) "#include <bluetooth/bluetooth.h>\n" (#include) "#include" (system_lib_string) "<bluetooth/bluetooth.h>" (preproc_include) "#include <bluetooth/hci.h>\n" (#include) "#include" (system_lib_string) "<bluetooth/hci.h>" (preproc_include) "#include <bluetooth/hci_lib.h>\n" (#include) "#include" (system_lib_string) "<bluetooth/hci_lib.h>" (function_definition) "int set_flush_timeout(bdaddr_t *ba, int timeout)\n{\n int err = 0, dd;\n struct hci_conn_info_req *cr = 0;\n struct hci_request rq = { 0 };\n\n struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;\n\n struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;\n\n // find the connection handle to the specified bluetooth device\n cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info));\n bacpy( &cr->bdaddr, ba );\n cr->type = ACL_LINK;\n dd = hci_open_dev( hci_get_route( &cr->bdaddr ) );\n if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }\n err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr );\n if( err ) goto cleanup;\n\n // build a command packet to send to the bluetooth microcontroller\n cmd_param.handle = cr->conn_info->handle;\n cmd_param.flush_timeout = htobs(timeout);\n rq.ogf = OGF_HOST_CTL;\n rq.ocf = 0x28;\n rq.cparam = &cmd_param;\n rq.clen = sizeof(cmd_param);\n rq.rparam = &cmd_response;\n rq.rlen = sizeof(cmd_response);\n rq.event = EVT_CMD_COMPLETE;\n\n // send the command and wait for the response\n err = hci_send_req( dd, &rq, 0 );\n if( err ) goto cleanup;\n\n if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }\n\ncleanup:\n free(cr);\n if( dd >= 0) close(dd);\n return err;\n}" (primitive_type) "int" (function_declarator) "set_flush_timeout(bdaddr_t *ba, int timeout)" (identifier) "set_flush_timeout" (parameter_list) "(bdaddr_t *ba, int timeout)" (() "(" (parameter_declaration) "bdaddr_t *ba" (type_identifier) "bdaddr_t" (pointer_declarator) "*ba" (*) "*" (identifier) "ba" (,) "," (parameter_declaration) "int timeout" (primitive_type) "int" (identifier) "timeout" ()) ")" (compound_statement) "{\n int err = 0, dd;\n struct hci_conn_info_req *cr = 0;\n struct hci_request rq = { 0 };\n\n struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;\n\n struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;\n\n // find the connection handle to the specified bluetooth device\n cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info));\n bacpy( &cr->bdaddr, ba );\n cr->type = ACL_LINK;\n dd = hci_open_dev( hci_get_route( &cr->bdaddr ) );\n if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }\n err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr );\n if( err ) goto cleanup;\n\n // build a command packet to send to the bluetooth microcontroller\n cmd_param.handle = cr->conn_info->handle;\n cmd_param.flush_timeout = htobs(timeout);\n rq.ogf = OGF_HOST_CTL;\n rq.ocf = 0x28;\n rq.cparam = &cmd_param;\n rq.clen = sizeof(cmd_param);\n rq.rparam = &cmd_response;\n rq.rlen = sizeof(cmd_response);\n rq.event = EVT_CMD_COMPLETE;\n\n // send the command and wait for the response\n err = hci_send_req( dd, &rq, 0 );\n if( err ) goto cleanup;\n\n if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }\n\ncleanup:\n free(cr);\n if( dd >= 0) close(dd);\n return err;\n}" ({) "{" (declaration) "int err = 0, dd;" (primitive_type) "int" (init_declarator) "err = 0" (identifier) "err" (=) "=" (number_literal) "0" (,) "," (identifier) "dd" (;) ";" (declaration) "struct hci_conn_info_req *cr = 0;" (struct_specifier) "struct hci_conn_info_req" (struct) "struct" (type_identifier) "hci_conn_info_req" (init_declarator) "*cr = 0" (pointer_declarator) "*cr" (*) "*" (identifier) "cr" (=) "=" (number_literal) "0" (;) ";" (declaration) "struct hci_request rq = { 0 };" (struct_specifier) "struct hci_request" (struct) "struct" (type_identifier) "hci_request" (init_declarator) "rq = { 0 }" (identifier) "rq" (=) "=" (initializer_list) "{ 0 }" ({) "{" (number_literal) "0" (}) "}" (;) ";" (declaration) "struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;" (struct_specifier) "struct {\n uint16_t handle;\n uint16_t flush_timeout;\n }" (struct) "struct" (field_declaration_list) "{\n uint16_t handle;\n uint16_t flush_timeout;\n }" ({) "{" (field_declaration) "uint16_t handle;" (primitive_type) "uint16_t" (field_identifier) "handle" (;) ";" (field_declaration) "uint16_t flush_timeout;" (primitive_type) "uint16_t" (field_identifier) "flush_timeout" (;) ";" (}) "}" (identifier) "cmd_param" (;) ";" (declaration) "struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;" (struct_specifier) "struct {\n uint8_t status;\n uint16_t handle;\n }" (struct) "struct" (field_declaration_list) "{\n uint8_t status;\n uint16_t handle;\n }" ({) "{" (field_declaration) "uint8_t status;" (primitive_type) "uint8_t" (field_identifier) "status" (;) ";" (field_declaration) "uint16_t handle;" (primitive_type) "uint16_t" (field_identifier) "handle" (;) ";" (}) "}" (identifier) "cmd_response" (;) ";" (comment) "// find the connection handle to the specified bluetooth device" (expression_statement) "cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info));" (assignment_expression) "cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))" (identifier) "cr" (=) "=" (cast_expression) "(struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))" (() "(" (type_descriptor) "struct hci_conn_info_req*" (struct_specifier) "struct hci_conn_info_req" (struct) "struct" (type_identifier) "hci_conn_info_req" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))" (identifier) "malloc" (argument_list) "(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))" (() "(" (binary_expression) "sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info)" (sizeof_expression) "sizeof(struct hci_conn_info_req)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct hci_conn_info_req" (struct_specifier) "struct hci_conn_info_req" (struct) "struct" (type_identifier) "hci_conn_info_req" ()) ")" (+) "+" (sizeof_expression) "sizeof(struct hci_conn_info)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct hci_conn_info" (struct_specifier) "struct hci_conn_info" (struct) "struct" (type_identifier) "hci_conn_info" ()) ")" ()) ")" (;) ";" (expression_statement) "bacpy( &cr->bdaddr, ba );" (call_expression) "bacpy( &cr->bdaddr, ba )" (identifier) "bacpy" (argument_list) "( &cr->bdaddr, ba )" (() "(" (pointer_expression) "&cr->bdaddr" (&) "&" (field_expression) "cr->bdaddr" (identifier) "cr" (->) "->" (field_identifier) "bdaddr" (,) "," (identifier) "ba" ()) ")" (;) ";" (expression_statement) "cr->type = ACL_LINK;" (assignment_expression) "cr->type = ACL_LINK" (field_expression) "cr->type" (identifier) "cr" (->) "->" (field_identifier) "type" (=) "=" (identifier) "ACL_LINK" (;) ";" (expression_statement) "dd = hci_open_dev( hci_get_route( &cr->bdaddr ) );" (assignment_expression) "dd = hci_open_dev( hci_get_route( &cr->bdaddr ) )" (identifier) "dd" (=) "=" (call_expression) "hci_open_dev( hci_get_route( &cr->bdaddr ) )" (identifier) "hci_open_dev" (argument_list) "( hci_get_route( &cr->bdaddr ) )" (() "(" (call_expression) "hci_get_route( &cr->bdaddr )" (identifier) "hci_get_route" (argument_list) "( &cr->bdaddr )" (() "(" (pointer_expression) "&cr->bdaddr" (&) "&" (field_expression) "cr->bdaddr" (identifier) "cr" (->) "->" (field_identifier) "bdaddr" ()) ")" ()) ")" (;) ";" (if_statement) "if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }" (if) "if" (parenthesized_expression) "( dd < 0 )" (() "(" (binary_expression) "dd < 0" (identifier) "dd" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n err = dd;\n goto cleanup;\n }" ({) "{" (expression_statement) "err = dd;" (assignment_expression) "err = dd" (identifier) "err" (=) "=" (identifier) "dd" (;) ";" (goto_statement) "goto cleanup;" (goto) "goto" (statement_identifier) "cleanup" (;) ";" (}) "}" (expression_statement) "err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr );" (assignment_expression) "err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr )" (identifier) "err" (=) "=" (call_expression) "ioctl(dd, HCIGETCONNINFO, (unsigned long) cr )" (identifier) "ioctl" (argument_list) "(dd, HCIGETCONNINFO, (unsigned long) cr )" (() "(" (identifier) "dd" (,) "," (identifier) "HCIGETCONNINFO" (,) "," (cast_expression) "(unsigned long) cr" (() "(" (type_descriptor) "unsigned long" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" ()) ")" (identifier) "cr" ()) ")" (;) ";" (if_statement) "if( err ) goto cleanup;" (if) "if" (parenthesized_expression) "( err )" (() "(" (identifier) "err" ()) ")" (goto_statement) "goto cleanup;" (goto) "goto" (statement_identifier) "cleanup" (;) ";" (comment) "// build a command packet to send to the bluetooth microcontroller" (expression_statement) "cmd_param.handle = cr->conn_info->handle;" (assignment_expression) "cmd_param.handle = cr->conn_info->handle" (field_expression) "cmd_param.handle" (identifier) "cmd_param" (.) "." (field_identifier) "handle" (=) "=" (field_expression) "cr->conn_info->handle" (field_expression) "cr->conn_info" (identifier) "cr" (->) "->" (field_identifier) "conn_info" (->) "->" (field_identifier) "handle" (;) ";" (expression_statement) "cmd_param.flush_timeout = htobs(timeout);" (assignment_expression) "cmd_param.flush_timeout = htobs(timeout)" (field_expression) "cmd_param.flush_timeout" (identifier) "cmd_param" (.) "." (field_identifier) "flush_timeout" (=) "=" (call_expression) "htobs(timeout)" (identifier) "htobs" (argument_list) "(timeout)" (() "(" (identifier) "timeout" ()) ")" (;) ";" (expression_statement) "rq.ogf = OGF_HOST_CTL;" (assignment_expression) "rq.ogf = OGF_HOST_CTL" (field_expression) "rq.ogf" (identifier) "rq" (.) "." (field_identifier) "ogf" (=) "=" (identifier) "OGF_HOST_CTL" (;) ";" (expression_statement) "rq.ocf = 0x28;" (assignment_expression) "rq.ocf = 0x28" (field_expression) "rq.ocf" (identifier) "rq" (.) "." (field_identifier) "ocf" (=) "=" (number_literal) "0x28" (;) ";" (expression_statement) "rq.cparam = &cmd_param;" (assignment_expression) "rq.cparam = &cmd_param" (field_expression) "rq.cparam" (identifier) "rq" (.) "." (field_identifier) "cparam" (=) "=" (pointer_expression) "&cmd_param" (&) "&" (identifier) "cmd_param" (;) ";" (expression_statement) "rq.clen = sizeof(cmd_param);" (assignment_expression) "rq.clen = sizeof(cmd_param)" (field_expression) "rq.clen" (identifier) "rq" (.) "." (field_identifier) "clen" (=) "=" (sizeof_expression) "sizeof(cmd_param)" (sizeof) "sizeof" (parenthesized_expression) "(cmd_param)" (() "(" (identifier) "cmd_param" ()) ")" (;) ";" (expression_statement) "rq.rparam = &cmd_response;" (assignment_expression) "rq.rparam = &cmd_response" (field_expression) "rq.rparam" (identifier) "rq" (.) "." (field_identifier) "rparam" (=) "=" (pointer_expression) "&cmd_response" (&) "&" (identifier) "cmd_response" (;) ";" (expression_statement) "rq.rlen = sizeof(cmd_response);" (assignment_expression) "rq.rlen = sizeof(cmd_response)" (field_expression) "rq.rlen" (identifier) "rq" (.) "." (field_identifier) "rlen" (=) "=" (sizeof_expression) "sizeof(cmd_response)" (sizeof) "sizeof" (parenthesized_expression) "(cmd_response)" (() "(" (identifier) "cmd_response" ()) ")" (;) ";" (expression_statement) "rq.event = EVT_CMD_COMPLETE;" (assignment_expression) "rq.event = EVT_CMD_COMPLETE" (field_expression) "rq.event" (identifier) "rq" (.) "." (field_identifier) "event" (=) "=" (identifier) "EVT_CMD_COMPLETE" (;) ";" (comment) "// send the command and wait for the response" (expression_statement) "err = hci_send_req( dd, &rq, 0 );" (assignment_expression) "err = hci_send_req( dd, &rq, 0 )" (identifier) "err" (=) "=" (call_expression) "hci_send_req( dd, &rq, 0 )" (identifier) "hci_send_req" (argument_list) "( dd, &rq, 0 )" (() "(" (identifier) "dd" (,) "," (pointer_expression) "&rq" (&) "&" (identifier) "rq" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if( err ) goto cleanup;" (if) "if" (parenthesized_expression) "( err )" (() "(" (identifier) "err" ()) ")" (goto_statement) "goto cleanup;" (goto) "goto" (statement_identifier) "cleanup" (;) ";" (if_statement) "if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }" (if) "if" (parenthesized_expression) "( cmd_response.status )" (() "(" (field_expression) "cmd_response.status" (identifier) "cmd_response" (.) "." (field_identifier) "status" ()) ")" (compound_statement) "{\n err = -1;\n errno = bt_error(cmd_response.status);\n }" ({) "{" (expression_statement) "err = -1;" (assignment_expression) "err = -1" (identifier) "err" (=) "=" (number_literal) "-1" (;) ";" (expression_statement) "errno = bt_error(cmd_response.status);" (assignment_expression) "errno = bt_error(cmd_response.status)" (identifier) "errno" (=) "=" (call_expression) "bt_error(cmd_response.status)" (identifier) "bt_error" (argument_list) "(cmd_response.status)" (() "(" (field_expression) "cmd_response.status" (identifier) "cmd_response" (.) "." (field_identifier) "status" ()) ")" (;) ";" (}) "}" (labeled_statement) "cleanup:\n free(cr);" (statement_identifier) "cleanup" (:) ":" (expression_statement) "free(cr);" (call_expression) "free(cr)" (identifier) "free" (argument_list) "(cr)" (() "(" (identifier) "cr" ()) ")" (;) ";" (if_statement) "if( dd >= 0) close(dd);" (if) "if" (parenthesized_expression) "( dd >= 0)" (() "(" (binary_expression) "dd >= 0" (identifier) "dd" (>=) ">=" (number_literal) "0" ()) ")" (expression_statement) "close(dd);" (call_expression) "close(dd)" (identifier) "close" (argument_list) "(dd)" (() "(" (identifier) "dd" ()) ")" (;) ";" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (}) "}"
444
0
{"language": "c", "success": true, "metadata": {"lines": 56, "avg_line_length": 28.2, "nodes": 287, "errors": 0, "source_hash": "923be696886f663bd62797c3d2db03f21b6b8edce655fd31c2f972a32da94616", "categorized_nodes": 223}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <unistd.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": "<unistd.h>", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <errno.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": "<errno.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <sys/socket.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": "<sys/socket.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <sys/ioctl.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": "<sys/ioctl.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 22}}, {"id": 15, "type": "preproc_include", "text": "#include <bluetooth/bluetooth.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": "<bluetooth/bluetooth.h>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 32}}, {"id": 18, "type": "preproc_include", "text": "#include <bluetooth/hci.h>\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": "<bluetooth/hci.h>", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 26}}, {"id": 21, "type": "preproc_include", "text": "#include <bluetooth/hci_lib.h>\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": "<bluetooth/hci_lib.h>", "parent": 21, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 30}}, {"id": 24, "type": "function_definition", "text": "int set_flush_timeout(bdaddr_t *ba, int timeout)\n{\n int err = 0, dd;\n struct hci_conn_info_req *cr = 0;\n struct hci_request rq = { 0 };\n\n struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;\n\n struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;\n\n // find the connection handle to the specified bluetooth device\n cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info));\n bacpy( &cr->bdaddr, ba );\n cr->type = ACL_LINK;\n dd = hci_open_dev( hci_get_route( &cr->bdaddr ) );\n if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }\n err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr );\n if( err ) goto cleanup;\n\n // build a command packet to send to the bluetooth microcontroller\n cmd_param.handle = cr->conn_info->handle;\n cmd_param.flush_timeout = htobs(timeout);\n rq.ogf = OGF_HOST_CTL;\n rq.ocf = 0x28;\n rq.cparam = &cmd_param;\n rq.clen = sizeof(cmd_param);\n rq.rparam = &cmd_response;\n rq.rlen = sizeof(cmd_response);\n rq.event = EVT_CMD_COMPLETE;\n\n // send the command and wait for the response\n err = hci_send_req( dd, &rq, 0 );\n if( err ) goto cleanup;\n\n if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }\n\ncleanup:\n free(cr);\n if( dd >= 0) close(dd);\n return err;\n}", "parent": null, "children": [25, 26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 3}}, {"id": 26, "type": "function_declarator", "text": "set_flush_timeout(bdaddr_t *ba, int timeout)", "parent": 24, "children": [27, 28], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 48}}, {"id": 27, "type": "identifier", "text": "set_flush_timeout", "parent": 26, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 21}}, {"id": 28, "type": "parameter_list", "text": "(bdaddr_t *ba, int timeout)", "parent": 26, "children": [29, 34], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 48}}, {"id": 29, "type": "parameter_declaration", "text": "bdaddr_t *ba", "parent": 28, "children": [30, 31], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 34}}, {"id": 30, "type": "type_identifier", "text": "bdaddr_t", "parent": 29, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 30}}, {"id": 31, "type": "pointer_declarator", "text": "*ba", "parent": 29, "children": [32, 33], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 34}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 32}}, {"id": 33, "type": "identifier", "text": "ba", "parent": 31, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 34}}, {"id": 34, "type": "parameter_declaration", "text": "int timeout", "parent": 28, "children": [35, 36], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 47}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 34, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 39}}, {"id": 36, "type": "identifier", "text": "timeout", "parent": 34, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 47}}, {"id": 37, "type": "declaration", "text": "int err = 0, dd;", "parent": 24, "children": [38, 39, 43], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 20}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 7}}, {"id": 39, "type": "init_declarator", "text": "err = 0", "parent": 37, "children": [40, 41, 42], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 15}}, {"id": 40, "type": "identifier", "text": "err", "parent": 39, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 11}}, {"id": 41, "type": "=", "text": "=", "parent": 39, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 13}}, {"id": 42, "type": "number_literal", "text": "0", "parent": 39, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 15}}, {"id": 43, "type": "identifier", "text": "dd", "parent": 37, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 19}}, {"id": 44, "type": "declaration", "text": "struct hci_conn_info_req *cr = 0;", "parent": 24, "children": [45, 48], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 37}}, {"id": 45, "type": "struct_specifier", "text": "struct hci_conn_info_req", "parent": 44, "children": [46, 47], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 28}}, {"id": 46, "type": "struct", "text": "struct", "parent": 45, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 47, "type": "type_identifier", "text": "hci_conn_info_req", "parent": 45, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 28}}, {"id": 48, "type": "init_declarator", "text": "*cr = 0", "parent": 44, "children": [49, 52, 53], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 36}}, {"id": 49, "type": "pointer_declarator", "text": "*cr", "parent": 48, "children": [50, 51], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 32}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 30}}, {"id": 51, "type": "identifier", "text": "cr", "parent": 49, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 32}}, {"id": 52, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 34}}, {"id": 53, "type": "number_literal", "text": "0", "parent": 48, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 36}}, {"id": 54, "type": "declaration", "text": "struct hci_request rq = { 0 };", "parent": 24, "children": [55, 58], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 34}}, {"id": 55, "type": "struct_specifier", "text": "struct hci_request", "parent": 54, "children": [56, 57], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 22}}, {"id": 56, "type": "struct", "text": "struct", "parent": 55, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 10}}, {"id": 57, "type": "type_identifier", "text": "hci_request", "parent": 55, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 22}}, {"id": 58, "type": "init_declarator", "text": "rq = { 0 }", "parent": 54, "children": [59, 60, 61], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 33}}, {"id": 59, "type": "identifier", "text": "rq", "parent": 58, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 25}}, {"id": 60, "type": "=", "text": "=", "parent": 58, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 27}}, {"id": 61, "type": "initializer_list", "text": "{ 0 }", "parent": 58, "children": [62], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 33}}, {"id": 62, "type": "number_literal", "text": "0", "parent": 61, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 31}}, {"id": 63, "type": "declaration", "text": "struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;", "parent": 24, "children": [64, 72], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 19, "column": 16}}, {"id": 64, "type": "struct_specifier", "text": "struct {\n uint16_t handle;\n uint16_t flush_timeout;\n }", "parent": 63, "children": [65], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 19, "column": 5}}, {"id": 65, "type": "struct", "text": "struct", "parent": 64, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 10}}, {"id": 66, "type": "field_declaration", "text": "uint16_t handle;", "parent": 64, "children": [67, 68], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 24}}, {"id": 67, "type": "primitive_type", "text": "uint16_t", "parent": 66, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 16}}, {"id": 68, "type": "field_identifier", "text": "handle", "parent": 66, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 23}}, {"id": 69, "type": "field_declaration", "text": "uint16_t flush_timeout;", "parent": 64, "children": [70, 71], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 31}}, {"id": 70, "type": "primitive_type", "text": "uint16_t", "parent": 69, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 16}}, {"id": 71, "type": "field_identifier", "text": "flush_timeout", "parent": 69, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 30}}, {"id": 72, "type": "identifier", "text": "cmd_param", "parent": 63, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 15}}, {"id": 73, "type": "declaration", "text": "struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;", "parent": 24, "children": [74, 82], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 24, "column": 19}}, {"id": 74, "type": "struct_specifier", "text": "struct {\n uint8_t status;\n uint16_t handle;\n }", "parent": 73, "children": [75], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 75, "type": "struct", "text": "struct", "parent": 74, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 76, "type": "field_declaration", "text": "uint8_t status;", "parent": 74, "children": [77, 78], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 24}}, {"id": 77, "type": "primitive_type", "text": "uint8_t", "parent": 76, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 15}}, {"id": 78, "type": "field_identifier", "text": "status", "parent": 76, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 23}}, {"id": 79, "type": "field_declaration", "text": "uint16_t handle;", "parent": 74, "children": [80, 81], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 24}}, {"id": 80, "type": "primitive_type", "text": "uint16_t", "parent": 79, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 81, "type": "field_identifier", "text": "handle", "parent": 79, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 23}}, {"id": 82, "type": "identifier", "text": "cmd_response", "parent": 73, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 18}}, {"id": 83, "type": "assignment_expression", "text": "cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))", "parent": 24, "children": [84, 85, 86], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 29, "column": 41}}, {"id": 84, "type": "identifier", "text": "cr", "parent": 83, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 6}}, {"id": 85, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 8}}, {"id": 86, "type": "cast_expression", "text": "(struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))", "parent": 83, "children": [87, 93], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 29, "column": 41}}, {"id": 87, "type": "type_descriptor", "text": "struct hci_conn_info_req*", "parent": 86, "children": [88, 91], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 35}}, {"id": 88, "type": "struct_specifier", "text": "struct hci_conn_info_req", "parent": 87, "children": [89, 90], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 34}}, {"id": 89, "type": "struct", "text": "struct", "parent": 88, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 16}}, {"id": 90, "type": "type_identifier", "text": "hci_conn_info_req", "parent": 88, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 34}}, {"id": 91, "type": "abstract_pointer_declarator", "text": "*", "parent": 87, "children": [92], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 35}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 35}}, {"id": 93, "type": "call_expression", "text": "malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))", "parent": 86, "children": [94, 95], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 29, "column": 41}}, {"id": 94, "type": "identifier", "text": "malloc", "parent": 93, "children": [], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 43}}, {"id": 95, "type": "argument_list", "text": "(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info))", "parent": 93, "children": [96], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 29, "column": 41}}, {"id": 96, "type": "binary_expression", "text": "sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info)", "parent": 95, "children": [97, 102, 103], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 29, "column": 40}}, {"id": 97, "type": "sizeof_expression", "text": "sizeof(struct hci_conn_info_req)", "parent": 96, "children": [98], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 44}}, {"id": 98, "type": "type_descriptor", "text": "struct hci_conn_info_req", "parent": 97, "children": [99], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 43}}, {"id": 99, "type": "struct_specifier", "text": "struct hci_conn_info_req", "parent": 98, "children": [100, 101], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 43}}, {"id": 100, "type": "struct", "text": "struct", "parent": 99, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 25}}, {"id": 101, "type": "type_identifier", "text": "hci_conn_info_req", "parent": 99, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 43}}, {"id": 102, "type": "+", "text": "+", "parent": 96, "children": [], "start_point": {"row": 28, "column": 45}, "end_point": {"row": 28, "column": 46}}, {"id": 103, "type": "sizeof_expression", "text": "sizeof(struct hci_conn_info)", "parent": 96, "children": [104], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 40}}, {"id": 104, "type": "type_descriptor", "text": "struct hci_conn_info", "parent": 103, "children": [105], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 39}}, {"id": 105, "type": "struct_specifier", "text": "struct hci_conn_info", "parent": 104, "children": [106, 107], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 39}}, {"id": 106, "type": "struct", "text": "struct", "parent": 105, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 25}}, {"id": 107, "type": "type_identifier", "text": "hci_conn_info", "parent": 105, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 39}}, {"id": 108, "type": "call_expression", "text": "bacpy( &cr->bdaddr, ba )", "parent": 24, "children": [109, 110], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 28}}, {"id": 109, "type": "identifier", "text": "bacpy", "parent": 108, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 9}}, {"id": 110, "type": "argument_list", "text": "( &cr->bdaddr, ba )", "parent": 108, "children": [111, 115], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 28}}, {"id": 111, "type": "pointer_expression", "text": "&cr->bdaddr", "parent": 110, "children": [112], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 22}}, {"id": 112, "type": "field_expression", "text": "cr->bdaddr", "parent": 111, "children": [113, 114], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 22}}, {"id": 113, "type": "identifier", "text": "cr", "parent": 112, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 14}}, {"id": 114, "type": "field_identifier", "text": "bdaddr", "parent": 112, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 22}}, {"id": 115, "type": "identifier", "text": "ba", "parent": 110, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 26}}, {"id": 116, "type": "assignment_expression", "text": "cr->type = ACL_LINK", "parent": 24, "children": [117, 120, 121], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 23}}, {"id": 117, "type": "field_expression", "text": "cr->type", "parent": 116, "children": [118, 119], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 12}}, {"id": 118, "type": "identifier", "text": "cr", "parent": 117, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 6}}, {"id": 119, "type": "field_identifier", "text": "type", "parent": 117, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 12}}, {"id": 120, "type": "=", "text": "=", "parent": 116, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 14}}, {"id": 121, "type": "identifier", "text": "ACL_LINK", "parent": 116, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 23}}, {"id": 122, "type": "assignment_expression", "text": "dd = hci_open_dev( hci_get_route( &cr->bdaddr ) )", "parent": 24, "children": [123, 124, 125], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 53}}, {"id": 123, "type": "identifier", "text": "dd", "parent": 122, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 6}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 8}}, {"id": 125, "type": "call_expression", "text": "hci_open_dev( hci_get_route( &cr->bdaddr ) )", "parent": 122, "children": [126, 127], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 53}}, {"id": 126, "type": "identifier", "text": "hci_open_dev", "parent": 125, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 21}}, {"id": 127, "type": "argument_list", "text": "( hci_get_route( &cr->bdaddr ) )", "parent": 125, "children": [128], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 53}}, {"id": 128, "type": "call_expression", "text": "hci_get_route( &cr->bdaddr )", "parent": 127, "children": [129, 130], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 51}}, {"id": 129, "type": "identifier", "text": "hci_get_route", "parent": 128, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 36}}, {"id": 130, "type": "argument_list", "text": "( &cr->bdaddr )", "parent": 128, "children": [131], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 51}}, {"id": 131, "type": "pointer_expression", "text": "&cr->bdaddr", "parent": 130, "children": [132], "start_point": {"row": 32, "column": 38}, "end_point": {"row": 32, "column": 49}}, {"id": 132, "type": "field_expression", "text": "cr->bdaddr", "parent": 131, "children": [133, 134], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 49}}, {"id": 133, "type": "identifier", "text": "cr", "parent": 132, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 41}}, {"id": 134, "type": "field_identifier", "text": "bdaddr", "parent": 132, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 49}}, {"id": 135, "type": "if_statement", "text": "if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }", "parent": 24, "children": [136], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 136, "type": "parenthesized_expression", "text": "( dd < 0 )", "parent": 135, "children": [137], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 16}}, {"id": 137, "type": "binary_expression", "text": "dd < 0", "parent": 136, "children": [138, 139, 140], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 14}}, {"id": 138, "type": "identifier", "text": "dd", "parent": 137, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 10}}, {"id": 139, "type": "<", "text": "<", "parent": 137, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}, {"id": 140, "type": "number_literal", "text": "0", "parent": 137, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 14}}, {"id": 141, "type": "assignment_expression", "text": "err = dd", "parent": 135, "children": [142, 143, 144], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 16}}, {"id": 142, "type": "identifier", "text": "err", "parent": 141, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 11}}, {"id": 143, "type": "=", "text": "=", "parent": 141, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 144, "type": "identifier", "text": "dd", "parent": 141, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 16}}, {"id": 145, "type": "goto_statement", "text": "goto cleanup;", "parent": 135, "children": [146, 147], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 21}}, {"id": 146, "type": "goto", "text": "goto", "parent": 145, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 12}}, {"id": 147, "type": "statement_identifier", "text": "cleanup", "parent": 145, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 20}}, {"id": 148, "type": "assignment_expression", "text": "err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr )", "parent": 24, "children": [149, 150, 151], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 56}}, {"id": 149, "type": "identifier", "text": "err", "parent": 148, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 7}}, {"id": 150, "type": "=", "text": "=", "parent": 148, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 9}}, {"id": 151, "type": "call_expression", "text": "ioctl(dd, HCIGETCONNINFO, (unsigned long) cr )", "parent": 148, "children": [152, 153], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 56}}, {"id": 152, "type": "identifier", "text": "ioctl", "parent": 151, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 15}}, {"id": 153, "type": "argument_list", "text": "(dd, HCIGETCONNINFO, (unsigned long) cr )", "parent": 151, "children": [154, 155, 156], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 56}}, {"id": 154, "type": "identifier", "text": "dd", "parent": 153, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 18}}, {"id": 155, "type": "identifier", "text": "HCIGETCONNINFO", "parent": 153, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 34}}, {"id": 156, "type": "cast_expression", "text": "(unsigned long) cr", "parent": 153, "children": [157, 161], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 54}}, {"id": 157, "type": "type_descriptor", "text": "unsigned long", "parent": 156, "children": [158], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 50}}, {"id": 158, "type": "sized_type_specifier", "text": "unsigned long", "parent": 157, "children": [159, 160], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 50}}, {"id": 159, "type": "unsigned", "text": "unsigned", "parent": 158, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 45}}, {"id": 160, "type": "long", "text": "long", "parent": 158, "children": [], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 50}}, {"id": 161, "type": "identifier", "text": "cr", "parent": 156, "children": [], "start_point": {"row": 37, "column": 52}, "end_point": {"row": 37, "column": 54}}, {"id": 162, "type": "if_statement", "text": "if( err ) goto cleanup;", "parent": 24, "children": [163, 165], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 27}}, {"id": 163, "type": "parenthesized_expression", "text": "( err )", "parent": 162, "children": [164], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 13}}, {"id": 164, "type": "identifier", "text": "err", "parent": 163, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 11}}, {"id": 165, "type": "goto_statement", "text": "goto cleanup;", "parent": 162, "children": [166, 167], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 27}}, {"id": 166, "type": "goto", "text": "goto", "parent": 165, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 18}}, {"id": 167, "type": "statement_identifier", "text": "cleanup", "parent": 165, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 26}}, {"id": 168, "type": "assignment_expression", "text": "cmd_param.handle = cr->conn_info->handle", "parent": 24, "children": [169, 172, 173], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 44}}, {"id": 169, "type": "field_expression", "text": "cmd_param.handle", "parent": 168, "children": [170, 171], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 20}}, {"id": 170, "type": "identifier", "text": "cmd_param", "parent": 169, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 13}}, {"id": 171, "type": "field_identifier", "text": "handle", "parent": 169, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 20}}, {"id": 172, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 22}}, {"id": 173, "type": "field_expression", "text": "cr->conn_info->handle", "parent": 168, "children": [174, 177], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 44}}, {"id": 174, "type": "field_expression", "text": "cr->conn_info", "parent": 173, "children": [175, 176], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 36}}, {"id": 175, "type": "identifier", "text": "cr", "parent": 174, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 25}}, {"id": 176, "type": "field_identifier", "text": "conn_info", "parent": 174, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 36}}, {"id": 177, "type": "field_identifier", "text": "handle", "parent": 173, "children": [], "start_point": {"row": 41, "column": 38}, "end_point": {"row": 41, "column": 44}}, {"id": 178, "type": "assignment_expression", "text": "cmd_param.flush_timeout = htobs(timeout)", "parent": 24, "children": [179, 182, 183], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 44}}, {"id": 179, "type": "field_expression", "text": "cmd_param.flush_timeout", "parent": 178, "children": [180, 181], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 27}}, {"id": 180, "type": "identifier", "text": "cmd_param", "parent": 179, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 13}}, {"id": 181, "type": "field_identifier", "text": "flush_timeout", "parent": 179, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 27}}, {"id": 182, "type": "=", "text": "=", "parent": 178, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 29}}, {"id": 183, "type": "call_expression", "text": "htobs(timeout)", "parent": 178, "children": [184, 185], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 44}}, {"id": 184, "type": "identifier", "text": "htobs", "parent": 183, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 35}}, {"id": 185, "type": "argument_list", "text": "(timeout)", "parent": 183, "children": [186], "start_point": {"row": 42, "column": 35}, "end_point": {"row": 42, "column": 44}}, {"id": 186, "type": "identifier", "text": "timeout", "parent": 185, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 43}}, {"id": 187, "type": "assignment_expression", "text": "rq.ogf = OGF_HOST_CTL", "parent": 24, "children": [188, 191, 192], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 25}}, {"id": 188, "type": "field_expression", "text": "rq.ogf", "parent": 187, "children": [189, 190], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 10}}, {"id": 189, "type": "identifier", "text": "rq", "parent": 188, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 6}}, {"id": 190, "type": "field_identifier", "text": "ogf", "parent": 188, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 10}}, {"id": 191, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 12}}, {"id": 192, "type": "identifier", "text": "OGF_HOST_CTL", "parent": 187, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 25}}, {"id": 193, "type": "assignment_expression", "text": "rq.ocf = 0x28", "parent": 24, "children": [194, 197, 198], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 17}}, {"id": 194, "type": "field_expression", "text": "rq.ocf", "parent": 193, "children": [195, 196], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 10}}, {"id": 195, "type": "identifier", "text": "rq", "parent": 194, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 6}}, {"id": 196, "type": "field_identifier", "text": "ocf", "parent": 194, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 10}}, {"id": 197, "type": "=", "text": "=", "parent": 193, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 12}}, {"id": 198, "type": "number_literal", "text": "0x28", "parent": 193, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 17}}, {"id": 199, "type": "assignment_expression", "text": "rq.cparam = &cmd_param", "parent": 24, "children": [200, 203, 204], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 26}}, {"id": 200, "type": "field_expression", "text": "rq.cparam", "parent": 199, "children": [201, 202], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 13}}, {"id": 201, "type": "identifier", "text": "rq", "parent": 200, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 6}}, {"id": 202, "type": "field_identifier", "text": "cparam", "parent": 200, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 13}}, {"id": 203, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 15}}, {"id": 204, "type": "pointer_expression", "text": "&cmd_param", "parent": 199, "children": [205], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 26}}, {"id": 205, "type": "identifier", "text": "cmd_param", "parent": 204, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 26}}, {"id": 206, "type": "assignment_expression", "text": "rq.clen = sizeof(cmd_param)", "parent": 24, "children": [207, 210, 211], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 31}}, {"id": 207, "type": "field_expression", "text": "rq.clen", "parent": 206, "children": [208, 209], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 11}}, {"id": 208, "type": "identifier", "text": "rq", "parent": 207, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 6}}, {"id": 209, "type": "field_identifier", "text": "clen", "parent": 207, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 11}}, {"id": 210, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 13}}, {"id": 211, "type": "sizeof_expression", "text": "sizeof(cmd_param)", "parent": 206, "children": [212], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 31}}, {"id": 212, "type": "parenthesized_expression", "text": "(cmd_param)", "parent": 211, "children": [213], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 31}}, {"id": 213, "type": "identifier", "text": "cmd_param", "parent": 212, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 30}}, {"id": 214, "type": "assignment_expression", "text": "rq.rparam = &cmd_response", "parent": 24, "children": [215, 218, 219], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 29}}, {"id": 215, "type": "field_expression", "text": "rq.rparam", "parent": 214, "children": [216, 217], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 13}}, {"id": 216, "type": "identifier", "text": "rq", "parent": 215, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 6}}, {"id": 217, "type": "field_identifier", "text": "rparam", "parent": 215, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 13}}, {"id": 218, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 15}}, {"id": 219, "type": "pointer_expression", "text": "&cmd_response", "parent": 214, "children": [220], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 29}}, {"id": 220, "type": "identifier", "text": "cmd_response", "parent": 219, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 29}}, {"id": 221, "type": "assignment_expression", "text": "rq.rlen = sizeof(cmd_response)", "parent": 24, "children": [222, 225, 226], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 34}}, {"id": 222, "type": "field_expression", "text": "rq.rlen", "parent": 221, "children": [223, 224], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 11}}, {"id": 223, "type": "identifier", "text": "rq", "parent": 222, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 6}}, {"id": 224, "type": "field_identifier", "text": "rlen", "parent": 222, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 11}}, {"id": 225, "type": "=", "text": "=", "parent": 221, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 13}}, {"id": 226, "type": "sizeof_expression", "text": "sizeof(cmd_response)", "parent": 221, "children": [227], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 34}}, {"id": 227, "type": "parenthesized_expression", "text": "(cmd_response)", "parent": 226, "children": [228], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 34}}, {"id": 228, "type": "identifier", "text": "cmd_response", "parent": 227, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 33}}, {"id": 229, "type": "assignment_expression", "text": "rq.event = EVT_CMD_COMPLETE", "parent": 24, "children": [230, 233, 234], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 31}}, {"id": 230, "type": "field_expression", "text": "rq.event", "parent": 229, "children": [231, 232], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 12}}, {"id": 231, "type": "identifier", "text": "rq", "parent": 230, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 6}}, {"id": 232, "type": "field_identifier", "text": "event", "parent": 230, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 12}}, {"id": 233, "type": "=", "text": "=", "parent": 229, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 234, "type": "identifier", "text": "EVT_CMD_COMPLETE", "parent": 229, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 31}}, {"id": 235, "type": "assignment_expression", "text": "err = hci_send_req( dd, &rq, 0 )", "parent": 24, "children": [236, 237, 238], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 36}}, {"id": 236, "type": "identifier", "text": "err", "parent": 235, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 7}}, {"id": 237, "type": "=", "text": "=", "parent": 235, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 9}}, {"id": 238, "type": "call_expression", "text": "hci_send_req( dd, &rq, 0 )", "parent": 235, "children": [239, 240], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 36}}, {"id": 239, "type": "identifier", "text": "hci_send_req", "parent": 238, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 22}}, {"id": 240, "type": "argument_list", "text": "( dd, &rq, 0 )", "parent": 238, "children": [241, 242, 244], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 36}}, {"id": 241, "type": "identifier", "text": "dd", "parent": 240, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 26}}, {"id": 242, "type": "pointer_expression", "text": "&rq", "parent": 240, "children": [243], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 31}}, {"id": 243, "type": "identifier", "text": "rq", "parent": 242, "children": [], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 31}}, {"id": 244, "type": "number_literal", "text": "0", "parent": 240, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 34}}, {"id": 245, "type": "if_statement", "text": "if( err ) goto cleanup;", "parent": 24, "children": [246, 248], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 27}}, {"id": 246, "type": "parenthesized_expression", "text": "( err )", "parent": 245, "children": [247], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 13}}, {"id": 247, "type": "identifier", "text": "err", "parent": 246, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 11}}, {"id": 248, "type": "goto_statement", "text": "goto cleanup;", "parent": 245, "children": [249, 250], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 27}}, {"id": 249, "type": "goto", "text": "goto", "parent": 248, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 18}}, {"id": 250, "type": "statement_identifier", "text": "cleanup", "parent": 248, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 26}}, {"id": 251, "type": "if_statement", "text": "if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }", "parent": 24, "children": [252], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 58, "column": 5}}, {"id": 252, "type": "parenthesized_expression", "text": "( cmd_response.status )", "parent": 251, "children": [253], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 29}}, {"id": 253, "type": "field_expression", "text": "cmd_response.status", "parent": 252, "children": [254, 255], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 27}}, {"id": 254, "type": "identifier", "text": "cmd_response", "parent": 253, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 20}}, {"id": 255, "type": "field_identifier", "text": "status", "parent": 253, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 27}}, {"id": 256, "type": "assignment_expression", "text": "err = -1", "parent": 251, "children": [257, 258, 259], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 16}}, {"id": 257, "type": "identifier", "text": "err", "parent": 256, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 11}}, {"id": 258, "type": "=", "text": "=", "parent": 256, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 13}}, {"id": 259, "type": "number_literal", "text": "-1", "parent": 256, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 16}}, {"id": 260, "type": "assignment_expression", "text": "errno = bt_error(cmd_response.status)", "parent": 251, "children": [261, 262, 263], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 45}}, {"id": 261, "type": "identifier", "text": "errno", "parent": 260, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 13}}, {"id": 262, "type": "=", "text": "=", "parent": 260, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 15}}, {"id": 263, "type": "call_expression", "text": "bt_error(cmd_response.status)", "parent": 260, "children": [264, 265], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 45}}, {"id": 264, "type": "identifier", "text": "bt_error", "parent": 263, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 24}}, {"id": 265, "type": "argument_list", "text": "(cmd_response.status)", "parent": 263, "children": [266], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 45}}, {"id": 266, "type": "field_expression", "text": "cmd_response.status", "parent": 265, "children": [267, 268], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 44}}, {"id": 267, "type": "identifier", "text": "cmd_response", "parent": 266, "children": [], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 37}}, {"id": 268, "type": "field_identifier", "text": "status", "parent": 266, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 44}}, {"id": 269, "type": "labeled_statement", "text": "cleanup:\n free(cr);", "parent": 24, "children": [270], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 13}}, {"id": 270, "type": "statement_identifier", "text": "cleanup", "parent": 269, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 7}}, {"id": 271, "type": "call_expression", "text": "free(cr)", "parent": 269, "children": [272, 273], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 12}}, {"id": 272, "type": "identifier", "text": "free", "parent": 271, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 8}}, {"id": 273, "type": "argument_list", "text": "(cr)", "parent": 271, "children": [274], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 12}}, {"id": 274, "type": "identifier", "text": "cr", "parent": 273, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 11}}, {"id": 275, "type": "if_statement", "text": "if( dd >= 0) close(dd);", "parent": 24, "children": [276], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 27}}, {"id": 276, "type": "parenthesized_expression", "text": "( dd >= 0)", "parent": 275, "children": [277], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 16}}, {"id": 277, "type": "binary_expression", "text": "dd >= 0", "parent": 276, "children": [278, 279, 280], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 15}}, {"id": 278, "type": "identifier", "text": "dd", "parent": 277, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 10}}, {"id": 279, "type": ">=", "text": ">=", "parent": 277, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 13}}, {"id": 280, "type": "number_literal", "text": "0", "parent": 277, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 15}}, {"id": 281, "type": "call_expression", "text": "close(dd)", "parent": 275, "children": [282, 283], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 26}}, {"id": 282, "type": "identifier", "text": "close", "parent": 281, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 22}}, {"id": 283, "type": "argument_list", "text": "(dd)", "parent": 281, "children": [284], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 26}}, {"id": 284, "type": "identifier", "text": "dd", "parent": 283, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 25}}, {"id": 285, "type": "return_statement", "text": "return err;", "parent": 24, "children": [286], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 15}}, {"id": 286, "type": "identifier", "text": "err", "parent": 285, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 14}}]}, "node_categories": {"declarations": {"functions": [24, 26], "variables": [29, 34, 37, 44, 54, 63, 66, 69, 73, 76, 79], "classes": [45, 46, 55, 56, 64, 65, 74, 75, 88, 89, 99, 100, 105, 106], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [86, 93, 96, 97, 103, 108, 111, 112, 117, 125, 128, 131, 132, 136, 137, 151, 156, 163, 169, 173, 174, 179, 183, 188, 194, 200, 204, 207, 211, 212, 215, 219, 222, 226, 227, 230, 238, 242, 246, 252, 253, 263, 266, 271, 276, 277, 281], "assignments": [83, 116, 122, 141, 148, 168, 178, 187, 193, 199, 206, 214, 221, 229, 235, 256, 260], "loops": [], "conditionals": [27, 30, 33, 36, 40, 43, 47, 51, 57, 59, 68, 71, 72, 78, 81, 82, 84, 90, 94, 101, 107, 109, 113, 114, 115, 118, 119, 121, 123, 126, 129, 133, 134, 135, 138, 142, 144, 147, 149, 152, 154, 155, 158, 161, 162, 164, 167, 170, 171, 175, 176, 177, 180, 181, 184, 186, 189, 190, 192, 195, 196, 201, 202, 205, 208, 209, 213, 216, 217, 220, 223, 224, 228, 231, 232, 234, 236, 239, 241, 243, 245, 247, 250, 251, 254, 255, 257, 261, 264, 267, 268, 270, 272, 274, 275, 278, 282, 284, 286], "returns": [285], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 42, 53, 62, 140, 198, 244, 259, 280], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "set_flush_timeout", "text_snippet": "int set_flush_timeout(bdaddr_t *ba, int timeout)\n{\n int err = 0, dd;\n struct hci_conn_info_req"}, {"node_id": 26, "universal_type": "function", "name": "timeout)", "text_snippet": "set_flush_timeout(bdaddr_t *ba, int timeout)"}], "class_declarations": [{"node_id": 45, "universal_type": "class", "name": "hci_conn_info_req", "text_snippet": "struct hci_conn_info_req"}, {"node_id": 46, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 55, "universal_type": "class", "name": "hci_request", "text_snippet": "struct hci_request"}, {"node_id": 56, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 64, "universal_type": "class", "name": "{", "text_snippet": "struct {\n uint16_t handle;\n uint16_t flush_timeout;\n }"}, {"node_id": 65, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 74, "universal_type": "class", "name": "{", "text_snippet": "struct {\n uint8_t status;\n uint16_t handle;\n }"}, {"node_id": 75, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 88, "universal_type": "class", "name": "hci_conn_info_req", "text_snippet": "struct hci_conn_info_req"}, {"node_id": 89, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 99, "universal_type": "class", "name": "hci_conn_info_req", "text_snippet": "struct hci_conn_info_req"}, {"node_id": 100, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 105, "universal_type": "class", "name": "hci_conn_info", "text_snippet": "struct hci_conn_info"}, {"node_id": 106, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <unistd.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 <stdlib.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sys/socket.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <sys/ioctl.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <bluetooth/bluetooth.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <bluetooth/hci.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <bluetooth/hci_lib.h>\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "\n#include <unistd.h>\n#include <errno.h>\n#include <stdlib.h>\n#include <sys/socket.h>\n#include <sys/ioctl.h>\n#include <bluetooth/bluetooth.h>\n#include <bluetooth/hci.h>\n#include <bluetooth/hci_lib.h>\n\nint set_flush_timeout(bdaddr_t *ba, int timeout)\n{\n int err = 0, dd;\n struct hci_conn_info_req *cr = 0;\n struct hci_request rq = { 0 };\n\n struct {\n uint16_t handle;\n uint16_t flush_timeout;\n } cmd_param;\n\n struct {\n uint8_t status;\n uint16_t handle;\n } cmd_response;\n\n // find the connection handle to the specified bluetooth device\n cr = (struct hci_conn_info_req*) malloc(\n sizeof(struct hci_conn_info_req) + \n sizeof(struct hci_conn_info));\n bacpy( &cr->bdaddr, ba );\n cr->type = ACL_LINK;\n dd = hci_open_dev( hci_get_route( &cr->bdaddr ) );\n if( dd < 0 ) {\n err = dd;\n goto cleanup;\n }\n err = ioctl(dd, HCIGETCONNINFO, (unsigned long) cr );\n if( err ) goto cleanup;\n\n // build a command packet to send to the bluetooth microcontroller\n cmd_param.handle = cr->conn_info->handle;\n cmd_param.flush_timeout = htobs(timeout);\n rq.ogf = OGF_HOST_CTL;\n rq.ocf = 0x28;\n rq.cparam = &cmd_param;\n rq.clen = sizeof(cmd_param);\n rq.rparam = &cmd_response;\n rq.rlen = sizeof(cmd_response);\n rq.event = EVT_CMD_COMPLETE;\n\n // send the command and wait for the response\n err = hci_send_req( dd, &rq, 0 );\n if( err ) goto cleanup;\n\n if( cmd_response.status ) {\n err = -1;\n errno = bt_error(cmd_response.status);\n }\n\ncleanup:\n free(cr);\n if( dd >= 0) close(dd);\n return err;\n}\n\n\n"}
210
c
/* * File: paj6100u6_reg.h * Created Date: Tuesday, May 25th 2021, 10:45:35 am * Author: <NAME> * ----- * Last Modified: Sunday May 30th 2021 2:39:45 pm * Modified By: <NAME> at <<EMAIL>> * ----- * MIT License * * Copyright (c) 2021 Pixart Inc. * * 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. * ----- * HISTORY: * Date By Comments * ---------- --- ---------------------------------------------------------- */ #include <stdint.h> #define REG_BANK_SWITCH 0x7F // ======================================= #define BANK_0 0x00 // --------------------------------------- #define REG_CMD_HSYNC_INV 0X07 // bit7 #define REG_CMD_VSYNC_INV 0X07 // bit6 #define REG_CMD_AAVG_V 0X07 // bit3 #define REG_CMD_AAVG_H 0X07 // bit2 #define REG_ABC_START_LINE 0x0D // bit3:1 #define REG_FGH 0x11 // bit5:4 #define REG_GGH 0x12 // bit7 #define REG_EXP_OFFSET_L 0x18 #define REG_EXP_OFFSET_H 0x19 #define REG_CMD_EXPO_L 0x48 #define REG_CMD_EXPO_H 0x49 #define REG_CMD_EXPO_2H 0x4A #define REG_FRAME_TIME_L 0x7A #define REG_FRAME_TIME_H 0x7B #define REG_FRAME_TIME_2H 0x7C // ======================================= #define BANK_1 0x01 // --------------------------------------- #define REG_ISP_UPDATE 0x00 #define REG_CMD_SENSOR_MODE 0X23 // bit7 #define REG_CMD_LPM_ENH 0x23 // bit6 #define REG_CP_WOI_VOFFSET 0x45 #define REG_ABC_SAMPLE_SIZE 0x46 // bit2:0 // 20180504 static const uint8_t low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = { //address, value 0x7F, 0x00, 0x0C, 0x1D, // software reset 0x7F, 0x00, 0x07, 0x00, // low active 0x08, 0x03, 0x0B, 0x0E, 0x0D, 0xC5, 0x0F, 0x32, //R_ABC_Avg_UB=50 0x11, 0x41, //R_global=1 0x13, 0xD2, 0x14, 0xFE, 0x15, 0x00, // R_fg_fast=0 0x17, 0x02, //03 0x1A, 0x07, 0x1B, 0x08, 0x20, 0x00, //R_fast_powerdn_WakeupTime=0 0x25, 0x78, 0x29, 0x28, 0x2B, 0x06, 0x2F, 0x0E, 0x30, 0x0E, 0x34, 0x0F, 0x35, 0x0F, 0x3A, 0x28, 0x45, 0x17, 0x46, 0x17, 0x48, 0x10, //EXP 0x49, 0x27, //EXP 0x4A, 0x00, //EXP 0x4D, 0x0D, 0x4E, 0x20, 0x62, 0x12, 0x64, 0x02, 0x67, 0x0A, 0x69, 0x0A, 0x6C, 0x0B, 0x6E, 0x0B, 0x71, 0x0A, 0x73, 0x1D, 0x75, 0x1E, 0x77, 0x0B, 0x7F, 0x01, 0x01, 0x14, 0x02, 0x02, // 0x04, 0x96, 0x05, 0x03, 0x06, 0x46, 0x0D, 0x9F, //T_BLACINV_EnH=1 0x0E, 0x11, //T_SIG_REF=1 0x0F, 0x48, 0x10, 0x10, //T_vcom_lvl=0 0x11, 0x00, 0x12, 0x05, 0x15, 0x00, 0x16, 0x01, //schmitt trigger 0x17, 0x67, 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2 0x21, 0x14, 0x22, 0x80, // 0x2F, 0x30, 0x35, 0x64, 0x39, 0x03, 0x3A, 0x03, 0x46, 0x06, 0x4A, 0x00, //FX2 0x4B, 0x00, //FX2 0x00, 0x01, //updated flag };
29.52
135
(translation_unit) "/*\n * File: paj6100u6_reg.h\n * Created Date: Tuesday, May 25th 2021, 10:45:35 am\n * Author: <NAME>\n * -----\n * Last Modified: Sunday May 30th 2021 2:39:45 pm\n * Modified By: <NAME> at <<EMAIL>>\n * -----\n * MIT License\n *\n * Copyright (c) 2021 Pixart Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the "Software"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n * -----\n * HISTORY:\n * Date By Comments\n * ---------- --- ----------------------------------------------------------\n */\n\n#include <stdint.h>\n\n#define REG_BANK_SWITCH 0x7F\n\n// =======================================\n#define BANK_0 0x00\n// ---------------------------------------\n#define REG_CMD_HSYNC_INV 0X07 // bit7\n#define REG_CMD_VSYNC_INV 0X07 // bit6\n\n#define REG_CMD_AAVG_V 0X07 // bit3\n#define REG_CMD_AAVG_H 0X07 // bit2\n\n#define REG_ABC_START_LINE 0x0D // bit3:1\n\n\n#define REG_FGH 0x11 // bit5:4\n#define REG_GGH 0x12 // bit7\n\n#define REG_EXP_OFFSET_L 0x18\n#define REG_EXP_OFFSET_H 0x19\n#define REG_CMD_EXPO_L 0x48\n#define REG_CMD_EXPO_H 0x49\n#define REG_CMD_EXPO_2H 0x4A\n\n#define REG_FRAME_TIME_L 0x7A\n#define REG_FRAME_TIME_H 0x7B\n#define REG_FRAME_TIME_2H 0x7C\n// =======================================\n#define BANK_1 0x01\n// ---------------------------------------\n#define REG_ISP_UPDATE 0x00\n\n#define REG_CMD_SENSOR_MODE 0X23 // bit7\n#define REG_CMD_LPM_ENH 0x23 // bit6\n\n#define REG_CP_WOI_VOFFSET 0x45\n#define REG_ABC_SAMPLE_SIZE 0x46 // bit2:0\n\n\n// 20180504\nstatic const uint8_t low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = {\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n};" (comment) "/*\n * File: paj6100u6_reg.h\n * Created Date: Tuesday, May 25th 2021, 10:45:35 am\n * Author: <NAME>\n * -----\n * Last Modified: Sunday May 30th 2021 2:39:45 pm\n * Modified By: <NAME> at <<EMAIL>>\n * -----\n * MIT License\n *\n * Copyright (c) 2021 Pixart Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the "Software"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n * -----\n * HISTORY:\n * Date By Comments\n * ---------- --- ----------------------------------------------------------\n */" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_def) "#define REG_BANK_SWITCH 0x7F\n" (#define) "#define" (identifier) "REG_BANK_SWITCH" (preproc_arg) "0x7F" (comment) "// =======================================" (preproc_def) "#define BANK_0 0x00\n" (#define) "#define" (identifier) "BANK_0" (preproc_arg) "0x00" (comment) "// ---------------------------------------" (preproc_def) "#define REG_CMD_HSYNC_INV 0X07 // bit7\n" (#define) "#define" (identifier) "REG_CMD_HSYNC_INV" (preproc_arg) "0X07 // bit7" (preproc_def) "#define REG_CMD_VSYNC_INV 0X07 // bit6\n" (#define) "#define" (identifier) "REG_CMD_VSYNC_INV" (preproc_arg) "0X07 // bit6" (preproc_def) "#define REG_CMD_AAVG_V 0X07 // bit3\n" (#define) "#define" (identifier) "REG_CMD_AAVG_V" (preproc_arg) "0X07 // bit3" (preproc_def) "#define REG_CMD_AAVG_H 0X07 // bit2\n" (#define) "#define" (identifier) "REG_CMD_AAVG_H" (preproc_arg) "0X07 // bit2" (preproc_def) "#define REG_ABC_START_LINE 0x0D // bit3:1\n" (#define) "#define" (identifier) "REG_ABC_START_LINE" (preproc_arg) "0x0D // bit3:1" (preproc_def) "#define REG_FGH 0x11 // bit5:4\n" (#define) "#define" (identifier) "REG_FGH" (preproc_arg) "0x11 // bit5:4" (preproc_def) "#define REG_GGH 0x12 // bit7\n" (#define) "#define" (identifier) "REG_GGH" (preproc_arg) "0x12 // bit7" (preproc_def) "#define REG_EXP_OFFSET_L 0x18\n" (#define) "#define" (identifier) "REG_EXP_OFFSET_L" (preproc_arg) "0x18" (preproc_def) "#define REG_EXP_OFFSET_H 0x19\n" (#define) "#define" (identifier) "REG_EXP_OFFSET_H" (preproc_arg) "0x19" (preproc_def) "#define REG_CMD_EXPO_L 0x48\n" (#define) "#define" (identifier) "REG_CMD_EXPO_L" (preproc_arg) "0x48" (preproc_def) "#define REG_CMD_EXPO_H 0x49\n" (#define) "#define" (identifier) "REG_CMD_EXPO_H" (preproc_arg) "0x49" (preproc_def) "#define REG_CMD_EXPO_2H 0x4A\n" (#define) "#define" (identifier) "REG_CMD_EXPO_2H" (preproc_arg) "0x4A" (preproc_def) "#define REG_FRAME_TIME_L 0x7A\n" (#define) "#define" (identifier) "REG_FRAME_TIME_L" (preproc_arg) "0x7A" (preproc_def) "#define REG_FRAME_TIME_H 0x7B\n" (#define) "#define" (identifier) "REG_FRAME_TIME_H" (preproc_arg) "0x7B" (preproc_def) "#define REG_FRAME_TIME_2H 0x7C\n" (#define) "#define" (identifier) "REG_FRAME_TIME_2H" (preproc_arg) "0x7C" (comment) "// =======================================" (preproc_def) "#define BANK_1 0x01\n" (#define) "#define" (identifier) "BANK_1" (preproc_arg) "0x01" (comment) "// ---------------------------------------" (preproc_def) "#define REG_ISP_UPDATE 0x00\n" (#define) "#define" (identifier) "REG_ISP_UPDATE" (preproc_arg) "0x00" (preproc_def) "#define REG_CMD_SENSOR_MODE 0X23 // bit7\n" (#define) "#define" (identifier) "REG_CMD_SENSOR_MODE" (preproc_arg) "0X23 // bit7" (preproc_def) "#define REG_CMD_LPM_ENH 0x23 // bit6\n" (#define) "#define" (identifier) "REG_CMD_LPM_ENH" (preproc_arg) "0x23 // bit6" (preproc_def) "#define REG_CP_WOI_VOFFSET 0x45\n" (#define) "#define" (identifier) "REG_CP_WOI_VOFFSET" (preproc_arg) "0x45" (preproc_def) "#define REG_ABC_SAMPLE_SIZE 0x46 // bit2:0\n" (#define) "#define" (identifier) "REG_ABC_SAMPLE_SIZE" (preproc_arg) "0x46 // bit2:0" (comment) "// 20180504" (declaration) "static const uint8_t low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = {\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n};" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = {\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n}" (array_declarator) "low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[]" (identifier) "low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1" ([) "[" (]) "]" (=) "=" (initializer_list) "{\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n}" ({) "{" (comment) "//address, value" (number_literal) "0x7F" (,) "," (number_literal) "0x00" (,) "," (number_literal) "0x0C" (,) "," (number_literal) "0x1D" (,) "," (comment) "// software reset" (number_literal) "0x7F" (,) "," (number_literal) "0x00" (,) "," (number_literal) "0x07" (,) "," (number_literal) "0x00" (,) "," (comment) "// low active" (number_literal) "0x08" (,) "," (number_literal) "0x03" (,) "," (number_literal) "0x0B" (,) "," (number_literal) "0x0E" (,) "," (number_literal) "0x0D" (,) "," (number_literal) "0xC5" (,) "," (number_literal) "0x0F" (,) "," (number_literal) "0x32" (,) "," (comment) "//R_ABC_Avg_UB=50" (number_literal) "0x11" (,) "," (number_literal) "0x41" (,) "," (comment) "//R_global=1" (number_literal) "0x13" (,) "," (number_literal) "0xD2" (,) "," (number_literal) "0x14" (,) "," (number_literal) "0xFE" (,) "," (number_literal) "0x15" (,) "," (number_literal) "0x00" (,) "," (comment) "// R_fg_fast=0" (number_literal) "0x17" (,) "," (number_literal) "0x02" (,) "," (comment) "//03" (number_literal) "0x1A" (,) "," (number_literal) "0x07" (,) "," (number_literal) "0x1B" (,) "," (number_literal) "0x08" (,) "," (number_literal) "0x20" (,) "," (number_literal) "0x00" (,) "," (comment) "//R_fast_powerdn_WakeupTime=0" (number_literal) "0x25" (,) "," (number_literal) "0x78" (,) "," (number_literal) "0x29" (,) "," (number_literal) "0x28" (,) "," (number_literal) "0x2B" (,) "," (number_literal) "0x06" (,) "," (number_literal) "0x2F" (,) "," (number_literal) "0x0E" (,) "," (number_literal) "0x30" (,) "," (number_literal) "0x0E" (,) "," (number_literal) "0x34" (,) "," (number_literal) "0x0F" (,) "," (number_literal) "0x35" (,) "," (number_literal) "0x0F" (,) "," (number_literal) "0x3A" (,) "," (number_literal) "0x28" (,) "," (number_literal) "0x45" (,) "," (number_literal) "0x17" (,) "," (number_literal) "0x46" (,) "," (number_literal) "0x17" (,) "," (number_literal) "0x48" (,) "," (number_literal) "0x10" (,) "," (comment) "//EXP" (number_literal) "0x49" (,) "," (number_literal) "0x27" (,) "," (comment) "//EXP" (number_literal) "0x4A" (,) "," (number_literal) "0x00" (,) "," (comment) "//EXP" (number_literal) "0x4D" (,) "," (number_literal) "0x0D" (,) "," (number_literal) "0x4E" (,) "," (number_literal) "0x20" (,) "," (number_literal) "0x62" (,) "," (number_literal) "0x12" (,) "," (number_literal) "0x64" (,) "," (number_literal) "0x02" (,) "," (number_literal) "0x67" (,) "," (number_literal) "0x0A" (,) "," (number_literal) "0x69" (,) "," (number_literal) "0x0A" (,) "," (number_literal) "0x6C" (,) "," (number_literal) "0x0B" (,) "," (number_literal) "0x6E" (,) "," (number_literal) "0x0B" (,) "," (number_literal) "0x71" (,) "," (number_literal) "0x0A" (,) "," (number_literal) "0x73" (,) "," (number_literal) "0x1D" (,) "," (number_literal) "0x75" (,) "," (number_literal) "0x1E" (,) "," (number_literal) "0x77" (,) "," (number_literal) "0x0B" (,) "," (number_literal) "0x7F" (,) "," (number_literal) "0x01" (,) "," (number_literal) "0x01" (,) "," (number_literal) "0x14" (,) "," (number_literal) "0x02" (,) "," (number_literal) "0x02" (,) "," (comment) "//" (number_literal) "0x04" (,) "," (number_literal) "0x96" (,) "," (number_literal) "0x05" (,) "," (number_literal) "0x03" (,) "," (number_literal) "0x06" (,) "," (number_literal) "0x46" (,) "," (number_literal) "0x0D" (,) "," (number_literal) "0x9F" (,) "," (comment) "//T_BLACINV_EnH=1" (number_literal) "0x0E" (,) "," (number_literal) "0x11" (,) "," (comment) "//T_SIG_REF=1" (number_literal) "0x0F" (,) "," (number_literal) "0x48" (,) "," (number_literal) "0x10" (,) "," (number_literal) "0x10" (,) "," (comment) "//T_vcom_lvl=0" (number_literal) "0x11" (,) "," (number_literal) "0x00" (,) "," (number_literal) "0x12" (,) "," (number_literal) "0x05" (,) "," (number_literal) "0x15" (,) "," (number_literal) "0x00" (,) "," (number_literal) "0x16" (,) "," (number_literal) "0x01" (,) "," (comment) "//schmitt trigger" (number_literal) "0x17" (,) "," (number_literal) "0x67" (,) "," (number_literal) "0x18" (,) "," (number_literal) "0xD0" (,) "," (comment) "//T_vrt_lvl=T_vrb_lvl=2" (number_literal) "0x21" (,) "," (number_literal) "0x14" (,) "," (number_literal) "0x22" (,) "," (number_literal) "0x80" (,) "," (comment) "//" (number_literal) "0x2F" (,) "," (number_literal) "0x30" (,) "," (number_literal) "0x35" (,) "," (number_literal) "0x64" (,) "," (number_literal) "0x39" (,) "," (number_literal) "0x03" (,) "," (number_literal) "0x3A" (,) "," (number_literal) "0x03" (,) "," (number_literal) "0x46" (,) "," (number_literal) "0x06" (,) "," (number_literal) "0x4A" (,) "," (number_literal) "0x00" (,) "," (comment) "//FX2" (number_literal) "0x4B" (,) "," (number_literal) "0x00" (,) "," (comment) "//FX2" (number_literal) "0x00" (,) "," (number_literal) "0x01" (,) "," (comment) "//updated flag" (}) "}" (;) ";"
407
0
{"language": "c", "success": true, "metadata": {"lines": 135, "avg_line_length": 29.52, "nodes": 236, "errors": 0, "source_hash": "9b790eb8f889fc897d9b6998f069b5d2fe28dffdbe5fb5a486af20b1978fbc80", "categorized_nodes": 162}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdint.h>", "parent": 0, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define REG_BANK_SWITCH 0x7F\n", "parent": null, "children": [4, 5, 6], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 5, "type": "identifier", "text": "REG_BANK_SWITCH", "parent": 3, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 23}}, {"id": 6, "type": "preproc_arg", "text": "0x7F", "parent": 3, "children": [], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 40}}, {"id": 7, "type": "preproc_def", "text": "#define BANK_0 0x00\n", "parent": null, "children": [8, 9, 10], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 8, "type": "#define", "text": "#define", "parent": 7, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 9, "type": "identifier", "text": "BANK_0", "parent": 7, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 14}}, {"id": 10, "type": "preproc_arg", "text": "0x00", "parent": 7, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 40}}, {"id": 11, "type": "preproc_def", "text": "#define REG_CMD_HSYNC_INV 0X07 // bit7\n", "parent": null, "children": [12, 13, 14], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 12, "type": "#define", "text": "#define", "parent": 11, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 13, "type": "identifier", "text": "REG_CMD_HSYNC_INV", "parent": 11, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 25}}, {"id": 14, "type": "preproc_arg", "text": "0X07 // bit7", "parent": 11, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 48}}, {"id": 15, "type": "preproc_def", "text": "#define REG_CMD_VSYNC_INV 0X07 // bit6\n", "parent": null, "children": [16, 17, 18], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 17, "type": "identifier", "text": "REG_CMD_VSYNC_INV", "parent": 15, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 25}}, {"id": 18, "type": "preproc_arg", "text": "0X07 // bit6", "parent": 15, "children": [], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 48}}, {"id": 19, "type": "preproc_def", "text": "#define REG_CMD_AAVG_V 0X07 // bit3\n", "parent": null, "children": [20, 21, 22], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 20, "type": "#define", "text": "#define", "parent": 19, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 21, "type": "identifier", "text": "REG_CMD_AAVG_V", "parent": 19, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 22}}, {"id": 22, "type": "preproc_arg", "text": "0X07 // bit3", "parent": 19, "children": [], "start_point": {"row": 45, "column": 36}, "end_point": {"row": 45, "column": 48}}, {"id": 23, "type": "preproc_def", "text": "#define REG_CMD_AAVG_H 0X07 // bit2\n", "parent": null, "children": [24, 25, 26], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 24, "type": "#define", "text": "#define", "parent": 23, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 25, "type": "identifier", "text": "REG_CMD_AAVG_H", "parent": 23, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 22}}, {"id": 26, "type": "preproc_arg", "text": "0X07 // bit2", "parent": 23, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 48}}, {"id": 27, "type": "preproc_def", "text": "#define REG_ABC_START_LINE 0x0D // bit3:1\n", "parent": null, "children": [28, 29, 30], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 29, "type": "identifier", "text": "REG_ABC_START_LINE", "parent": 27, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 26}}, {"id": 30, "type": "preproc_arg", "text": "0x0D // bit3:1", "parent": 27, "children": [], "start_point": {"row": 48, "column": 36}, "end_point": {"row": 48, "column": 50}}, {"id": 31, "type": "preproc_def", "text": "#define REG_FGH 0x11 // bit5:4\n", "parent": null, "children": [32, 33, 34], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 32, "type": "#define", "text": "#define", "parent": 31, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 7}}, {"id": 33, "type": "identifier", "text": "REG_FGH", "parent": 31, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 15}}, {"id": 34, "type": "preproc_arg", "text": "0x11 // bit5:4", "parent": 31, "children": [], "start_point": {"row": 51, "column": 36}, "end_point": {"row": 51, "column": 50}}, {"id": 35, "type": "preproc_def", "text": "#define REG_GGH 0x12 // bit7\n", "parent": null, "children": [36, 37, 38], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 36, "type": "#define", "text": "#define", "parent": 35, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 7}}, {"id": 37, "type": "identifier", "text": "REG_GGH", "parent": 35, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 15}}, {"id": 38, "type": "preproc_arg", "text": "0x12 // bit7", "parent": 35, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 48}}, {"id": 39, "type": "preproc_def", "text": "#define REG_EXP_OFFSET_L 0x18\n", "parent": null, "children": [40, 41, 42], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 55, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 7}}, {"id": 41, "type": "identifier", "text": "REG_EXP_OFFSET_L", "parent": 39, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 24}}, {"id": 42, "type": "preproc_arg", "text": "0x18", "parent": 39, "children": [], "start_point": {"row": 54, "column": 36}, "end_point": {"row": 54, "column": 40}}, {"id": 43, "type": "preproc_def", "text": "#define REG_EXP_OFFSET_H 0x19\n", "parent": null, "children": [44, 45, 46], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 7}}, {"id": 45, "type": "identifier", "text": "REG_EXP_OFFSET_H", "parent": 43, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 24}}, {"id": 46, "type": "preproc_arg", "text": "0x19", "parent": 43, "children": [], "start_point": {"row": 55, "column": 36}, "end_point": {"row": 55, "column": 40}}, {"id": 47, "type": "preproc_def", "text": "#define REG_CMD_EXPO_L 0x48\n", "parent": null, "children": [48, 49, 50], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 57, "column": 0}}, {"id": 48, "type": "#define", "text": "#define", "parent": 47, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 49, "type": "identifier", "text": "REG_CMD_EXPO_L", "parent": 47, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 22}}, {"id": 50, "type": "preproc_arg", "text": "0x48", "parent": 47, "children": [], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 40}}, {"id": 51, "type": "preproc_def", "text": "#define REG_CMD_EXPO_H 0x49\n", "parent": null, "children": [52, 53, 54], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 58, "column": 0}}, {"id": 52, "type": "#define", "text": "#define", "parent": 51, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 7}}, {"id": 53, "type": "identifier", "text": "REG_CMD_EXPO_H", "parent": 51, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 22}}, {"id": 54, "type": "preproc_arg", "text": "0x49", "parent": 51, "children": [], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 40}}, {"id": 55, "type": "preproc_def", "text": "#define REG_CMD_EXPO_2H 0x4A\n", "parent": null, "children": [56, 57, 58], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 56, "type": "#define", "text": "#define", "parent": 55, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 57, "type": "identifier", "text": "REG_CMD_EXPO_2H", "parent": 55, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 23}}, {"id": 58, "type": "preproc_arg", "text": "0x4A", "parent": 55, "children": [], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 40}}, {"id": 59, "type": "preproc_def", "text": "#define REG_FRAME_TIME_L 0x7A\n", "parent": null, "children": [60, 61, 62], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 0}}, {"id": 60, "type": "#define", "text": "#define", "parent": 59, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 7}}, {"id": 61, "type": "identifier", "text": "REG_FRAME_TIME_L", "parent": 59, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 24}}, {"id": 62, "type": "preproc_arg", "text": "0x7A", "parent": 59, "children": [], "start_point": {"row": 60, "column": 36}, "end_point": {"row": 60, "column": 40}}, {"id": 63, "type": "preproc_def", "text": "#define REG_FRAME_TIME_H 0x7B\n", "parent": null, "children": [64, 65, 66], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 62, "column": 0}}, {"id": 64, "type": "#define", "text": "#define", "parent": 63, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 65, "type": "identifier", "text": "REG_FRAME_TIME_H", "parent": 63, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 24}}, {"id": 66, "type": "preproc_arg", "text": "0x7B", "parent": 63, "children": [], "start_point": {"row": 61, "column": 36}, "end_point": {"row": 61, "column": 40}}, {"id": 67, "type": "preproc_def", "text": "#define REG_FRAME_TIME_2H 0x7C\n", "parent": null, "children": [68, 69, 70], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 63, "column": 0}}, {"id": 68, "type": "#define", "text": "#define", "parent": 67, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 7}}, {"id": 69, "type": "identifier", "text": "REG_FRAME_TIME_2H", "parent": 67, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 25}}, {"id": 70, "type": "preproc_arg", "text": "0x7C", "parent": 67, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 40}}, {"id": 71, "type": "preproc_def", "text": "#define BANK_1 0x01\n", "parent": null, "children": [72, 73, 74], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 65, "column": 0}}, {"id": 72, "type": "#define", "text": "#define", "parent": 71, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 7}}, {"id": 73, "type": "identifier", "text": "BANK_1", "parent": 71, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 14}}, {"id": 74, "type": "preproc_arg", "text": "0x01", "parent": 71, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 40}}, {"id": 75, "type": "preproc_def", "text": "#define REG_ISP_UPDATE 0x00\n", "parent": null, "children": [76, 77, 78], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 67, "column": 0}}, {"id": 76, "type": "#define", "text": "#define", "parent": 75, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 7}}, {"id": 77, "type": "identifier", "text": "REG_ISP_UPDATE", "parent": 75, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 22}}, {"id": 78, "type": "preproc_arg", "text": "0x00", "parent": 75, "children": [], "start_point": {"row": 66, "column": 36}, "end_point": {"row": 66, "column": 40}}, {"id": 79, "type": "preproc_def", "text": "#define REG_CMD_SENSOR_MODE 0X23 // bit7\n", "parent": null, "children": [80, 81, 82], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 69, "column": 0}}, {"id": 80, "type": "#define", "text": "#define", "parent": 79, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 7}}, {"id": 81, "type": "identifier", "text": "REG_CMD_SENSOR_MODE", "parent": 79, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 27}}, {"id": 82, "type": "preproc_arg", "text": "0X23 // bit7", "parent": 79, "children": [], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 48}}, {"id": 83, "type": "preproc_def", "text": "#define REG_CMD_LPM_ENH 0x23 // bit6\n", "parent": null, "children": [84, 85, 86], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 0}}, {"id": 84, "type": "#define", "text": "#define", "parent": 83, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 7}}, {"id": 85, "type": "identifier", "text": "REG_CMD_LPM_ENH", "parent": 83, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 23}}, {"id": 86, "type": "preproc_arg", "text": "0x23 // bit6", "parent": 83, "children": [], "start_point": {"row": 69, "column": 36}, "end_point": {"row": 69, "column": 48}}, {"id": 87, "type": "preproc_def", "text": "#define REG_CP_WOI_VOFFSET 0x45\n", "parent": null, "children": [88, 89, 90], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 72, "column": 0}}, {"id": 88, "type": "#define", "text": "#define", "parent": 87, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 7}}, {"id": 89, "type": "identifier", "text": "REG_CP_WOI_VOFFSET", "parent": 87, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 26}}, {"id": 90, "type": "preproc_arg", "text": "0x45", "parent": 87, "children": [], "start_point": {"row": 71, "column": 36}, "end_point": {"row": 71, "column": 40}}, {"id": 91, "type": "preproc_def", "text": "#define REG_ABC_SAMPLE_SIZE 0x46 // bit2:0\n", "parent": null, "children": [92, 93, 94], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 73, "column": 0}}, {"id": 92, "type": "#define", "text": "#define", "parent": 91, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 7}}, {"id": 93, "type": "identifier", "text": "REG_ABC_SAMPLE_SIZE", "parent": 91, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 27}}, {"id": 94, "type": "preproc_arg", "text": "0x46 // bit2:0", "parent": 91, "children": [], "start_point": {"row": 72, "column": 36}, "end_point": {"row": 72, "column": 50}}, {"id": 95, "type": "declaration", "text": "static const uint8_t low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = {\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n};", "parent": null, "children": [96, 97], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 145, "column": 2}}, {"id": 96, "type": "primitive_type", "text": "uint8_t", "parent": 95, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 20}}, {"id": 97, "type": "init_declarator", "text": "low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = {\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n}", "parent": 95, "children": [98, 100, 101], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 145, "column": 1}}, {"id": 98, "type": "array_declarator", "text": "low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[]", "parent": 97, "children": [99], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 77}}, {"id": 99, "type": "identifier", "text": "low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1", "parent": 98, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 75}}, {"id": 100, "type": "=", "text": "=", "parent": 97, "children": [], "start_point": {"row": 76, "column": 78}, "end_point": {"row": 76, "column": 79}}, {"id": 101, "type": "initializer_list", "text": "{\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n}", "parent": 97, "children": [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235], "start_point": {"row": 76, "column": 80}, "end_point": {"row": 145, "column": 1}}, {"id": 102, "type": "number_literal", "text": "0x7F", "parent": 101, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 8}}, {"id": 103, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 14}}, {"id": 104, "type": "number_literal", "text": "0x0C", "parent": 101, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 8}}, {"id": 105, "type": "number_literal", "text": "0x1D", "parent": 101, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 14}}, {"id": 106, "type": "number_literal", "text": "0x7F", "parent": 101, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 8}}, {"id": 107, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 14}}, {"id": 108, "type": "number_literal", "text": "0x07", "parent": 101, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 8}}, {"id": 109, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 14}}, {"id": 110, "type": "number_literal", "text": "0x08", "parent": 101, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 8}}, {"id": 111, "type": "number_literal", "text": "0x03", "parent": 101, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 14}}, {"id": 112, "type": "number_literal", "text": "0x0B", "parent": 101, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 8}}, {"id": 113, "type": "number_literal", "text": "0x0E", "parent": 101, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 14}}, {"id": 114, "type": "number_literal", "text": "0x0D", "parent": 101, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 8}}, {"id": 115, "type": "number_literal", "text": "0xC5", "parent": 101, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 14}}, {"id": 116, "type": "number_literal", "text": "0x0F", "parent": 101, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 8}}, {"id": 117, "type": "number_literal", "text": "0x32", "parent": 101, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 14}}, {"id": 118, "type": "number_literal", "text": "0x11", "parent": 101, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 8}}, {"id": 119, "type": "number_literal", "text": "0x41", "parent": 101, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 14}}, {"id": 120, "type": "number_literal", "text": "0x13", "parent": 101, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 8}}, {"id": 121, "type": "number_literal", "text": "0xD2", "parent": 101, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 14}}, {"id": 122, "type": "number_literal", "text": "0x14", "parent": 101, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 8}}, {"id": 123, "type": "number_literal", "text": "0xFE", "parent": 101, "children": [], "start_point": {"row": 88, "column": 10}, "end_point": {"row": 88, "column": 14}}, {"id": 124, "type": "number_literal", "text": "0x15", "parent": 101, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 8}}, {"id": 125, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 14}}, {"id": 126, "type": "number_literal", "text": "0x17", "parent": 101, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 8}}, {"id": 127, "type": "number_literal", "text": "0x02", "parent": 101, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 14}}, {"id": 128, "type": "number_literal", "text": "0x1A", "parent": 101, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 8}}, {"id": 129, "type": "number_literal", "text": "0x07", "parent": 101, "children": [], "start_point": {"row": 91, "column": 10}, "end_point": {"row": 91, "column": 14}}, {"id": 130, "type": "number_literal", "text": "0x1B", "parent": 101, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 8}}, {"id": 131, "type": "number_literal", "text": "0x08", "parent": 101, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 14}}, {"id": 132, "type": "number_literal", "text": "0x20", "parent": 101, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 8}}, {"id": 133, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 14}}, {"id": 134, "type": "number_literal", "text": "0x25", "parent": 101, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 8}}, {"id": 135, "type": "number_literal", "text": "0x78", "parent": 101, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 14}}, {"id": 136, "type": "number_literal", "text": "0x29", "parent": 101, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 8}}, {"id": 137, "type": "number_literal", "text": "0x28", "parent": 101, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 14}}, {"id": 138, "type": "number_literal", "text": "0x2B", "parent": 101, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 8}}, {"id": 139, "type": "number_literal", "text": "0x06", "parent": 101, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 14}}, {"id": 140, "type": "number_literal", "text": "0x2F", "parent": 101, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 8}}, {"id": 141, "type": "number_literal", "text": "0x0E", "parent": 101, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 14}}, {"id": 142, "type": "number_literal", "text": "0x30", "parent": 101, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 8}}, {"id": 143, "type": "number_literal", "text": "0x0E", "parent": 101, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 14}}, {"id": 144, "type": "number_literal", "text": "0x34", "parent": 101, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 8}}, {"id": 145, "type": "number_literal", "text": "0x0F", "parent": 101, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 14}}, {"id": 146, "type": "number_literal", "text": "0x35", "parent": 101, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 8}}, {"id": 147, "type": "number_literal", "text": "0x0F", "parent": 101, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 14}}, {"id": 148, "type": "number_literal", "text": "0x3A", "parent": 101, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 8}}, {"id": 149, "type": "number_literal", "text": "0x28", "parent": 101, "children": [], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 14}}, {"id": 150, "type": "number_literal", "text": "0x45", "parent": 101, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 8}}, {"id": 151, "type": "number_literal", "text": "0x17", "parent": 101, "children": [], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 14}}, {"id": 152, "type": "number_literal", "text": "0x46", "parent": 101, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 8}}, {"id": 153, "type": "number_literal", "text": "0x17", "parent": 101, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 14}}, {"id": 154, "type": "number_literal", "text": "0x48", "parent": 101, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 8}}, {"id": 155, "type": "number_literal", "text": "0x10", "parent": 101, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 14}}, {"id": 156, "type": "number_literal", "text": "0x49", "parent": 101, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 8}}, {"id": 157, "type": "number_literal", "text": "0x27", "parent": 101, "children": [], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 14}}, {"id": 158, "type": "number_literal", "text": "0x4A", "parent": 101, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 159, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 14}}, {"id": 160, "type": "number_literal", "text": "0x4D", "parent": 101, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 8}}, {"id": 161, "type": "number_literal", "text": "0x0D", "parent": 101, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 14}}, {"id": 162, "type": "number_literal", "text": "0x4E", "parent": 101, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 8}}, {"id": 163, "type": "number_literal", "text": "0x20", "parent": 101, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 14}}, {"id": 164, "type": "number_literal", "text": "0x62", "parent": 101, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 8}}, {"id": 165, "type": "number_literal", "text": "0x12", "parent": 101, "children": [], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 14}}, {"id": 166, "type": "number_literal", "text": "0x64", "parent": 101, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 8}}, {"id": 167, "type": "number_literal", "text": "0x02", "parent": 101, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 14}}, {"id": 168, "type": "number_literal", "text": "0x67", "parent": 101, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 8}}, {"id": 169, "type": "number_literal", "text": "0x0A", "parent": 101, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 14}}, {"id": 170, "type": "number_literal", "text": "0x69", "parent": 101, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 8}}, {"id": 171, "type": "number_literal", "text": "0x0A", "parent": 101, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 14}}, {"id": 172, "type": "number_literal", "text": "0x6C", "parent": 101, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 8}}, {"id": 173, "type": "number_literal", "text": "0x0B", "parent": 101, "children": [], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 14}}, {"id": 174, "type": "number_literal", "text": "0x6E", "parent": 101, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 8}}, {"id": 175, "type": "number_literal", "text": "0x0B", "parent": 101, "children": [], "start_point": {"row": 114, "column": 10}, "end_point": {"row": 114, "column": 14}}, {"id": 176, "type": "number_literal", "text": "0x71", "parent": 101, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 8}}, {"id": 177, "type": "number_literal", "text": "0x0A", "parent": 101, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 14}}, {"id": 178, "type": "number_literal", "text": "0x73", "parent": 101, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 8}}, {"id": 179, "type": "number_literal", "text": "0x1D", "parent": 101, "children": [], "start_point": {"row": 116, "column": 10}, "end_point": {"row": 116, "column": 14}}, {"id": 180, "type": "number_literal", "text": "0x75", "parent": 101, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 8}}, {"id": 181, "type": "number_literal", "text": "0x1E", "parent": 101, "children": [], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 14}}, {"id": 182, "type": "number_literal", "text": "0x77", "parent": 101, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 8}}, {"id": 183, "type": "number_literal", "text": "0x0B", "parent": 101, "children": [], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 14}}, {"id": 184, "type": "number_literal", "text": "0x7F", "parent": 101, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 8}}, {"id": 185, "type": "number_literal", "text": "0x01", "parent": 101, "children": [], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 14}}, {"id": 186, "type": "number_literal", "text": "0x01", "parent": 101, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 8}}, {"id": 187, "type": "number_literal", "text": "0x14", "parent": 101, "children": [], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 14}}, {"id": 188, "type": "number_literal", "text": "0x02", "parent": 101, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 8}}, {"id": 189, "type": "number_literal", "text": "0x02", "parent": 101, "children": [], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 121, "column": 14}}, {"id": 190, "type": "number_literal", "text": "0x04", "parent": 101, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 8}}, {"id": 191, "type": "number_literal", "text": "0x96", "parent": 101, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 14}}, {"id": 192, "type": "number_literal", "text": "0x05", "parent": 101, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 8}}, {"id": 193, "type": "number_literal", "text": "0x03", "parent": 101, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 14}}, {"id": 194, "type": "number_literal", "text": "0x06", "parent": 101, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 8}}, {"id": 195, "type": "number_literal", "text": "0x46", "parent": 101, "children": [], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 14}}, {"id": 196, "type": "number_literal", "text": "0x0D", "parent": 101, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 8}}, {"id": 197, "type": "number_literal", "text": "0x9F", "parent": 101, "children": [], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 14}}, {"id": 198, "type": "number_literal", "text": "0x0E", "parent": 101, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 8}}, {"id": 199, "type": "number_literal", "text": "0x11", "parent": 101, "children": [], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 14}}, {"id": 200, "type": "number_literal", "text": "0x0F", "parent": 101, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 8}}, {"id": 201, "type": "number_literal", "text": "0x48", "parent": 101, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 14}}, {"id": 202, "type": "number_literal", "text": "0x10", "parent": 101, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 8}}, {"id": 203, "type": "number_literal", "text": "0x10", "parent": 101, "children": [], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 14}}, {"id": 204, "type": "number_literal", "text": "0x11", "parent": 101, "children": [], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 8}}, {"id": 205, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 14}}, {"id": 206, "type": "number_literal", "text": "0x12", "parent": 101, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 8}}, {"id": 207, "type": "number_literal", "text": "0x05", "parent": 101, "children": [], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 14}}, {"id": 208, "type": "number_literal", "text": "0x15", "parent": 101, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 8}}, {"id": 209, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 131, "column": 10}, "end_point": {"row": 131, "column": 14}}, {"id": 210, "type": "number_literal", "text": "0x16", "parent": 101, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 8}}, {"id": 211, "type": "number_literal", "text": "0x01", "parent": 101, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 14}}, {"id": 212, "type": "number_literal", "text": "0x17", "parent": 101, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 8}}, {"id": 213, "type": "number_literal", "text": "0x67", "parent": 101, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 14}}, {"id": 214, "type": "number_literal", "text": "0x18", "parent": 101, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 8}}, {"id": 215, "type": "number_literal", "text": "0xD0", "parent": 101, "children": [], "start_point": {"row": 134, "column": 10}, "end_point": {"row": 134, "column": 14}}, {"id": 216, "type": "number_literal", "text": "0x21", "parent": 101, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 8}}, {"id": 217, "type": "number_literal", "text": "0x14", "parent": 101, "children": [], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 14}}, {"id": 218, "type": "number_literal", "text": "0x22", "parent": 101, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 8}}, {"id": 219, "type": "number_literal", "text": "0x80", "parent": 101, "children": [], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 14}}, {"id": 220, "type": "number_literal", "text": "0x2F", "parent": 101, "children": [], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 8}}, {"id": 221, "type": "number_literal", "text": "0x30", "parent": 101, "children": [], "start_point": {"row": 137, "column": 10}, "end_point": {"row": 137, "column": 14}}, {"id": 222, "type": "number_literal", "text": "0x35", "parent": 101, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 8}}, {"id": 223, "type": "number_literal", "text": "0x64", "parent": 101, "children": [], "start_point": {"row": 138, "column": 10}, "end_point": {"row": 138, "column": 14}}, {"id": 224, "type": "number_literal", "text": "0x39", "parent": 101, "children": [], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 8}}, {"id": 225, "type": "number_literal", "text": "0x03", "parent": 101, "children": [], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 14}}, {"id": 226, "type": "number_literal", "text": "0x3A", "parent": 101, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 8}}, {"id": 227, "type": "number_literal", "text": "0x03", "parent": 101, "children": [], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 14}}, {"id": 228, "type": "number_literal", "text": "0x46", "parent": 101, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 8}}, {"id": 229, "type": "number_literal", "text": "0x06", "parent": 101, "children": [], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 141, "column": 14}}, {"id": 230, "type": "number_literal", "text": "0x4A", "parent": 101, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 8}}, {"id": 231, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 14}}, {"id": 232, "type": "number_literal", "text": "0x4B", "parent": 101, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 8}}, {"id": 233, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 14}}, {"id": 234, "type": "number_literal", "text": "0x00", "parent": 101, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 8}}, {"id": 235, "type": "number_literal", "text": "0x01", "parent": 101, "children": [], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 14}}]}, "node_categories": {"declarations": {"functions": [], "variables": [95], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 99], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdint.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\n * File: paj6100u6_reg.h\n * Created Date: Tuesday, May 25th 2021, 10:45:35 am\n * Author: <NAME>\n * -----\n * Last Modified: Sunday May 30th 2021 2:39:45 pm\n * Modified By: <NAME> at <<EMAIL>>\n * -----\n * MIT License\n *\n * Copyright (c) 2021 Pixart Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n * -----\n * HISTORY:\n * Date \tBy\tComments\n * ----------\t---\t----------------------------------------------------------\n */\n\n#include <stdint.h>\n\n#define REG_BANK_SWITCH 0x7F\n\n// =======================================\n#define BANK_0 0x00\n// ---------------------------------------\n#define REG_CMD_HSYNC_INV 0X07 // bit7\n#define REG_CMD_VSYNC_INV 0X07 // bit6\n\n#define REG_CMD_AAVG_V 0X07 // bit3\n#define REG_CMD_AAVG_H 0X07 // bit2\n\n#define REG_ABC_START_LINE 0x0D // bit3:1\n\n\n#define REG_FGH 0x11 // bit5:4\n#define REG_GGH 0x12 // bit7\n\n#define REG_EXP_OFFSET_L 0x18\n#define REG_EXP_OFFSET_H 0x19\n#define REG_CMD_EXPO_L 0x48\n#define REG_CMD_EXPO_H 0x49\n#define REG_CMD_EXPO_2H 0x4A\n\n#define REG_FRAME_TIME_L 0x7A\n#define REG_FRAME_TIME_H 0x7B\n#define REG_FRAME_TIME_2H 0x7C\n// =======================================\n#define BANK_1 0x01\n// ---------------------------------------\n#define REG_ISP_UPDATE 0x00\n\n#define REG_CMD_SENSOR_MODE 0X23 // bit7\n#define REG_CMD_LPM_ENH 0x23 // bit6\n\n#define REG_CP_WOI_VOFFSET 0x45\n#define REG_ABC_SAMPLE_SIZE 0x46 // bit2:0\n\n\n// 20180504\nstatic const uint8_t low_active_R_ABC_Avg_UBx50_T_BLACINV_EnHx1_T_SIG_REFx1[] = {\n//address, value\n 0x7F, 0x00,\n 0x0C, 0x1D, // software reset\n 0x7F, 0x00,\n 0x07, 0x00, // low active\n 0x08, 0x03,\n 0x0B, 0x0E,\n 0x0D, 0xC5,\n 0x0F, 0x32, //R_ABC_Avg_UB=50\n 0x11, 0x41, //R_global=1\n 0x13, 0xD2,\n 0x14, 0xFE,\n 0x15, 0x00, // R_fg_fast=0\n 0x17, 0x02, //03\n 0x1A, 0x07,\n 0x1B, 0x08,\n 0x20, 0x00, //R_fast_powerdn_WakeupTime=0\n 0x25, 0x78,\n 0x29, 0x28,\n 0x2B, 0x06,\n 0x2F, 0x0E,\n 0x30, 0x0E,\n 0x34, 0x0F,\n 0x35, 0x0F,\n 0x3A, 0x28,\n 0x45, 0x17,\n 0x46, 0x17,\n 0x48, 0x10, //EXP\n 0x49, 0x27, //EXP\n 0x4A, 0x00, //EXP\n 0x4D, 0x0D,\n 0x4E, 0x20,\n 0x62, 0x12,\n 0x64, 0x02,\n 0x67, 0x0A,\n 0x69, 0x0A,\n 0x6C, 0x0B,\n 0x6E, 0x0B,\n 0x71, 0x0A,\n 0x73, 0x1D,\n 0x75, 0x1E,\n 0x77, 0x0B,\n 0x7F, 0x01,\n 0x01, 0x14,\n 0x02, 0x02, //\n 0x04, 0x96,\n 0x05, 0x03,\n 0x06, 0x46,\n 0x0D, 0x9F, //T_BLACINV_EnH=1\n 0x0E, 0x11, //T_SIG_REF=1\n 0x0F, 0x48,\n 0x10, 0x10, //T_vcom_lvl=0\n 0x11, 0x00,\n 0x12, 0x05,\n 0x15, 0x00,\n 0x16, 0x01, //schmitt trigger\n 0x17, 0x67,\n 0x18, 0xD0, //T_vrt_lvl=T_vrb_lvl=2\n 0x21, 0x14,\n 0x22, 0x80, //\n 0x2F, 0x30,\n 0x35, 0x64,\n 0x39, 0x03,\n 0x3A, 0x03,\n 0x46, 0x06,\n 0x4A, 0x00, //FX2\n 0x4B, 0x00, //FX2\n 0x00, 0x01, //updated flag\n};"}
211
c
// // SCPoiSearch.h // FindAFitting // // Created by SC on 16/5/10. // Copyright © 2016年 SDJY. All rights reserved. // #import <Foundation/Foundation.h> #import "SCAddress.h" typedef void (^SCPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo); @interface SCPoiSearchUtil : NSObject DECLARE_SINGLETON() - (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location callback:(SCPoiSearchBlock)callback; - (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback; - (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location radius:(NSInteger)radius additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback; @end
47.65
17
(translation_unit) "//\n// SCPoiSearch.h\n// FindAFitting\n//\n// Created by SC on 16/5/10.\n// Copyright © 2016年 SDJY. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import "SCAddress.h"\n\ntypedef void (^SCPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n@interface SCPoiSearchUtil : NSObject\n\nDECLARE_SINGLETON()\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location callback:(SCPoiSearchBlock)callback;\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback;\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location radius:(NSInteger)radius additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback;\n\n\n@end\n" (comment) "//" (comment) "// SCPoiSearch.h" (comment) "// FindAFitting" (comment) "//" (comment) "// Created by SC on 16/5/10." (comment) "// Copyright © 2016年 SDJY. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <Foundation/Foundation.h>\n#im" (preproc_directive) "port <F" (preproc_arg) "undation/Foundation.h>\n#i" (preproc_call) "port "SCAddress.h"\n\nty" (preproc_directive) "port "S" (preproc_arg) "Address.h"\n\nt" (type_definition) "edef void (^SCPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n@" (typedef) "edef vo" (primitive_type) "d (^" (function_declarator) "CPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n" (parenthesized_declarator) "CPoiSearchBlock)(BO" (() "C" (ERROR) "P" (^) "P" (type_identifier) "oiSearchBlock)(B" ()) "O" (parameter_list) "OL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n" (() "O" (parameter_declaration) "L isSuccessed, N" (type_identifier) "L is" (identifier) "uccessed, N" (,) "S" (parameter_declaration) "utableArray *addressArray, i" (type_identifier) "utableArray *a" (pointer_declarator) "dressArray, i" (*) "d" (identifier) "ressArray, i" (,) "d" (parameter_declaration) "additionalInfo);\n" (type_identifier) "ad" (identifier) "itionalInfo);\n" ()) "\n" (;) "@" (ERROR) "terface SCPoiSearchUtil : NSObject\n\nDECLARE_SINGLETON()\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLL" (ERROR) "t" (type_identifier) "erface SC" (ERROR) "oiSearchUtil : NSObject\n\nD" (identifier) "oiSearchUtil : " (:) "S" (identifier) "bject\n\nD" (function_declarator) "LARE_SINGLETON()\n\n-" (identifier) "LARE_SINGLETON()\n" (parameter_list) "\n-" (() "\n" ()) "-" (unary_expression) "void)nearbySearchByKeyword:(N" (-) "v" (cast_expression) "id)nearbySearchByKeyword:(N" (() "i" (type_descriptor) "d)ne" (primitive_type) "d)ne" ()) "a" (identifier) "rbySearchByKeyword:(N" (:) "S" (() "S" (binary_expression) "tring *)keyword location:(C" (identifier) "tring *)" (*) "e" (ERROR) "yword lo" ()) "y" (identifier) "word lo" (identifier) "ation:(C" (:) "L" (() "L" (declaration) "ocationCoordinate2D) location ca" (type_identifier) "ocationCoordinate2D) l" (ERROR) "o" ()) "o" (identifier) "ation ca" (;) "" (labeled_statement) "lback:(SCPoiSearchBlock)callback;\n\n-" (statement_identifier) "lback:(S" (:) "C" (expression_statement) "PoiSearchBlock)callback;\n\n-" (cast_expression) "PoiSearchBlock)callback;\n\n" (() "P" (type_descriptor) "oiSearchBlock)ca" (type_identifier) "oiSearchBlock)ca" ()) "l" (identifier) "lback;\n\n" (;) "-" (ERROR) "void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) lo" (binary_expression) "void)nearbySearchByKeyword:(NSString *)keyword location:(C" (unary_expression) "void)nearbySearchByKeyword:(N" (-) "v" (cast_expression) "id)nearbySearchByKeyword:(N" (() "i" (type_descriptor) "d)ne" (primitive_type) "d)ne" ()) "a" (identifier) "rbySearchByKeyword:(N" (ERROR) "SString *)" (:) "S" (() "S" (identifier) "tring *)" (*) "e" (ERROR) "yword lo" ()) "y" (identifier) "word lo" (identifier) "ation:(C" (:) "L" (() "L" (identifier) "ocationCoordinate2D) l" ()) "o" (declaration) "ation additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback;\n\n-" (type_identifier) "ation ad" (ERROR) "itionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)cal" (identifier) "itionalInfo:(i" (:) "d" (() ")" (identifier) "ad" ()) "d" (identifier) "itionalInfo ca" (identifier) "lback:(S" (:) "C" (() "P" (identifier) "oiSearchBlock)ca" ()) "l" (identifier) "lback;\n\n" (;) "-" (ERROR) "void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) lo" (binary_expression) "void)nearbySearchByKeyword:(NSString *)keyword location:(C" (unary_expression) "void)nearbySearchByKeyword:(N" (-) "v" (cast_expression) "id)nearbySearchByKeyword:(N" (() "i" (type_descriptor) "d)ne" (primitive_type) "d)ne" ()) "a" (identifier) "rbySearchByKeyword:(N" (ERROR) "SString *)" (:) "S" (() "S" (identifier) "tring *)" (*) "e" (ERROR) "yword lo" ()) "y" (identifier) "word lo" (identifier) "ation:(C" (:) "L" (() "L" (identifier) "ocationCoordinate2D) l" ()) "o" (declaration) "ation radius:(NSInteger)radius ad" (type_identifier) "ation ra" (ERROR) "ius:(NSInteger)rad" (identifier) "ius:(N" (:) "S" (() "I" (identifier) "nteger)ra" ()) "d" (identifier) "ius ad" (;) "" (labeled_statement) "itionalInfo:(id)additionalInfo ca" (statement_identifier) "itionalInfo:(i" (:) "d" (expression_statement) ")additionalInfo ca" (cast_expression) ")additionalInfo ca" (() ")" (type_descriptor) "ad" (type_identifier) "ad" ()) "d" (identifier) "itionalInfo ca" (;) "" (labeled_statement) "lback:(SCPoiSearchBlock)callback;\n\n\n" (statement_identifier) "lback:(S" (:) "C" (expression_statement) "PoiSearchBlock)callback;\n\n\n" (cast_expression) "PoiSearchBlock)callback;\n\n" (() "P" (type_descriptor) "oiSearchBlock)ca" (type_identifier) "oiSearchBlock)ca" ()) "l" (identifier) "lback;\n\n" (;) "\n" (ERROR) "d" (ERROR) "d" (expression_statement) "\n" (identifier) "\n" (;) ""
188
16
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 47.65, "nodes": 117, "errors": 0, "source_hash": "0a4d32c32abb900acdece271314e593fcd16d2cd72f815ad880ce452958ecebb", "categorized_nodes": 71}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <Foundation/Foundation.h>\n#im", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "port <F", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "undation/Foundation.h>\n#i", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_call", "text": "port \"SCAddress.h\"\n\nty", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "port \"S", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "Address.h\"\n\nt", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 21}}, {"id": 6, "type": "type_definition", "text": "edef void (^SCPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n@", "parent": null, "children": [7, 8, 9], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 100}}, {"id": 7, "type": "typedef", "text": "edef vo", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 8, "type": "primitive_type", "text": "d (^", "parent": 6, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 12}}, {"id": 9, "type": "function_declarator", "text": "CPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n", "parent": 6, "children": [10, 14], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 99}}, {"id": 10, "type": "parenthesized_declarator", "text": "CPoiSearchBlock)(BO", "parent": 9, "children": [11, 13], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 32}}, {"id": 11, "type": "ERROR", "text": "P", "parent": 10, "children": [12], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 12, "type": "^", "text": "P", "parent": 11, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 13, "type": "type_identifier", "text": "oiSearchBlock)(B", "parent": 10, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 31}}, {"id": 14, "type": "parameter_list", "text": "OL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n", "parent": 9, "children": [15, 18, 23], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 11, "column": 99}}, {"id": 15, "type": "parameter_declaration", "text": "L isSuccessed, N", "parent": 14, "children": [16, 17], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 49}}, {"id": 16, "type": "type_identifier", "text": "L is", "parent": 15, "children": [], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 37}}, {"id": 17, "type": "identifier", "text": "uccessed, N", "parent": 15, "children": [], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 49}}, {"id": 18, "type": "parameter_declaration", "text": "utableArray *addressArray, i", "parent": 14, "children": [19, 20], "start_point": {"row": 11, "column": 51}, "end_point": {"row": 11, "column": 79}}, {"id": 19, "type": "type_identifier", "text": "utableArray *a", "parent": 18, "children": [], "start_point": {"row": 11, "column": 51}, "end_point": {"row": 11, "column": 65}}, {"id": 20, "type": "pointer_declarator", "text": "dressArray, i", "parent": 18, "children": [21, 22], "start_point": {"row": 11, "column": 66}, "end_point": {"row": 11, "column": 79}}, {"id": 21, "type": "*", "text": "d", "parent": 20, "children": [], "start_point": {"row": 11, "column": 66}, "end_point": {"row": 11, "column": 67}}, {"id": 22, "type": "identifier", "text": "ressArray, i", "parent": 20, "children": [], "start_point": {"row": 11, "column": 67}, "end_point": {"row": 11, "column": 79}}, {"id": 23, "type": "parameter_declaration", "text": "additionalInfo);\n", "parent": 14, "children": [24, 25], "start_point": {"row": 11, "column": 81}, "end_point": {"row": 11, "column": 98}}, {"id": 24, "type": "type_identifier", "text": "ad", "parent": 23, "children": [], "start_point": {"row": 11, "column": 81}, "end_point": {"row": 11, "column": 83}}, {"id": 25, "type": "identifier", "text": "itionalInfo);\n", "parent": 23, "children": [], "start_point": {"row": 11, "column": 84}, "end_point": {"row": 11, "column": 98}}, {"id": 26, "type": "ERROR", "text": "terface SCPoiSearchUtil : NSObject\n\nDECLARE_SINGLETON()\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLL", "parent": null, "children": [27, 28, 29, 32, 35, 41], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 60}}, {"id": 27, "type": "ERROR", "text": "t", "parent": 26, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 28, "type": "type_identifier", "text": "erface SC", "parent": 26, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 29, "type": "ERROR", "text": "oiSearchUtil : NSObject\n\nD", "parent": 26, "children": [30, 31], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 37}}, {"id": 30, "type": "identifier", "text": "oiSearchUtil : ", "parent": 29, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 26}}, {"id": 31, "type": "identifier", "text": "bject\n\nD", "parent": 29, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 37}}, {"id": 32, "type": "function_declarator", "text": "LARE_SINGLETON()\n\n-", "parent": 26, "children": [33, 34], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 19}}, {"id": 33, "type": "identifier", "text": "LARE_SINGLETON()\n", "parent": 32, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 17}}, {"id": 34, "type": "parameter_list", "text": "\n-", "parent": 32, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 19}}, {"id": 35, "type": "unary_expression", "text": "void)nearbySearchByKeyword:(N", "parent": 26, "children": [36, 37], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 29}}, {"id": 36, "type": "-", "text": "v", "parent": 35, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 37, "type": "cast_expression", "text": "id)nearbySearchByKeyword:(N", "parent": 35, "children": [38, 40], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 29}}, {"id": 38, "type": "type_descriptor", "text": "d)ne", "parent": 37, "children": [39], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 39, "type": "primitive_type", "text": "d)ne", "parent": 38, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 40, "type": "identifier", "text": "rbySearchByKeyword:(N", "parent": 37, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 29}}, {"id": 41, "type": "binary_expression", "text": "tring *)keyword location:(C", "parent": 26, "children": [42, 43, 44, 46], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 58}}, {"id": 42, "type": "identifier", "text": "tring *)", "parent": 41, "children": [], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 39}}, {"id": 43, "type": "*", "text": "e", "parent": 41, "children": [], "start_point": {"row": 17, "column": 40}, "end_point": {"row": 17, "column": 41}}, {"id": 44, "type": "ERROR", "text": "yword lo", "parent": 41, "children": [45], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 49}}, {"id": 45, "type": "identifier", "text": "word lo", "parent": 44, "children": [], "start_point": {"row": 17, "column": 42}, "end_point": {"row": 17, "column": 49}}, {"id": 46, "type": "identifier", "text": "ation:(C", "parent": 41, "children": [], "start_point": {"row": 17, "column": 50}, "end_point": {"row": 17, "column": 58}}, {"id": 47, "type": "declaration", "text": "ocationCoordinate2D) location ca", "parent": null, "children": [48, 49, 50], "start_point": {"row": 17, "column": 60}, "end_point": {"row": 17, "column": 92}}, {"id": 48, "type": "type_identifier", "text": "ocationCoordinate2D) l", "parent": 47, "children": [], "start_point": {"row": 17, "column": 60}, "end_point": {"row": 17, "column": 82}}, {"id": 49, "type": "ERROR", "text": "o", "parent": 47, "children": [], "start_point": {"row": 17, "column": 82}, "end_point": {"row": 17, "column": 83}}, {"id": 50, "type": "identifier", "text": "ation ca", "parent": 47, "children": [], "start_point": {"row": 17, "column": 84}, "end_point": {"row": 17, "column": 92}}, {"id": 51, "type": "labeled_statement", "text": "lback:(SCPoiSearchBlock)callback;\n\n-", "parent": null, "children": [52], "start_point": {"row": 17, "column": 93}, "end_point": {"row": 17, "column": 129}}, {"id": 52, "type": "statement_identifier", "text": "lback:(S", "parent": 51, "children": [], "start_point": {"row": 17, "column": 93}, "end_point": {"row": 17, "column": 101}}, {"id": 53, "type": "cast_expression", "text": "PoiSearchBlock)callback;\n\n", "parent": 51, "children": [54, 56], "start_point": {"row": 17, "column": 102}, "end_point": {"row": 17, "column": 128}}, {"id": 54, "type": "type_descriptor", "text": "oiSearchBlock)ca", "parent": 53, "children": [55], "start_point": {"row": 17, "column": 103}, "end_point": {"row": 17, "column": 119}}, {"id": 55, "type": "type_identifier", "text": "oiSearchBlock)ca", "parent": 54, "children": [], "start_point": {"row": 17, "column": 103}, "end_point": {"row": 17, "column": 119}}, {"id": 56, "type": "identifier", "text": "lback;\n\n", "parent": 53, "children": [], "start_point": {"row": 17, "column": 120}, "end_point": {"row": 17, "column": 128}}, {"id": 57, "type": "ERROR", "text": "void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) lo", "parent": null, "children": [58, 71], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 83}}, {"id": 58, "type": "binary_expression", "text": "void)nearbySearchByKeyword:(NSString *)keyword location:(C", "parent": 57, "children": [59, 65, 67, 68, 70], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 58}}, {"id": 59, "type": "unary_expression", "text": "void)nearbySearchByKeyword:(N", "parent": 58, "children": [60, 61], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 29}}, {"id": 60, "type": "-", "text": "v", "parent": 59, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 61, "type": "cast_expression", "text": "id)nearbySearchByKeyword:(N", "parent": 59, "children": [62, 64], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 29}}, {"id": 62, "type": "type_descriptor", "text": "d)ne", "parent": 61, "children": [63], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 63, "type": "primitive_type", "text": "d)ne", "parent": 62, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 64, "type": "identifier", "text": "rbySearchByKeyword:(N", "parent": 61, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 29}}, {"id": 65, "type": "ERROR", "text": "SString *)", "parent": 58, "children": [66], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 39}}, {"id": 66, "type": "identifier", "text": "tring *)", "parent": 65, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 39}}, {"id": 67, "type": "*", "text": "e", "parent": 58, "children": [], "start_point": {"row": 19, "column": 40}, "end_point": {"row": 19, "column": 41}}, {"id": 68, "type": "ERROR", "text": "yword lo", "parent": 58, "children": [69], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 49}}, {"id": 69, "type": "identifier", "text": "word lo", "parent": 68, "children": [], "start_point": {"row": 19, "column": 42}, "end_point": {"row": 19, "column": 49}}, {"id": 70, "type": "identifier", "text": "ation:(C", "parent": 58, "children": [], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 58}}, {"id": 71, "type": "identifier", "text": "ocationCoordinate2D) l", "parent": 57, "children": [], "start_point": {"row": 19, "column": 60}, "end_point": {"row": 19, "column": 82}}, {"id": 72, "type": "declaration", "text": "ation additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback;\n\n-", "parent": null, "children": [73, 74, 80], "start_point": {"row": 19, "column": 84}, "end_point": {"row": 19, "column": 163}}, {"id": 73, "type": "type_identifier", "text": "ation ad", "parent": 72, "children": [], "start_point": {"row": 19, "column": 84}, "end_point": {"row": 19, "column": 92}}, {"id": 74, "type": "ERROR", "text": "itionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)cal", "parent": 72, "children": [75, 76, 77, 78, 79], "start_point": {"row": 19, "column": 93}, "end_point": {"row": 19, "column": 154}}, {"id": 75, "type": "identifier", "text": "itionalInfo:(i", "parent": 74, "children": [], "start_point": {"row": 19, "column": 93}, "end_point": {"row": 19, "column": 107}}, {"id": 76, "type": "identifier", "text": "ad", "parent": 74, "children": [], "start_point": {"row": 19, "column": 109}, "end_point": {"row": 19, "column": 111}}, {"id": 77, "type": "identifier", "text": "itionalInfo ca", "parent": 74, "children": [], "start_point": {"row": 19, "column": 112}, "end_point": {"row": 19, "column": 126}}, {"id": 78, "type": "identifier", "text": "lback:(S", "parent": 74, "children": [], "start_point": {"row": 19, "column": 127}, "end_point": {"row": 19, "column": 135}}, {"id": 79, "type": "identifier", "text": "oiSearchBlock)ca", "parent": 74, "children": [], "start_point": {"row": 19, "column": 137}, "end_point": {"row": 19, "column": 153}}, {"id": 80, "type": "identifier", "text": "lback;\n\n", "parent": 72, "children": [], "start_point": {"row": 19, "column": 154}, "end_point": {"row": 19, "column": 162}}, {"id": 81, "type": "ERROR", "text": "void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) lo", "parent": null, "children": [82, 95], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 83}}, {"id": 82, "type": "binary_expression", "text": "void)nearbySearchByKeyword:(NSString *)keyword location:(C", "parent": 81, "children": [83, 89, 91, 92, 94], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 58}}, {"id": 83, "type": "unary_expression", "text": "void)nearbySearchByKeyword:(N", "parent": 82, "children": [84, 85], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 29}}, {"id": 84, "type": "-", "text": "v", "parent": 83, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 85, "type": "cast_expression", "text": "id)nearbySearchByKeyword:(N", "parent": 83, "children": [86, 88], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 29}}, {"id": 86, "type": "type_descriptor", "text": "d)ne", "parent": 85, "children": [87], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 87, "type": "primitive_type", "text": "d)ne", "parent": 86, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 88, "type": "identifier", "text": "rbySearchByKeyword:(N", "parent": 85, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 29}}, {"id": 89, "type": "ERROR", "text": "SString *)", "parent": 82, "children": [90], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 39}}, {"id": 90, "type": "identifier", "text": "tring *)", "parent": 89, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 39}}, {"id": 91, "type": "*", "text": "e", "parent": 82, "children": [], "start_point": {"row": 21, "column": 40}, "end_point": {"row": 21, "column": 41}}, {"id": 92, "type": "ERROR", "text": "yword lo", "parent": 82, "children": [93], "start_point": {"row": 21, "column": 41}, "end_point": {"row": 21, "column": 49}}, {"id": 93, "type": "identifier", "text": "word lo", "parent": 92, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 49}}, {"id": 94, "type": "identifier", "text": "ation:(C", "parent": 82, "children": [], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 58}}, {"id": 95, "type": "identifier", "text": "ocationCoordinate2D) l", "parent": 81, "children": [], "start_point": {"row": 21, "column": 60}, "end_point": {"row": 21, "column": 82}}, {"id": 96, "type": "declaration", "text": "ation radius:(NSInteger)radius ad", "parent": null, "children": [97, 98, 101], "start_point": {"row": 21, "column": 84}, "end_point": {"row": 21, "column": 117}}, {"id": 97, "type": "type_identifier", "text": "ation ra", "parent": 96, "children": [], "start_point": {"row": 21, "column": 84}, "end_point": {"row": 21, "column": 92}}, {"id": 98, "type": "ERROR", "text": "ius:(NSInteger)rad", "parent": 96, "children": [99, 100], "start_point": {"row": 21, "column": 93}, "end_point": {"row": 21, "column": 111}}, {"id": 99, "type": "identifier", "text": "ius:(N", "parent": 98, "children": [], "start_point": {"row": 21, "column": 93}, "end_point": {"row": 21, "column": 99}}, {"id": 100, "type": "identifier", "text": "nteger)ra", "parent": 98, "children": [], "start_point": {"row": 21, "column": 101}, "end_point": {"row": 21, "column": 110}}, {"id": 101, "type": "identifier", "text": "ius ad", "parent": 96, "children": [], "start_point": {"row": 21, "column": 111}, "end_point": {"row": 21, "column": 117}}, {"id": 102, "type": "labeled_statement", "text": "itionalInfo:(id)additionalInfo ca", "parent": null, "children": [103], "start_point": {"row": 21, "column": 118}, "end_point": {"row": 21, "column": 151}}, {"id": 103, "type": "statement_identifier", "text": "itionalInfo:(i", "parent": 102, "children": [], "start_point": {"row": 21, "column": 118}, "end_point": {"row": 21, "column": 132}}, {"id": 104, "type": "cast_expression", "text": ")additionalInfo ca", "parent": 102, "children": [105, 107], "start_point": {"row": 21, "column": 133}, "end_point": {"row": 21, "column": 151}}, {"id": 105, "type": "type_descriptor", "text": "ad", "parent": 104, "children": [106], "start_point": {"row": 21, "column": 134}, "end_point": {"row": 21, "column": 136}}, {"id": 106, "type": "type_identifier", "text": "ad", "parent": 105, "children": [], "start_point": {"row": 21, "column": 134}, "end_point": {"row": 21, "column": 136}}, {"id": 107, "type": "identifier", "text": "itionalInfo ca", "parent": 104, "children": [], "start_point": {"row": 21, "column": 137}, "end_point": {"row": 21, "column": 151}}, {"id": 108, "type": "labeled_statement", "text": "lback:(SCPoiSearchBlock)callback;\n\n\n", "parent": null, "children": [109], "start_point": {"row": 21, "column": 152}, "end_point": {"row": 21, "column": 188}}, {"id": 109, "type": "statement_identifier", "text": "lback:(S", "parent": 108, "children": [], "start_point": {"row": 21, "column": 152}, "end_point": {"row": 21, "column": 160}}, {"id": 110, "type": "cast_expression", "text": "PoiSearchBlock)callback;\n\n", "parent": 108, "children": [111, 113], "start_point": {"row": 21, "column": 161}, "end_point": {"row": 21, "column": 187}}, {"id": 111, "type": "type_descriptor", "text": "oiSearchBlock)ca", "parent": 110, "children": [112], "start_point": {"row": 21, "column": 162}, "end_point": {"row": 21, "column": 178}}, {"id": 112, "type": "type_identifier", "text": "oiSearchBlock)ca", "parent": 111, "children": [], "start_point": {"row": 21, "column": 162}, "end_point": {"row": 21, "column": 178}}, {"id": 113, "type": "identifier", "text": "lback;\n\n", "parent": 110, "children": [], "start_point": {"row": 21, "column": 179}, "end_point": {"row": 21, "column": 187}}, {"id": 114, "type": "ERROR", "text": "d", "parent": null, "children": [115], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 115, "type": "ERROR", "text": "d", "parent": 114, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 116, "type": "identifier", "text": "\n", "parent": null, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}]}, "node_categories": {"declarations": {"functions": [9, 32], "variables": [6, 15, 18, 23, 47, 72, 96], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [35, 37, 41, 53, 58, 59, 61, 82, 83, 85, 104, 110], "assignments": [], "loops": [], "conditionals": [13, 16, 17, 19, 22, 24, 25, 28, 30, 31, 33, 40, 42, 45, 46, 48, 50, 52, 55, 56, 64, 66, 69, 70, 71, 73, 75, 76, 77, 78, 79, 80, 88, 90, 93, 94, 95, 97, 99, 100, 101, 103, 106, 107, 109, 112, 113, 116], "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": "CPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "LARE_SINGLETON()\n\n-"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// SCPoiSearch.h\n// FindAFitting\n//\n// Created by SC on 16/5/10.\n// Copyright \u00a9 2016\u5e74 SDJY. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import \"SCAddress.h\"\n\ntypedef void (^SCPoiSearchBlock)(BOOL isSuccessed, NSMutableArray *addressArray, id additionalInfo);\n\n@interface SCPoiSearchUtil : NSObject\n\nDECLARE_SINGLETON()\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location callback:(SCPoiSearchBlock)callback;\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback;\n\n- (void)nearbySearchByKeyword:(NSString *)keyword location:(CLLocationCoordinate2D) location radius:(NSInteger)radius additionalInfo:(id)additionalInfo callback:(SCPoiSearchBlock)callback;\n\n\n@end\n"}
212
c
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once namespace JSC { ALWAYS_INLINE bool isIOS() { #if PLATFORM(IOS) return true; #else return false; #endif } ALWAYS_INLINE bool isInt9(int32_t value) { return value == ((value << 23) >> 23); } template<typename Type> ALWAYS_INLINE bool isUInt12(Type value) { return !(value & ~static_cast<Type>(0xfff)); } template<int datasize> ALWAYS_INLINE bool isValidScaledUImm12(int32_t offset) { int32_t maxPImm = 4095 * (datasize / 8); if (offset < 0) return false; if (offset > maxPImm) return false; if (offset & ((datasize / 8) - 1)) return false; return true; } ALWAYS_INLINE bool isValidSignedImm9(int32_t value) { return isInt9(value); } class ARM64LogicalImmediate { public: static ARM64LogicalImmediate create32(uint32_t value) { // Check for 0, -1 - these cannot be encoded. if (!value || !~value) return InvalidLogicalImmediate; // First look for a 32-bit pattern, then for repeating 16-bit // patterns, 8-bit, 4-bit, and finally 2-bit. unsigned hsb, lsb; bool inverted; if (findBitRange<32>(value, hsb, lsb, inverted)) return encodeLogicalImmediate<32>(hsb, lsb, inverted); if ((value & 0xffff) != (value >> 16)) return InvalidLogicalImmediate; value &= 0xffff; if (findBitRange<16>(value, hsb, lsb, inverted)) return encodeLogicalImmediate<16>(hsb, lsb, inverted); if ((value & 0xff) != (value >> 8)) return InvalidLogicalImmediate; value &= 0xff; if (findBitRange<8>(value, hsb, lsb, inverted)) return encodeLogicalImmediate<8>(hsb, lsb, inverted); if ((value & 0xf) != (value >> 4)) return InvalidLogicalImmediate; value &= 0xf; if (findBitRange<4>(value, hsb, lsb, inverted)) return encodeLogicalImmediate<4>(hsb, lsb, inverted); if ((value & 0x3) != (value >> 2)) return InvalidLogicalImmediate; value &= 0x3; if (findBitRange<2>(value, hsb, lsb, inverted)) return encodeLogicalImmediate<2>(hsb, lsb, inverted); return InvalidLogicalImmediate; } static ARM64LogicalImmediate create64(uint64_t value) { // Check for 0, -1 - these cannot be encoded. if (!value || !~value) return InvalidLogicalImmediate; // Look for a contiguous bit range. unsigned hsb, lsb; bool inverted; if (findBitRange<64>(value, hsb, lsb, inverted)) return encodeLogicalImmediate<64>(hsb, lsb, inverted); // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern. if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32)) return create32(static_cast<uint32_t>(value)); return InvalidLogicalImmediate; } int value() const { ASSERT(isValid()); return m_value; } bool isValid() const { return m_value != InvalidLogicalImmediate; } bool is64bit() const { return m_value & (1 << 12); } private: ARM64LogicalImmediate(int value) : m_value(value) { } // Generate a mask with bits in the range hsb..0 set, for example: // hsb:63 = 0xffffffffffffffff // hsb:42 = 0x000007ffffffffff // hsb: 0 = 0x0000000000000001 static uint64_t mask(unsigned hsb) { ASSERT(hsb < 64); return 0xffffffffffffffffull >> (63 - hsb); } template<unsigned N> static void partialHSB(uint64_t& value, unsigned&result) { if (value & (0xffffffffffffffffull << N)) { result += N; value >>= N; } } // Find the bit number of the highest bit set in a non-zero value, for example: // 0x8080808080808080 = hsb:63 // 0x0000000000000001 = hsb: 0 // 0x000007ffffe00000 = hsb:42 static unsigned highestSetBit(uint64_t value) { ASSERT(value); unsigned hsb = 0; partialHSB<32>(value, hsb); partialHSB<16>(value, hsb); partialHSB<8>(value, hsb); partialHSB<4>(value, hsb); partialHSB<2>(value, hsb); partialHSB<1>(value, hsb); return hsb; } // This function takes a value and a bit width, where value obeys the following constraints: // * bits outside of the width of the value must be zero. // * bits within the width of value must neither be all clear or all set. // The input is inspected to detect values that consist of either two or three contiguous // ranges of bits. The output range hsb..lsb will describe the second range of the value. // if the range is set, inverted will be false, and if the range is clear, inverted will // be true. For example (with width 8): // 00001111 = hsb:3, lsb:0, inverted:false // 11110000 = hsb:3, lsb:0, inverted:true // 00111100 = hsb:5, lsb:2, inverted:false // 11000011 = hsb:5, lsb:2, inverted:true template<unsigned width> static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted) { ASSERT(value & mask(width - 1)); ASSERT(value != mask(width - 1)); ASSERT(!(value & ~mask(width - 1))); // Detect cases where the top bit is set; if so, flip all the bits & set invert. // This halves the number of patterns we need to look for. const uint64_t msb = 1ull << (width - 1); if ((inverted = (value & msb))) value ^= mask(width - 1); // Find the highest set bit in value, generate a corresponding mask & flip all // bits under it. hsb = highestSetBit(value); value ^= mask(hsb); if (!value) { // If this cleared the value, then the range hsb..0 was all set. lsb = 0; return true; } // Try making one more mask, and flipping the bits! lsb = highestSetBit(value); value ^= mask(lsb); if (!value) { // Success - but lsb actually points to the hsb of a third range - add one // to get to the lsb of the mid range. ++lsb; return true; } return false; } // Encodes the set of immN:immr:imms fields found in a logical immediate. template<unsigned width> static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted) { // Check width is a power of 2! ASSERT(!(width & (width -1))); ASSERT(width <= 64 && width >= 2); ASSERT(hsb >= lsb); ASSERT(hsb < width); int immN = 0; int imms = 0; int immr = 0; // For 64-bit values this is easy - just set immN to true, and imms just // contains the bit number of the highest set bit of the set range. For // values with narrower widths, these are encoded by a leading set of // one bits, followed by a zero bit, followed by the remaining set of bits // being the high bit of the range. For a 32-bit immediate there are no // leading one bits, just a zero followed by a five bit number. For a // 16-bit immediate there is one one bit, a zero bit, and then a four bit // bit-position, etc. if (width == 64) immN = 1; else imms = 63 & ~(width + width - 1); if (inverted) { // if width is 64 & hsb is 62, then we have a value something like: // 0x80000000ffffffff (in this case with lsb 32). // The ror should be by 1, imms (effectively set width minus 1) is // 32. Set width is full width minus cleared width. immr = (width - 1) - hsb; imms |= (width - ((hsb - lsb) + 1)) - 1; } else { // if width is 64 & hsb is 62, then we have a value something like: // 0x7fffffff00000000 (in this case with lsb 32). // The value is effectively rol'ed by lsb, which is equivalent to // a ror by width - lsb (or 0, in the case where lsb is 0). imms // is hsb - lsb. immr = (width - lsb) & (width - 1); imms |= hsb - lsb; } return immN << 12 | immr << 6 | imms; } static const int InvalidLogicalImmediate = -1; int m_value; }; } // namespace JSC.
37.09
242
(translation_unit) "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n#pragma once\n\nnamespace JSC {\n\nALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}\n\nALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}\n\ntemplate<typename Type>\nALWAYS_INLINE bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}\n\ntemplate<int datasize>\nALWAYS_INLINE bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}\n\nALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}\n\nclass ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n};\n\n} // namespace JSC.\n" (comment) "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "namespace JSC {\n\nALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}\n\nALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}\n\ntemplate<typename Type>\nALWAYS_INLINE bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}\n\ntemplate<int datasize>\nALWAYS_INLINE bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}\n\nALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}\n\nclass ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n};\n\n}" (type_identifier) "namespace" (identifier) "JSC" (compound_statement) "{\n\nALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}\n\nALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}\n\ntemplate<typename Type>\nALWAYS_INLINE bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}\n\ntemplate<int datasize>\nALWAYS_INLINE bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}\n\nALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}\n\nclass ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n};\n\n}" ({) "{" (function_definition) "ALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}" (type_identifier) "ALWAYS_INLINE" (ERROR) "bool" (identifier) "bool" (function_declarator) "isIOS()" (identifier) "isIOS" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}" ({) "{" (preproc_if) "#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif" (#if) "#if" (call_expression) "PLATFORM(IOS)" (identifier) "PLATFORM" (argument_list) "(IOS)" (() "(" (identifier) "IOS" ()) ")" ( ) "\n" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (preproc_else) "#else\n return false;" (#else) "#else" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (#endif) "#endif" (}) "}" (function_definition) "ALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}" (type_identifier) "ALWAYS_INLINE" (ERROR) "bool" (identifier) "bool" (function_declarator) "isInt9(int32_t value)" (identifier) "isInt9" (parameter_list) "(int32_t value)" (() "(" (parameter_declaration) "int32_t value" (primitive_type) "int32_t" (identifier) "value" ()) ")" (compound_statement) "{\n return value == ((value << 23) >> 23);\n}" ({) "{" (return_statement) "return value == ((value << 23) >> 23);" (return) "return" (binary_expression) "value == ((value << 23) >> 23)" (identifier) "value" (==) "==" (parenthesized_expression) "((value << 23) >> 23)" (() "(" (binary_expression) "(value << 23) >> 23" (parenthesized_expression) "(value << 23)" (() "(" (binary_expression) "value << 23" (identifier) "value" (<<) "<<" (number_literal) "23" ()) ")" (>>) ">>" (number_literal) "23" ()) ")" (;) ";" (}) "}" (expression_statement) "template<typename Type>\nALWAYS_INLINE" (binary_expression) "template<typename Type>\nALWAYS_INLINE" (binary_expression) "template<typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "Type" (identifier) "Type" (>) ">" (identifier) "ALWAYS_INLINE" (;) "" (function_definition) "bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}" (primitive_type) "bool" (function_declarator) "isUInt12(Type value)" (identifier) "isUInt12" (parameter_list) "(Type value)" (() "(" (parameter_declaration) "Type value" (type_identifier) "Type" (identifier) "value" ()) ")" (compound_statement) "{\n return !(value & ~static_cast<Type>(0xfff));\n}" ({) "{" (return_statement) "return !(value & ~static_cast<Type>(0xfff));" (return) "return" (unary_expression) "!(value & ~static_cast<Type>(0xfff))" (!) "!" (parenthesized_expression) "(value & ~static_cast<Type>(0xfff))" (() "(" (binary_expression) "value & ~static_cast<Type>(0xfff)" (identifier) "value" (&) "&" (binary_expression) "~static_cast<Type>(0xfff)" (binary_expression) "~static_cast<Type" (unary_expression) "~static_cast" (~) "~" (identifier) "static_cast" (<) "<" (identifier) "Type" (>) ">" (parenthesized_expression) "(0xfff)" (() "(" (number_literal) "0xfff" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "template<int datasize>\nALWAYS_INLINE" (binary_expression) "template<int datasize>\nALWAYS_INLINE" (binary_expression) "template<int datasize" (identifier) "template" (<) "<" (ERROR) "int" (identifier) "int" (identifier) "datasize" (>) ">" (identifier) "ALWAYS_INLINE" (;) "" (function_definition) "bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}" (primitive_type) "bool" (function_declarator) "isValidScaledUImm12(int32_t offset)" (identifier) "isValidScaledUImm12" (parameter_list) "(int32_t offset)" (() "(" (parameter_declaration) "int32_t offset" (primitive_type) "int32_t" (identifier) "offset" ()) ")" (compound_statement) "{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}" ({) "{" (declaration) "int32_t maxPImm = 4095 * (datasize / 8);" (primitive_type) "int32_t" (init_declarator) "maxPImm = 4095 * (datasize / 8)" (identifier) "maxPImm" (=) "=" (binary_expression) "4095 * (datasize / 8)" (number_literal) "4095" (*) "*" (parenthesized_expression) "(datasize / 8)" (() "(" (binary_expression) "datasize / 8" (identifier) "datasize" (/) "/" (number_literal) "8" ()) ")" (;) ";" (if_statement) "if (offset < 0)\n return false;" (if) "if" (parenthesized_expression) "(offset < 0)" (() "(" (binary_expression) "offset < 0" (identifier) "offset" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (if_statement) "if (offset > maxPImm)\n return false;" (if) "if" (parenthesized_expression) "(offset > maxPImm)" (() "(" (binary_expression) "offset > maxPImm" (identifier) "offset" (>) ">" (identifier) "maxPImm" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (if_statement) "if (offset & ((datasize / 8) - 1))\n return false;" (if) "if" (parenthesized_expression) "(offset & ((datasize / 8) - 1))" (() "(" (binary_expression) "offset & ((datasize / 8) - 1)" (identifier) "offset" (&) "&" (parenthesized_expression) "((datasize / 8) - 1)" (() "(" (binary_expression) "(datasize / 8) - 1" (parenthesized_expression) "(datasize / 8)" (() "(" (binary_expression) "datasize / 8" (identifier) "datasize" (/) "/" (number_literal) "8" ()) ")" (-) "-" (number_literal) "1" ()) ")" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (function_definition) "ALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}" (type_identifier) "ALWAYS_INLINE" (ERROR) "bool" (identifier) "bool" (function_declarator) "isValidSignedImm9(int32_t value)" (identifier) "isValidSignedImm9" (parameter_list) "(int32_t value)" (() "(" (parameter_declaration) "int32_t value" (primitive_type) "int32_t" (identifier) "value" ()) ")" (compound_statement) "{\n return isInt9(value);\n}" ({) "{" (return_statement) "return isInt9(value);" (return) "return" (call_expression) "isInt9(value)" (identifier) "isInt9" (argument_list) "(value)" (() "(" (identifier) "value" ()) ")" (;) ";" (}) "}" (function_definition) "class ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n}" (type_identifier) "class" (identifier) "ARM64LogicalImmediate" (compound_statement) "{\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n}" ({) "{" (labeled_statement) "public:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }" (statement_identifier) "public" (:) ":" (ERROR) "static ARM64LogicalImmediate create32(uint32_t value)" (storage_class_specifier) "static" (static) "static" (type_identifier) "ARM64LogicalImmediate" (function_declarator) "create32(uint32_t value)" (identifier) "create32" (parameter_list) "(uint32_t value)" (() "(" (parameter_declaration) "uint32_t value" (primitive_type) "uint32_t" (identifier) "value" ()) ")" (compound_statement) "{\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }" ({) "{" (comment) "// Check for 0, -1 - these cannot be encoded." (if_statement) "if (!value || !~value)\n return InvalidLogicalImmediate;" (if) "if" (parenthesized_expression) "(!value || !~value)" (() "(" (binary_expression) "!value || !~value" (unary_expression) "!value" (!) "!" (identifier) "value" (||) "||" (unary_expression) "!~value" (!) "!" (unary_expression) "~value" (~) "~" (identifier) "value" ()) ")" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (comment) "// First look for a 32-bit pattern, then for repeating 16-bit" (comment) "// patterns, 8-bit, 4-bit, and finally 2-bit." (declaration) "unsigned hsb, lsb;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "hsb" (,) "," (identifier) "lsb" (;) ";" (declaration) "bool inverted;" (primitive_type) "bool" (identifier) "inverted" (;) ";" (if_statement) "if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);" (if) "if" (parenthesized_expression) "(findBitRange<32>(value, hsb, lsb, inverted))" (() "(" (binary_expression) "findBitRange<32>(value, hsb, lsb, inverted)" (binary_expression) "findBitRange<32" (identifier) "findBitRange" (<) "<" (number_literal) "32" (>) ">" (parenthesized_expression) "(value, hsb, lsb, inverted)" (() "(" (comma_expression) "value, hsb, lsb, inverted" (identifier) "value" (,) "," (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" ()) ")" (return_statement) "return encodeLogicalImmediate<32>(hsb, lsb, inverted);" (return) "return" (binary_expression) "encodeLogicalImmediate<32>(hsb, lsb, inverted)" (binary_expression) "encodeLogicalImmediate<32" (identifier) "encodeLogicalImmediate" (<) "<" (number_literal) "32" (>) ">" (parenthesized_expression) "(hsb, lsb, inverted)" (() "(" (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" (;) ";" (if_statement) "if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;" (if) "if" (parenthesized_expression) "((value & 0xffff) != (value >> 16))" (() "(" (binary_expression) "(value & 0xffff) != (value >> 16)" (parenthesized_expression) "(value & 0xffff)" (() "(" (binary_expression) "value & 0xffff" (identifier) "value" (&) "&" (number_literal) "0xffff" ()) ")" (!=) "!=" (parenthesized_expression) "(value >> 16)" (() "(" (binary_expression) "value >> 16" (identifier) "value" (>>) ">>" (number_literal) "16" ()) ")" ()) ")" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (expression_statement) "value &= 0xffff;" (assignment_expression) "value &= 0xffff" (identifier) "value" (&=) "&=" (number_literal) "0xffff" (;) ";" (if_statement) "if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);" (if) "if" (parenthesized_expression) "(findBitRange<16>(value, hsb, lsb, inverted))" (() "(" (binary_expression) "findBitRange<16>(value, hsb, lsb, inverted)" (binary_expression) "findBitRange<16" (identifier) "findBitRange" (<) "<" (number_literal) "16" (>) ">" (parenthesized_expression) "(value, hsb, lsb, inverted)" (() "(" (comma_expression) "value, hsb, lsb, inverted" (identifier) "value" (,) "," (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" ()) ")" (return_statement) "return encodeLogicalImmediate<16>(hsb, lsb, inverted);" (return) "return" (binary_expression) "encodeLogicalImmediate<16>(hsb, lsb, inverted)" (binary_expression) "encodeLogicalImmediate<16" (identifier) "encodeLogicalImmediate" (<) "<" (number_literal) "16" (>) ">" (parenthesized_expression) "(hsb, lsb, inverted)" (() "(" (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" (;) ";" (if_statement) "if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;" (if) "if" (parenthesized_expression) "((value & 0xff) != (value >> 8))" (() "(" (binary_expression) "(value & 0xff) != (value >> 8)" (parenthesized_expression) "(value & 0xff)" (() "(" (binary_expression) "value & 0xff" (identifier) "value" (&) "&" (number_literal) "0xff" ()) ")" (!=) "!=" (parenthesized_expression) "(value >> 8)" (() "(" (binary_expression) "value >> 8" (identifier) "value" (>>) ">>" (number_literal) "8" ()) ")" ()) ")" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (expression_statement) "value &= 0xff;" (assignment_expression) "value &= 0xff" (identifier) "value" (&=) "&=" (number_literal) "0xff" (;) ";" (if_statement) "if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);" (if) "if" (parenthesized_expression) "(findBitRange<8>(value, hsb, lsb, inverted))" (() "(" (binary_expression) "findBitRange<8>(value, hsb, lsb, inverted)" (binary_expression) "findBitRange<8" (identifier) "findBitRange" (<) "<" (number_literal) "8" (>) ">" (parenthesized_expression) "(value, hsb, lsb, inverted)" (() "(" (comma_expression) "value, hsb, lsb, inverted" (identifier) "value" (,) "," (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" ()) ")" (return_statement) "return encodeLogicalImmediate<8>(hsb, lsb, inverted);" (return) "return" (binary_expression) "encodeLogicalImmediate<8>(hsb, lsb, inverted)" (binary_expression) "encodeLogicalImmediate<8" (identifier) "encodeLogicalImmediate" (<) "<" (number_literal) "8" (>) ">" (parenthesized_expression) "(hsb, lsb, inverted)" (() "(" (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" (;) ";" (if_statement) "if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;" (if) "if" (parenthesized_expression) "((value & 0xf) != (value >> 4))" (() "(" (binary_expression) "(value & 0xf) != (value >> 4)" (parenthesized_expression) "(value & 0xf)" (() "(" (binary_expression) "value & 0xf" (identifier) "value" (&) "&" (number_literal) "0xf" ()) ")" (!=) "!=" (parenthesized_expression) "(value >> 4)" (() "(" (binary_expression) "value >> 4" (identifier) "value" (>>) ">>" (number_literal) "4" ()) ")" ()) ")" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (expression_statement) "value &= 0xf;" (assignment_expression) "value &= 0xf" (identifier) "value" (&=) "&=" (number_literal) "0xf" (;) ";" (if_statement) "if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);" (if) "if" (parenthesized_expression) "(findBitRange<4>(value, hsb, lsb, inverted))" (() "(" (binary_expression) "findBitRange<4>(value, hsb, lsb, inverted)" (binary_expression) "findBitRange<4" (identifier) "findBitRange" (<) "<" (number_literal) "4" (>) ">" (parenthesized_expression) "(value, hsb, lsb, inverted)" (() "(" (comma_expression) "value, hsb, lsb, inverted" (identifier) "value" (,) "," (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" ()) ")" (return_statement) "return encodeLogicalImmediate<4>(hsb, lsb, inverted);" (return) "return" (binary_expression) "encodeLogicalImmediate<4>(hsb, lsb, inverted)" (binary_expression) "encodeLogicalImmediate<4" (identifier) "encodeLogicalImmediate" (<) "<" (number_literal) "4" (>) ">" (parenthesized_expression) "(hsb, lsb, inverted)" (() "(" (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" (;) ";" (if_statement) "if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;" (if) "if" (parenthesized_expression) "((value & 0x3) != (value >> 2))" (() "(" (binary_expression) "(value & 0x3) != (value >> 2)" (parenthesized_expression) "(value & 0x3)" (() "(" (binary_expression) "value & 0x3" (identifier) "value" (&) "&" (number_literal) "0x3" ()) ")" (!=) "!=" (parenthesized_expression) "(value >> 2)" (() "(" (binary_expression) "value >> 2" (identifier) "value" (>>) ">>" (number_literal) "2" ()) ")" ()) ")" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (expression_statement) "value &= 0x3;" (assignment_expression) "value &= 0x3" (identifier) "value" (&=) "&=" (number_literal) "0x3" (;) ";" (if_statement) "if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);" (if) "if" (parenthesized_expression) "(findBitRange<2>(value, hsb, lsb, inverted))" (() "(" (binary_expression) "findBitRange<2>(value, hsb, lsb, inverted)" (binary_expression) "findBitRange<2" (identifier) "findBitRange" (<) "<" (number_literal) "2" (>) ">" (parenthesized_expression) "(value, hsb, lsb, inverted)" (() "(" (comma_expression) "value, hsb, lsb, inverted" (identifier) "value" (,) "," (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" ()) ")" (return_statement) "return encodeLogicalImmediate<2>(hsb, lsb, inverted);" (return) "return" (binary_expression) "encodeLogicalImmediate<2>(hsb, lsb, inverted)" (binary_expression) "encodeLogicalImmediate<2" (identifier) "encodeLogicalImmediate" (<) "<" (number_literal) "2" (>) ">" (parenthesized_expression) "(hsb, lsb, inverted)" (() "(" (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" (;) ";" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (}) "}" (function_definition) "static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }" (storage_class_specifier) "static" (static) "static" (type_identifier) "ARM64LogicalImmediate" (function_declarator) "create64(uint64_t value)" (identifier) "create64" (parameter_list) "(uint64_t value)" (() "(" (parameter_declaration) "uint64_t value" (primitive_type) "uint64_t" (identifier) "value" ()) ")" (compound_statement) "{\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }" ({) "{" (comment) "// Check for 0, -1 - these cannot be encoded." (if_statement) "if (!value || !~value)\n return InvalidLogicalImmediate;" (if) "if" (parenthesized_expression) "(!value || !~value)" (() "(" (binary_expression) "!value || !~value" (unary_expression) "!value" (!) "!" (identifier) "value" (||) "||" (unary_expression) "!~value" (!) "!" (unary_expression) "~value" (~) "~" (identifier) "value" ()) ")" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (comment) "// Look for a contiguous bit range." (declaration) "unsigned hsb, lsb;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "hsb" (,) "," (identifier) "lsb" (;) ";" (declaration) "bool inverted;" (primitive_type) "bool" (identifier) "inverted" (;) ";" (if_statement) "if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);" (if) "if" (parenthesized_expression) "(findBitRange<64>(value, hsb, lsb, inverted))" (() "(" (binary_expression) "findBitRange<64>(value, hsb, lsb, inverted)" (binary_expression) "findBitRange<64" (identifier) "findBitRange" (<) "<" (number_literal) "64" (>) ">" (parenthesized_expression) "(value, hsb, lsb, inverted)" (() "(" (comma_expression) "value, hsb, lsb, inverted" (identifier) "value" (,) "," (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" ()) ")" (return_statement) "return encodeLogicalImmediate<64>(hsb, lsb, inverted);" (return) "return" (binary_expression) "encodeLogicalImmediate<64>(hsb, lsb, inverted)" (binary_expression) "encodeLogicalImmediate<64" (identifier) "encodeLogicalImmediate" (<) "<" (number_literal) "64" (>) ">" (parenthesized_expression) "(hsb, lsb, inverted)" (() "(" (comma_expression) "hsb, lsb, inverted" (identifier) "hsb" (,) "," (comma_expression) "lsb, inverted" (identifier) "lsb" (,) "," (identifier) "inverted" ()) ")" (;) ";" (comment) "// If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern." (if_statement) "if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));" (if) "if" (parenthesized_expression) "(static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))" (() "(" (binary_expression) "static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32)" (binary_expression) "static_cast<uint32_t>(value)" (binary_expression) "static_cast<uint32_t" (identifier) "static_cast" (<) "<" (identifier) "uint32_t" (>) ">" (parenthesized_expression) "(value)" (() "(" (identifier) "value" ()) ")" (==) "==" (binary_expression) "static_cast<uint32_t>(value >> 32)" (binary_expression) "static_cast<uint32_t" (identifier) "static_cast" (<) "<" (identifier) "uint32_t" (>) ">" (parenthesized_expression) "(value >> 32)" (() "(" (binary_expression) "value >> 32" (identifier) "value" (>>) ">>" (number_literal) "32" ()) ")" ()) ")" (return_statement) "return create32(static_cast<uint32_t>(value));" (return) "return" (call_expression) "create32(static_cast<uint32_t>(value))" (identifier) "create32" (argument_list) "(static_cast<uint32_t>(value))" (() "(" (binary_expression) "static_cast<uint32_t>(value)" (binary_expression) "static_cast<uint32_t" (identifier) "static_cast" (<) "<" (identifier) "uint32_t" (>) ">" (parenthesized_expression) "(value)" (() "(" (identifier) "value" ()) ")" ()) ")" (;) ";" (return_statement) "return InvalidLogicalImmediate;" (return) "return" (identifier) "InvalidLogicalImmediate" (;) ";" (}) "}" (function_definition) "int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }" (primitive_type) "int" (function_declarator) "value()" (identifier) "value" (parameter_list) "()" (() "(" ()) ")" (declaration) "const\n {\n ASSERT(isValid());" (type_qualifier) "const" (const) "const" (ERROR) "{" ({) "{" (type_identifier) "ASSERT" (parenthesized_declarator) "(isValid())" (() "(" (function_declarator) "isValid()" (identifier) "isValid" (parameter_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "return m_value;" (type_identifier) "return" (identifier) "m_value" (;) ";" (ERROR) "}\n\n bool isValid() const" (}) "}" (primitive_type) "bool" (function_declarator) "isValid() const" (identifier) "isValid" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n return m_value != InvalidLogicalImmediate;\n }" ({) "{" (return_statement) "return m_value != InvalidLogicalImmediate;" (return) "return" (binary_expression) "m_value != InvalidLogicalImmediate" (identifier) "m_value" (!=) "!=" (identifier) "InvalidLogicalImmediate" (;) ";" (}) "}" (ERROR) "bool is64bit() const" (primitive_type) "bool" (function_declarator) "is64bit()" (identifier) "is64bit" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return m_value & (1 << 12);\n }" ({) "{" (return_statement) "return m_value & (1 << 12);" (return) "return" (binary_expression) "m_value & (1 << 12)" (identifier) "m_value" (&) "&" (parenthesized_expression) "(1 << 12)" (() "(" (binary_expression) "1 << 12" (number_literal) "1" (<<) "<<" (number_literal) "12" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }" (statement_identifier) "private" (:) ":" (ERROR) "ARM64LogicalImmediate(int value)\n : m_value(value)" (macro_type_specifier) "ARM64LogicalImmediate(int value)" (identifier) "ARM64LogicalImmediate" (() "(" (ERROR) "int" (primitive_type) "int" (type_descriptor) "value" (type_identifier) "value" ()) ")" (ERROR) ":" (:) ":" (function_declarator) "m_value(value)" (identifier) "m_value" (parameter_list) "(value)" (() "(" (parameter_declaration) "value" (type_identifier) "value" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "// Generate a mask with bits in the range hsb..0 set, for example:" (comment) "// hsb:63 = 0xffffffffffffffff" (comment) "// hsb:42 = 0x000007ffffffffff" (comment) "// hsb: 0 = 0x0000000000000001" (function_definition) "static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint64_t" (function_declarator) "mask(unsigned hsb)" (identifier) "mask" (parameter_list) "(unsigned hsb)" (() "(" (parameter_declaration) "unsigned hsb" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "hsb" ()) ")" (compound_statement) "{\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }" ({) "{" (expression_statement) "ASSERT(hsb < 64);" (call_expression) "ASSERT(hsb < 64)" (identifier) "ASSERT" (argument_list) "(hsb < 64)" (() "(" (binary_expression) "hsb < 64" (identifier) "hsb" (<) "<" (number_literal) "64" ()) ")" (;) ";" (return_statement) "return 0xffffffffffffffffull >> (63 - hsb);" (return) "return" (binary_expression) "0xffffffffffffffffull >> (63 - hsb)" (number_literal) "0xffffffffffffffffull" (>>) ">>" (parenthesized_expression) "(63 - hsb)" (() "(" (binary_expression) "63 - hsb" (number_literal) "63" (-) "-" (identifier) "hsb" ()) ")" (;) ";" (}) "}" (expression_statement) "template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)" (binary_expression) "template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)" (binary_expression) "template<unsigned" (identifier) "template" (<) "<" (identifier) "unsigned" (ERROR) "N" (identifier) "N" (>) ">" (ERROR) "static void" (identifier) "static" (identifier) "void" (call_expression) "partialHSB(uint64_t& value, unsigned&result)" (identifier) "partialHSB" (argument_list) "(uint64_t& value, unsigned&result)" (() "(" (binary_expression) "uint64_t& value" (identifier) "uint64_t" (&) "&" (identifier) "value" (,) "," (binary_expression) "unsigned&result" (identifier) "unsigned" (&) "&" (identifier) "result" ()) ")" (;) "" (compound_statement) "{\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }" ({) "{" (if_statement) "if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }" (if) "if" (parenthesized_expression) "(value & (0xffffffffffffffffull << N))" (() "(" (binary_expression) "value & (0xffffffffffffffffull << N)" (identifier) "value" (&) "&" (parenthesized_expression) "(0xffffffffffffffffull << N)" (() "(" (binary_expression) "0xffffffffffffffffull << N" (number_literal) "0xffffffffffffffffull" (<<) "<<" (identifier) "N" ()) ")" ()) ")" (compound_statement) "{\n result += N;\n value >>= N;\n }" ({) "{" (expression_statement) "result += N;" (assignment_expression) "result += N" (identifier) "result" (+=) "+=" (identifier) "N" (;) ";" (expression_statement) "value >>= N;" (assignment_expression) "value >>= N" (identifier) "value" (>>=) ">>=" (identifier) "N" (;) ";" (}) "}" (}) "}" (comment) "// Find the bit number of the highest bit set in a non-zero value, for example:" (comment) "// 0x8080808080808080 = hsb:63" (comment) "// 0x0000000000000001 = hsb: 0" (comment) "// 0x000007ffffe00000 = hsb:42" (function_definition) "static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }" (storage_class_specifier) "static" (static) "static" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "highestSetBit(uint64_t value)" (identifier) "highestSetBit" (parameter_list) "(uint64_t value)" (() "(" (parameter_declaration) "uint64_t value" (primitive_type) "uint64_t" (identifier) "value" ()) ")" (compound_statement) "{\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }" ({) "{" (expression_statement) "ASSERT(value);" (call_expression) "ASSERT(value)" (identifier) "ASSERT" (argument_list) "(value)" (() "(" (identifier) "value" ()) ")" (;) ";" (declaration) "unsigned hsb = 0;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (init_declarator) "hsb = 0" (identifier) "hsb" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "partialHSB<32>(value, hsb);" (binary_expression) "partialHSB<32>(value, hsb)" (binary_expression) "partialHSB<32" (identifier) "partialHSB" (<) "<" (number_literal) "32" (>) ">" (parenthesized_expression) "(value, hsb)" (() "(" (comma_expression) "value, hsb" (identifier) "value" (,) "," (identifier) "hsb" ()) ")" (;) ";" (expression_statement) "partialHSB<16>(value, hsb);" (binary_expression) "partialHSB<16>(value, hsb)" (binary_expression) "partialHSB<16" (identifier) "partialHSB" (<) "<" (number_literal) "16" (>) ">" (parenthesized_expression) "(value, hsb)" (() "(" (comma_expression) "value, hsb" (identifier) "value" (,) "," (identifier) "hsb" ()) ")" (;) ";" (expression_statement) "partialHSB<8>(value, hsb);" (binary_expression) "partialHSB<8>(value, hsb)" (binary_expression) "partialHSB<8" (identifier) "partialHSB" (<) "<" (number_literal) "8" (>) ">" (parenthesized_expression) "(value, hsb)" (() "(" (comma_expression) "value, hsb" (identifier) "value" (,) "," (identifier) "hsb" ()) ")" (;) ";" (expression_statement) "partialHSB<4>(value, hsb);" (binary_expression) "partialHSB<4>(value, hsb)" (binary_expression) "partialHSB<4" (identifier) "partialHSB" (<) "<" (number_literal) "4" (>) ">" (parenthesized_expression) "(value, hsb)" (() "(" (comma_expression) "value, hsb" (identifier) "value" (,) "," (identifier) "hsb" ()) ")" (;) ";" (expression_statement) "partialHSB<2>(value, hsb);" (binary_expression) "partialHSB<2>(value, hsb)" (binary_expression) "partialHSB<2" (identifier) "partialHSB" (<) "<" (number_literal) "2" (>) ">" (parenthesized_expression) "(value, hsb)" (() "(" (comma_expression) "value, hsb" (identifier) "value" (,) "," (identifier) "hsb" ()) ")" (;) ";" (expression_statement) "partialHSB<1>(value, hsb);" (binary_expression) "partialHSB<1>(value, hsb)" (binary_expression) "partialHSB<1" (identifier) "partialHSB" (<) "<" (number_literal) "1" (>) ">" (parenthesized_expression) "(value, hsb)" (() "(" (comma_expression) "value, hsb" (identifier) "value" (,) "," (identifier) "hsb" ()) ")" (;) ";" (return_statement) "return hsb;" (return) "return" (identifier) "hsb" (;) ";" (}) "}" (comment) "// This function takes a value and a bit width, where value obeys the following constraints:" (comment) "// * bits outside of the width of the value must be zero." (comment) "// * bits within the width of value must neither be all clear or all set." (comment) "// The input is inspected to detect values that consist of either two or three contiguous" (comment) "// ranges of bits. The output range hsb..lsb will describe the second range of the value." (comment) "// if the range is set, inverted will be false, and if the range is clear, inverted will" (comment) "// be true. For example (with width 8):" (comment) "// 00001111 = hsb:3, lsb:0, inverted:false" (comment) "// 11110000 = hsb:3, lsb:0, inverted:true" (comment) "// 00111100 = hsb:5, lsb:2, inverted:false" (comment) "// 11000011 = hsb:5, lsb:2, inverted:true" (expression_statement) "template<unsigned width>\n static" (binary_expression) "template<unsigned width>\n static" (binary_expression) "template<unsigned" (identifier) "template" (<) "<" (identifier) "unsigned" (ERROR) "width" (identifier) "width" (>) ">" (identifier) "static" (;) "" (function_definition) "bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }" (primitive_type) "bool" (function_declarator) "findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)" (identifier) "findBitRange" (parameter_list) "(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)" (() "(" (parameter_declaration) "uint64_t value" (primitive_type) "uint64_t" (identifier) "value" (,) "," (parameter_declaration) "unsigned& hsb" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (ERROR) "&" (&) "&" (identifier) "hsb" (,) "," (parameter_declaration) "unsigned& lsb" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (ERROR) "&" (&) "&" (identifier) "lsb" (,) "," (parameter_declaration) "bool& inverted" (primitive_type) "bool" (ERROR) "&" (&) "&" (identifier) "inverted" ()) ")" (compound_statement) "{\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }" ({) "{" (expression_statement) "ASSERT(value & mask(width - 1));" (call_expression) "ASSERT(value & mask(width - 1))" (identifier) "ASSERT" (argument_list) "(value & mask(width - 1))" (() "(" (binary_expression) "value & mask(width - 1)" (identifier) "value" (&) "&" (call_expression) "mask(width - 1)" (identifier) "mask" (argument_list) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" ()) ")" (;) ";" (expression_statement) "ASSERT(value != mask(width - 1));" (call_expression) "ASSERT(value != mask(width - 1))" (identifier) "ASSERT" (argument_list) "(value != mask(width - 1))" (() "(" (binary_expression) "value != mask(width - 1)" (identifier) "value" (!=) "!=" (call_expression) "mask(width - 1)" (identifier) "mask" (argument_list) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" ()) ")" (;) ";" (expression_statement) "ASSERT(!(value & ~mask(width - 1)));" (call_expression) "ASSERT(!(value & ~mask(width - 1)))" (identifier) "ASSERT" (argument_list) "(!(value & ~mask(width - 1)))" (() "(" (unary_expression) "!(value & ~mask(width - 1))" (!) "!" (parenthesized_expression) "(value & ~mask(width - 1))" (() "(" (binary_expression) "value & ~mask(width - 1)" (identifier) "value" (&) "&" (unary_expression) "~mask(width - 1)" (~) "~" (call_expression) "mask(width - 1)" (identifier) "mask" (argument_list) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" ()) ")" ()) ")" (;) ";" (comment) "// Detect cases where the top bit is set; if so, flip all the bits & set invert." (comment) "// This halves the number of patterns we need to look for." (declaration) "const uint64_t msb = 1ull << (width - 1);" (type_qualifier) "const" (const) "const" (primitive_type) "uint64_t" (init_declarator) "msb = 1ull << (width - 1)" (identifier) "msb" (=) "=" (binary_expression) "1ull << (width - 1)" (number_literal) "1ull" (<<) "<<" (parenthesized_expression) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" (;) ";" (if_statement) "if ((inverted = (value & msb)))\n value ^= mask(width - 1);" (if) "if" (parenthesized_expression) "((inverted = (value & msb)))" (() "(" (parenthesized_expression) "(inverted = (value & msb))" (() "(" (assignment_expression) "inverted = (value & msb)" (identifier) "inverted" (=) "=" (parenthesized_expression) "(value & msb)" (() "(" (binary_expression) "value & msb" (identifier) "value" (&) "&" (identifier) "msb" ()) ")" ()) ")" ()) ")" (expression_statement) "value ^= mask(width - 1);" (assignment_expression) "value ^= mask(width - 1)" (identifier) "value" (^=) "^=" (call_expression) "mask(width - 1)" (identifier) "mask" (argument_list) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" (;) ";" (comment) "// Find the highest set bit in value, generate a corresponding mask & flip all" (comment) "// bits under it." (expression_statement) "hsb = highestSetBit(value);" (assignment_expression) "hsb = highestSetBit(value)" (identifier) "hsb" (=) "=" (call_expression) "highestSetBit(value)" (identifier) "highestSetBit" (argument_list) "(value)" (() "(" (identifier) "value" ()) ")" (;) ";" (expression_statement) "value ^= mask(hsb);" (assignment_expression) "value ^= mask(hsb)" (identifier) "value" (^=) "^=" (call_expression) "mask(hsb)" (identifier) "mask" (argument_list) "(hsb)" (() "(" (identifier) "hsb" ()) ")" (;) ";" (if_statement) "if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }" (if) "if" (parenthesized_expression) "(!value)" (() "(" (unary_expression) "!value" (!) "!" (identifier) "value" ()) ")" (compound_statement) "{\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }" ({) "{" (comment) "// If this cleared the value, then the range hsb..0 was all set." (expression_statement) "lsb = 0;" (assignment_expression) "lsb = 0" (identifier) "lsb" (=) "=" (number_literal) "0" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (comment) "// Try making one more mask, and flipping the bits!" (expression_statement) "lsb = highestSetBit(value);" (assignment_expression) "lsb = highestSetBit(value)" (identifier) "lsb" (=) "=" (call_expression) "highestSetBit(value)" (identifier) "highestSetBit" (argument_list) "(value)" (() "(" (identifier) "value" ()) ")" (;) ";" (expression_statement) "value ^= mask(lsb);" (assignment_expression) "value ^= mask(lsb)" (identifier) "value" (^=) "^=" (call_expression) "mask(lsb)" (identifier) "mask" (argument_list) "(lsb)" (() "(" (identifier) "lsb" ()) ")" (;) ";" (if_statement) "if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }" (if) "if" (parenthesized_expression) "(!value)" (() "(" (unary_expression) "!value" (!) "!" (identifier) "value" ()) ")" (compound_statement) "{\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }" ({) "{" (comment) "// Success - but lsb actually points to the hsb of a third range - add one" (comment) "// to get to the lsb of the mid range." (expression_statement) "++lsb;" (update_expression) "++lsb" (++) "++" (identifier) "lsb" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (comment) "// Encodes the set of immN:immr:imms fields found in a logical immediate." (expression_statement) "template<unsigned width>\n static" (binary_expression) "template<unsigned width>\n static" (binary_expression) "template<unsigned" (identifier) "template" (<) "<" (identifier) "unsigned" (ERROR) "width" (identifier) "width" (>) ">" (identifier) "static" (;) "" (function_definition) "int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }" (primitive_type) "int" (function_declarator) "encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)" (identifier) "encodeLogicalImmediate" (parameter_list) "(unsigned hsb, unsigned lsb, bool inverted)" (() "(" (parameter_declaration) "unsigned hsb" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "hsb" (,) "," (parameter_declaration) "unsigned lsb" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "lsb" (,) "," (parameter_declaration) "bool inverted" (primitive_type) "bool" (identifier) "inverted" ()) ")" (compound_statement) "{\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }" ({) "{" (comment) "// Check width is a power of 2!" (expression_statement) "ASSERT(!(width & (width -1)));" (call_expression) "ASSERT(!(width & (width -1)))" (identifier) "ASSERT" (argument_list) "(!(width & (width -1)))" (() "(" (unary_expression) "!(width & (width -1))" (!) "!" (parenthesized_expression) "(width & (width -1))" (() "(" (binary_expression) "width & (width -1)" (identifier) "width" (&) "&" (parenthesized_expression) "(width -1)" (() "(" (binary_expression) "width -1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" ()) ")" ()) ")" (;) ";" (expression_statement) "ASSERT(width <= 64 && width >= 2);" (call_expression) "ASSERT(width <= 64 && width >= 2)" (identifier) "ASSERT" (argument_list) "(width <= 64 && width >= 2)" (() "(" (binary_expression) "width <= 64 && width >= 2" (binary_expression) "width <= 64" (identifier) "width" (<=) "<=" (number_literal) "64" (&&) "&&" (binary_expression) "width >= 2" (identifier) "width" (>=) ">=" (number_literal) "2" ()) ")" (;) ";" (expression_statement) "ASSERT(hsb >= lsb);" (call_expression) "ASSERT(hsb >= lsb)" (identifier) "ASSERT" (argument_list) "(hsb >= lsb)" (() "(" (binary_expression) "hsb >= lsb" (identifier) "hsb" (>=) ">=" (identifier) "lsb" ()) ")" (;) ";" (expression_statement) "ASSERT(hsb < width);" (call_expression) "ASSERT(hsb < width)" (identifier) "ASSERT" (argument_list) "(hsb < width)" (() "(" (binary_expression) "hsb < width" (identifier) "hsb" (<) "<" (identifier) "width" ()) ")" (;) ";" (declaration) "int immN = 0;" (primitive_type) "int" (init_declarator) "immN = 0" (identifier) "immN" (=) "=" (number_literal) "0" (;) ";" (declaration) "int imms = 0;" (primitive_type) "int" (init_declarator) "imms = 0" (identifier) "imms" (=) "=" (number_literal) "0" (;) ";" (declaration) "int immr = 0;" (primitive_type) "int" (init_declarator) "immr = 0" (identifier) "immr" (=) "=" (number_literal) "0" (;) ";" (comment) "// For 64-bit values this is easy - just set immN to true, and imms just" (comment) "// contains the bit number of the highest set bit of the set range. For" (comment) "// values with narrower widths, these are encoded by a leading set of" (comment) "// one bits, followed by a zero bit, followed by the remaining set of bits" (comment) "// being the high bit of the range. For a 32-bit immediate there are no" (comment) "// leading one bits, just a zero followed by a five bit number. For a" (comment) "// 16-bit immediate there is one one bit, a zero bit, and then a four bit" (comment) "// bit-position, etc." (if_statement) "if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);" (if) "if" (parenthesized_expression) "(width == 64)" (() "(" (binary_expression) "width == 64" (identifier) "width" (==) "==" (number_literal) "64" ()) ")" (expression_statement) "immN = 1;" (assignment_expression) "immN = 1" (identifier) "immN" (=) "=" (number_literal) "1" (;) ";" (else_clause) "else\n imms = 63 & ~(width + width - 1);" (else) "else" (expression_statement) "imms = 63 & ~(width + width - 1);" (assignment_expression) "imms = 63 & ~(width + width - 1)" (identifier) "imms" (=) "=" (binary_expression) "63 & ~(width + width - 1)" (number_literal) "63" (&) "&" (unary_expression) "~(width + width - 1)" (~) "~" (parenthesized_expression) "(width + width - 1)" (() "(" (binary_expression) "width + width - 1" (binary_expression) "width + width" (identifier) "width" (+) "+" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" (;) ";" (if_statement) "if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }" (if) "if" (parenthesized_expression) "(inverted)" (() "(" (identifier) "inverted" ()) ")" (compound_statement) "{\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n }" ({) "{" (comment) "// if width is 64 & hsb is 62, then we have a value something like:" (comment) "// 0x80000000ffffffff (in this case with lsb 32)." (comment) "// The ror should be by 1, imms (effectively set width minus 1) is" (comment) "// 32. Set width is full width minus cleared width." (expression_statement) "immr = (width - 1) - hsb;" (assignment_expression) "immr = (width - 1) - hsb" (identifier) "immr" (=) "=" (binary_expression) "(width - 1) - hsb" (parenthesized_expression) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" (-) "-" (identifier) "hsb" (;) ";" (expression_statement) "imms |= (width - ((hsb - lsb) + 1)) - 1;" (assignment_expression) "imms |= (width - ((hsb - lsb) + 1)) - 1" (identifier) "imms" (|=) "|=" (binary_expression) "(width - ((hsb - lsb) + 1)) - 1" (parenthesized_expression) "(width - ((hsb - lsb) + 1))" (() "(" (binary_expression) "width - ((hsb - lsb) + 1)" (identifier) "width" (-) "-" (parenthesized_expression) "((hsb - lsb) + 1)" (() "(" (binary_expression) "(hsb - lsb) + 1" (parenthesized_expression) "(hsb - lsb)" (() "(" (binary_expression) "hsb - lsb" (identifier) "hsb" (-) "-" (identifier) "lsb" ()) ")" (+) "+" (number_literal) "1" ()) ")" ()) ")" (-) "-" (number_literal) "1" (;) ";" (}) "}" (else_clause) "else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }" (else) "else" (compound_statement) "{\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }" ({) "{" (comment) "// if width is 64 & hsb is 62, then we have a value something like:" (comment) "// 0x7fffffff00000000 (in this case with lsb 32)." (comment) "// The value is effectively rol'ed by lsb, which is equivalent to" (comment) "// a ror by width - lsb (or 0, in the case where lsb is 0). imms" (comment) "// is hsb - lsb." (expression_statement) "immr = (width - lsb) & (width - 1);" (assignment_expression) "immr = (width - lsb) & (width - 1)" (identifier) "immr" (=) "=" (binary_expression) "(width - lsb) & (width - 1)" (parenthesized_expression) "(width - lsb)" (() "(" (binary_expression) "width - lsb" (identifier) "width" (-) "-" (identifier) "lsb" ()) ")" (&) "&" (parenthesized_expression) "(width - 1)" (() "(" (binary_expression) "width - 1" (identifier) "width" (-) "-" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "imms |= hsb - lsb;" (assignment_expression) "imms |= hsb - lsb" (identifier) "imms" (|=) "|=" (binary_expression) "hsb - lsb" (identifier) "hsb" (-) "-" (identifier) "lsb" (;) ";" (}) "}" (return_statement) "return immN << 12 | immr << 6 | imms;" (return) "return" (binary_expression) "immN << 12 | immr << 6 | imms" (binary_expression) "immN << 12 | immr << 6" (binary_expression) "immN << 12" (identifier) "immN" (<<) "<<" (number_literal) "12" (|) "|" (binary_expression) "immr << 6" (identifier) "immr" (<<) "<<" (number_literal) "6" (|) "|" (identifier) "imms" (;) ";" (}) "}" (declaration) "static const int InvalidLogicalImmediate = -1;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "InvalidLogicalImmediate = -1" (identifier) "InvalidLogicalImmediate" (=) "=" (number_literal) "-1" (;) ";" (declaration) "int m_value;" (primitive_type) "int" (identifier) "m_value" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace JSC."
1,672
19
{"language": "c", "success": true, "metadata": {"lines": 242, "avg_line_length": 37.09, "nodes": 1042, "errors": 0, "source_hash": "6ae8e509a52e81956230c2fc7140d876989f4d6b0955fdf76080451911622edb", "categorized_nodes": 779}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 12}}, {"id": 3, "type": "function_definition", "text": "namespace JSC {\n\nALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}\n\nALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}\n\ntemplate<typename Type>\nALWAYS_INLINE bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}\n\ntemplate<int datasize>\nALWAYS_INLINE bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}\n\nALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}\n\nclass ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n};\n\n}", "parent": null, "children": [4, 5], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 282, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "namespace", "parent": 3, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 5, "type": "identifier", "text": "JSC", "parent": 3, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 13}}, {"id": 6, "type": "function_definition", "text": "ALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}", "parent": 3, "children": [7, 8, 10], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "ALWAYS_INLINE", "parent": 6, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 13}}, {"id": 8, "type": "ERROR", "text": "bool", "parent": 6, "children": [9], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 18}}, {"id": 9, "type": "identifier", "text": "bool", "parent": 8, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 18}}, {"id": 10, "type": "function_declarator", "text": "isIOS()", "parent": 6, "children": [11, 12], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 26}}, {"id": 11, "type": "identifier", "text": "isIOS", "parent": 10, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 24}}, {"id": 12, "type": "parameter_list", "text": "()", "parent": 10, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 26}}, {"id": 13, "type": "preproc_if", "text": "#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif", "parent": 6, "children": [14, 15, 19, 20, 22, 26], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 14, "type": "#if", "text": "#if", "parent": 13, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 3}}, {"id": 15, "type": "call_expression", "text": "PLATFORM(IOS)", "parent": 13, "children": [16, 17], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 17}}, {"id": 16, "type": "identifier", "text": "PLATFORM", "parent": 15, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 12}}, {"id": 17, "type": "argument_list", "text": "(IOS)", "parent": 15, "children": [18], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 17}}, {"id": 18, "type": "identifier", "text": "IOS", "parent": 17, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 16}}, {"id": 19, "type": "\n", "text": "\n", "parent": 13, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 25, "column": 0}}, {"id": 20, "type": "return_statement", "text": "return true;", "parent": 13, "children": [21], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 16}}, {"id": 21, "type": "true", "text": "true", "parent": 20, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 15}}, {"id": 22, "type": "preproc_else", "text": "#else\n return false;", "parent": 13, "children": [23, 24], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 17}}, {"id": 23, "type": "#else", "text": "#else", "parent": 22, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 5}}, {"id": 24, "type": "return_statement", "text": "return false;", "parent": 22, "children": [25], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 17}}, {"id": 25, "type": "false", "text": "false", "parent": 24, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 16}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 13, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 27, "type": "function_definition", "text": "ALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}", "parent": 3, "children": [28, 29, 31], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 28, "type": "type_identifier", "text": "ALWAYS_INLINE", "parent": 27, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 13}}, {"id": 29, "type": "ERROR", "text": "bool", "parent": 27, "children": [30], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 18}}, {"id": 30, "type": "identifier", "text": "bool", "parent": 29, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 18}}, {"id": 31, "type": "function_declarator", "text": "isInt9(int32_t value)", "parent": 27, "children": [32, 33], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 40}}, {"id": 32, "type": "identifier", "text": "isInt9", "parent": 31, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 25}}, {"id": 33, "type": "parameter_list", "text": "(int32_t value)", "parent": 31, "children": [34], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 40}}, {"id": 34, "type": "parameter_declaration", "text": "int32_t value", "parent": 33, "children": [35, 36], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 39}}, {"id": 35, "type": "primitive_type", "text": "int32_t", "parent": 34, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 33}}, {"id": 36, "type": "identifier", "text": "value", "parent": 34, "children": [], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 39}}, {"id": 37, "type": "return_statement", "text": "return value == ((value << 23) >> 23);", "parent": 27, "children": [38], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 42}}, {"id": 38, "type": "binary_expression", "text": "value == ((value << 23) >> 23)", "parent": 37, "children": [39, 40, 41], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 41}}, {"id": 39, "type": "identifier", "text": "value", "parent": 38, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 16}}, {"id": 40, "type": "==", "text": "==", "parent": 38, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 19}}, {"id": 41, "type": "parenthesized_expression", "text": "((value << 23) >> 23)", "parent": 38, "children": [42], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 41}}, {"id": 42, "type": "binary_expression", "text": "(value << 23) >> 23", "parent": 41, "children": [43, 48, 49], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 40}}, {"id": 43, "type": "parenthesized_expression", "text": "(value << 23)", "parent": 42, "children": [44], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 34}}, {"id": 44, "type": "binary_expression", "text": "value << 23", "parent": 43, "children": [45, 46, 47], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 33}}, {"id": 45, "type": "identifier", "text": "value", "parent": 44, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 27}}, {"id": 46, "type": "<<", "text": "<<", "parent": 44, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 30}}, {"id": 47, "type": "number_literal", "text": "23", "parent": 44, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 33}}, {"id": 48, "type": ">>", "text": ">>", "parent": 42, "children": [], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 37}}, {"id": 49, "type": "number_literal", "text": "23", "parent": 42, "children": [], "start_point": {"row": 33, "column": 38}, "end_point": {"row": 33, "column": 40}}, {"id": 50, "type": "binary_expression", "text": "template<typename Type>\nALWAYS_INLINE", "parent": 3, "children": [51, 55, 57, 58], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 13}}, {"id": 51, "type": "binary_expression", "text": "template<typename", "parent": 50, "children": [52, 53, 54], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 17}}, {"id": 52, "type": "identifier", "text": "template", "parent": 51, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 53, "type": "<", "text": "<", "parent": 51, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 54, "type": "identifier", "text": "typename", "parent": 51, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 17}}, {"id": 55, "type": "ERROR", "text": "Type", "parent": 50, "children": [56], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 22}}, {"id": 56, "type": "identifier", "text": "Type", "parent": 55, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 22}}, {"id": 57, "type": ">", "text": ">", "parent": 50, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 58, "type": "identifier", "text": "ALWAYS_INLINE", "parent": 50, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 13}}, {"id": 59, "type": "function_definition", "text": "bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}", "parent": 3, "children": [60, 61], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 40, "column": 1}}, {"id": 60, "type": "primitive_type", "text": "bool", "parent": 59, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 18}}, {"id": 61, "type": "function_declarator", "text": "isUInt12(Type value)", "parent": 59, "children": [62, 63], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 39}}, {"id": 62, "type": "identifier", "text": "isUInt12", "parent": 61, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 27}}, {"id": 63, "type": "parameter_list", "text": "(Type value)", "parent": 61, "children": [64], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 39}}, {"id": 64, "type": "parameter_declaration", "text": "Type value", "parent": 63, "children": [65, 66], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 38}}, {"id": 65, "type": "type_identifier", "text": "Type", "parent": 64, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 32}}, {"id": 66, "type": "identifier", "text": "value", "parent": 64, "children": [], "start_point": {"row": 37, "column": 33}, "end_point": {"row": 37, "column": 38}}, {"id": 67, "type": "return_statement", "text": "return !(value & ~static_cast<Type>(0xfff));", "parent": 59, "children": [68], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 48}}, {"id": 68, "type": "unary_expression", "text": "!(value & ~static_cast<Type>(0xfff))", "parent": 67, "children": [69, 70], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 47}}, {"id": 69, "type": "!", "text": "!", "parent": 68, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 12}}, {"id": 70, "type": "parenthesized_expression", "text": "(value & ~static_cast<Type>(0xfff))", "parent": 68, "children": [71], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 47}}, {"id": 71, "type": "binary_expression", "text": "value & ~static_cast<Type>(0xfff)", "parent": 70, "children": [72, 73], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 46}}, {"id": 72, "type": "identifier", "text": "value", "parent": 71, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 18}}, {"id": 73, "type": "binary_expression", "text": "~static_cast<Type>(0xfff)", "parent": 71, "children": [74, 80, 81], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 46}}, {"id": 74, "type": "binary_expression", "text": "~static_cast<Type", "parent": 73, "children": [75, 78, 79], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 38}}, {"id": 75, "type": "unary_expression", "text": "~static_cast", "parent": 74, "children": [76, 77], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 33}}, {"id": 76, "type": "~", "text": "~", "parent": 75, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 22}}, {"id": 77, "type": "identifier", "text": "static_cast", "parent": 75, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 33}}, {"id": 78, "type": "<", "text": "<", "parent": 74, "children": [], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 34}}, {"id": 79, "type": "identifier", "text": "Type", "parent": 74, "children": [], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 38}}, {"id": 80, "type": ">", "text": ">", "parent": 73, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 39}}, {"id": 81, "type": "parenthesized_expression", "text": "(0xfff)", "parent": 73, "children": [82], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 46}}, {"id": 82, "type": "number_literal", "text": "0xfff", "parent": 81, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 45}}, {"id": 83, "type": "binary_expression", "text": "template<int datasize>\nALWAYS_INLINE", "parent": 3, "children": [84, 90, 91], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 13}}, {"id": 84, "type": "binary_expression", "text": "template<int datasize", "parent": 83, "children": [85, 86, 87, 89], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 21}}, {"id": 85, "type": "identifier", "text": "template", "parent": 84, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 86, "type": "<", "text": "<", "parent": 84, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 9}}, {"id": 87, "type": "ERROR", "text": "int", "parent": 84, "children": [88], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 12}}, {"id": 88, "type": "identifier", "text": "int", "parent": 87, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 12}}, {"id": 89, "type": "identifier", "text": "datasize", "parent": 84, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 21}}, {"id": 90, "type": ">", "text": ">", "parent": 83, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 22}}, {"id": 91, "type": "identifier", "text": "ALWAYS_INLINE", "parent": 83, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 13}}, {"id": 92, "type": "function_definition", "text": "bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}", "parent": 3, "children": [93, 94], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 53, "column": 1}}, {"id": 93, "type": "primitive_type", "text": "bool", "parent": 92, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 18}}, {"id": 94, "type": "function_declarator", "text": "isValidScaledUImm12(int32_t offset)", "parent": 92, "children": [95, 96], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 54}}, {"id": 95, "type": "identifier", "text": "isValidScaledUImm12", "parent": 94, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 38}}, {"id": 96, "type": "parameter_list", "text": "(int32_t offset)", "parent": 94, "children": [97], "start_point": {"row": 43, "column": 38}, "end_point": {"row": 43, "column": 54}}, {"id": 97, "type": "parameter_declaration", "text": "int32_t offset", "parent": 96, "children": [98, 99], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 53}}, {"id": 98, "type": "primitive_type", "text": "int32_t", "parent": 97, "children": [], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 46}}, {"id": 99, "type": "identifier", "text": "offset", "parent": 97, "children": [], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 53}}, {"id": 100, "type": "declaration", "text": "int32_t maxPImm = 4095 * (datasize / 8);", "parent": 92, "children": [101, 102], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 44}}, {"id": 101, "type": "primitive_type", "text": "int32_t", "parent": 100, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 102, "type": "init_declarator", "text": "maxPImm = 4095 * (datasize / 8)", "parent": 100, "children": [103, 104, 105], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 43}}, {"id": 103, "type": "identifier", "text": "maxPImm", "parent": 102, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 19}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 21}}, {"id": 105, "type": "binary_expression", "text": "4095 * (datasize / 8)", "parent": 102, "children": [106, 107, 108], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 43}}, {"id": 106, "type": "number_literal", "text": "4095", "parent": 105, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 26}}, {"id": 107, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 28}}, {"id": 108, "type": "parenthesized_expression", "text": "(datasize / 8)", "parent": 105, "children": [109], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 43}}, {"id": 109, "type": "binary_expression", "text": "datasize / 8", "parent": 108, "children": [110, 111, 112], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 42}}, {"id": 110, "type": "identifier", "text": "datasize", "parent": 109, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 38}}, {"id": 111, "type": "/", "text": "/", "parent": 109, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 40}}, {"id": 112, "type": "number_literal", "text": "8", "parent": 109, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 42}}, {"id": 113, "type": "if_statement", "text": "if (offset < 0)\n return false;", "parent": 92, "children": [114, 119], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 47, "column": 21}}, {"id": 114, "type": "parenthesized_expression", "text": "(offset < 0)", "parent": 113, "children": [115], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 19}}, {"id": 115, "type": "binary_expression", "text": "offset < 0", "parent": 114, "children": [116, 117, 118], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 18}}, {"id": 116, "type": "identifier", "text": "offset", "parent": 115, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 14}}, {"id": 117, "type": "<", "text": "<", "parent": 115, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 118, "type": "number_literal", "text": "0", "parent": 115, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 18}}, {"id": 119, "type": "return_statement", "text": "return false;", "parent": 113, "children": [120], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 21}}, {"id": 120, "type": "false", "text": "false", "parent": 119, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 20}}, {"id": 121, "type": "if_statement", "text": "if (offset > maxPImm)\n return false;", "parent": 92, "children": [122, 127], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 49, "column": 21}}, {"id": 122, "type": "parenthesized_expression", "text": "(offset > maxPImm)", "parent": 121, "children": [123], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 25}}, {"id": 123, "type": "binary_expression", "text": "offset > maxPImm", "parent": 122, "children": [124, 125, 126], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 24}}, {"id": 124, "type": "identifier", "text": "offset", "parent": 123, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 125, "type": ">", "text": ">", "parent": 123, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 16}}, {"id": 126, "type": "identifier", "text": "maxPImm", "parent": 123, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 24}}, {"id": 127, "type": "return_statement", "text": "return false;", "parent": 121, "children": [128], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 21}}, {"id": 128, "type": "false", "text": "false", "parent": 127, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 20}}, {"id": 129, "type": "if_statement", "text": "if (offset & ((datasize / 8) - 1))\n return false;", "parent": 92, "children": [130, 142], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 51, "column": 21}}, {"id": 130, "type": "parenthesized_expression", "text": "(offset & ((datasize / 8) - 1))", "parent": 129, "children": [131], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 38}}, {"id": 131, "type": "binary_expression", "text": "offset & ((datasize / 8) - 1)", "parent": 130, "children": [132, 133], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 37}}, {"id": 132, "type": "identifier", "text": "offset", "parent": 131, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 14}}, {"id": 133, "type": "parenthesized_expression", "text": "((datasize / 8) - 1)", "parent": 131, "children": [134], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 37}}, {"id": 134, "type": "binary_expression", "text": "(datasize / 8) - 1", "parent": 133, "children": [135, 140, 141], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 36}}, {"id": 135, "type": "parenthesized_expression", "text": "(datasize / 8)", "parent": 134, "children": [136], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 32}}, {"id": 136, "type": "binary_expression", "text": "datasize / 8", "parent": 135, "children": [137, 138, 139], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 31}}, {"id": 137, "type": "identifier", "text": "datasize", "parent": 136, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 27}}, {"id": 138, "type": "/", "text": "/", "parent": 136, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 29}}, {"id": 139, "type": "number_literal", "text": "8", "parent": 136, "children": [], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 31}}, {"id": 140, "type": "-", "text": "-", "parent": 134, "children": [], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 34}}, {"id": 141, "type": "number_literal", "text": "1", "parent": 134, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 36}}, {"id": 142, "type": "return_statement", "text": "return false;", "parent": 129, "children": [143], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 21}}, {"id": 143, "type": "false", "text": "false", "parent": 142, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 20}}, {"id": 144, "type": "return_statement", "text": "return true;", "parent": 92, "children": [145], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 16}}, {"id": 145, "type": "true", "text": "true", "parent": 144, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 15}}, {"id": 146, "type": "function_definition", "text": "ALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}", "parent": 3, "children": [147, 148, 150], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 147, "type": "type_identifier", "text": "ALWAYS_INLINE", "parent": 146, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 13}}, {"id": 148, "type": "ERROR", "text": "bool", "parent": 146, "children": [149], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 18}}, {"id": 149, "type": "identifier", "text": "bool", "parent": 148, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 18}}, {"id": 150, "type": "function_declarator", "text": "isValidSignedImm9(int32_t value)", "parent": 146, "children": [151, 152], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 51}}, {"id": 151, "type": "identifier", "text": "isValidSignedImm9", "parent": 150, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 36}}, {"id": 152, "type": "parameter_list", "text": "(int32_t value)", "parent": 150, "children": [153], "start_point": {"row": 55, "column": 36}, "end_point": {"row": 55, "column": 51}}, {"id": 153, "type": "parameter_declaration", "text": "int32_t value", "parent": 152, "children": [154, 155], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 50}}, {"id": 154, "type": "primitive_type", "text": "int32_t", "parent": 153, "children": [], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 44}}, {"id": 155, "type": "identifier", "text": "value", "parent": 153, "children": [], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 50}}, {"id": 156, "type": "return_statement", "text": "return isInt9(value);", "parent": 146, "children": [157], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 25}}, {"id": 157, "type": "call_expression", "text": "isInt9(value)", "parent": 156, "children": [158, 159], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 24}}, {"id": 158, "type": "identifier", "text": "isInt9", "parent": 157, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 17}}, {"id": 159, "type": "argument_list", "text": "(value)", "parent": 157, "children": [160], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 24}}, {"id": 160, "type": "identifier", "text": "value", "parent": 159, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 23}}, {"id": 161, "type": "function_definition", "text": "class ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n}", "parent": 3, "children": [162], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 280, "column": 1}}, {"id": 162, "type": "identifier", "text": "ARM64LogicalImmediate", "parent": 161, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 27}}, {"id": 163, "type": "labeled_statement", "text": "public:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }", "parent": 161, "children": [164], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 105, "column": 5}}, {"id": 164, "type": "ERROR", "text": "static ARM64LogicalImmediate create32(uint32_t value)", "parent": 163, "children": [165, 166], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 57}}, {"id": 165, "type": "type_identifier", "text": "ARM64LogicalImmediate", "parent": 164, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 32}}, {"id": 166, "type": "function_declarator", "text": "create32(uint32_t value)", "parent": 164, "children": [167, 168], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 57}}, {"id": 167, "type": "identifier", "text": "create32", "parent": 166, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 41}}, {"id": 168, "type": "parameter_list", "text": "(uint32_t value)", "parent": 166, "children": [169], "start_point": {"row": 62, "column": 41}, "end_point": {"row": 62, "column": 57}}, {"id": 169, "type": "parameter_declaration", "text": "uint32_t value", "parent": 168, "children": [170, 171], "start_point": {"row": 62, "column": 42}, "end_point": {"row": 62, "column": 56}}, {"id": 170, "type": "primitive_type", "text": "uint32_t", "parent": 169, "children": [], "start_point": {"row": 62, "column": 42}, "end_point": {"row": 62, "column": 50}}, {"id": 171, "type": "identifier", "text": "value", "parent": 169, "children": [], "start_point": {"row": 62, "column": 51}, "end_point": {"row": 62, "column": 56}}, {"id": 172, "type": "if_statement", "text": "if (!value || !~value)\n return InvalidLogicalImmediate;", "parent": 163, "children": [173, 184], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 66, "column": 43}}, {"id": 173, "type": "parenthesized_expression", "text": "(!value || !~value)", "parent": 172, "children": [174], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 30}}, {"id": 174, "type": "binary_expression", "text": "!value || !~value", "parent": 173, "children": [175, 178, 179], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 29}}, {"id": 175, "type": "unary_expression", "text": "!value", "parent": 174, "children": [176, 177], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 18}}, {"id": 176, "type": "!", "text": "!", "parent": 175, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 13}}, {"id": 177, "type": "identifier", "text": "value", "parent": 175, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 18}}, {"id": 178, "type": "||", "text": "||", "parent": 174, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 21}}, {"id": 179, "type": "unary_expression", "text": "!~value", "parent": 174, "children": [180, 181], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 29}}, {"id": 180, "type": "!", "text": "!", "parent": 179, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 23}}, {"id": 181, "type": "unary_expression", "text": "~value", "parent": 179, "children": [182, 183], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 29}}, {"id": 182, "type": "~", "text": "~", "parent": 181, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 24}}, {"id": 183, "type": "identifier", "text": "value", "parent": 181, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 29}}, {"id": 184, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 172, "children": [185], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 43}}, {"id": 185, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 184, "children": [], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 42}}, {"id": 186, "type": "declaration", "text": "unsigned hsb, lsb;", "parent": 163, "children": [187, 189, 190], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 26}}, {"id": 187, "type": "sized_type_specifier", "text": "unsigned", "parent": 186, "children": [188], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 16}}, {"id": 188, "type": "unsigned", "text": "unsigned", "parent": 187, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 16}}, {"id": 189, "type": "identifier", "text": "hsb", "parent": 186, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 20}}, {"id": 190, "type": "identifier", "text": "lsb", "parent": 186, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 25}}, {"id": 191, "type": "declaration", "text": "bool inverted;", "parent": 163, "children": [192, 193], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 22}}, {"id": 192, "type": "primitive_type", "text": "bool", "parent": 191, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 12}}, {"id": 193, "type": "identifier", "text": "inverted", "parent": 191, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 21}}, {"id": 194, "type": "if_statement", "text": "if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);", "parent": 163, "children": [195, 210], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 74, "column": 66}}, {"id": 195, "type": "parenthesized_expression", "text": "(findBitRange<32>(value, hsb, lsb, inverted))", "parent": 194, "children": [196], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 56}}, {"id": 196, "type": "binary_expression", "text": "findBitRange<32>(value, hsb, lsb, inverted)", "parent": 195, "children": [197, 201, 202], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 55}}, {"id": 197, "type": "binary_expression", "text": "findBitRange<32", "parent": 196, "children": [198, 199, 200], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 27}}, {"id": 198, "type": "identifier", "text": "findBitRange", "parent": 197, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 24}}, {"id": 199, "type": "<", "text": "<", "parent": 197, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 25}}, {"id": 200, "type": "number_literal", "text": "32", "parent": 197, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 27}}, {"id": 201, "type": ">", "text": ">", "parent": 196, "children": [], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 73, "column": 28}}, {"id": 202, "type": "parenthesized_expression", "text": "(value, hsb, lsb, inverted)", "parent": 196, "children": [203], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 55}}, {"id": 203, "type": "comma_expression", "text": "value, hsb, lsb, inverted", "parent": 202, "children": [204, 205], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 54}}, {"id": 204, "type": "identifier", "text": "value", "parent": 203, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 34}}, {"id": 205, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 203, "children": [206, 207], "start_point": {"row": 73, "column": 36}, "end_point": {"row": 73, "column": 54}}, {"id": 206, "type": "identifier", "text": "hsb", "parent": 205, "children": [], "start_point": {"row": 73, "column": 36}, "end_point": {"row": 73, "column": 39}}, {"id": 207, "type": "comma_expression", "text": "lsb, inverted", "parent": 205, "children": [208, 209], "start_point": {"row": 73, "column": 41}, "end_point": {"row": 73, "column": 54}}, {"id": 208, "type": "identifier", "text": "lsb", "parent": 207, "children": [], "start_point": {"row": 73, "column": 41}, "end_point": {"row": 73, "column": 44}}, {"id": 209, "type": "identifier", "text": "inverted", "parent": 207, "children": [], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 54}}, {"id": 210, "type": "return_statement", "text": "return encodeLogicalImmediate<32>(hsb, lsb, inverted);", "parent": 194, "children": [211], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 66}}, {"id": 211, "type": "binary_expression", "text": "encodeLogicalImmediate<32>(hsb, lsb, inverted)", "parent": 210, "children": [212, 216, 217], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 65}}, {"id": 212, "type": "binary_expression", "text": "encodeLogicalImmediate<32", "parent": 211, "children": [213, 214, 215], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 44}}, {"id": 213, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 212, "children": [], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 41}}, {"id": 214, "type": "<", "text": "<", "parent": 212, "children": [], "start_point": {"row": 74, "column": 41}, "end_point": {"row": 74, "column": 42}}, {"id": 215, "type": "number_literal", "text": "32", "parent": 212, "children": [], "start_point": {"row": 74, "column": 42}, "end_point": {"row": 74, "column": 44}}, {"id": 216, "type": ">", "text": ">", "parent": 211, "children": [], "start_point": {"row": 74, "column": 44}, "end_point": {"row": 74, "column": 45}}, {"id": 217, "type": "parenthesized_expression", "text": "(hsb, lsb, inverted)", "parent": 211, "children": [218], "start_point": {"row": 74, "column": 45}, "end_point": {"row": 74, "column": 65}}, {"id": 218, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 217, "children": [219, 220], "start_point": {"row": 74, "column": 46}, "end_point": {"row": 74, "column": 64}}, {"id": 219, "type": "identifier", "text": "hsb", "parent": 218, "children": [], "start_point": {"row": 74, "column": 46}, "end_point": {"row": 74, "column": 49}}, {"id": 220, "type": "comma_expression", "text": "lsb, inverted", "parent": 218, "children": [221, 222], "start_point": {"row": 74, "column": 51}, "end_point": {"row": 74, "column": 64}}, {"id": 221, "type": "identifier", "text": "lsb", "parent": 220, "children": [], "start_point": {"row": 74, "column": 51}, "end_point": {"row": 74, "column": 54}}, {"id": 222, "type": "identifier", "text": "inverted", "parent": 220, "children": [], "start_point": {"row": 74, "column": 56}, "end_point": {"row": 74, "column": 64}}, {"id": 223, "type": "if_statement", "text": "if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;", "parent": 163, "children": [224, 236], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 77, "column": 43}}, {"id": 224, "type": "parenthesized_expression", "text": "((value & 0xffff) != (value >> 16))", "parent": 223, "children": [225], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 46}}, {"id": 225, "type": "binary_expression", "text": "(value & 0xffff) != (value >> 16)", "parent": 224, "children": [226, 230, 231], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 45}}, {"id": 226, "type": "parenthesized_expression", "text": "(value & 0xffff)", "parent": 225, "children": [227], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 28}}, {"id": 227, "type": "binary_expression", "text": "value & 0xffff", "parent": 226, "children": [228, 229], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 27}}, {"id": 228, "type": "identifier", "text": "value", "parent": 227, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 18}}, {"id": 229, "type": "number_literal", "text": "0xffff", "parent": 227, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 27}}, {"id": 230, "type": "!=", "text": "!=", "parent": 225, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 31}}, {"id": 231, "type": "parenthesized_expression", "text": "(value >> 16)", "parent": 225, "children": [232], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 45}}, {"id": 232, "type": "binary_expression", "text": "value >> 16", "parent": 231, "children": [233, 234, 235], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 44}}, {"id": 233, "type": "identifier", "text": "value", "parent": 232, "children": [], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 38}}, {"id": 234, "type": ">>", "text": ">>", "parent": 232, "children": [], "start_point": {"row": 76, "column": 39}, "end_point": {"row": 76, "column": 41}}, {"id": 235, "type": "number_literal", "text": "16", "parent": 232, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 44}}, {"id": 236, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 223, "children": [237], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 43}}, {"id": 237, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 236, "children": [], "start_point": {"row": 77, "column": 19}, "end_point": {"row": 77, "column": 42}}, {"id": 238, "type": "assignment_expression", "text": "value &= 0xffff", "parent": 163, "children": [239, 240, 241], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 23}}, {"id": 239, "type": "identifier", "text": "value", "parent": 238, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 13}}, {"id": 240, "type": "&=", "text": "&=", "parent": 238, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 16}}, {"id": 241, "type": "number_literal", "text": "0xffff", "parent": 238, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 23}}, {"id": 242, "type": "if_statement", "text": "if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);", "parent": 163, "children": [243, 258], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 81, "column": 66}}, {"id": 243, "type": "parenthesized_expression", "text": "(findBitRange<16>(value, hsb, lsb, inverted))", "parent": 242, "children": [244], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 56}}, {"id": 244, "type": "binary_expression", "text": "findBitRange<16>(value, hsb, lsb, inverted)", "parent": 243, "children": [245, 249, 250], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 55}}, {"id": 245, "type": "binary_expression", "text": "findBitRange<16", "parent": 244, "children": [246, 247, 248], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 27}}, {"id": 246, "type": "identifier", "text": "findBitRange", "parent": 245, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 24}}, {"id": 247, "type": "<", "text": "<", "parent": 245, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 25}}, {"id": 248, "type": "number_literal", "text": "16", "parent": 245, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 27}}, {"id": 249, "type": ">", "text": ">", "parent": 244, "children": [], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 28}}, {"id": 250, "type": "parenthesized_expression", "text": "(value, hsb, lsb, inverted)", "parent": 244, "children": [251], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 55}}, {"id": 251, "type": "comma_expression", "text": "value, hsb, lsb, inverted", "parent": 250, "children": [252, 253], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 54}}, {"id": 252, "type": "identifier", "text": "value", "parent": 251, "children": [], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 34}}, {"id": 253, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 251, "children": [254, 255], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 54}}, {"id": 254, "type": "identifier", "text": "hsb", "parent": 253, "children": [], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 39}}, {"id": 255, "type": "comma_expression", "text": "lsb, inverted", "parent": 253, "children": [256, 257], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 54}}, {"id": 256, "type": "identifier", "text": "lsb", "parent": 255, "children": [], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 44}}, {"id": 257, "type": "identifier", "text": "inverted", "parent": 255, "children": [], "start_point": {"row": 80, "column": 46}, "end_point": {"row": 80, "column": 54}}, {"id": 258, "type": "return_statement", "text": "return encodeLogicalImmediate<16>(hsb, lsb, inverted);", "parent": 242, "children": [259], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 66}}, {"id": 259, "type": "binary_expression", "text": "encodeLogicalImmediate<16>(hsb, lsb, inverted)", "parent": 258, "children": [260, 264, 265], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 65}}, {"id": 260, "type": "binary_expression", "text": "encodeLogicalImmediate<16", "parent": 259, "children": [261, 262, 263], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 44}}, {"id": 261, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 260, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 41}}, {"id": 262, "type": "<", "text": "<", "parent": 260, "children": [], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 42}}, {"id": 263, "type": "number_literal", "text": "16", "parent": 260, "children": [], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 44}}, {"id": 264, "type": ">", "text": ">", "parent": 259, "children": [], "start_point": {"row": 81, "column": 44}, "end_point": {"row": 81, "column": 45}}, {"id": 265, "type": "parenthesized_expression", "text": "(hsb, lsb, inverted)", "parent": 259, "children": [266], "start_point": {"row": 81, "column": 45}, "end_point": {"row": 81, "column": 65}}, {"id": 266, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 265, "children": [267, 268], "start_point": {"row": 81, "column": 46}, "end_point": {"row": 81, "column": 64}}, {"id": 267, "type": "identifier", "text": "hsb", "parent": 266, "children": [], "start_point": {"row": 81, "column": 46}, "end_point": {"row": 81, "column": 49}}, {"id": 268, "type": "comma_expression", "text": "lsb, inverted", "parent": 266, "children": [269, 270], "start_point": {"row": 81, "column": 51}, "end_point": {"row": 81, "column": 64}}, {"id": 269, "type": "identifier", "text": "lsb", "parent": 268, "children": [], "start_point": {"row": 81, "column": 51}, "end_point": {"row": 81, "column": 54}}, {"id": 270, "type": "identifier", "text": "inverted", "parent": 268, "children": [], "start_point": {"row": 81, "column": 56}, "end_point": {"row": 81, "column": 64}}, {"id": 271, "type": "if_statement", "text": "if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;", "parent": 163, "children": [272, 284], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 84, "column": 43}}, {"id": 272, "type": "parenthesized_expression", "text": "((value & 0xff) != (value >> 8))", "parent": 271, "children": [273], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 43}}, {"id": 273, "type": "binary_expression", "text": "(value & 0xff) != (value >> 8)", "parent": 272, "children": [274, 278, 279], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 42}}, {"id": 274, "type": "parenthesized_expression", "text": "(value & 0xff)", "parent": 273, "children": [275], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 26}}, {"id": 275, "type": "binary_expression", "text": "value & 0xff", "parent": 274, "children": [276, 277], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 25}}, {"id": 276, "type": "identifier", "text": "value", "parent": 275, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 18}}, {"id": 277, "type": "number_literal", "text": "0xff", "parent": 275, "children": [], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 25}}, {"id": 278, "type": "!=", "text": "!=", "parent": 273, "children": [], "start_point": {"row": 83, "column": 27}, "end_point": {"row": 83, "column": 29}}, {"id": 279, "type": "parenthesized_expression", "text": "(value >> 8)", "parent": 273, "children": [280], "start_point": {"row": 83, "column": 30}, "end_point": {"row": 83, "column": 42}}, {"id": 280, "type": "binary_expression", "text": "value >> 8", "parent": 279, "children": [281, 282, 283], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 41}}, {"id": 281, "type": "identifier", "text": "value", "parent": 280, "children": [], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 36}}, {"id": 282, "type": ">>", "text": ">>", "parent": 280, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 39}}, {"id": 283, "type": "number_literal", "text": "8", "parent": 280, "children": [], "start_point": {"row": 83, "column": 40}, "end_point": {"row": 83, "column": 41}}, {"id": 284, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 271, "children": [285], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 43}}, {"id": 285, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 284, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 42}}, {"id": 286, "type": "assignment_expression", "text": "value &= 0xff", "parent": 163, "children": [287, 288, 289], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 21}}, {"id": 287, "type": "identifier", "text": "value", "parent": 286, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 13}}, {"id": 288, "type": "&=", "text": "&=", "parent": 286, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 16}}, {"id": 289, "type": "number_literal", "text": "0xff", "parent": 286, "children": [], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 21}}, {"id": 290, "type": "if_statement", "text": "if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);", "parent": 163, "children": [291, 306], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 88, "column": 65}}, {"id": 291, "type": "parenthesized_expression", "text": "(findBitRange<8>(value, hsb, lsb, inverted))", "parent": 290, "children": [292], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 55}}, {"id": 292, "type": "binary_expression", "text": "findBitRange<8>(value, hsb, lsb, inverted)", "parent": 291, "children": [293, 297, 298], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 54}}, {"id": 293, "type": "binary_expression", "text": "findBitRange<8", "parent": 292, "children": [294, 295, 296], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 26}}, {"id": 294, "type": "identifier", "text": "findBitRange", "parent": 293, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 24}}, {"id": 295, "type": "<", "text": "<", "parent": 293, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 25}}, {"id": 296, "type": "number_literal", "text": "8", "parent": 293, "children": [], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 26}}, {"id": 297, "type": ">", "text": ">", "parent": 292, "children": [], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 27}}, {"id": 298, "type": "parenthesized_expression", "text": "(value, hsb, lsb, inverted)", "parent": 292, "children": [299], "start_point": {"row": 87, "column": 27}, "end_point": {"row": 87, "column": 54}}, {"id": 299, "type": "comma_expression", "text": "value, hsb, lsb, inverted", "parent": 298, "children": [300, 301], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 53}}, {"id": 300, "type": "identifier", "text": "value", "parent": 299, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 33}}, {"id": 301, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 299, "children": [302, 303], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 53}}, {"id": 302, "type": "identifier", "text": "hsb", "parent": 301, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 38}}, {"id": 303, "type": "comma_expression", "text": "lsb, inverted", "parent": 301, "children": [304, 305], "start_point": {"row": 87, "column": 40}, "end_point": {"row": 87, "column": 53}}, {"id": 304, "type": "identifier", "text": "lsb", "parent": 303, "children": [], "start_point": {"row": 87, "column": 40}, "end_point": {"row": 87, "column": 43}}, {"id": 305, "type": "identifier", "text": "inverted", "parent": 303, "children": [], "start_point": {"row": 87, "column": 45}, "end_point": {"row": 87, "column": 53}}, {"id": 306, "type": "return_statement", "text": "return encodeLogicalImmediate<8>(hsb, lsb, inverted);", "parent": 290, "children": [307], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 65}}, {"id": 307, "type": "binary_expression", "text": "encodeLogicalImmediate<8>(hsb, lsb, inverted)", "parent": 306, "children": [308, 312, 313], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 64}}, {"id": 308, "type": "binary_expression", "text": "encodeLogicalImmediate<8", "parent": 307, "children": [309, 310, 311], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 43}}, {"id": 309, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 308, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 41}}, {"id": 310, "type": "<", "text": "<", "parent": 308, "children": [], "start_point": {"row": 88, "column": 41}, "end_point": {"row": 88, "column": 42}}, {"id": 311, "type": "number_literal", "text": "8", "parent": 308, "children": [], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 43}}, {"id": 312, "type": ">", "text": ">", "parent": 307, "children": [], "start_point": {"row": 88, "column": 43}, "end_point": {"row": 88, "column": 44}}, {"id": 313, "type": "parenthesized_expression", "text": "(hsb, lsb, inverted)", "parent": 307, "children": [314], "start_point": {"row": 88, "column": 44}, "end_point": {"row": 88, "column": 64}}, {"id": 314, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 313, "children": [315, 316], "start_point": {"row": 88, "column": 45}, "end_point": {"row": 88, "column": 63}}, {"id": 315, "type": "identifier", "text": "hsb", "parent": 314, "children": [], "start_point": {"row": 88, "column": 45}, "end_point": {"row": 88, "column": 48}}, {"id": 316, "type": "comma_expression", "text": "lsb, inverted", "parent": 314, "children": [317, 318], "start_point": {"row": 88, "column": 50}, "end_point": {"row": 88, "column": 63}}, {"id": 317, "type": "identifier", "text": "lsb", "parent": 316, "children": [], "start_point": {"row": 88, "column": 50}, "end_point": {"row": 88, "column": 53}}, {"id": 318, "type": "identifier", "text": "inverted", "parent": 316, "children": [], "start_point": {"row": 88, "column": 55}, "end_point": {"row": 88, "column": 63}}, {"id": 319, "type": "if_statement", "text": "if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;", "parent": 163, "children": [320, 332], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 91, "column": 43}}, {"id": 320, "type": "parenthesized_expression", "text": "((value & 0xf) != (value >> 4))", "parent": 319, "children": [321], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 42}}, {"id": 321, "type": "binary_expression", "text": "(value & 0xf) != (value >> 4)", "parent": 320, "children": [322, 326, 327], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 41}}, {"id": 322, "type": "parenthesized_expression", "text": "(value & 0xf)", "parent": 321, "children": [323], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 25}}, {"id": 323, "type": "binary_expression", "text": "value & 0xf", "parent": 322, "children": [324, 325], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 24}}, {"id": 324, "type": "identifier", "text": "value", "parent": 323, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 18}}, {"id": 325, "type": "number_literal", "text": "0xf", "parent": 323, "children": [], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 90, "column": 24}}, {"id": 326, "type": "!=", "text": "!=", "parent": 321, "children": [], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 28}}, {"id": 327, "type": "parenthesized_expression", "text": "(value >> 4)", "parent": 321, "children": [328], "start_point": {"row": 90, "column": 29}, "end_point": {"row": 90, "column": 41}}, {"id": 328, "type": "binary_expression", "text": "value >> 4", "parent": 327, "children": [329, 330, 331], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 40}}, {"id": 329, "type": "identifier", "text": "value", "parent": 328, "children": [], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 35}}, {"id": 330, "type": ">>", "text": ">>", "parent": 328, "children": [], "start_point": {"row": 90, "column": 36}, "end_point": {"row": 90, "column": 38}}, {"id": 331, "type": "number_literal", "text": "4", "parent": 328, "children": [], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 40}}, {"id": 332, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 319, "children": [333], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 43}}, {"id": 333, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 332, "children": [], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 42}}, {"id": 334, "type": "assignment_expression", "text": "value &= 0xf", "parent": 163, "children": [335, 336, 337], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 20}}, {"id": 335, "type": "identifier", "text": "value", "parent": 334, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 13}}, {"id": 336, "type": "&=", "text": "&=", "parent": 334, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 16}}, {"id": 337, "type": "number_literal", "text": "0xf", "parent": 334, "children": [], "start_point": {"row": 92, "column": 17}, "end_point": {"row": 92, "column": 20}}, {"id": 338, "type": "if_statement", "text": "if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);", "parent": 163, "children": [339, 354], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 95, "column": 65}}, {"id": 339, "type": "parenthesized_expression", "text": "(findBitRange<4>(value, hsb, lsb, inverted))", "parent": 338, "children": [340], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 55}}, {"id": 340, "type": "binary_expression", "text": "findBitRange<4>(value, hsb, lsb, inverted)", "parent": 339, "children": [341, 345, 346], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 54}}, {"id": 341, "type": "binary_expression", "text": "findBitRange<4", "parent": 340, "children": [342, 343, 344], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 26}}, {"id": 342, "type": "identifier", "text": "findBitRange", "parent": 341, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 24}}, {"id": 343, "type": "<", "text": "<", "parent": 341, "children": [], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 25}}, {"id": 344, "type": "number_literal", "text": "4", "parent": 341, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 26}}, {"id": 345, "type": ">", "text": ">", "parent": 340, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 27}}, {"id": 346, "type": "parenthesized_expression", "text": "(value, hsb, lsb, inverted)", "parent": 340, "children": [347], "start_point": {"row": 94, "column": 27}, "end_point": {"row": 94, "column": 54}}, {"id": 347, "type": "comma_expression", "text": "value, hsb, lsb, inverted", "parent": 346, "children": [348, 349], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 53}}, {"id": 348, "type": "identifier", "text": "value", "parent": 347, "children": [], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 33}}, {"id": 349, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 347, "children": [350, 351], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 53}}, {"id": 350, "type": "identifier", "text": "hsb", "parent": 349, "children": [], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 38}}, {"id": 351, "type": "comma_expression", "text": "lsb, inverted", "parent": 349, "children": [352, 353], "start_point": {"row": 94, "column": 40}, "end_point": {"row": 94, "column": 53}}, {"id": 352, "type": "identifier", "text": "lsb", "parent": 351, "children": [], "start_point": {"row": 94, "column": 40}, "end_point": {"row": 94, "column": 43}}, {"id": 353, "type": "identifier", "text": "inverted", "parent": 351, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 53}}, {"id": 354, "type": "return_statement", "text": "return encodeLogicalImmediate<4>(hsb, lsb, inverted);", "parent": 338, "children": [355], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 65}}, {"id": 355, "type": "binary_expression", "text": "encodeLogicalImmediate<4>(hsb, lsb, inverted)", "parent": 354, "children": [356, 360, 361], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 64}}, {"id": 356, "type": "binary_expression", "text": "encodeLogicalImmediate<4", "parent": 355, "children": [357, 358, 359], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 43}}, {"id": 357, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 356, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 41}}, {"id": 358, "type": "<", "text": "<", "parent": 356, "children": [], "start_point": {"row": 95, "column": 41}, "end_point": {"row": 95, "column": 42}}, {"id": 359, "type": "number_literal", "text": "4", "parent": 356, "children": [], "start_point": {"row": 95, "column": 42}, "end_point": {"row": 95, "column": 43}}, {"id": 360, "type": ">", "text": ">", "parent": 355, "children": [], "start_point": {"row": 95, "column": 43}, "end_point": {"row": 95, "column": 44}}, {"id": 361, "type": "parenthesized_expression", "text": "(hsb, lsb, inverted)", "parent": 355, "children": [362], "start_point": {"row": 95, "column": 44}, "end_point": {"row": 95, "column": 64}}, {"id": 362, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 361, "children": [363, 364], "start_point": {"row": 95, "column": 45}, "end_point": {"row": 95, "column": 63}}, {"id": 363, "type": "identifier", "text": "hsb", "parent": 362, "children": [], "start_point": {"row": 95, "column": 45}, "end_point": {"row": 95, "column": 48}}, {"id": 364, "type": "comma_expression", "text": "lsb, inverted", "parent": 362, "children": [365, 366], "start_point": {"row": 95, "column": 50}, "end_point": {"row": 95, "column": 63}}, {"id": 365, "type": "identifier", "text": "lsb", "parent": 364, "children": [], "start_point": {"row": 95, "column": 50}, "end_point": {"row": 95, "column": 53}}, {"id": 366, "type": "identifier", "text": "inverted", "parent": 364, "children": [], "start_point": {"row": 95, "column": 55}, "end_point": {"row": 95, "column": 63}}, {"id": 367, "type": "if_statement", "text": "if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;", "parent": 163, "children": [368, 380], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 98, "column": 43}}, {"id": 368, "type": "parenthesized_expression", "text": "((value & 0x3) != (value >> 2))", "parent": 367, "children": [369], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 42}}, {"id": 369, "type": "binary_expression", "text": "(value & 0x3) != (value >> 2)", "parent": 368, "children": [370, 374, 375], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 41}}, {"id": 370, "type": "parenthesized_expression", "text": "(value & 0x3)", "parent": 369, "children": [371], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 25}}, {"id": 371, "type": "binary_expression", "text": "value & 0x3", "parent": 370, "children": [372, 373], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 24}}, {"id": 372, "type": "identifier", "text": "value", "parent": 371, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 18}}, {"id": 373, "type": "number_literal", "text": "0x3", "parent": 371, "children": [], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 24}}, {"id": 374, "type": "!=", "text": "!=", "parent": 369, "children": [], "start_point": {"row": 97, "column": 26}, "end_point": {"row": 97, "column": 28}}, {"id": 375, "type": "parenthesized_expression", "text": "(value >> 2)", "parent": 369, "children": [376], "start_point": {"row": 97, "column": 29}, "end_point": {"row": 97, "column": 41}}, {"id": 376, "type": "binary_expression", "text": "value >> 2", "parent": 375, "children": [377, 378, 379], "start_point": {"row": 97, "column": 30}, "end_point": {"row": 97, "column": 40}}, {"id": 377, "type": "identifier", "text": "value", "parent": 376, "children": [], "start_point": {"row": 97, "column": 30}, "end_point": {"row": 97, "column": 35}}, {"id": 378, "type": ">>", "text": ">>", "parent": 376, "children": [], "start_point": {"row": 97, "column": 36}, "end_point": {"row": 97, "column": 38}}, {"id": 379, "type": "number_literal", "text": "2", "parent": 376, "children": [], "start_point": {"row": 97, "column": 39}, "end_point": {"row": 97, "column": 40}}, {"id": 380, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 367, "children": [381], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 43}}, {"id": 381, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 380, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 42}}, {"id": 382, "type": "assignment_expression", "text": "value &= 0x3", "parent": 163, "children": [383, 384, 385], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 20}}, {"id": 383, "type": "identifier", "text": "value", "parent": 382, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 13}}, {"id": 384, "type": "&=", "text": "&=", "parent": 382, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 16}}, {"id": 385, "type": "number_literal", "text": "0x3", "parent": 382, "children": [], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 20}}, {"id": 386, "type": "if_statement", "text": "if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);", "parent": 163, "children": [387, 402], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 102, "column": 65}}, {"id": 387, "type": "parenthesized_expression", "text": "(findBitRange<2>(value, hsb, lsb, inverted))", "parent": 386, "children": [388], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 55}}, {"id": 388, "type": "binary_expression", "text": "findBitRange<2>(value, hsb, lsb, inverted)", "parent": 387, "children": [389, 393, 394], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 54}}, {"id": 389, "type": "binary_expression", "text": "findBitRange<2", "parent": 388, "children": [390, 391, 392], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 26}}, {"id": 390, "type": "identifier", "text": "findBitRange", "parent": 389, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 24}}, {"id": 391, "type": "<", "text": "<", "parent": 389, "children": [], "start_point": {"row": 101, "column": 24}, "end_point": {"row": 101, "column": 25}}, {"id": 392, "type": "number_literal", "text": "2", "parent": 389, "children": [], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 26}}, {"id": 393, "type": ">", "text": ">", "parent": 388, "children": [], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 27}}, {"id": 394, "type": "parenthesized_expression", "text": "(value, hsb, lsb, inverted)", "parent": 388, "children": [395], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 54}}, {"id": 395, "type": "comma_expression", "text": "value, hsb, lsb, inverted", "parent": 394, "children": [396, 397], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 53}}, {"id": 396, "type": "identifier", "text": "value", "parent": 395, "children": [], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 33}}, {"id": 397, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 395, "children": [398, 399], "start_point": {"row": 101, "column": 35}, "end_point": {"row": 101, "column": 53}}, {"id": 398, "type": "identifier", "text": "hsb", "parent": 397, "children": [], "start_point": {"row": 101, "column": 35}, "end_point": {"row": 101, "column": 38}}, {"id": 399, "type": "comma_expression", "text": "lsb, inverted", "parent": 397, "children": [400, 401], "start_point": {"row": 101, "column": 40}, "end_point": {"row": 101, "column": 53}}, {"id": 400, "type": "identifier", "text": "lsb", "parent": 399, "children": [], "start_point": {"row": 101, "column": 40}, "end_point": {"row": 101, "column": 43}}, {"id": 401, "type": "identifier", "text": "inverted", "parent": 399, "children": [], "start_point": {"row": 101, "column": 45}, "end_point": {"row": 101, "column": 53}}, {"id": 402, "type": "return_statement", "text": "return encodeLogicalImmediate<2>(hsb, lsb, inverted);", "parent": 386, "children": [403], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 65}}, {"id": 403, "type": "binary_expression", "text": "encodeLogicalImmediate<2>(hsb, lsb, inverted)", "parent": 402, "children": [404, 408, 409], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 64}}, {"id": 404, "type": "binary_expression", "text": "encodeLogicalImmediate<2", "parent": 403, "children": [405, 406, 407], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 43}}, {"id": 405, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 404, "children": [], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 41}}, {"id": 406, "type": "<", "text": "<", "parent": 404, "children": [], "start_point": {"row": 102, "column": 41}, "end_point": {"row": 102, "column": 42}}, {"id": 407, "type": "number_literal", "text": "2", "parent": 404, "children": [], "start_point": {"row": 102, "column": 42}, "end_point": {"row": 102, "column": 43}}, {"id": 408, "type": ">", "text": ">", "parent": 403, "children": [], "start_point": {"row": 102, "column": 43}, "end_point": {"row": 102, "column": 44}}, {"id": 409, "type": "parenthesized_expression", "text": "(hsb, lsb, inverted)", "parent": 403, "children": [410], "start_point": {"row": 102, "column": 44}, "end_point": {"row": 102, "column": 64}}, {"id": 410, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 409, "children": [411, 412], "start_point": {"row": 102, "column": 45}, "end_point": {"row": 102, "column": 63}}, {"id": 411, "type": "identifier", "text": "hsb", "parent": 410, "children": [], "start_point": {"row": 102, "column": 45}, "end_point": {"row": 102, "column": 48}}, {"id": 412, "type": "comma_expression", "text": "lsb, inverted", "parent": 410, "children": [413, 414], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 63}}, {"id": 413, "type": "identifier", "text": "lsb", "parent": 412, "children": [], "start_point": {"row": 102, "column": 50}, "end_point": {"row": 102, "column": 53}}, {"id": 414, "type": "identifier", "text": "inverted", "parent": 412, "children": [], "start_point": {"row": 102, "column": 55}, "end_point": {"row": 102, "column": 63}}, {"id": 415, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 163, "children": [416], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 39}}, {"id": 416, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 415, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 38}}, {"id": 417, "type": "function_definition", "text": "static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }", "parent": 161, "children": [418, 419], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 123, "column": 5}}, {"id": 418, "type": "type_identifier", "text": "ARM64LogicalImmediate", "parent": 417, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 32}}, {"id": 419, "type": "function_declarator", "text": "create64(uint64_t value)", "parent": 417, "children": [420, 421], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 57}}, {"id": 420, "type": "identifier", "text": "create64", "parent": 419, "children": [], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 41}}, {"id": 421, "type": "parameter_list", "text": "(uint64_t value)", "parent": 419, "children": [422], "start_point": {"row": 107, "column": 41}, "end_point": {"row": 107, "column": 57}}, {"id": 422, "type": "parameter_declaration", "text": "uint64_t value", "parent": 421, "children": [423, 424], "start_point": {"row": 107, "column": 42}, "end_point": {"row": 107, "column": 56}}, {"id": 423, "type": "primitive_type", "text": "uint64_t", "parent": 422, "children": [], "start_point": {"row": 107, "column": 42}, "end_point": {"row": 107, "column": 50}}, {"id": 424, "type": "identifier", "text": "value", "parent": 422, "children": [], "start_point": {"row": 107, "column": 51}, "end_point": {"row": 107, "column": 56}}, {"id": 425, "type": "if_statement", "text": "if (!value || !~value)\n return InvalidLogicalImmediate;", "parent": 417, "children": [426, 437], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 111, "column": 43}}, {"id": 426, "type": "parenthesized_expression", "text": "(!value || !~value)", "parent": 425, "children": [427], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 30}}, {"id": 427, "type": "binary_expression", "text": "!value || !~value", "parent": 426, "children": [428, 431, 432], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 29}}, {"id": 428, "type": "unary_expression", "text": "!value", "parent": 427, "children": [429, 430], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 18}}, {"id": 429, "type": "!", "text": "!", "parent": 428, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 13}}, {"id": 430, "type": "identifier", "text": "value", "parent": 428, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 18}}, {"id": 431, "type": "||", "text": "||", "parent": 427, "children": [], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 21}}, {"id": 432, "type": "unary_expression", "text": "!~value", "parent": 427, "children": [433, 434], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 29}}, {"id": 433, "type": "!", "text": "!", "parent": 432, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 23}}, {"id": 434, "type": "unary_expression", "text": "~value", "parent": 432, "children": [435, 436], "start_point": {"row": 110, "column": 23}, "end_point": {"row": 110, "column": 29}}, {"id": 435, "type": "~", "text": "~", "parent": 434, "children": [], "start_point": {"row": 110, "column": 23}, "end_point": {"row": 110, "column": 24}}, {"id": 436, "type": "identifier", "text": "value", "parent": 434, "children": [], "start_point": {"row": 110, "column": 24}, "end_point": {"row": 110, "column": 29}}, {"id": 437, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 425, "children": [438], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 43}}, {"id": 438, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 437, "children": [], "start_point": {"row": 111, "column": 19}, "end_point": {"row": 111, "column": 42}}, {"id": 439, "type": "declaration", "text": "unsigned hsb, lsb;", "parent": 417, "children": [440, 442, 443], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 26}}, {"id": 440, "type": "sized_type_specifier", "text": "unsigned", "parent": 439, "children": [441], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 16}}, {"id": 441, "type": "unsigned", "text": "unsigned", "parent": 440, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 16}}, {"id": 442, "type": "identifier", "text": "hsb", "parent": 439, "children": [], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 114, "column": 20}}, {"id": 443, "type": "identifier", "text": "lsb", "parent": 439, "children": [], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 25}}, {"id": 444, "type": "declaration", "text": "bool inverted;", "parent": 417, "children": [445, 446], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 22}}, {"id": 445, "type": "primitive_type", "text": "bool", "parent": 444, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 12}}, {"id": 446, "type": "identifier", "text": "inverted", "parent": 444, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 21}}, {"id": 447, "type": "if_statement", "text": "if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);", "parent": 417, "children": [448, 463], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 117, "column": 66}}, {"id": 448, "type": "parenthesized_expression", "text": "(findBitRange<64>(value, hsb, lsb, inverted))", "parent": 447, "children": [449], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 56}}, {"id": 449, "type": "binary_expression", "text": "findBitRange<64>(value, hsb, lsb, inverted)", "parent": 448, "children": [450, 454, 455], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 55}}, {"id": 450, "type": "binary_expression", "text": "findBitRange<64", "parent": 449, "children": [451, 452, 453], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 27}}, {"id": 451, "type": "identifier", "text": "findBitRange", "parent": 450, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 24}}, {"id": 452, "type": "<", "text": "<", "parent": 450, "children": [], "start_point": {"row": 116, "column": 24}, "end_point": {"row": 116, "column": 25}}, {"id": 453, "type": "number_literal", "text": "64", "parent": 450, "children": [], "start_point": {"row": 116, "column": 25}, "end_point": {"row": 116, "column": 27}}, {"id": 454, "type": ">", "text": ">", "parent": 449, "children": [], "start_point": {"row": 116, "column": 27}, "end_point": {"row": 116, "column": 28}}, {"id": 455, "type": "parenthesized_expression", "text": "(value, hsb, lsb, inverted)", "parent": 449, "children": [456], "start_point": {"row": 116, "column": 28}, "end_point": {"row": 116, "column": 55}}, {"id": 456, "type": "comma_expression", "text": "value, hsb, lsb, inverted", "parent": 455, "children": [457, 458], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 54}}, {"id": 457, "type": "identifier", "text": "value", "parent": 456, "children": [], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 34}}, {"id": 458, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 456, "children": [459, 460], "start_point": {"row": 116, "column": 36}, "end_point": {"row": 116, "column": 54}}, {"id": 459, "type": "identifier", "text": "hsb", "parent": 458, "children": [], "start_point": {"row": 116, "column": 36}, "end_point": {"row": 116, "column": 39}}, {"id": 460, "type": "comma_expression", "text": "lsb, inverted", "parent": 458, "children": [461, 462], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 54}}, {"id": 461, "type": "identifier", "text": "lsb", "parent": 460, "children": [], "start_point": {"row": 116, "column": 41}, "end_point": {"row": 116, "column": 44}}, {"id": 462, "type": "identifier", "text": "inverted", "parent": 460, "children": [], "start_point": {"row": 116, "column": 46}, "end_point": {"row": 116, "column": 54}}, {"id": 463, "type": "return_statement", "text": "return encodeLogicalImmediate<64>(hsb, lsb, inverted);", "parent": 447, "children": [464], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 66}}, {"id": 464, "type": "binary_expression", "text": "encodeLogicalImmediate<64>(hsb, lsb, inverted)", "parent": 463, "children": [465, 469, 470], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 65}}, {"id": 465, "type": "binary_expression", "text": "encodeLogicalImmediate<64", "parent": 464, "children": [466, 467, 468], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 44}}, {"id": 466, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 465, "children": [], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 41}}, {"id": 467, "type": "<", "text": "<", "parent": 465, "children": [], "start_point": {"row": 117, "column": 41}, "end_point": {"row": 117, "column": 42}}, {"id": 468, "type": "number_literal", "text": "64", "parent": 465, "children": [], "start_point": {"row": 117, "column": 42}, "end_point": {"row": 117, "column": 44}}, {"id": 469, "type": ">", "text": ">", "parent": 464, "children": [], "start_point": {"row": 117, "column": 44}, "end_point": {"row": 117, "column": 45}}, {"id": 470, "type": "parenthesized_expression", "text": "(hsb, lsb, inverted)", "parent": 464, "children": [471], "start_point": {"row": 117, "column": 45}, "end_point": {"row": 117, "column": 65}}, {"id": 471, "type": "comma_expression", "text": "hsb, lsb, inverted", "parent": 470, "children": [472, 473], "start_point": {"row": 117, "column": 46}, "end_point": {"row": 117, "column": 64}}, {"id": 472, "type": "identifier", "text": "hsb", "parent": 471, "children": [], "start_point": {"row": 117, "column": 46}, "end_point": {"row": 117, "column": 49}}, {"id": 473, "type": "comma_expression", "text": "lsb, inverted", "parent": 471, "children": [474, 475], "start_point": {"row": 117, "column": 51}, "end_point": {"row": 117, "column": 64}}, {"id": 474, "type": "identifier", "text": "lsb", "parent": 473, "children": [], "start_point": {"row": 117, "column": 51}, "end_point": {"row": 117, "column": 54}}, {"id": 475, "type": "identifier", "text": "inverted", "parent": 473, "children": [], "start_point": {"row": 117, "column": 56}, "end_point": {"row": 117, "column": 64}}, {"id": 476, "type": "if_statement", "text": "if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));", "parent": 417, "children": [477, 499], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 121, "column": 58}}, {"id": 477, "type": "parenthesized_expression", "text": "(static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))", "parent": 476, "children": [478], "start_point": {"row": 120, "column": 11}, "end_point": {"row": 120, "column": 79}}, {"id": 478, "type": "binary_expression", "text": "static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32)", "parent": 477, "children": [479, 487, 488], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 78}}, {"id": 479, "type": "binary_expression", "text": "static_cast<uint32_t>(value)", "parent": 478, "children": [480, 484, 485], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 40}}, {"id": 480, "type": "binary_expression", "text": "static_cast<uint32_t", "parent": 479, "children": [481, 482, 483], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 32}}, {"id": 481, "type": "identifier", "text": "static_cast", "parent": 480, "children": [], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 23}}, {"id": 482, "type": "<", "text": "<", "parent": 480, "children": [], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 24}}, {"id": 483, "type": "identifier", "text": "uint32_t", "parent": 480, "children": [], "start_point": {"row": 120, "column": 24}, "end_point": {"row": 120, "column": 32}}, {"id": 484, "type": ">", "text": ">", "parent": 479, "children": [], "start_point": {"row": 120, "column": 32}, "end_point": {"row": 120, "column": 33}}, {"id": 485, "type": "parenthesized_expression", "text": "(value)", "parent": 479, "children": [486], "start_point": {"row": 120, "column": 33}, "end_point": {"row": 120, "column": 40}}, {"id": 486, "type": "identifier", "text": "value", "parent": 485, "children": [], "start_point": {"row": 120, "column": 34}, "end_point": {"row": 120, "column": 39}}, {"id": 487, "type": "==", "text": "==", "parent": 478, "children": [], "start_point": {"row": 120, "column": 41}, "end_point": {"row": 120, "column": 43}}, {"id": 488, "type": "binary_expression", "text": "static_cast<uint32_t>(value >> 32)", "parent": 478, "children": [489, 493, 494], "start_point": {"row": 120, "column": 44}, "end_point": {"row": 120, "column": 78}}, {"id": 489, "type": "binary_expression", "text": "static_cast<uint32_t", "parent": 488, "children": [490, 491, 492], "start_point": {"row": 120, "column": 44}, "end_point": {"row": 120, "column": 64}}, {"id": 490, "type": "identifier", "text": "static_cast", "parent": 489, "children": [], "start_point": {"row": 120, "column": 44}, "end_point": {"row": 120, "column": 55}}, {"id": 491, "type": "<", "text": "<", "parent": 489, "children": [], "start_point": {"row": 120, "column": 55}, "end_point": {"row": 120, "column": 56}}, {"id": 492, "type": "identifier", "text": "uint32_t", "parent": 489, "children": [], "start_point": {"row": 120, "column": 56}, "end_point": {"row": 120, "column": 64}}, {"id": 493, "type": ">", "text": ">", "parent": 488, "children": [], "start_point": {"row": 120, "column": 64}, "end_point": {"row": 120, "column": 65}}, {"id": 494, "type": "parenthesized_expression", "text": "(value >> 32)", "parent": 488, "children": [495], "start_point": {"row": 120, "column": 65}, "end_point": {"row": 120, "column": 78}}, {"id": 495, "type": "binary_expression", "text": "value >> 32", "parent": 494, "children": [496, 497, 498], "start_point": {"row": 120, "column": 66}, "end_point": {"row": 120, "column": 77}}, {"id": 496, "type": "identifier", "text": "value", "parent": 495, "children": [], "start_point": {"row": 120, "column": 66}, "end_point": {"row": 120, "column": 71}}, {"id": 497, "type": ">>", "text": ">>", "parent": 495, "children": [], "start_point": {"row": 120, "column": 72}, "end_point": {"row": 120, "column": 74}}, {"id": 498, "type": "number_literal", "text": "32", "parent": 495, "children": [], "start_point": {"row": 120, "column": 75}, "end_point": {"row": 120, "column": 77}}, {"id": 499, "type": "return_statement", "text": "return create32(static_cast<uint32_t>(value));", "parent": 476, "children": [500], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 58}}, {"id": 500, "type": "call_expression", "text": "create32(static_cast<uint32_t>(value))", "parent": 499, "children": [501, 502], "start_point": {"row": 121, "column": 19}, "end_point": {"row": 121, "column": 57}}, {"id": 501, "type": "identifier", "text": "create32", "parent": 500, "children": [], "start_point": {"row": 121, "column": 19}, "end_point": {"row": 121, "column": 27}}, {"id": 502, "type": "argument_list", "text": "(static_cast<uint32_t>(value))", "parent": 500, "children": [503], "start_point": {"row": 121, "column": 27}, "end_point": {"row": 121, "column": 57}}, {"id": 503, "type": "binary_expression", "text": "static_cast<uint32_t>(value)", "parent": 502, "children": [504, 508, 509], "start_point": {"row": 121, "column": 28}, "end_point": {"row": 121, "column": 56}}, {"id": 504, "type": "binary_expression", "text": "static_cast<uint32_t", "parent": 503, "children": [505, 506, 507], "start_point": {"row": 121, "column": 28}, "end_point": {"row": 121, "column": 48}}, {"id": 505, "type": "identifier", "text": "static_cast", "parent": 504, "children": [], "start_point": {"row": 121, "column": 28}, "end_point": {"row": 121, "column": 39}}, {"id": 506, "type": "<", "text": "<", "parent": 504, "children": [], "start_point": {"row": 121, "column": 39}, "end_point": {"row": 121, "column": 40}}, {"id": 507, "type": "identifier", "text": "uint32_t", "parent": 504, "children": [], "start_point": {"row": 121, "column": 40}, "end_point": {"row": 121, "column": 48}}, {"id": 508, "type": ">", "text": ">", "parent": 503, "children": [], "start_point": {"row": 121, "column": 48}, "end_point": {"row": 121, "column": 49}}, {"id": 509, "type": "parenthesized_expression", "text": "(value)", "parent": 503, "children": [510], "start_point": {"row": 121, "column": 49}, "end_point": {"row": 121, "column": 56}}, {"id": 510, "type": "identifier", "text": "value", "parent": 509, "children": [], "start_point": {"row": 121, "column": 50}, "end_point": {"row": 121, "column": 55}}, {"id": 511, "type": "return_statement", "text": "return InvalidLogicalImmediate;", "parent": 417, "children": [512], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 39}}, {"id": 512, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 511, "children": [], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 38}}, {"id": 513, "type": "function_definition", "text": "int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }", "parent": 161, "children": [514, 515, 518, 524, 526], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 134, "column": 5}}, {"id": 514, "type": "primitive_type", "text": "int", "parent": 513, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 7}}, {"id": 515, "type": "function_declarator", "text": "value()", "parent": 513, "children": [516, 517], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 15}}, {"id": 516, "type": "identifier", "text": "value", "parent": 515, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 13}}, {"id": 517, "type": "parameter_list", "text": "()", "parent": 515, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 15}}, {"id": 518, "type": "declaration", "text": "const\n {\n ASSERT(isValid());", "parent": 513, "children": [519, 520], "start_point": {"row": 125, "column": 16}, "end_point": {"row": 127, "column": 26}}, {"id": 519, "type": "type_identifier", "text": "ASSERT", "parent": 518, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 14}}, {"id": 520, "type": "parenthesized_declarator", "text": "(isValid())", "parent": 518, "children": [521], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 25}}, {"id": 521, "type": "function_declarator", "text": "isValid()", "parent": 520, "children": [522, 523], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 24}}, {"id": 522, "type": "identifier", "text": "isValid", "parent": 521, "children": [], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 22}}, {"id": 523, "type": "parameter_list", "text": "()", "parent": 521, "children": [], "start_point": {"row": 127, "column": 22}, "end_point": {"row": 127, "column": 24}}, {"id": 524, "type": "declaration", "text": "return m_value;", "parent": 513, "children": [525], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 23}}, {"id": 525, "type": "identifier", "text": "m_value", "parent": 524, "children": [], "start_point": {"row": 128, "column": 15}, "end_point": {"row": 128, "column": 22}}, {"id": 526, "type": "ERROR", "text": "}\n\n bool isValid() const", "parent": 513, "children": [527, 528], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 131, "column": 24}}, {"id": 527, "type": "primitive_type", "text": "bool", "parent": 526, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 8}}, {"id": 528, "type": "function_declarator", "text": "isValid() const", "parent": 526, "children": [529, 530], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 24}}, {"id": 529, "type": "identifier", "text": "isValid", "parent": 528, "children": [], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 16}}, {"id": 530, "type": "parameter_list", "text": "()", "parent": 528, "children": [], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 18}}, {"id": 531, "type": "return_statement", "text": "return m_value != InvalidLogicalImmediate;", "parent": 513, "children": [532], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 50}}, {"id": 532, "type": "binary_expression", "text": "m_value != InvalidLogicalImmediate", "parent": 531, "children": [533, 534, 535], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 49}}, {"id": 533, "type": "identifier", "text": "m_value", "parent": 532, "children": [], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 22}}, {"id": 534, "type": "!=", "text": "!=", "parent": 532, "children": [], "start_point": {"row": 133, "column": 23}, "end_point": {"row": 133, "column": 25}}, {"id": 535, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 532, "children": [], "start_point": {"row": 133, "column": 26}, "end_point": {"row": 133, "column": 49}}, {"id": 536, "type": "ERROR", "text": "bool is64bit() const", "parent": 161, "children": [537, 538], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 24}}, {"id": 537, "type": "primitive_type", "text": "bool", "parent": 536, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 8}}, {"id": 538, "type": "function_declarator", "text": "is64bit()", "parent": 536, "children": [539, 540], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 18}}, {"id": 539, "type": "identifier", "text": "is64bit", "parent": 538, "children": [], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 16}}, {"id": 540, "type": "parameter_list", "text": "()", "parent": 538, "children": [], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 18}}, {"id": 541, "type": "return_statement", "text": "return m_value & (1 << 12);", "parent": 161, "children": [542], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 35}}, {"id": 542, "type": "binary_expression", "text": "m_value & (1 << 12)", "parent": 541, "children": [543, 544], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 34}}, {"id": 543, "type": "identifier", "text": "m_value", "parent": 542, "children": [], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 22}}, {"id": 544, "type": "parenthesized_expression", "text": "(1 << 12)", "parent": 542, "children": [545], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 34}}, {"id": 545, "type": "binary_expression", "text": "1 << 12", "parent": 544, "children": [546, 547, 548], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 33}}, {"id": 546, "type": "number_literal", "text": "1", "parent": 545, "children": [], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 27}}, {"id": 547, "type": "<<", "text": "<<", "parent": 545, "children": [], "start_point": {"row": 138, "column": 28}, "end_point": {"row": 138, "column": 30}}, {"id": 548, "type": "number_literal", "text": "12", "parent": 545, "children": [], "start_point": {"row": 138, "column": 31}, "end_point": {"row": 138, "column": 33}}, {"id": 549, "type": "labeled_statement", "text": "private:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }", "parent": 161, "children": [550], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 145, "column": 5}}, {"id": 550, "type": "ERROR", "text": "ARM64LogicalImmediate(int value)\n : m_value(value)", "parent": 549, "children": [551, 557], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 143, "column": 24}}, {"id": 551, "type": "macro_type_specifier", "text": "ARM64LogicalImmediate(int value)", "parent": 550, "children": [552, 553, 555], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 36}}, {"id": 552, "type": "identifier", "text": "ARM64LogicalImmediate", "parent": 551, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 25}}, {"id": 553, "type": "ERROR", "text": "int", "parent": 551, "children": [554], "start_point": {"row": 142, "column": 26}, "end_point": {"row": 142, "column": 29}}, {"id": 554, "type": "primitive_type", "text": "int", "parent": 553, "children": [], "start_point": {"row": 142, "column": 26}, "end_point": {"row": 142, "column": 29}}, {"id": 555, "type": "type_descriptor", "text": "value", "parent": 551, "children": [556], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 35}}, {"id": 556, "type": "type_identifier", "text": "value", "parent": 555, "children": [], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 35}}, {"id": 557, "type": "function_declarator", "text": "m_value(value)", "parent": 550, "children": [558, 559], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 24}}, {"id": 558, "type": "identifier", "text": "m_value", "parent": 557, "children": [], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 17}}, {"id": 559, "type": "parameter_list", "text": "(value)", "parent": 557, "children": [560], "start_point": {"row": 143, "column": 17}, "end_point": {"row": 143, "column": 24}}, {"id": 560, "type": "parameter_declaration", "text": "value", "parent": 559, "children": [561], "start_point": {"row": 143, "column": 18}, "end_point": {"row": 143, "column": 23}}, {"id": 561, "type": "type_identifier", "text": "value", "parent": 560, "children": [], "start_point": {"row": 143, "column": 18}, "end_point": {"row": 143, "column": 23}}, {"id": 562, "type": "function_definition", "text": "static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }", "parent": 161, "children": [563, 564], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 155, "column": 5}}, {"id": 563, "type": "primitive_type", "text": "uint64_t", "parent": 562, "children": [], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 19}}, {"id": 564, "type": "function_declarator", "text": "mask(unsigned hsb)", "parent": 562, "children": [565, 566], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 38}}, {"id": 565, "type": "identifier", "text": "mask", "parent": 564, "children": [], "start_point": {"row": 151, "column": 20}, "end_point": {"row": 151, "column": 24}}, {"id": 566, "type": "parameter_list", "text": "(unsigned hsb)", "parent": 564, "children": [567], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 38}}, {"id": 567, "type": "parameter_declaration", "text": "unsigned hsb", "parent": 566, "children": [568, 570], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 37}}, {"id": 568, "type": "sized_type_specifier", "text": "unsigned", "parent": 567, "children": [569], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 33}}, {"id": 569, "type": "unsigned", "text": "unsigned", "parent": 568, "children": [], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 33}}, {"id": 570, "type": "identifier", "text": "hsb", "parent": 567, "children": [], "start_point": {"row": 151, "column": 34}, "end_point": {"row": 151, "column": 37}}, {"id": 571, "type": "call_expression", "text": "ASSERT(hsb < 64)", "parent": 562, "children": [572, 573], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 24}}, {"id": 572, "type": "identifier", "text": "ASSERT", "parent": 571, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 14}}, {"id": 573, "type": "argument_list", "text": "(hsb < 64)", "parent": 571, "children": [574], "start_point": {"row": 153, "column": 14}, "end_point": {"row": 153, "column": 24}}, {"id": 574, "type": "binary_expression", "text": "hsb < 64", "parent": 573, "children": [575, 576, 577], "start_point": {"row": 153, "column": 15}, "end_point": {"row": 153, "column": 23}}, {"id": 575, "type": "identifier", "text": "hsb", "parent": 574, "children": [], "start_point": {"row": 153, "column": 15}, "end_point": {"row": 153, "column": 18}}, {"id": 576, "type": "<", "text": "<", "parent": 574, "children": [], "start_point": {"row": 153, "column": 19}, "end_point": {"row": 153, "column": 20}}, {"id": 577, "type": "number_literal", "text": "64", "parent": 574, "children": [], "start_point": {"row": 153, "column": 21}, "end_point": {"row": 153, "column": 23}}, {"id": 578, "type": "return_statement", "text": "return 0xffffffffffffffffull >> (63 - hsb);", "parent": 562, "children": [579], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 51}}, {"id": 579, "type": "binary_expression", "text": "0xffffffffffffffffull >> (63 - hsb)", "parent": 578, "children": [580, 581, 582], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 50}}, {"id": 580, "type": "number_literal", "text": "0xffffffffffffffffull", "parent": 579, "children": [], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 36}}, {"id": 581, "type": ">>", "text": ">>", "parent": 579, "children": [], "start_point": {"row": 154, "column": 37}, "end_point": {"row": 154, "column": 39}}, {"id": 582, "type": "parenthesized_expression", "text": "(63 - hsb)", "parent": 579, "children": [583], "start_point": {"row": 154, "column": 40}, "end_point": {"row": 154, "column": 50}}, {"id": 583, "type": "binary_expression", "text": "63 - hsb", "parent": 582, "children": [584, 585, 586], "start_point": {"row": 154, "column": 41}, "end_point": {"row": 154, "column": 49}}, {"id": 584, "type": "number_literal", "text": "63", "parent": 583, "children": [], "start_point": {"row": 154, "column": 41}, "end_point": {"row": 154, "column": 43}}, {"id": 585, "type": "-", "text": "-", "parent": 583, "children": [], "start_point": {"row": 154, "column": 44}, "end_point": {"row": 154, "column": 45}}, {"id": 586, "type": "identifier", "text": "hsb", "parent": 583, "children": [], "start_point": {"row": 154, "column": 46}, "end_point": {"row": 154, "column": 49}}, {"id": 587, "type": "binary_expression", "text": "template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)", "parent": 161, "children": [588, 592, 594, 595, 597], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 158, "column": 60}}, {"id": 588, "type": "binary_expression", "text": "template<unsigned", "parent": 587, "children": [589, 590, 591], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 21}}, {"id": 589, "type": "identifier", "text": "template", "parent": 588, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 12}}, {"id": 590, "type": "<", "text": "<", "parent": 588, "children": [], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 13}}, {"id": 591, "type": "identifier", "text": "unsigned", "parent": 588, "children": [], "start_point": {"row": 157, "column": 13}, "end_point": {"row": 157, "column": 21}}, {"id": 592, "type": "ERROR", "text": "N", "parent": 587, "children": [593], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 23}}, {"id": 593, "type": "identifier", "text": "N", "parent": 592, "children": [], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 23}}, {"id": 594, "type": ">", "text": ">", "parent": 587, "children": [], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 24}}, {"id": 595, "type": "ERROR", "text": "static void", "parent": 587, "children": [596], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 15}}, {"id": 596, "type": "identifier", "text": "void", "parent": 595, "children": [], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 15}}, {"id": 597, "type": "call_expression", "text": "partialHSB(uint64_t& value, unsigned&result)", "parent": 587, "children": [598, 599], "start_point": {"row": 158, "column": 16}, "end_point": {"row": 158, "column": 60}}, {"id": 598, "type": "identifier", "text": "partialHSB", "parent": 597, "children": [], "start_point": {"row": 158, "column": 16}, "end_point": {"row": 158, "column": 26}}, {"id": 599, "type": "argument_list", "text": "(uint64_t& value, unsigned&result)", "parent": 597, "children": [600, 603], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 60}}, {"id": 600, "type": "binary_expression", "text": "uint64_t& value", "parent": 599, "children": [601, 602], "start_point": {"row": 158, "column": 27}, "end_point": {"row": 158, "column": 42}}, {"id": 601, "type": "identifier", "text": "uint64_t", "parent": 600, "children": [], "start_point": {"row": 158, "column": 27}, "end_point": {"row": 158, "column": 35}}, {"id": 602, "type": "identifier", "text": "value", "parent": 600, "children": [], "start_point": {"row": 158, "column": 37}, "end_point": {"row": 158, "column": 42}}, {"id": 603, "type": "binary_expression", "text": "unsigned&result", "parent": 599, "children": [604, 605], "start_point": {"row": 158, "column": 44}, "end_point": {"row": 158, "column": 59}}, {"id": 604, "type": "identifier", "text": "unsigned", "parent": 603, "children": [], "start_point": {"row": 158, "column": 44}, "end_point": {"row": 158, "column": 52}}, {"id": 605, "type": "identifier", "text": "result", "parent": 603, "children": [], "start_point": {"row": 158, "column": 53}, "end_point": {"row": 158, "column": 59}}, {"id": 606, "type": "if_statement", "text": "if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }", "parent": 161, "children": [607], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 163, "column": 9}}, {"id": 607, "type": "parenthesized_expression", "text": "(value & (0xffffffffffffffffull << N))", "parent": 606, "children": [608], "start_point": {"row": 160, "column": 11}, "end_point": {"row": 160, "column": 49}}, {"id": 608, "type": "binary_expression", "text": "value & (0xffffffffffffffffull << N)", "parent": 607, "children": [609, 610], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 48}}, {"id": 609, "type": "identifier", "text": "value", "parent": 608, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 17}}, {"id": 610, "type": "parenthesized_expression", "text": "(0xffffffffffffffffull << N)", "parent": 608, "children": [611], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 48}}, {"id": 611, "type": "binary_expression", "text": "0xffffffffffffffffull << N", "parent": 610, "children": [612, 613, 614], "start_point": {"row": 160, "column": 21}, "end_point": {"row": 160, "column": 47}}, {"id": 612, "type": "number_literal", "text": "0xffffffffffffffffull", "parent": 611, "children": [], "start_point": {"row": 160, "column": 21}, "end_point": {"row": 160, "column": 42}}, {"id": 613, "type": "<<", "text": "<<", "parent": 611, "children": [], "start_point": {"row": 160, "column": 43}, "end_point": {"row": 160, "column": 45}}, {"id": 614, "type": "identifier", "text": "N", "parent": 611, "children": [], "start_point": {"row": 160, "column": 46}, "end_point": {"row": 160, "column": 47}}, {"id": 615, "type": "assignment_expression", "text": "result += N", "parent": 606, "children": [616, 617, 618], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 23}}, {"id": 616, "type": "identifier", "text": "result", "parent": 615, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 18}}, {"id": 617, "type": "+=", "text": "+=", "parent": 615, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 21}}, {"id": 618, "type": "identifier", "text": "N", "parent": 615, "children": [], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 23}}, {"id": 619, "type": "assignment_expression", "text": "value >>= N", "parent": 606, "children": [620, 621, 622], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 23}}, {"id": 620, "type": "identifier", "text": "value", "parent": 619, "children": [], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 17}}, {"id": 621, "type": ">>=", "text": ">>=", "parent": 619, "children": [], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 21}}, {"id": 622, "type": "identifier", "text": "N", "parent": 619, "children": [], "start_point": {"row": 162, "column": 22}, "end_point": {"row": 162, "column": 23}}, {"id": 623, "type": "function_definition", "text": "static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }", "parent": 161, "children": [624, 626], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 181, "column": 5}}, {"id": 624, "type": "sized_type_specifier", "text": "unsigned", "parent": 623, "children": [625], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 19}}, {"id": 625, "type": "unsigned", "text": "unsigned", "parent": 624, "children": [], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 19}}, {"id": 626, "type": "function_declarator", "text": "highestSetBit(uint64_t value)", "parent": 623, "children": [627, 628], "start_point": {"row": 170, "column": 20}, "end_point": {"row": 170, "column": 49}}, {"id": 627, "type": "identifier", "text": "highestSetBit", "parent": 626, "children": [], "start_point": {"row": 170, "column": 20}, "end_point": {"row": 170, "column": 33}}, {"id": 628, "type": "parameter_list", "text": "(uint64_t value)", "parent": 626, "children": [629], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 49}}, {"id": 629, "type": "parameter_declaration", "text": "uint64_t value", "parent": 628, "children": [630, 631], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 48}}, {"id": 630, "type": "primitive_type", "text": "uint64_t", "parent": 629, "children": [], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 42}}, {"id": 631, "type": "identifier", "text": "value", "parent": 629, "children": [], "start_point": {"row": 170, "column": 43}, "end_point": {"row": 170, "column": 48}}, {"id": 632, "type": "call_expression", "text": "ASSERT(value)", "parent": 623, "children": [633, 634], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 21}}, {"id": 633, "type": "identifier", "text": "ASSERT", "parent": 632, "children": [], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 14}}, {"id": 634, "type": "argument_list", "text": "(value)", "parent": 632, "children": [635], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 21}}, {"id": 635, "type": "identifier", "text": "value", "parent": 634, "children": [], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 20}}, {"id": 636, "type": "declaration", "text": "unsigned hsb = 0;", "parent": 623, "children": [637, 639], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 25}}, {"id": 637, "type": "sized_type_specifier", "text": "unsigned", "parent": 636, "children": [638], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 16}}, {"id": 638, "type": "unsigned", "text": "unsigned", "parent": 637, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 16}}, {"id": 639, "type": "init_declarator", "text": "hsb = 0", "parent": 636, "children": [640, 641, 642], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 24}}, {"id": 640, "type": "identifier", "text": "hsb", "parent": 639, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 20}}, {"id": 641, "type": "=", "text": "=", "parent": 639, "children": [], "start_point": {"row": 173, "column": 21}, "end_point": {"row": 173, "column": 22}}, {"id": 642, "type": "number_literal", "text": "0", "parent": 639, "children": [], "start_point": {"row": 173, "column": 23}, "end_point": {"row": 173, "column": 24}}, {"id": 643, "type": "binary_expression", "text": "partialHSB<32>(value, hsb)", "parent": 623, "children": [644, 648, 649], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 34}}, {"id": 644, "type": "binary_expression", "text": "partialHSB<32", "parent": 643, "children": [645, 646, 647], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 21}}, {"id": 645, "type": "identifier", "text": "partialHSB", "parent": 644, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 18}}, {"id": 646, "type": "<", "text": "<", "parent": 644, "children": [], "start_point": {"row": 174, "column": 18}, "end_point": {"row": 174, "column": 19}}, {"id": 647, "type": "number_literal", "text": "32", "parent": 644, "children": [], "start_point": {"row": 174, "column": 19}, "end_point": {"row": 174, "column": 21}}, {"id": 648, "type": ">", "text": ">", "parent": 643, "children": [], "start_point": {"row": 174, "column": 21}, "end_point": {"row": 174, "column": 22}}, {"id": 649, "type": "parenthesized_expression", "text": "(value, hsb)", "parent": 643, "children": [650], "start_point": {"row": 174, "column": 22}, "end_point": {"row": 174, "column": 34}}, {"id": 650, "type": "comma_expression", "text": "value, hsb", "parent": 649, "children": [651, 652], "start_point": {"row": 174, "column": 23}, "end_point": {"row": 174, "column": 33}}, {"id": 651, "type": "identifier", "text": "value", "parent": 650, "children": [], "start_point": {"row": 174, "column": 23}, "end_point": {"row": 174, "column": 28}}, {"id": 652, "type": "identifier", "text": "hsb", "parent": 650, "children": [], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 33}}, {"id": 653, "type": "binary_expression", "text": "partialHSB<16>(value, hsb)", "parent": 623, "children": [654, 658, 659], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 34}}, {"id": 654, "type": "binary_expression", "text": "partialHSB<16", "parent": 653, "children": [655, 656, 657], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 21}}, {"id": 655, "type": "identifier", "text": "partialHSB", "parent": 654, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 18}}, {"id": 656, "type": "<", "text": "<", "parent": 654, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 19}}, {"id": 657, "type": "number_literal", "text": "16", "parent": 654, "children": [], "start_point": {"row": 175, "column": 19}, "end_point": {"row": 175, "column": 21}}, {"id": 658, "type": ">", "text": ">", "parent": 653, "children": [], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 22}}, {"id": 659, "type": "parenthesized_expression", "text": "(value, hsb)", "parent": 653, "children": [660], "start_point": {"row": 175, "column": 22}, "end_point": {"row": 175, "column": 34}}, {"id": 660, "type": "comma_expression", "text": "value, hsb", "parent": 659, "children": [661, 662], "start_point": {"row": 175, "column": 23}, "end_point": {"row": 175, "column": 33}}, {"id": 661, "type": "identifier", "text": "value", "parent": 660, "children": [], "start_point": {"row": 175, "column": 23}, "end_point": {"row": 175, "column": 28}}, {"id": 662, "type": "identifier", "text": "hsb", "parent": 660, "children": [], "start_point": {"row": 175, "column": 30}, "end_point": {"row": 175, "column": 33}}, {"id": 663, "type": "binary_expression", "text": "partialHSB<8>(value, hsb)", "parent": 623, "children": [664, 668, 669], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 33}}, {"id": 664, "type": "binary_expression", "text": "partialHSB<8", "parent": 663, "children": [665, 666, 667], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 20}}, {"id": 665, "type": "identifier", "text": "partialHSB", "parent": 664, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 18}}, {"id": 666, "type": "<", "text": "<", "parent": 664, "children": [], "start_point": {"row": 176, "column": 18}, "end_point": {"row": 176, "column": 19}}, {"id": 667, "type": "number_literal", "text": "8", "parent": 664, "children": [], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 20}}, {"id": 668, "type": ">", "text": ">", "parent": 663, "children": [], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 21}}, {"id": 669, "type": "parenthesized_expression", "text": "(value, hsb)", "parent": 663, "children": [670], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 33}}, {"id": 670, "type": "comma_expression", "text": "value, hsb", "parent": 669, "children": [671, 672], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 32}}, {"id": 671, "type": "identifier", "text": "value", "parent": 670, "children": [], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 27}}, {"id": 672, "type": "identifier", "text": "hsb", "parent": 670, "children": [], "start_point": {"row": 176, "column": 29}, "end_point": {"row": 176, "column": 32}}, {"id": 673, "type": "binary_expression", "text": "partialHSB<4>(value, hsb)", "parent": 623, "children": [674, 678, 679], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 33}}, {"id": 674, "type": "binary_expression", "text": "partialHSB<4", "parent": 673, "children": [675, 676, 677], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 20}}, {"id": 675, "type": "identifier", "text": "partialHSB", "parent": 674, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 18}}, {"id": 676, "type": "<", "text": "<", "parent": 674, "children": [], "start_point": {"row": 177, "column": 18}, "end_point": {"row": 177, "column": 19}}, {"id": 677, "type": "number_literal", "text": "4", "parent": 674, "children": [], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 20}}, {"id": 678, "type": ">", "text": ">", "parent": 673, "children": [], "start_point": {"row": 177, "column": 20}, "end_point": {"row": 177, "column": 21}}, {"id": 679, "type": "parenthesized_expression", "text": "(value, hsb)", "parent": 673, "children": [680], "start_point": {"row": 177, "column": 21}, "end_point": {"row": 177, "column": 33}}, {"id": 680, "type": "comma_expression", "text": "value, hsb", "parent": 679, "children": [681, 682], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 32}}, {"id": 681, "type": "identifier", "text": "value", "parent": 680, "children": [], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 27}}, {"id": 682, "type": "identifier", "text": "hsb", "parent": 680, "children": [], "start_point": {"row": 177, "column": 29}, "end_point": {"row": 177, "column": 32}}, {"id": 683, "type": "binary_expression", "text": "partialHSB<2>(value, hsb)", "parent": 623, "children": [684, 688, 689], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 33}}, {"id": 684, "type": "binary_expression", "text": "partialHSB<2", "parent": 683, "children": [685, 686, 687], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 20}}, {"id": 685, "type": "identifier", "text": "partialHSB", "parent": 684, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 18}}, {"id": 686, "type": "<", "text": "<", "parent": 684, "children": [], "start_point": {"row": 178, "column": 18}, "end_point": {"row": 178, "column": 19}}, {"id": 687, "type": "number_literal", "text": "2", "parent": 684, "children": [], "start_point": {"row": 178, "column": 19}, "end_point": {"row": 178, "column": 20}}, {"id": 688, "type": ">", "text": ">", "parent": 683, "children": [], "start_point": {"row": 178, "column": 20}, "end_point": {"row": 178, "column": 21}}, {"id": 689, "type": "parenthesized_expression", "text": "(value, hsb)", "parent": 683, "children": [690], "start_point": {"row": 178, "column": 21}, "end_point": {"row": 178, "column": 33}}, {"id": 690, "type": "comma_expression", "text": "value, hsb", "parent": 689, "children": [691, 692], "start_point": {"row": 178, "column": 22}, "end_point": {"row": 178, "column": 32}}, {"id": 691, "type": "identifier", "text": "value", "parent": 690, "children": [], "start_point": {"row": 178, "column": 22}, "end_point": {"row": 178, "column": 27}}, {"id": 692, "type": "identifier", "text": "hsb", "parent": 690, "children": [], "start_point": {"row": 178, "column": 29}, "end_point": {"row": 178, "column": 32}}, {"id": 693, "type": "binary_expression", "text": "partialHSB<1>(value, hsb)", "parent": 623, "children": [694, 698, 699], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 33}}, {"id": 694, "type": "binary_expression", "text": "partialHSB<1", "parent": 693, "children": [695, 696, 697], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 20}}, {"id": 695, "type": "identifier", "text": "partialHSB", "parent": 694, "children": [], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 18}}, {"id": 696, "type": "<", "text": "<", "parent": 694, "children": [], "start_point": {"row": 179, "column": 18}, "end_point": {"row": 179, "column": 19}}, {"id": 697, "type": "number_literal", "text": "1", "parent": 694, "children": [], "start_point": {"row": 179, "column": 19}, "end_point": {"row": 179, "column": 20}}, {"id": 698, "type": ">", "text": ">", "parent": 693, "children": [], "start_point": {"row": 179, "column": 20}, "end_point": {"row": 179, "column": 21}}, {"id": 699, "type": "parenthesized_expression", "text": "(value, hsb)", "parent": 693, "children": [700], "start_point": {"row": 179, "column": 21}, "end_point": {"row": 179, "column": 33}}, {"id": 700, "type": "comma_expression", "text": "value, hsb", "parent": 699, "children": [701, 702], "start_point": {"row": 179, "column": 22}, "end_point": {"row": 179, "column": 32}}, {"id": 701, "type": "identifier", "text": "value", "parent": 700, "children": [], "start_point": {"row": 179, "column": 22}, "end_point": {"row": 179, "column": 27}}, {"id": 702, "type": "identifier", "text": "hsb", "parent": 700, "children": [], "start_point": {"row": 179, "column": 29}, "end_point": {"row": 179, "column": 32}}, {"id": 703, "type": "return_statement", "text": "return hsb;", "parent": 623, "children": [704], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 19}}, {"id": 704, "type": "identifier", "text": "hsb", "parent": 703, "children": [], "start_point": {"row": 180, "column": 15}, "end_point": {"row": 180, "column": 18}}, {"id": 705, "type": "binary_expression", "text": "template<unsigned width>\n static", "parent": 161, "children": [706, 710, 712], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 195, "column": 10}}, {"id": 706, "type": "binary_expression", "text": "template<unsigned", "parent": 705, "children": [707, 708, 709], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 21}}, {"id": 707, "type": "identifier", "text": "template", "parent": 706, "children": [], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 12}}, {"id": 708, "type": "<", "text": "<", "parent": 706, "children": [], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 13}}, {"id": 709, "type": "identifier", "text": "unsigned", "parent": 706, "children": [], "start_point": {"row": 194, "column": 13}, "end_point": {"row": 194, "column": 21}}, {"id": 710, "type": "ERROR", "text": "width", "parent": 705, "children": [711], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 27}}, {"id": 711, "type": "identifier", "text": "width", "parent": 710, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 27}}, {"id": 712, "type": ">", "text": ">", "parent": 705, "children": [], "start_point": {"row": 194, "column": 27}, "end_point": {"row": 194, "column": 28}}, {"id": 713, "type": "function_definition", "text": "bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }", "parent": 161, "children": [714, 715], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 228, "column": 5}}, {"id": 714, "type": "primitive_type", "text": "bool", "parent": 713, "children": [], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 15}}, {"id": 715, "type": "function_declarator", "text": "findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)", "parent": 713, "children": [716, 717], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 90}}, {"id": 716, "type": "identifier", "text": "findBitRange", "parent": 715, "children": [], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 28}}, {"id": 717, "type": "parameter_list", "text": "(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)", "parent": 715, "children": [718, 721, 725, 729], "start_point": {"row": 195, "column": 28}, "end_point": {"row": 195, "column": 90}}, {"id": 718, "type": "parameter_declaration", "text": "uint64_t value", "parent": 717, "children": [719, 720], "start_point": {"row": 195, "column": 29}, "end_point": {"row": 195, "column": 43}}, {"id": 719, "type": "primitive_type", "text": "uint64_t", "parent": 718, "children": [], "start_point": {"row": 195, "column": 29}, "end_point": {"row": 195, "column": 37}}, {"id": 720, "type": "identifier", "text": "value", "parent": 718, "children": [], "start_point": {"row": 195, "column": 38}, "end_point": {"row": 195, "column": 43}}, {"id": 721, "type": "parameter_declaration", "text": "unsigned& hsb", "parent": 717, "children": [722, 724], "start_point": {"row": 195, "column": 45}, "end_point": {"row": 195, "column": 58}}, {"id": 722, "type": "sized_type_specifier", "text": "unsigned", "parent": 721, "children": [723], "start_point": {"row": 195, "column": 45}, "end_point": {"row": 195, "column": 53}}, {"id": 723, "type": "unsigned", "text": "unsigned", "parent": 722, "children": [], "start_point": {"row": 195, "column": 45}, "end_point": {"row": 195, "column": 53}}, {"id": 724, "type": "identifier", "text": "hsb", "parent": 721, "children": [], "start_point": {"row": 195, "column": 55}, "end_point": {"row": 195, "column": 58}}, {"id": 725, "type": "parameter_declaration", "text": "unsigned& lsb", "parent": 717, "children": [726, 728], "start_point": {"row": 195, "column": 60}, "end_point": {"row": 195, "column": 73}}, {"id": 726, "type": "sized_type_specifier", "text": "unsigned", "parent": 725, "children": [727], "start_point": {"row": 195, "column": 60}, "end_point": {"row": 195, "column": 68}}, {"id": 727, "type": "unsigned", "text": "unsigned", "parent": 726, "children": [], "start_point": {"row": 195, "column": 60}, "end_point": {"row": 195, "column": 68}}, {"id": 728, "type": "identifier", "text": "lsb", "parent": 725, "children": [], "start_point": {"row": 195, "column": 70}, "end_point": {"row": 195, "column": 73}}, {"id": 729, "type": "parameter_declaration", "text": "bool& inverted", "parent": 717, "children": [730, 731], "start_point": {"row": 195, "column": 75}, "end_point": {"row": 195, "column": 89}}, {"id": 730, "type": "primitive_type", "text": "bool", "parent": 729, "children": [], "start_point": {"row": 195, "column": 75}, "end_point": {"row": 195, "column": 79}}, {"id": 731, "type": "identifier", "text": "inverted", "parent": 729, "children": [], "start_point": {"row": 195, "column": 81}, "end_point": {"row": 195, "column": 89}}, {"id": 732, "type": "call_expression", "text": "ASSERT(value & mask(width - 1))", "parent": 713, "children": [733, 734], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 39}}, {"id": 733, "type": "identifier", "text": "ASSERT", "parent": 732, "children": [], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 14}}, {"id": 734, "type": "argument_list", "text": "(value & mask(width - 1))", "parent": 732, "children": [735], "start_point": {"row": 197, "column": 14}, "end_point": {"row": 197, "column": 39}}, {"id": 735, "type": "binary_expression", "text": "value & mask(width - 1)", "parent": 734, "children": [736, 737], "start_point": {"row": 197, "column": 15}, "end_point": {"row": 197, "column": 38}}, {"id": 736, "type": "identifier", "text": "value", "parent": 735, "children": [], "start_point": {"row": 197, "column": 15}, "end_point": {"row": 197, "column": 20}}, {"id": 737, "type": "call_expression", "text": "mask(width - 1)", "parent": 735, "children": [738, 739], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 38}}, {"id": 738, "type": "identifier", "text": "mask", "parent": 737, "children": [], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 27}}, {"id": 739, "type": "argument_list", "text": "(width - 1)", "parent": 737, "children": [740], "start_point": {"row": 197, "column": 27}, "end_point": {"row": 197, "column": 38}}, {"id": 740, "type": "binary_expression", "text": "width - 1", "parent": 739, "children": [741, 742, 743], "start_point": {"row": 197, "column": 28}, "end_point": {"row": 197, "column": 37}}, {"id": 741, "type": "identifier", "text": "width", "parent": 740, "children": [], "start_point": {"row": 197, "column": 28}, "end_point": {"row": 197, "column": 33}}, {"id": 742, "type": "-", "text": "-", "parent": 740, "children": [], "start_point": {"row": 197, "column": 34}, "end_point": {"row": 197, "column": 35}}, {"id": 743, "type": "number_literal", "text": "1", "parent": 740, "children": [], "start_point": {"row": 197, "column": 36}, "end_point": {"row": 197, "column": 37}}, {"id": 744, "type": "call_expression", "text": "ASSERT(value != mask(width - 1))", "parent": 713, "children": [745, 746], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 40}}, {"id": 745, "type": "identifier", "text": "ASSERT", "parent": 744, "children": [], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 14}}, {"id": 746, "type": "argument_list", "text": "(value != mask(width - 1))", "parent": 744, "children": [747], "start_point": {"row": 198, "column": 14}, "end_point": {"row": 198, "column": 40}}, {"id": 747, "type": "binary_expression", "text": "value != mask(width - 1)", "parent": 746, "children": [748, 749, 750], "start_point": {"row": 198, "column": 15}, "end_point": {"row": 198, "column": 39}}, {"id": 748, "type": "identifier", "text": "value", "parent": 747, "children": [], "start_point": {"row": 198, "column": 15}, "end_point": {"row": 198, "column": 20}}, {"id": 749, "type": "!=", "text": "!=", "parent": 747, "children": [], "start_point": {"row": 198, "column": 21}, "end_point": {"row": 198, "column": 23}}, {"id": 750, "type": "call_expression", "text": "mask(width - 1)", "parent": 747, "children": [751, 752], "start_point": {"row": 198, "column": 24}, "end_point": {"row": 198, "column": 39}}, {"id": 751, "type": "identifier", "text": "mask", "parent": 750, "children": [], "start_point": {"row": 198, "column": 24}, "end_point": {"row": 198, "column": 28}}, {"id": 752, "type": "argument_list", "text": "(width - 1)", "parent": 750, "children": [753], "start_point": {"row": 198, "column": 28}, "end_point": {"row": 198, "column": 39}}, {"id": 753, "type": "binary_expression", "text": "width - 1", "parent": 752, "children": [754, 755, 756], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 198, "column": 38}}, {"id": 754, "type": "identifier", "text": "width", "parent": 753, "children": [], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 198, "column": 34}}, {"id": 755, "type": "-", "text": "-", "parent": 753, "children": [], "start_point": {"row": 198, "column": 35}, "end_point": {"row": 198, "column": 36}}, {"id": 756, "type": "number_literal", "text": "1", "parent": 753, "children": [], "start_point": {"row": 198, "column": 37}, "end_point": {"row": 198, "column": 38}}, {"id": 757, "type": "call_expression", "text": "ASSERT(!(value & ~mask(width - 1)))", "parent": 713, "children": [758, 759], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 43}}, {"id": 758, "type": "identifier", "text": "ASSERT", "parent": 757, "children": [], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 14}}, {"id": 759, "type": "argument_list", "text": "(!(value & ~mask(width - 1)))", "parent": 757, "children": [760], "start_point": {"row": 199, "column": 14}, "end_point": {"row": 199, "column": 43}}, {"id": 760, "type": "unary_expression", "text": "!(value & ~mask(width - 1))", "parent": 759, "children": [761, 762], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 42}}, {"id": 761, "type": "!", "text": "!", "parent": 760, "children": [], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 16}}, {"id": 762, "type": "parenthesized_expression", "text": "(value & ~mask(width - 1))", "parent": 760, "children": [763], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 42}}, {"id": 763, "type": "binary_expression", "text": "value & ~mask(width - 1)", "parent": 762, "children": [764, 765], "start_point": {"row": 199, "column": 17}, "end_point": {"row": 199, "column": 41}}, {"id": 764, "type": "identifier", "text": "value", "parent": 763, "children": [], "start_point": {"row": 199, "column": 17}, "end_point": {"row": 199, "column": 22}}, {"id": 765, "type": "unary_expression", "text": "~mask(width - 1)", "parent": 763, "children": [766, 767], "start_point": {"row": 199, "column": 25}, "end_point": {"row": 199, "column": 41}}, {"id": 766, "type": "~", "text": "~", "parent": 765, "children": [], "start_point": {"row": 199, "column": 25}, "end_point": {"row": 199, "column": 26}}, {"id": 767, "type": "call_expression", "text": "mask(width - 1)", "parent": 765, "children": [768, 769], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 41}}, {"id": 768, "type": "identifier", "text": "mask", "parent": 767, "children": [], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 30}}, {"id": 769, "type": "argument_list", "text": "(width - 1)", "parent": 767, "children": [770], "start_point": {"row": 199, "column": 30}, "end_point": {"row": 199, "column": 41}}, {"id": 770, "type": "binary_expression", "text": "width - 1", "parent": 769, "children": [771, 772, 773], "start_point": {"row": 199, "column": 31}, "end_point": {"row": 199, "column": 40}}, {"id": 771, "type": "identifier", "text": "width", "parent": 770, "children": [], "start_point": {"row": 199, "column": 31}, "end_point": {"row": 199, "column": 36}}, {"id": 772, "type": "-", "text": "-", "parent": 770, "children": [], "start_point": {"row": 199, "column": 37}, "end_point": {"row": 199, "column": 38}}, {"id": 773, "type": "number_literal", "text": "1", "parent": 770, "children": [], "start_point": {"row": 199, "column": 39}, "end_point": {"row": 199, "column": 40}}, {"id": 774, "type": "declaration", "text": "const uint64_t msb = 1ull << (width - 1);", "parent": 713, "children": [775, 776], "start_point": {"row": 203, "column": 8}, "end_point": {"row": 203, "column": 49}}, {"id": 775, "type": "primitive_type", "text": "uint64_t", "parent": 774, "children": [], "start_point": {"row": 203, "column": 14}, "end_point": {"row": 203, "column": 22}}, {"id": 776, "type": "init_declarator", "text": "msb = 1ull << (width - 1)", "parent": 774, "children": [777, 778, 779], "start_point": {"row": 203, "column": 23}, "end_point": {"row": 203, "column": 48}}, {"id": 777, "type": "identifier", "text": "msb", "parent": 776, "children": [], "start_point": {"row": 203, "column": 23}, "end_point": {"row": 203, "column": 26}}, {"id": 778, "type": "=", "text": "=", "parent": 776, "children": [], "start_point": {"row": 203, "column": 27}, "end_point": {"row": 203, "column": 28}}, {"id": 779, "type": "binary_expression", "text": "1ull << (width - 1)", "parent": 776, "children": [780, 781, 782], "start_point": {"row": 203, "column": 29}, "end_point": {"row": 203, "column": 48}}, {"id": 780, "type": "number_literal", "text": "1ull", "parent": 779, "children": [], "start_point": {"row": 203, "column": 29}, "end_point": {"row": 203, "column": 33}}, {"id": 781, "type": "<<", "text": "<<", "parent": 779, "children": [], "start_point": {"row": 203, "column": 34}, "end_point": {"row": 203, "column": 36}}, {"id": 782, "type": "parenthesized_expression", "text": "(width - 1)", "parent": 779, "children": [783], "start_point": {"row": 203, "column": 37}, "end_point": {"row": 203, "column": 48}}, {"id": 783, "type": "binary_expression", "text": "width - 1", "parent": 782, "children": [784, 785, 786], "start_point": {"row": 203, "column": 38}, "end_point": {"row": 203, "column": 47}}, {"id": 784, "type": "identifier", "text": "width", "parent": 783, "children": [], "start_point": {"row": 203, "column": 38}, "end_point": {"row": 203, "column": 43}}, {"id": 785, "type": "-", "text": "-", "parent": 783, "children": [], "start_point": {"row": 203, "column": 44}, "end_point": {"row": 203, "column": 45}}, {"id": 786, "type": "number_literal", "text": "1", "parent": 783, "children": [], "start_point": {"row": 203, "column": 46}, "end_point": {"row": 203, "column": 47}}, {"id": 787, "type": "if_statement", "text": "if ((inverted = (value & msb)))\n value ^= mask(width - 1);", "parent": 713, "children": [788], "start_point": {"row": 204, "column": 8}, "end_point": {"row": 205, "column": 37}}, {"id": 788, "type": "parenthesized_expression", "text": "((inverted = (value & msb)))", "parent": 787, "children": [789], "start_point": {"row": 204, "column": 11}, "end_point": {"row": 204, "column": 39}}, {"id": 789, "type": "parenthesized_expression", "text": "(inverted = (value & msb))", "parent": 788, "children": [790], "start_point": {"row": 204, "column": 12}, "end_point": {"row": 204, "column": 38}}, {"id": 790, "type": "assignment_expression", "text": "inverted = (value & msb)", "parent": 789, "children": [791, 792, 793], "start_point": {"row": 204, "column": 13}, "end_point": {"row": 204, "column": 37}}, {"id": 791, "type": "identifier", "text": "inverted", "parent": 790, "children": [], "start_point": {"row": 204, "column": 13}, "end_point": {"row": 204, "column": 21}}, {"id": 792, "type": "=", "text": "=", "parent": 790, "children": [], "start_point": {"row": 204, "column": 22}, "end_point": {"row": 204, "column": 23}}, {"id": 793, "type": "parenthesized_expression", "text": "(value & msb)", "parent": 790, "children": [794], "start_point": {"row": 204, "column": 24}, "end_point": {"row": 204, "column": 37}}, {"id": 794, "type": "binary_expression", "text": "value & msb", "parent": 793, "children": [795, 796], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 36}}, {"id": 795, "type": "identifier", "text": "value", "parent": 794, "children": [], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 30}}, {"id": 796, "type": "identifier", "text": "msb", "parent": 794, "children": [], "start_point": {"row": 204, "column": 33}, "end_point": {"row": 204, "column": 36}}, {"id": 797, "type": "assignment_expression", "text": "value ^= mask(width - 1)", "parent": 787, "children": [798, 799, 800], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 36}}, {"id": 798, "type": "identifier", "text": "value", "parent": 797, "children": [], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 17}}, {"id": 799, "type": "^=", "text": "^=", "parent": 797, "children": [], "start_point": {"row": 205, "column": 18}, "end_point": {"row": 205, "column": 20}}, {"id": 800, "type": "call_expression", "text": "mask(width - 1)", "parent": 797, "children": [801, 802], "start_point": {"row": 205, "column": 21}, "end_point": {"row": 205, "column": 36}}, {"id": 801, "type": "identifier", "text": "mask", "parent": 800, "children": [], "start_point": {"row": 205, "column": 21}, "end_point": {"row": 205, "column": 25}}, {"id": 802, "type": "argument_list", "text": "(width - 1)", "parent": 800, "children": [803], "start_point": {"row": 205, "column": 25}, "end_point": {"row": 205, "column": 36}}, {"id": 803, "type": "binary_expression", "text": "width - 1", "parent": 802, "children": [804, 805, 806], "start_point": {"row": 205, "column": 26}, "end_point": {"row": 205, "column": 35}}, {"id": 804, "type": "identifier", "text": "width", "parent": 803, "children": [], "start_point": {"row": 205, "column": 26}, "end_point": {"row": 205, "column": 31}}, {"id": 805, "type": "-", "text": "-", "parent": 803, "children": [], "start_point": {"row": 205, "column": 32}, "end_point": {"row": 205, "column": 33}}, {"id": 806, "type": "number_literal", "text": "1", "parent": 803, "children": [], "start_point": {"row": 205, "column": 34}, "end_point": {"row": 205, "column": 35}}, {"id": 807, "type": "assignment_expression", "text": "hsb = highestSetBit(value)", "parent": 713, "children": [808, 809, 810], "start_point": {"row": 209, "column": 8}, "end_point": {"row": 209, "column": 34}}, {"id": 808, "type": "identifier", "text": "hsb", "parent": 807, "children": [], "start_point": {"row": 209, "column": 8}, "end_point": {"row": 209, "column": 11}}, {"id": 809, "type": "=", "text": "=", "parent": 807, "children": [], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 13}}, {"id": 810, "type": "call_expression", "text": "highestSetBit(value)", "parent": 807, "children": [811, 812], "start_point": {"row": 209, "column": 14}, "end_point": {"row": 209, "column": 34}}, {"id": 811, "type": "identifier", "text": "highestSetBit", "parent": 810, "children": [], "start_point": {"row": 209, "column": 14}, "end_point": {"row": 209, "column": 27}}, {"id": 812, "type": "argument_list", "text": "(value)", "parent": 810, "children": [813], "start_point": {"row": 209, "column": 27}, "end_point": {"row": 209, "column": 34}}, {"id": 813, "type": "identifier", "text": "value", "parent": 812, "children": [], "start_point": {"row": 209, "column": 28}, "end_point": {"row": 209, "column": 33}}, {"id": 814, "type": "assignment_expression", "text": "value ^= mask(hsb)", "parent": 713, "children": [815, 816, 817], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 26}}, {"id": 815, "type": "identifier", "text": "value", "parent": 814, "children": [], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 13}}, {"id": 816, "type": "^=", "text": "^=", "parent": 814, "children": [], "start_point": {"row": 210, "column": 14}, "end_point": {"row": 210, "column": 16}}, {"id": 817, "type": "call_expression", "text": "mask(hsb)", "parent": 814, "children": [818, 819], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 26}}, {"id": 818, "type": "identifier", "text": "mask", "parent": 817, "children": [], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 21}}, {"id": 819, "type": "argument_list", "text": "(hsb)", "parent": 817, "children": [820], "start_point": {"row": 210, "column": 21}, "end_point": {"row": 210, "column": 26}}, {"id": 820, "type": "identifier", "text": "hsb", "parent": 819, "children": [], "start_point": {"row": 210, "column": 22}, "end_point": {"row": 210, "column": 25}}, {"id": 821, "type": "if_statement", "text": "if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }", "parent": 713, "children": [822], "start_point": {"row": 211, "column": 8}, "end_point": {"row": 215, "column": 9}}, {"id": 822, "type": "parenthesized_expression", "text": "(!value)", "parent": 821, "children": [823], "start_point": {"row": 211, "column": 11}, "end_point": {"row": 211, "column": 19}}, {"id": 823, "type": "unary_expression", "text": "!value", "parent": 822, "children": [824, 825], "start_point": {"row": 211, "column": 12}, "end_point": {"row": 211, "column": 18}}, {"id": 824, "type": "!", "text": "!", "parent": 823, "children": [], "start_point": {"row": 211, "column": 12}, "end_point": {"row": 211, "column": 13}}, {"id": 825, "type": "identifier", "text": "value", "parent": 823, "children": [], "start_point": {"row": 211, "column": 13}, "end_point": {"row": 211, "column": 18}}, {"id": 826, "type": "assignment_expression", "text": "lsb = 0", "parent": 821, "children": [827, 828, 829], "start_point": {"row": 213, "column": 12}, "end_point": {"row": 213, "column": 19}}, {"id": 827, "type": "identifier", "text": "lsb", "parent": 826, "children": [], "start_point": {"row": 213, "column": 12}, "end_point": {"row": 213, "column": 15}}, {"id": 828, "type": "=", "text": "=", "parent": 826, "children": [], "start_point": {"row": 213, "column": 16}, "end_point": {"row": 213, "column": 17}}, {"id": 829, "type": "number_literal", "text": "0", "parent": 826, "children": [], "start_point": {"row": 213, "column": 18}, "end_point": {"row": 213, "column": 19}}, {"id": 830, "type": "return_statement", "text": "return true;", "parent": 821, "children": [831], "start_point": {"row": 214, "column": 12}, "end_point": {"row": 214, "column": 24}}, {"id": 831, "type": "true", "text": "true", "parent": 830, "children": [], "start_point": {"row": 214, "column": 19}, "end_point": {"row": 214, "column": 23}}, {"id": 832, "type": "assignment_expression", "text": "lsb = highestSetBit(value)", "parent": 713, "children": [833, 834, 835], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 34}}, {"id": 833, "type": "identifier", "text": "lsb", "parent": 832, "children": [], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 11}}, {"id": 834, "type": "=", "text": "=", "parent": 832, "children": [], "start_point": {"row": 218, "column": 12}, "end_point": {"row": 218, "column": 13}}, {"id": 835, "type": "call_expression", "text": "highestSetBit(value)", "parent": 832, "children": [836, 837], "start_point": {"row": 218, "column": 14}, "end_point": {"row": 218, "column": 34}}, {"id": 836, "type": "identifier", "text": "highestSetBit", "parent": 835, "children": [], "start_point": {"row": 218, "column": 14}, "end_point": {"row": 218, "column": 27}}, {"id": 837, "type": "argument_list", "text": "(value)", "parent": 835, "children": [838], "start_point": {"row": 218, "column": 27}, "end_point": {"row": 218, "column": 34}}, {"id": 838, "type": "identifier", "text": "value", "parent": 837, "children": [], "start_point": {"row": 218, "column": 28}, "end_point": {"row": 218, "column": 33}}, {"id": 839, "type": "assignment_expression", "text": "value ^= mask(lsb)", "parent": 713, "children": [840, 841, 842], "start_point": {"row": 219, "column": 8}, "end_point": {"row": 219, "column": 26}}, {"id": 840, "type": "identifier", "text": "value", "parent": 839, "children": [], "start_point": {"row": 219, "column": 8}, "end_point": {"row": 219, "column": 13}}, {"id": 841, "type": "^=", "text": "^=", "parent": 839, "children": [], "start_point": {"row": 219, "column": 14}, "end_point": {"row": 219, "column": 16}}, {"id": 842, "type": "call_expression", "text": "mask(lsb)", "parent": 839, "children": [843, 844], "start_point": {"row": 219, "column": 17}, "end_point": {"row": 219, "column": 26}}, {"id": 843, "type": "identifier", "text": "mask", "parent": 842, "children": [], "start_point": {"row": 219, "column": 17}, "end_point": {"row": 219, "column": 21}}, {"id": 844, "type": "argument_list", "text": "(lsb)", "parent": 842, "children": [845], "start_point": {"row": 219, "column": 21}, "end_point": {"row": 219, "column": 26}}, {"id": 845, "type": "identifier", "text": "lsb", "parent": 844, "children": [], "start_point": {"row": 219, "column": 22}, "end_point": {"row": 219, "column": 25}}, {"id": 846, "type": "if_statement", "text": "if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }", "parent": 713, "children": [847], "start_point": {"row": 220, "column": 8}, "end_point": {"row": 225, "column": 9}}, {"id": 847, "type": "parenthesized_expression", "text": "(!value)", "parent": 846, "children": [848], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 220, "column": 19}}, {"id": 848, "type": "unary_expression", "text": "!value", "parent": 847, "children": [849, 850], "start_point": {"row": 220, "column": 12}, "end_point": {"row": 220, "column": 18}}, {"id": 849, "type": "!", "text": "!", "parent": 848, "children": [], "start_point": {"row": 220, "column": 12}, "end_point": {"row": 220, "column": 13}}, {"id": 850, "type": "identifier", "text": "value", "parent": 848, "children": [], "start_point": {"row": 220, "column": 13}, "end_point": {"row": 220, "column": 18}}, {"id": 851, "type": "update_expression", "text": "++lsb", "parent": 846, "children": [852, 853], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 17}}, {"id": 852, "type": "++", "text": "++", "parent": 851, "children": [], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 14}}, {"id": 853, "type": "identifier", "text": "lsb", "parent": 851, "children": [], "start_point": {"row": 223, "column": 14}, "end_point": {"row": 223, "column": 17}}, {"id": 854, "type": "return_statement", "text": "return true;", "parent": 846, "children": [855], "start_point": {"row": 224, "column": 12}, "end_point": {"row": 224, "column": 24}}, {"id": 855, "type": "true", "text": "true", "parent": 854, "children": [], "start_point": {"row": 224, "column": 19}, "end_point": {"row": 224, "column": 23}}, {"id": 856, "type": "return_statement", "text": "return false;", "parent": 713, "children": [857], "start_point": {"row": 227, "column": 8}, "end_point": {"row": 227, "column": 21}}, {"id": 857, "type": "false", "text": "false", "parent": 856, "children": [], "start_point": {"row": 227, "column": 15}, "end_point": {"row": 227, "column": 20}}, {"id": 858, "type": "binary_expression", "text": "template<unsigned width>\n static", "parent": 161, "children": [859, 863, 865], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 232, "column": 10}}, {"id": 859, "type": "binary_expression", "text": "template<unsigned", "parent": 858, "children": [860, 861, 862], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 21}}, {"id": 860, "type": "identifier", "text": "template", "parent": 859, "children": [], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 12}}, {"id": 861, "type": "<", "text": "<", "parent": 859, "children": [], "start_point": {"row": 231, "column": 12}, "end_point": {"row": 231, "column": 13}}, {"id": 862, "type": "identifier", "text": "unsigned", "parent": 859, "children": [], "start_point": {"row": 231, "column": 13}, "end_point": {"row": 231, "column": 21}}, {"id": 863, "type": "ERROR", "text": "width", "parent": 858, "children": [864], "start_point": {"row": 231, "column": 22}, "end_point": {"row": 231, "column": 27}}, {"id": 864, "type": "identifier", "text": "width", "parent": 863, "children": [], "start_point": {"row": 231, "column": 22}, "end_point": {"row": 231, "column": 27}}, {"id": 865, "type": ">", "text": ">", "parent": 858, "children": [], "start_point": {"row": 231, "column": 27}, "end_point": {"row": 231, "column": 28}}, {"id": 866, "type": "function_definition", "text": "int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }", "parent": 161, "children": [867, 868], "start_point": {"row": 232, "column": 11}, "end_point": {"row": 275, "column": 5}}, {"id": 867, "type": "primitive_type", "text": "int", "parent": 866, "children": [], "start_point": {"row": 232, "column": 11}, "end_point": {"row": 232, "column": 14}}, {"id": 868, "type": "function_declarator", "text": "encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)", "parent": 866, "children": [869, 870], "start_point": {"row": 232, "column": 15}, "end_point": {"row": 232, "column": 80}}, {"id": 869, "type": "identifier", "text": "encodeLogicalImmediate", "parent": 868, "children": [], "start_point": {"row": 232, "column": 15}, "end_point": {"row": 232, "column": 37}}, {"id": 870, "type": "parameter_list", "text": "(unsigned hsb, unsigned lsb, bool inverted)", "parent": 868, "children": [871, 875, 879], "start_point": {"row": 232, "column": 37}, "end_point": {"row": 232, "column": 80}}, {"id": 871, "type": "parameter_declaration", "text": "unsigned hsb", "parent": 870, "children": [872, 874], "start_point": {"row": 232, "column": 38}, "end_point": {"row": 232, "column": 50}}, {"id": 872, "type": "sized_type_specifier", "text": "unsigned", "parent": 871, "children": [873], "start_point": {"row": 232, "column": 38}, "end_point": {"row": 232, "column": 46}}, {"id": 873, "type": "unsigned", "text": "unsigned", "parent": 872, "children": [], "start_point": {"row": 232, "column": 38}, "end_point": {"row": 232, "column": 46}}, {"id": 874, "type": "identifier", "text": "hsb", "parent": 871, "children": [], "start_point": {"row": 232, "column": 47}, "end_point": {"row": 232, "column": 50}}, {"id": 875, "type": "parameter_declaration", "text": "unsigned lsb", "parent": 870, "children": [876, 878], "start_point": {"row": 232, "column": 52}, "end_point": {"row": 232, "column": 64}}, {"id": 876, "type": "sized_type_specifier", "text": "unsigned", "parent": 875, "children": [877], "start_point": {"row": 232, "column": 52}, "end_point": {"row": 232, "column": 60}}, {"id": 877, "type": "unsigned", "text": "unsigned", "parent": 876, "children": [], "start_point": {"row": 232, "column": 52}, "end_point": {"row": 232, "column": 60}}, {"id": 878, "type": "identifier", "text": "lsb", "parent": 875, "children": [], "start_point": {"row": 232, "column": 61}, "end_point": {"row": 232, "column": 64}}, {"id": 879, "type": "parameter_declaration", "text": "bool inverted", "parent": 870, "children": [880, 881], "start_point": {"row": 232, "column": 66}, "end_point": {"row": 232, "column": 79}}, {"id": 880, "type": "primitive_type", "text": "bool", "parent": 879, "children": [], "start_point": {"row": 232, "column": 66}, "end_point": {"row": 232, "column": 70}}, {"id": 881, "type": "identifier", "text": "inverted", "parent": 879, "children": [], "start_point": {"row": 232, "column": 71}, "end_point": {"row": 232, "column": 79}}, {"id": 882, "type": "call_expression", "text": "ASSERT(!(width & (width -1)))", "parent": 866, "children": [883, 884], "start_point": {"row": 235, "column": 8}, "end_point": {"row": 235, "column": 37}}, {"id": 883, "type": "identifier", "text": "ASSERT", "parent": 882, "children": [], "start_point": {"row": 235, "column": 8}, "end_point": {"row": 235, "column": 14}}, {"id": 884, "type": "argument_list", "text": "(!(width & (width -1)))", "parent": 882, "children": [885], "start_point": {"row": 235, "column": 14}, "end_point": {"row": 235, "column": 37}}, {"id": 885, "type": "unary_expression", "text": "!(width & (width -1))", "parent": 884, "children": [886, 887], "start_point": {"row": 235, "column": 15}, "end_point": {"row": 235, "column": 36}}, {"id": 886, "type": "!", "text": "!", "parent": 885, "children": [], "start_point": {"row": 235, "column": 15}, "end_point": {"row": 235, "column": 16}}, {"id": 887, "type": "parenthesized_expression", "text": "(width & (width -1))", "parent": 885, "children": [888], "start_point": {"row": 235, "column": 16}, "end_point": {"row": 235, "column": 36}}, {"id": 888, "type": "binary_expression", "text": "width & (width -1)", "parent": 887, "children": [889, 890], "start_point": {"row": 235, "column": 17}, "end_point": {"row": 235, "column": 35}}, {"id": 889, "type": "identifier", "text": "width", "parent": 888, "children": [], "start_point": {"row": 235, "column": 17}, "end_point": {"row": 235, "column": 22}}, {"id": 890, "type": "parenthesized_expression", "text": "(width -1)", "parent": 888, "children": [891], "start_point": {"row": 235, "column": 25}, "end_point": {"row": 235, "column": 35}}, {"id": 891, "type": "binary_expression", "text": "width -1", "parent": 890, "children": [892, 893, 894], "start_point": {"row": 235, "column": 26}, "end_point": {"row": 235, "column": 34}}, {"id": 892, "type": "identifier", "text": "width", "parent": 891, "children": [], "start_point": {"row": 235, "column": 26}, "end_point": {"row": 235, "column": 31}}, {"id": 893, "type": "-", "text": "-", "parent": 891, "children": [], "start_point": {"row": 235, "column": 32}, "end_point": {"row": 235, "column": 33}}, {"id": 894, "type": "number_literal", "text": "1", "parent": 891, "children": [], "start_point": {"row": 235, "column": 33}, "end_point": {"row": 235, "column": 34}}, {"id": 895, "type": "call_expression", "text": "ASSERT(width <= 64 && width >= 2)", "parent": 866, "children": [896, 897], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 41}}, {"id": 896, "type": "identifier", "text": "ASSERT", "parent": 895, "children": [], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 14}}, {"id": 897, "type": "argument_list", "text": "(width <= 64 && width >= 2)", "parent": 895, "children": [898], "start_point": {"row": 236, "column": 14}, "end_point": {"row": 236, "column": 41}}, {"id": 898, "type": "binary_expression", "text": "width <= 64 && width >= 2", "parent": 897, "children": [899, 903, 904], "start_point": {"row": 236, "column": 15}, "end_point": {"row": 236, "column": 40}}, {"id": 899, "type": "binary_expression", "text": "width <= 64", "parent": 898, "children": [900, 901, 902], "start_point": {"row": 236, "column": 15}, "end_point": {"row": 236, "column": 26}}, {"id": 900, "type": "identifier", "text": "width", "parent": 899, "children": [], "start_point": {"row": 236, "column": 15}, "end_point": {"row": 236, "column": 20}}, {"id": 901, "type": "<=", "text": "<=", "parent": 899, "children": [], "start_point": {"row": 236, "column": 21}, "end_point": {"row": 236, "column": 23}}, {"id": 902, "type": "number_literal", "text": "64", "parent": 899, "children": [], "start_point": {"row": 236, "column": 24}, "end_point": {"row": 236, "column": 26}}, {"id": 903, "type": "&&", "text": "&&", "parent": 898, "children": [], "start_point": {"row": 236, "column": 27}, "end_point": {"row": 236, "column": 29}}, {"id": 904, "type": "binary_expression", "text": "width >= 2", "parent": 898, "children": [905, 906, 907], "start_point": {"row": 236, "column": 30}, "end_point": {"row": 236, "column": 40}}, {"id": 905, "type": "identifier", "text": "width", "parent": 904, "children": [], "start_point": {"row": 236, "column": 30}, "end_point": {"row": 236, "column": 35}}, {"id": 906, "type": ">=", "text": ">=", "parent": 904, "children": [], "start_point": {"row": 236, "column": 36}, "end_point": {"row": 236, "column": 38}}, {"id": 907, "type": "number_literal", "text": "2", "parent": 904, "children": [], "start_point": {"row": 236, "column": 39}, "end_point": {"row": 236, "column": 40}}, {"id": 908, "type": "call_expression", "text": "ASSERT(hsb >= lsb)", "parent": 866, "children": [909, 910], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 26}}, {"id": 909, "type": "identifier", "text": "ASSERT", "parent": 908, "children": [], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 14}}, {"id": 910, "type": "argument_list", "text": "(hsb >= lsb)", "parent": 908, "children": [911], "start_point": {"row": 237, "column": 14}, "end_point": {"row": 237, "column": 26}}, {"id": 911, "type": "binary_expression", "text": "hsb >= lsb", "parent": 910, "children": [912, 913, 914], "start_point": {"row": 237, "column": 15}, "end_point": {"row": 237, "column": 25}}, {"id": 912, "type": "identifier", "text": "hsb", "parent": 911, "children": [], "start_point": {"row": 237, "column": 15}, "end_point": {"row": 237, "column": 18}}, {"id": 913, "type": ">=", "text": ">=", "parent": 911, "children": [], "start_point": {"row": 237, "column": 19}, "end_point": {"row": 237, "column": 21}}, {"id": 914, "type": "identifier", "text": "lsb", "parent": 911, "children": [], "start_point": {"row": 237, "column": 22}, "end_point": {"row": 237, "column": 25}}, {"id": 915, "type": "call_expression", "text": "ASSERT(hsb < width)", "parent": 866, "children": [916, 917], "start_point": {"row": 238, "column": 8}, "end_point": {"row": 238, "column": 27}}, {"id": 916, "type": "identifier", "text": "ASSERT", "parent": 915, "children": [], "start_point": {"row": 238, "column": 8}, "end_point": {"row": 238, "column": 14}}, {"id": 917, "type": "argument_list", "text": "(hsb < width)", "parent": 915, "children": [918], "start_point": {"row": 238, "column": 14}, "end_point": {"row": 238, "column": 27}}, {"id": 918, "type": "binary_expression", "text": "hsb < width", "parent": 917, "children": [919, 920, 921], "start_point": {"row": 238, "column": 15}, "end_point": {"row": 238, "column": 26}}, {"id": 919, "type": "identifier", "text": "hsb", "parent": 918, "children": [], "start_point": {"row": 238, "column": 15}, "end_point": {"row": 238, "column": 18}}, {"id": 920, "type": "<", "text": "<", "parent": 918, "children": [], "start_point": {"row": 238, "column": 19}, "end_point": {"row": 238, "column": 20}}, {"id": 921, "type": "identifier", "text": "width", "parent": 918, "children": [], "start_point": {"row": 238, "column": 21}, "end_point": {"row": 238, "column": 26}}, {"id": 922, "type": "declaration", "text": "int immN = 0;", "parent": 866, "children": [923, 924], "start_point": {"row": 240, "column": 8}, "end_point": {"row": 240, "column": 21}}, {"id": 923, "type": "primitive_type", "text": "int", "parent": 922, "children": [], "start_point": {"row": 240, "column": 8}, "end_point": {"row": 240, "column": 11}}, {"id": 924, "type": "init_declarator", "text": "immN = 0", "parent": 922, "children": [925, 926, 927], "start_point": {"row": 240, "column": 12}, "end_point": {"row": 240, "column": 20}}, {"id": 925, "type": "identifier", "text": "immN", "parent": 924, "children": [], "start_point": {"row": 240, "column": 12}, "end_point": {"row": 240, "column": 16}}, {"id": 926, "type": "=", "text": "=", "parent": 924, "children": [], "start_point": {"row": 240, "column": 17}, "end_point": {"row": 240, "column": 18}}, {"id": 927, "type": "number_literal", "text": "0", "parent": 924, "children": [], "start_point": {"row": 240, "column": 19}, "end_point": {"row": 240, "column": 20}}, {"id": 928, "type": "declaration", "text": "int imms = 0;", "parent": 866, "children": [929, 930], "start_point": {"row": 241, "column": 8}, "end_point": {"row": 241, "column": 21}}, {"id": 929, "type": "primitive_type", "text": "int", "parent": 928, "children": [], "start_point": {"row": 241, "column": 8}, "end_point": {"row": 241, "column": 11}}, {"id": 930, "type": "init_declarator", "text": "imms = 0", "parent": 928, "children": [931, 932, 933], "start_point": {"row": 241, "column": 12}, "end_point": {"row": 241, "column": 20}}, {"id": 931, "type": "identifier", "text": "imms", "parent": 930, "children": [], "start_point": {"row": 241, "column": 12}, "end_point": {"row": 241, "column": 16}}, {"id": 932, "type": "=", "text": "=", "parent": 930, "children": [], "start_point": {"row": 241, "column": 17}, "end_point": {"row": 241, "column": 18}}, {"id": 933, "type": "number_literal", "text": "0", "parent": 930, "children": [], "start_point": {"row": 241, "column": 19}, "end_point": {"row": 241, "column": 20}}, {"id": 934, "type": "declaration", "text": "int immr = 0;", "parent": 866, "children": [935, 936], "start_point": {"row": 242, "column": 8}, "end_point": {"row": 242, "column": 21}}, {"id": 935, "type": "primitive_type", "text": "int", "parent": 934, "children": [], "start_point": {"row": 242, "column": 8}, "end_point": {"row": 242, "column": 11}}, {"id": 936, "type": "init_declarator", "text": "immr = 0", "parent": 934, "children": [937, 938, 939], "start_point": {"row": 242, "column": 12}, "end_point": {"row": 242, "column": 20}}, {"id": 937, "type": "identifier", "text": "immr", "parent": 936, "children": [], "start_point": {"row": 242, "column": 12}, "end_point": {"row": 242, "column": 16}}, {"id": 938, "type": "=", "text": "=", "parent": 936, "children": [], "start_point": {"row": 242, "column": 17}, "end_point": {"row": 242, "column": 18}}, {"id": 939, "type": "number_literal", "text": "0", "parent": 936, "children": [], "start_point": {"row": 242, "column": 19}, "end_point": {"row": 242, "column": 20}}, {"id": 940, "type": "if_statement", "text": "if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);", "parent": 866, "children": [941, 950], "start_point": {"row": 252, "column": 8}, "end_point": {"row": 255, "column": 45}}, {"id": 941, "type": "parenthesized_expression", "text": "(width == 64)", "parent": 940, "children": [942], "start_point": {"row": 252, "column": 11}, "end_point": {"row": 252, "column": 24}}, {"id": 942, "type": "binary_expression", "text": "width == 64", "parent": 941, "children": [943, 944, 945], "start_point": {"row": 252, "column": 12}, "end_point": {"row": 252, "column": 23}}, {"id": 943, "type": "identifier", "text": "width", "parent": 942, "children": [], "start_point": {"row": 252, "column": 12}, "end_point": {"row": 252, "column": 17}}, {"id": 944, "type": "==", "text": "==", "parent": 942, "children": [], "start_point": {"row": 252, "column": 18}, "end_point": {"row": 252, "column": 20}}, {"id": 945, "type": "number_literal", "text": "64", "parent": 942, "children": [], "start_point": {"row": 252, "column": 21}, "end_point": {"row": 252, "column": 23}}, {"id": 946, "type": "assignment_expression", "text": "immN = 1", "parent": 940, "children": [947, 948, 949], "start_point": {"row": 253, "column": 12}, "end_point": {"row": 253, "column": 20}}, {"id": 947, "type": "identifier", "text": "immN", "parent": 946, "children": [], "start_point": {"row": 253, "column": 12}, "end_point": {"row": 253, "column": 16}}, {"id": 948, "type": "=", "text": "=", "parent": 946, "children": [], "start_point": {"row": 253, "column": 17}, "end_point": {"row": 253, "column": 18}}, {"id": 949, "type": "number_literal", "text": "1", "parent": 946, "children": [], "start_point": {"row": 253, "column": 19}, "end_point": {"row": 253, "column": 20}}, {"id": 950, "type": "else_clause", "text": "else\n imms = 63 & ~(width + width - 1);", "parent": 940, "children": [], "start_point": {"row": 254, "column": 8}, "end_point": {"row": 255, "column": 45}}, {"id": 951, "type": "assignment_expression", "text": "imms = 63 & ~(width + width - 1)", "parent": 950, "children": [952, 953, 954], "start_point": {"row": 255, "column": 12}, "end_point": {"row": 255, "column": 44}}, {"id": 952, "type": "identifier", "text": "imms", "parent": 951, "children": [], "start_point": {"row": 255, "column": 12}, "end_point": {"row": 255, "column": 16}}, {"id": 953, "type": "=", "text": "=", "parent": 951, "children": [], "start_point": {"row": 255, "column": 17}, "end_point": {"row": 255, "column": 18}}, {"id": 954, "type": "binary_expression", "text": "63 & ~(width + width - 1)", "parent": 951, "children": [955, 956], "start_point": {"row": 255, "column": 19}, "end_point": {"row": 255, "column": 44}}, {"id": 955, "type": "number_literal", "text": "63", "parent": 954, "children": [], "start_point": {"row": 255, "column": 19}, "end_point": {"row": 255, "column": 21}}, {"id": 956, "type": "unary_expression", "text": "~(width + width - 1)", "parent": 954, "children": [957, 958], "start_point": {"row": 255, "column": 24}, "end_point": {"row": 255, "column": 44}}, {"id": 957, "type": "~", "text": "~", "parent": 956, "children": [], "start_point": {"row": 255, "column": 24}, "end_point": {"row": 255, "column": 25}}, {"id": 958, "type": "parenthesized_expression", "text": "(width + width - 1)", "parent": 956, "children": [959], "start_point": {"row": 255, "column": 25}, "end_point": {"row": 255, "column": 44}}, {"id": 959, "type": "binary_expression", "text": "width + width - 1", "parent": 958, "children": [960, 964, 965], "start_point": {"row": 255, "column": 26}, "end_point": {"row": 255, "column": 43}}, {"id": 960, "type": "binary_expression", "text": "width + width", "parent": 959, "children": [961, 962, 963], "start_point": {"row": 255, "column": 26}, "end_point": {"row": 255, "column": 39}}, {"id": 961, "type": "identifier", "text": "width", "parent": 960, "children": [], "start_point": {"row": 255, "column": 26}, "end_point": {"row": 255, "column": 31}}, {"id": 962, "type": "+", "text": "+", "parent": 960, "children": [], "start_point": {"row": 255, "column": 32}, "end_point": {"row": 255, "column": 33}}, {"id": 963, "type": "identifier", "text": "width", "parent": 960, "children": [], "start_point": {"row": 255, "column": 34}, "end_point": {"row": 255, "column": 39}}, {"id": 964, "type": "-", "text": "-", "parent": 959, "children": [], "start_point": {"row": 255, "column": 40}, "end_point": {"row": 255, "column": 41}}, {"id": 965, "type": "number_literal", "text": "1", "parent": 959, "children": [], "start_point": {"row": 255, "column": 42}, "end_point": {"row": 255, "column": 43}}, {"id": 966, "type": "if_statement", "text": "if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }", "parent": 866, "children": [967, 999], "start_point": {"row": 257, "column": 8}, "end_point": {"row": 272, "column": 9}}, {"id": 967, "type": "parenthesized_expression", "text": "(inverted)", "parent": 966, "children": [968], "start_point": {"row": 257, "column": 11}, "end_point": {"row": 257, "column": 21}}, {"id": 968, "type": "identifier", "text": "inverted", "parent": 967, "children": [], "start_point": {"row": 257, "column": 12}, "end_point": {"row": 257, "column": 20}}, {"id": 969, "type": "assignment_expression", "text": "immr = (width - 1) - hsb", "parent": 966, "children": [970, 971, 972], "start_point": {"row": 262, "column": 12}, "end_point": {"row": 262, "column": 36}}, {"id": 970, "type": "identifier", "text": "immr", "parent": 969, "children": [], "start_point": {"row": 262, "column": 12}, "end_point": {"row": 262, "column": 16}}, {"id": 971, "type": "=", "text": "=", "parent": 969, "children": [], "start_point": {"row": 262, "column": 17}, "end_point": {"row": 262, "column": 18}}, {"id": 972, "type": "binary_expression", "text": "(width - 1) - hsb", "parent": 969, "children": [973, 978, 979], "start_point": {"row": 262, "column": 19}, "end_point": {"row": 262, "column": 36}}, {"id": 973, "type": "parenthesized_expression", "text": "(width - 1)", "parent": 972, "children": [974], "start_point": {"row": 262, "column": 19}, "end_point": {"row": 262, "column": 30}}, {"id": 974, "type": "binary_expression", "text": "width - 1", "parent": 973, "children": [975, 976, 977], "start_point": {"row": 262, "column": 20}, "end_point": {"row": 262, "column": 29}}, {"id": 975, "type": "identifier", "text": "width", "parent": 974, "children": [], "start_point": {"row": 262, "column": 20}, "end_point": {"row": 262, "column": 25}}, {"id": 976, "type": "-", "text": "-", "parent": 974, "children": [], "start_point": {"row": 262, "column": 26}, "end_point": {"row": 262, "column": 27}}, {"id": 977, "type": "number_literal", "text": "1", "parent": 974, "children": [], "start_point": {"row": 262, "column": 28}, "end_point": {"row": 262, "column": 29}}, {"id": 978, "type": "-", "text": "-", "parent": 972, "children": [], "start_point": {"row": 262, "column": 31}, "end_point": {"row": 262, "column": 32}}, {"id": 979, "type": "identifier", "text": "hsb", "parent": 972, "children": [], "start_point": {"row": 262, "column": 33}, "end_point": {"row": 262, "column": 36}}, {"id": 980, "type": "assignment_expression", "text": "imms |= (width - ((hsb - lsb) + 1)) - 1", "parent": 966, "children": [981, 982, 983], "start_point": {"row": 263, "column": 12}, "end_point": {"row": 263, "column": 51}}, {"id": 981, "type": "identifier", "text": "imms", "parent": 980, "children": [], "start_point": {"row": 263, "column": 12}, "end_point": {"row": 263, "column": 16}}, {"id": 982, "type": "|=", "text": "|=", "parent": 980, "children": [], "start_point": {"row": 263, "column": 17}, "end_point": {"row": 263, "column": 19}}, {"id": 983, "type": "binary_expression", "text": "(width - ((hsb - lsb) + 1)) - 1", "parent": 980, "children": [984, 997, 998], "start_point": {"row": 263, "column": 20}, "end_point": {"row": 263, "column": 51}}, {"id": 984, "type": "parenthesized_expression", "text": "(width - ((hsb - lsb) + 1))", "parent": 983, "children": [985], "start_point": {"row": 263, "column": 20}, "end_point": {"row": 263, "column": 47}}, {"id": 985, "type": "binary_expression", "text": "width - ((hsb - lsb) + 1)", "parent": 984, "children": [986, 987, 988], "start_point": {"row": 263, "column": 21}, "end_point": {"row": 263, "column": 46}}, {"id": 986, "type": "identifier", "text": "width", "parent": 985, "children": [], "start_point": {"row": 263, "column": 21}, "end_point": {"row": 263, "column": 26}}, {"id": 987, "type": "-", "text": "-", "parent": 985, "children": [], "start_point": {"row": 263, "column": 27}, "end_point": {"row": 263, "column": 28}}, {"id": 988, "type": "parenthesized_expression", "text": "((hsb - lsb) + 1)", "parent": 985, "children": [989], "start_point": {"row": 263, "column": 29}, "end_point": {"row": 263, "column": 46}}, {"id": 989, "type": "binary_expression", "text": "(hsb - lsb) + 1", "parent": 988, "children": [990, 995, 996], "start_point": {"row": 263, "column": 30}, "end_point": {"row": 263, "column": 45}}, {"id": 990, "type": "parenthesized_expression", "text": "(hsb - lsb)", "parent": 989, "children": [991], "start_point": {"row": 263, "column": 30}, "end_point": {"row": 263, "column": 41}}, {"id": 991, "type": "binary_expression", "text": "hsb - lsb", "parent": 990, "children": [992, 993, 994], "start_point": {"row": 263, "column": 31}, "end_point": {"row": 263, "column": 40}}, {"id": 992, "type": "identifier", "text": "hsb", "parent": 991, "children": [], "start_point": {"row": 263, "column": 31}, "end_point": {"row": 263, "column": 34}}, {"id": 993, "type": "-", "text": "-", "parent": 991, "children": [], "start_point": {"row": 263, "column": 35}, "end_point": {"row": 263, "column": 36}}, {"id": 994, "type": "identifier", "text": "lsb", "parent": 991, "children": [], "start_point": {"row": 263, "column": 37}, "end_point": {"row": 263, "column": 40}}, {"id": 995, "type": "+", "text": "+", "parent": 989, "children": [], "start_point": {"row": 263, "column": 42}, "end_point": {"row": 263, "column": 43}}, {"id": 996, "type": "number_literal", "text": "1", "parent": 989, "children": [], "start_point": {"row": 263, "column": 44}, "end_point": {"row": 263, "column": 45}}, {"id": 997, "type": "-", "text": "-", "parent": 983, "children": [], "start_point": {"row": 263, "column": 48}, "end_point": {"row": 263, "column": 49}}, {"id": 998, "type": "number_literal", "text": "1", "parent": 983, "children": [], "start_point": {"row": 263, "column": 50}, "end_point": {"row": 263, "column": 51}}, {"id": 999, "type": "else_clause", "text": "else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }", "parent": 966, "children": [], "start_point": {"row": 264, "column": 10}, "end_point": {"row": 272, "column": 9}}, {"id": 1000, "type": "assignment_expression", "text": "immr = (width - lsb) & (width - 1)", "parent": 999, "children": [1001, 1002, 1003], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 46}}, {"id": 1001, "type": "identifier", "text": "immr", "parent": 1000, "children": [], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 16}}, {"id": 1002, "type": "=", "text": "=", "parent": 1000, "children": [], "start_point": {"row": 270, "column": 17}, "end_point": {"row": 270, "column": 18}}, {"id": 1003, "type": "binary_expression", "text": "(width - lsb) & (width - 1)", "parent": 1000, "children": [1004, 1009], "start_point": {"row": 270, "column": 19}, "end_point": {"row": 270, "column": 46}}, {"id": 1004, "type": "parenthesized_expression", "text": "(width - lsb)", "parent": 1003, "children": [1005], "start_point": {"row": 270, "column": 19}, "end_point": {"row": 270, "column": 32}}, {"id": 1005, "type": "binary_expression", "text": "width - lsb", "parent": 1004, "children": [1006, 1007, 1008], "start_point": {"row": 270, "column": 20}, "end_point": {"row": 270, "column": 31}}, {"id": 1006, "type": "identifier", "text": "width", "parent": 1005, "children": [], "start_point": {"row": 270, "column": 20}, "end_point": {"row": 270, "column": 25}}, {"id": 1007, "type": "-", "text": "-", "parent": 1005, "children": [], "start_point": {"row": 270, "column": 26}, "end_point": {"row": 270, "column": 27}}, {"id": 1008, "type": "identifier", "text": "lsb", "parent": 1005, "children": [], "start_point": {"row": 270, "column": 28}, "end_point": {"row": 270, "column": 31}}, {"id": 1009, "type": "parenthesized_expression", "text": "(width - 1)", "parent": 1003, "children": [1010], "start_point": {"row": 270, "column": 35}, "end_point": {"row": 270, "column": 46}}, {"id": 1010, "type": "binary_expression", "text": "width - 1", "parent": 1009, "children": [1011, 1012, 1013], "start_point": {"row": 270, "column": 36}, "end_point": {"row": 270, "column": 45}}, {"id": 1011, "type": "identifier", "text": "width", "parent": 1010, "children": [], "start_point": {"row": 270, "column": 36}, "end_point": {"row": 270, "column": 41}}, {"id": 1012, "type": "-", "text": "-", "parent": 1010, "children": [], "start_point": {"row": 270, "column": 42}, "end_point": {"row": 270, "column": 43}}, {"id": 1013, "type": "number_literal", "text": "1", "parent": 1010, "children": [], "start_point": {"row": 270, "column": 44}, "end_point": {"row": 270, "column": 45}}, {"id": 1014, "type": "assignment_expression", "text": "imms |= hsb - lsb", "parent": 999, "children": [1015, 1016, 1017], "start_point": {"row": 271, "column": 12}, "end_point": {"row": 271, "column": 29}}, {"id": 1015, "type": "identifier", "text": "imms", "parent": 1014, "children": [], "start_point": {"row": 271, "column": 12}, "end_point": {"row": 271, "column": 16}}, {"id": 1016, "type": "|=", "text": "|=", "parent": 1014, "children": [], "start_point": {"row": 271, "column": 17}, "end_point": {"row": 271, "column": 19}}, {"id": 1017, "type": "binary_expression", "text": "hsb - lsb", "parent": 1014, "children": [1018, 1019, 1020], "start_point": {"row": 271, "column": 20}, "end_point": {"row": 271, "column": 29}}, {"id": 1018, "type": "identifier", "text": "hsb", "parent": 1017, "children": [], "start_point": {"row": 271, "column": 20}, "end_point": {"row": 271, "column": 23}}, {"id": 1019, "type": "-", "text": "-", "parent": 1017, "children": [], "start_point": {"row": 271, "column": 24}, "end_point": {"row": 271, "column": 25}}, {"id": 1020, "type": "identifier", "text": "lsb", "parent": 1017, "children": [], "start_point": {"row": 271, "column": 26}, "end_point": {"row": 271, "column": 29}}, {"id": 1021, "type": "return_statement", "text": "return immN << 12 | immr << 6 | imms;", "parent": 866, "children": [1022], "start_point": {"row": 274, "column": 8}, "end_point": {"row": 274, "column": 45}}, {"id": 1022, "type": "binary_expression", "text": "immN << 12 | immr << 6 | imms", "parent": 1021, "children": [1023, 1032], "start_point": {"row": 274, "column": 15}, "end_point": {"row": 274, "column": 44}}, {"id": 1023, "type": "binary_expression", "text": "immN << 12 | immr << 6", "parent": 1022, "children": [1024, 1028], "start_point": {"row": 274, "column": 15}, "end_point": {"row": 274, "column": 37}}, {"id": 1024, "type": "binary_expression", "text": "immN << 12", "parent": 1023, "children": [1025, 1026, 1027], "start_point": {"row": 274, "column": 15}, "end_point": {"row": 274, "column": 25}}, {"id": 1025, "type": "identifier", "text": "immN", "parent": 1024, "children": [], "start_point": {"row": 274, "column": 15}, "end_point": {"row": 274, "column": 19}}, {"id": 1026, "type": "<<", "text": "<<", "parent": 1024, "children": [], "start_point": {"row": 274, "column": 20}, "end_point": {"row": 274, "column": 22}}, {"id": 1027, "type": "number_literal", "text": "12", "parent": 1024, "children": [], "start_point": {"row": 274, "column": 23}, "end_point": {"row": 274, "column": 25}}, {"id": 1028, "type": "binary_expression", "text": "immr << 6", "parent": 1023, "children": [1029, 1030, 1031], "start_point": {"row": 274, "column": 28}, "end_point": {"row": 274, "column": 37}}, {"id": 1029, "type": "identifier", "text": "immr", "parent": 1028, "children": [], "start_point": {"row": 274, "column": 28}, "end_point": {"row": 274, "column": 32}}, {"id": 1030, "type": "<<", "text": "<<", "parent": 1028, "children": [], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 35}}, {"id": 1031, "type": "number_literal", "text": "6", "parent": 1028, "children": [], "start_point": {"row": 274, "column": 36}, "end_point": {"row": 274, "column": 37}}, {"id": 1032, "type": "identifier", "text": "imms", "parent": 1022, "children": [], "start_point": {"row": 274, "column": 40}, "end_point": {"row": 274, "column": 44}}, {"id": 1033, "type": "declaration", "text": "static const int InvalidLogicalImmediate = -1;", "parent": 161, "children": [1034, 1035], "start_point": {"row": 277, "column": 4}, "end_point": {"row": 277, "column": 50}}, {"id": 1034, "type": "primitive_type", "text": "int", "parent": 1033, "children": [], "start_point": {"row": 277, "column": 17}, "end_point": {"row": 277, "column": 20}}, {"id": 1035, "type": "init_declarator", "text": "InvalidLogicalImmediate = -1", "parent": 1033, "children": [1036, 1037, 1038], "start_point": {"row": 277, "column": 21}, "end_point": {"row": 277, "column": 49}}, {"id": 1036, "type": "identifier", "text": "InvalidLogicalImmediate", "parent": 1035, "children": [], "start_point": {"row": 277, "column": 21}, "end_point": {"row": 277, "column": 44}}, {"id": 1037, "type": "=", "text": "=", "parent": 1035, "children": [], "start_point": {"row": 277, "column": 45}, "end_point": {"row": 277, "column": 46}}, {"id": 1038, "type": "number_literal", "text": "-1", "parent": 1035, "children": [], "start_point": {"row": 277, "column": 47}, "end_point": {"row": 277, "column": 49}}, {"id": 1039, "type": "declaration", "text": "int m_value;", "parent": 161, "children": [1040, 1041], "start_point": {"row": 279, "column": 4}, "end_point": {"row": 279, "column": 16}}, {"id": 1040, "type": "primitive_type", "text": "int", "parent": 1039, "children": [], "start_point": {"row": 279, "column": 4}, "end_point": {"row": 279, "column": 7}}, {"id": 1041, "type": "identifier", "text": "m_value", "parent": 1039, "children": [], "start_point": {"row": 279, "column": 8}, "end_point": {"row": 279, "column": 15}}]}, "node_categories": {"declarations": {"functions": [3, 6, 10, 27, 31, 59, 61, 92, 94, 146, 150, 161, 166, 417, 419, 513, 515, 521, 528, 538, 557, 562, 564, 623, 626, 713, 715, 866, 868], "variables": [34, 64, 97, 100, 153, 169, 186, 191, 422, 439, 444, 518, 524, 560, 567, 629, 636, 718, 721, 725, 729, 774, 871, 875, 879, 922, 928, 934, 1033, 1039], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [15, 38, 41, 42, 43, 44, 50, 51, 68, 70, 71, 73, 74, 75, 81, 83, 84, 105, 108, 109, 114, 115, 122, 123, 130, 131, 133, 134, 135, 136, 157, 173, 174, 175, 179, 181, 195, 196, 197, 202, 203, 205, 207, 211, 212, 217, 218, 220, 224, 225, 226, 227, 231, 232, 243, 244, 245, 250, 251, 253, 255, 259, 260, 265, 266, 268, 272, 273, 274, 275, 279, 280, 291, 292, 293, 298, 299, 301, 303, 307, 308, 313, 314, 316, 320, 321, 322, 323, 327, 328, 339, 340, 341, 346, 347, 349, 351, 355, 356, 361, 362, 364, 368, 369, 370, 371, 375, 376, 387, 388, 389, 394, 395, 397, 399, 403, 404, 409, 410, 412, 426, 427, 428, 432, 434, 448, 449, 450, 455, 456, 458, 460, 464, 465, 470, 471, 473, 477, 478, 479, 480, 485, 488, 489, 494, 495, 500, 503, 504, 509, 532, 542, 544, 545, 571, 574, 579, 582, 583, 587, 588, 597, 600, 603, 607, 608, 610, 611, 632, 643, 644, 649, 650, 653, 654, 659, 660, 663, 664, 669, 670, 673, 674, 679, 680, 683, 684, 689, 690, 693, 694, 699, 700, 705, 706, 732, 735, 737, 740, 744, 747, 750, 753, 757, 760, 762, 763, 765, 767, 770, 779, 782, 783, 788, 789, 793, 794, 800, 803, 810, 817, 822, 823, 835, 842, 847, 848, 851, 858, 859, 882, 885, 887, 888, 890, 891, 895, 898, 899, 904, 908, 911, 915, 918, 941, 942, 954, 956, 958, 959, 960, 967, 972, 973, 974, 983, 984, 985, 988, 989, 990, 991, 1003, 1004, 1005, 1009, 1010, 1017, 1022, 1023, 1024, 1028], "assignments": [238, 286, 334, 382, 615, 619, 790, 797, 807, 814, 826, 832, 839, 946, 951, 969, 980, 1000, 1014], "loops": [], "conditionals": [4, 5, 7, 9, 11, 13, 14, 16, 18, 26, 28, 30, 32, 36, 39, 45, 52, 54, 56, 58, 62, 65, 66, 72, 77, 79, 85, 88, 89, 91, 95, 99, 103, 110, 113, 116, 121, 124, 126, 129, 132, 137, 147, 149, 151, 155, 158, 160, 162, 165, 167, 171, 172, 177, 183, 185, 187, 189, 190, 193, 194, 198, 204, 206, 208, 209, 213, 219, 221, 222, 223, 228, 233, 237, 239, 242, 246, 252, 254, 256, 257, 261, 267, 269, 270, 271, 276, 281, 285, 287, 290, 294, 300, 302, 304, 305, 309, 315, 317, 318, 319, 324, 329, 333, 335, 338, 342, 348, 350, 352, 353, 357, 363, 365, 366, 367, 372, 377, 381, 383, 386, 390, 396, 398, 400, 401, 405, 411, 413, 414, 416, 418, 420, 424, 425, 430, 436, 438, 440, 442, 443, 446, 447, 451, 457, 459, 461, 462, 466, 472, 474, 475, 476, 481, 483, 486, 490, 492, 496, 501, 505, 507, 510, 512, 516, 519, 522, 525, 529, 533, 535, 539, 543, 551, 552, 556, 558, 561, 565, 568, 570, 572, 575, 586, 589, 591, 593, 596, 598, 601, 602, 604, 605, 606, 609, 614, 616, 618, 620, 622, 624, 627, 631, 633, 635, 637, 640, 645, 651, 652, 655, 661, 662, 665, 671, 672, 675, 681, 682, 685, 691, 692, 695, 701, 702, 704, 707, 709, 711, 716, 720, 722, 724, 726, 728, 731, 733, 736, 738, 741, 745, 748, 751, 754, 758, 764, 768, 771, 777, 784, 787, 791, 795, 796, 798, 801, 804, 808, 811, 813, 815, 818, 820, 821, 825, 827, 833, 836, 838, 840, 843, 845, 846, 850, 853, 860, 862, 864, 869, 872, 874, 876, 878, 881, 883, 889, 892, 896, 900, 905, 909, 912, 914, 916, 919, 921, 925, 931, 937, 940, 943, 947, 952, 961, 963, 966, 968, 970, 975, 979, 981, 986, 992, 994, 1001, 1006, 1008, 1011, 1015, 1018, 1020, 1025, 1029, 1032, 1036, 1041], "returns": [20, 24, 37, 67, 119, 127, 142, 144, 156, 184, 210, 236, 258, 284, 306, 332, 354, 380, 402, 415, 437, 463, 499, 511, 531, 541, 578, 703, 830, 854, 856, 1021], "exceptions": []}, "expressions": {"calls": [0], "literals": [47, 49, 82, 106, 112, 118, 139, 141, 200, 215, 229, 235, 241, 248, 263, 277, 283, 289, 296, 311, 325, 331, 337, 344, 359, 373, 379, 385, 392, 407, 453, 468, 498, 546, 548, 577, 580, 584, 612, 642, 647, 657, 667, 677, 687, 697, 743, 756, 773, 780, 786, 806, 829, 894, 902, 907, 927, 933, 939, 945, 949, 955, 965, 977, 996, 998, 1013, 1027, 1031, 1038], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "isIOS", "text_snippet": "namespace JSC {\n\nALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return fa"}, {"node_id": 6, "universal_type": "function", "name": "isIOS", "text_snippet": "ALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}"}, {"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "isIOS()"}, {"node_id": 27, "universal_type": "function", "name": "isInt9", "text_snippet": "ALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "isInt9(int32_t value)"}, {"node_id": 59, "universal_type": "function", "name": "isUInt12", "text_snippet": "bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "isUInt12(Type value)"}, {"node_id": 92, "universal_type": "function", "name": "isValidScaledUImm12", "text_snippet": "bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offs"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "isValidScaledUImm12(int32_t offset)"}, {"node_id": 146, "universal_type": "function", "name": "isValidSignedImm9", "text_snippet": "ALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "isValidSignedImm9(int32_t value)"}, {"node_id": 161, "universal_type": "function", "name": "ARM64LogicalImmediate", "text_snippet": "class ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n "}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "create32(uint32_t value)"}, {"node_id": 417, "universal_type": "function", "name": "inverted;", "text_snippet": "static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these canno"}, {"node_id": 419, "universal_type": "function", "name": "unknown", "text_snippet": "create64(uint64_t value)"}, {"node_id": 513, "universal_type": "function", "name": "value", "text_snippet": "int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid()"}, {"node_id": 515, "universal_type": "function", "name": "unknown", "text_snippet": "value()"}, {"node_id": 521, "universal_type": "function", "name": "unknown", "text_snippet": "isValid()"}, {"node_id": 528, "universal_type": "function", "name": "unknown", "text_snippet": "isValid() const"}, {"node_id": 538, "universal_type": "function", "name": "unknown", "text_snippet": "is64bit()"}, {"node_id": 557, "universal_type": "function", "name": "unknown", "text_snippet": "m_value(value)"}, {"node_id": 562, "universal_type": "function", "name": "unknown", "text_snippet": "static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffff"}, {"node_id": 564, "universal_type": "function", "name": "unknown", "text_snippet": "mask(unsigned hsb)"}, {"node_id": 623, "universal_type": "function", "name": "unknown", "text_snippet": "static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;"}, {"node_id": 626, "universal_type": "function", "name": "unknown", "text_snippet": "highestSetBit(uint64_t value)"}, {"node_id": 713, "universal_type": "function", "name": "findBitRange", "text_snippet": "bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT"}, {"node_id": 715, "universal_type": "function", "name": "unknown", "text_snippet": "findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)"}, {"node_id": 866, "universal_type": "function", "name": "encodeLogicalImmediate", "text_snippet": "int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width i"}, {"node_id": 868, "universal_type": "function", "name": "inverted)", "text_snippet": "encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n#pragma once\n\nnamespace JSC {\n\nALWAYS_INLINE bool isIOS()\n{\n#if PLATFORM(IOS)\n return true;\n#else\n return false;\n#endif\n}\n\nALWAYS_INLINE bool isInt9(int32_t value)\n{\n return value == ((value << 23) >> 23);\n}\n\ntemplate<typename Type>\nALWAYS_INLINE bool isUInt12(Type value)\n{\n return !(value & ~static_cast<Type>(0xfff));\n}\n\ntemplate<int datasize>\nALWAYS_INLINE bool isValidScaledUImm12(int32_t offset)\n{\n int32_t maxPImm = 4095 * (datasize / 8);\n if (offset < 0)\n return false;\n if (offset > maxPImm)\n return false;\n if (offset & ((datasize / 8) - 1))\n return false;\n return true;\n}\n\nALWAYS_INLINE bool isValidSignedImm9(int32_t value)\n{\n return isInt9(value);\n}\n\nclass ARM64LogicalImmediate {\npublic:\n static ARM64LogicalImmediate create32(uint32_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // First look for a 32-bit pattern, then for repeating 16-bit\n // patterns, 8-bit, 4-bit, and finally 2-bit.\n\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<32>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<32>(hsb, lsb, inverted);\n\n if ((value & 0xffff) != (value >> 16))\n return InvalidLogicalImmediate;\n value &= 0xffff;\n\n if (findBitRange<16>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<16>(hsb, lsb, inverted);\n\n if ((value & 0xff) != (value >> 8))\n return InvalidLogicalImmediate;\n value &= 0xff;\n\n if (findBitRange<8>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<8>(hsb, lsb, inverted);\n\n if ((value & 0xf) != (value >> 4))\n return InvalidLogicalImmediate;\n value &= 0xf;\n\n if (findBitRange<4>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<4>(hsb, lsb, inverted);\n\n if ((value & 0x3) != (value >> 2))\n return InvalidLogicalImmediate;\n value &= 0x3;\n\n if (findBitRange<2>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<2>(hsb, lsb, inverted);\n\n return InvalidLogicalImmediate;\n }\n\n static ARM64LogicalImmediate create64(uint64_t value)\n {\n // Check for 0, -1 - these cannot be encoded.\n if (!value || !~value)\n return InvalidLogicalImmediate;\n\n // Look for a contiguous bit range.\n unsigned hsb, lsb;\n bool inverted;\n if (findBitRange<64>(value, hsb, lsb, inverted))\n return encodeLogicalImmediate<64>(hsb, lsb, inverted);\n\n // If the high & low 32 bits are equal, we can try for a 32-bit (or narrower) pattern.\n if (static_cast<uint32_t>(value) == static_cast<uint32_t>(value >> 32))\n return create32(static_cast<uint32_t>(value));\n return InvalidLogicalImmediate;\n }\n\n int value() const\n {\n ASSERT(isValid());\n return m_value;\n }\n\n bool isValid() const\n {\n return m_value != InvalidLogicalImmediate;\n }\n\n bool is64bit() const\n {\n return m_value & (1 << 12);\n }\n\nprivate:\n ARM64LogicalImmediate(int value)\n : m_value(value)\n {\n }\n\n // Generate a mask with bits in the range hsb..0 set, for example:\n // hsb:63 = 0xffffffffffffffff\n // hsb:42 = 0x000007ffffffffff\n // hsb: 0 = 0x0000000000000001\n static uint64_t mask(unsigned hsb)\n {\n ASSERT(hsb < 64);\n return 0xffffffffffffffffull >> (63 - hsb);\n }\n\n template<unsigned N>\n static void partialHSB(uint64_t& value, unsigned&result)\n {\n if (value & (0xffffffffffffffffull << N)) {\n result += N;\n value >>= N;\n }\n }\n\n // Find the bit number of the highest bit set in a non-zero value, for example:\n // 0x8080808080808080 = hsb:63\n // 0x0000000000000001 = hsb: 0\n // 0x000007ffffe00000 = hsb:42\n static unsigned highestSetBit(uint64_t value)\n {\n ASSERT(value);\n unsigned hsb = 0;\n partialHSB<32>(value, hsb);\n partialHSB<16>(value, hsb);\n partialHSB<8>(value, hsb);\n partialHSB<4>(value, hsb);\n partialHSB<2>(value, hsb);\n partialHSB<1>(value, hsb);\n return hsb;\n }\n\n // This function takes a value and a bit width, where value obeys the following constraints:\n // * bits outside of the width of the value must be zero.\n // * bits within the width of value must neither be all clear or all set.\n // The input is inspected to detect values that consist of either two or three contiguous\n // ranges of bits. The output range hsb..lsb will describe the second range of the value.\n // if the range is set, inverted will be false, and if the range is clear, inverted will\n // be true. For example (with width 8):\n // 00001111 = hsb:3, lsb:0, inverted:false\n // 11110000 = hsb:3, lsb:0, inverted:true\n // 00111100 = hsb:5, lsb:2, inverted:false\n // 11000011 = hsb:5, lsb:2, inverted:true\n template<unsigned width>\n static bool findBitRange(uint64_t value, unsigned& hsb, unsigned& lsb, bool& inverted)\n {\n ASSERT(value & mask(width - 1));\n ASSERT(value != mask(width - 1));\n ASSERT(!(value & ~mask(width - 1)));\n\n // Detect cases where the top bit is set; if so, flip all the bits & set invert.\n // This halves the number of patterns we need to look for.\n const uint64_t msb = 1ull << (width - 1);\n if ((inverted = (value & msb)))\n value ^= mask(width - 1);\n\n // Find the highest set bit in value, generate a corresponding mask & flip all\n // bits under it.\n hsb = highestSetBit(value);\n value ^= mask(hsb);\n if (!value) {\n // If this cleared the value, then the range hsb..0 was all set.\n lsb = 0;\n return true;\n }\n\n // Try making one more mask, and flipping the bits!\n lsb = highestSetBit(value);\n value ^= mask(lsb);\n if (!value) {\n // Success - but lsb actually points to the hsb of a third range - add one\n // to get to the lsb of the mid range.\n ++lsb;\n return true;\n }\n\n return false;\n }\n\n // Encodes the set of immN:immr:imms fields found in a logical immediate.\n template<unsigned width>\n static int encodeLogicalImmediate(unsigned hsb, unsigned lsb, bool inverted)\n {\n // Check width is a power of 2!\n ASSERT(!(width & (width -1)));\n ASSERT(width <= 64 && width >= 2);\n ASSERT(hsb >= lsb);\n ASSERT(hsb < width);\n\n int immN = 0;\n int imms = 0;\n int immr = 0;\n\n // For 64-bit values this is easy - just set immN to true, and imms just\n // contains the bit number of the highest set bit of the set range. For\n // values with narrower widths, these are encoded by a leading set of\n // one bits, followed by a zero bit, followed by the remaining set of bits\n // being the high bit of the range. For a 32-bit immediate there are no\n // leading one bits, just a zero followed by a five bit number. For a\n // 16-bit immediate there is one one bit, a zero bit, and then a four bit\n // bit-position, etc.\n if (width == 64)\n immN = 1;\n else\n imms = 63 & ~(width + width - 1);\n\n if (inverted) {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x80000000ffffffff (in this case with lsb 32).\n // The ror should be by 1, imms (effectively set width minus 1) is\n // 32. Set width is full width minus cleared width.\n immr = (width - 1) - hsb;\n imms |= (width - ((hsb - lsb) + 1)) - 1;\n } else {\n // if width is 64 & hsb is 62, then we have a value something like:\n // 0x7fffffff00000000 (in this case with lsb 32).\n // The value is effectively rol'ed by lsb, which is equivalent to\n // a ror by width - lsb (or 0, in the case where lsb is 0). imms\n // is hsb - lsb.\n immr = (width - lsb) & (width - 1);\n imms |= hsb - lsb;\n }\n\n return immN << 12 | immr << 6 | imms;\n }\n\n static const int InvalidLogicalImmediate = -1;\n\n int m_value;\n};\n\n} // namespace JSC.\n"}
213
c
// GPL v3 License // // CircuitCalculator/CircuitCalculator // Copyright (c) 2022 CircuitCalculator/CircuitScriptTokenKind.h // // This program 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. // // This program 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 this program. If not, see <http://www.gnu.org/licenses/>. #pragma once enum class CircuitScriptTokenKind { KeywordPower, KeywordResistor, KeywordCapacitor, KeywordInductor, KeywordGround, KeywordConnect, Equal, LeftParen, RightParen, Comma, Identifier, Number }; inline std::string TokenKindToString(const CircuitScriptTokenKind& kind) { switch (kind) { case CircuitScriptTokenKind::KeywordPower: return "KeywordPower"; case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor"; case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor"; case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor"; case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect"; case CircuitScriptTokenKind::KeywordGround: return "KeywordGround"; case CircuitScriptTokenKind::Equal: return "="; case CircuitScriptTokenKind::LeftParen: return "("; case CircuitScriptTokenKind::RightParen: return ")"; case CircuitScriptTokenKind::Comma: return ","; case CircuitScriptTokenKind::Identifier: return "Identifier"; case CircuitScriptTokenKind::Number: return "Number"; } return ""; }
34.71
52
(translation_unit) " GPL v3 License\n// \n// CircuitCalculator/CircuitCalculator\n// Copyright (c) 2022 CircuitCalculator/CircuitScriptTokenKind.h\n// \n// This program 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// This program 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 this program. If not, see <http://www.gnu.org/licenses/>.\n\n#pragma once\n\nenum class CircuitScriptTokenKind\n{\n KeywordPower,\n KeywordResistor,\n KeywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n};\n\ninline std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n switch (kind)\n {\n case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n return "";\n}\n" (comment) " GPL v3 License\n/" (comment) " \n/" (comment) " CircuitCalculator/CircuitCalculator\n/" (comment) " Copyright (c) 2022 CircuitCalculator/CircuitScriptTokenKind.h\n/" (comment) " \n/" (comment) " This program is free software: you can redistribute it and/or modify\n/" (comment) " it under the terms of the GNU General Public License as published by\n/" (comment) " the Free Software Foundation, either version 3 of the License, or\n/" (comment) " (at your option) any later version.\n/" (comment) " \n/" (comment) " This program is distributed in the hope that it will be useful,\n/" (comment) " but WITHOUT ANY WARRANTY; without even the implied warranty of\n/" (comment) " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n/" (comment) " GNU General Public License for more details.\n/" (comment) " \n/" (comment) " You should have received a copy of the GNU General Public License\n/" (comment) " along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n" (preproc_call) "ragma once\n\ne" (preproc_directive) "ragma o" (preproc_arg) "ce\n\n" (function_definition) "um class CircuitScriptTokenKind\n{\n KeywordPower,\n KeywordResistor,\n KeywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n};\n\ninline std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n switch (kind)\n {\n case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n return "";\n}\n" (enum_specifier) "um class C" (enum) "um c" (type_identifier) "ass C" (identifier) "rcuitScriptTokenKind\n{" (compound_statement) " KeywordPower,\n KeywordResistor,\n KeywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n};\n\ninline std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n switch (kind)\n {\n case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n return "";\n}\n" ({) " " (expression_statement) "ywordPower,\n KeywordResistor,\n KeywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n};\n\n" (comma_expression) "ywordPower,\n KeywordResistor,\n KeywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ywordPower,\n" (,) " " (comma_expression) "ywordResistor,\n KeywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ywordResistor,\n" (,) " " (comma_expression) "ywordCapacitor,\n KeywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ywordCapacitor,\n" (,) " " (comma_expression) "ywordInductor,\n KeywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ywordInductor,\n" (,) " " (comma_expression) "ywordGround,\n KeywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ywordGround,\n" (,) " " (comma_expression) "ywordConnect,\n Equal,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ywordConnect,\n" (,) " " (comma_expression) "ual,\n LeftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ual,\n" (,) " " (comma_expression) "ftParen,\n RightParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ftParen,\n" (,) " " (comma_expression) "ghtParen,\n Comma,\n Identifier,\n Number\n}" (identifier) "ghtParen,\n" (,) " " (comma_expression) "mma,\n Identifier,\n Number\n}" (identifier) "mma,\n" (,) " " (comma_expression) "entifier,\n Number\n}" (identifier) "entifier,\n" (,) " " (identifier) "mber\n}" (ERROR) "\n" (}) "\n" (;) "\n" (function_definition) "line std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n switch (kind)\n {\n case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n return "";\n}\n" (storage_class_specifier) "line s" (inline) "line s" (type_identifier) "d::" (ERROR) "string T" (:) "s" (:) "t" (identifier) "ring T" (function_declarator) "kenKindToString(const CircuitScriptTokenKind& kind)\n{" (identifier) "kenKindToString(c" (parameter_list) "onst CircuitScriptTokenKind& kind)\n{" (() "o" (parameter_declaration) "nst CircuitScriptTokenKind& kind)\n" (type_qualifier) "nst C" (const) "nst C" (type_identifier) "rcuitScriptTokenKind& " (ERROR) "k" (&) "k" (identifier) "nd)\n" ()) "{" (compound_statement) " switch (kind)\n {\n case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n return "";\n}\n" ({) " " (switch_statement) "itch (kind)\n {\n case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n " (switch) "itch (" (parenthesized_expression) "ind)\n " (() "i" (identifier) "nd)\n" ()) " " (compound_statement) " case CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n case CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n case CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n case CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n case CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n case CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n case CircuitScriptTokenKind::Equal: return "=";\n case CircuitScriptTokenKind::LeftParen: return "(";\n case CircuitScriptTokenKind::RightParen: return ")";\n case CircuitScriptTokenKind::Comma: return ",";\n case CircuitScriptTokenKind::Identifier: return "Identifier";\n case CircuitScriptTokenKind::Number: return "Number";\n }\n " ({) " " (case_statement) "se CircuitScriptTokenKind::KeywordPower: return "KeywordPower";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "K" (ERROR) "e" (:) "e" (labeled_statement) "ywordPower: return "KeywordPower";\n " (statement_identifier) "ywordPower: " (:) "r" (return_statement) "turn "KeywordPower";\n " (return) "turn "" (string_literal) "eywordPower";\n" (") "e" (string_content) "ywordPower";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::KeywordResistor: return "KeywordResistor";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "K" (ERROR) "e" (:) "e" (labeled_statement) "ywordResistor: return "KeywordResistor";\n " (statement_identifier) "ywordResistor: " (:) "r" (return_statement) "turn "KeywordResistor";\n " (return) "turn "" (string_literal) "eywordResistor";\n" (") "e" (string_content) "ywordResistor";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::KeywordCapacitor: return "KeywordCapacitor";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "K" (ERROR) "e" (:) "e" (labeled_statement) "ywordCapacitor: return "KeywordCapacitor";\n " (statement_identifier) "ywordCapacitor: " (:) "r" (return_statement) "turn "KeywordCapacitor";\n " (return) "turn "" (string_literal) "eywordCapacitor";\n" (") "e" (string_content) "ywordCapacitor";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::KeywordInductor: return "KeywordInductor";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "K" (ERROR) "e" (:) "e" (labeled_statement) "ywordInductor: return "KeywordInductor";\n " (statement_identifier) "ywordInductor: " (:) "r" (return_statement) "turn "KeywordInductor";\n " (return) "turn "" (string_literal) "eywordInductor";\n" (") "e" (string_content) "ywordInductor";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::KeywordConnect: return "KeywordConnect";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "K" (ERROR) "e" (:) "e" (labeled_statement) "ywordConnect: return "KeywordConnect";\n " (statement_identifier) "ywordConnect: " (:) "r" (return_statement) "turn "KeywordConnect";\n " (return) "turn "" (string_literal) "eywordConnect";\n" (") "e" (string_content) "ywordConnect";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::KeywordGround: return "KeywordGround";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "K" (ERROR) "e" (:) "e" (labeled_statement) "ywordGround: return "KeywordGround";\n " (statement_identifier) "ywordGround: " (:) "r" (return_statement) "turn "KeywordGround";\n " (return) "turn "" (string_literal) "eywordGround";\n" (") "e" (string_content) "ywordGround";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::Equal: return "=";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "E" (ERROR) "q" (:) "q" (labeled_statement) "ual: return "=";\n " (statement_identifier) "ual: " (:) "r" (return_statement) "turn "=";\n " (return) "turn "" (string_literal) "";\n" (") """ (string_content) ";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::LeftParen: return "(";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "L" (ERROR) "e" (:) "e" (labeled_statement) "ftParen: return "(";\n " (statement_identifier) "ftParen: " (:) "r" (return_statement) "turn "(";\n " (return) "turn "" (string_literal) "";\n" (") """ (string_content) ";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::RightParen: return ")";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "R" (ERROR) "i" (:) "i" (labeled_statement) "ghtParen: return ")";\n " (statement_identifier) "ghtParen: " (:) "r" (return_statement) "turn ")";\n " (return) "turn "" (string_literal) "";\n" (") """ (string_content) ";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::Comma: return ",";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "C" (ERROR) "o" (:) "o" (labeled_statement) "mma: return ",";\n " (statement_identifier) "mma: " (:) "r" (return_statement) "turn ",";\n " (return) "turn "" (string_literal) "";\n" (") """ (string_content) ";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::Identifier: return "Identifier";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "I" (ERROR) "d" (:) "d" (labeled_statement) "entifier: return "Identifier";\n " (statement_identifier) "entifier: " (:) "r" (return_statement) "turn "Identifier";\n " (return) "turn "" (string_literal) "dentifier";\n" (") "d" (string_content) "entifier";" (") "\n" (;) " " (case_statement) "se CircuitScriptTokenKind::Number: return "Number";\n " (case) "se C" (identifier) "rcuitScriptTokenKind::" (:) "N" (ERROR) "u" (:) "u" (labeled_statement) "mber: return "Number";\n " (statement_identifier) "mber: " (:) "r" (return_statement) "turn "Number";\n " (return) "turn "" (string_literal) "umber";\n" (") "u" (string_content) "mber";" (") "\n" (;) " " (}) " " (return_statement) "turn "";\n}" (return) "turn "" (string_literal) ";\n" (") ";" (") "\n" (;) "}" (}) "" (}) ""
297
15
{"language": "c", "success": true, "metadata": {"lines": 52, "avg_line_length": 34.71, "nodes": 148, "errors": 0, "source_hash": "e1bee47185606f1a59f439b8ed929e1e34c42a656755f6eb1acc0e7b83aa7d82", "categorized_nodes": 116}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "ragma once\n\ne", "parent": null, "children": [1, 2], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "ragma o", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "ce\n\n", "parent": 0, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 12}}, {"id": 3, "type": "function_definition", "text": "um class CircuitScriptTokenKind\n{\n\tKeywordPower,\n\tKeywordResistor,\n\tKeywordCapacitor,\n\tKeywordInductor,\n\tKeywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n};\n\ninline std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n\tswitch (kind)\n\t{\n\tcase CircuitScriptTokenKind::KeywordPower: return \"KeywordPower\";\n\tcase CircuitScriptTokenKind::KeywordResistor: return \"KeywordResistor\";\n\tcase CircuitScriptTokenKind::KeywordCapacitor: return \"KeywordCapacitor\";\n\tcase CircuitScriptTokenKind::KeywordInductor: return \"KeywordInductor\";\n\tcase CircuitScriptTokenKind::KeywordConnect: return \"KeywordConnect\";\n\tcase CircuitScriptTokenKind::KeywordGround: return \"KeywordGround\";\n\tcase CircuitScriptTokenKind::Equal: return \"=\";\n\tcase CircuitScriptTokenKind::LeftParen: return \"(\";\n\tcase CircuitScriptTokenKind::RightParen: return \")\";\n\tcase CircuitScriptTokenKind::Comma: return \",\";\n\tcase CircuitScriptTokenKind::Identifier: return \"Identifier\";\n\tcase CircuitScriptTokenKind::Number: return \"Number\";\n\t}\n\treturn \"\";\n}\n", "parent": null, "children": [4, 7], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 54, "column": 1}}, {"id": 4, "type": "enum_specifier", "text": "um class C", "parent": 3, "children": [5, 6], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 10}}, {"id": 5, "type": "enum", "text": "um c", "parent": 4, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 4}}, {"id": 6, "type": "type_identifier", "text": "ass C", "parent": 4, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 10}}, {"id": 7, "type": "identifier", "text": "rcuitScriptTokenKind\n{", "parent": 3, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 33}}, {"id": 8, "type": "comma_expression", "text": "ywordPower,\n\tKeywordResistor,\n\tKeywordCapacitor,\n\tKeywordInductor,\n\tKeywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 3, "children": [9, 10], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 9, "type": "identifier", "text": "ywordPower,\n", "parent": 8, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 13}}, {"id": 10, "type": "comma_expression", "text": "ywordResistor,\n\tKeywordCapacitor,\n\tKeywordInductor,\n\tKeywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 8, "children": [11, 12], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 11, "type": "identifier", "text": "ywordResistor,\n", "parent": 10, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 16}}, {"id": 12, "type": "comma_expression", "text": "ywordCapacitor,\n\tKeywordInductor,\n\tKeywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 10, "children": [13, 14], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 13, "type": "identifier", "text": "ywordCapacitor,\n", "parent": 12, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 17}}, {"id": 14, "type": "comma_expression", "text": "ywordInductor,\n\tKeywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 12, "children": [15, 16], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 15, "type": "identifier", "text": "ywordInductor,\n", "parent": 14, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 16}}, {"id": 16, "type": "comma_expression", "text": "ywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 14, "children": [17, 18], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 17, "type": "identifier", "text": "ywordGround,\n", "parent": 16, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 14}}, {"id": 18, "type": "comma_expression", "text": "ywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 16, "children": [19, 20], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 19, "type": "identifier", "text": "ywordConnect,\n", "parent": 18, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 20, "type": "comma_expression", "text": "ual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 18, "children": [21, 22], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 21, "type": "identifier", "text": "ual,\n", "parent": 20, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 6}}, {"id": 22, "type": "comma_expression", "text": "ftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 20, "children": [23, 24], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 23, "type": "identifier", "text": "ftParen,\n", "parent": 22, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 10}}, {"id": 24, "type": "comma_expression", "text": "ghtParen,\n\tComma,\n\tIdentifier,\n\tNumber\n}", "parent": 22, "children": [25, 26], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 25, "type": "identifier", "text": "ghtParen,\n", "parent": 24, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 11}}, {"id": 26, "type": "comma_expression", "text": "mma,\n\tIdentifier,\n\tNumber\n}", "parent": 24, "children": [27, 28], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 27, "type": "identifier", "text": "mma,\n", "parent": 26, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 6}}, {"id": 28, "type": "comma_expression", "text": "entifier,\n\tNumber\n}", "parent": 26, "children": [29, 30], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 29, "type": "identifier", "text": "entifier,\n", "parent": 28, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 11}}, {"id": 30, "type": "identifier", "text": "mber\n}", "parent": 28, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 31, "type": "ERROR", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 32, "type": "function_definition", "text": "line std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n\tswitch (kind)\n\t{\n\tcase CircuitScriptTokenKind::KeywordPower: return \"KeywordPower\";\n\tcase CircuitScriptTokenKind::KeywordResistor: return \"KeywordResistor\";\n\tcase CircuitScriptTokenKind::KeywordCapacitor: return \"KeywordCapacitor\";\n\tcase CircuitScriptTokenKind::KeywordInductor: return \"KeywordInductor\";\n\tcase CircuitScriptTokenKind::KeywordConnect: return \"KeywordConnect\";\n\tcase CircuitScriptTokenKind::KeywordGround: return \"KeywordGround\";\n\tcase CircuitScriptTokenKind::Equal: return \"=\";\n\tcase CircuitScriptTokenKind::LeftParen: return \"(\";\n\tcase CircuitScriptTokenKind::RightParen: return \")\";\n\tcase CircuitScriptTokenKind::Comma: return \",\";\n\tcase CircuitScriptTokenKind::Identifier: return \"Identifier\";\n\tcase CircuitScriptTokenKind::Number: return \"Number\";\n\t}\n\treturn \"\";\n}\n", "parent": 3, "children": [33, 35, 36, 38], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 54, "column": 1}}, {"id": 33, "type": "storage_class_specifier", "text": "line s", "parent": 32, "children": [34], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 34, "type": "inline", "text": "line s", "parent": 33, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 35, "type": "type_identifier", "text": "d::", "parent": 32, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 10}}, {"id": 36, "type": "ERROR", "text": "string T", "parent": 32, "children": [37], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 18}}, {"id": 37, "type": "identifier", "text": "ring T", "parent": 36, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 18}}, {"id": 38, "type": "function_declarator", "text": "kenKindToString(const CircuitScriptTokenKind& kind)\n{", "parent": 32, "children": [39, 40], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 72}}, {"id": 39, "type": "identifier", "text": "kenKindToString(c", "parent": 38, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 36}}, {"id": 40, "type": "parameter_list", "text": "onst CircuitScriptTokenKind& kind)\n{", "parent": 38, "children": [41], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 72}}, {"id": 41, "type": "parameter_declaration", "text": "nst CircuitScriptTokenKind& kind)\n", "parent": 40, "children": [42, 43, 44, 46], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 71}}, {"id": 42, "type": "type_qualifier", "text": "nst C", "parent": 41, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 42}}, {"id": 43, "type": "type_identifier", "text": "rcuitScriptTokenKind& ", "parent": 41, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 65}}, {"id": 44, "type": "ERROR", "text": "k", "parent": 41, "children": [45], "start_point": {"row": 36, "column": 65}, "end_point": {"row": 36, "column": 66}}, {"id": 45, "type": "&", "text": "k", "parent": 44, "children": [], "start_point": {"row": 36, "column": 65}, "end_point": {"row": 36, "column": 66}}, {"id": 46, "type": "identifier", "text": "nd)\n", "parent": 41, "children": [], "start_point": {"row": 36, "column": 67}, "end_point": {"row": 36, "column": 71}}, {"id": 47, "type": "switch_statement", "text": "itch (kind)\n\t{\n\tcase CircuitScriptTokenKind::KeywordPower: return \"KeywordPower\";\n\tcase CircuitScriptTokenKind::KeywordResistor: return \"KeywordResistor\";\n\tcase CircuitScriptTokenKind::KeywordCapacitor: return \"KeywordCapacitor\";\n\tcase CircuitScriptTokenKind::KeywordInductor: return \"KeywordInductor\";\n\tcase CircuitScriptTokenKind::KeywordConnect: return \"KeywordConnect\";\n\tcase CircuitScriptTokenKind::KeywordGround: return \"KeywordGround\";\n\tcase CircuitScriptTokenKind::Equal: return \"=\";\n\tcase CircuitScriptTokenKind::LeftParen: return \"(\";\n\tcase CircuitScriptTokenKind::RightParen: return \")\";\n\tcase CircuitScriptTokenKind::Comma: return \",\";\n\tcase CircuitScriptTokenKind::Identifier: return \"Identifier\";\n\tcase CircuitScriptTokenKind::Number: return \"Number\";\n\t}\n\t", "parent": 32, "children": [48, 49], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 52, "column": 2}}, {"id": 48, "type": "switch", "text": "itch (", "parent": 47, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 7}}, {"id": 49, "type": "parenthesized_expression", "text": "ind)\n\t", "parent": 47, "children": [50], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 14}}, {"id": 50, "type": "identifier", "text": "nd)\n", "parent": 49, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 13}}, {"id": 51, "type": "case_statement", "text": "se CircuitScriptTokenKind::KeywordPower: return \"KeywordPower\";\n\t", "parent": 47, "children": [52, 53, 54, 55], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 66}}, {"id": 52, "type": "case", "text": "se C", "parent": 51, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 53, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 51, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 28}}, {"id": 54, "type": "ERROR", "text": "e", "parent": 51, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 30}}, {"id": 55, "type": "labeled_statement", "text": "ywordPower: return \"KeywordPower\";\n\t", "parent": 51, "children": [56, 57], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 66}}, {"id": 56, "type": "statement_identifier", "text": "ywordPower: ", "parent": 55, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 42}}, {"id": 57, "type": "return_statement", "text": "turn \"KeywordPower\";\n\t", "parent": 55, "children": [58], "start_point": {"row": 40, "column": 44}, "end_point": {"row": 40, "column": 66}}, {"id": 58, "type": "string_literal", "text": "eywordPower\";\n", "parent": 57, "children": [], "start_point": {"row": 40, "column": 51}, "end_point": {"row": 40, "column": 65}}, {"id": 59, "type": "case_statement", "text": "se CircuitScriptTokenKind::KeywordResistor: return \"KeywordResistor\";\n\t", "parent": 47, "children": [60, 61, 62, 63], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 72}}, {"id": 60, "type": "case", "text": "se C", "parent": 59, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 61, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 59, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 28}}, {"id": 62, "type": "ERROR", "text": "e", "parent": 59, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 30}}, {"id": 63, "type": "labeled_statement", "text": "ywordResistor: return \"KeywordResistor\";\n\t", "parent": 59, "children": [64, 65], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 72}}, {"id": 64, "type": "statement_identifier", "text": "ywordResistor: ", "parent": 63, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 45}}, {"id": 65, "type": "return_statement", "text": "turn \"KeywordResistor\";\n\t", "parent": 63, "children": [66], "start_point": {"row": 41, "column": 47}, "end_point": {"row": 41, "column": 72}}, {"id": 66, "type": "string_literal", "text": "eywordResistor\";\n", "parent": 65, "children": [], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 71}}, {"id": 67, "type": "case_statement", "text": "se CircuitScriptTokenKind::KeywordCapacitor: return \"KeywordCapacitor\";\n\t", "parent": 47, "children": [68, 69, 70, 71], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 74}}, {"id": 68, "type": "case", "text": "se C", "parent": 67, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 5}}, {"id": 69, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 67, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 28}}, {"id": 70, "type": "ERROR", "text": "e", "parent": 67, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 30}}, {"id": 71, "type": "labeled_statement", "text": "ywordCapacitor: return \"KeywordCapacitor\";\n\t", "parent": 67, "children": [72, 73], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 74}}, {"id": 72, "type": "statement_identifier", "text": "ywordCapacitor: ", "parent": 71, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 46}}, {"id": 73, "type": "return_statement", "text": "turn \"KeywordCapacitor\";\n\t", "parent": 71, "children": [74], "start_point": {"row": 42, "column": 48}, "end_point": {"row": 42, "column": 74}}, {"id": 74, "type": "string_literal", "text": "eywordCapacitor\";\n", "parent": 73, "children": [], "start_point": {"row": 42, "column": 55}, "end_point": {"row": 42, "column": 73}}, {"id": 75, "type": "case_statement", "text": "se CircuitScriptTokenKind::KeywordInductor: return \"KeywordInductor\";\n\t", "parent": 47, "children": [76, 77, 78, 79], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 72}}, {"id": 76, "type": "case", "text": "se C", "parent": 75, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 77, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 75, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 28}}, {"id": 78, "type": "ERROR", "text": "e", "parent": 75, "children": [], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 30}}, {"id": 79, "type": "labeled_statement", "text": "ywordInductor: return \"KeywordInductor\";\n\t", "parent": 75, "children": [80, 81], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 72}}, {"id": 80, "type": "statement_identifier", "text": "ywordInductor: ", "parent": 79, "children": [], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 45}}, {"id": 81, "type": "return_statement", "text": "turn \"KeywordInductor\";\n\t", "parent": 79, "children": [82], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 72}}, {"id": 82, "type": "string_literal", "text": "eywordInductor\";\n", "parent": 81, "children": [], "start_point": {"row": 43, "column": 54}, "end_point": {"row": 43, "column": 71}}, {"id": 83, "type": "case_statement", "text": "se CircuitScriptTokenKind::KeywordConnect: return \"KeywordConnect\";\n\t", "parent": 47, "children": [84, 85, 86, 87], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 70}}, {"id": 84, "type": "case", "text": "se C", "parent": 83, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 85, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 83, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 28}}, {"id": 86, "type": "ERROR", "text": "e", "parent": 83, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 87, "type": "labeled_statement", "text": "ywordConnect: return \"KeywordConnect\";\n\t", "parent": 83, "children": [88, 89], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 70}}, {"id": 88, "type": "statement_identifier", "text": "ywordConnect: ", "parent": 87, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 44}}, {"id": 89, "type": "return_statement", "text": "turn \"KeywordConnect\";\n\t", "parent": 87, "children": [90], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 70}}, {"id": 90, "type": "string_literal", "text": "eywordConnect\";\n", "parent": 89, "children": [], "start_point": {"row": 44, "column": 53}, "end_point": {"row": 44, "column": 69}}, {"id": 91, "type": "case_statement", "text": "se CircuitScriptTokenKind::KeywordGround: return \"KeywordGround\";\n\t", "parent": 47, "children": [92, 93, 94, 95], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 68}}, {"id": 92, "type": "case", "text": "se C", "parent": 91, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 5}}, {"id": 93, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 91, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 28}}, {"id": 94, "type": "ERROR", "text": "e", "parent": 91, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 30}}, {"id": 95, "type": "labeled_statement", "text": "ywordGround: return \"KeywordGround\";\n\t", "parent": 91, "children": [96, 97], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 68}}, {"id": 96, "type": "statement_identifier", "text": "ywordGround: ", "parent": 95, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 43}}, {"id": 97, "type": "return_statement", "text": "turn \"KeywordGround\";\n\t", "parent": 95, "children": [98], "start_point": {"row": 45, "column": 45}, "end_point": {"row": 45, "column": 68}}, {"id": 98, "type": "string_literal", "text": "eywordGround\";\n", "parent": 97, "children": [], "start_point": {"row": 45, "column": 52}, "end_point": {"row": 45, "column": 67}}, {"id": 99, "type": "case_statement", "text": "se CircuitScriptTokenKind::Equal: return \"=\";\n\t", "parent": 47, "children": [100, 101, 102, 103], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 48}}, {"id": 100, "type": "case", "text": "se C", "parent": 99, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 5}}, {"id": 101, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 99, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 28}}, {"id": 102, "type": "ERROR", "text": "q", "parent": 99, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 103, "type": "labeled_statement", "text": "ual: return \"=\";\n\t", "parent": 99, "children": [104, 105], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 48}}, {"id": 104, "type": "statement_identifier", "text": "ual: ", "parent": 103, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 35}}, {"id": 105, "type": "return_statement", "text": "turn \"=\";\n\t", "parent": 103, "children": [106], "start_point": {"row": 46, "column": 37}, "end_point": {"row": 46, "column": 48}}, {"id": 106, "type": "string_literal", "text": "\";\n", "parent": 105, "children": [], "start_point": {"row": 46, "column": 44}, "end_point": {"row": 46, "column": 47}}, {"id": 107, "type": "case_statement", "text": "se CircuitScriptTokenKind::LeftParen: return \"(\";\n\t", "parent": 47, "children": [108, 109, 110, 111], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 52}}, {"id": 108, "type": "case", "text": "se C", "parent": 107, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 5}}, {"id": 109, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 107, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 28}}, {"id": 110, "type": "ERROR", "text": "e", "parent": 107, "children": [], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 30}}, {"id": 111, "type": "labeled_statement", "text": "ftParen: return \"(\";\n\t", "parent": 107, "children": [112, 113], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 52}}, {"id": 112, "type": "statement_identifier", "text": "ftParen: ", "parent": 111, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 39}}, {"id": 113, "type": "return_statement", "text": "turn \"(\";\n\t", "parent": 111, "children": [114], "start_point": {"row": 47, "column": 41}, "end_point": {"row": 47, "column": 52}}, {"id": 114, "type": "string_literal", "text": "\";\n", "parent": 113, "children": [], "start_point": {"row": 47, "column": 48}, "end_point": {"row": 47, "column": 51}}, {"id": 115, "type": "case_statement", "text": "se CircuitScriptTokenKind::RightParen: return \")\";\n\t", "parent": 47, "children": [116, 117, 118, 119], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 53}}, {"id": 116, "type": "case", "text": "se C", "parent": 115, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 5}}, {"id": 117, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 115, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 28}}, {"id": 118, "type": "ERROR", "text": "i", "parent": 115, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 30}}, {"id": 119, "type": "labeled_statement", "text": "ghtParen: return \")\";\n\t", "parent": 115, "children": [120, 121], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 53}}, {"id": 120, "type": "statement_identifier", "text": "ghtParen: ", "parent": 119, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 40}}, {"id": 121, "type": "return_statement", "text": "turn \")\";\n\t", "parent": 119, "children": [122], "start_point": {"row": 48, "column": 42}, "end_point": {"row": 48, "column": 53}}, {"id": 122, "type": "string_literal", "text": "\";\n", "parent": 121, "children": [], "start_point": {"row": 48, "column": 49}, "end_point": {"row": 48, "column": 52}}, {"id": 123, "type": "case_statement", "text": "se CircuitScriptTokenKind::Comma: return \",\";\n\t", "parent": 47, "children": [124, 125, 126, 127], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 48}}, {"id": 124, "type": "case", "text": "se C", "parent": 123, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 125, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 123, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 28}}, {"id": 126, "type": "ERROR", "text": "o", "parent": 123, "children": [], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 30}}, {"id": 127, "type": "labeled_statement", "text": "mma: return \",\";\n\t", "parent": 123, "children": [128, 129], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 48}}, {"id": 128, "type": "statement_identifier", "text": "mma: ", "parent": 127, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 35}}, {"id": 129, "type": "return_statement", "text": "turn \",\";\n\t", "parent": 127, "children": [130], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 48}}, {"id": 130, "type": "string_literal", "text": "\";\n", "parent": 129, "children": [], "start_point": {"row": 49, "column": 44}, "end_point": {"row": 49, "column": 47}}, {"id": 131, "type": "case_statement", "text": "se CircuitScriptTokenKind::Identifier: return \"Identifier\";\n\t", "parent": 47, "children": [132, 133, 134, 135], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 62}}, {"id": 132, "type": "case", "text": "se C", "parent": 131, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 5}}, {"id": 133, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 131, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 28}}, {"id": 134, "type": "ERROR", "text": "d", "parent": 131, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 30}}, {"id": 135, "type": "labeled_statement", "text": "entifier: return \"Identifier\";\n\t", "parent": 131, "children": [136, 137], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 62}}, {"id": 136, "type": "statement_identifier", "text": "entifier: ", "parent": 135, "children": [], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 40}}, {"id": 137, "type": "return_statement", "text": "turn \"Identifier\";\n\t", "parent": 135, "children": [138], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 62}}, {"id": 138, "type": "string_literal", "text": "dentifier\";\n", "parent": 137, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 61}}, {"id": 139, "type": "case_statement", "text": "se CircuitScriptTokenKind::Number: return \"Number\";\n\t", "parent": 47, "children": [140, 141, 142, 143], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 54}}, {"id": 140, "type": "case", "text": "se C", "parent": 139, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 5}}, {"id": 141, "type": "identifier", "text": "rcuitScriptTokenKind::", "parent": 139, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 28}}, {"id": 142, "type": "ERROR", "text": "u", "parent": 139, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 30}}, {"id": 143, "type": "labeled_statement", "text": "mber: return \"Number\";\n\t", "parent": 139, "children": [144, 145], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 54}}, {"id": 144, "type": "statement_identifier", "text": "mber: ", "parent": 143, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 36}}, {"id": 145, "type": "return_statement", "text": "turn \"Number\";\n\t", "parent": 143, "children": [146], "start_point": {"row": 51, "column": 38}, "end_point": {"row": 51, "column": 54}}, {"id": 146, "type": "string_literal", "text": "umber\";\n", "parent": 145, "children": [], "start_point": {"row": 51, "column": 45}, "end_point": {"row": 51, "column": 53}}, {"id": 147, "type": "return_statement", "text": "turn \"\";\n}", "parent": 32, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 11}}]}, "node_categories": {"declarations": {"functions": [3, 32, 38], "variables": [41], "classes": [33], "imports": [], "modules": [], "enums": [4, 5]}, "statements": {"expressions": [8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 49], "assignments": [], "loops": [], "conditionals": [6, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30, 35, 37, 39, 42, 43, 46, 47, 48, 50, 51, 52, 53, 56, 59, 60, 61, 64, 67, 68, 69, 72, 75, 76, 77, 80, 83, 84, 85, 88, 91, 92, 93, 96, 99, 100, 101, 104, 107, 108, 109, 112, 115, 116, 117, 120, 123, 124, 125, 128, 131, 132, 133, 136, 139, 140, 141, 144], "returns": [57, 65, 73, 81, 89, 97, 105, 113, 121, 129, 137, 145, 147], "exceptions": []}, "expressions": {"calls": [0], "literals": [58, 66, 74, 82, 90, 98, 106, 114, 122, 130, 138, 146], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "CircuitScriptTokenKind", "text_snippet": "um class CircuitScriptTokenKind\n{\n\tKeywordPower,\n\tKeywordResistor,\n\tKeywordCapacitor,\n\tKeywordInduct"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "line std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n\tswitch (kind)\n\t{\n\tcase Cir"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "kenKindToString(const CircuitScriptTokenKind& kind)\n{"}], "class_declarations": [{"node_id": 33, "universal_type": "class", "name": "unknown", "text_snippet": "line s"}], "import_statements": []}, "original_source_code": "\ufeff// GPL v3 License\n// \n// CircuitCalculator/CircuitCalculator\n// Copyright (c) 2022 CircuitCalculator/CircuitScriptTokenKind.h\n// \n// This program 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// This program 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 this program. If not, see <http://www.gnu.org/licenses/>.\n\n#pragma once\n\nenum class CircuitScriptTokenKind\n{\n\tKeywordPower,\n\tKeywordResistor,\n\tKeywordCapacitor,\n\tKeywordInductor,\n\tKeywordGround,\n\tKeywordConnect,\n\tEqual,\n\tLeftParen,\n\tRightParen,\n\tComma,\n\tIdentifier,\n\tNumber\n};\n\ninline std::string TokenKindToString(const CircuitScriptTokenKind& kind)\n{\n\tswitch (kind)\n\t{\n\tcase CircuitScriptTokenKind::KeywordPower: return \"KeywordPower\";\n\tcase CircuitScriptTokenKind::KeywordResistor: return \"KeywordResistor\";\n\tcase CircuitScriptTokenKind::KeywordCapacitor: return \"KeywordCapacitor\";\n\tcase CircuitScriptTokenKind::KeywordInductor: return \"KeywordInductor\";\n\tcase CircuitScriptTokenKind::KeywordConnect: return \"KeywordConnect\";\n\tcase CircuitScriptTokenKind::KeywordGround: return \"KeywordGround\";\n\tcase CircuitScriptTokenKind::Equal: return \"=\";\n\tcase CircuitScriptTokenKind::LeftParen: return \"(\";\n\tcase CircuitScriptTokenKind::RightParen: return \")\";\n\tcase CircuitScriptTokenKind::Comma: return \",\";\n\tcase CircuitScriptTokenKind::Identifier: return \"Identifier\";\n\tcase CircuitScriptTokenKind::Number: return \"Number\";\n\t}\n\treturn \"\";\n}\n"}
214
c
#include <glib.h> #include <glib/gi18n.h> #include <string.h> #include "mdsfs.h" #include "blowfish.h" #include "encryption.h" #include "lockmgr.h" guint8 * mdsfs_lockmgr_keygen() { gint len = 48; guint8 *key, *ptr; /* allocate a memboy for 448 bits */ key = (guint8 *)g_new0(guint8, len + 1); /* seed */ srand(time(0)+getpid()); for (ptr = key; len > 0; --len, ++ptr) *ptr = (guint8)(rand() % 256); return key; } guint8 * mdsfs_lockmgr_keygen_with_hex() { gint len = 96; guint8 *key, *ptr; gchar table[16] = "0123456789abcdef"; /* allocate a memboy for 448 bits */ key = (guint8 *)g_new0(guint8, len + 1); /* seed */ srand(time(0)+getpid()); for (ptr = key; len > 0; --len, ++ptr) *ptr = table[rand() % 16]; return key; } guint8 * mdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key) { guint8 newkey[48]; mdsfs_blowfish_init(key); encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48); return g_strndup(newkey, 48); } guint8 * mdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key) { off_t i; guint8 *curkey; guint8 *newkey; curkey = g_strndup(key, 48); for (i = num; i >= 0; --i) { newkey = mdsfs_lockmgr_get(mdsfs, i, curkey); g_free(curkey); curkey = newkey; } return curkey; } gboolean mdsfs_lockmgr_check_key(const gchar *key) { /* 8 bits for level and 384 bits for blowfish key */ if (strlen(key) != 98) { printf("Secret key length is incorrect, we need 392-bit key.\n"); return FALSE; } if (!mdsfs_misc_check_key(key)) { printf("Secret key is incorrect, please using hex strings.\n"); return FALSE; } return TRUE; } void mdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key) { guint8 *final_key; off_t num; /* figure level */ num = *key; final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1); mdsfs_blowfish_init(final_key); g_free(final_key); }
21.85
81
(translation_unit) "#include <glib.h>\n#include <glib/gi18n.h>\n#include <string.h>\n\n#include "mdsfs.h"\n#include "blowfish.h"\n#include "encryption.h"\n#include "lockmgr.h"\n\nguint8 *\nmdsfs_lockmgr_keygen()\n{\n gint len = 48;\n guint8 *key, *ptr;\n\n /* allocate a memboy for 448 bits */\n key = (guint8 *)g_new0(guint8, len + 1);\n\n /* seed */\n srand(time(0)+getpid());\n for (ptr = key; len > 0; --len, ++ptr)\n *ptr = (guint8)(rand() % 256);\n\n return key;\n}\n\nguint8 *\nmdsfs_lockmgr_keygen_with_hex()\n{\n gint len = 96;\n guint8 *key, *ptr;\n gchar table[16] = "0123456789abcdef";\n\n /* allocate a memboy for 448 bits */\n key = (guint8 *)g_new0(guint8, len + 1);\n\n /* seed */\n srand(time(0)+getpid());\n for (ptr = key; len > 0; --len, ++ptr)\n *ptr = table[rand() % 16];\n\n return key;\n}\n\nguint8 *\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n guint8 newkey[48];\n\n mdsfs_blowfish_init(key);\n encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48);\n\n return g_strndup(newkey, 48);\n}\n\nguint8 *\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n off_t i;\n guint8 *curkey;\n guint8 *newkey;\n\n curkey = g_strndup(key, 48);\n for (i = num; i >= 0; --i) {\n newkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n g_free(curkey);\n curkey = newkey;\n }\n\n return curkey;\n}\n\ngboolean\nmdsfs_lockmgr_check_key(const gchar *key)\n{\n /* 8 bits for level and 384 bits for blowfish key */\n if (strlen(key) != 98) {\n printf("Secret key length is incorrect, we need 392-bit key.\n");\n return FALSE;\n }\n\n if (!mdsfs_misc_check_key(key)) {\n printf("Secret key is incorrect, please using hex strings.\n");\n return FALSE;\n }\n\n return TRUE;\n}\n\nvoid\nmdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)\n{\n guint8 *final_key;\n off_t num;\n\n /* figure level */\n num = *key;\n\n final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1);\n\n mdsfs_blowfish_init(final_key);\n\n g_free(final_key);\n}\n" (preproc_include) "#include <glib.h>\n" (#include) "#include" (system_lib_string) "<glib.h>" (preproc_include) "#include <glib/gi18n.h>\n" (#include) "#include" (system_lib_string) "<glib/gi18n.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include "mdsfs.h"\n" (#include) "#include" (string_literal) ""mdsfs.h"" (") """ (string_content) "mdsfs.h" (") """ (preproc_include) "#include "blowfish.h"\n" (#include) "#include" (string_literal) ""blowfish.h"" (") """ (string_content) "blowfish.h" (") """ (preproc_include) "#include "encryption.h"\n" (#include) "#include" (string_literal) ""encryption.h"" (") """ (string_content) "encryption.h" (") """ (preproc_include) "#include "lockmgr.h"\n" (#include) "#include" (string_literal) ""lockmgr.h"" (") """ (string_content) "lockmgr.h" (") """ (function_definition) "guint8 *\nmdsfs_lockmgr_keygen()\n{\n gint len = 48;\n guint8 *key, *ptr;\n\n /* allocate a memboy for 448 bits */\n key = (guint8 *)g_new0(guint8, len + 1);\n\n /* seed */\n srand(time(0)+getpid());\n for (ptr = key; len > 0; --len, ++ptr)\n *ptr = (guint8)(rand() % 256);\n\n return key;\n}" (type_identifier) "guint8" (pointer_declarator) "*\nmdsfs_lockmgr_keygen()" (*) "*" (function_declarator) "mdsfs_lockmgr_keygen()" (identifier) "mdsfs_lockmgr_keygen" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n gint len = 48;\n guint8 *key, *ptr;\n\n /* allocate a memboy for 448 bits */\n key = (guint8 *)g_new0(guint8, len + 1);\n\n /* seed */\n srand(time(0)+getpid());\n for (ptr = key; len > 0; --len, ++ptr)\n *ptr = (guint8)(rand() % 256);\n\n return key;\n}" ({) "{" (declaration) "gint len = 48;" (type_identifier) "gint" (init_declarator) "len = 48" (identifier) "len" (=) "=" (number_literal) "48" (;) ";" (declaration) "guint8 *key, *ptr;" (type_identifier) "guint8" (pointer_declarator) "*key" (*) "*" (identifier) "key" (,) "," (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" (;) ";" (comment) "/* allocate a memboy for 448 bits */" (expression_statement) "key = (guint8 *)g_new0(guint8, len + 1);" (assignment_expression) "key = (guint8 *)g_new0(guint8, len + 1)" (identifier) "key" (=) "=" (cast_expression) "(guint8 *)g_new0(guint8, len + 1)" (() "(" (type_descriptor) "guint8 *" (type_identifier) "guint8" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "g_new0(guint8, len + 1)" (identifier) "g_new0" (argument_list) "(guint8, len + 1)" (() "(" (identifier) "guint8" (,) "," (binary_expression) "len + 1" (identifier) "len" (+) "+" (number_literal) "1" ()) ")" (;) ";" (comment) "/* seed */" (expression_statement) "srand(time(0)+getpid());" (call_expression) "srand(time(0)+getpid())" (identifier) "srand" (argument_list) "(time(0)+getpid())" (() "(" (binary_expression) "time(0)+getpid()" (call_expression) "time(0)" (identifier) "time" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (+) "+" (call_expression) "getpid()" (identifier) "getpid" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (for_statement) "for (ptr = key; len > 0; --len, ++ptr)\n *ptr = (guint8)(rand() % 256);" (for) "for" (() "(" (assignment_expression) "ptr = key" (identifier) "ptr" (=) "=" (identifier) "key" (;) ";" (binary_expression) "len > 0" (identifier) "len" (>) ">" (number_literal) "0" (;) ";" (comma_expression) "--len, ++ptr" (update_expression) "--len" (--) "--" (identifier) "len" (,) "," (update_expression) "++ptr" (++) "++" (identifier) "ptr" ()) ")" (expression_statement) "*ptr = (guint8)(rand() % 256);" (assignment_expression) "*ptr = (guint8)(rand() % 256)" (pointer_expression) "*ptr" (*) "*" (identifier) "ptr" (=) "=" (call_expression) "(guint8)(rand() % 256)" (parenthesized_expression) "(guint8)" (() "(" (identifier) "guint8" ()) ")" (argument_list) "(rand() % 256)" (() "(" (binary_expression) "rand() % 256" (call_expression) "rand()" (identifier) "rand" (argument_list) "()" (() "(" ()) ")" (%) "%" (number_literal) "256" ()) ")" (;) ";" (return_statement) "return key;" (return) "return" (identifier) "key" (;) ";" (}) "}" (function_definition) "guint8 *\nmdsfs_lockmgr_keygen_with_hex()\n{\n gint len = 96;\n guint8 *key, *ptr;\n gchar table[16] = "0123456789abcdef";\n\n /* allocate a memboy for 448 bits */\n key = (guint8 *)g_new0(guint8, len + 1);\n\n /* seed */\n srand(time(0)+getpid());\n for (ptr = key; len > 0; --len, ++ptr)\n *ptr = table[rand() % 16];\n\n return key;\n}" (type_identifier) "guint8" (pointer_declarator) "*\nmdsfs_lockmgr_keygen_with_hex()" (*) "*" (function_declarator) "mdsfs_lockmgr_keygen_with_hex()" (identifier) "mdsfs_lockmgr_keygen_with_hex" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n gint len = 96;\n guint8 *key, *ptr;\n gchar table[16] = "0123456789abcdef";\n\n /* allocate a memboy for 448 bits */\n key = (guint8 *)g_new0(guint8, len + 1);\n\n /* seed */\n srand(time(0)+getpid());\n for (ptr = key; len > 0; --len, ++ptr)\n *ptr = table[rand() % 16];\n\n return key;\n}" ({) "{" (declaration) "gint len = 96;" (type_identifier) "gint" (init_declarator) "len = 96" (identifier) "len" (=) "=" (number_literal) "96" (;) ";" (declaration) "guint8 *key, *ptr;" (type_identifier) "guint8" (pointer_declarator) "*key" (*) "*" (identifier) "key" (,) "," (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" (;) ";" (declaration) "gchar table[16] = "0123456789abcdef";" (type_identifier) "gchar" (init_declarator) "table[16] = "0123456789abcdef"" (array_declarator) "table[16]" (identifier) "table" ([) "[" (number_literal) "16" (]) "]" (=) "=" (string_literal) ""0123456789abcdef"" (") """ (string_content) "0123456789abcdef" (") """ (;) ";" (comment) "/* allocate a memboy for 448 bits */" (expression_statement) "key = (guint8 *)g_new0(guint8, len + 1);" (assignment_expression) "key = (guint8 *)g_new0(guint8, len + 1)" (identifier) "key" (=) "=" (cast_expression) "(guint8 *)g_new0(guint8, len + 1)" (() "(" (type_descriptor) "guint8 *" (type_identifier) "guint8" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "g_new0(guint8, len + 1)" (identifier) "g_new0" (argument_list) "(guint8, len + 1)" (() "(" (identifier) "guint8" (,) "," (binary_expression) "len + 1" (identifier) "len" (+) "+" (number_literal) "1" ()) ")" (;) ";" (comment) "/* seed */" (expression_statement) "srand(time(0)+getpid());" (call_expression) "srand(time(0)+getpid())" (identifier) "srand" (argument_list) "(time(0)+getpid())" (() "(" (binary_expression) "time(0)+getpid()" (call_expression) "time(0)" (identifier) "time" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (+) "+" (call_expression) "getpid()" (identifier) "getpid" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (for_statement) "for (ptr = key; len > 0; --len, ++ptr)\n *ptr = table[rand() % 16];" (for) "for" (() "(" (assignment_expression) "ptr = key" (identifier) "ptr" (=) "=" (identifier) "key" (;) ";" (binary_expression) "len > 0" (identifier) "len" (>) ">" (number_literal) "0" (;) ";" (comma_expression) "--len, ++ptr" (update_expression) "--len" (--) "--" (identifier) "len" (,) "," (update_expression) "++ptr" (++) "++" (identifier) "ptr" ()) ")" (expression_statement) "*ptr = table[rand() % 16];" (assignment_expression) "*ptr = table[rand() % 16]" (pointer_expression) "*ptr" (*) "*" (identifier) "ptr" (=) "=" (subscript_expression) "table[rand() % 16]" (identifier) "table" ([) "[" (binary_expression) "rand() % 16" (call_expression) "rand()" (identifier) "rand" (argument_list) "()" (() "(" ()) ")" (%) "%" (number_literal) "16" (]) "]" (;) ";" (return_statement) "return key;" (return) "return" (identifier) "key" (;) ";" (}) "}" (function_definition) "guint8 *\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n guint8 newkey[48];\n\n mdsfs_blowfish_init(key);\n encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48);\n\n return g_strndup(newkey, 48);\n}" (type_identifier) "guint8" (pointer_declarator) "*\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)" (*) "*" (function_declarator) "mdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)" (identifier) "mdsfs_lockmgr_get" (parameter_list) "(MDSFS *mdsfs, off_t num, const guint8 *key)" (() "(" (parameter_declaration) "MDSFS *mdsfs" (type_identifier) "MDSFS" (pointer_declarator) "*mdsfs" (*) "*" (identifier) "mdsfs" (,) "," (parameter_declaration) "off_t num" (type_identifier) "off_t" (identifier) "num" (,) "," (parameter_declaration) "const guint8 *key" (type_qualifier) "const" (const) "const" (type_identifier) "guint8" (pointer_declarator) "*key" (*) "*" (identifier) "key" ()) ")" (compound_statement) "{\n guint8 newkey[48];\n\n mdsfs_blowfish_init(key);\n encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48);\n\n return g_strndup(newkey, 48);\n}" ({) "{" (declaration) "guint8 newkey[48];" (type_identifier) "guint8" (array_declarator) "newkey[48]" (identifier) "newkey" ([) "[" (number_literal) "48" (]) "]" (;) ";" (expression_statement) "mdsfs_blowfish_init(key);" (call_expression) "mdsfs_blowfish_init(key)" (identifier) "mdsfs_blowfish_init" (argument_list) "(key)" (() "(" (identifier) "key" ()) ")" (;) ";" (expression_statement) "encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48);" (call_expression) "encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48)" (identifier) "encryption_decode_to_data_from_data" (argument_list) "(newkey, 48, mdsfs->key[num].key, 48)" (() "(" (identifier) "newkey" (,) "," (number_literal) "48" (,) "," (field_expression) "mdsfs->key[num].key" (subscript_expression) "mdsfs->key[num]" (field_expression) "mdsfs->key" (identifier) "mdsfs" (->) "->" (field_identifier) "key" ([) "[" (identifier) "num" (]) "]" (.) "." (field_identifier) "key" (,) "," (number_literal) "48" ()) ")" (;) ";" (return_statement) "return g_strndup(newkey, 48);" (return) "return" (call_expression) "g_strndup(newkey, 48)" (identifier) "g_strndup" (argument_list) "(newkey, 48)" (() "(" (identifier) "newkey" (,) "," (number_literal) "48" ()) ")" (;) ";" (}) "}" (function_definition) "guint8 *\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n off_t i;\n guint8 *curkey;\n guint8 *newkey;\n\n curkey = g_strndup(key, 48);\n for (i = num; i >= 0; --i) {\n newkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n g_free(curkey);\n curkey = newkey;\n }\n\n return curkey;\n}" (type_identifier) "guint8" (pointer_declarator) "*\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)" (*) "*" (function_declarator) "mdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)" (identifier) "mdsfs_lockmgr_get_last" (parameter_list) "(MDSFS *mdsfs, off_t num, const guint8 *key)" (() "(" (parameter_declaration) "MDSFS *mdsfs" (type_identifier) "MDSFS" (pointer_declarator) "*mdsfs" (*) "*" (identifier) "mdsfs" (,) "," (parameter_declaration) "off_t num" (type_identifier) "off_t" (identifier) "num" (,) "," (parameter_declaration) "const guint8 *key" (type_qualifier) "const" (const) "const" (type_identifier) "guint8" (pointer_declarator) "*key" (*) "*" (identifier) "key" ()) ")" (compound_statement) "{\n off_t i;\n guint8 *curkey;\n guint8 *newkey;\n\n curkey = g_strndup(key, 48);\n for (i = num; i >= 0; --i) {\n newkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n g_free(curkey);\n curkey = newkey;\n }\n\n return curkey;\n}" ({) "{" (declaration) "off_t i;" (type_identifier) "off_t" (identifier) "i" (;) ";" (declaration) "guint8 *curkey;" (type_identifier) "guint8" (pointer_declarator) "*curkey" (*) "*" (identifier) "curkey" (;) ";" (declaration) "guint8 *newkey;" (type_identifier) "guint8" (pointer_declarator) "*newkey" (*) "*" (identifier) "newkey" (;) ";" (expression_statement) "curkey = g_strndup(key, 48);" (assignment_expression) "curkey = g_strndup(key, 48)" (identifier) "curkey" (=) "=" (call_expression) "g_strndup(key, 48)" (identifier) "g_strndup" (argument_list) "(key, 48)" (() "(" (identifier) "key" (,) "," (number_literal) "48" ()) ")" (;) ";" (for_statement) "for (i = num; i >= 0; --i) {\n newkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n g_free(curkey);\n curkey = newkey;\n }" (for) "for" (() "(" (assignment_expression) "i = num" (identifier) "i" (=) "=" (identifier) "num" (;) ";" (binary_expression) "i >= 0" (identifier) "i" (>=) ">=" (number_literal) "0" (;) ";" (update_expression) "--i" (--) "--" (identifier) "i" ()) ")" (compound_statement) "{\n newkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n g_free(curkey);\n curkey = newkey;\n }" ({) "{" (expression_statement) "newkey = mdsfs_lockmgr_get(mdsfs, i, curkey);" (assignment_expression) "newkey = mdsfs_lockmgr_get(mdsfs, i, curkey)" (identifier) "newkey" (=) "=" (call_expression) "mdsfs_lockmgr_get(mdsfs, i, curkey)" (identifier) "mdsfs_lockmgr_get" (argument_list) "(mdsfs, i, curkey)" (() "(" (identifier) "mdsfs" (,) "," (identifier) "i" (,) "," (identifier) "curkey" ()) ")" (;) ";" (expression_statement) "g_free(curkey);" (call_expression) "g_free(curkey)" (identifier) "g_free" (argument_list) "(curkey)" (() "(" (identifier) "curkey" ()) ")" (;) ";" (expression_statement) "curkey = newkey;" (assignment_expression) "curkey = newkey" (identifier) "curkey" (=) "=" (identifier) "newkey" (;) ";" (}) "}" (return_statement) "return curkey;" (return) "return" (identifier) "curkey" (;) ";" (}) "}" (function_definition) "gboolean\nmdsfs_lockmgr_check_key(const gchar *key)\n{\n /* 8 bits for level and 384 bits for blowfish key */\n if (strlen(key) != 98) {\n printf("Secret key length is incorrect, we need 392-bit key.\n");\n return FALSE;\n }\n\n if (!mdsfs_misc_check_key(key)) {\n printf("Secret key is incorrect, please using hex strings.\n");\n return FALSE;\n }\n\n return TRUE;\n}" (type_identifier) "gboolean" (function_declarator) "mdsfs_lockmgr_check_key(const gchar *key)" (identifier) "mdsfs_lockmgr_check_key" (parameter_list) "(const gchar *key)" (() "(" (parameter_declaration) "const gchar *key" (type_qualifier) "const" (const) "const" (type_identifier) "gchar" (pointer_declarator) "*key" (*) "*" (identifier) "key" ()) ")" (compound_statement) "{\n /* 8 bits for level and 384 bits for blowfish key */\n if (strlen(key) != 98) {\n printf("Secret key length is incorrect, we need 392-bit key.\n");\n return FALSE;\n }\n\n if (!mdsfs_misc_check_key(key)) {\n printf("Secret key is incorrect, please using hex strings.\n");\n return FALSE;\n }\n\n return TRUE;\n}" ({) "{" (comment) "/* 8 bits for level and 384 bits for blowfish key */" (if_statement) "if (strlen(key) != 98) {\n printf("Secret key length is incorrect, we need 392-bit key.\n");\n return FALSE;\n }" (if) "if" (parenthesized_expression) "(strlen(key) != 98)" (() "(" (binary_expression) "strlen(key) != 98" (call_expression) "strlen(key)" (identifier) "strlen" (argument_list) "(key)" (() "(" (identifier) "key" ()) ")" (!=) "!=" (number_literal) "98" ()) ")" (compound_statement) "{\n printf("Secret key length is incorrect, we need 392-bit key.\n");\n return FALSE;\n }" ({) "{" (expression_statement) "printf("Secret key length is incorrect, we need 392-bit key.\n");" (call_expression) "printf("Secret key length is incorrect, we need 392-bit key.\n")" (identifier) "printf" (argument_list) "("Secret key length is incorrect, we need 392-bit key.\n")" (() "(" (string_literal) ""Secret key length is incorrect, we need 392-bit key.\n"" (") """ (string_content) "Secret key length is incorrect, we need 392-bit key." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (}) "}" (if_statement) "if (!mdsfs_misc_check_key(key)) {\n printf("Secret key is incorrect, please using hex strings.\n");\n return FALSE;\n }" (if) "if" (parenthesized_expression) "(!mdsfs_misc_check_key(key))" (() "(" (unary_expression) "!mdsfs_misc_check_key(key)" (!) "!" (call_expression) "mdsfs_misc_check_key(key)" (identifier) "mdsfs_misc_check_key" (argument_list) "(key)" (() "(" (identifier) "key" ()) ")" ()) ")" (compound_statement) "{\n printf("Secret key is incorrect, please using hex strings.\n");\n return FALSE;\n }" ({) "{" (expression_statement) "printf("Secret key is incorrect, please using hex strings.\n");" (call_expression) "printf("Secret key is incorrect, please using hex strings.\n")" (identifier) "printf" (argument_list) "("Secret key is incorrect, please using hex strings.\n")" (() "(" (string_literal) ""Secret key is incorrect, please using hex strings.\n"" (") """ (string_content) "Secret key is incorrect, please using hex strings." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (}) "}" (return_statement) "return TRUE;" (return) "return" (true) "TRUE" (;) ";" (}) "}" (function_definition) "void\nmdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)\n{\n guint8 *final_key;\n off_t num;\n\n /* figure level */\n num = *key;\n\n final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1);\n\n mdsfs_blowfish_init(final_key);\n\n g_free(final_key);\n}" (primitive_type) "void" (function_declarator) "mdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)" (identifier) "mdsfs_lockmgr_init" (parameter_list) "(MDSFS *mdsfs, const guint8 *key)" (() "(" (parameter_declaration) "MDSFS *mdsfs" (type_identifier) "MDSFS" (pointer_declarator) "*mdsfs" (*) "*" (identifier) "mdsfs" (,) "," (parameter_declaration) "const guint8 *key" (type_qualifier) "const" (const) "const" (type_identifier) "guint8" (pointer_declarator) "*key" (*) "*" (identifier) "key" ()) ")" (compound_statement) "{\n guint8 *final_key;\n off_t num;\n\n /* figure level */\n num = *key;\n\n final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1);\n\n mdsfs_blowfish_init(final_key);\n\n g_free(final_key);\n}" ({) "{" (declaration) "guint8 *final_key;" (type_identifier) "guint8" (pointer_declarator) "*final_key" (*) "*" (identifier) "final_key" (;) ";" (declaration) "off_t num;" (type_identifier) "off_t" (identifier) "num" (;) ";" (comment) "/* figure level */" (expression_statement) "num = *key;" (assignment_expression) "num = *key" (identifier) "num" (=) "=" (pointer_expression) "*key" (*) "*" (identifier) "key" (;) ";" (expression_statement) "final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1);" (assignment_expression) "final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1)" (identifier) "final_key" (=) "=" (call_expression) "mdsfs_lockmgr_get_last(mdsfs, num, key+1)" (identifier) "mdsfs_lockmgr_get_last" (argument_list) "(mdsfs, num, key+1)" (() "(" (identifier) "mdsfs" (,) "," (identifier) "num" (,) "," (binary_expression) "key+1" (identifier) "key" (+) "+" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "mdsfs_blowfish_init(final_key);" (call_expression) "mdsfs_blowfish_init(final_key)" (identifier) "mdsfs_blowfish_init" (argument_list) "(final_key)" (() "(" (identifier) "final_key" ()) ")" (;) ";" (expression_statement) "g_free(final_key);" (call_expression) "g_free(final_key)" (identifier) "g_free" (argument_list) "(final_key)" (() "(" (identifier) "final_key" ()) ")" (;) ";" (}) "}"
644
0
{"language": "c", "success": true, "metadata": {"lines": 81, "avg_line_length": 21.85, "nodes": 403, "errors": 0, "source_hash": "8496d7408225b50b8170da3a3d4f8c41548c4adbb01e07c6588766aa141d8641", "categorized_nodes": 285}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <glib.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": "<glib.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "#include <glib/gi18n.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": "<glib/gi18n.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <string.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": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"mdsfs.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"mdsfs.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include \"blowfish.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": "string_literal", "text": "\"blowfish.h\"", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 21}}, {"id": 15, "type": "preproc_include", "text": "#include \"encryption.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"encryption.h\"", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 23}}, {"id": 18, "type": "preproc_include", "text": "#include \"lockmgr.h\"\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": "string_literal", "text": "\"lockmgr.h\"", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 20}}, {"id": 21, "type": "function_definition", "text": "guint8 *\nmdsfs_lockmgr_keygen()\n{\n\tgint len = 48;\n\tguint8 *key, *ptr;\n\n\t/* allocate a memboy for 448 bits */\n\tkey = (guint8 *)g_new0(guint8, len + 1);\n\n\t/* seed */\n\tsrand(time(0)+getpid());\n\tfor (ptr = key; len > 0; --len, ++ptr)\n\t\t*ptr = (guint8)(rand() % 256);\n\n\treturn key;\n}", "parent": null, "children": [22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "guint8", "parent": 21, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 23, "type": "pointer_declarator", "text": "*\nmdsfs_lockmgr_keygen()", "parent": 21, "children": [24, 25], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 10, "column": 22}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 8}}, {"id": 25, "type": "function_declarator", "text": "mdsfs_lockmgr_keygen()", "parent": 23, "children": [26, 27], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 22}}, {"id": 26, "type": "identifier", "text": "mdsfs_lockmgr_keygen", "parent": 25, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 20}}, {"id": 27, "type": "parameter_list", "text": "()", "parent": 25, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 22}}, {"id": 28, "type": "declaration", "text": "gint len = 48;", "parent": 21, "children": [29, 30], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 15}}, {"id": 29, "type": "type_identifier", "text": "gint", "parent": 28, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 30, "type": "init_declarator", "text": "len = 48", "parent": 28, "children": [31, 32, 33], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 14}}, {"id": 31, "type": "identifier", "text": "len", "parent": 30, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 9}}, {"id": 32, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 11}}, {"id": 33, "type": "number_literal", "text": "48", "parent": 30, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 14}}, {"id": 34, "type": "declaration", "text": "guint8 *key, *ptr;", "parent": 21, "children": [35, 36, 39], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 19}}, {"id": 35, "type": "type_identifier", "text": "guint8", "parent": 34, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 7}}, {"id": 36, "type": "pointer_declarator", "text": "*key", "parent": 34, "children": [37, 38], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 38, "type": "identifier", "text": "key", "parent": 36, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 12}}, {"id": 39, "type": "pointer_declarator", "text": "*ptr", "parent": 34, "children": [40, 41], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 18}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 15}}, {"id": 41, "type": "identifier", "text": "ptr", "parent": 39, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 18}}, {"id": 42, "type": "assignment_expression", "text": "key = (guint8 *)g_new0(guint8, len + 1)", "parent": 21, "children": [43, 44, 45], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 40}}, {"id": 43, "type": "identifier", "text": "key", "parent": 42, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 6}}, {"id": 45, "type": "cast_expression", "text": "(guint8 *)g_new0(guint8, len + 1)", "parent": 42, "children": [46, 50], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 40}}, {"id": 46, "type": "type_descriptor", "text": "guint8 *", "parent": 45, "children": [47, 48], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 16}}, {"id": 47, "type": "type_identifier", "text": "guint8", "parent": 46, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 48, "type": "abstract_pointer_declarator", "text": "*", "parent": 46, "children": [49], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 16}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 16}}, {"id": 50, "type": "call_expression", "text": "g_new0(guint8, len + 1)", "parent": 45, "children": [51, 52], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 40}}, {"id": 51, "type": "identifier", "text": "g_new0", "parent": 50, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 23}}, {"id": 52, "type": "argument_list", "text": "(guint8, len + 1)", "parent": 50, "children": [53, 54], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 40}}, {"id": 53, "type": "identifier", "text": "guint8", "parent": 52, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 30}}, {"id": 54, "type": "binary_expression", "text": "len + 1", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 39}}, {"id": 55, "type": "identifier", "text": "len", "parent": 54, "children": [], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 35}}, {"id": 56, "type": "+", "text": "+", "parent": 54, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 37}}, {"id": 57, "type": "number_literal", "text": "1", "parent": 54, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 39}}, {"id": 58, "type": "call_expression", "text": "srand(time(0)+getpid())", "parent": 21, "children": [59, 60], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 24}}, {"id": 59, "type": "identifier", "text": "srand", "parent": 58, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 6}}, {"id": 60, "type": "argument_list", "text": "(time(0)+getpid())", "parent": 58, "children": [61], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 24}}, {"id": 61, "type": "binary_expression", "text": "time(0)+getpid()", "parent": 60, "children": [62, 66, 67], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 23}}, {"id": 62, "type": "call_expression", "text": "time(0)", "parent": 61, "children": [63, 64], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 14}}, {"id": 63, "type": "identifier", "text": "time", "parent": 62, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 11}}, {"id": 64, "type": "argument_list", "text": "(0)", "parent": 62, "children": [65], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 14}}, {"id": 65, "type": "number_literal", "text": "0", "parent": 64, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 13}}, {"id": 66, "type": "+", "text": "+", "parent": 61, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 15}}, {"id": 67, "type": "call_expression", "text": "getpid()", "parent": 61, "children": [68, 69], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 23}}, {"id": 68, "type": "identifier", "text": "getpid", "parent": 67, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 21}}, {"id": 69, "type": "argument_list", "text": "()", "parent": 67, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 23}}, {"id": 70, "type": "for_statement", "text": "for (ptr = key; len > 0; --len, ++ptr)\n\t\t*ptr = (guint8)(rand() % 256);", "parent": 21, "children": [71, 75, 79], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 21, "column": 32}}, {"id": 71, "type": "assignment_expression", "text": "ptr = key", "parent": 70, "children": [72, 73, 74], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 15}}, {"id": 72, "type": "identifier", "text": "ptr", "parent": 71, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 9}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 74, "type": "identifier", "text": "key", "parent": 71, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 15}}, {"id": 75, "type": "binary_expression", "text": "len > 0", "parent": 70, "children": [76, 77, 78], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 24}}, {"id": 76, "type": "identifier", "text": "len", "parent": 75, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 20}}, {"id": 77, "type": ">", "text": ">", "parent": 75, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 22}}, {"id": 78, "type": "number_literal", "text": "0", "parent": 75, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 24}}, {"id": 79, "type": "comma_expression", "text": "--len, ++ptr", "parent": 70, "children": [80, 83], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 38}}, {"id": 80, "type": "update_expression", "text": "--len", "parent": 79, "children": [81, 82], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 31}}, {"id": 81, "type": "--", "text": "--", "parent": 80, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 28}}, {"id": 82, "type": "identifier", "text": "len", "parent": 80, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 31}}, {"id": 83, "type": "update_expression", "text": "++ptr", "parent": 79, "children": [84, 85], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 38}}, {"id": 84, "type": "++", "text": "++", "parent": 83, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 35}}, {"id": 85, "type": "identifier", "text": "ptr", "parent": 83, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 38}}, {"id": 86, "type": "assignment_expression", "text": "*ptr = (guint8)(rand() % 256)", "parent": 70, "children": [87, 90, 91], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 31}}, {"id": 87, "type": "pointer_expression", "text": "*ptr", "parent": 86, "children": [88, 89], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 88, "type": "*", "text": "*", "parent": 87, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 3}}, {"id": 89, "type": "identifier", "text": "ptr", "parent": 87, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 6}}, {"id": 90, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 8}}, {"id": 91, "type": "call_expression", "text": "(guint8)(rand() % 256)", "parent": 86, "children": [92, 94], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 31}}, {"id": 92, "type": "parenthesized_expression", "text": "(guint8)", "parent": 91, "children": [93], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 17}}, {"id": 93, "type": "identifier", "text": "guint8", "parent": 92, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 16}}, {"id": 94, "type": "argument_list", "text": "(rand() % 256)", "parent": 91, "children": [95], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 31}}, {"id": 95, "type": "binary_expression", "text": "rand() % 256", "parent": 94, "children": [96, 99, 100], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 30}}, {"id": 96, "type": "call_expression", "text": "rand()", "parent": 95, "children": [97, 98], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 24}}, {"id": 97, "type": "identifier", "text": "rand", "parent": 96, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 22}}, {"id": 98, "type": "argument_list", "text": "()", "parent": 96, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 24}}, {"id": 99, "type": "%", "text": "%", "parent": 95, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 26}}, {"id": 100, "type": "number_literal", "text": "256", "parent": 95, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 30}}, {"id": 101, "type": "return_statement", "text": "return key;", "parent": 21, "children": [102], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 12}}, {"id": 102, "type": "identifier", "text": "key", "parent": 101, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 11}}, {"id": 103, "type": "function_definition", "text": "guint8 *\nmdsfs_lockmgr_keygen_with_hex()\n{\n\tgint len = 96;\n\tguint8 *key, *ptr;\n\tgchar table[16] = \"0123456789abcdef\";\n\n\t/* allocate a memboy for 448 bits */\n\tkey = (guint8 *)g_new0(guint8, len + 1);\n\n\t/* seed */\n\tsrand(time(0)+getpid());\n\tfor (ptr = key; len > 0; --len, ++ptr)\n\t\t*ptr = table[rand() % 16];\n\n\treturn key;\n}", "parent": null, "children": [104, 105], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 104, "type": "type_identifier", "text": "guint8", "parent": 103, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 105, "type": "pointer_declarator", "text": "*\nmdsfs_lockmgr_keygen_with_hex()", "parent": 103, "children": [106, 107], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 27, "column": 31}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 8}}, {"id": 107, "type": "function_declarator", "text": "mdsfs_lockmgr_keygen_with_hex()", "parent": 105, "children": [108, 109], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 31}}, {"id": 108, "type": "identifier", "text": "mdsfs_lockmgr_keygen_with_hex", "parent": 107, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 29}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 27, "column": 29}, "end_point": {"row": 27, "column": 31}}, {"id": 110, "type": "declaration", "text": "gint len = 96;", "parent": 103, "children": [111, 112], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 15}}, {"id": 111, "type": "type_identifier", "text": "gint", "parent": 110, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 112, "type": "init_declarator", "text": "len = 96", "parent": 110, "children": [113, 114, 115], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 14}}, {"id": 113, "type": "identifier", "text": "len", "parent": 112, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 9}}, {"id": 114, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 11}}, {"id": 115, "type": "number_literal", "text": "96", "parent": 112, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 14}}, {"id": 116, "type": "declaration", "text": "guint8 *key, *ptr;", "parent": 103, "children": [117, 118, 121], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 19}}, {"id": 117, "type": "type_identifier", "text": "guint8", "parent": 116, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 7}}, {"id": 118, "type": "pointer_declarator", "text": "*key", "parent": 116, "children": [119, 120], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 12}}, {"id": 119, "type": "*", "text": "*", "parent": 118, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 9}}, {"id": 120, "type": "identifier", "text": "key", "parent": 118, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 12}}, {"id": 121, "type": "pointer_declarator", "text": "*ptr", "parent": 116, "children": [122, 123], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 18}}, {"id": 122, "type": "*", "text": "*", "parent": 121, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 15}}, {"id": 123, "type": "identifier", "text": "ptr", "parent": 121, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 18}}, {"id": 124, "type": "declaration", "text": "gchar table[16] = \"0123456789abcdef\";", "parent": 103, "children": [125, 126], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 38}}, {"id": 125, "type": "type_identifier", "text": "gchar", "parent": 124, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 6}}, {"id": 126, "type": "init_declarator", "text": "table[16] = \"0123456789abcdef\"", "parent": 124, "children": [127, 130, 131], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 37}}, {"id": 127, "type": "array_declarator", "text": "table[16]", "parent": 126, "children": [128, 129], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 16}}, {"id": 128, "type": "identifier", "text": "table", "parent": 127, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 12}}, {"id": 129, "type": "number_literal", "text": "16", "parent": 127, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 15}}, {"id": 130, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 131, "type": "string_literal", "text": "\"0123456789abcdef\"", "parent": 126, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 37}}, {"id": 132, "type": "assignment_expression", "text": "key = (guint8 *)g_new0(guint8, len + 1)", "parent": 103, "children": [133, 134, 135], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 40}}, {"id": 133, "type": "identifier", "text": "key", "parent": 132, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 4}}, {"id": 134, "type": "=", "text": "=", "parent": 132, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 6}}, {"id": 135, "type": "cast_expression", "text": "(guint8 *)g_new0(guint8, len + 1)", "parent": 132, "children": [136, 140], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 40}}, {"id": 136, "type": "type_descriptor", "text": "guint8 *", "parent": 135, "children": [137, 138], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 16}}, {"id": 137, "type": "type_identifier", "text": "guint8", "parent": 136, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 14}}, {"id": 138, "type": "abstract_pointer_declarator", "text": "*", "parent": 136, "children": [139], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 16}}, {"id": 139, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 16}}, {"id": 140, "type": "call_expression", "text": "g_new0(guint8, len + 1)", "parent": 135, "children": [141, 142], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 40}}, {"id": 141, "type": "identifier", "text": "g_new0", "parent": 140, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 23}}, {"id": 142, "type": "argument_list", "text": "(guint8, len + 1)", "parent": 140, "children": [143, 144], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 40}}, {"id": 143, "type": "identifier", "text": "guint8", "parent": 142, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 30}}, {"id": 144, "type": "binary_expression", "text": "len + 1", "parent": 142, "children": [145, 146, 147], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 39}}, {"id": 145, "type": "identifier", "text": "len", "parent": 144, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 35}}, {"id": 146, "type": "+", "text": "+", "parent": 144, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 37}}, {"id": 147, "type": "number_literal", "text": "1", "parent": 144, "children": [], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 39}}, {"id": 148, "type": "call_expression", "text": "srand(time(0)+getpid())", "parent": 103, "children": [149, 150], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 24}}, {"id": 149, "type": "identifier", "text": "srand", "parent": 148, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 6}}, {"id": 150, "type": "argument_list", "text": "(time(0)+getpid())", "parent": 148, "children": [151], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 24}}, {"id": 151, "type": "binary_expression", "text": "time(0)+getpid()", "parent": 150, "children": [152, 156, 157], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 23}}, {"id": 152, "type": "call_expression", "text": "time(0)", "parent": 151, "children": [153, 154], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 14}}, {"id": 153, "type": "identifier", "text": "time", "parent": 152, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 11}}, {"id": 154, "type": "argument_list", "text": "(0)", "parent": 152, "children": [155], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 14}}, {"id": 155, "type": "number_literal", "text": "0", "parent": 154, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 156, "type": "+", "text": "+", "parent": 151, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 15}}, {"id": 157, "type": "call_expression", "text": "getpid()", "parent": 151, "children": [158, 159], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 23}}, {"id": 158, "type": "identifier", "text": "getpid", "parent": 157, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 21}}, {"id": 159, "type": "argument_list", "text": "()", "parent": 157, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 23}}, {"id": 160, "type": "for_statement", "text": "for (ptr = key; len > 0; --len, ++ptr)\n\t\t*ptr = table[rand() % 16];", "parent": 103, "children": [161, 165, 169], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 39, "column": 28}}, {"id": 161, "type": "assignment_expression", "text": "ptr = key", "parent": 160, "children": [162, 163, 164], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 15}}, {"id": 162, "type": "identifier", "text": "ptr", "parent": 161, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 9}}, {"id": 163, "type": "=", "text": "=", "parent": 161, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 11}}, {"id": 164, "type": "identifier", "text": "key", "parent": 161, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 15}}, {"id": 165, "type": "binary_expression", "text": "len > 0", "parent": 160, "children": [166, 167, 168], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 24}}, {"id": 166, "type": "identifier", "text": "len", "parent": 165, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 20}}, {"id": 167, "type": ">", "text": ">", "parent": 165, "children": [], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 22}}, {"id": 168, "type": "number_literal", "text": "0", "parent": 165, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 24}}, {"id": 169, "type": "comma_expression", "text": "--len, ++ptr", "parent": 160, "children": [170, 173], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 38}}, {"id": 170, "type": "update_expression", "text": "--len", "parent": 169, "children": [171, 172], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 31}}, {"id": 171, "type": "--", "text": "--", "parent": 170, "children": [], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 28}}, {"id": 172, "type": "identifier", "text": "len", "parent": 170, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 31}}, {"id": 173, "type": "update_expression", "text": "++ptr", "parent": 169, "children": [174, 175], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 38}}, {"id": 174, "type": "++", "text": "++", "parent": 173, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 35}}, {"id": 175, "type": "identifier", "text": "ptr", "parent": 173, "children": [], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 38}}, {"id": 176, "type": "assignment_expression", "text": "*ptr = table[rand() % 16]", "parent": 160, "children": [177, 180, 181], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 27}}, {"id": 177, "type": "pointer_expression", "text": "*ptr", "parent": 176, "children": [178, 179], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 3}}, {"id": 179, "type": "identifier", "text": "ptr", "parent": 177, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 6}}, {"id": 180, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 8}}, {"id": 181, "type": "subscript_expression", "text": "table[rand() % 16]", "parent": 176, "children": [182, 183], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 27}}, {"id": 182, "type": "identifier", "text": "table", "parent": 181, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 14}}, {"id": 183, "type": "binary_expression", "text": "rand() % 16", "parent": 181, "children": [184, 187, 188], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 26}}, {"id": 184, "type": "call_expression", "text": "rand()", "parent": 183, "children": [185, 186], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 21}}, {"id": 185, "type": "identifier", "text": "rand", "parent": 184, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 19}}, {"id": 186, "type": "argument_list", "text": "()", "parent": 184, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 21}}, {"id": 187, "type": "%", "text": "%", "parent": 183, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 23}}, {"id": 188, "type": "number_literal", "text": "16", "parent": 183, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 26}}, {"id": 189, "type": "return_statement", "text": "return key;", "parent": 103, "children": [190], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 12}}, {"id": 190, "type": "identifier", "text": "key", "parent": 189, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 11}}, {"id": 191, "type": "function_definition", "text": "guint8 *\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n\tguint8 newkey[48];\n\n\tmdsfs_blowfish_init(key);\n\tencryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48);\n\n\treturn g_strndup(newkey, 48);\n}", "parent": null, "children": [192, 193], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 192, "type": "type_identifier", "text": "guint8", "parent": 191, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 193, "type": "pointer_declarator", "text": "*\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)", "parent": 191, "children": [194, 195], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 45, "column": 61}}, {"id": 194, "type": "*", "text": "*", "parent": 193, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 8}}, {"id": 195, "type": "function_declarator", "text": "mdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)", "parent": 193, "children": [196, 197], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 61}}, {"id": 196, "type": "identifier", "text": "mdsfs_lockmgr_get", "parent": 195, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 17}}, {"id": 197, "type": "parameter_list", "text": "(MDSFS *mdsfs, off_t num, const guint8 *key)", "parent": 195, "children": [198, 203, 206], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 61}}, {"id": 198, "type": "parameter_declaration", "text": "MDSFS *mdsfs", "parent": 197, "children": [199, 200], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 30}}, {"id": 199, "type": "type_identifier", "text": "MDSFS", "parent": 198, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 23}}, {"id": 200, "type": "pointer_declarator", "text": "*mdsfs", "parent": 198, "children": [201, 202], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 30}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 25}}, {"id": 202, "type": "identifier", "text": "mdsfs", "parent": 200, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 30}}, {"id": 203, "type": "parameter_declaration", "text": "off_t num", "parent": 197, "children": [204, 205], "start_point": {"row": 45, "column": 32}, "end_point": {"row": 45, "column": 41}}, {"id": 204, "type": "type_identifier", "text": "off_t", "parent": 203, "children": [], "start_point": {"row": 45, "column": 32}, "end_point": {"row": 45, "column": 37}}, {"id": 205, "type": "identifier", "text": "num", "parent": 203, "children": [], "start_point": {"row": 45, "column": 38}, "end_point": {"row": 45, "column": 41}}, {"id": 206, "type": "parameter_declaration", "text": "const guint8 *key", "parent": 197, "children": [207, 208], "start_point": {"row": 45, "column": 43}, "end_point": {"row": 45, "column": 60}}, {"id": 207, "type": "type_identifier", "text": "guint8", "parent": 206, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 55}}, {"id": 208, "type": "pointer_declarator", "text": "*key", "parent": 206, "children": [209, 210], "start_point": {"row": 45, "column": 56}, "end_point": {"row": 45, "column": 60}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 45, "column": 56}, "end_point": {"row": 45, "column": 57}}, {"id": 210, "type": "identifier", "text": "key", "parent": 208, "children": [], "start_point": {"row": 45, "column": 57}, "end_point": {"row": 45, "column": 60}}, {"id": 211, "type": "declaration", "text": "guint8 newkey[48];", "parent": 191, "children": [212, 213], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 19}}, {"id": 212, "type": "type_identifier", "text": "guint8", "parent": 211, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 7}}, {"id": 213, "type": "array_declarator", "text": "newkey[48]", "parent": 211, "children": [214, 215], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 18}}, {"id": 214, "type": "identifier", "text": "newkey", "parent": 213, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 14}}, {"id": 215, "type": "number_literal", "text": "48", "parent": 213, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 17}}, {"id": 216, "type": "call_expression", "text": "mdsfs_blowfish_init(key)", "parent": 191, "children": [217, 218], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 25}}, {"id": 217, "type": "identifier", "text": "mdsfs_blowfish_init", "parent": 216, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 20}}, {"id": 218, "type": "argument_list", "text": "(key)", "parent": 216, "children": [219], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 25}}, {"id": 219, "type": "identifier", "text": "key", "parent": 218, "children": [], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 24}}, {"id": 220, "type": "call_expression", "text": "encryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48)", "parent": 191, "children": [221, 222], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 73}}, {"id": 221, "type": "identifier", "text": "encryption_decode_to_data_from_data", "parent": 220, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 36}}, {"id": 222, "type": "argument_list", "text": "(newkey, 48, mdsfs->key[num].key, 48)", "parent": 220, "children": [223, 224, 225, 232], "start_point": {"row": 50, "column": 36}, "end_point": {"row": 50, "column": 73}}, {"id": 223, "type": "identifier", "text": "newkey", "parent": 222, "children": [], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 50, "column": 43}}, {"id": 224, "type": "number_literal", "text": "48", "parent": 222, "children": [], "start_point": {"row": 50, "column": 45}, "end_point": {"row": 50, "column": 47}}, {"id": 225, "type": "field_expression", "text": "mdsfs->key[num].key", "parent": 222, "children": [226, 231], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 68}}, {"id": 226, "type": "subscript_expression", "text": "mdsfs->key[num]", "parent": 225, "children": [227, 230], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 64}}, {"id": 227, "type": "field_expression", "text": "mdsfs->key", "parent": 226, "children": [228, 229], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 59}}, {"id": 228, "type": "identifier", "text": "mdsfs", "parent": 227, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 54}}, {"id": 229, "type": "field_identifier", "text": "key", "parent": 227, "children": [], "start_point": {"row": 50, "column": 56}, "end_point": {"row": 50, "column": 59}}, {"id": 230, "type": "identifier", "text": "num", "parent": 226, "children": [], "start_point": {"row": 50, "column": 60}, "end_point": {"row": 50, "column": 63}}, {"id": 231, "type": "field_identifier", "text": "key", "parent": 225, "children": [], "start_point": {"row": 50, "column": 65}, "end_point": {"row": 50, "column": 68}}, {"id": 232, "type": "number_literal", "text": "48", "parent": 222, "children": [], "start_point": {"row": 50, "column": 70}, "end_point": {"row": 50, "column": 72}}, {"id": 233, "type": "return_statement", "text": "return g_strndup(newkey, 48);", "parent": 191, "children": [234], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 30}}, {"id": 234, "type": "call_expression", "text": "g_strndup(newkey, 48)", "parent": 233, "children": [235, 236], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 29}}, {"id": 235, "type": "identifier", "text": "g_strndup", "parent": 234, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 17}}, {"id": 236, "type": "argument_list", "text": "(newkey, 48)", "parent": 234, "children": [237, 238], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 29}}, {"id": 237, "type": "identifier", "text": "newkey", "parent": 236, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 24}}, {"id": 238, "type": "number_literal", "text": "48", "parent": 236, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 28}}, {"id": 239, "type": "function_definition", "text": "guint8 *\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n\toff_t i;\n\tguint8 *curkey;\n\tguint8 *newkey;\n\n\tcurkey = g_strndup(key, 48);\n\tfor (i = num; i >= 0; --i) {\n\t\tnewkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n\t\tg_free(curkey);\n\t\tcurkey = newkey;\n\t}\n\n\treturn curkey;\n}", "parent": null, "children": [240, 241], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 240, "type": "type_identifier", "text": "guint8", "parent": 239, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 241, "type": "pointer_declarator", "text": "*\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)", "parent": 239, "children": [242, 243], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 56, "column": 66}}, {"id": 242, "type": "*", "text": "*", "parent": 241, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 8}}, {"id": 243, "type": "function_declarator", "text": "mdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)", "parent": 241, "children": [244, 245], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 66}}, {"id": 244, "type": "identifier", "text": "mdsfs_lockmgr_get_last", "parent": 243, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 22}}, {"id": 245, "type": "parameter_list", "text": "(MDSFS *mdsfs, off_t num, const guint8 *key)", "parent": 243, "children": [246, 251, 254], "start_point": {"row": 56, "column": 22}, "end_point": {"row": 56, "column": 66}}, {"id": 246, "type": "parameter_declaration", "text": "MDSFS *mdsfs", "parent": 245, "children": [247, 248], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 35}}, {"id": 247, "type": "type_identifier", "text": "MDSFS", "parent": 246, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 28}}, {"id": 248, "type": "pointer_declarator", "text": "*mdsfs", "parent": 246, "children": [249, 250], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 35}}, {"id": 249, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 30}}, {"id": 250, "type": "identifier", "text": "mdsfs", "parent": 248, "children": [], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 35}}, {"id": 251, "type": "parameter_declaration", "text": "off_t num", "parent": 245, "children": [252, 253], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 46}}, {"id": 252, "type": "type_identifier", "text": "off_t", "parent": 251, "children": [], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 42}}, {"id": 253, "type": "identifier", "text": "num", "parent": 251, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 46}}, {"id": 254, "type": "parameter_declaration", "text": "const guint8 *key", "parent": 245, "children": [255, 256], "start_point": {"row": 56, "column": 48}, "end_point": {"row": 56, "column": 65}}, {"id": 255, "type": "type_identifier", "text": "guint8", "parent": 254, "children": [], "start_point": {"row": 56, "column": 54}, "end_point": {"row": 56, "column": 60}}, {"id": 256, "type": "pointer_declarator", "text": "*key", "parent": 254, "children": [257, 258], "start_point": {"row": 56, "column": 61}, "end_point": {"row": 56, "column": 65}}, {"id": 257, "type": "*", "text": "*", "parent": 256, "children": [], "start_point": {"row": 56, "column": 61}, "end_point": {"row": 56, "column": 62}}, {"id": 258, "type": "identifier", "text": "key", "parent": 256, "children": [], "start_point": {"row": 56, "column": 62}, "end_point": {"row": 56, "column": 65}}, {"id": 259, "type": "declaration", "text": "off_t i;", "parent": 239, "children": [260, 261], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 9}}, {"id": 260, "type": "type_identifier", "text": "off_t", "parent": 259, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 6}}, {"id": 261, "type": "identifier", "text": "i", "parent": 259, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 8}}, {"id": 262, "type": "declaration", "text": "guint8 *curkey;", "parent": 239, "children": [263, 264], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 16}}, {"id": 263, "type": "type_identifier", "text": "guint8", "parent": 262, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 7}}, {"id": 264, "type": "pointer_declarator", "text": "*curkey", "parent": 262, "children": [265, 266], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 15}}, {"id": 265, "type": "*", "text": "*", "parent": 264, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 9}}, {"id": 266, "type": "identifier", "text": "curkey", "parent": 264, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 15}}, {"id": 267, "type": "declaration", "text": "guint8 *newkey;", "parent": 239, "children": [268, 269], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 16}}, {"id": 268, "type": "type_identifier", "text": "guint8", "parent": 267, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 7}}, {"id": 269, "type": "pointer_declarator", "text": "*newkey", "parent": 267, "children": [270, 271], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 15}}, {"id": 270, "type": "*", "text": "*", "parent": 269, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 9}}, {"id": 271, "type": "identifier", "text": "newkey", "parent": 269, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 15}}, {"id": 272, "type": "assignment_expression", "text": "curkey = g_strndup(key, 48)", "parent": 239, "children": [273, 274, 275], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 28}}, {"id": 273, "type": "identifier", "text": "curkey", "parent": 272, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 7}}, {"id": 274, "type": "=", "text": "=", "parent": 272, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 9}}, {"id": 275, "type": "call_expression", "text": "g_strndup(key, 48)", "parent": 272, "children": [276, 277], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 28}}, {"id": 276, "type": "identifier", "text": "g_strndup", "parent": 275, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 19}}, {"id": 277, "type": "argument_list", "text": "(key, 48)", "parent": 275, "children": [278, 279], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 28}}, {"id": 278, "type": "identifier", "text": "key", "parent": 277, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 23}}, {"id": 279, "type": "number_literal", "text": "48", "parent": 277, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 27}}, {"id": 280, "type": "for_statement", "text": "for (i = num; i >= 0; --i) {\n\t\tnewkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n\t\tg_free(curkey);\n\t\tcurkey = newkey;\n\t}", "parent": 239, "children": [281, 285, 289], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 68, "column": 2}}, {"id": 281, "type": "assignment_expression", "text": "i = num", "parent": 280, "children": [282, 283, 284], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 13}}, {"id": 282, "type": "identifier", "text": "i", "parent": 281, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 7}}, {"id": 283, "type": "=", "text": "=", "parent": 281, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 9}}, {"id": 284, "type": "identifier", "text": "num", "parent": 281, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 13}}, {"id": 285, "type": "binary_expression", "text": "i >= 0", "parent": 280, "children": [286, 287, 288], "start_point": {"row": 63, "column": 15}, "end_point": {"row": 63, "column": 21}}, {"id": 286, "type": "identifier", "text": "i", "parent": 285, "children": [], "start_point": {"row": 63, "column": 15}, "end_point": {"row": 63, "column": 16}}, {"id": 287, "type": ">=", "text": ">=", "parent": 285, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 19}}, {"id": 288, "type": "number_literal", "text": "0", "parent": 285, "children": [], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 21}}, {"id": 289, "type": "update_expression", "text": "--i", "parent": 280, "children": [290, 291], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 26}}, {"id": 290, "type": "--", "text": "--", "parent": 289, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 25}}, {"id": 291, "type": "identifier", "text": "i", "parent": 289, "children": [], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 26}}, {"id": 292, "type": "assignment_expression", "text": "newkey = mdsfs_lockmgr_get(mdsfs, i, curkey)", "parent": 280, "children": [293, 294, 295], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 46}}, {"id": 293, "type": "identifier", "text": "newkey", "parent": 292, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 8}}, {"id": 294, "type": "=", "text": "=", "parent": 292, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 10}}, {"id": 295, "type": "call_expression", "text": "mdsfs_lockmgr_get(mdsfs, i, curkey)", "parent": 292, "children": [296, 297], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 46}}, {"id": 296, "type": "identifier", "text": "mdsfs_lockmgr_get", "parent": 295, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 28}}, {"id": 297, "type": "argument_list", "text": "(mdsfs, i, curkey)", "parent": 295, "children": [298, 299, 300], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 46}}, {"id": 298, "type": "identifier", "text": "mdsfs", "parent": 297, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 34}}, {"id": 299, "type": "identifier", "text": "i", "parent": 297, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 37}}, {"id": 300, "type": "identifier", "text": "curkey", "parent": 297, "children": [], "start_point": {"row": 64, "column": 39}, "end_point": {"row": 64, "column": 45}}, {"id": 301, "type": "call_expression", "text": "g_free(curkey)", "parent": 280, "children": [302, 303], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 16}}, {"id": 302, "type": "identifier", "text": "g_free", "parent": 301, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 8}}, {"id": 303, "type": "argument_list", "text": "(curkey)", "parent": 301, "children": [304], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 16}}, {"id": 304, "type": "identifier", "text": "curkey", "parent": 303, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 15}}, {"id": 305, "type": "assignment_expression", "text": "curkey = newkey", "parent": 280, "children": [306, 307, 308], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 17}}, {"id": 306, "type": "identifier", "text": "curkey", "parent": 305, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 8}}, {"id": 307, "type": "=", "text": "=", "parent": 305, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 10}}, {"id": 308, "type": "identifier", "text": "newkey", "parent": 305, "children": [], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 17}}, {"id": 309, "type": "return_statement", "text": "return curkey;", "parent": 239, "children": [310], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 15}}, {"id": 310, "type": "identifier", "text": "curkey", "parent": 309, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 14}}, {"id": 311, "type": "function_definition", "text": "gboolean\nmdsfs_lockmgr_check_key(const gchar *key)\n{\n\t/* 8 bits for level and 384 bits for blowfish key */\n\tif (strlen(key) != 98) {\n\t\tprintf(\"Secret key length is incorrect, we need 392-bit key.\\n\");\n\t\treturn FALSE;\n\t}\n\n\tif (!mdsfs_misc_check_key(key)) {\n\t\tprintf(\"Secret key is incorrect, please using hex strings.\\n\");\n\t\treturn FALSE;\n\t}\n\n\treturn TRUE;\n}", "parent": null, "children": [312, 313], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 88, "column": 1}}, {"id": 312, "type": "type_identifier", "text": "gboolean", "parent": 311, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 8}}, {"id": 313, "type": "function_declarator", "text": "mdsfs_lockmgr_check_key(const gchar *key)", "parent": 311, "children": [314, 315], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 41}}, {"id": 314, "type": "identifier", "text": "mdsfs_lockmgr_check_key", "parent": 313, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 23}}, {"id": 315, "type": "parameter_list", "text": "(const gchar *key)", "parent": 313, "children": [316], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 41}}, {"id": 316, "type": "parameter_declaration", "text": "const gchar *key", "parent": 315, "children": [317, 318], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 40}}, {"id": 317, "type": "type_identifier", "text": "gchar", "parent": 316, "children": [], "start_point": {"row": 74, "column": 30}, "end_point": {"row": 74, "column": 35}}, {"id": 318, "type": "pointer_declarator", "text": "*key", "parent": 316, "children": [319, 320], "start_point": {"row": 74, "column": 36}, "end_point": {"row": 74, "column": 40}}, {"id": 319, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 74, "column": 36}, "end_point": {"row": 74, "column": 37}}, {"id": 320, "type": "identifier", "text": "key", "parent": 318, "children": [], "start_point": {"row": 74, "column": 37}, "end_point": {"row": 74, "column": 40}}, {"id": 321, "type": "if_statement", "text": "if (strlen(key) != 98) {\n\t\tprintf(\"Secret key length is incorrect, we need 392-bit key.\\n\");\n\t\treturn FALSE;\n\t}", "parent": 311, "children": [322], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 80, "column": 2}}, {"id": 322, "type": "parenthesized_expression", "text": "(strlen(key) != 98)", "parent": 321, "children": [323], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 23}}, {"id": 323, "type": "binary_expression", "text": "strlen(key) != 98", "parent": 322, "children": [324, 328, 329], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 22}}, {"id": 324, "type": "call_expression", "text": "strlen(key)", "parent": 323, "children": [325, 326], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 16}}, {"id": 325, "type": "identifier", "text": "strlen", "parent": 324, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 11}}, {"id": 326, "type": "argument_list", "text": "(key)", "parent": 324, "children": [327], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 16}}, {"id": 327, "type": "identifier", "text": "key", "parent": 326, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 15}}, {"id": 328, "type": "!=", "text": "!=", "parent": 323, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 19}}, {"id": 329, "type": "number_literal", "text": "98", "parent": 323, "children": [], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 22}}, {"id": 330, "type": "call_expression", "text": "printf(\"Secret key length is incorrect, we need 392-bit key.\\n\")", "parent": 321, "children": [331, 332], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 66}}, {"id": 331, "type": "identifier", "text": "printf", "parent": 330, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 8}}, {"id": 332, "type": "argument_list", "text": "(\"Secret key length is incorrect, we need 392-bit key.\\n\")", "parent": 330, "children": [333], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 66}}, {"id": 333, "type": "string_literal", "text": "\"Secret key length is incorrect, we need 392-bit key.\\n\"", "parent": 332, "children": [334], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 65}}, {"id": 334, "type": "escape_sequence", "text": "\\n", "parent": 333, "children": [], "start_point": {"row": 78, "column": 62}, "end_point": {"row": 78, "column": 64}}, {"id": 335, "type": "return_statement", "text": "return FALSE;", "parent": 321, "children": [336], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 15}}, {"id": 336, "type": "false", "text": "FALSE", "parent": 335, "children": [], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 14}}, {"id": 337, "type": "if_statement", "text": "if (!mdsfs_misc_check_key(key)) {\n\t\tprintf(\"Secret key is incorrect, please using hex strings.\\n\");\n\t\treturn FALSE;\n\t}", "parent": 311, "children": [338], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 85, "column": 2}}, {"id": 338, "type": "parenthesized_expression", "text": "(!mdsfs_misc_check_key(key))", "parent": 337, "children": [339], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 32}}, {"id": 339, "type": "unary_expression", "text": "!mdsfs_misc_check_key(key)", "parent": 338, "children": [340, 341], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 31}}, {"id": 340, "type": "!", "text": "!", "parent": 339, "children": [], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 6}}, {"id": 341, "type": "call_expression", "text": "mdsfs_misc_check_key(key)", "parent": 339, "children": [342, 343], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 31}}, {"id": 342, "type": "identifier", "text": "mdsfs_misc_check_key", "parent": 341, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 26}}, {"id": 343, "type": "argument_list", "text": "(key)", "parent": 341, "children": [344], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 31}}, {"id": 344, "type": "identifier", "text": "key", "parent": 343, "children": [], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 30}}, {"id": 345, "type": "call_expression", "text": "printf(\"Secret key is incorrect, please using hex strings.\\n\")", "parent": 337, "children": [346, 347], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 64}}, {"id": 346, "type": "identifier", "text": "printf", "parent": 345, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 8}}, {"id": 347, "type": "argument_list", "text": "(\"Secret key is incorrect, please using hex strings.\\n\")", "parent": 345, "children": [348], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 64}}, {"id": 348, "type": "string_literal", "text": "\"Secret key is incorrect, please using hex strings.\\n\"", "parent": 347, "children": [349], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 63}}, {"id": 349, "type": "escape_sequence", "text": "\\n", "parent": 348, "children": [], "start_point": {"row": 83, "column": 60}, "end_point": {"row": 83, "column": 62}}, {"id": 350, "type": "return_statement", "text": "return FALSE;", "parent": 337, "children": [351], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 15}}, {"id": 351, "type": "false", "text": "FALSE", "parent": 350, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 14}}, {"id": 352, "type": "return_statement", "text": "return TRUE;", "parent": 311, "children": [353], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 13}}, {"id": 353, "type": "true", "text": "TRUE", "parent": 352, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 12}}, {"id": 354, "type": "function_definition", "text": "void\nmdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)\n{\n\tguint8 *final_key;\n\toff_t num;\n\n\t/* figure level */\n\tnum = *key;\n\n\tfinal_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1);\n\n\tmdsfs_blowfish_init(final_key);\n\n\tg_free(final_key);\n}", "parent": null, "children": [355, 356], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 355, "type": "primitive_type", "text": "void", "parent": 354, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 4}}, {"id": 356, "type": "function_declarator", "text": "mdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)", "parent": 354, "children": [357, 358], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 51}}, {"id": 357, "type": "identifier", "text": "mdsfs_lockmgr_init", "parent": 356, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 18}}, {"id": 358, "type": "parameter_list", "text": "(MDSFS *mdsfs, const guint8 *key)", "parent": 356, "children": [359, 364], "start_point": {"row": 91, "column": 18}, "end_point": {"row": 91, "column": 51}}, {"id": 359, "type": "parameter_declaration", "text": "MDSFS *mdsfs", "parent": 358, "children": [360, 361], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 31}}, {"id": 360, "type": "type_identifier", "text": "MDSFS", "parent": 359, "children": [], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 24}}, {"id": 361, "type": "pointer_declarator", "text": "*mdsfs", "parent": 359, "children": [362, 363], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 31}}, {"id": 362, "type": "*", "text": "*", "parent": 361, "children": [], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 26}}, {"id": 363, "type": "identifier", "text": "mdsfs", "parent": 361, "children": [], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 31}}, {"id": 364, "type": "parameter_declaration", "text": "const guint8 *key", "parent": 358, "children": [365, 366], "start_point": {"row": 91, "column": 33}, "end_point": {"row": 91, "column": 50}}, {"id": 365, "type": "type_identifier", "text": "guint8", "parent": 364, "children": [], "start_point": {"row": 91, "column": 39}, "end_point": {"row": 91, "column": 45}}, {"id": 366, "type": "pointer_declarator", "text": "*key", "parent": 364, "children": [367, 368], "start_point": {"row": 91, "column": 46}, "end_point": {"row": 91, "column": 50}}, {"id": 367, "type": "*", "text": "*", "parent": 366, "children": [], "start_point": {"row": 91, "column": 46}, "end_point": {"row": 91, "column": 47}}, {"id": 368, "type": "identifier", "text": "key", "parent": 366, "children": [], "start_point": {"row": 91, "column": 47}, "end_point": {"row": 91, "column": 50}}, {"id": 369, "type": "declaration", "text": "guint8 *final_key;", "parent": 354, "children": [370, 371], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 19}}, {"id": 370, "type": "type_identifier", "text": "guint8", "parent": 369, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 7}}, {"id": 371, "type": "pointer_declarator", "text": "*final_key", "parent": 369, "children": [372, 373], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 18}}, {"id": 372, "type": "*", "text": "*", "parent": 371, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 9}}, {"id": 373, "type": "identifier", "text": "final_key", "parent": 371, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 18}}, {"id": 374, "type": "declaration", "text": "off_t num;", "parent": 354, "children": [375, 376], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 11}}, {"id": 375, "type": "type_identifier", "text": "off_t", "parent": 374, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 6}}, {"id": 376, "type": "identifier", "text": "num", "parent": 374, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 10}}, {"id": 377, "type": "assignment_expression", "text": "num = *key", "parent": 354, "children": [378, 379, 380], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 11}}, {"id": 378, "type": "identifier", "text": "num", "parent": 377, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 4}}, {"id": 379, "type": "=", "text": "=", "parent": 377, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 6}}, {"id": 380, "type": "pointer_expression", "text": "*key", "parent": 377, "children": [381, 382], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 11}}, {"id": 381, "type": "*", "text": "*", "parent": 380, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 8}}, {"id": 382, "type": "identifier", "text": "key", "parent": 380, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 11}}, {"id": 383, "type": "assignment_expression", "text": "final_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1)", "parent": 354, "children": [384, 385, 386], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 54}}, {"id": 384, "type": "identifier", "text": "final_key", "parent": 383, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 10}}, {"id": 385, "type": "=", "text": "=", "parent": 383, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 12}}, {"id": 386, "type": "call_expression", "text": "mdsfs_lockmgr_get_last(mdsfs, num, key+1)", "parent": 383, "children": [387, 388], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 54}}, {"id": 387, "type": "identifier", "text": "mdsfs_lockmgr_get_last", "parent": 386, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 35}}, {"id": 388, "type": "argument_list", "text": "(mdsfs, num, key+1)", "parent": 386, "children": [389, 390, 391], "start_point": {"row": 99, "column": 35}, "end_point": {"row": 99, "column": 54}}, {"id": 389, "type": "identifier", "text": "mdsfs", "parent": 388, "children": [], "start_point": {"row": 99, "column": 36}, "end_point": {"row": 99, "column": 41}}, {"id": 390, "type": "identifier", "text": "num", "parent": 388, "children": [], "start_point": {"row": 99, "column": 43}, "end_point": {"row": 99, "column": 46}}, {"id": 391, "type": "binary_expression", "text": "key+1", "parent": 388, "children": [392, 393, 394], "start_point": {"row": 99, "column": 48}, "end_point": {"row": 99, "column": 53}}, {"id": 392, "type": "identifier", "text": "key", "parent": 391, "children": [], "start_point": {"row": 99, "column": 48}, "end_point": {"row": 99, "column": 51}}, {"id": 393, "type": "+", "text": "+", "parent": 391, "children": [], "start_point": {"row": 99, "column": 51}, "end_point": {"row": 99, "column": 52}}, {"id": 394, "type": "number_literal", "text": "1", "parent": 391, "children": [], "start_point": {"row": 99, "column": 52}, "end_point": {"row": 99, "column": 53}}, {"id": 395, "type": "call_expression", "text": "mdsfs_blowfish_init(final_key)", "parent": 354, "children": [396, 397], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 31}}, {"id": 396, "type": "identifier", "text": "mdsfs_blowfish_init", "parent": 395, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 20}}, {"id": 397, "type": "argument_list", "text": "(final_key)", "parent": 395, "children": [398], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 31}}, {"id": 398, "type": "identifier", "text": "final_key", "parent": 397, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 30}}, {"id": 399, "type": "call_expression", "text": "g_free(final_key)", "parent": 354, "children": [400, 401], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 18}}, {"id": 400, "type": "identifier", "text": "g_free", "parent": 399, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 7}}, {"id": 401, "type": "argument_list", "text": "(final_key)", "parent": 399, "children": [402], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 18}}, {"id": 402, "type": "identifier", "text": "final_key", "parent": 401, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 17}}]}, "node_categories": {"declarations": {"functions": [21, 25, 103, 107, 191, 195, 239, 243, 311, 313, 354, 356], "variables": [28, 34, 110, 116, 124, 198, 203, 206, 211, 246, 251, 254, 259, 262, 267, 316, 359, 364, 369, 374], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [45, 50, 54, 58, 61, 62, 67, 75, 79, 80, 83, 87, 91, 92, 95, 96, 135, 140, 144, 148, 151, 152, 157, 165, 169, 170, 173, 177, 181, 183, 184, 216, 220, 225, 226, 227, 234, 275, 285, 289, 295, 301, 322, 323, 324, 330, 338, 339, 341, 345, 380, 386, 391, 395, 399], "assignments": [42, 71, 86, 132, 161, 176, 272, 281, 292, 305, 377, 383], "loops": [70, 160, 280], "conditionals": [22, 26, 29, 31, 35, 38, 41, 43, 47, 51, 53, 55, 59, 63, 68, 72, 74, 76, 82, 85, 89, 93, 97, 102, 104, 108, 111, 113, 117, 120, 123, 125, 128, 133, 137, 141, 143, 145, 149, 153, 158, 162, 164, 166, 172, 175, 179, 182, 185, 190, 192, 196, 199, 202, 204, 205, 207, 210, 212, 214, 217, 219, 221, 223, 228, 229, 230, 231, 235, 237, 240, 244, 247, 250, 252, 253, 255, 258, 260, 261, 263, 266, 268, 271, 273, 276, 278, 282, 284, 286, 291, 293, 296, 298, 299, 300, 302, 304, 306, 308, 310, 312, 314, 317, 320, 321, 325, 327, 331, 337, 342, 344, 346, 357, 360, 363, 365, 368, 370, 373, 375, 376, 378, 382, 384, 387, 389, 390, 392, 396, 398, 400, 402], "returns": [101, 189, 233, 309, 335, 350, 352], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 33, 57, 65, 78, 100, 115, 129, 131, 147, 155, 168, 188, 215, 224, 232, 238, 279, 288, 329, 333, 348, 394], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "guint8 *\nmdsfs_lockmgr_keygen()\n{\n\tgint len = 48;\n\tguint8 *key, *ptr;\n\n\t/* allocate a memboy for 448"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "mdsfs_lockmgr_keygen()"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "guint8 *\nmdsfs_lockmgr_keygen_with_hex()\n{\n\tgint len = 96;\n\tguint8 *key, *ptr;\n\tgchar table[16] = \"0"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "mdsfs_lockmgr_keygen_with_hex()"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "guint8 *\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n\tguint8 newkey[48];\n\n\tmdsfs"}, {"node_id": 195, "universal_type": "function", "name": "unknown", "text_snippet": "mdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)"}, {"node_id": 239, "universal_type": "function", "name": "unknown", "text_snippet": "guint8 *\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n\toff_t i;\n\tguint8 *cur"}, {"node_id": 243, "universal_type": "function", "name": "unknown", "text_snippet": "mdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)"}, {"node_id": 311, "universal_type": "function", "name": "unknown", "text_snippet": "gboolean\nmdsfs_lockmgr_check_key(const gchar *key)\n{\n\t/* 8 bits for level and 384 bits for blowfish "}, {"node_id": 313, "universal_type": "function", "name": "unknown", "text_snippet": "mdsfs_lockmgr_check_key(const gchar *key)"}, {"node_id": 354, "universal_type": "function", "name": "mdsfs_lockmgr_init", "text_snippet": "void\nmdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)\n{\n\tguint8 *final_key;\n\toff_t num;\n\n\t/* figu"}, {"node_id": 356, "universal_type": "function", "name": "unknown", "text_snippet": "mdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <glib.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <glib/gi18n.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <string.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"mdsfs.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"blowfish.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"encryption.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"lockmgr.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#include <glib.h>\n#include <glib/gi18n.h>\n#include <string.h>\n\n#include \"mdsfs.h\"\n#include \"blowfish.h\"\n#include \"encryption.h\"\n#include \"lockmgr.h\"\n\nguint8 *\nmdsfs_lockmgr_keygen()\n{\n\tgint len = 48;\n\tguint8 *key, *ptr;\n\n\t/* allocate a memboy for 448 bits */\n\tkey = (guint8 *)g_new0(guint8, len + 1);\n\n\t/* seed */\n\tsrand(time(0)+getpid());\n\tfor (ptr = key; len > 0; --len, ++ptr)\n\t\t*ptr = (guint8)(rand() % 256);\n\n\treturn key;\n}\n\nguint8 *\nmdsfs_lockmgr_keygen_with_hex()\n{\n\tgint len = 96;\n\tguint8 *key, *ptr;\n\tgchar table[16] = \"0123456789abcdef\";\n\n\t/* allocate a memboy for 448 bits */\n\tkey = (guint8 *)g_new0(guint8, len + 1);\n\n\t/* seed */\n\tsrand(time(0)+getpid());\n\tfor (ptr = key; len > 0; --len, ++ptr)\n\t\t*ptr = table[rand() % 16];\n\n\treturn key;\n}\n\nguint8 *\nmdsfs_lockmgr_get(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n\tguint8 newkey[48];\n\n\tmdsfs_blowfish_init(key);\n\tencryption_decode_to_data_from_data(newkey, 48, mdsfs->key[num].key, 48);\n\n\treturn g_strndup(newkey, 48);\n}\n\nguint8 *\nmdsfs_lockmgr_get_last(MDSFS *mdsfs, off_t num, const guint8 *key)\n{\n\toff_t i;\n\tguint8 *curkey;\n\tguint8 *newkey;\n\n\tcurkey = g_strndup(key, 48);\n\tfor (i = num; i >= 0; --i) {\n\t\tnewkey = mdsfs_lockmgr_get(mdsfs, i, curkey);\n\n\t\tg_free(curkey);\n\t\tcurkey = newkey;\n\t}\n\n\treturn curkey;\n}\n\ngboolean\nmdsfs_lockmgr_check_key(const gchar *key)\n{\n\t/* 8 bits for level and 384 bits for blowfish key */\n\tif (strlen(key) != 98) {\n\t\tprintf(\"Secret key length is incorrect, we need 392-bit key.\\n\");\n\t\treturn FALSE;\n\t}\n\n\tif (!mdsfs_misc_check_key(key)) {\n\t\tprintf(\"Secret key is incorrect, please using hex strings.\\n\");\n\t\treturn FALSE;\n\t}\n\n\treturn TRUE;\n}\n\nvoid\nmdsfs_lockmgr_init(MDSFS *mdsfs, const guint8 *key)\n{\n\tguint8 *final_key;\n\toff_t num;\n\n\t/* figure level */\n\tnum = *key;\n\n\tfinal_key = mdsfs_lockmgr_get_last(mdsfs, num, key+1);\n\n\tmdsfs_blowfish_init(final_key);\n\n\tg_free(final_key);\n}\n"}
215
c
#ifndef QNVSM_SELECTCOLORBUTTON_H #define QNVSM_SELECTCOLORBUTTON_H #include <QPushButton> class SelectColorButton: public QPushButton { Q_OBJECT public: explicit SelectColorButton(const QColor &color); void setColor(const QColor &color); const QColor& getColor() const; private slots: void changeColor(); private: QColor m_color; }; #endif //QNVSM_SELECTCOLORBUTTON_H
25.2
15
(translation_unit) "#ifndef QNVSM_SELECTCOLORBUTTON_H\n#define QNVSM_SELECTCOLORBUTTON_H\n\n#include <QPushButton>\n\nclass SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n};\n\n#endif //QNVSM_SELECTCOLORBUTTON_H\n" (preproc_ifdef) "#ifndef QNVSM_SELECTCOLORBUTTON_H\n#define QNVSM_SELECTCOLORBUTTON_H\n\n#include <QPushButton>\n\nclass SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "QNVSM_SELECTCOLORBUTTON_H" (preproc_def) "#define QNVSM_SELECTCOLORBUTTON_H\n" (#define) "#define" (identifier) "QNVSM_SELECTCOLORBUTTON_H" (preproc_include) "#include <QPushButton>\n" (#include) "#include" (system_lib_string) "<QPushButton>" (function_definition) "class SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n}" (type_identifier) "class" (identifier) "SelectColorButton" (ERROR) ": public QPushButton" (:) ":" (identifier) "public" (identifier) "QPushButton" (compound_statement) "{\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n}" ({) "{" (declaration) "Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);" (type_identifier) "Q_OBJECT" (ERROR) "public:\n explicit" (identifier) "public" (:) ":" (identifier) "explicit" (function_declarator) "SelectColorButton(const QColor &color)" (identifier) "SelectColorButton" (parameter_list) "(const QColor &color)" (() "(" (parameter_declaration) "const QColor &color" (type_qualifier) "const" (const) "const" (type_identifier) "QColor" (ERROR) "&" (&) "&" (identifier) "color" ()) ")" (;) ";" (declaration) "void setColor(const QColor &color);" (primitive_type) "void" (function_declarator) "setColor(const QColor &color)" (identifier) "setColor" (parameter_list) "(const QColor &color)" (() "(" (parameter_declaration) "const QColor &color" (type_qualifier) "const" (const) "const" (type_identifier) "QColor" (ERROR) "&" (&) "&" (identifier) "color" ()) ")" (;) ";" (ERROR) "const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;" (type_qualifier) "const" (const) "const" (type_identifier) "QColor" (ERROR) "&" (&) "&" (function_declarator) "getColor()" (identifier) "getColor" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n\nprivate slots:\n void changeColor();" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (type_identifier) "private" (ERROR) "slots:\n void" (identifier) "slots" (:) ":" (primitive_type) "void" (function_declarator) "changeColor()" (identifier) "changeColor" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "private:\n QColor m_color;" (type_identifier) "private" (ERROR) ":\n QColor" (:) ":" (identifier) "QColor" (identifier) "m_color" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//QNVSM_SELECTCOLORBUTTON_H"
92
9
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 25.2, "nodes": 48, "errors": 0, "source_hash": "6468725466dc8c610d72e38d99d0b5c43b3cbb78131f01784338e27bba8ee043", "categorized_nodes": 35}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef QNVSM_SELECTCOLORBUTTON_H\n#define QNVSM_SELECTCOLORBUTTON_H\n\n#include <QPushButton>\n\nclass SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 47], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 21, "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": "QNVSM_SELECTCOLORBUTTON_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 33}}, {"id": 3, "type": "preproc_def", "text": "#define QNVSM_SELECTCOLORBUTTON_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": "QNVSM_SELECTCOLORBUTTON_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 33}}, {"id": 6, "type": "preproc_include", "text": "#include <QPushButton>\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": "<QPushButton>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 22}}, {"id": 9, "type": "function_definition", "text": "class SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 10, "type": "identifier", "text": "SelectColorButton", "parent": 9, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 23}}, {"id": 11, "type": "ERROR", "text": ": public QPushButton", "parent": 9, "children": [12], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 43}}, {"id": 12, "type": "identifier", "text": "QPushButton", "parent": 11, "children": [], "start_point": {"row": 5, "column": 32}, "end_point": {"row": 5, "column": 43}}, {"id": 13, "type": "declaration", "text": "Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);", "parent": 9, "children": [14, 15, 17], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 9, "column": 52}}, {"id": 14, "type": "type_identifier", "text": "Q_OBJECT", "parent": 13, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 12}}, {"id": 15, "type": "ERROR", "text": "public:\n explicit", "parent": 13, "children": [16], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 12}}, {"id": 16, "type": "identifier", "text": "explicit", "parent": 15, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 12}}, {"id": 17, "type": "function_declarator", "text": "SelectColorButton(const QColor &color)", "parent": 13, "children": [18, 19], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 51}}, {"id": 18, "type": "identifier", "text": "SelectColorButton", "parent": 17, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 30}}, {"id": 19, "type": "parameter_list", "text": "(const QColor &color)", "parent": 17, "children": [20], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 51}}, {"id": 20, "type": "parameter_declaration", "text": "const QColor &color", "parent": 19, "children": [21, 22], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 50}}, {"id": 21, "type": "type_identifier", "text": "QColor", "parent": 20, "children": [], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 43}}, {"id": 22, "type": "identifier", "text": "color", "parent": 20, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 50}}, {"id": 23, "type": "declaration", "text": "void setColor(const QColor &color);", "parent": 9, "children": [24, 25], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 39}}, {"id": 24, "type": "primitive_type", "text": "void", "parent": 23, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 25, "type": "function_declarator", "text": "setColor(const QColor &color)", "parent": 23, "children": [26, 27], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 38}}, {"id": 26, "type": "identifier", "text": "setColor", "parent": 25, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 27, "type": "parameter_list", "text": "(const QColor &color)", "parent": 25, "children": [28], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 38}}, {"id": 28, "type": "parameter_declaration", "text": "const QColor &color", "parent": 27, "children": [29, 30], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 37}}, {"id": 29, "type": "type_identifier", "text": "QColor", "parent": 28, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 30}}, {"id": 30, "type": "identifier", "text": "color", "parent": 28, "children": [], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 11, "column": 37}}, {"id": 31, "type": "ERROR", "text": "const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;", "parent": 9, "children": [32, 33, 36, 43], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 18, "column": 19}}, {"id": 32, "type": "type_identifier", "text": "QColor", "parent": 31, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 16}}, {"id": 33, "type": "function_declarator", "text": "getColor()", "parent": 31, "children": [34, 35], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 28}}, {"id": 34, "type": "identifier", "text": "getColor", "parent": 33, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 26}}, {"id": 35, "type": "parameter_list", "text": "()", "parent": 33, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 28}}, {"id": 36, "type": "declaration", "text": "const;\n\nprivate slots:\n void changeColor();", "parent": 31, "children": [37, 40], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 15, "column": 23}}, {"id": 37, "type": "ERROR", "text": "slots:\n void", "parent": 36, "children": [38, 39], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 15, "column": 8}}, {"id": 38, "type": "identifier", "text": "slots", "parent": 37, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 13}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 8}}, {"id": 40, "type": "function_declarator", "text": "changeColor()", "parent": 36, "children": [41, 42], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 22}}, {"id": 41, "type": "identifier", "text": "changeColor", "parent": 40, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 20}}, {"id": 42, "type": "parameter_list", "text": "()", "parent": 40, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 22}}, {"id": 43, "type": "declaration", "text": "private:\n QColor m_color;", "parent": 31, "children": [44, 46], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 19}}, {"id": 44, "type": "ERROR", "text": ":\n QColor", "parent": 43, "children": [45], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 18, "column": 10}}, {"id": 45, "type": "identifier", "text": "QColor", "parent": 44, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 10}}, {"id": 46, "type": "identifier", "text": "m_color", "parent": 43, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 18}}, {"id": 47, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 17, 25, 33, 40], "variables": [13, 20, 23, 28, 36, 43], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 14, 16, 18, 21, 22, 26, 29, 30, 32, 34, 38, 41, 45, 46, 47], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "SelectColorButton:", "text_snippet": "class SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(c"}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "SelectColorButton(const QColor &color)"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "setColor(const QColor &color)"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "getColor()"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "changeColor()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QPushButton>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef QNVSM_SELECTCOLORBUTTON_H\n#define QNVSM_SELECTCOLORBUTTON_H\n\n#include <QPushButton>\n\nclass SelectColorButton: public QPushButton {\n Q_OBJECT\n\npublic:\n explicit SelectColorButton(const QColor &color);\n\n void setColor(const QColor &color);\n const QColor& getColor() const;\n\nprivate slots:\n void changeColor();\n\nprivate:\n QColor m_color;\n};\n\n#endif //QNVSM_SELECTCOLORBUTTON_H\n"}
216
c
/*============================================================================*/ /* VFLib: https://github.com/vinniefalco/VFLib Copyright (C) 2008 by <NAME> <<EMAIL>> This library contains portions of other open source products covered by separate licenses. Please see the corresponding source files for specific terms. VFLib is provided under the terms of The MIT License (MIT): 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 VF_SHAREDTABLE_VFHEADER #define VF_SHAREDTABLE_VFHEADER /** Handle to a reference counted fixed size table. @note Currently, ElementType must be an aggregate of POD. @tparam ElementType The type of element. @ingroup vf_gui */ template <class ElementType> class SharedTable { public: typedef ElementType Entry; static SharedTable <ElementType> const null; /** Creates a null table. */ SharedTable () { } /** Creates a table with the specified number of entries. The entries are uninitialized. @param numEntries The number of entries in the table. @todo Initialize the data if ElementType is not POD. */ explicit SharedTable (int numEntries) : m_data (new Data (numEntries)) { } /** Creates a shared reference to another table. */ SharedTable (SharedTable const& other) : m_data (other.m_data) { } /** Makes this table refer to another table. */ SharedTable& operator= (SharedTable const& other) { m_data = other.m_data; return *this; } #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS SharedTable (SharedTable&& other) noexcept : m_data (static_cast <typename Data::Ptr&&> (other.m_data)) { } SharedTable& operator= (SharedTable&& other) noexcept { m_data = static_cast <typename Data::Ptr&&> (other.m_data); return *this; } #endif /** Destructor. */ ~SharedTable () { } /** Returns true if the two tables share the same set of entries. */ bool operator== (SharedTable const& other) const noexcept { return m_data == other.m_data; } /** Returns true if the two tables do not share the same set of entries. */ bool operator!= (SharedTable const& other) const noexcept { return m_data != other.m_data; } /** Returns true if the table is not null. */ inline bool isValid () const noexcept { return m_data != nullptr; } /** Returns true if the table is null. */ inline bool isNull () const noexcept { return m_data == nullptr; } /** Returns the number of tables referring to the same shared entries. */ int getReferenceCount () const noexcept { return m_data == nullptr ? 0 : m_data->getReferenceCount (); } /** Create a physical duplicate of the table. */ SharedTable createCopy () const { return SharedTable (m_data != nullptr ? m_data->clone() : nullptr); } /** Makes sure no other tables share the same entries as this table. */ void duplicateIfShared () { if (m_data != nullptr && m_data->getReferenceCount() > 1) m_data = m_data->clone (); } /** Return the number of entries in this table. */ inline int getNumEntries () const noexcept { return m_data->getNumEntries (); } /** Retrieve a table entry. @param index The index of the entry, from 0 to getNumEntries (). */ inline ElementType& operator [] (int index) const noexcept { return m_data->getReference (index); } private: class Data : public ReferenceCountedObject { public: typedef ReferenceCountedObjectPtr <Data> Ptr; explicit Data (int numEntries) : m_numEntries (numEntries) , m_table (numEntries) { } inline Data* clone () const { Data* data = new Data (m_numEntries); memcpy ( data->m_table.getData (), m_table.getData (), m_numEntries * sizeof (ElementType)); return data; } inline int getNumEntries () const { return m_numEntries; } inline ElementType& getReference (int index) const { jassert (index >= 0 && index < m_numEntries); return m_table [index]; } private: int const m_numEntries; HeapBlock <ElementType> const m_table; }; explicit SharedTable (Data* data) : m_data (data) { } ReferenceCountedObjectPtr <Data> m_data; }; template <class ElementType> SharedTable <ElementType> const SharedTable <ElementType>::null; #endif //------------------------------------------------------------------------------
29.6
181
(translation_unit) "/*============================================================================*/\n/*\n VFLib: https://github.com/vinniefalco/VFLib\n\n Copyright (C) 2008 by <NAME> <<EMAIL>>\n\n This library contains portions of other open source products covered by\n separate licenses. Please see the corresponding source files for specific\n terms.\n \n VFLib is provided under the terms of The MIT License (MIT):\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the "Software"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n IN THE SOFTWARE.\n*/\n/*============================================================================*/\n\n#ifndef VF_SHAREDTABLE_VFHEADER\n#define VF_SHAREDTABLE_VFHEADER\n\n/** Handle to a reference counted fixed size table.\n\n @note Currently, ElementType must be an aggregate of POD.\n\n @tparam ElementType The type of element.\n \n @ingroup vf_gui\n*/\ntemplate <class ElementType>\nclass SharedTable\n{\npublic:\n typedef ElementType Entry;\n\n static SharedTable <ElementType> const null;\n\n /** Creates a null table.\n */\n SharedTable ()\n {\n }\n\n /** Creates a table with the specified number of entries.\n\n The entries are uninitialized.\n\n @param numEntries The number of entries in the table.\n\n @todo Initialize the data if ElementType is not POD.\n */\n explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }\n\n /** Creates a shared reference to another table.\n */\n SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }\n\n /** Makes this table refer to another table.\n */\n SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data;\n return *this;\n }\n\n#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS\n SharedTable (SharedTable&& other) noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))\n {\n }\n\n SharedTable& operator= (SharedTable&& other) noexcept\n {\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }\n#endif\n\n /** Destructor.\n */\n ~SharedTable ()\n {\n }\n\n /** Returns true if the two tables share the same set of entries.\n */\n bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }\n\n /** Returns true if the two tables do not share the same set of entries.\n */\n bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }\n\n /** Returns true if the table is not null.\n */\n inline bool isValid () const noexcept\n {\n return m_data != nullptr;\n }\n\n /** Returns true if the table is null.\n */\n inline bool isNull () const noexcept\n {\n return m_data == nullptr;\n }\n\n /** Returns the number of tables referring to the same shared entries.\n */\n int getReferenceCount () const noexcept\n {\n return m_data == nullptr ? 0 : m_data->getReferenceCount ();\n }\n\n /** Create a physical duplicate of the table.\n */\n SharedTable createCopy () const\n {\n return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);\n }\n\n /** Makes sure no other tables share the same entries as this table.\n */\n void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }\n\n /** Return the number of entries in this table.\n */\n inline int getNumEntries () const noexcept\n {\n return m_data->getNumEntries ();\n }\n\n /** Retrieve a table entry.\n\n @param index The index of the entry, from 0 to getNumEntries ().\n */\n inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (index);\n }\n\nprivate:\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)\n : m_numEntries (numEntries)\n , m_table (numEntries)\n {\n }\n\n inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }\n\n inline int getNumEntries () const\n {\n return m_numEntries;\n }\n\n inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }\n\n private:\n int const m_numEntries;\n HeapBlock <ElementType> const m_table;\n };\n\n explicit SharedTable (Data* data)\n : m_data (data)\n {\n }\n\n ReferenceCountedObjectPtr <Data> m_data;\n};\n\ntemplate <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null;\n\n#endif\n\n//------------------------------------------------------------------------------\n\n" (comment) "/*============================================================================*/" (comment) "/*\n VFLib: https://github.com/vinniefalco/VFLib\n\n Copyright (C) 2008 by <NAME> <<EMAIL>>\n\n This library contains portions of other open source products covered by\n separate licenses. Please see the corresponding source files for specific\n terms.\n \n VFLib is provided under the terms of The MIT License (MIT):\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the "Software"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n IN THE SOFTWARE.\n*/" (comment) "/*============================================================================*/" (preproc_ifdef) "#ifndef VF_SHAREDTABLE_VFHEADER\n#define VF_SHAREDTABLE_VFHEADER\n\n/** Handle to a reference counted fixed size table.\n\n @note Currently, ElementType must be an aggregate of POD.\n\n @tparam ElementType The type of element.\n \n @ingroup vf_gui\n*/\ntemplate <class ElementType>\nclass SharedTable\n{\npublic:\n typedef ElementType Entry;\n\n static SharedTable <ElementType> const null;\n\n /** Creates a null table.\n */\n SharedTable ()\n {\n }\n\n /** Creates a table with the specified number of entries.\n\n The entries are uninitialized.\n\n @param numEntries The number of entries in the table.\n\n @todo Initialize the data if ElementType is not POD.\n */\n explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }\n\n /** Creates a shared reference to another table.\n */\n SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }\n\n /** Makes this table refer to another table.\n */\n SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data;\n return *this;\n }\n\n#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS\n SharedTable (SharedTable&& other) noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))\n {\n }\n\n SharedTable& operator= (SharedTable&& other) noexcept\n {\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }\n#endif\n\n /** Destructor.\n */\n ~SharedTable ()\n {\n }\n\n /** Returns true if the two tables share the same set of entries.\n */\n bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }\n\n /** Returns true if the two tables do not share the same set of entries.\n */\n bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }\n\n /** Returns true if the table is not null.\n */\n inline bool isValid () const noexcept\n {\n return m_data != nullptr;\n }\n\n /** Returns true if the table is null.\n */\n inline bool isNull () const noexcept\n {\n return m_data == nullptr;\n }\n\n /** Returns the number of tables referring to the same shared entries.\n */\n int getReferenceCount () const noexcept\n {\n return m_data == nullptr ? 0 : m_data->getReferenceCount ();\n }\n\n /** Create a physical duplicate of the table.\n */\n SharedTable createCopy () const\n {\n return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);\n }\n\n /** Makes sure no other tables share the same entries as this table.\n */\n void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }\n\n /** Return the number of entries in this table.\n */\n inline int getNumEntries () const noexcept\n {\n return m_data->getNumEntries ();\n }\n\n /** Retrieve a table entry.\n\n @param index The index of the entry, from 0 to getNumEntries ().\n */\n inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (index);\n }\n\nprivate:\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)\n : m_numEntries (numEntries)\n , m_table (numEntries)\n {\n }\n\n inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }\n\n inline int getNumEntries () const\n {\n return m_numEntries;\n }\n\n inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }\n\n private:\n int const m_numEntries;\n HeapBlock <ElementType> const m_table;\n };\n\n explicit SharedTable (Data* data)\n : m_data (data)\n {\n }\n\n ReferenceCountedObjectPtr <Data> m_data;\n};\n\ntemplate <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null;\n\n#endif" (#ifndef) "#ifndef" (identifier) "VF_SHAREDTABLE_VFHEADER" (preproc_def) "#define VF_SHAREDTABLE_VFHEADER\n" (#define) "#define" (identifier) "VF_SHAREDTABLE_VFHEADER" (comment) "/** Handle to a reference counted fixed size table.\n\n @note Currently, ElementType must be an aggregate of POD.\n\n @tparam ElementType The type of element.\n \n @ingroup vf_gui\n*/" (ERROR) "template <class ElementType>\nclass SharedTable" (binary_expression) "template <class ElementType>\nclass" (binary_expression) "template <class ElementType" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "ElementType" (>) ">" (identifier) "class" (identifier) "SharedTable" (compound_statement) "{\npublic:\n typedef ElementType Entry;\n\n static SharedTable <ElementType> const null;\n\n /** Creates a null table.\n */\n SharedTable ()\n {\n }\n\n /** Creates a table with the specified number of entries.\n\n The entries are uninitialized.\n\n @param numEntries The number of entries in the table.\n\n @todo Initialize the data if ElementType is not POD.\n */\n explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }\n\n /** Creates a shared reference to another table.\n */\n SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }\n\n /** Makes this table refer to another table.\n */\n SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data;\n return *this;\n }" ({) "{" (labeled_statement) "public:\n typedef ElementType Entry;" (statement_identifier) "public" (:) ":" (declaration) "typedef ElementType Entry;" (type_identifier) "typedef" (identifier) "ElementType" (ERROR) "Entry" (identifier) "Entry" (;) ";" (declaration) "static SharedTable <ElementType> const null;" (storage_class_specifier) "static" (static) "static" (type_identifier) "SharedTable" (ERROR) "<ElementType> const" (<) "<" (identifier) "ElementType" (>) ">" (const) "const" (identifier) "null" (;) ";" (comment) "/** Creates a null table.\n */" (expression_statement) "SharedTable ()" (call_expression) "SharedTable ()" (identifier) "SharedTable" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "/** Creates a table with the specified number of entries.\n\n The entries are uninitialized.\n\n @param numEntries The number of entries in the table.\n\n @todo Initialize the data if ElementType is not POD.\n */" (function_definition) "explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }" (type_identifier) "explicit" (function_declarator) "SharedTable (int numEntries)\n : m_data (new Data (numEntries))" (identifier) "SharedTable" (parameter_list) "(int numEntries)" (() "(" (parameter_declaration) "int numEntries" (primitive_type) "int" (identifier) "numEntries" ()) ")" (ERROR) ":" (:) ":" (call_expression) "m_data (new Data (numEntries))" (identifier) "m_data" (argument_list) "(new Data (numEntries))" (() "(" (ERROR) "new" (identifier) "new" (call_expression) "Data (numEntries)" (identifier) "Data" (argument_list) "(numEntries)" (() "(" (identifier) "numEntries" ()) ")" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "/** Creates a shared reference to another table.\n */" (function_definition) "SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }" (macro_type_specifier) "SharedTable (SharedTable const& other)" (identifier) "SharedTable" (() "(" (type_descriptor) "SharedTable const" (type_identifier) "SharedTable" (type_qualifier) "const" (const) "const" (ERROR) "& other" (&) "&" (identifier) "other" ()) ")" (ERROR) ":" (:) ":" (function_declarator) "m_data (other.m_data)" (identifier) "m_data" (parameter_list) "(other.m_data)" (() "(" (parameter_declaration) "other.m_data" (type_identifier) "other" (ERROR) "." (.) "." (identifier) "m_data" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "/** Makes this table refer to another table.\n */" (expression_statement) "SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data;" (binary_expression) "SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data" (identifier) "SharedTable" (&) "&" (assignment_expression) "operator= (SharedTable const& other)\n {\n m_data = other.m_data" (identifier) "operator" (=) "=" (compound_literal_expression) "(SharedTable const& other)\n {\n m_data = other.m_data" (() "(" (ERROR) "SharedTable const&" (type_descriptor) "SharedTable const" (type_identifier) "SharedTable" (type_qualifier) "const" (const) "const" (&) "&" (type_descriptor) "other" (type_identifier) "other" ()) ")" (initializer_list) "{\n m_data = other.m_data" ({) "{" (assignment_expression) "m_data = other.m_data" (identifier) "m_data" (=) "=" (field_expression) "other.m_data" (identifier) "other" (.) "." (field_identifier) "m_data" (}) "" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (preproc_if) "#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS\n SharedTable (SharedTable&& other) noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))\n {\n }\n\n SharedTable& operator= (SharedTable&& other) noexcept\n {\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }\n#endif" (#if) "#if" (identifier) "JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS" ( ) "\n" (expression_statement) "SharedTable (SharedTable&& other)" (call_expression) "SharedTable (SharedTable&& other)" (identifier) "SharedTable" (argument_list) "(SharedTable&& other)" (() "(" (binary_expression) "SharedTable&& other" (identifier) "SharedTable" (&&) "&&" (identifier) "other" ()) ")" (;) "" (labeled_statement) "noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))" (statement_identifier) "noexcept" (:) ":" (expression_statement) "m_data (static_cast <typename Data::Ptr&&> (other.m_data))" (call_expression) "m_data (static_cast <typename Data::Ptr&&> (other.m_data))" (identifier) "m_data" (argument_list) "(static_cast <typename Data::Ptr&&> (other.m_data))" (() "(" (binary_expression) "static_cast <typename Data::Ptr&&> (other.m_data)" (binary_expression) "static_cast <typename" (identifier) "static_cast" (<) "<" (identifier) "typename" (ERROR) "Data::Ptr&&" (identifier) "Data" (:) ":" (:) ":" (identifier) "Ptr" (&&) "&&" (>) ">" (parenthesized_expression) "(other.m_data)" (() "(" (field_expression) "other.m_data" (identifier) "other" (.) "." (field_identifier) "m_data" ()) ")" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (ERROR) "SharedTable& operator= (SharedTable&& other) noexcept" (binary_expression) "SharedTable& operator= (SharedTable&& other)" (identifier) "SharedTable" (&) "&" (assignment_expression) "operator= (SharedTable&& other)" (identifier) "operator" (=) "=" (parenthesized_expression) "(SharedTable&& other)" (() "(" (binary_expression) "SharedTable&& other" (identifier) "SharedTable" (&&) "&&" (identifier) "other" ()) ")" (identifier) "noexcept" (compound_statement) "{\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }" ({) "{" (expression_statement) "m_data = static_cast <typename" (assignment_expression) "m_data = static_cast <typename" (identifier) "m_data" (=) "=" (binary_expression) "static_cast <typename" (identifier) "static_cast" (<) "<" (identifier) "typename" (;) "" (labeled_statement) "Data::Ptr&&> (other.m_data);" (statement_identifier) "Data" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Ptr&&> (other.m_data);" (binary_expression) "Ptr&&> (other.m_data)" (identifier) "Ptr" (&&) "&&" (ERROR) ">" (>) ">" (parenthesized_expression) "(other.m_data)" (() "(" (field_expression) "other.m_data" (identifier) "other" (.) "." (field_identifier) "m_data" ()) ")" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (#endif) "#endif" (comment) "/** Destructor.\n */" (expression_statement) "~SharedTable ()" (unary_expression) "~SharedTable ()" (~) "~" (call_expression) "SharedTable ()" (identifier) "SharedTable" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (comment) "/** Returns true if the two tables share the same set of entries.\n */" (function_definition) "bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }" (primitive_type) "bool" (function_declarator) "operator== (SharedTable const& other) const noexcept" (identifier) "operator" (ERROR) "==" (==) "==" (parameter_list) "(SharedTable const& other)" (() "(" (parameter_declaration) "SharedTable const& other" (type_identifier) "SharedTable" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "other" ()) ")" (identifier) "const" (identifier) "noexcept" (compound_statement) "{\n return m_data == other.m_data;\n }" ({) "{" (return_statement) "return m_data == other.m_data;" (return) "return" (binary_expression) "m_data == other.m_data" (identifier) "m_data" (==) "==" (field_expression) "other.m_data" (identifier) "other" (.) "." (field_identifier) "m_data" (;) ";" (}) "}" (comment) "/** Returns true if the two tables do not share the same set of entries.\n */" (function_definition) "bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }" (primitive_type) "bool" (function_declarator) "operator!= (SharedTable const& other) const noexcept" (identifier) "operator" (ERROR) "!=" (!=) "!=" (parameter_list) "(SharedTable const& other)" (() "(" (parameter_declaration) "SharedTable const& other" (type_identifier) "SharedTable" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "other" ()) ")" (identifier) "const" (identifier) "noexcept" (compound_statement) "{\n return m_data != other.m_data;\n }" ({) "{" (return_statement) "return m_data != other.m_data;" (return) "return" (binary_expression) "m_data != other.m_data" (identifier) "m_data" (!=) "!=" (field_expression) "other.m_data" (identifier) "other" (.) "." (field_identifier) "m_data" (;) ";" (}) "}" (comment) "/** Returns true if the table is not null.\n */" (ERROR) "inline bool isValid () const noexcept" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "isValid ()" (identifier) "isValid" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (type_identifier) "noexcept" (compound_statement) "{\n return m_data != nullptr;\n }" ({) "{" (return_statement) "return m_data != nullptr;" (return) "return" (binary_expression) "m_data != nullptr" (identifier) "m_data" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (comment) "/** Returns true if the table is null.\n */" (ERROR) "inline bool isNull () const noexcept" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "isNull ()" (identifier) "isNull" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (type_identifier) "noexcept" (compound_statement) "{\n return m_data == nullptr;\n }" ({) "{" (return_statement) "return m_data == nullptr;" (return) "return" (binary_expression) "m_data == nullptr" (identifier) "m_data" (==) "==" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (comment) "/** Returns the number of tables referring to the same shared entries.\n */" (ERROR) "int getReferenceCount () const noexcept" (primitive_type) "int" (function_declarator) "getReferenceCount ()" (identifier) "getReferenceCount" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (type_identifier) "noexcept" (compound_statement) "{\n return m_data == nullptr ? 0 : m_data->getReferenceCount ();\n }" ({) "{" (return_statement) "return m_data == nullptr ? 0 : m_data->getReferenceCount ();" (return) "return" (conditional_expression) "m_data == nullptr ? 0 : m_data->getReferenceCount ()" (binary_expression) "m_data == nullptr" (identifier) "m_data" (==) "==" (null) "nullptr" (nullptr) "nullptr" (?) "?" (number_literal) "0" (:) ":" (call_expression) "m_data->getReferenceCount ()" (field_expression) "m_data->getReferenceCount" (identifier) "m_data" (->) "->" (field_identifier) "getReferenceCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/** Create a physical duplicate of the table.\n */" (ERROR) "SharedTable createCopy () const" (type_identifier) "SharedTable" (function_declarator) "createCopy ()" (identifier) "createCopy" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);\n }" ({) "{" (return_statement) "return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);" (return) "return" (call_expression) "SharedTable (m_data != nullptr ? m_data->clone() : nullptr)" (identifier) "SharedTable" (argument_list) "(m_data != nullptr ? m_data->clone() : nullptr)" (() "(" (conditional_expression) "m_data != nullptr ? m_data->clone() : nullptr" (binary_expression) "m_data != nullptr" (identifier) "m_data" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" (?) "?" (call_expression) "m_data->clone()" (field_expression) "m_data->clone" (identifier) "m_data" (->) "->" (field_identifier) "clone" (argument_list) "()" (() "(" ()) ")" (:) ":" (null) "nullptr" (nullptr) "nullptr" ()) ")" (;) ";" (}) "}" (comment) "/** Makes sure no other tables share the same entries as this table.\n */" (function_definition) "void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }" (primitive_type) "void" (function_declarator) "duplicateIfShared ()" (identifier) "duplicateIfShared" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }" ({) "{" (if_statement) "if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();" (if) "if" (parenthesized_expression) "(m_data != nullptr && m_data->getReferenceCount() > 1)" (() "(" (binary_expression) "m_data != nullptr && m_data->getReferenceCount() > 1" (binary_expression) "m_data != nullptr" (identifier) "m_data" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" (&&) "&&" (binary_expression) "m_data->getReferenceCount() > 1" (call_expression) "m_data->getReferenceCount()" (field_expression) "m_data->getReferenceCount" (identifier) "m_data" (->) "->" (field_identifier) "getReferenceCount" (argument_list) "()" (() "(" ()) ")" (>) ">" (number_literal) "1" ()) ")" (expression_statement) "m_data = m_data->clone ();" (assignment_expression) "m_data = m_data->clone ()" (identifier) "m_data" (=) "=" (call_expression) "m_data->clone ()" (field_expression) "m_data->clone" (identifier) "m_data" (->) "->" (field_identifier) "clone" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/** Return the number of entries in this table.\n */" (ERROR) "inline int getNumEntries () const noexcept" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getNumEntries ()" (identifier) "getNumEntries" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (type_identifier) "noexcept" (compound_statement) "{\n return m_data->getNumEntries ();\n }" ({) "{" (return_statement) "return m_data->getNumEntries ();" (return) "return" (call_expression) "m_data->getNumEntries ()" (field_expression) "m_data->getNumEntries" (identifier) "m_data" (->) "->" (field_identifier) "getNumEntries" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/** Retrieve a table entry.\n\n @param index The index of the entry, from 0 to getNumEntries ().\n */" (function_definition) "inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (index);\n }" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "ElementType" (ERROR) "&" (&) "&" (function_declarator) "operator [] (int index) const noexcept" (array_declarator) "operator []" (identifier) "operator" ([) "[" (]) "]" (parameter_list) "(int index)" (() "(" (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" ()) ")" (identifier) "const" (identifier) "noexcept" (compound_statement) "{\n return m_data->getReference (index);\n }" ({) "{" (return_statement) "return m_data->getReference (index);" (return) "return" (call_expression) "m_data->getReference (index)" (field_expression) "m_data->getReference" (identifier) "m_data" (->) "->" (field_identifier) "getReference" (argument_list) "(index)" (() "(" (identifier) "index" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)\n : m_numEntries (numEntries)\n , m_table (numEntries)" (statement_identifier) "private" (ERROR) ":\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)" (:) ":" (type_identifier) "class" (identifier) "Data" (:) ":" (ERROR) "public ReferenceCountedObject" (type_identifier) "public" (identifier) "ReferenceCountedObject" ({) "{" (expression_statement) "public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;" (binary_expression) "public:\n typedef ReferenceCountedObjectPtr <Data> Ptr" (binary_expression) "public:\n typedef ReferenceCountedObjectPtr <Data" (identifier) "public" (ERROR) ":\n typedef ReferenceCountedObjectPtr" (:) ":" (type_identifier) "typedef" (identifier) "ReferenceCountedObjectPtr" (<) "<" (identifier) "Data" (>) ">" (identifier) "Ptr" (;) ";" (type_identifier) "explicit" (function_declarator) "Data (int numEntries)" (identifier) "Data" (parameter_list) "(int numEntries)" (() "(" (parameter_declaration) "int numEntries" (primitive_type) "int" (identifier) "numEntries" ()) ")" (:) ":" (expression_statement) "m_numEntries (numEntries)\n , m_table (numEntries)" (comma_expression) "m_numEntries (numEntries)\n , m_table (numEntries)" (call_expression) "m_numEntries (numEntries)" (identifier) "m_numEntries" (argument_list) "(numEntries)" (() "(" (identifier) "numEntries" ()) ")" (,) "," (call_expression) "m_table (numEntries)" (identifier) "m_table" (argument_list) "(numEntries)" (() "(" (identifier) "numEntries" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (function_definition) "inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "Data" (pointer_declarator) "* clone () const" (*) "*" (function_declarator) "clone () const" (identifier) "clone" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }" ({) "{" (declaration) "Data* data = new Data (m_numEntries);" (type_identifier) "Data" (init_declarator) "* data = new Data (m_numEntries)" (pointer_declarator) "* data" (*) "*" (identifier) "data" (=) "=" (ERROR) "new" (identifier) "new" (call_expression) "Data (m_numEntries)" (identifier) "Data" (argument_list) "(m_numEntries)" (() "(" (identifier) "m_numEntries" ()) ")" (;) ";" (expression_statement) "memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));" (call_expression) "memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType))" (identifier) "memcpy" (argument_list) "(\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType))" (() "(" (call_expression) "data->m_table.getData ()" (field_expression) "data->m_table.getData" (field_expression) "data->m_table" (identifier) "data" (->) "->" (field_identifier) "m_table" (.) "." (field_identifier) "getData" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "m_table.getData ()" (field_expression) "m_table.getData" (identifier) "m_table" (.) "." (field_identifier) "getData" (argument_list) "()" (() "(" ()) ")" (,) "," (binary_expression) "m_numEntries * sizeof (ElementType)" (identifier) "m_numEntries" (*) "*" (sizeof_expression) "sizeof (ElementType)" (sizeof) "sizeof" (parenthesized_expression) "(ElementType)" (() "(" (identifier) "ElementType" ()) ")" ()) ")" (;) ";" (return_statement) "return data;" (return) "return" (identifier) "data" (;) ";" (}) "}" (ERROR) "inline int getNumEntries () const" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getNumEntries ()" (identifier) "getNumEntries" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return m_numEntries;\n }" ({) "{" (return_statement) "return m_numEntries;" (return) "return" (identifier) "m_numEntries" (;) ";" (}) "}" (function_definition) "inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "ElementType" (ERROR) "&" (&) "&" (function_declarator) "getReference (int index) const" (identifier) "getReference" (parameter_list) "(int index)" (() "(" (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" ()) ")" (identifier) "const" (compound_statement) "{\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }" ({) "{" (expression_statement) "jassert (index >= 0 && index < m_numEntries);" (call_expression) "jassert (index >= 0 && index < m_numEntries)" (identifier) "jassert" (argument_list) "(index >= 0 && index < m_numEntries)" (() "(" (binary_expression) "index >= 0 && index < m_numEntries" (binary_expression) "index >= 0" (identifier) "index" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "index < m_numEntries" (identifier) "index" (<) "<" (identifier) "m_numEntries" ()) ")" (;) ";" (return_statement) "return m_table [index];" (return) "return" (subscript_expression) "m_table [index]" (identifier) "m_table" ([) "[" (identifier) "index" (]) "]" (;) ";" (}) "}" (labeled_statement) "private:\n int const m_numEntries;" (statement_identifier) "private" (:) ":" (declaration) "int const m_numEntries;" (primitive_type) "int" (type_qualifier) "const" (const) "const" (identifier) "m_numEntries" (;) ";" (expression_statement) "HeapBlock <ElementType> const m_table;" (binary_expression) "HeapBlock <ElementType> const m_table" (binary_expression) "HeapBlock <ElementType" (identifier) "HeapBlock" (<) "<" (identifier) "ElementType" (>) ">" (ERROR) "const" (identifier) "const" (identifier) "m_table" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "explicit SharedTable (Data* data)\n : m_data (data)\n {\n }" (type_identifier) "explicit" (function_declarator) "SharedTable (Data* data)\n : m_data (data)" (identifier) "SharedTable" (parameter_list) "(Data* data)" (() "(" (parameter_declaration) "Data* data" (type_identifier) "Data" (pointer_declarator) "* data" (*) "*" (identifier) "data" ()) ")" (ERROR) ":" (:) ":" (call_expression) "m_data (data)" (identifier) "m_data" (argument_list) "(data)" (() "(" (identifier) "data" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (expression_statement) "ReferenceCountedObjectPtr <Data> m_data;" (binary_expression) "ReferenceCountedObjectPtr <Data> m_data" (binary_expression) "ReferenceCountedObjectPtr <Data" (identifier) "ReferenceCountedObjectPtr" (<) "<" (identifier) "Data" (>) ">" (identifier) "m_data" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "template <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null;" (binary_expression) "template <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null" (binary_expression) "template <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType" (binary_expression) "template <class ElementType>\nSharedTable <ElementType> const SharedTable" (binary_expression) "template <class ElementType>\nSharedTable <ElementType" (binary_expression) "template <class ElementType>\nSharedTable" (binary_expression) "template <class ElementType" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "ElementType" (>) ">" (identifier) "SharedTable" (<) "<" (identifier) "ElementType" (>) ">" (ERROR) "const" (identifier) "const" (identifier) "SharedTable" (<) "<" (identifier) "ElementType" (>) ">" (ERROR) "::" (:) ":" (:) ":" (identifier) "null" (;) ";" (#endif) "#endif" (comment) "//------------------------------------------------------------------------------"
832
37
{"language": "c", "success": true, "metadata": {"lines": 181, "avg_line_length": 29.6, "nodes": 481, "errors": 0, "source_hash": "ee80885ed8401216ec17de69ccfba5e88c0e9d6e4c5de6bb548b309fa37efbf4", "categorized_nodes": 323}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef VF_SHAREDTABLE_VFHEADER\n#define VF_SHAREDTABLE_VFHEADER\n\n/** Handle to a reference counted fixed size table.\n\n @note Currently, ElementType must be an aggregate of POD.\n\n @tparam ElementType The type of element.\n \n @ingroup vf_gui\n*/\ntemplate <class ElementType>\nclass SharedTable\n{\npublic:\n typedef ElementType Entry;\n\n static SharedTable <ElementType> const null;\n\n /** Creates a null table.\n */\n SharedTable ()\n {\n }\n\n /** Creates a table with the specified number of entries.\n\n The entries are uninitialized.\n\n @param numEntries The number of entries in the table.\n\n @todo Initialize the data if ElementType is not POD.\n */\n explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }\n\n /** Creates a shared reference to another table.\n */\n SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }\n\n /** Makes this table refer to another table.\n */\n SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data;\n return *this;\n }\n\n#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS\n SharedTable (SharedTable&& other) noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))\n {\n }\n\n SharedTable& operator= (SharedTable&& other) noexcept\n {\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }\n#endif\n\n /** Destructor.\n */\n ~SharedTable ()\n {\n }\n\n /** Returns true if the two tables share the same set of entries.\n */\n bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }\n\n /** Returns true if the two tables do not share the same set of entries.\n */\n bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }\n\n /** Returns true if the table is not null.\n */\n inline bool isValid () const noexcept\n {\n return m_data != nullptr;\n }\n\n /** Returns true if the table is null.\n */\n inline bool isNull () const noexcept\n {\n return m_data == nullptr;\n }\n\n /** Returns the number of tables referring to the same shared entries.\n */\n int getReferenceCount () const noexcept\n {\n return m_data == nullptr ? 0 : m_data->getReferenceCount ();\n }\n\n /** Create a physical duplicate of the table.\n */\n SharedTable createCopy () const\n {\n return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);\n }\n\n /** Makes sure no other tables share the same entries as this table.\n */\n void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }\n\n /** Return the number of entries in this table.\n */\n inline int getNumEntries () const noexcept\n {\n return m_data->getNumEntries ();\n }\n\n /** Retrieve a table entry.\n\n @param index The index of the entry, from 0 to getNumEntries ().\n */\n inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (index);\n }\n\nprivate:\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)\n : m_numEntries (numEntries)\n , m_table (numEntries)\n {\n }\n\n inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }\n\n inline int getNumEntries () const\n {\n return m_numEntries;\n }\n\n inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }\n\n private:\n int const m_numEntries;\n HeapBlock <ElementType> const m_table;\n };\n\n explicit SharedTable (Data* data)\n : m_data (data)\n {\n }\n\n ReferenceCountedObjectPtr <Data> m_data;\n};\n\ntemplate <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null;\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 80, 150, 168, 186, 200, 214, 234, 257, 287, 301, 320, 350, 393, 402, 429, 440, 480], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 221, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 2, "type": "identifier", "text": "VF_SHAREDTABLE_VFHEADER", "parent": 0, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define VF_SHAREDTABLE_VFHEADER\n", "parent": 0, "children": [4, 5], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 5, "type": "identifier", "text": "VF_SHAREDTABLE_VFHEADER", "parent": 3, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 31}}, {"id": 6, "type": "ERROR", "text": "template <class ElementType>\nclass SharedTable", "parent": 0, "children": [7, 13], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 17}}, {"id": 7, "type": "binary_expression", "text": "template <class ElementType>\nclass", "parent": 6, "children": [8, 12], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 5}}, {"id": 8, "type": "binary_expression", "text": "template <class ElementType", "parent": 7, "children": [9, 10, 11], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 27}}, {"id": 9, "type": "identifier", "text": "template", "parent": 8, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 10, "type": "<", "text": "<", "parent": 8, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 11, "type": "identifier", "text": "ElementType", "parent": 8, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 27}}, {"id": 12, "type": ">", "text": ">", "parent": 7, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 28}}, {"id": 13, "type": "identifier", "text": "SharedTable", "parent": 6, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 17}}, {"id": 14, "type": "labeled_statement", "text": "public:\n typedef ElementType Entry;", "parent": 0, "children": [15], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 28}}, {"id": 15, "type": "declaration", "text": "typedef ElementType Entry;", "parent": 14, "children": [16, 17, 18], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 28}}, {"id": 16, "type": "type_identifier", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 9}}, {"id": 17, "type": "identifier", "text": "ElementType", "parent": 15, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 21}}, {"id": 18, "type": "ERROR", "text": "Entry", "parent": 15, "children": [19], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 27}}, {"id": 19, "type": "identifier", "text": "Entry", "parent": 18, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 27}}, {"id": 20, "type": "declaration", "text": "static SharedTable <ElementType> const null;", "parent": 0, "children": [21, 22, 26], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 46}}, {"id": 21, "type": "type_identifier", "text": "SharedTable", "parent": 20, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 20}}, {"id": 22, "type": "ERROR", "text": "<ElementType> const", "parent": 20, "children": [23, 24, 25], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 40}}, {"id": 23, "type": "<", "text": "<", "parent": 22, "children": [], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 22}}, {"id": 24, "type": "identifier", "text": "ElementType", "parent": 22, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 33}}, {"id": 25, "type": ">", "text": ">", "parent": 22, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 34}}, {"id": 26, "type": "identifier", "text": "null", "parent": 20, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 45}}, {"id": 27, "type": "call_expression", "text": "SharedTable ()", "parent": 0, "children": [28, 29], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 16}}, {"id": 28, "type": "identifier", "text": "SharedTable", "parent": 27, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 13}}, {"id": 29, "type": "argument_list", "text": "()", "parent": 27, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 16}}, {"id": 30, "type": "function_definition", "text": "explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }", "parent": 0, "children": [31, 32], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 68, "column": 3}}, {"id": 31, "type": "type_identifier", "text": "explicit", "parent": 30, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 10}}, {"id": 32, "type": "function_declarator", "text": "SharedTable (int numEntries)\n : m_data (new Data (numEntries))", "parent": 30, "children": [33, 34, 38], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 66, "column": 36}}, {"id": 33, "type": "identifier", "text": "SharedTable", "parent": 32, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 22}}, {"id": 34, "type": "parameter_list", "text": "(int numEntries)", "parent": 32, "children": [35], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 39}}, {"id": 35, "type": "parameter_declaration", "text": "int numEntries", "parent": 34, "children": [36, 37], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 38}}, {"id": 36, "type": "primitive_type", "text": "int", "parent": 35, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 27}}, {"id": 37, "type": "identifier", "text": "numEntries", "parent": 35, "children": [], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 38}}, {"id": 38, "type": "call_expression", "text": "m_data (new Data (numEntries))", "parent": 32, "children": [39, 40], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 36}}, {"id": 39, "type": "identifier", "text": "m_data", "parent": 38, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 12}}, {"id": 40, "type": "argument_list", "text": "(new Data (numEntries))", "parent": 38, "children": [41], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 36}}, {"id": 41, "type": "call_expression", "text": "Data (numEntries)", "parent": 40, "children": [42, 43], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 35}}, {"id": 42, "type": "identifier", "text": "Data", "parent": 41, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 22}}, {"id": 43, "type": "argument_list", "text": "(numEntries)", "parent": 41, "children": [44], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 35}}, {"id": 44, "type": "identifier", "text": "numEntries", "parent": 43, "children": [], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 34}}, {"id": 45, "type": "function_definition", "text": "SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }", "parent": 0, "children": [46, 52], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 75, "column": 3}}, {"id": 46, "type": "macro_type_specifier", "text": "SharedTable (SharedTable const& other)", "parent": 45, "children": [47, 48, 50], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 40}}, {"id": 47, "type": "identifier", "text": "SharedTable", "parent": 46, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 13}}, {"id": 48, "type": "type_descriptor", "text": "SharedTable const", "parent": 46, "children": [49], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 32}}, {"id": 49, "type": "type_identifier", "text": "SharedTable", "parent": 48, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 26}}, {"id": 50, "type": "ERROR", "text": "& other", "parent": 46, "children": [51], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 39}}, {"id": 51, "type": "identifier", "text": "other", "parent": 50, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 39}}, {"id": 52, "type": "function_declarator", "text": "m_data (other.m_data)", "parent": 45, "children": [53, 54], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 27}}, {"id": 53, "type": "identifier", "text": "m_data", "parent": 52, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 12}}, {"id": 54, "type": "parameter_list", "text": "(other.m_data)", "parent": 52, "children": [55], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 27}}, {"id": 55, "type": "parameter_declaration", "text": "other.m_data", "parent": 54, "children": [56, 57], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 26}}, {"id": 56, "type": "type_identifier", "text": "other", "parent": 55, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 19}}, {"id": 57, "type": "identifier", "text": "m_data", "parent": 55, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 26}}, {"id": 58, "type": "binary_expression", "text": "SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data", "parent": 0, "children": [59, 60], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 81, "column": 25}}, {"id": 59, "type": "identifier", "text": "SharedTable", "parent": 58, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 13}}, {"id": 60, "type": "assignment_expression", "text": "operator= (SharedTable const& other)\n {\n m_data = other.m_data", "parent": 58, "children": [61, 62, 63], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 81, "column": 25}}, {"id": 61, "type": "identifier", "text": "operator", "parent": 60, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 23}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 79, "column": 23}, "end_point": {"row": 79, "column": 24}}, {"id": 63, "type": "compound_literal_expression", "text": "(SharedTable const& other)\n {\n m_data = other.m_data", "parent": 60, "children": [64, 67, 69], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 81, "column": 25}}, {"id": 64, "type": "ERROR", "text": "SharedTable const&", "parent": 63, "children": [65], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 44}}, {"id": 65, "type": "type_descriptor", "text": "SharedTable const", "parent": 64, "children": [66], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 43}}, {"id": 66, "type": "type_identifier", "text": "SharedTable", "parent": 65, "children": [], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 37}}, {"id": 67, "type": "type_descriptor", "text": "other", "parent": 63, "children": [68], "start_point": {"row": 79, "column": 45}, "end_point": {"row": 79, "column": 50}}, {"id": 68, "type": "type_identifier", "text": "other", "parent": 67, "children": [], "start_point": {"row": 79, "column": 45}, "end_point": {"row": 79, "column": 50}}, {"id": 69, "type": "initializer_list", "text": "{\n m_data = other.m_data", "parent": 63, "children": [70], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 81, "column": 25}}, {"id": 70, "type": "assignment_expression", "text": "m_data = other.m_data", "parent": 69, "children": [71, 72, 73], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 25}}, {"id": 71, "type": "identifier", "text": "m_data", "parent": 70, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 10}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 12}}, {"id": 73, "type": "field_expression", "text": "other.m_data", "parent": 70, "children": [74, 75], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 25}}, {"id": 74, "type": "identifier", "text": "other", "parent": 73, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 18}}, {"id": 75, "type": "field_identifier", "text": "m_data", "parent": 73, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 25}}, {"id": 76, "type": "return_statement", "text": "return *this;", "parent": 0, "children": [77], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 17}}, {"id": 77, "type": "pointer_expression", "text": "*this", "parent": 76, "children": [78, 79], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 16}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 12}}, {"id": 79, "type": "identifier", "text": "this", "parent": 77, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 80, "type": "preproc_if", "text": "#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS\n SharedTable (SharedTable&& other) noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))\n {\n }\n\n SharedTable& operator= (SharedTable&& other) noexcept\n {\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }\n#endif", "parent": 0, "children": [81, 82, 83, 91, 110, 144], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 81, "type": "#if", "text": "#if", "parent": 80, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 3}}, {"id": 82, "type": "identifier", "text": "JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS", "parent": 80, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 41}}, {"id": 83, "type": "\n", "text": "\n", "parent": 80, "children": [], "start_point": {"row": 85, "column": 41}, "end_point": {"row": 86, "column": 0}}, {"id": 84, "type": "call_expression", "text": "SharedTable (SharedTable&& other)", "parent": 80, "children": [85, 86], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 35}}, {"id": 85, "type": "identifier", "text": "SharedTable", "parent": 84, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 13}}, {"id": 86, "type": "argument_list", "text": "(SharedTable&& other)", "parent": 84, "children": [87], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 35}}, {"id": 87, "type": "binary_expression", "text": "SharedTable&& other", "parent": 86, "children": [88, 89, 90], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 34}}, {"id": 88, "type": "identifier", "text": "SharedTable", "parent": 87, "children": [], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 26}}, {"id": 89, "type": "&&", "text": "&&", "parent": 87, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 28}}, {"id": 90, "type": "identifier", "text": "other", "parent": 87, "children": [], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 34}}, {"id": 91, "type": "labeled_statement", "text": "noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))", "parent": 80, "children": [92], "start_point": {"row": 86, "column": 36}, "end_point": {"row": 87, "column": 66}}, {"id": 92, "type": "statement_identifier", "text": "noexcept", "parent": 91, "children": [], "start_point": {"row": 86, "column": 36}, "end_point": {"row": 86, "column": 44}}, {"id": 93, "type": "call_expression", "text": "m_data (static_cast <typename Data::Ptr&&> (other.m_data))", "parent": 91, "children": [94, 95], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 66}}, {"id": 94, "type": "identifier", "text": "m_data", "parent": 93, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 14}}, {"id": 95, "type": "argument_list", "text": "(static_cast <typename Data::Ptr&&> (other.m_data))", "parent": 93, "children": [96], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 66}}, {"id": 96, "type": "binary_expression", "text": "static_cast <typename Data::Ptr&&> (other.m_data)", "parent": 95, "children": [97, 101, 105, 106], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 65}}, {"id": 97, "type": "binary_expression", "text": "static_cast <typename", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 37}}, {"id": 98, "type": "identifier", "text": "static_cast", "parent": 97, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 27}}, {"id": 99, "type": "<", "text": "<", "parent": 97, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 29}}, {"id": 100, "type": "identifier", "text": "typename", "parent": 97, "children": [], "start_point": {"row": 87, "column": 29}, "end_point": {"row": 87, "column": 37}}, {"id": 101, "type": "ERROR", "text": "Data::Ptr&&", "parent": 96, "children": [102, 103, 104], "start_point": {"row": 87, "column": 38}, "end_point": {"row": 87, "column": 49}}, {"id": 102, "type": "identifier", "text": "Data", "parent": 101, "children": [], "start_point": {"row": 87, "column": 38}, "end_point": {"row": 87, "column": 42}}, {"id": 103, "type": "identifier", "text": "Ptr", "parent": 101, "children": [], "start_point": {"row": 87, "column": 44}, "end_point": {"row": 87, "column": 47}}, {"id": 104, "type": "&&", "text": "&&", "parent": 101, "children": [], "start_point": {"row": 87, "column": 47}, "end_point": {"row": 87, "column": 49}}, {"id": 105, "type": ">", "text": ">", "parent": 96, "children": [], "start_point": {"row": 87, "column": 49}, "end_point": {"row": 87, "column": 50}}, {"id": 106, "type": "parenthesized_expression", "text": "(other.m_data)", "parent": 96, "children": [107], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 65}}, {"id": 107, "type": "field_expression", "text": "other.m_data", "parent": 106, "children": [108, 109], "start_point": {"row": 87, "column": 52}, "end_point": {"row": 87, "column": 64}}, {"id": 108, "type": "identifier", "text": "other", "parent": 107, "children": [], "start_point": {"row": 87, "column": 52}, "end_point": {"row": 87, "column": 57}}, {"id": 109, "type": "field_identifier", "text": "m_data", "parent": 107, "children": [], "start_point": {"row": 87, "column": 58}, "end_point": {"row": 87, "column": 64}}, {"id": 110, "type": "ERROR", "text": "SharedTable& operator= (SharedTable&& other) noexcept", "parent": 80, "children": [111, 121], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 55}}, {"id": 111, "type": "binary_expression", "text": "SharedTable& operator= (SharedTable&& other)", "parent": 110, "children": [112, 113], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 46}}, {"id": 112, "type": "identifier", "text": "SharedTable", "parent": 111, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 13}}, {"id": 113, "type": "assignment_expression", "text": "operator= (SharedTable&& other)", "parent": 111, "children": [114, 115, 116], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 46}}, {"id": 114, "type": "identifier", "text": "operator", "parent": 113, "children": [], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 23}}, {"id": 115, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 24}}, {"id": 116, "type": "parenthesized_expression", "text": "(SharedTable&& other)", "parent": 113, "children": [117], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 46}}, {"id": 117, "type": "binary_expression", "text": "SharedTable&& other", "parent": 116, "children": [118, 119, 120], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 45}}, {"id": 118, "type": "identifier", "text": "SharedTable", "parent": 117, "children": [], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 37}}, {"id": 119, "type": "&&", "text": "&&", "parent": 117, "children": [], "start_point": {"row": 91, "column": 37}, "end_point": {"row": 91, "column": 39}}, {"id": 120, "type": "identifier", "text": "other", "parent": 117, "children": [], "start_point": {"row": 91, "column": 40}, "end_point": {"row": 91, "column": 45}}, {"id": 121, "type": "identifier", "text": "noexcept", "parent": 110, "children": [], "start_point": {"row": 91, "column": 47}, "end_point": {"row": 91, "column": 55}}, {"id": 122, "type": "assignment_expression", "text": "m_data = static_cast <typename", "parent": 80, "children": [123, 124, 125], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 36}}, {"id": 123, "type": "identifier", "text": "m_data", "parent": 122, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 12}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 14}}, {"id": 125, "type": "binary_expression", "text": "static_cast <typename", "parent": 122, "children": [126, 127, 128], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 36}}, {"id": 126, "type": "identifier", "text": "static_cast", "parent": 125, "children": [], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 26}}, {"id": 127, "type": "<", "text": "<", "parent": 125, "children": [], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 28}}, {"id": 128, "type": "identifier", "text": "typename", "parent": 125, "children": [], "start_point": {"row": 93, "column": 28}, "end_point": {"row": 93, "column": 36}}, {"id": 129, "type": "labeled_statement", "text": "Data::Ptr&&> (other.m_data);", "parent": 80, "children": [130], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 65}}, {"id": 130, "type": "statement_identifier", "text": "Data", "parent": 129, "children": [], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 41}}, {"id": 131, "type": "binary_expression", "text": "Ptr&&> (other.m_data)", "parent": 129, "children": [132, 133, 134, 136], "start_point": {"row": 93, "column": 43}, "end_point": {"row": 93, "column": 64}}, {"id": 132, "type": "identifier", "text": "Ptr", "parent": 131, "children": [], "start_point": {"row": 93, "column": 43}, "end_point": {"row": 93, "column": 46}}, {"id": 133, "type": "&&", "text": "&&", "parent": 131, "children": [], "start_point": {"row": 93, "column": 46}, "end_point": {"row": 93, "column": 48}}, {"id": 134, "type": "ERROR", "text": ">", "parent": 131, "children": [135], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 49}}, {"id": 135, "type": ">", "text": ">", "parent": 134, "children": [], "start_point": {"row": 93, "column": 48}, "end_point": {"row": 93, "column": 49}}, {"id": 136, "type": "parenthesized_expression", "text": "(other.m_data)", "parent": 131, "children": [137], "start_point": {"row": 93, "column": 50}, "end_point": {"row": 93, "column": 64}}, {"id": 137, "type": "field_expression", "text": "other.m_data", "parent": 136, "children": [138, 139], "start_point": {"row": 93, "column": 51}, "end_point": {"row": 93, "column": 63}}, {"id": 138, "type": "identifier", "text": "other", "parent": 137, "children": [], "start_point": {"row": 93, "column": 51}, "end_point": {"row": 93, "column": 56}}, {"id": 139, "type": "field_identifier", "text": "m_data", "parent": 137, "children": [], "start_point": {"row": 93, "column": 57}, "end_point": {"row": 93, "column": 63}}, {"id": 140, "type": "return_statement", "text": "return *this;", "parent": 80, "children": [141], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 19}}, {"id": 141, "type": "pointer_expression", "text": "*this", "parent": 140, "children": [142, 143], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 18}}, {"id": 142, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 14}}, {"id": 143, "type": "identifier", "text": "this", "parent": 141, "children": [], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 18}}, {"id": 144, "type": "#endif", "text": "#endif", "parent": 80, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 145, "type": "unary_expression", "text": "~SharedTable ()", "parent": 0, "children": [146, 147], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 17}}, {"id": 146, "type": "~", "text": "~", "parent": 145, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 3}}, {"id": 147, "type": "call_expression", "text": "SharedTable ()", "parent": 145, "children": [148, 149], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 17}}, {"id": 148, "type": "identifier", "text": "SharedTable", "parent": 147, "children": [], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 14}}, {"id": 149, "type": "argument_list", "text": "()", "parent": 147, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 17}}, {"id": 150, "type": "function_definition", "text": "bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }", "parent": 0, "children": [151, 152], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 109, "column": 3}}, {"id": 151, "type": "primitive_type", "text": "bool", "parent": 150, "children": [], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 6}}, {"id": 152, "type": "function_declarator", "text": "operator== (SharedTable const& other) const noexcept", "parent": 150, "children": [153, 154, 156, 160], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 59}}, {"id": 153, "type": "identifier", "text": "operator", "parent": 152, "children": [], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 15}}, {"id": 154, "type": "ERROR", "text": "==", "parent": 152, "children": [155], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 17}}, {"id": 155, "type": "==", "text": "==", "parent": 154, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 17}}, {"id": 156, "type": "parameter_list", "text": "(SharedTable const& other)", "parent": 152, "children": [157], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 44}}, {"id": 157, "type": "parameter_declaration", "text": "SharedTable const& other", "parent": 156, "children": [158, 159], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 43}}, {"id": 158, "type": "type_identifier", "text": "SharedTable", "parent": 157, "children": [], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 30}}, {"id": 159, "type": "identifier", "text": "other", "parent": 157, "children": [], "start_point": {"row": 106, "column": 38}, "end_point": {"row": 106, "column": 43}}, {"id": 160, "type": "identifier", "text": "noexcept", "parent": 152, "children": [], "start_point": {"row": 106, "column": 51}, "end_point": {"row": 106, "column": 59}}, {"id": 161, "type": "return_statement", "text": "return m_data == other.m_data;", "parent": 150, "children": [162], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 34}}, {"id": 162, "type": "binary_expression", "text": "m_data == other.m_data", "parent": 161, "children": [163, 164, 165], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 33}}, {"id": 163, "type": "identifier", "text": "m_data", "parent": 162, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 17}}, {"id": 164, "type": "==", "text": "==", "parent": 162, "children": [], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 20}}, {"id": 165, "type": "field_expression", "text": "other.m_data", "parent": 162, "children": [166, 167], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 33}}, {"id": 166, "type": "identifier", "text": "other", "parent": 165, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 26}}, {"id": 167, "type": "field_identifier", "text": "m_data", "parent": 165, "children": [], "start_point": {"row": 108, "column": 27}, "end_point": {"row": 108, "column": 33}}, {"id": 168, "type": "function_definition", "text": "bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }", "parent": 0, "children": [169, 170], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 116, "column": 3}}, {"id": 169, "type": "primitive_type", "text": "bool", "parent": 168, "children": [], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 6}}, {"id": 170, "type": "function_declarator", "text": "operator!= (SharedTable const& other) const noexcept", "parent": 168, "children": [171, 172, 174, 178], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 59}}, {"id": 171, "type": "identifier", "text": "operator", "parent": 170, "children": [], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 15}}, {"id": 172, "type": "ERROR", "text": "!=", "parent": 170, "children": [173], "start_point": {"row": 113, "column": 15}, "end_point": {"row": 113, "column": 17}}, {"id": 173, "type": "!=", "text": "!=", "parent": 172, "children": [], "start_point": {"row": 113, "column": 15}, "end_point": {"row": 113, "column": 17}}, {"id": 174, "type": "parameter_list", "text": "(SharedTable const& other)", "parent": 170, "children": [175], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 44}}, {"id": 175, "type": "parameter_declaration", "text": "SharedTable const& other", "parent": 174, "children": [176, 177], "start_point": {"row": 113, "column": 19}, "end_point": {"row": 113, "column": 43}}, {"id": 176, "type": "type_identifier", "text": "SharedTable", "parent": 175, "children": [], "start_point": {"row": 113, "column": 19}, "end_point": {"row": 113, "column": 30}}, {"id": 177, "type": "identifier", "text": "other", "parent": 175, "children": [], "start_point": {"row": 113, "column": 38}, "end_point": {"row": 113, "column": 43}}, {"id": 178, "type": "identifier", "text": "noexcept", "parent": 170, "children": [], "start_point": {"row": 113, "column": 51}, "end_point": {"row": 113, "column": 59}}, {"id": 179, "type": "return_statement", "text": "return m_data != other.m_data;", "parent": 168, "children": [180], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 34}}, {"id": 180, "type": "binary_expression", "text": "m_data != other.m_data", "parent": 179, "children": [181, 182, 183], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 33}}, {"id": 181, "type": "identifier", "text": "m_data", "parent": 180, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 17}}, {"id": 182, "type": "!=", "text": "!=", "parent": 180, "children": [], "start_point": {"row": 115, "column": 18}, "end_point": {"row": 115, "column": 20}}, {"id": 183, "type": "field_expression", "text": "other.m_data", "parent": 180, "children": [184, 185], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 33}}, {"id": 184, "type": "identifier", "text": "other", "parent": 183, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 26}}, {"id": 185, "type": "field_identifier", "text": "m_data", "parent": 183, "children": [], "start_point": {"row": 115, "column": 27}, "end_point": {"row": 115, "column": 33}}, {"id": 186, "type": "ERROR", "text": "inline bool isValid () const noexcept", "parent": 0, "children": [187, 189, 190, 193], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 39}}, {"id": 187, "type": "storage_class_specifier", "text": "inline", "parent": 186, "children": [188], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 8}}, {"id": 188, "type": "inline", "text": "inline", "parent": 187, "children": [], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 8}}, {"id": 189, "type": "primitive_type", "text": "bool", "parent": 186, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 13}}, {"id": 190, "type": "function_declarator", "text": "isValid ()", "parent": 186, "children": [191, 192], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 24}}, {"id": 191, "type": "identifier", "text": "isValid", "parent": 190, "children": [], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 21}}, {"id": 192, "type": "parameter_list", "text": "()", "parent": 190, "children": [], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 24}}, {"id": 193, "type": "type_identifier", "text": "noexcept", "parent": 186, "children": [], "start_point": {"row": 120, "column": 31}, "end_point": {"row": 120, "column": 39}}, {"id": 194, "type": "return_statement", "text": "return m_data != nullptr;", "parent": 0, "children": [195], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 29}}, {"id": 195, "type": "binary_expression", "text": "m_data != nullptr", "parent": 194, "children": [196, 197, 198], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 28}}, {"id": 196, "type": "identifier", "text": "m_data", "parent": 195, "children": [], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 17}}, {"id": 197, "type": "!=", "text": "!=", "parent": 195, "children": [], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 20}}, {"id": 198, "type": "null", "text": "nullptr", "parent": 195, "children": [199], "start_point": {"row": 122, "column": 21}, "end_point": {"row": 122, "column": 28}}, {"id": 199, "type": "nullptr", "text": "nullptr", "parent": 198, "children": [], "start_point": {"row": 122, "column": 21}, "end_point": {"row": 122, "column": 28}}, {"id": 200, "type": "ERROR", "text": "inline bool isNull () const noexcept", "parent": 0, "children": [201, 203, 204, 207], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 38}}, {"id": 201, "type": "storage_class_specifier", "text": "inline", "parent": 200, "children": [202], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 8}}, {"id": 202, "type": "inline", "text": "inline", "parent": 201, "children": [], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 8}}, {"id": 203, "type": "primitive_type", "text": "bool", "parent": 200, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 13}}, {"id": 204, "type": "function_declarator", "text": "isNull ()", "parent": 200, "children": [205, 206], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 23}}, {"id": 205, "type": "identifier", "text": "isNull", "parent": 204, "children": [], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 20}}, {"id": 206, "type": "parameter_list", "text": "()", "parent": 204, "children": [], "start_point": {"row": 127, "column": 21}, "end_point": {"row": 127, "column": 23}}, {"id": 207, "type": "type_identifier", "text": "noexcept", "parent": 200, "children": [], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 38}}, {"id": 208, "type": "return_statement", "text": "return m_data == nullptr;", "parent": 0, "children": [209], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 29}}, {"id": 209, "type": "binary_expression", "text": "m_data == nullptr", "parent": 208, "children": [210, 211, 212], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 28}}, {"id": 210, "type": "identifier", "text": "m_data", "parent": 209, "children": [], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 17}}, {"id": 211, "type": "==", "text": "==", "parent": 209, "children": [], "start_point": {"row": 129, "column": 18}, "end_point": {"row": 129, "column": 20}}, {"id": 212, "type": "null", "text": "nullptr", "parent": 209, "children": [213], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 28}}, {"id": 213, "type": "nullptr", "text": "nullptr", "parent": 212, "children": [], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 28}}, {"id": 214, "type": "ERROR", "text": "int getReferenceCount () const noexcept", "parent": 0, "children": [215, 216, 219], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 41}}, {"id": 215, "type": "primitive_type", "text": "int", "parent": 214, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 5}}, {"id": 216, "type": "function_declarator", "text": "getReferenceCount ()", "parent": 214, "children": [217, 218], "start_point": {"row": 134, "column": 6}, "end_point": {"row": 134, "column": 26}}, {"id": 217, "type": "identifier", "text": "getReferenceCount", "parent": 216, "children": [], "start_point": {"row": 134, "column": 6}, "end_point": {"row": 134, "column": 23}}, {"id": 218, "type": "parameter_list", "text": "()", "parent": 216, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 26}}, {"id": 219, "type": "type_identifier", "text": "noexcept", "parent": 214, "children": [], "start_point": {"row": 134, "column": 33}, "end_point": {"row": 134, "column": 41}}, {"id": 220, "type": "return_statement", "text": "return m_data == nullptr ? 0 : m_data->getReferenceCount ();", "parent": 0, "children": [221], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 64}}, {"id": 221, "type": "conditional_expression", "text": "m_data == nullptr ? 0 : m_data->getReferenceCount ()", "parent": 220, "children": [222, 227, 228, 229], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 63}}, {"id": 222, "type": "binary_expression", "text": "m_data == nullptr", "parent": 221, "children": [223, 224, 225], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 28}}, {"id": 223, "type": "identifier", "text": "m_data", "parent": 222, "children": [], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 17}}, {"id": 224, "type": "==", "text": "==", "parent": 222, "children": [], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 20}}, {"id": 225, "type": "null", "text": "nullptr", "parent": 222, "children": [226], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 28}}, {"id": 226, "type": "nullptr", "text": "nullptr", "parent": 225, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 28}}, {"id": 227, "type": "?", "text": "?", "parent": 221, "children": [], "start_point": {"row": 136, "column": 29}, "end_point": {"row": 136, "column": 30}}, {"id": 228, "type": "number_literal", "text": "0", "parent": 221, "children": [], "start_point": {"row": 136, "column": 31}, "end_point": {"row": 136, "column": 32}}, {"id": 229, "type": "call_expression", "text": "m_data->getReferenceCount ()", "parent": 221, "children": [230, 233], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 63}}, {"id": 230, "type": "field_expression", "text": "m_data->getReferenceCount", "parent": 229, "children": [231, 232], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 60}}, {"id": 231, "type": "identifier", "text": "m_data", "parent": 230, "children": [], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 41}}, {"id": 232, "type": "field_identifier", "text": "getReferenceCount", "parent": 230, "children": [], "start_point": {"row": 136, "column": 43}, "end_point": {"row": 136, "column": 60}}, {"id": 233, "type": "argument_list", "text": "()", "parent": 229, "children": [], "start_point": {"row": 136, "column": 61}, "end_point": {"row": 136, "column": 63}}, {"id": 234, "type": "ERROR", "text": "SharedTable createCopy () const", "parent": 0, "children": [235, 236], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 33}}, {"id": 235, "type": "type_identifier", "text": "SharedTable", "parent": 234, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 13}}, {"id": 236, "type": "function_declarator", "text": "createCopy ()", "parent": 234, "children": [237, 238], "start_point": {"row": 141, "column": 14}, "end_point": {"row": 141, "column": 27}}, {"id": 237, "type": "identifier", "text": "createCopy", "parent": 236, "children": [], "start_point": {"row": 141, "column": 14}, "end_point": {"row": 141, "column": 24}}, {"id": 238, "type": "parameter_list", "text": "()", "parent": 236, "children": [], "start_point": {"row": 141, "column": 25}, "end_point": {"row": 141, "column": 27}}, {"id": 239, "type": "return_statement", "text": "return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);", "parent": 0, "children": [240], "start_point": {"row": 143, "column": 5}, "end_point": {"row": 143, "column": 72}}, {"id": 240, "type": "call_expression", "text": "SharedTable (m_data != nullptr ? m_data->clone() : nullptr)", "parent": 239, "children": [241, 242], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 71}}, {"id": 241, "type": "identifier", "text": "SharedTable", "parent": 240, "children": [], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 23}}, {"id": 242, "type": "argument_list", "text": "(m_data != nullptr ? m_data->clone() : nullptr)", "parent": 240, "children": [243], "start_point": {"row": 143, "column": 24}, "end_point": {"row": 143, "column": 71}}, {"id": 243, "type": "conditional_expression", "text": "m_data != nullptr ? m_data->clone() : nullptr", "parent": 242, "children": [244, 249, 250, 255], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 70}}, {"id": 244, "type": "binary_expression", "text": "m_data != nullptr", "parent": 243, "children": [245, 246, 247], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 42}}, {"id": 245, "type": "identifier", "text": "m_data", "parent": 244, "children": [], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 31}}, {"id": 246, "type": "!=", "text": "!=", "parent": 244, "children": [], "start_point": {"row": 143, "column": 32}, "end_point": {"row": 143, "column": 34}}, {"id": 247, "type": "null", "text": "nullptr", "parent": 244, "children": [248], "start_point": {"row": 143, "column": 35}, "end_point": {"row": 143, "column": 42}}, {"id": 248, "type": "nullptr", "text": "nullptr", "parent": 247, "children": [], "start_point": {"row": 143, "column": 35}, "end_point": {"row": 143, "column": 42}}, {"id": 249, "type": "?", "text": "?", "parent": 243, "children": [], "start_point": {"row": 143, "column": 43}, "end_point": {"row": 143, "column": 44}}, {"id": 250, "type": "call_expression", "text": "m_data->clone()", "parent": 243, "children": [251, 254], "start_point": {"row": 143, "column": 45}, "end_point": {"row": 143, "column": 60}}, {"id": 251, "type": "field_expression", "text": "m_data->clone", "parent": 250, "children": [252, 253], "start_point": {"row": 143, "column": 45}, "end_point": {"row": 143, "column": 58}}, {"id": 252, "type": "identifier", "text": "m_data", "parent": 251, "children": [], "start_point": {"row": 143, "column": 45}, "end_point": {"row": 143, "column": 51}}, {"id": 253, "type": "field_identifier", "text": "clone", "parent": 251, "children": [], "start_point": {"row": 143, "column": 53}, "end_point": {"row": 143, "column": 58}}, {"id": 254, "type": "argument_list", "text": "()", "parent": 250, "children": [], "start_point": {"row": 143, "column": 58}, "end_point": {"row": 143, "column": 60}}, {"id": 255, "type": "null", "text": "nullptr", "parent": 243, "children": [256], "start_point": {"row": 143, "column": 63}, "end_point": {"row": 143, "column": 70}}, {"id": 256, "type": "nullptr", "text": "nullptr", "parent": 255, "children": [], "start_point": {"row": 143, "column": 63}, "end_point": {"row": 143, "column": 70}}, {"id": 257, "type": "function_definition", "text": "void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }", "parent": 0, "children": [258, 259], "start_point": {"row": 148, "column": 2}, "end_point": {"row": 152, "column": 3}}, {"id": 258, "type": "primitive_type", "text": "void", "parent": 257, "children": [], "start_point": {"row": 148, "column": 2}, "end_point": {"row": 148, "column": 6}}, {"id": 259, "type": "function_declarator", "text": "duplicateIfShared ()", "parent": 257, "children": [260, 261], "start_point": {"row": 148, "column": 7}, "end_point": {"row": 148, "column": 27}}, {"id": 260, "type": "identifier", "text": "duplicateIfShared", "parent": 259, "children": [], "start_point": {"row": 148, "column": 7}, "end_point": {"row": 148, "column": 24}}, {"id": 261, "type": "parameter_list", "text": "()", "parent": 259, "children": [], "start_point": {"row": 148, "column": 25}, "end_point": {"row": 148, "column": 27}}, {"id": 262, "type": "if_statement", "text": "if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();", "parent": 257, "children": [263], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 151, "column": 32}}, {"id": 263, "type": "parenthesized_expression", "text": "(m_data != nullptr && m_data->getReferenceCount() > 1)", "parent": 262, "children": [264], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 61}}, {"id": 264, "type": "binary_expression", "text": "m_data != nullptr && m_data->getReferenceCount() > 1", "parent": 263, "children": [265, 270, 271], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 60}}, {"id": 265, "type": "binary_expression", "text": "m_data != nullptr", "parent": 264, "children": [266, 267, 268], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 25}}, {"id": 266, "type": "identifier", "text": "m_data", "parent": 265, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 14}}, {"id": 267, "type": "!=", "text": "!=", "parent": 265, "children": [], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 17}}, {"id": 268, "type": "null", "text": "nullptr", "parent": 265, "children": [269], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 25}}, {"id": 269, "type": "nullptr", "text": "nullptr", "parent": 268, "children": [], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 25}}, {"id": 270, "type": "&&", "text": "&&", "parent": 264, "children": [], "start_point": {"row": 150, "column": 26}, "end_point": {"row": 150, "column": 28}}, {"id": 271, "type": "binary_expression", "text": "m_data->getReferenceCount() > 1", "parent": 264, "children": [272, 277, 278], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 60}}, {"id": 272, "type": "call_expression", "text": "m_data->getReferenceCount()", "parent": 271, "children": [273, 276], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 56}}, {"id": 273, "type": "field_expression", "text": "m_data->getReferenceCount", "parent": 272, "children": [274, 275], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 54}}, {"id": 274, "type": "identifier", "text": "m_data", "parent": 273, "children": [], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 35}}, {"id": 275, "type": "field_identifier", "text": "getReferenceCount", "parent": 273, "children": [], "start_point": {"row": 150, "column": 37}, "end_point": {"row": 150, "column": 54}}, {"id": 276, "type": "argument_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 150, "column": 54}, "end_point": {"row": 150, "column": 56}}, {"id": 277, "type": ">", "text": ">", "parent": 271, "children": [], "start_point": {"row": 150, "column": 57}, "end_point": {"row": 150, "column": 58}}, {"id": 278, "type": "number_literal", "text": "1", "parent": 271, "children": [], "start_point": {"row": 150, "column": 59}, "end_point": {"row": 150, "column": 60}}, {"id": 279, "type": "assignment_expression", "text": "m_data = m_data->clone ()", "parent": 262, "children": [280, 281, 282], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 31}}, {"id": 280, "type": "identifier", "text": "m_data", "parent": 279, "children": [], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 12}}, {"id": 281, "type": "=", "text": "=", "parent": 279, "children": [], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 14}}, {"id": 282, "type": "call_expression", "text": "m_data->clone ()", "parent": 279, "children": [283, 286], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 31}}, {"id": 283, "type": "field_expression", "text": "m_data->clone", "parent": 282, "children": [284, 285], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 28}}, {"id": 284, "type": "identifier", "text": "m_data", "parent": 283, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 21}}, {"id": 285, "type": "field_identifier", "text": "clone", "parent": 283, "children": [], "start_point": {"row": 151, "column": 23}, "end_point": {"row": 151, "column": 28}}, {"id": 286, "type": "argument_list", "text": "()", "parent": 282, "children": [], "start_point": {"row": 151, "column": 29}, "end_point": {"row": 151, "column": 31}}, {"id": 287, "type": "ERROR", "text": "inline int getNumEntries () const noexcept", "parent": 0, "children": [288, 290, 291, 294], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 156, "column": 44}}, {"id": 288, "type": "storage_class_specifier", "text": "inline", "parent": 287, "children": [289], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 156, "column": 8}}, {"id": 289, "type": "inline", "text": "inline", "parent": 288, "children": [], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 156, "column": 8}}, {"id": 290, "type": "primitive_type", "text": "int", "parent": 287, "children": [], "start_point": {"row": 156, "column": 9}, "end_point": {"row": 156, "column": 12}}, {"id": 291, "type": "function_declarator", "text": "getNumEntries ()", "parent": 287, "children": [292, 293], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 156, "column": 29}}, {"id": 292, "type": "identifier", "text": "getNumEntries", "parent": 291, "children": [], "start_point": {"row": 156, "column": 13}, "end_point": {"row": 156, "column": 26}}, {"id": 293, "type": "parameter_list", "text": "()", "parent": 291, "children": [], "start_point": {"row": 156, "column": 27}, "end_point": {"row": 156, "column": 29}}, {"id": 294, "type": "type_identifier", "text": "noexcept", "parent": 287, "children": [], "start_point": {"row": 156, "column": 36}, "end_point": {"row": 156, "column": 44}}, {"id": 295, "type": "return_statement", "text": "return m_data->getNumEntries ();", "parent": 0, "children": [296], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 36}}, {"id": 296, "type": "call_expression", "text": "m_data->getNumEntries ()", "parent": 295, "children": [297, 300], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 35}}, {"id": 297, "type": "field_expression", "text": "m_data->getNumEntries", "parent": 296, "children": [298, 299], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 32}}, {"id": 298, "type": "identifier", "text": "m_data", "parent": 297, "children": [], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 17}}, {"id": 299, "type": "field_identifier", "text": "getNumEntries", "parent": 297, "children": [], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 32}}, {"id": 300, "type": "argument_list", "text": "()", "parent": 296, "children": [], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 158, "column": 35}}, {"id": 301, "type": "function_definition", "text": "inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (index);\n }", "parent": 0, "children": [302, 304, 305], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 168, "column": 3}}, {"id": 302, "type": "storage_class_specifier", "text": "inline", "parent": 301, "children": [303], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 165, "column": 8}}, {"id": 303, "type": "inline", "text": "inline", "parent": 302, "children": [], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 165, "column": 8}}, {"id": 304, "type": "type_identifier", "text": "ElementType", "parent": 301, "children": [], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 20}}, {"id": 305, "type": "function_declarator", "text": "operator [] (int index) const noexcept", "parent": 301, "children": [306, 308, 312], "start_point": {"row": 165, "column": 22}, "end_point": {"row": 165, "column": 60}}, {"id": 306, "type": "array_declarator", "text": "operator []", "parent": 305, "children": [307], "start_point": {"row": 165, "column": 22}, "end_point": {"row": 165, "column": 33}}, {"id": 307, "type": "identifier", "text": "operator", "parent": 306, "children": [], "start_point": {"row": 165, "column": 22}, "end_point": {"row": 165, "column": 30}}, {"id": 308, "type": "parameter_list", "text": "(int index)", "parent": 305, "children": [309], "start_point": {"row": 165, "column": 34}, "end_point": {"row": 165, "column": 45}}, {"id": 309, "type": "parameter_declaration", "text": "int index", "parent": 308, "children": [310, 311], "start_point": {"row": 165, "column": 35}, "end_point": {"row": 165, "column": 44}}, {"id": 310, "type": "primitive_type", "text": "int", "parent": 309, "children": [], "start_point": {"row": 165, "column": 35}, "end_point": {"row": 165, "column": 38}}, {"id": 311, "type": "identifier", "text": "index", "parent": 309, "children": [], "start_point": {"row": 165, "column": 39}, "end_point": {"row": 165, "column": 44}}, {"id": 312, "type": "identifier", "text": "noexcept", "parent": 305, "children": [], "start_point": {"row": 165, "column": 52}, "end_point": {"row": 165, "column": 60}}, {"id": 313, "type": "return_statement", "text": "return m_data->getReference (index);", "parent": 301, "children": [314], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 40}}, {"id": 314, "type": "call_expression", "text": "m_data->getReference (index)", "parent": 313, "children": [315, 318], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 39}}, {"id": 315, "type": "field_expression", "text": "m_data->getReference", "parent": 314, "children": [316, 317], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 31}}, {"id": 316, "type": "identifier", "text": "m_data", "parent": 315, "children": [], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 17}}, {"id": 317, "type": "field_identifier", "text": "getReference", "parent": 315, "children": [], "start_point": {"row": 167, "column": 19}, "end_point": {"row": 167, "column": 31}}, {"id": 318, "type": "argument_list", "text": "(index)", "parent": 314, "children": [319], "start_point": {"row": 167, "column": 32}, "end_point": {"row": 167, "column": 39}}, {"id": 319, "type": "identifier", "text": "index", "parent": 318, "children": [], "start_point": {"row": 167, "column": 33}, "end_point": {"row": 167, "column": 38}}, {"id": 320, "type": "labeled_statement", "text": "private:\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)\n : m_numEntries (numEntries)\n , m_table (numEntries)", "parent": 0, "children": [321], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 178, "column": 28}}, {"id": 321, "type": "ERROR", "text": ":\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)", "parent": 320, "children": [322, 323, 334, 335], "start_point": {"row": 170, "column": 7}, "end_point": {"row": 176, "column": 34}}, {"id": 322, "type": "identifier", "text": "Data", "parent": 321, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 12}}, {"id": 323, "type": "ERROR", "text": "public ReferenceCountedObject", "parent": 321, "children": [324], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 44}}, {"id": 324, "type": "identifier", "text": "ReferenceCountedObject", "parent": 323, "children": [], "start_point": {"row": 171, "column": 22}, "end_point": {"row": 171, "column": 44}}, {"id": 325, "type": "binary_expression", "text": "public:\n typedef ReferenceCountedObjectPtr <Data> Ptr", "parent": 321, "children": [326, 332, 333], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 174, "column": 48}}, {"id": 326, "type": "binary_expression", "text": "public:\n typedef ReferenceCountedObjectPtr <Data", "parent": 325, "children": [327, 330, 331], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 174, "column": 43}}, {"id": 327, "type": "ERROR", "text": ":\n typedef ReferenceCountedObjectPtr", "parent": 326, "children": [328, 329], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 174, "column": 37}}, {"id": 328, "type": "type_identifier", "text": "typedef", "parent": 327, "children": [], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 174, "column": 11}}, {"id": 329, "type": "identifier", "text": "ReferenceCountedObjectPtr", "parent": 327, "children": [], "start_point": {"row": 174, "column": 12}, "end_point": {"row": 174, "column": 37}}, {"id": 330, "type": "<", "text": "<", "parent": 326, "children": [], "start_point": {"row": 174, "column": 38}, "end_point": {"row": 174, "column": 39}}, {"id": 331, "type": "identifier", "text": "Data", "parent": 326, "children": [], "start_point": {"row": 174, "column": 39}, "end_point": {"row": 174, "column": 43}}, {"id": 332, "type": ">", "text": ">", "parent": 325, "children": [], "start_point": {"row": 174, "column": 43}, "end_point": {"row": 174, "column": 44}}, {"id": 333, "type": "identifier", "text": "Ptr", "parent": 325, "children": [], "start_point": {"row": 174, "column": 45}, "end_point": {"row": 174, "column": 48}}, {"id": 334, "type": "type_identifier", "text": "explicit", "parent": 321, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 12}}, {"id": 335, "type": "function_declarator", "text": "Data (int numEntries)", "parent": 321, "children": [336, 337], "start_point": {"row": 176, "column": 13}, "end_point": {"row": 176, "column": 34}}, {"id": 336, "type": "identifier", "text": "Data", "parent": 335, "children": [], "start_point": {"row": 176, "column": 13}, "end_point": {"row": 176, "column": 17}}, {"id": 337, "type": "parameter_list", "text": "(int numEntries)", "parent": 335, "children": [338], "start_point": {"row": 176, "column": 18}, "end_point": {"row": 176, "column": 34}}, {"id": 338, "type": "parameter_declaration", "text": "int numEntries", "parent": 337, "children": [339, 340], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 33}}, {"id": 339, "type": "primitive_type", "text": "int", "parent": 338, "children": [], "start_point": {"row": 176, "column": 19}, "end_point": {"row": 176, "column": 22}}, {"id": 340, "type": "identifier", "text": "numEntries", "parent": 338, "children": [], "start_point": {"row": 176, "column": 23}, "end_point": {"row": 176, "column": 33}}, {"id": 341, "type": "comma_expression", "text": "m_numEntries (numEntries)\n , m_table (numEntries)", "parent": 320, "children": [342, 346], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 178, "column": 28}}, {"id": 342, "type": "call_expression", "text": "m_numEntries (numEntries)", "parent": 341, "children": [343, 344], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 33}}, {"id": 343, "type": "identifier", "text": "m_numEntries", "parent": 342, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 20}}, {"id": 344, "type": "argument_list", "text": "(numEntries)", "parent": 342, "children": [345], "start_point": {"row": 177, "column": 21}, "end_point": {"row": 177, "column": 33}}, {"id": 345, "type": "identifier", "text": "numEntries", "parent": 344, "children": [], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 32}}, {"id": 346, "type": "call_expression", "text": "m_table (numEntries)", "parent": 341, "children": [347, 348], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 28}}, {"id": 347, "type": "identifier", "text": "m_table", "parent": 346, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 15}}, {"id": 348, "type": "argument_list", "text": "(numEntries)", "parent": 346, "children": [349], "start_point": {"row": 178, "column": 16}, "end_point": {"row": 178, "column": 28}}, {"id": 349, "type": "identifier", "text": "numEntries", "parent": 348, "children": [], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 27}}, {"id": 350, "type": "function_definition", "text": "inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }", "parent": 0, "children": [351, 353, 354], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 192, "column": 5}}, {"id": 351, "type": "storage_class_specifier", "text": "inline", "parent": 350, "children": [352], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 10}}, {"id": 352, "type": "inline", "text": "inline", "parent": 351, "children": [], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 10}}, {"id": 353, "type": "type_identifier", "text": "Data", "parent": 350, "children": [], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 15}}, {"id": 354, "type": "pointer_declarator", "text": "* clone () const", "parent": 350, "children": [355, 356], "start_point": {"row": 182, "column": 15}, "end_point": {"row": 182, "column": 31}}, {"id": 355, "type": "*", "text": "*", "parent": 354, "children": [], "start_point": {"row": 182, "column": 15}, "end_point": {"row": 182, "column": 16}}, {"id": 356, "type": "function_declarator", "text": "clone () const", "parent": 354, "children": [357, 358], "start_point": {"row": 182, "column": 17}, "end_point": {"row": 182, "column": 31}}, {"id": 357, "type": "identifier", "text": "clone", "parent": 356, "children": [], "start_point": {"row": 182, "column": 17}, "end_point": {"row": 182, "column": 22}}, {"id": 358, "type": "parameter_list", "text": "()", "parent": 356, "children": [], "start_point": {"row": 182, "column": 23}, "end_point": {"row": 182, "column": 25}}, {"id": 359, "type": "declaration", "text": "Data* data = new Data (m_numEntries);", "parent": 350, "children": [360, 361], "start_point": {"row": 184, "column": 6}, "end_point": {"row": 184, "column": 43}}, {"id": 360, "type": "type_identifier", "text": "Data", "parent": 359, "children": [], "start_point": {"row": 184, "column": 6}, "end_point": {"row": 184, "column": 10}}, {"id": 361, "type": "init_declarator", "text": "* data = new Data (m_numEntries)", "parent": 359, "children": [362, 365, 366], "start_point": {"row": 184, "column": 10}, "end_point": {"row": 184, "column": 42}}, {"id": 362, "type": "pointer_declarator", "text": "* data", "parent": 361, "children": [363, 364], "start_point": {"row": 184, "column": 10}, "end_point": {"row": 184, "column": 16}}, {"id": 363, "type": "*", "text": "*", "parent": 362, "children": [], "start_point": {"row": 184, "column": 10}, "end_point": {"row": 184, "column": 11}}, {"id": 364, "type": "identifier", "text": "data", "parent": 362, "children": [], "start_point": {"row": 184, "column": 12}, "end_point": {"row": 184, "column": 16}}, {"id": 365, "type": "=", "text": "=", "parent": 361, "children": [], "start_point": {"row": 184, "column": 17}, "end_point": {"row": 184, "column": 18}}, {"id": 366, "type": "call_expression", "text": "Data (m_numEntries)", "parent": 361, "children": [367, 368], "start_point": {"row": 184, "column": 23}, "end_point": {"row": 184, "column": 42}}, {"id": 367, "type": "identifier", "text": "Data", "parent": 366, "children": [], "start_point": {"row": 184, "column": 23}, "end_point": {"row": 184, "column": 27}}, {"id": 368, "type": "argument_list", "text": "(m_numEntries)", "parent": 366, "children": [369], "start_point": {"row": 184, "column": 28}, "end_point": {"row": 184, "column": 42}}, {"id": 369, "type": "identifier", "text": "m_numEntries", "parent": 368, "children": [], "start_point": {"row": 184, "column": 29}, "end_point": {"row": 184, "column": 41}}, {"id": 370, "type": "call_expression", "text": "memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType))", "parent": 350, "children": [371, 372], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 189, "column": 44}}, {"id": 371, "type": "identifier", "text": "memcpy", "parent": 370, "children": [], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 186, "column": 12}}, {"id": 372, "type": "argument_list", "text": "(\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType))", "parent": 370, "children": [373, 380, 385], "start_point": {"row": 186, "column": 13}, "end_point": {"row": 189, "column": 44}}, {"id": 373, "type": "call_expression", "text": "data->m_table.getData ()", "parent": 372, "children": [374, 379], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 32}}, {"id": 374, "type": "field_expression", "text": "data->m_table.getData", "parent": 373, "children": [375, 378], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 29}}, {"id": 375, "type": "field_expression", "text": "data->m_table", "parent": 374, "children": [376, 377], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 21}}, {"id": 376, "type": "identifier", "text": "data", "parent": 375, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 12}}, {"id": 377, "type": "field_identifier", "text": "m_table", "parent": 375, "children": [], "start_point": {"row": 187, "column": 14}, "end_point": {"row": 187, "column": 21}}, {"id": 378, "type": "field_identifier", "text": "getData", "parent": 374, "children": [], "start_point": {"row": 187, "column": 22}, "end_point": {"row": 187, "column": 29}}, {"id": 379, "type": "argument_list", "text": "()", "parent": 373, "children": [], "start_point": {"row": 187, "column": 30}, "end_point": {"row": 187, "column": 32}}, {"id": 380, "type": "call_expression", "text": "m_table.getData ()", "parent": 372, "children": [381, 384], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 26}}, {"id": 381, "type": "field_expression", "text": "m_table.getData", "parent": 380, "children": [382, 383], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 23}}, {"id": 382, "type": "identifier", "text": "m_table", "parent": 381, "children": [], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 15}}, {"id": 383, "type": "field_identifier", "text": "getData", "parent": 381, "children": [], "start_point": {"row": 188, "column": 16}, "end_point": {"row": 188, "column": 23}}, {"id": 384, "type": "argument_list", "text": "()", "parent": 380, "children": [], "start_point": {"row": 188, "column": 24}, "end_point": {"row": 188, "column": 26}}, {"id": 385, "type": "binary_expression", "text": "m_numEntries * sizeof (ElementType)", "parent": 372, "children": [386, 387, 388], "start_point": {"row": 189, "column": 8}, "end_point": {"row": 189, "column": 43}}, {"id": 386, "type": "identifier", "text": "m_numEntries", "parent": 385, "children": [], "start_point": {"row": 189, "column": 8}, "end_point": {"row": 189, "column": 20}}, {"id": 387, "type": "*", "text": "*", "parent": 385, "children": [], "start_point": {"row": 189, "column": 21}, "end_point": {"row": 189, "column": 22}}, {"id": 388, "type": "sizeof_expression", "text": "sizeof (ElementType)", "parent": 385, "children": [389], "start_point": {"row": 189, "column": 23}, "end_point": {"row": 189, "column": 43}}, {"id": 389, "type": "parenthesized_expression", "text": "(ElementType)", "parent": 388, "children": [390], "start_point": {"row": 189, "column": 30}, "end_point": {"row": 189, "column": 43}}, {"id": 390, "type": "identifier", "text": "ElementType", "parent": 389, "children": [], "start_point": {"row": 189, "column": 31}, "end_point": {"row": 189, "column": 42}}, {"id": 391, "type": "return_statement", "text": "return data;", "parent": 350, "children": [392], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 18}}, {"id": 392, "type": "identifier", "text": "data", "parent": 391, "children": [], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 17}}, {"id": 393, "type": "ERROR", "text": "inline int getNumEntries () const", "parent": 0, "children": [394, 396, 397], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 37}}, {"id": 394, "type": "storage_class_specifier", "text": "inline", "parent": 393, "children": [395], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 10}}, {"id": 395, "type": "inline", "text": "inline", "parent": 394, "children": [], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 10}}, {"id": 396, "type": "primitive_type", "text": "int", "parent": 393, "children": [], "start_point": {"row": 194, "column": 11}, "end_point": {"row": 194, "column": 14}}, {"id": 397, "type": "function_declarator", "text": "getNumEntries ()", "parent": 393, "children": [398, 399], "start_point": {"row": 194, "column": 15}, "end_point": {"row": 194, "column": 31}}, {"id": 398, "type": "identifier", "text": "getNumEntries", "parent": 397, "children": [], "start_point": {"row": 194, "column": 15}, "end_point": {"row": 194, "column": 28}}, {"id": 399, "type": "parameter_list", "text": "()", "parent": 397, "children": [], "start_point": {"row": 194, "column": 29}, "end_point": {"row": 194, "column": 31}}, {"id": 400, "type": "return_statement", "text": "return m_numEntries;", "parent": 0, "children": [401], "start_point": {"row": 196, "column": 6}, "end_point": {"row": 196, "column": 26}}, {"id": 401, "type": "identifier", "text": "m_numEntries", "parent": 400, "children": [], "start_point": {"row": 196, "column": 13}, "end_point": {"row": 196, "column": 25}}, {"id": 402, "type": "function_definition", "text": "inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }", "parent": 0, "children": [403, 405, 406], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 203, "column": 5}}, {"id": 403, "type": "storage_class_specifier", "text": "inline", "parent": 402, "children": [404], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 10}}, {"id": 404, "type": "inline", "text": "inline", "parent": 403, "children": [], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 10}}, {"id": 405, "type": "type_identifier", "text": "ElementType", "parent": 402, "children": [], "start_point": {"row": 199, "column": 11}, "end_point": {"row": 199, "column": 22}}, {"id": 406, "type": "function_declarator", "text": "getReference (int index) const", "parent": 402, "children": [407, 408], "start_point": {"row": 199, "column": 24}, "end_point": {"row": 199, "column": 54}}, {"id": 407, "type": "identifier", "text": "getReference", "parent": 406, "children": [], "start_point": {"row": 199, "column": 24}, "end_point": {"row": 199, "column": 36}}, {"id": 408, "type": "parameter_list", "text": "(int index)", "parent": 406, "children": [409], "start_point": {"row": 199, "column": 37}, "end_point": {"row": 199, "column": 48}}, {"id": 409, "type": "parameter_declaration", "text": "int index", "parent": 408, "children": [410, 411], "start_point": {"row": 199, "column": 38}, "end_point": {"row": 199, "column": 47}}, {"id": 410, "type": "primitive_type", "text": "int", "parent": 409, "children": [], "start_point": {"row": 199, "column": 38}, "end_point": {"row": 199, "column": 41}}, {"id": 411, "type": "identifier", "text": "index", "parent": 409, "children": [], "start_point": {"row": 199, "column": 42}, "end_point": {"row": 199, "column": 47}}, {"id": 412, "type": "call_expression", "text": "jassert (index >= 0 && index < m_numEntries)", "parent": 402, "children": [413, 414], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 50}}, {"id": 413, "type": "identifier", "text": "jassert", "parent": 412, "children": [], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 13}}, {"id": 414, "type": "argument_list", "text": "(index >= 0 && index < m_numEntries)", "parent": 412, "children": [415], "start_point": {"row": 201, "column": 14}, "end_point": {"row": 201, "column": 50}}, {"id": 415, "type": "binary_expression", "text": "index >= 0 && index < m_numEntries", "parent": 414, "children": [416, 420, 421], "start_point": {"row": 201, "column": 15}, "end_point": {"row": 201, "column": 49}}, {"id": 416, "type": "binary_expression", "text": "index >= 0", "parent": 415, "children": [417, 418, 419], "start_point": {"row": 201, "column": 15}, "end_point": {"row": 201, "column": 25}}, {"id": 417, "type": "identifier", "text": "index", "parent": 416, "children": [], "start_point": {"row": 201, "column": 15}, "end_point": {"row": 201, "column": 20}}, {"id": 418, "type": ">=", "text": ">=", "parent": 416, "children": [], "start_point": {"row": 201, "column": 21}, "end_point": {"row": 201, "column": 23}}, {"id": 419, "type": "number_literal", "text": "0", "parent": 416, "children": [], "start_point": {"row": 201, "column": 24}, "end_point": {"row": 201, "column": 25}}, {"id": 420, "type": "&&", "text": "&&", "parent": 415, "children": [], "start_point": {"row": 201, "column": 26}, "end_point": {"row": 201, "column": 28}}, {"id": 421, "type": "binary_expression", "text": "index < m_numEntries", "parent": 415, "children": [422, 423, 424], "start_point": {"row": 201, "column": 29}, "end_point": {"row": 201, "column": 49}}, {"id": 422, "type": "identifier", "text": "index", "parent": 421, "children": [], "start_point": {"row": 201, "column": 29}, "end_point": {"row": 201, "column": 34}}, {"id": 423, "type": "<", "text": "<", "parent": 421, "children": [], "start_point": {"row": 201, "column": 35}, "end_point": {"row": 201, "column": 36}}, {"id": 424, "type": "identifier", "text": "m_numEntries", "parent": 421, "children": [], "start_point": {"row": 201, "column": 37}, "end_point": {"row": 201, "column": 49}}, {"id": 425, "type": "return_statement", "text": "return m_table [index];", "parent": 402, "children": [426], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 29}}, {"id": 426, "type": "subscript_expression", "text": "m_table [index]", "parent": 425, "children": [427, 428], "start_point": {"row": 202, "column": 13}, "end_point": {"row": 202, "column": 28}}, {"id": 427, "type": "identifier", "text": "m_table", "parent": 426, "children": [], "start_point": {"row": 202, "column": 13}, "end_point": {"row": 202, "column": 20}}, {"id": 428, "type": "identifier", "text": "index", "parent": 426, "children": [], "start_point": {"row": 202, "column": 22}, "end_point": {"row": 202, "column": 27}}, {"id": 429, "type": "labeled_statement", "text": "private:\n int const m_numEntries;", "parent": 0, "children": [430], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 206, "column": 27}}, {"id": 430, "type": "declaration", "text": "int const m_numEntries;", "parent": 429, "children": [431, 432], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 27}}, {"id": 431, "type": "primitive_type", "text": "int", "parent": 430, "children": [], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 7}}, {"id": 432, "type": "identifier", "text": "m_numEntries", "parent": 430, "children": [], "start_point": {"row": 206, "column": 14}, "end_point": {"row": 206, "column": 26}}, {"id": 433, "type": "binary_expression", "text": "HeapBlock <ElementType> const m_table", "parent": 0, "children": [434, 438, 439], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 41}}, {"id": 434, "type": "binary_expression", "text": "HeapBlock <ElementType", "parent": 433, "children": [435, 436, 437], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 26}}, {"id": 435, "type": "identifier", "text": "HeapBlock", "parent": 434, "children": [], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 13}}, {"id": 436, "type": "<", "text": "<", "parent": 434, "children": [], "start_point": {"row": 207, "column": 14}, "end_point": {"row": 207, "column": 15}}, {"id": 437, "type": "identifier", "text": "ElementType", "parent": 434, "children": [], "start_point": {"row": 207, "column": 15}, "end_point": {"row": 207, "column": 26}}, {"id": 438, "type": ">", "text": ">", "parent": 433, "children": [], "start_point": {"row": 207, "column": 26}, "end_point": {"row": 207, "column": 27}}, {"id": 439, "type": "identifier", "text": "m_table", "parent": 433, "children": [], "start_point": {"row": 207, "column": 34}, "end_point": {"row": 207, "column": 41}}, {"id": 440, "type": "function_definition", "text": "explicit SharedTable (Data* data)\n : m_data (data)\n {\n }", "parent": 0, "children": [441, 442], "start_point": {"row": 210, "column": 2}, "end_point": {"row": 213, "column": 3}}, {"id": 441, "type": "type_identifier", "text": "explicit", "parent": 440, "children": [], "start_point": {"row": 210, "column": 2}, "end_point": {"row": 210, "column": 10}}, {"id": 442, "type": "function_declarator", "text": "SharedTable (Data* data)\n : m_data (data)", "parent": 440, "children": [443, 444, 450], "start_point": {"row": 210, "column": 11}, "end_point": {"row": 211, "column": 19}}, {"id": 443, "type": "identifier", "text": "SharedTable", "parent": 442, "children": [], "start_point": {"row": 210, "column": 11}, "end_point": {"row": 210, "column": 22}}, {"id": 444, "type": "parameter_list", "text": "(Data* data)", "parent": 442, "children": [445], "start_point": {"row": 210, "column": 23}, "end_point": {"row": 210, "column": 35}}, {"id": 445, "type": "parameter_declaration", "text": "Data* data", "parent": 444, "children": [446, 447], "start_point": {"row": 210, "column": 24}, "end_point": {"row": 210, "column": 34}}, {"id": 446, "type": "type_identifier", "text": "Data", "parent": 445, "children": [], "start_point": {"row": 210, "column": 24}, "end_point": {"row": 210, "column": 28}}, {"id": 447, "type": "pointer_declarator", "text": "* data", "parent": 445, "children": [448, 449], "start_point": {"row": 210, "column": 28}, "end_point": {"row": 210, "column": 34}}, {"id": 448, "type": "*", "text": "*", "parent": 447, "children": [], "start_point": {"row": 210, "column": 28}, "end_point": {"row": 210, "column": 29}}, {"id": 449, "type": "identifier", "text": "data", "parent": 447, "children": [], "start_point": {"row": 210, "column": 30}, "end_point": {"row": 210, "column": 34}}, {"id": 450, "type": "call_expression", "text": "m_data (data)", "parent": 442, "children": [451, 452], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 19}}, {"id": 451, "type": "identifier", "text": "m_data", "parent": 450, "children": [], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 12}}, {"id": 452, "type": "argument_list", "text": "(data)", "parent": 450, "children": [453], "start_point": {"row": 211, "column": 13}, "end_point": {"row": 211, "column": 19}}, {"id": 453, "type": "identifier", "text": "data", "parent": 452, "children": [], "start_point": {"row": 211, "column": 14}, "end_point": {"row": 211, "column": 18}}, {"id": 454, "type": "binary_expression", "text": "ReferenceCountedObjectPtr <Data> m_data", "parent": 0, "children": [455, 459, 460], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 41}}, {"id": 455, "type": "binary_expression", "text": "ReferenceCountedObjectPtr <Data", "parent": 454, "children": [456, 457, 458], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 33}}, {"id": 456, "type": "identifier", "text": "ReferenceCountedObjectPtr", "parent": 455, "children": [], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 27}}, {"id": 457, "type": "<", "text": "<", "parent": 455, "children": [], "start_point": {"row": 215, "column": 28}, "end_point": {"row": 215, "column": 29}}, {"id": 458, "type": "identifier", "text": "Data", "parent": 455, "children": [], "start_point": {"row": 215, "column": 29}, "end_point": {"row": 215, "column": 33}}, {"id": 459, "type": ">", "text": ">", "parent": 454, "children": [], "start_point": {"row": 215, "column": 33}, "end_point": {"row": 215, "column": 34}}, {"id": 460, "type": "identifier", "text": "m_data", "parent": 454, "children": [], "start_point": {"row": 215, "column": 35}, "end_point": {"row": 215, "column": 41}}, {"id": 461, "type": "binary_expression", "text": "template <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null", "parent": 0, "children": [462, 478, 479], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 219, "column": 63}}, {"id": 462, "type": "binary_expression", "text": "template <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType", "parent": 461, "children": [463, 476, 477], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 219, "column": 56}}, {"id": 463, "type": "binary_expression", "text": "template <class ElementType>\nSharedTable <ElementType> const SharedTable", "parent": 462, "children": [464, 474, 475], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 219, "column": 43}}, {"id": 464, "type": "binary_expression", "text": "template <class ElementType>\nSharedTable <ElementType", "parent": 463, "children": [465, 472, 473], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 219, "column": 24}}, {"id": 465, "type": "binary_expression", "text": "template <class ElementType>\nSharedTable", "parent": 464, "children": [466, 470, 471], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 219, "column": 11}}, {"id": 466, "type": "binary_expression", "text": "template <class ElementType", "parent": 465, "children": [467, 468, 469], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 218, "column": 27}}, {"id": 467, "type": "identifier", "text": "template", "parent": 466, "children": [], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 218, "column": 8}}, {"id": 468, "type": "<", "text": "<", "parent": 466, "children": [], "start_point": {"row": 218, "column": 9}, "end_point": {"row": 218, "column": 10}}, {"id": 469, "type": "identifier", "text": "ElementType", "parent": 466, "children": [], "start_point": {"row": 218, "column": 16}, "end_point": {"row": 218, "column": 27}}, {"id": 470, "type": ">", "text": ">", "parent": 465, "children": [], "start_point": {"row": 218, "column": 27}, "end_point": {"row": 218, "column": 28}}, {"id": 471, "type": "identifier", "text": "SharedTable", "parent": 465, "children": [], "start_point": {"row": 219, "column": 0}, "end_point": {"row": 219, "column": 11}}, {"id": 472, "type": "<", "text": "<", "parent": 464, "children": [], "start_point": {"row": 219, "column": 12}, "end_point": {"row": 219, "column": 13}}, {"id": 473, "type": "identifier", "text": "ElementType", "parent": 464, "children": [], "start_point": {"row": 219, "column": 13}, "end_point": {"row": 219, "column": 24}}, {"id": 474, "type": ">", "text": ">", "parent": 463, "children": [], "start_point": {"row": 219, "column": 24}, "end_point": {"row": 219, "column": 25}}, {"id": 475, "type": "identifier", "text": "SharedTable", "parent": 463, "children": [], "start_point": {"row": 219, "column": 32}, "end_point": {"row": 219, "column": 43}}, {"id": 476, "type": "<", "text": "<", "parent": 462, "children": [], "start_point": {"row": 219, "column": 44}, "end_point": {"row": 219, "column": 45}}, {"id": 477, "type": "identifier", "text": "ElementType", "parent": 462, "children": [], "start_point": {"row": 219, "column": 45}, "end_point": {"row": 219, "column": 56}}, {"id": 478, "type": ">", "text": ">", "parent": 461, "children": [], "start_point": {"row": 219, "column": 56}, "end_point": {"row": 219, "column": 57}}, {"id": 479, "type": "identifier", "text": "null", "parent": 461, "children": [], "start_point": {"row": 219, "column": 59}, "end_point": {"row": 219, "column": 63}}, {"id": 480, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 221, "column": 0}, "end_point": {"row": 221, "column": 6}}]}, "node_categories": {"declarations": {"functions": [30, 32, 45, 52, 150, 152, 168, 170, 190, 204, 216, 236, 257, 259, 291, 301, 305, 335, 350, 356, 397, 402, 406, 440, 442], "variables": [15, 20, 35, 55, 157, 175, 309, 338, 359, 409, 430, 445], "classes": [187, 201, 288, 302, 351, 394, 403], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [7, 8, 27, 38, 41, 58, 63, 73, 77, 84, 87, 93, 96, 97, 106, 107, 111, 116, 117, 125, 131, 136, 137, 141, 145, 147, 162, 165, 180, 183, 195, 209, 222, 229, 230, 240, 244, 250, 251, 263, 264, 265, 271, 272, 273, 282, 283, 296, 297, 314, 315, 325, 326, 341, 342, 346, 366, 370, 373, 374, 375, 380, 381, 385, 388, 389, 412, 415, 416, 421, 426, 433, 434, 450, 454, 455, 461, 462, 463, 464, 465, 466], "assignments": [60, 70, 113, 122, 279], "loops": [], "conditionals": [0, 1, 2, 5, 9, 11, 13, 16, 17, 19, 21, 24, 26, 28, 31, 33, 37, 39, 42, 44, 46, 47, 49, 51, 53, 56, 57, 59, 61, 66, 68, 71, 74, 75, 79, 80, 81, 82, 85, 88, 90, 92, 94, 98, 100, 102, 103, 108, 109, 112, 114, 118, 120, 121, 123, 126, 128, 130, 132, 138, 139, 143, 144, 148, 153, 158, 159, 160, 163, 166, 167, 171, 176, 177, 178, 181, 184, 185, 191, 193, 196, 205, 207, 210, 217, 219, 221, 223, 231, 232, 235, 237, 241, 243, 245, 252, 253, 260, 262, 266, 274, 275, 280, 284, 285, 292, 294, 298, 299, 304, 307, 311, 312, 316, 317, 319, 322, 324, 328, 329, 331, 333, 334, 336, 340, 343, 345, 347, 349, 353, 357, 360, 364, 367, 369, 371, 376, 377, 378, 382, 383, 386, 390, 392, 398, 401, 405, 407, 411, 413, 417, 422, 424, 427, 428, 432, 435, 437, 439, 441, 443, 446, 449, 451, 453, 456, 458, 460, 467, 469, 471, 473, 475, 477, 479, 480], "returns": [76, 140, 161, 179, 194, 208, 220, 239, 295, 313, 391, 400, 425], "exceptions": []}, "expressions": {"calls": [], "literals": [228, 278, 419], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "SharedTable (int numEntries)\n : m_data (new Data (numEntries))"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "m_data (other.m_data)"}, {"node_id": 150, "universal_type": "function", "name": "operator==", "text_snippet": "bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "operator== (SharedTable const& other) const noexcept"}, {"node_id": 168, "universal_type": "function", "name": "operator!=", "text_snippet": "bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }"}, {"node_id": 170, "universal_type": "function", "name": "unknown", "text_snippet": "operator!= (SharedTable const& other) const noexcept"}, {"node_id": 190, "universal_type": "function", "name": "unknown", "text_snippet": "isValid ()"}, {"node_id": 204, "universal_type": "function", "name": "unknown", "text_snippet": "isNull ()"}, {"node_id": 216, "universal_type": "function", "name": "unknown", "text_snippet": "getReferenceCount ()"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "createCopy ()"}, {"node_id": 257, "universal_type": "function", "name": "duplicateIfShared", "text_snippet": "void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_"}, {"node_id": 259, "universal_type": "function", "name": "unknown", "text_snippet": "duplicateIfShared ()"}, {"node_id": 291, "universal_type": "function", "name": "unknown", "text_snippet": "getNumEntries ()"}, {"node_id": 301, "universal_type": "function", "name": "unknown", "text_snippet": "inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (inde"}, {"node_id": 305, "universal_type": "function", "name": "unknown", "text_snippet": "operator [] (int index) const noexcept"}, {"node_id": 335, "universal_type": "function", "name": "unknown", "text_snippet": "Data (int numEntries)"}, {"node_id": 350, "universal_type": "function", "name": "unknown", "text_snippet": "inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n "}, {"node_id": 356, "universal_type": "function", "name": "unknown", "text_snippet": "clone () const"}, {"node_id": 397, "universal_type": "function", "name": "unknown", "text_snippet": "getNumEntries ()"}, {"node_id": 402, "universal_type": "function", "name": "unknown", "text_snippet": "inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numE"}, {"node_id": 406, "universal_type": "function", "name": "unknown", "text_snippet": "getReference (int index) const"}, {"node_id": 440, "universal_type": "function", "name": "unknown", "text_snippet": "explicit SharedTable (Data* data)\n : m_data (data)\n {\n }"}, {"node_id": 442, "universal_type": "function", "name": "unknown", "text_snippet": "SharedTable (Data* data)\n : m_data (data)"}], "class_declarations": [{"node_id": 187, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 201, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 288, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 302, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 351, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 394, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 403, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": []}, "original_source_code": "/*============================================================================*/\n/*\n VFLib: https://github.com/vinniefalco/VFLib\n\n Copyright (C) 2008 by <NAME> <<EMAIL>>\n\n This library contains portions of other open source products covered by\n separate licenses. Please see the corresponding source files for specific\n terms.\n \n VFLib is provided under the terms of The MIT License (MIT):\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n IN THE SOFTWARE.\n*/\n/*============================================================================*/\n\n#ifndef VF_SHAREDTABLE_VFHEADER\n#define VF_SHAREDTABLE_VFHEADER\n\n/** Handle to a reference counted fixed size table.\n\n @note Currently, ElementType must be an aggregate of POD.\n\n @tparam ElementType The type of element.\n \n @ingroup vf_gui\n*/\ntemplate <class ElementType>\nclass SharedTable\n{\npublic:\n typedef ElementType Entry;\n\n static SharedTable <ElementType> const null;\n\n /** Creates a null table.\n */\n SharedTable ()\n {\n }\n\n /** Creates a table with the specified number of entries.\n\n The entries are uninitialized.\n\n @param numEntries The number of entries in the table.\n\n @todo Initialize the data if ElementType is not POD.\n */\n explicit SharedTable (int numEntries)\n : m_data (new Data (numEntries))\n {\n }\n\n /** Creates a shared reference to another table.\n */\n SharedTable (SharedTable const& other)\n : m_data (other.m_data)\n {\n }\n\n /** Makes this table refer to another table.\n */\n SharedTable& operator= (SharedTable const& other)\n {\n m_data = other.m_data;\n return *this;\n }\n\n#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS\n SharedTable (SharedTable&& other) noexcept\n : m_data (static_cast <typename Data::Ptr&&> (other.m_data))\n {\n }\n\n SharedTable& operator= (SharedTable&& other) noexcept\n {\n m_data = static_cast <typename Data::Ptr&&> (other.m_data);\n return *this;\n }\n#endif\n\n /** Destructor.\n */\n ~SharedTable ()\n {\n }\n\n /** Returns true if the two tables share the same set of entries.\n */\n bool operator== (SharedTable const& other) const noexcept\n {\n return m_data == other.m_data;\n }\n\n /** Returns true if the two tables do not share the same set of entries.\n */\n bool operator!= (SharedTable const& other) const noexcept\n {\n return m_data != other.m_data;\n }\n\n /** Returns true if the table is not null.\n */\n inline bool isValid () const noexcept\n {\n return m_data != nullptr;\n }\n\n /** Returns true if the table is null.\n */\n inline bool isNull () const noexcept\n {\n return m_data == nullptr;\n }\n\n /** Returns the number of tables referring to the same shared entries.\n */\n int getReferenceCount () const noexcept\n {\n return m_data == nullptr ? 0 : m_data->getReferenceCount ();\n }\n\n /** Create a physical duplicate of the table.\n */\n SharedTable createCopy () const\n {\n return SharedTable (m_data != nullptr ? m_data->clone() : nullptr);\n }\n\n /** Makes sure no other tables share the same entries as this table.\n */\n void duplicateIfShared ()\n {\n if (m_data != nullptr && m_data->getReferenceCount() > 1)\n m_data = m_data->clone ();\n }\n\n /** Return the number of entries in this table.\n */\n inline int getNumEntries () const noexcept\n {\n return m_data->getNumEntries ();\n }\n\n /** Retrieve a table entry.\n\n @param index The index of the entry, from 0 to getNumEntries ().\n */\n inline ElementType& operator [] (int index) const noexcept\n {\n return m_data->getReference (index);\n }\n\nprivate:\n class Data : public ReferenceCountedObject\n {\n public:\n typedef ReferenceCountedObjectPtr <Data> Ptr;\n\n explicit Data (int numEntries)\n : m_numEntries (numEntries)\n , m_table (numEntries)\n {\n }\n\n inline Data* clone () const\n {\n Data* data = new Data (m_numEntries);\n\n memcpy (\n data->m_table.getData (),\n m_table.getData (),\n m_numEntries * sizeof (ElementType));\n\n return data;\n }\n\n inline int getNumEntries () const\n {\n return m_numEntries;\n }\n\n inline ElementType& getReference (int index) const\n {\n jassert (index >= 0 && index < m_numEntries);\n return m_table [index];\n }\n\n private:\n int const m_numEntries;\n HeapBlock <ElementType> const m_table;\n };\n\n explicit SharedTable (Data* data)\n : m_data (data)\n {\n }\n\n ReferenceCountedObjectPtr <Data> m_data;\n};\n\ntemplate <class ElementType>\nSharedTable <ElementType> const SharedTable <ElementType>::null;\n\n#endif\n\n//------------------------------------------------------------------------------\n\n"}
217
c
#pragma once #include "../Common/Common.h" namespace SerializeStruct { enum class ObjectType : uint8_t { JsonObject = 0, JsonArray = 1, String = 2, False = 3, True = 4, Null= 5, Int = 6, Float = 7 }; struct JsonObjectHeader { uint64 keyValueCount; }; struct JsonArrayHeader { uint64 elementCount; }; struct StringHeader { uint64 stringLength; }; }
12.64
28
(translation_unit) "#pragma once\n#include "../Common/Common.h"\nnamespace SerializeStruct\n{\n enum class ObjectType : uint8_t\n {\n JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7\n };\n struct JsonObjectHeader\n {\n uint64 keyValueCount;\n };\n struct JsonArrayHeader\n {\n uint64 elementCount;\n };\n struct StringHeader\n {\n uint64 stringLength;\n };\n}" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "../Common/Common.h"\n" (#include) "#include" (string_literal) ""../Common/Common.h"" (") """ (string_content) "../Common/Common.h" (") """ (function_definition) "namespace SerializeStruct\n{\n enum class ObjectType : uint8_t\n {\n JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7\n };\n struct JsonObjectHeader\n {\n uint64 keyValueCount;\n };\n struct JsonArrayHeader\n {\n uint64 elementCount;\n };\n struct StringHeader\n {\n uint64 stringLength;\n };\n}" (type_identifier) "namespace" (identifier) "SerializeStruct" (compound_statement) "{\n enum class ObjectType : uint8_t\n {\n JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7\n };\n struct JsonObjectHeader\n {\n uint64 keyValueCount;\n };\n struct JsonArrayHeader\n {\n uint64 elementCount;\n };\n struct StringHeader\n {\n uint64 stringLength;\n };\n}" ({) "{" (function_definition) "enum class ObjectType : uint8_t\n {\n JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7\n }" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "ObjectType" (ERROR) ": uint8_t" (:) ":" (primitive_type) "uint8_t" (compound_statement) "{\n JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7\n }" ({) "{" (expression_statement) "JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7" (comma_expression) "JsonObject = 0,\n JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7" (assignment_expression) "JsonObject = 0" (identifier) "JsonObject" (=) "=" (number_literal) "0" (,) "," (comma_expression) "JsonArray = 1,\n String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7" (assignment_expression) "JsonArray = 1" (identifier) "JsonArray" (=) "=" (number_literal) "1" (,) "," (comma_expression) "String = 2,\n False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7" (assignment_expression) "String = 2" (identifier) "String" (=) "=" (number_literal) "2" (,) "," (comma_expression) "False = 3,\n True = 4,\n Null= 5,\n Int = 6,\n Float = 7" (assignment_expression) "False = 3" (identifier) "False" (=) "=" (number_literal) "3" (,) "," (comma_expression) "True = 4,\n Null= 5,\n Int = 6,\n Float = 7" (assignment_expression) "True = 4" (identifier) "True" (=) "=" (number_literal) "4" (,) "," (comma_expression) "Null= 5,\n Int = 6,\n Float = 7" (assignment_expression) "Null= 5" (identifier) "Null" (=) "=" (number_literal) "5" (,) "," (comma_expression) "Int = 6,\n Float = 7" (assignment_expression) "Int = 6" (identifier) "Int" (=) "=" (number_literal) "6" (,) "," (assignment_expression) "Float = 7" (identifier) "Float" (=) "=" (number_literal) "7" (;) "" (}) "}" (expression_statement) ";" (;) ";" (struct_specifier) "struct JsonObjectHeader\n {\n uint64 keyValueCount;\n }" (struct) "struct" (type_identifier) "JsonObjectHeader" (field_declaration_list) "{\n uint64 keyValueCount;\n }" ({) "{" (field_declaration) "uint64 keyValueCount;" (type_identifier) "uint64" (field_identifier) "keyValueCount" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct JsonArrayHeader\n {\n uint64 elementCount;\n }" (struct) "struct" (type_identifier) "JsonArrayHeader" (field_declaration_list) "{\n uint64 elementCount;\n }" ({) "{" (field_declaration) "uint64 elementCount;" (type_identifier) "uint64" (field_identifier) "elementCount" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct StringHeader\n {\n uint64 stringLength;\n }" (struct) "struct" (type_identifier) "StringHeader" (field_declaration_list) "{\n uint64 stringLength;\n }" ({) "{" (field_declaration) "uint64 stringLength;" (type_identifier) "uint64" (field_identifier) "stringLength" (;) ";" (}) "}" (;) ";" (}) "}"
110
1
{"language": "c", "success": true, "metadata": {"lines": 28, "avg_line_length": 12.64, "nodes": 72, "errors": 0, "source_hash": "2ea1146f91fb7f54f323bca1407cac15a507d66e596bb56992f9ce5f40e42e76", "categorized_nodes": 60}, "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 \"../Common/Common.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": "\"../Common/Common.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 29}}, {"id": 6, "type": "function_definition", "text": "namespace SerializeStruct\n{\n\tenum class ObjectType : uint8_t\n\t{\n\t\tJsonObject = 0,\n\t\tJsonArray = 1,\n\t\tString = 2,\n\t\tFalse = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7\n\t};\n\tstruct JsonObjectHeader\n\t{\n\t\tuint64 keyValueCount;\n\t};\n\tstruct JsonArrayHeader\n\t{\n\t\tuint64 elementCount;\n\t};\n\tstruct StringHeader\n\t{\n\t\tuint64 stringLength;\n\t};\n}", "parent": null, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 9}}, {"id": 8, "type": "identifier", "text": "SerializeStruct", "parent": 6, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 25}}, {"id": 9, "type": "function_definition", "text": "enum class ObjectType : uint8_t\n\t{\n\t\tJsonObject = 0,\n\t\tJsonArray = 1,\n\t\tString = 2,\n\t\tFalse = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7\n\t}", "parent": 6, "children": [10, 12, 13], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 14, "column": 2}}, {"id": 10, "type": "enum_specifier", "text": "enum class", "parent": 9, "children": [11], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 11}}, {"id": 11, "type": "enum", "text": "enum", "parent": 10, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 5}}, {"id": 12, "type": "identifier", "text": "ObjectType", "parent": 9, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 22}}, {"id": 13, "type": "ERROR", "text": ": uint8_t", "parent": 9, "children": [14], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 32}}, {"id": 14, "type": "primitive_type", "text": "uint8_t", "parent": 13, "children": [], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 4, "column": 32}}, {"id": 15, "type": "comma_expression", "text": "JsonObject = 0,\n\t\tJsonArray = 1,\n\t\tString = 2,\n\t\tFalse = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7", "parent": 9, "children": [16, 20], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 16, "type": "assignment_expression", "text": "JsonObject = 0", "parent": 15, "children": [17, 18, 19], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 16}}, {"id": 17, "type": "identifier", "text": "JsonObject", "parent": 16, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 12}}, {"id": 18, "type": "=", "text": "=", "parent": 16, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 14}}, {"id": 19, "type": "number_literal", "text": "0", "parent": 16, "children": [], "start_point": {"row": 6, "column": 15}, "end_point": {"row": 6, "column": 16}}, {"id": 20, "type": "comma_expression", "text": "JsonArray = 1,\n\t\tString = 2,\n\t\tFalse = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7", "parent": 15, "children": [21, 25], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 21, "type": "assignment_expression", "text": "JsonArray = 1", "parent": 20, "children": [22, 23, 24], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 15}}, {"id": 22, "type": "identifier", "text": "JsonArray", "parent": 21, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 11}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 13}}, {"id": 24, "type": "number_literal", "text": "1", "parent": 21, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 15}}, {"id": 25, "type": "comma_expression", "text": "String = 2,\n\t\tFalse = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7", "parent": 20, "children": [26, 30], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 26, "type": "assignment_expression", "text": "String = 2", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 12}}, {"id": 27, "type": "identifier", "text": "String", "parent": 26, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 8}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 10}}, {"id": 29, "type": "number_literal", "text": "2", "parent": 26, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 12}}, {"id": 30, "type": "comma_expression", "text": "False = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7", "parent": 25, "children": [31, 35], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 31, "type": "assignment_expression", "text": "False = 3", "parent": 30, "children": [32, 33, 34], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 11}}, {"id": 32, "type": "identifier", "text": "False", "parent": 31, "children": [], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 7}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 9}}, {"id": 34, "type": "number_literal", "text": "3", "parent": 31, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 11}}, {"id": 35, "type": "comma_expression", "text": "True = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7", "parent": 30, "children": [36, 40], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 36, "type": "assignment_expression", "text": "True = 4", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 10}}, {"id": 37, "type": "identifier", "text": "True", "parent": 36, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 6}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 8}}, {"id": 39, "type": "number_literal", "text": "4", "parent": 36, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 10}}, {"id": 40, "type": "comma_expression", "text": "Null= 5,\n\t\tInt = 6,\n\t\tFloat = 7", "parent": 35, "children": [41, 45], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 41, "type": "assignment_expression", "text": "Null= 5", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 9}}, {"id": 42, "type": "identifier", "text": "Null", "parent": 41, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 6}}, {"id": 43, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 7}}, {"id": 44, "type": "number_literal", "text": "5", "parent": 41, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 45, "type": "comma_expression", "text": "Int = 6,\n\t\tFloat = 7", "parent": 40, "children": [46, 50], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 46, "type": "assignment_expression", "text": "Int = 6", "parent": 45, "children": [47, 48, 49], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 9}}, {"id": 47, "type": "identifier", "text": "Int", "parent": 46, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 5}}, {"id": 48, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 7}}, {"id": 49, "type": "number_literal", "text": "6", "parent": 46, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 9}}, {"id": 50, "type": "assignment_expression", "text": "Float = 7", "parent": 45, "children": [51, 52, 53], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 11}}, {"id": 51, "type": "identifier", "text": "Float", "parent": 50, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 7}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}, {"id": 53, "type": "number_literal", "text": "7", "parent": 50, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 11}}, {"id": 54, "type": "struct_specifier", "text": "struct JsonObjectHeader\n\t{\n\t\tuint64 keyValueCount;\n\t}", "parent": 6, "children": [55, 56], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 18, "column": 2}}, {"id": 55, "type": "struct", "text": "struct", "parent": 54, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 7}}, {"id": 56, "type": "type_identifier", "text": "JsonObjectHeader", "parent": 54, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 24}}, {"id": 57, "type": "field_declaration", "text": "uint64 keyValueCount;", "parent": 54, "children": [58, 59], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 23}}, {"id": 58, "type": "type_identifier", "text": "uint64", "parent": 57, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 8}}, {"id": 59, "type": "field_identifier", "text": "keyValueCount", "parent": 57, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 22}}, {"id": 60, "type": "struct_specifier", "text": "struct JsonArrayHeader\n\t{\n\t\tuint64 elementCount;\n\t}", "parent": 6, "children": [61, 62], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 22, "column": 2}}, {"id": 61, "type": "struct", "text": "struct", "parent": 60, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 7}}, {"id": 62, "type": "type_identifier", "text": "JsonArrayHeader", "parent": 60, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 23}}, {"id": 63, "type": "field_declaration", "text": "uint64 elementCount;", "parent": 60, "children": [64, 65], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 22}}, {"id": 64, "type": "type_identifier", "text": "uint64", "parent": 63, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 8}}, {"id": 65, "type": "field_identifier", "text": "elementCount", "parent": 63, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 21}}, {"id": 66, "type": "struct_specifier", "text": "struct StringHeader\n\t{\n\t\tuint64 stringLength;\n\t}", "parent": 6, "children": [67, 68], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 26, "column": 2}}, {"id": 67, "type": "struct", "text": "struct", "parent": 66, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 7}}, {"id": 68, "type": "type_identifier", "text": "StringHeader", "parent": 66, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 20}}, {"id": 69, "type": "field_declaration", "text": "uint64 stringLength;", "parent": 66, "children": [70, 71], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 22}}, {"id": 70, "type": "type_identifier", "text": "uint64", "parent": 69, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 8}}, {"id": 71, "type": "field_identifier", "text": "stringLength", "parent": 69, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 21}}]}, "node_categories": {"declarations": {"functions": [6, 9], "variables": [57, 63, 69], "classes": [54, 55, 60, 61, 66, 67], "imports": [3, 4], "modules": [], "enums": [10, 11]}, "statements": {"expressions": [15, 20, 25, 30, 35, 40, 45], "assignments": [16, 21, 26, 31, 36, 41, 46, 50], "loops": [], "conditionals": [7, 8, 12, 17, 22, 27, 32, 37, 42, 47, 51, 56, 58, 59, 62, 64, 65, 68, 70, 71], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 19, 24, 29, 34, 39, 44, 49, 53], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "ObjectType", "text_snippet": "namespace SerializeStruct\n{\n\tenum class ObjectType : uint8_t\n\t{\n\t\tJsonObject = 0,\n\t\tJsonArray = 1,\n\t"}, {"node_id": 9, "universal_type": "function", "name": "ObjectType", "text_snippet": "enum class ObjectType : uint8_t\n\t{\n\t\tJsonObject = 0,\n\t\tJsonArray = 1,\n\t\tString = 2,\n\t\tFalse = 3,\n\t\tT"}], "class_declarations": [{"node_id": 54, "universal_type": "class", "name": "JsonObjectHeader", "text_snippet": "struct JsonObjectHeader\n\t{\n\t\tuint64 keyValueCount;\n\t}"}, {"node_id": 55, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 60, "universal_type": "class", "name": "JsonArrayHeader", "text_snippet": "struct JsonArrayHeader\n\t{\n\t\tuint64 elementCount;\n\t}"}, {"node_id": 61, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 66, "universal_type": "class", "name": "StringHeader", "text_snippet": "struct StringHeader\n\t{\n\t\tuint64 stringLength;\n\t}"}, {"node_id": 67, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"../Common/Common.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n#include \"../Common/Common.h\"\nnamespace SerializeStruct\n{\n\tenum class ObjectType : uint8_t\n\t{\n\t\tJsonObject = 0,\n\t\tJsonArray = 1,\n\t\tString = 2,\n\t\tFalse = 3,\n\t\tTrue = 4,\n\t\tNull= 5,\n\t\tInt = 6,\n\t\tFloat = 7\n\t};\n\tstruct JsonObjectHeader\n\t{\n\t\tuint64 keyValueCount;\n\t};\n\tstruct JsonArrayHeader\n\t{\n\t\tuint64 elementCount;\n\t};\n\tstruct StringHeader\n\t{\n\t\tuint64 stringLength;\n\t};\n}"}
218
c
#include "FreeRTOS.h" #include "task.h" // SSD2119 Display and Touch Drivers #include "SSD2119_Display.h" #include "SSD2119_Touch.h" // header file specific to task 2 #include "task2.h" #define SET 1U #define RESET 0U // Flags for the buttons and the timer int pedestrian_pressed = RESET; int onoff_pressed = RESET; int time_expired = RESET; // light_tick is global because FSM() needs to reset the timer when an input // results in a transition static int curr_light_tick_time = 0; static int prev_light_tick_time = 0; // ped_tick global because FSM() needs to reset this timer to ensure that // the pedestrian button be pressed for two seconds during GO before going to WARN static int curr_ped_tick_time = 0; static int prev_ped_tick_time = 0; // Since drawing circles on the screen is time-consuming, we'll keep track of the light states // so that we don't draw on an already drawn spot uint8_t GreenLightOn = RESET; uint8_t YellowLightOn = RESET; uint8_t RedLightOn = RESET; // Task function that checks the state of the virtual pedestrian button. // Keeps track of how many seconds the pedestrian button has been pressed. // Once the user has pressed the virtual pedestrian button for 2 seconds, // it will set the global flag indicating the virtual pedestrian button // has been pressed. void Pedestrian(void *p); // Task function that checks the state of the virtual onoff button. // Keeps track of how many seconds the onoff button has been pressed. // Once the user has pressed the onoff button for 2 seconds, // it will set the global flag indicating the onoff button has been // pressed void StartStop(void *p); // Task function that represents your Finite State Machine. // Keeps track of how many seconds the virtual traffic light has been // lighting on. It will update the state of the traffic light system // every 5 seconds or once there's virtual button input. void Control(void *p); // Helper function that represents the traffic light FSM // Handles the traffic light state transition. void FSM(void); void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) { while (1) {} } int main(void) { // Initialize the display and touch // functionalities of the SSD2119 touch display assembly. LCD_Init(); Touch_Init(); // Draw initial state of the screen LCD_ColorFill(BACKGROUND_COLOR); LCD_SetTextColor(255, 255, 255); LCD_SetCursor(0, 0); // Draw buttons LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR); LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR); // Label buttons LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y); LCD_PrintString("Start/Stop"); LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y); LCD_PrintString("Pedestrian"); LCD_SetCursor(0, 0); xTaskCreate(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL); xTaskCreate(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL); xTaskCreate(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL); vTaskStartScheduler(); while(1); } void StartStop(void *p) { // keep track of time static int curr_onoff_tick_time = 0; static int prev_onoff_tick_time = 0; curr_onoff_tick_time = xTaskGetTickCount(); prev_onoff_tick_time = curr_onoff_tick_time; // coordinates of a touch unsigned long x = 0; unsigned long y = 0; while (1) { curr_onoff_tick_time = xTaskGetTickCount(); // Check whether the virtual button is pressed x = Touch_ReadX(); y = Touch_ReadY(); if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { // register the input onoff_pressed = SET; prev_onoff_tick_time = curr_onoff_tick_time; } else { onoff_pressed = RESET; } } else { onoff_pressed = RESET; prev_onoff_tick_time = curr_onoff_tick_time; } vTaskDelay(1); } } void Pedestrian(void *p) { curr_ped_tick_time = xTaskGetTickCount(); prev_ped_tick_time = curr_ped_tick_time; // coordinates of a touch unsigned long x = 0; unsigned long y = 0; while (1) { curr_ped_tick_time = xTaskGetTickCount(); // check if button has been pressed x = Touch_ReadX(); y = Touch_ReadY(); if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { // register the input pedestrian_pressed = SET; prev_ped_tick_time = curr_ped_tick_time; } else { pedestrian_pressed = RESET; } } else { pedestrian_pressed = RESET; prev_ped_tick_time = curr_ped_tick_time; } vTaskDelay(1); } } void Control(void *p) { // keep track of time time_expired = RESET; curr_light_tick_time = xTaskGetTickCount(); prev_light_tick_time = curr_light_tick_time; while (1) { curr_light_tick_time = xTaskGetTickCount(); // check if time to make a transition or if there's been virtual input if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { // register that timer has expired if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { time_expired = SET; prev_light_tick_time = curr_light_tick_time; } FSM(); } else { time_expired = RESET; } vTaskDelay(1); } } void FSM(void) { static TL_states_e present_state = IDLE; static TL_states_e next_state = IDLE; // choose next state switch (present_state) { case IDLE: if (onoff_pressed) { next_state = STOP; } else { next_state = IDLE; } break; case STOP: if (onoff_pressed) { next_state = IDLE; } else if(time_expired) { next_state = GO; } break; case GO: if (onoff_pressed) { next_state = IDLE; } else if(pedestrian_pressed) { next_state = WARN; } else if(time_expired) { next_state = STOP; } break; case WARN: if (onoff_pressed) { next_state = IDLE; } else if(time_expired) { next_state = STOP; } break; default: next_state = IDLE; break; } if (next_state != present_state) { present_state = next_state; time_expired = RESET; prev_light_tick_time = curr_light_tick_time; pedestrian_pressed = RESET; prev_ped_tick_time = curr_ped_tick_time; } // produce the output switch (present_state) { case IDLE: if(RedLightOn) { LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); RedLightOn = RESET; } if(GreenLightOn) { LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); GreenLightOn = RESET; } if(YellowLightOn) { LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); YellowLightOn = RESET; } break; case STOP: if(!RedLightOn) { LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); RedLightOn = SET; } if(GreenLightOn) { LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); GreenLightOn = RESET; } if(YellowLightOn) { LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); YellowLightOn = RESET; } break; case GO: if(RedLightOn) { LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); RedLightOn = RESET; } if(!GreenLightOn) { LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); GreenLightOn = SET; } if(YellowLightOn) { LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); YellowLightOn = RESET; } break; case WARN: if(RedLightOn) { LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); RedLightOn = RESET; } if(GreenLightOn) { LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); GreenLightOn = RESET; } if(!YellowLightOn) { LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); YellowLightOn = SET; } break; default: if(RedLightOn) { LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); RedLightOn = RESET; } if(GreenLightOn) { LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); GreenLightOn = RESET; } if(YellowLightOn) { LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); YellowLightOn = RESET; } break; } }
27.95
320
(translation_unit) "#include "FreeRTOS.h" \n#include "task.h" \n \n// SSD2119 Display and Touch Drivers \n#include "SSD2119_Display.h" \n#include "SSD2119_Touch.h" \n \n// header file specific to task 2 \n#include "task2.h" \n \n#define SET 1U \n#define RESET 0U \n \n// Flags for the buttons and the timer \nint pedestrian_pressed = RESET; \nint onoff_pressed = RESET; \nint time_expired = RESET; \n \n// light_tick is global because FSM() needs to reset the timer when an input \n// results in a transition \nstatic int curr_light_tick_time = 0; \nstatic int prev_light_tick_time = 0; \n \n// ped_tick global because FSM() needs to reset this timer to ensure that \n// the pedestrian button be pressed for two seconds during GO before going to WARN \nstatic int curr_ped_tick_time = 0; \nstatic int prev_ped_tick_time = 0; \n \n// Since drawing circles on the screen is time-consuming, we'll keep track of the light states \n// so that we don't draw on an already drawn spot \nuint8_t GreenLightOn = RESET; \nuint8_t YellowLightOn = RESET; \nuint8_t RedLightOn = RESET; \n \n// Task function that checks the state of the virtual pedestrian button. \n// Keeps track of how many seconds the pedestrian button has been pressed. \n// Once the user has pressed the virtual pedestrian button for 2 seconds, \n// it will set the global flag indicating the virtual pedestrian button \n// has been pressed. \nvoid Pedestrian(void *p); \n \n// Task function that checks the state of the virtual onoff button. \n// Keeps track of how many seconds the onoff button has been pressed. \n// Once the user has pressed the onoff button for 2 seconds, \n// it will set the global flag indicating the onoff button has been \n// pressed \nvoid StartStop(void *p); \n \n// Task function that represents your Finite State Machine. \n// Keeps track of how many seconds the virtual traffic light has been \n// lighting on. It will update the state of the traffic light system \n// every 5 seconds or once there's virtual button input. \nvoid Control(void *p); \n \n// Helper function that represents the traffic light FSM \n// Handles the traffic light state transition. \nvoid FSM(void); \n \nvoid vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) { \n while (1) {} \n} \n \nint main(void) { \n // Initialize the display and touch \n // functionalities of the SSD2119 touch display assembly. \n LCD_Init(); \n Touch_Init(); \n \n // Draw initial state of the screen \n LCD_ColorFill(BACKGROUND_COLOR); \n LCD_SetTextColor(255, 255, 255); \n LCD_SetCursor(0, 0); \n \n // Draw buttons \n LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR); \n LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR); \n \n // Label buttons \n LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y); \n LCD_PrintString("Start/Stop"); \n LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y); \n LCD_PrintString("Pedestrian"); \n LCD_SetCursor(0, 0); \n \n xTaskCreate(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL); \n xTaskCreate(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL); \n xTaskCreate(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL); \n \n vTaskStartScheduler(); \n \n while(1); \n} \n \nvoid StartStop(void *p) { \n // keep track of time \n static int curr_onoff_tick_time = 0; \n static int prev_onoff_tick_time = 0; \n curr_onoff_tick_time = xTaskGetTickCount(); \n prev_onoff_tick_time = curr_onoff_tick_time; \n \n // coordinates of a touch \n unsigned long x = 0; \n unsigned long y = 0; \n while (1) { \n curr_onoff_tick_time = xTaskGetTickCount(); \n \n // Check whether the virtual button is pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n } else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n \n vTaskDelay(1); \n } \n} \n \nvoid Pedestrian(void *p) { \n curr_ped_tick_time = xTaskGetTickCount(); \n prev_ped_tick_time = curr_ped_tick_time; \n \n // coordinates of a touch \n unsigned long x = 0; \n unsigned long y = 0; \n \n while (1) { \n curr_ped_tick_time = xTaskGetTickCount(); \n \n // check if button has been pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n \n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n } else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n vTaskDelay(1); \n } \n} \n \nvoid Control(void *p) { \n // keep track of time \n time_expired = RESET; \n curr_light_tick_time = xTaskGetTickCount(); \n prev_light_tick_time = curr_light_tick_time; \n \n while (1) { \n curr_light_tick_time = xTaskGetTickCount(); \n \n // check if time to make a transition or if there's been virtual input \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n } else { \n time_expired = RESET; \n } \n \n vTaskDelay(1); \n } \n} \n \nvoid FSM(void) { \n static TL_states_e present_state = IDLE; \n static TL_states_e next_state = IDLE; \n \n // choose next state \n switch (present_state) { \n case IDLE: \n if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n } \n break; \n \n case STOP: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n } \n break; \n \n case GO: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n case WARN: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n default: \n next_state = IDLE; \n break; \n } \n \n if (next_state != present_state) { \n present_state = next_state; \n time_expired = RESET; \n prev_light_tick_time = curr_light_tick_time; \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n // produce the output \n switch (present_state) { \n case IDLE: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case STOP: \n if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case GO: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case WARN: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n } \n break; \n \n default: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n } \n} \n" (preproc_include) "#include "FreeRTOS.h" \n" (#include) "#include" (string_literal) ""FreeRTOS.h"" (") """ (string_content) "FreeRTOS.h" (") """ (preproc_include) "#include "task.h" \n" (#include) "#include" (string_literal) ""task.h"" (") """ (string_content) "task.h" (") """ (comment) "// SSD2119 Display and Touch Drivers " (preproc_include) "#include "SSD2119_Display.h" \n" (#include) "#include" (string_literal) ""SSD2119_Display.h"" (") """ (string_content) "SSD2119_Display.h" (") """ (preproc_include) "#include "SSD2119_Touch.h" \n" (#include) "#include" (string_literal) ""SSD2119_Touch.h"" (") """ (string_content) "SSD2119_Touch.h" (") """ (comment) "// header file specific to task 2 " (preproc_include) "#include "task2.h" \n" (#include) "#include" (string_literal) ""task2.h"" (") """ (string_content) "task2.h" (") """ (preproc_def) "#define SET 1U \n" (#define) "#define" (identifier) "SET" (preproc_arg) "1U " (preproc_def) "#define RESET 0U \n" (#define) "#define" (identifier) "RESET" (preproc_arg) "0U " (comment) "// Flags for the buttons and the timer " (declaration) "int pedestrian_pressed = RESET;" (primitive_type) "int" (init_declarator) "pedestrian_pressed = RESET" (identifier) "pedestrian_pressed" (=) "=" (identifier) "RESET" (;) ";" (declaration) "int onoff_pressed = RESET;" (primitive_type) "int" (init_declarator) "onoff_pressed = RESET" (identifier) "onoff_pressed" (=) "=" (identifier) "RESET" (;) ";" (declaration) "int time_expired = RESET;" (primitive_type) "int" (init_declarator) "time_expired = RESET" (identifier) "time_expired" (=) "=" (identifier) "RESET" (;) ";" (comment) "// light_tick is global because FSM() needs to reset the timer when an input " (comment) "// results in a transition " (declaration) "static int curr_light_tick_time = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "curr_light_tick_time = 0" (identifier) "curr_light_tick_time" (=) "=" (number_literal) "0" (;) ";" (declaration) "static int prev_light_tick_time = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "prev_light_tick_time = 0" (identifier) "prev_light_tick_time" (=) "=" (number_literal) "0" (;) ";" (comment) "// ped_tick global because FSM() needs to reset this timer to ensure that " (comment) "// the pedestrian button be pressed for two seconds during GO before going to WARN " (declaration) "static int curr_ped_tick_time = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "curr_ped_tick_time = 0" (identifier) "curr_ped_tick_time" (=) "=" (number_literal) "0" (;) ";" (declaration) "static int prev_ped_tick_time = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "prev_ped_tick_time = 0" (identifier) "prev_ped_tick_time" (=) "=" (number_literal) "0" (;) ";" (comment) "// Since drawing circles on the screen is time-consuming, we'll keep track of the light states " (comment) "// so that we don't draw on an already drawn spot " (declaration) "uint8_t GreenLightOn = RESET;" (primitive_type) "uint8_t" (init_declarator) "GreenLightOn = RESET" (identifier) "GreenLightOn" (=) "=" (identifier) "RESET" (;) ";" (declaration) "uint8_t YellowLightOn = RESET;" (primitive_type) "uint8_t" (init_declarator) "YellowLightOn = RESET" (identifier) "YellowLightOn" (=) "=" (identifier) "RESET" (;) ";" (declaration) "uint8_t RedLightOn = RESET;" (primitive_type) "uint8_t" (init_declarator) "RedLightOn = RESET" (identifier) "RedLightOn" (=) "=" (identifier) "RESET" (;) ";" (comment) "// Task function that checks the state of the virtual pedestrian button. " (comment) "// Keeps track of how many seconds the pedestrian button has been pressed. " (comment) "// Once the user has pressed the virtual pedestrian button for 2 seconds, " (comment) "// it will set the global flag indicating the virtual pedestrian button " (comment) "// has been pressed. " (declaration) "void Pedestrian(void *p);" (primitive_type) "void" (function_declarator) "Pedestrian(void *p)" (identifier) "Pedestrian" (parameter_list) "(void *p)" (() "(" (parameter_declaration) "void *p" (primitive_type) "void" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (;) ";" (comment) "// Task function that checks the state of the virtual onoff button. " (comment) "// Keeps track of how many seconds the onoff button has been pressed. " (comment) "// Once the user has pressed the onoff button for 2 seconds, " (comment) "// it will set the global flag indicating the onoff button has been " (comment) "// pressed " (declaration) "void StartStop(void *p);" (primitive_type) "void" (function_declarator) "StartStop(void *p)" (identifier) "StartStop" (parameter_list) "(void *p)" (() "(" (parameter_declaration) "void *p" (primitive_type) "void" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (;) ";" (comment) "// Task function that represents your Finite State Machine. " (comment) "// Keeps track of how many seconds the virtual traffic light has been " (comment) "// lighting on. It will update the state of the traffic light system " (comment) "// every 5 seconds or once there's virtual button input. " (declaration) "void Control(void *p);" (primitive_type) "void" (function_declarator) "Control(void *p)" (identifier) "Control" (parameter_list) "(void *p)" (() "(" (parameter_declaration) "void *p" (primitive_type) "void" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (;) ";" (comment) "// Helper function that represents the traffic light FSM " (comment) "// Handles the traffic light state transition. " (declaration) "void FSM(void);" (primitive_type) "void" (function_declarator) "FSM(void)" (identifier) "FSM" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (function_definition) "void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) { \n while (1) {} \n}" (primitive_type) "void" (function_declarator) "vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName)" (identifier) "vApplicationStackOverflowHook" (parameter_list) "(TaskHandle_t xTask, char *pcTaskName)" (() "(" (parameter_declaration) "TaskHandle_t xTask" (type_identifier) "TaskHandle_t" (identifier) "xTask" (,) "," (parameter_declaration) "char *pcTaskName" (primitive_type) "char" (pointer_declarator) "*pcTaskName" (*) "*" (identifier) "pcTaskName" ()) ")" (compound_statement) "{ \n while (1) {} \n}" ({) "{" (while_statement) "while (1) {}" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (}) "}" (function_definition) "int main(void) { \n // Initialize the display and touch \n // functionalities of the SSD2119 touch display assembly. \n LCD_Init(); \n Touch_Init(); \n \n // Draw initial state of the screen \n LCD_ColorFill(BACKGROUND_COLOR); \n LCD_SetTextColor(255, 255, 255); \n LCD_SetCursor(0, 0); \n \n // Draw buttons \n LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR); \n LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR); \n \n // Label buttons \n LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y); \n LCD_PrintString("Start/Stop"); \n LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y); \n LCD_PrintString("Pedestrian"); \n LCD_SetCursor(0, 0); \n \n xTaskCreate(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL); \n xTaskCreate(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL); \n xTaskCreate(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL); \n \n vTaskStartScheduler(); \n \n while(1); \n}" (primitive_type) "int" (function_declarator) "main(void)" (identifier) "main" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n // Initialize the display and touch \n // functionalities of the SSD2119 touch display assembly. \n LCD_Init(); \n Touch_Init(); \n \n // Draw initial state of the screen \n LCD_ColorFill(BACKGROUND_COLOR); \n LCD_SetTextColor(255, 255, 255); \n LCD_SetCursor(0, 0); \n \n // Draw buttons \n LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR); \n LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR); \n \n // Label buttons \n LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y); \n LCD_PrintString("Start/Stop"); \n LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y); \n LCD_PrintString("Pedestrian"); \n LCD_SetCursor(0, 0); \n \n xTaskCreate(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL); \n xTaskCreate(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL); \n xTaskCreate(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL); \n \n vTaskStartScheduler(); \n \n while(1); \n}" ({) "{" (comment) "// Initialize the display and touch " (comment) "// functionalities of the SSD2119 touch display assembly. " (expression_statement) "LCD_Init();" (call_expression) "LCD_Init()" (identifier) "LCD_Init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "Touch_Init();" (call_expression) "Touch_Init()" (identifier) "Touch_Init" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Draw initial state of the screen " (expression_statement) "LCD_ColorFill(BACKGROUND_COLOR);" (call_expression) "LCD_ColorFill(BACKGROUND_COLOR)" (identifier) "LCD_ColorFill" (argument_list) "(BACKGROUND_COLOR)" (() "(" (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "LCD_SetTextColor(255, 255, 255);" (call_expression) "LCD_SetTextColor(255, 255, 255)" (identifier) "LCD_SetTextColor" (argument_list) "(255, 255, 255)" (() "(" (number_literal) "255" (,) "," (number_literal) "255" (,) "," (number_literal) "255" ()) ")" (;) ";" (expression_statement) "LCD_SetCursor(0, 0);" (call_expression) "LCD_SetCursor(0, 0)" (identifier) "LCD_SetCursor" (argument_list) "(0, 0)" (() "(" (number_literal) "0" (,) "," (number_literal) "0" ()) ")" (;) ";" (comment) "// Draw buttons " (expression_statement) "LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR);" (call_expression) "LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR)" (() "(" (identifier) "START_STOP_X" (,) "," (identifier) "START_STOP_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "START_STOP_COLOR" ()) ")" (;) ";" (expression_statement) "LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR);" (call_expression) "LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(PED_X, PED_Y, RADIUS, PED_COLOR)" (() "(" (identifier) "PED_X" (,) "," (identifier) "PED_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "PED_COLOR" ()) ")" (;) ";" (comment) "// Label buttons " (expression_statement) "LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y);" (call_expression) "LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y)" (identifier) "LCD_SetCursor" (argument_list) "(START_STOP_LABEL_X, START_STOP_LABEL_Y)" (() "(" (identifier) "START_STOP_LABEL_X" (,) "," (identifier) "START_STOP_LABEL_Y" ()) ")" (;) ";" (expression_statement) "LCD_PrintString("Start/Stop");" (call_expression) "LCD_PrintString("Start/Stop")" (identifier) "LCD_PrintString" (argument_list) "("Start/Stop")" (() "(" (string_literal) ""Start/Stop"" (") """ (string_content) "Start/Stop" (") """ ()) ")" (;) ";" (expression_statement) "LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y);" (call_expression) "LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y)" (identifier) "LCD_SetCursor" (argument_list) "(PED_LABEL_X, PED_LABEL_Y)" (() "(" (identifier) "PED_LABEL_X" (,) "," (identifier) "PED_LABEL_Y" ()) ")" (;) ";" (expression_statement) "LCD_PrintString("Pedestrian");" (call_expression) "LCD_PrintString("Pedestrian")" (identifier) "LCD_PrintString" (argument_list) "("Pedestrian")" (() "(" (string_literal) ""Pedestrian"" (") """ (string_content) "Pedestrian" (") """ ()) ")" (;) ";" (expression_statement) "LCD_SetCursor(0, 0);" (call_expression) "LCD_SetCursor(0, 0)" (identifier) "LCD_SetCursor" (argument_list) "(0, 0)" (() "(" (number_literal) "0" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "xTaskCreate(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL);" (call_expression) "xTaskCreate(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL)" (identifier) "xTaskCreate" (argument_list) "(StartStop, (const char *)"StartStopButton", 1024, NULL, 0U, NULL)" (() "(" (identifier) "StartStop" (,) "," (cast_expression) "(const char *)"StartStopButton"" (() "(" (type_descriptor) "const char *" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (string_literal) ""StartStopButton"" (") """ (string_content) "StartStopButton" (") """ (,) "," (number_literal) "1024" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "0U" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (expression_statement) "xTaskCreate(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL);" (call_expression) "xTaskCreate(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL)" (identifier) "xTaskCreate" (argument_list) "(Pedestrian, (const char *)"PedestrianButton", 1024, NULL, 0U, NULL)" (() "(" (identifier) "Pedestrian" (,) "," (cast_expression) "(const char *)"PedestrianButton"" (() "(" (type_descriptor) "const char *" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (string_literal) ""PedestrianButton"" (") """ (string_content) "PedestrianButton" (") """ (,) "," (number_literal) "1024" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "0U" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (expression_statement) "xTaskCreate(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL);" (call_expression) "xTaskCreate(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL)" (identifier) "xTaskCreate" (argument_list) "(Control, (const char *)"Control FSM", 1024, NULL, 0U, NULL)" (() "(" (identifier) "Control" (,) "," (cast_expression) "(const char *)"Control FSM"" (() "(" (type_descriptor) "const char *" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (string_literal) ""Control FSM"" (") """ (string_content) "Control FSM" (") """ (,) "," (number_literal) "1024" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "0U" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (expression_statement) "vTaskStartScheduler();" (call_expression) "vTaskStartScheduler()" (identifier) "vTaskStartScheduler" (argument_list) "()" (() "(" ()) ")" (;) ";" (while_statement) "while(1);" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (expression_statement) ";" (;) ";" (}) "}" (function_definition) "void StartStop(void *p) { \n // keep track of time \n static int curr_onoff_tick_time = 0; \n static int prev_onoff_tick_time = 0; \n curr_onoff_tick_time = xTaskGetTickCount(); \n prev_onoff_tick_time = curr_onoff_tick_time; \n \n // coordinates of a touch \n unsigned long x = 0; \n unsigned long y = 0; \n while (1) { \n curr_onoff_tick_time = xTaskGetTickCount(); \n \n // Check whether the virtual button is pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n } else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n \n vTaskDelay(1); \n } \n}" (primitive_type) "void" (function_declarator) "StartStop(void *p)" (identifier) "StartStop" (parameter_list) "(void *p)" (() "(" (parameter_declaration) "void *p" (primitive_type) "void" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (compound_statement) "{ \n // keep track of time \n static int curr_onoff_tick_time = 0; \n static int prev_onoff_tick_time = 0; \n curr_onoff_tick_time = xTaskGetTickCount(); \n prev_onoff_tick_time = curr_onoff_tick_time; \n \n // coordinates of a touch \n unsigned long x = 0; \n unsigned long y = 0; \n while (1) { \n curr_onoff_tick_time = xTaskGetTickCount(); \n \n // Check whether the virtual button is pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n } else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n \n vTaskDelay(1); \n } \n}" ({) "{" (comment) "// keep track of time " (declaration) "static int curr_onoff_tick_time = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "curr_onoff_tick_time = 0" (identifier) "curr_onoff_tick_time" (=) "=" (number_literal) "0" (;) ";" (declaration) "static int prev_onoff_tick_time = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "prev_onoff_tick_time = 0" (identifier) "prev_onoff_tick_time" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "curr_onoff_tick_time = xTaskGetTickCount();" (assignment_expression) "curr_onoff_tick_time = xTaskGetTickCount()" (identifier) "curr_onoff_tick_time" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "prev_onoff_tick_time = curr_onoff_tick_time;" (assignment_expression) "prev_onoff_tick_time = curr_onoff_tick_time" (identifier) "prev_onoff_tick_time" (=) "=" (identifier) "curr_onoff_tick_time" (;) ";" (comment) "// coordinates of a touch " (declaration) "unsigned long x = 0;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (init_declarator) "x = 0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (declaration) "unsigned long y = 0;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (init_declarator) "y = 0" (identifier) "y" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while (1) { \n curr_onoff_tick_time = xTaskGetTickCount(); \n \n // Check whether the virtual button is pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n } else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n \n vTaskDelay(1); \n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{ \n curr_onoff_tick_time = xTaskGetTickCount(); \n \n // Check whether the virtual button is pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n } else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n \n vTaskDelay(1); \n }" ({) "{" (expression_statement) "curr_onoff_tick_time = xTaskGetTickCount();" (assignment_expression) "curr_onoff_tick_time = xTaskGetTickCount()" (identifier) "curr_onoff_tick_time" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Check whether the virtual button is pressed " (expression_statement) "x = Touch_ReadX();" (assignment_expression) "x = Touch_ReadX()" (identifier) "x" (=) "=" (call_expression) "Touch_ReadX()" (identifier) "Touch_ReadX" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "y = Touch_ReadY();" (assignment_expression) "y = Touch_ReadY()" (identifier) "y" (=) "=" (call_expression) "Touch_ReadY()" (identifier) "Touch_ReadY" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n } else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n }" (if) "if" (parenthesized_expression) "((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT))" (() "(" (parenthesized_expression) "(START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)" (() "(" (binary_expression) "START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT" (binary_expression) "START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \n START_STOP_BOTTOM_LIMIT < y" (binary_expression) "START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT" (binary_expression) "START_STOP_LEFT_LIMIT < x" (identifier) "START_STOP_LEFT_LIMIT" (<) "<" (identifier) "x" (&&) "&&" (binary_expression) "x < START_STOP_RIGHT_LIMIT" (identifier) "x" (<) "<" (identifier) "START_STOP_RIGHT_LIMIT" (&&) "&&" (binary_expression) "START_STOP_BOTTOM_LIMIT < y" (identifier) "START_STOP_BOTTOM_LIMIT" (<) "<" (identifier) "y" (&&) "&&" (binary_expression) "y < START_STOP_TOP_LIMIT" (identifier) "y" (<) "<" (identifier) "START_STOP_TOP_LIMIT" ()) ")" ()) ")" (compound_statement) "{ \n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n } \n }" ({) "{" (if_statement) "if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n } \n else { \n onoff_pressed = RESET; \n }" (if) "if" (parenthesized_expression) "(curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S))" (() "(" (binary_expression) "curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)" (binary_expression) "curr_onoff_tick_time - prev_onoff_tick_time" (identifier) "curr_onoff_tick_time" (-) "-" (identifier) "prev_onoff_tick_time" (>=) ">=" (call_expression) "SEC_TO_MS(BUTTON_PRESS_IN_S)" (identifier) "SEC_TO_MS" (argument_list) "(BUTTON_PRESS_IN_S)" (() "(" (identifier) "BUTTON_PRESS_IN_S" ()) ")" ()) ")" (compound_statement) "{ \n // register the input \n onoff_pressed = SET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n }" ({) "{" (comment) "// register the input " (expression_statement) "onoff_pressed = SET;" (assignment_expression) "onoff_pressed = SET" (identifier) "onoff_pressed" (=) "=" (identifier) "SET" (;) ";" (expression_statement) "prev_onoff_tick_time = curr_onoff_tick_time;" (assignment_expression) "prev_onoff_tick_time = curr_onoff_tick_time" (identifier) "prev_onoff_tick_time" (=) "=" (identifier) "curr_onoff_tick_time" (;) ";" (}) "}" (else_clause) "else { \n onoff_pressed = RESET; \n }" (else) "else" (compound_statement) "{ \n onoff_pressed = RESET; \n }" ({) "{" (expression_statement) "onoff_pressed = RESET;" (assignment_expression) "onoff_pressed = RESET" (identifier) "onoff_pressed" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (}) "}" (else_clause) "else { \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n }" (else) "else" (compound_statement) "{ \n onoff_pressed = RESET; \n prev_onoff_tick_time = curr_onoff_tick_time; \n }" ({) "{" (expression_statement) "onoff_pressed = RESET;" (assignment_expression) "onoff_pressed = RESET" (identifier) "onoff_pressed" (=) "=" (identifier) "RESET" (;) ";" (expression_statement) "prev_onoff_tick_time = curr_onoff_tick_time;" (assignment_expression) "prev_onoff_tick_time = curr_onoff_tick_time" (identifier) "prev_onoff_tick_time" (=) "=" (identifier) "curr_onoff_tick_time" (;) ";" (}) "}" (expression_statement) "vTaskDelay(1);" (call_expression) "vTaskDelay(1)" (identifier) "vTaskDelay" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void Pedestrian(void *p) { \n curr_ped_tick_time = xTaskGetTickCount(); \n prev_ped_tick_time = curr_ped_tick_time; \n \n // coordinates of a touch \n unsigned long x = 0; \n unsigned long y = 0; \n \n while (1) { \n curr_ped_tick_time = xTaskGetTickCount(); \n \n // check if button has been pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n \n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n } else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n vTaskDelay(1); \n } \n}" (primitive_type) "void" (function_declarator) "Pedestrian(void *p)" (identifier) "Pedestrian" (parameter_list) "(void *p)" (() "(" (parameter_declaration) "void *p" (primitive_type) "void" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (compound_statement) "{ \n curr_ped_tick_time = xTaskGetTickCount(); \n prev_ped_tick_time = curr_ped_tick_time; \n \n // coordinates of a touch \n unsigned long x = 0; \n unsigned long y = 0; \n \n while (1) { \n curr_ped_tick_time = xTaskGetTickCount(); \n \n // check if button has been pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n \n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n } else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n vTaskDelay(1); \n } \n}" ({) "{" (expression_statement) "curr_ped_tick_time = xTaskGetTickCount();" (assignment_expression) "curr_ped_tick_time = xTaskGetTickCount()" (identifier) "curr_ped_tick_time" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "prev_ped_tick_time = curr_ped_tick_time;" (assignment_expression) "prev_ped_tick_time = curr_ped_tick_time" (identifier) "prev_ped_tick_time" (=) "=" (identifier) "curr_ped_tick_time" (;) ";" (comment) "// coordinates of a touch " (declaration) "unsigned long x = 0;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (init_declarator) "x = 0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (declaration) "unsigned long y = 0;" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (init_declarator) "y = 0" (identifier) "y" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while (1) { \n curr_ped_tick_time = xTaskGetTickCount(); \n \n // check if button has been pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n \n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n } else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n vTaskDelay(1); \n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{ \n curr_ped_tick_time = xTaskGetTickCount(); \n \n // check if button has been pressed \n x = Touch_ReadX(); \n y = Touch_ReadY(); \n \n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n } else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n vTaskDelay(1); \n }" ({) "{" (expression_statement) "curr_ped_tick_time = xTaskGetTickCount();" (assignment_expression) "curr_ped_tick_time = xTaskGetTickCount()" (identifier) "curr_ped_tick_time" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// check if button has been pressed " (expression_statement) "x = Touch_ReadX();" (assignment_expression) "x = Touch_ReadX()" (identifier) "x" (=) "=" (call_expression) "Touch_ReadX()" (identifier) "Touch_ReadX" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "y = Touch_ReadY();" (assignment_expression) "y = Touch_ReadY()" (identifier) "y" (=) "=" (call_expression) "Touch_ReadY()" (identifier) "Touch_ReadY" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n } else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n }" (if) "if" (parenthesized_expression) "(PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT)" (() "(" (binary_expression) "PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT" (binary_expression) "PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \n PED_BOT_LIMIT < y" (binary_expression) "PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT" (binary_expression) "PED_LEFT_LIMIT < x" (identifier) "PED_LEFT_LIMIT" (<) "<" (identifier) "x" (&&) "&&" (binary_expression) "x < PED_RIGHT_LIMIT" (identifier) "x" (<) "<" (identifier) "PED_RIGHT_LIMIT" (&&) "&&" (binary_expression) "PED_BOT_LIMIT < y" (identifier) "PED_BOT_LIMIT" (<) "<" (identifier) "y" (&&) "&&" (binary_expression) "y < PED_TOP_LIMIT" (identifier) "y" (<) "<" (identifier) "PED_TOP_LIMIT" ()) ")" (compound_statement) "{ \n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n } \n }" ({) "{" (if_statement) "if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) { \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n else { \n pedestrian_pressed = RESET; \n }" (if) "if" (parenthesized_expression) "(curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S))" (() "(" (binary_expression) "curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)" (binary_expression) "curr_ped_tick_time - prev_ped_tick_time" (identifier) "curr_ped_tick_time" (-) "-" (identifier) "prev_ped_tick_time" (>=) ">=" (call_expression) "SEC_TO_MS(BUTTON_PRESS_IN_S)" (identifier) "SEC_TO_MS" (argument_list) "(BUTTON_PRESS_IN_S)" (() "(" (identifier) "BUTTON_PRESS_IN_S" ()) ")" ()) ")" (compound_statement) "{ \n // register the input \n pedestrian_pressed = SET; \n prev_ped_tick_time = curr_ped_tick_time; \n }" ({) "{" (comment) "// register the input " (expression_statement) "pedestrian_pressed = SET;" (assignment_expression) "pedestrian_pressed = SET" (identifier) "pedestrian_pressed" (=) "=" (identifier) "SET" (;) ";" (expression_statement) "prev_ped_tick_time = curr_ped_tick_time;" (assignment_expression) "prev_ped_tick_time = curr_ped_tick_time" (identifier) "prev_ped_tick_time" (=) "=" (identifier) "curr_ped_tick_time" (;) ";" (}) "}" (else_clause) "else { \n pedestrian_pressed = RESET; \n }" (else) "else" (compound_statement) "{ \n pedestrian_pressed = RESET; \n }" ({) "{" (expression_statement) "pedestrian_pressed = RESET;" (assignment_expression) "pedestrian_pressed = RESET" (identifier) "pedestrian_pressed" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (}) "}" (else_clause) "else { \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n }" (else) "else" (compound_statement) "{ \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n }" ({) "{" (expression_statement) "pedestrian_pressed = RESET;" (assignment_expression) "pedestrian_pressed = RESET" (identifier) "pedestrian_pressed" (=) "=" (identifier) "RESET" (;) ";" (expression_statement) "prev_ped_tick_time = curr_ped_tick_time;" (assignment_expression) "prev_ped_tick_time = curr_ped_tick_time" (identifier) "prev_ped_tick_time" (=) "=" (identifier) "curr_ped_tick_time" (;) ";" (}) "}" (expression_statement) "vTaskDelay(1);" (call_expression) "vTaskDelay(1)" (identifier) "vTaskDelay" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void Control(void *p) { \n // keep track of time \n time_expired = RESET; \n curr_light_tick_time = xTaskGetTickCount(); \n prev_light_tick_time = curr_light_tick_time; \n \n while (1) { \n curr_light_tick_time = xTaskGetTickCount(); \n \n // check if time to make a transition or if there's been virtual input \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n } else { \n time_expired = RESET; \n } \n \n vTaskDelay(1); \n } \n}" (primitive_type) "void" (function_declarator) "Control(void *p)" (identifier) "Control" (parameter_list) "(void *p)" (() "(" (parameter_declaration) "void *p" (primitive_type) "void" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (compound_statement) "{ \n // keep track of time \n time_expired = RESET; \n curr_light_tick_time = xTaskGetTickCount(); \n prev_light_tick_time = curr_light_tick_time; \n \n while (1) { \n curr_light_tick_time = xTaskGetTickCount(); \n \n // check if time to make a transition or if there's been virtual input \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n } else { \n time_expired = RESET; \n } \n \n vTaskDelay(1); \n } \n}" ({) "{" (comment) "// keep track of time " (expression_statement) "time_expired = RESET;" (assignment_expression) "time_expired = RESET" (identifier) "time_expired" (=) "=" (identifier) "RESET" (;) ";" (expression_statement) "curr_light_tick_time = xTaskGetTickCount();" (assignment_expression) "curr_light_tick_time = xTaskGetTickCount()" (identifier) "curr_light_tick_time" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "prev_light_tick_time = curr_light_tick_time;" (assignment_expression) "prev_light_tick_time = curr_light_tick_time" (identifier) "prev_light_tick_time" (=) "=" (identifier) "curr_light_tick_time" (;) ";" (while_statement) "while (1) { \n curr_light_tick_time = xTaskGetTickCount(); \n \n // check if time to make a transition or if there's been virtual input \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n } else { \n time_expired = RESET; \n } \n \n vTaskDelay(1); \n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{ \n curr_light_tick_time = xTaskGetTickCount(); \n \n // check if time to make a transition or if there's been virtual input \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n } else { \n time_expired = RESET; \n } \n \n vTaskDelay(1); \n }" ({) "{" (expression_statement) "curr_light_tick_time = xTaskGetTickCount();" (assignment_expression) "curr_light_tick_time = xTaskGetTickCount()" (identifier) "curr_light_tick_time" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// check if time to make a transition or if there's been virtual input " (if_statement) "if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n } else { \n time_expired = RESET; \n }" (if) "if" (parenthesized_expression) "(curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed)" (() "(" (binary_expression) "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed" (binary_expression) "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed" (binary_expression) "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)" (binary_expression) "curr_light_tick_time - prev_light_tick_time" (identifier) "curr_light_tick_time" (-) "-" (identifier) "prev_light_tick_time" (>=) ">=" (call_expression) "SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)" (identifier) "SEC_TO_MS" (argument_list) "(TRANSITION_TIMEOUT_IN_S)" (() "(" (identifier) "TRANSITION_TIMEOUT_IN_S" ()) ")" (||) "||" (identifier) "onoff_pressed" (||) "||" (identifier) "pedestrian_pressed" ()) ")" (compound_statement) "{ \n \n // register that timer has expired \n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n } \n \n FSM(); \n }" ({) "{" (comment) "// register that timer has expired " (if_statement) "if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) { \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n }" (if) "if" (parenthesized_expression) "(curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S))" (() "(" (binary_expression) "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)" (binary_expression) "curr_light_tick_time - prev_light_tick_time" (identifier) "curr_light_tick_time" (-) "-" (identifier) "prev_light_tick_time" (>=) ">=" (call_expression) "SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)" (identifier) "SEC_TO_MS" (argument_list) "(TRANSITION_TIMEOUT_IN_S)" (() "(" (identifier) "TRANSITION_TIMEOUT_IN_S" ()) ")" ()) ")" (compound_statement) "{ \n time_expired = SET; \n prev_light_tick_time = curr_light_tick_time; \n }" ({) "{" (expression_statement) "time_expired = SET;" (assignment_expression) "time_expired = SET" (identifier) "time_expired" (=) "=" (identifier) "SET" (;) ";" (expression_statement) "prev_light_tick_time = curr_light_tick_time;" (assignment_expression) "prev_light_tick_time = curr_light_tick_time" (identifier) "prev_light_tick_time" (=) "=" (identifier) "curr_light_tick_time" (;) ";" (}) "}" (expression_statement) "FSM();" (call_expression) "FSM()" (identifier) "FSM" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (else_clause) "else { \n time_expired = RESET; \n }" (else) "else" (compound_statement) "{ \n time_expired = RESET; \n }" ({) "{" (expression_statement) "time_expired = RESET;" (assignment_expression) "time_expired = RESET" (identifier) "time_expired" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (expression_statement) "vTaskDelay(1);" (call_expression) "vTaskDelay(1)" (identifier) "vTaskDelay" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void FSM(void) { \n static TL_states_e present_state = IDLE; \n static TL_states_e next_state = IDLE; \n \n // choose next state \n switch (present_state) { \n case IDLE: \n if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n } \n break; \n \n case STOP: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n } \n break; \n \n case GO: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n case WARN: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n default: \n next_state = IDLE; \n break; \n } \n \n if (next_state != present_state) { \n present_state = next_state; \n time_expired = RESET; \n prev_light_tick_time = curr_light_tick_time; \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n // produce the output \n switch (present_state) { \n case IDLE: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case STOP: \n if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case GO: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case WARN: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n } \n break; \n \n default: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n } \n}" (primitive_type) "void" (function_declarator) "FSM(void)" (identifier) "FSM" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ \n static TL_states_e present_state = IDLE; \n static TL_states_e next_state = IDLE; \n \n // choose next state \n switch (present_state) { \n case IDLE: \n if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n } \n break; \n \n case STOP: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n } \n break; \n \n case GO: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n case WARN: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n default: \n next_state = IDLE; \n break; \n } \n \n if (next_state != present_state) { \n present_state = next_state; \n time_expired = RESET; \n prev_light_tick_time = curr_light_tick_time; \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n } \n \n // produce the output \n switch (present_state) { \n case IDLE: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case STOP: \n if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case GO: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case WARN: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n } \n break; \n \n default: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n } \n}" ({) "{" (declaration) "static TL_states_e present_state = IDLE;" (storage_class_specifier) "static" (static) "static" (type_identifier) "TL_states_e" (init_declarator) "present_state = IDLE" (identifier) "present_state" (=) "=" (identifier) "IDLE" (;) ";" (declaration) "static TL_states_e next_state = IDLE;" (storage_class_specifier) "static" (static) "static" (type_identifier) "TL_states_e" (init_declarator) "next_state = IDLE" (identifier) "next_state" (=) "=" (identifier) "IDLE" (;) ";" (comment) "// choose next state " (switch_statement) "switch (present_state) { \n case IDLE: \n if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n } \n break; \n \n case STOP: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n } \n break; \n \n case GO: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n case WARN: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n default: \n next_state = IDLE; \n break; \n }" (switch) "switch" (parenthesized_expression) "(present_state)" (() "(" (identifier) "present_state" ()) ")" (compound_statement) "{ \n case IDLE: \n if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n } \n break; \n \n case STOP: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n } \n break; \n \n case GO: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n case WARN: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n } \n break; \n \n default: \n next_state = IDLE; \n break; \n }" ({) "{" (case_statement) "case IDLE: \n if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n } \n break;" (case) "case" (identifier) "IDLE" (:) ":" (if_statement) "if (onoff_pressed) { \n next_state = STOP; \n } else { \n next_state = IDLE; \n }" (if) "if" (parenthesized_expression) "(onoff_pressed)" (() "(" (identifier) "onoff_pressed" ()) ")" (compound_statement) "{ \n next_state = STOP; \n }" ({) "{" (expression_statement) "next_state = STOP;" (assignment_expression) "next_state = STOP" (identifier) "next_state" (=) "=" (identifier) "STOP" (;) ";" (}) "}" (else_clause) "else { \n next_state = IDLE; \n }" (else) "else" (compound_statement) "{ \n next_state = IDLE; \n }" ({) "{" (expression_statement) "next_state = IDLE;" (assignment_expression) "next_state = IDLE" (identifier) "next_state" (=) "=" (identifier) "IDLE" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case STOP: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n } \n break;" (case) "case" (identifier) "STOP" (:) ":" (if_statement) "if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = GO; \n }" (if) "if" (parenthesized_expression) "(onoff_pressed)" (() "(" (identifier) "onoff_pressed" ()) ")" (compound_statement) "{ \n next_state = IDLE; \n }" ({) "{" (expression_statement) "next_state = IDLE;" (assignment_expression) "next_state = IDLE" (identifier) "next_state" (=) "=" (identifier) "IDLE" (;) ";" (}) "}" (else_clause) "else if(time_expired) { \n next_state = GO; \n }" (else) "else" (if_statement) "if(time_expired) { \n next_state = GO; \n }" (if) "if" (parenthesized_expression) "(time_expired)" (() "(" (identifier) "time_expired" ()) ")" (compound_statement) "{ \n next_state = GO; \n }" ({) "{" (expression_statement) "next_state = GO;" (assignment_expression) "next_state = GO" (identifier) "next_state" (=) "=" (identifier) "GO" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GO: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n } \n break;" (case) "case" (identifier) "GO" (:) ":" (if_statement) "if (onoff_pressed) { \n next_state = IDLE; \n } else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n }" (if) "if" (parenthesized_expression) "(onoff_pressed)" (() "(" (identifier) "onoff_pressed" ()) ")" (compound_statement) "{ \n next_state = IDLE; \n }" ({) "{" (expression_statement) "next_state = IDLE;" (assignment_expression) "next_state = IDLE" (identifier) "next_state" (=) "=" (identifier) "IDLE" (;) ";" (}) "}" (else_clause) "else if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n }" (else) "else" (if_statement) "if(pedestrian_pressed) { \n next_state = WARN; \n } else if(time_expired) { \n next_state = STOP; \n }" (if) "if" (parenthesized_expression) "(pedestrian_pressed)" (() "(" (identifier) "pedestrian_pressed" ()) ")" (compound_statement) "{ \n next_state = WARN; \n }" ({) "{" (expression_statement) "next_state = WARN;" (assignment_expression) "next_state = WARN" (identifier) "next_state" (=) "=" (identifier) "WARN" (;) ";" (}) "}" (else_clause) "else if(time_expired) { \n next_state = STOP; \n }" (else) "else" (if_statement) "if(time_expired) { \n next_state = STOP; \n }" (if) "if" (parenthesized_expression) "(time_expired)" (() "(" (identifier) "time_expired" ()) ")" (compound_statement) "{ \n next_state = STOP; \n }" ({) "{" (expression_statement) "next_state = STOP;" (assignment_expression) "next_state = STOP" (identifier) "next_state" (=) "=" (identifier) "STOP" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case WARN: \n if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n } \n break;" (case) "case" (identifier) "WARN" (:) ":" (if_statement) "if (onoff_pressed) { \n next_state = IDLE; \n } else if(time_expired) { \n next_state = STOP; \n }" (if) "if" (parenthesized_expression) "(onoff_pressed)" (() "(" (identifier) "onoff_pressed" ()) ")" (compound_statement) "{ \n next_state = IDLE; \n }" ({) "{" (expression_statement) "next_state = IDLE;" (assignment_expression) "next_state = IDLE" (identifier) "next_state" (=) "=" (identifier) "IDLE" (;) ";" (}) "}" (else_clause) "else if(time_expired) { \n next_state = STOP; \n }" (else) "else" (if_statement) "if(time_expired) { \n next_state = STOP; \n }" (if) "if" (parenthesized_expression) "(time_expired)" (() "(" (identifier) "time_expired" ()) ")" (compound_statement) "{ \n next_state = STOP; \n }" ({) "{" (expression_statement) "next_state = STOP;" (assignment_expression) "next_state = STOP" (identifier) "next_state" (=) "=" (identifier) "STOP" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default: \n next_state = IDLE; \n break;" (default) "default" (:) ":" (expression_statement) "next_state = IDLE;" (assignment_expression) "next_state = IDLE" (identifier) "next_state" (=) "=" (identifier) "IDLE" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (if_statement) "if (next_state != present_state) { \n present_state = next_state; \n time_expired = RESET; \n prev_light_tick_time = curr_light_tick_time; \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n }" (if) "if" (parenthesized_expression) "(next_state != present_state)" (() "(" (binary_expression) "next_state != present_state" (identifier) "next_state" (!=) "!=" (identifier) "present_state" ()) ")" (compound_statement) "{ \n present_state = next_state; \n time_expired = RESET; \n prev_light_tick_time = curr_light_tick_time; \n pedestrian_pressed = RESET; \n prev_ped_tick_time = curr_ped_tick_time; \n }" ({) "{" (expression_statement) "present_state = next_state;" (assignment_expression) "present_state = next_state" (identifier) "present_state" (=) "=" (identifier) "next_state" (;) ";" (expression_statement) "time_expired = RESET;" (assignment_expression) "time_expired = RESET" (identifier) "time_expired" (=) "=" (identifier) "RESET" (;) ";" (expression_statement) "prev_light_tick_time = curr_light_tick_time;" (assignment_expression) "prev_light_tick_time = curr_light_tick_time" (identifier) "prev_light_tick_time" (=) "=" (identifier) "curr_light_tick_time" (;) ";" (expression_statement) "pedestrian_pressed = RESET;" (assignment_expression) "pedestrian_pressed = RESET" (identifier) "pedestrian_pressed" (=) "=" (identifier) "RESET" (;) ";" (expression_statement) "prev_ped_tick_time = curr_ped_tick_time;" (assignment_expression) "prev_ped_tick_time = curr_ped_tick_time" (identifier) "prev_ped_tick_time" (=) "=" (identifier) "curr_ped_tick_time" (;) ";" (}) "}" (comment) "// produce the output " (switch_statement) "switch (present_state) { \n case IDLE: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case STOP: \n if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case GO: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case WARN: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n } \n break; \n \n default: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n }" (switch) "switch" (parenthesized_expression) "(present_state)" (() "(" (identifier) "present_state" ()) ")" (compound_statement) "{ \n case IDLE: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case STOP: \n if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case GO: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n \n case WARN: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n } \n break; \n \n default: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break; \n }" ({) "{" (case_statement) "case IDLE: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break;" (case) "case" (identifier) "IDLE" (:) ":" (if_statement) "if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(RedLightOn)" (() "(" (identifier) "RedLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "RED_X" (,) "," (identifier) "RED_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "RedLightOn = RESET;" (assignment_expression) "RedLightOn = RESET" (identifier) "RedLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(GreenLightOn)" (() "(" (identifier) "GreenLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "GREEN_X" (,) "," (identifier) "GREEN_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "GreenLightOn = RESET;" (assignment_expression) "GreenLightOn = RESET" (identifier) "GreenLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(YellowLightOn)" (() "(" (identifier) "YellowLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "YELLOW_X" (,) "," (identifier) "YELLOW_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "YellowLightOn = RESET;" (assignment_expression) "YellowLightOn = RESET" (identifier) "YellowLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case STOP: \n if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break;" (case) "case" (identifier) "STOP" (:) ":" (if_statement) "if(!RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n }" (if) "if" (parenthesized_expression) "(!RedLightOn)" (() "(" (unary_expression) "!RedLightOn" (!) "!" (identifier) "RedLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR); \n RedLightOn = SET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR);" (call_expression) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(RED_X, RED_Y, RADIUS, RED_COLOR)" (() "(" (identifier) "RED_X" (,) "," (identifier) "RED_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "RED_COLOR" ()) ")" (;) ";" (expression_statement) "RedLightOn = SET;" (assignment_expression) "RedLightOn = SET" (identifier) "RedLightOn" (=) "=" (identifier) "SET" (;) ";" (}) "}" (if_statement) "if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(GreenLightOn)" (() "(" (identifier) "GreenLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "GREEN_X" (,) "," (identifier) "GREEN_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "GreenLightOn = RESET;" (assignment_expression) "GreenLightOn = RESET" (identifier) "GreenLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(YellowLightOn)" (() "(" (identifier) "YellowLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "YELLOW_X" (,) "," (identifier) "YELLOW_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "YellowLightOn = RESET;" (assignment_expression) "YellowLightOn = RESET" (identifier) "YellowLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GO: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break;" (case) "case" (identifier) "GO" (:) ":" (if_statement) "if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(RedLightOn)" (() "(" (identifier) "RedLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "RED_X" (,) "," (identifier) "RED_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "RedLightOn = RESET;" (assignment_expression) "RedLightOn = RESET" (identifier) "RedLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(!GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n }" (if) "if" (parenthesized_expression) "(!GreenLightOn)" (() "(" (unary_expression) "!GreenLightOn" (!) "!" (identifier) "GreenLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR); \n GreenLightOn = SET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR);" (call_expression) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR)" (() "(" (identifier) "GREEN_X" (,) "," (identifier) "GREEN_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "GREEN_COLOR" ()) ")" (;) ";" (expression_statement) "GreenLightOn = SET;" (assignment_expression) "GreenLightOn = SET" (identifier) "GreenLightOn" (=) "=" (identifier) "SET" (;) ";" (}) "}" (if_statement) "if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(YellowLightOn)" (() "(" (identifier) "YellowLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "YELLOW_X" (,) "," (identifier) "YELLOW_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "YellowLightOn = RESET;" (assignment_expression) "YellowLightOn = RESET" (identifier) "YellowLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case WARN: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n } \n break;" (case) "case" (identifier) "WARN" (:) ":" (if_statement) "if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(RedLightOn)" (() "(" (identifier) "RedLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "RED_X" (,) "," (identifier) "RED_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "RedLightOn = RESET;" (assignment_expression) "RedLightOn = RESET" (identifier) "RedLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(GreenLightOn)" (() "(" (identifier) "GreenLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "GREEN_X" (,) "," (identifier) "GREEN_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "GreenLightOn = RESET;" (assignment_expression) "GreenLightOn = RESET" (identifier) "GreenLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(!YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n }" (if) "if" (parenthesized_expression) "(!YellowLightOn)" (() "(" (unary_expression) "!YellowLightOn" (!) "!" (identifier) "YellowLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR); \n YellowLightOn = SET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR);" (call_expression) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR)" (() "(" (identifier) "YELLOW_X" (,) "," (identifier) "YELLOW_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "YELLOW_COLOR" ()) ")" (;) ";" (expression_statement) "YellowLightOn = SET;" (assignment_expression) "YellowLightOn = SET" (identifier) "YellowLightOn" (=) "=" (identifier) "SET" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default: \n if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n } \n if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n } \n if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n } \n break;" (default) "default" (:) ":" (if_statement) "if(RedLightOn) { \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(RedLightOn)" (() "(" (identifier) "RedLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR); \n RedLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "RED_X" (,) "," (identifier) "RED_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "RedLightOn = RESET;" (assignment_expression) "RedLightOn = RESET" (identifier) "RedLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(GreenLightOn) { \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(GreenLightOn)" (() "(" (identifier) "GreenLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR); \n GreenLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "GREEN_X" (,) "," (identifier) "GREEN_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "GreenLightOn = RESET;" (assignment_expression) "GreenLightOn = RESET" (identifier) "GreenLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (if_statement) "if(YellowLightOn) { \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" (if) "if" (parenthesized_expression) "(YellowLightOn)" (() "(" (identifier) "YellowLightOn" ()) ")" (compound_statement) "{ \n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR); \n YellowLightOn = RESET; \n }" ({) "{" (expression_statement) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);" (call_expression) "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (identifier) "LCD_DrawFilledCircle" (argument_list) "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)" (() "(" (identifier) "YELLOW_X" (,) "," (identifier) "YELLOW_Y" (,) "," (identifier) "RADIUS" (,) "," (identifier) "BACKGROUND_COLOR" ()) ")" (;) ";" (expression_statement) "YellowLightOn = RESET;" (assignment_expression) "YellowLightOn = RESET" (identifier) "YellowLightOn" (=) "=" (identifier) "RESET" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}"
1,760
0
{"language": "c", "success": true, "metadata": {"lines": 320, "avg_line_length": 27.95, "nodes": 975, "errors": 0, "source_hash": "ef076868906b4012e47b8547666bc50f30171e96a7769bd604086c600ece7466", "categorized_nodes": 679}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"FreeRTOS.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": "string_literal", "text": "\"FreeRTOS.h\"", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 21}}, {"id": 3, "type": "preproc_include", "text": "#include \"task.h\"\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": "string_literal", "text": "\"task.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include \"SSD2119_Display.h\"\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": "string_literal", "text": "\"SSD2119_Display.h\"", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 28}}, {"id": 9, "type": "preproc_include", "text": "#include \"SSD2119_Touch.h\"\r\n", "parent": null, "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": "\"SSD2119_Touch.h\"", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 26}}, {"id": 12, "type": "preproc_include", "text": "#include \"task2.h\"\r\n", "parent": null, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"task2.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 15, "type": "preproc_def", "text": "#define SET 1U \r\n", "parent": null, "children": [16, 17, 18], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 17, "type": "identifier", "text": "SET", "parent": 15, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 11}}, {"id": 18, "type": "preproc_arg", "text": "1U \r", "parent": 15, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 24}}, {"id": 19, "type": "preproc_def", "text": "#define RESET 0U\r\n", "parent": null, "children": [20, 21, 22], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 20, "type": "#define", "text": "#define", "parent": 19, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 21, "type": "identifier", "text": "RESET", "parent": 19, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 13}}, {"id": 22, "type": "preproc_arg", "text": "0U\r", "parent": 19, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 23}}, {"id": 23, "type": "declaration", "text": "int pedestrian_pressed = RESET;", "parent": null, "children": [24, 25], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 31}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 3}}, {"id": 25, "type": "init_declarator", "text": "pedestrian_pressed = RESET", "parent": 23, "children": [26, 27, 28], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 30}}, {"id": 26, "type": "identifier", "text": "pedestrian_pressed", "parent": 25, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 22}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 24}}, {"id": 28, "type": "identifier", "text": "RESET", "parent": 25, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 30}}, {"id": 29, "type": "declaration", "text": "int onoff_pressed = RESET;", "parent": null, "children": [30, 31], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 26}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 3}}, {"id": 31, "type": "init_declarator", "text": "onoff_pressed = RESET", "parent": 29, "children": [32, 33, 34], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 25}}, {"id": 32, "type": "identifier", "text": "onoff_pressed", "parent": 31, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 17}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 19}}, {"id": 34, "type": "identifier", "text": "RESET", "parent": 31, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 25}}, {"id": 35, "type": "declaration", "text": "int time_expired = RESET;", "parent": null, "children": [36, 37], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 25}}, {"id": 36, "type": "primitive_type", "text": "int", "parent": 35, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 3}}, {"id": 37, "type": "init_declarator", "text": "time_expired = RESET", "parent": 35, "children": [38, 39, 40], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 24}}, {"id": 38, "type": "identifier", "text": "time_expired", "parent": 37, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 16}}, {"id": 39, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 18}}, {"id": 40, "type": "identifier", "text": "RESET", "parent": 37, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 24}}, {"id": 41, "type": "declaration", "text": "static int curr_light_tick_time = 0;", "parent": null, "children": [42, 43], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 36}}, {"id": 42, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 10}}, {"id": 43, "type": "init_declarator", "text": "curr_light_tick_time = 0", "parent": 41, "children": [44, 45, 46], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 35}}, {"id": 44, "type": "identifier", "text": "curr_light_tick_time", "parent": 43, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 31}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 33}}, {"id": 46, "type": "number_literal", "text": "0", "parent": 43, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 35}}, {"id": 47, "type": "declaration", "text": "static int prev_light_tick_time = 0;", "parent": null, "children": [48, 49], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 36}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 10}}, {"id": 49, "type": "init_declarator", "text": "prev_light_tick_time = 0", "parent": 47, "children": [50, 51, 52], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 35}}, {"id": 50, "type": "identifier", "text": "prev_light_tick_time", "parent": 49, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 31}}, {"id": 51, "type": "=", "text": "=", "parent": 49, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 33}}, {"id": 52, "type": "number_literal", "text": "0", "parent": 49, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 35}}, {"id": 53, "type": "declaration", "text": "static int curr_ped_tick_time = 0;", "parent": null, "children": [54, 55], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 34}}, {"id": 54, "type": "primitive_type", "text": "int", "parent": 53, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 10}}, {"id": 55, "type": "init_declarator", "text": "curr_ped_tick_time = 0", "parent": 53, "children": [56, 57, 58], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 33}}, {"id": 56, "type": "identifier", "text": "curr_ped_tick_time", "parent": 55, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 29}}, {"id": 57, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 31}}, {"id": 58, "type": "number_literal", "text": "0", "parent": 55, "children": [], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 26, "column": 33}}, {"id": 59, "type": "declaration", "text": "static int prev_ped_tick_time = 0;", "parent": null, "children": [60, 61], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 34}}, {"id": 60, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 10}}, {"id": 61, "type": "init_declarator", "text": "prev_ped_tick_time = 0", "parent": 59, "children": [62, 63, 64], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 33}}, {"id": 62, "type": "identifier", "text": "prev_ped_tick_time", "parent": 61, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 29}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 31}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 61, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 33}}, {"id": 65, "type": "declaration", "text": "uint8_t GreenLightOn = RESET;", "parent": null, "children": [66, 67], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 29}}, {"id": 66, "type": "primitive_type", "text": "uint8_t", "parent": 65, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 67, "type": "init_declarator", "text": "GreenLightOn = RESET", "parent": 65, "children": [68, 69, 70], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 28}}, {"id": 68, "type": "identifier", "text": "GreenLightOn", "parent": 67, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 20}}, {"id": 69, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 22}}, {"id": 70, "type": "identifier", "text": "RESET", "parent": 67, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 28}}, {"id": 71, "type": "declaration", "text": "uint8_t YellowLightOn = RESET;", "parent": null, "children": [72, 73], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 30}}, {"id": 72, "type": "primitive_type", "text": "uint8_t", "parent": 71, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 73, "type": "init_declarator", "text": "YellowLightOn = RESET", "parent": 71, "children": [74, 75, 76], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 29}}, {"id": 74, "type": "identifier", "text": "YellowLightOn", "parent": 73, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 21}}, {"id": 75, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 23}}, {"id": 76, "type": "identifier", "text": "RESET", "parent": 73, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 29}}, {"id": 77, "type": "declaration", "text": "uint8_t RedLightOn = RESET;", "parent": null, "children": [78, 79], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 27}}, {"id": 78, "type": "primitive_type", "text": "uint8_t", "parent": 77, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 79, "type": "init_declarator", "text": "RedLightOn = RESET", "parent": 77, "children": [80, 81, 82], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 26}}, {"id": 80, "type": "identifier", "text": "RedLightOn", "parent": 79, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 18}}, {"id": 81, "type": "=", "text": "=", "parent": 79, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 20}}, {"id": 82, "type": "identifier", "text": "RESET", "parent": 79, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 26}}, {"id": 83, "type": "declaration", "text": "void Pedestrian(void *p);", "parent": null, "children": [84, 85], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 25}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 4}}, {"id": 85, "type": "function_declarator", "text": "Pedestrian(void *p)", "parent": 83, "children": [86, 87], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 24}}, {"id": 86, "type": "identifier", "text": "Pedestrian", "parent": 85, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 15}}, {"id": 87, "type": "parameter_list", "text": "(void *p)", "parent": 85, "children": [88], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 24}}, {"id": 88, "type": "parameter_declaration", "text": "void *p", "parent": 87, "children": [89, 90], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 23}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 20}}, {"id": 90, "type": "pointer_declarator", "text": "*p", "parent": 88, "children": [91, 92], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 23}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 22}}, {"id": 92, "type": "identifier", "text": "p", "parent": 90, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 23}}, {"id": 93, "type": "declaration", "text": "void StartStop(void *p);", "parent": null, "children": [94, 95], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 24}}, {"id": 94, "type": "primitive_type", "text": "void", "parent": 93, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 4}}, {"id": 95, "type": "function_declarator", "text": "StartStop(void *p)", "parent": 93, "children": [96, 97], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 23}}, {"id": 96, "type": "identifier", "text": "StartStop", "parent": 95, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 14}}, {"id": 97, "type": "parameter_list", "text": "(void *p)", "parent": 95, "children": [98], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 23}}, {"id": 98, "type": "parameter_declaration", "text": "void *p", "parent": 97, "children": [99, 100], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 22}}, {"id": 99, "type": "primitive_type", "text": "void", "parent": 98, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 19}}, {"id": 100, "type": "pointer_declarator", "text": "*p", "parent": 98, "children": [101, 102], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 22}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 21}}, {"id": 102, "type": "identifier", "text": "p", "parent": 100, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 22}}, {"id": 103, "type": "declaration", "text": "void Control(void *p);", "parent": null, "children": [104, 105], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 22}}, {"id": 104, "type": "primitive_type", "text": "void", "parent": 103, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 4}}, {"id": 105, "type": "function_declarator", "text": "Control(void *p)", "parent": 103, "children": [106, 107], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 21}}, {"id": 106, "type": "identifier", "text": "Control", "parent": 105, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 12}}, {"id": 107, "type": "parameter_list", "text": "(void *p)", "parent": 105, "children": [108], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 21}}, {"id": 108, "type": "parameter_declaration", "text": "void *p", "parent": 107, "children": [109, 110], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 20}}, {"id": 109, "type": "primitive_type", "text": "void", "parent": 108, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 17}}, {"id": 110, "type": "pointer_declarator", "text": "*p", "parent": 108, "children": [111, 112], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 20}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 19}}, {"id": 112, "type": "identifier", "text": "p", "parent": 110, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 20}}, {"id": 113, "type": "declaration", "text": "void FSM(void);", "parent": null, "children": [114, 115], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 15}}, {"id": 114, "type": "primitive_type", "text": "void", "parent": 113, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 4}}, {"id": 115, "type": "function_declarator", "text": "FSM(void)", "parent": 113, "children": [116, 117], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 14}}, {"id": 116, "type": "identifier", "text": "FSM", "parent": 115, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 8}}, {"id": 117, "type": "parameter_list", "text": "(void)", "parent": 115, "children": [118], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 14}}, {"id": 118, "type": "parameter_declaration", "text": "void", "parent": 117, "children": [119], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 13}}, {"id": 119, "type": "primitive_type", "text": "void", "parent": 118, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 13}}, {"id": 120, "type": "function_definition", "text": "void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) {\r\n while (1) {}\r\n}", "parent": null, "children": [121, 122], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 121, "type": "primitive_type", "text": "void", "parent": 120, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 4}}, {"id": 122, "type": "function_declarator", "text": "vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName)", "parent": 120, "children": [123, 124], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 72}}, {"id": 123, "type": "identifier", "text": "vApplicationStackOverflowHook", "parent": 122, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 34}}, {"id": 124, "type": "parameter_list", "text": "(TaskHandle_t xTask, char *pcTaskName)", "parent": 122, "children": [125, 128], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 72}}, {"id": 125, "type": "parameter_declaration", "text": "TaskHandle_t xTask", "parent": 124, "children": [126, 127], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 53}}, {"id": 126, "type": "type_identifier", "text": "TaskHandle_t", "parent": 125, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 47}}, {"id": 127, "type": "identifier", "text": "xTask", "parent": 125, "children": [], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 53}}, {"id": 128, "type": "parameter_declaration", "text": "char *pcTaskName", "parent": 124, "children": [129, 130], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 71}}, {"id": 129, "type": "primitive_type", "text": "char", "parent": 128, "children": [], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 59}}, {"id": 130, "type": "pointer_declarator", "text": "*pcTaskName", "parent": 128, "children": [131, 132], "start_point": {"row": 59, "column": 60}, "end_point": {"row": 59, "column": 71}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 59, "column": 60}, "end_point": {"row": 59, "column": 61}}, {"id": 132, "type": "identifier", "text": "pcTaskName", "parent": 130, "children": [], "start_point": {"row": 59, "column": 61}, "end_point": {"row": 59, "column": 71}}, {"id": 133, "type": "while_statement", "text": "while (1) {}", "parent": 120, "children": [134], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 14}}, {"id": 134, "type": "parenthesized_expression", "text": "(1)", "parent": 133, "children": [135], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 11}}, {"id": 135, "type": "number_literal", "text": "1", "parent": 134, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 10}}, {"id": 136, "type": "function_definition", "text": "int main(void) {\r\n // Initialize the display and touch\r\n // functionalities of the SSD2119 touch display assembly.\r\n LCD_Init();\r\n Touch_Init();\r\n\r\n // Draw initial state of the screen\r\n LCD_ColorFill(BACKGROUND_COLOR);\r\n LCD_SetTextColor(255, 255, 255);\r\n LCD_SetCursor(0, 0);\r\n\r\n // Draw buttons\r\n LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR);\r\n LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR);\r\n\r\n // Label buttons\r\n LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y);\r\n LCD_PrintString(\"Start/Stop\");\r\n LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y);\r\n LCD_PrintString(\"Pedestrian\");\r\n LCD_SetCursor(0, 0);\r\n\r\n xTaskCreate(StartStop, (const char *)\"StartStopButton\", 1024, NULL, 0U, NULL);\r\n xTaskCreate(Pedestrian, (const char *)\"PedestrianButton\", 1024, NULL, 0U, NULL);\r\n xTaskCreate(Control, (const char *)\"Control FSM\", 1024, NULL, 0U, NULL);\r\n\r\n vTaskStartScheduler();\r\n\r\n while(1);\r\n}", "parent": null, "children": [137, 138], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 92, "column": 1}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 136, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 3}}, {"id": 138, "type": "function_declarator", "text": "main(void)", "parent": 136, "children": [139, 140], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 14}}, {"id": 139, "type": "identifier", "text": "main", "parent": 138, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 8}}, {"id": 140, "type": "parameter_list", "text": "(void)", "parent": 138, "children": [141], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 14}}, {"id": 141, "type": "parameter_declaration", "text": "void", "parent": 140, "children": [142], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 13}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 13}}, {"id": 143, "type": "call_expression", "text": "LCD_Init()", "parent": 136, "children": [144, 145], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 12}}, {"id": 144, "type": "identifier", "text": "LCD_Init", "parent": 143, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 10}}, {"id": 145, "type": "argument_list", "text": "()", "parent": 143, "children": [], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 12}}, {"id": 146, "type": "call_expression", "text": "Touch_Init()", "parent": 136, "children": [147, 148], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 14}}, {"id": 147, "type": "identifier", "text": "Touch_Init", "parent": 146, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 12}}, {"id": 148, "type": "argument_list", "text": "()", "parent": 146, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 14}}, {"id": 149, "type": "call_expression", "text": "LCD_ColorFill(BACKGROUND_COLOR)", "parent": 136, "children": [150, 151], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 33}}, {"id": 150, "type": "identifier", "text": "LCD_ColorFill", "parent": 149, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 15}}, {"id": 151, "type": "argument_list", "text": "(BACKGROUND_COLOR)", "parent": 149, "children": [152], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 33}}, {"id": 152, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 151, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 32}}, {"id": 153, "type": "call_expression", "text": "LCD_SetTextColor(255, 255, 255)", "parent": 136, "children": [154, 155], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 33}}, {"id": 154, "type": "identifier", "text": "LCD_SetTextColor", "parent": 153, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 18}}, {"id": 155, "type": "argument_list", "text": "(255, 255, 255)", "parent": 153, "children": [156, 157, 158], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 33}}, {"id": 156, "type": "number_literal", "text": "255", "parent": 155, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 22}}, {"id": 157, "type": "number_literal", "text": "255", "parent": 155, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 27}}, {"id": 158, "type": "number_literal", "text": "255", "parent": 155, "children": [], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 32}}, {"id": 159, "type": "call_expression", "text": "LCD_SetCursor(0, 0)", "parent": 136, "children": [160, 161], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 21}}, {"id": 160, "type": "identifier", "text": "LCD_SetCursor", "parent": 159, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 15}}, {"id": 161, "type": "argument_list", "text": "(0, 0)", "parent": 159, "children": [162, 163], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 21}}, {"id": 162, "type": "number_literal", "text": "0", "parent": 161, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 17}}, {"id": 163, "type": "number_literal", "text": "0", "parent": 161, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 20}}, {"id": 164, "type": "call_expression", "text": "LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR)", "parent": 136, "children": [165, 166], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 76}}, {"id": 165, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 164, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 22}}, {"id": 166, "type": "argument_list", "text": "(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR)", "parent": 164, "children": [167, 168, 169, 170], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 76}}, {"id": 167, "type": "identifier", "text": "START_STOP_X", "parent": 166, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 35}}, {"id": 168, "type": "identifier", "text": "START_STOP_Y", "parent": 166, "children": [], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 49}}, {"id": 169, "type": "identifier", "text": "RADIUS", "parent": 166, "children": [], "start_point": {"row": 75, "column": 51}, "end_point": {"row": 75, "column": 57}}, {"id": 170, "type": "identifier", "text": "START_STOP_COLOR", "parent": 166, "children": [], "start_point": {"row": 75, "column": 59}, "end_point": {"row": 75, "column": 75}}, {"id": 171, "type": "call_expression", "text": "LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR)", "parent": 136, "children": [172, 173], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 55}}, {"id": 172, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 171, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 22}}, {"id": 173, "type": "argument_list", "text": "(PED_X, PED_Y, RADIUS, PED_COLOR)", "parent": 171, "children": [174, 175, 176, 177], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 55}}, {"id": 174, "type": "identifier", "text": "PED_X", "parent": 173, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 28}}, {"id": 175, "type": "identifier", "text": "PED_Y", "parent": 173, "children": [], "start_point": {"row": 76, "column": 30}, "end_point": {"row": 76, "column": 35}}, {"id": 176, "type": "identifier", "text": "RADIUS", "parent": 173, "children": [], "start_point": {"row": 76, "column": 37}, "end_point": {"row": 76, "column": 43}}, {"id": 177, "type": "identifier", "text": "PED_COLOR", "parent": 173, "children": [], "start_point": {"row": 76, "column": 45}, "end_point": {"row": 76, "column": 54}}, {"id": 178, "type": "call_expression", "text": "LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y)", "parent": 136, "children": [179, 180], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 55}}, {"id": 179, "type": "identifier", "text": "LCD_SetCursor", "parent": 178, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 15}}, {"id": 180, "type": "argument_list", "text": "(START_STOP_LABEL_X, START_STOP_LABEL_Y)", "parent": 178, "children": [181, 182], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 55}}, {"id": 181, "type": "identifier", "text": "START_STOP_LABEL_X", "parent": 180, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 34}}, {"id": 182, "type": "identifier", "text": "START_STOP_LABEL_Y", "parent": 180, "children": [], "start_point": {"row": 79, "column": 36}, "end_point": {"row": 79, "column": 54}}, {"id": 183, "type": "call_expression", "text": "LCD_PrintString(\"Start/Stop\")", "parent": 136, "children": [184, 185], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 31}}, {"id": 184, "type": "identifier", "text": "LCD_PrintString", "parent": 183, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 17}}, {"id": 185, "type": "argument_list", "text": "(\"Start/Stop\")", "parent": 183, "children": [186], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 31}}, {"id": 186, "type": "string_literal", "text": "\"Start/Stop\"", "parent": 185, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 30}}, {"id": 187, "type": "call_expression", "text": "LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y)", "parent": 136, "children": [188, 189], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 41}}, {"id": 188, "type": "identifier", "text": "LCD_SetCursor", "parent": 187, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 15}}, {"id": 189, "type": "argument_list", "text": "(PED_LABEL_X, PED_LABEL_Y)", "parent": 187, "children": [190, 191], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 41}}, {"id": 190, "type": "identifier", "text": "PED_LABEL_X", "parent": 189, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 27}}, {"id": 191, "type": "identifier", "text": "PED_LABEL_Y", "parent": 189, "children": [], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 40}}, {"id": 192, "type": "call_expression", "text": "LCD_PrintString(\"Pedestrian\")", "parent": 136, "children": [193, 194], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 31}}, {"id": 193, "type": "identifier", "text": "LCD_PrintString", "parent": 192, "children": [], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 17}}, {"id": 194, "type": "argument_list", "text": "(\"Pedestrian\")", "parent": 192, "children": [195], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 31}}, {"id": 195, "type": "string_literal", "text": "\"Pedestrian\"", "parent": 194, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 30}}, {"id": 196, "type": "call_expression", "text": "LCD_SetCursor(0, 0)", "parent": 136, "children": [197, 198], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 21}}, {"id": 197, "type": "identifier", "text": "LCD_SetCursor", "parent": 196, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 15}}, {"id": 198, "type": "argument_list", "text": "(0, 0)", "parent": 196, "children": [199, 200], "start_point": {"row": 83, "column": 15}, "end_point": {"row": 83, "column": 21}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 198, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 17}}, {"id": 200, "type": "number_literal", "text": "0", "parent": 198, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 20}}, {"id": 201, "type": "call_expression", "text": "xTaskCreate(StartStop, (const char *)\"StartStopButton\", 1024, NULL, 0U, NULL)", "parent": 136, "children": [202, 203], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 79}}, {"id": 202, "type": "identifier", "text": "xTaskCreate", "parent": 201, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 13}}, {"id": 203, "type": "argument_list", "text": "(StartStop, (const char *)\"StartStopButton\", 1024, NULL, 0U, NULL)", "parent": 201, "children": [204, 205, 211, 212, 214, 215], "start_point": {"row": 85, "column": 13}, "end_point": {"row": 85, "column": 79}}, {"id": 204, "type": "identifier", "text": "StartStop", "parent": 203, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 23}}, {"id": 205, "type": "cast_expression", "text": "(const char *)\"StartStopButton\"", "parent": 203, "children": [206, 210], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 56}}, {"id": 206, "type": "type_descriptor", "text": "const char *", "parent": 205, "children": [207, 208], "start_point": {"row": 85, "column": 26}, "end_point": {"row": 85, "column": 38}}, {"id": 207, "type": "primitive_type", "text": "char", "parent": 206, "children": [], "start_point": {"row": 85, "column": 32}, "end_point": {"row": 85, "column": 36}}, {"id": 208, "type": "abstract_pointer_declarator", "text": "*", "parent": 206, "children": [209], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 38}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 38}}, {"id": 210, "type": "string_literal", "text": "\"StartStopButton\"", "parent": 205, "children": [], "start_point": {"row": 85, "column": 39}, "end_point": {"row": 85, "column": 56}}, {"id": 211, "type": "number_literal", "text": "1024", "parent": 203, "children": [], "start_point": {"row": 85, "column": 58}, "end_point": {"row": 85, "column": 62}}, {"id": 212, "type": "null", "text": "NULL", "parent": 203, "children": [213], "start_point": {"row": 85, "column": 64}, "end_point": {"row": 85, "column": 68}}, {"id": 213, "type": "NULL", "text": "NULL", "parent": 212, "children": [], "start_point": {"row": 85, "column": 64}, "end_point": {"row": 85, "column": 68}}, {"id": 214, "type": "number_literal", "text": "0U", "parent": 203, "children": [], "start_point": {"row": 85, "column": 70}, "end_point": {"row": 85, "column": 72}}, {"id": 215, "type": "null", "text": "NULL", "parent": 203, "children": [216], "start_point": {"row": 85, "column": 74}, "end_point": {"row": 85, "column": 78}}, {"id": 216, "type": "NULL", "text": "NULL", "parent": 215, "children": [], "start_point": {"row": 85, "column": 74}, "end_point": {"row": 85, "column": 78}}, {"id": 217, "type": "call_expression", "text": "xTaskCreate(Pedestrian, (const char *)\"PedestrianButton\", 1024, NULL, 0U, NULL)", "parent": 136, "children": [218, 219], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 81}}, {"id": 218, "type": "identifier", "text": "xTaskCreate", "parent": 217, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 13}}, {"id": 219, "type": "argument_list", "text": "(Pedestrian, (const char *)\"PedestrianButton\", 1024, NULL, 0U, NULL)", "parent": 217, "children": [220, 221, 227, 228, 230, 231], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 81}}, {"id": 220, "type": "identifier", "text": "Pedestrian", "parent": 219, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 24}}, {"id": 221, "type": "cast_expression", "text": "(const char *)\"PedestrianButton\"", "parent": 219, "children": [222, 226], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 58}}, {"id": 222, "type": "type_descriptor", "text": "const char *", "parent": 221, "children": [223, 224], "start_point": {"row": 86, "column": 27}, "end_point": {"row": 86, "column": 39}}, {"id": 223, "type": "primitive_type", "text": "char", "parent": 222, "children": [], "start_point": {"row": 86, "column": 33}, "end_point": {"row": 86, "column": 37}}, {"id": 224, "type": "abstract_pointer_declarator", "text": "*", "parent": 222, "children": [225], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 39}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 39}}, {"id": 226, "type": "string_literal", "text": "\"PedestrianButton\"", "parent": 221, "children": [], "start_point": {"row": 86, "column": 40}, "end_point": {"row": 86, "column": 58}}, {"id": 227, "type": "number_literal", "text": "1024", "parent": 219, "children": [], "start_point": {"row": 86, "column": 60}, "end_point": {"row": 86, "column": 64}}, {"id": 228, "type": "null", "text": "NULL", "parent": 219, "children": [229], "start_point": {"row": 86, "column": 66}, "end_point": {"row": 86, "column": 70}}, {"id": 229, "type": "NULL", "text": "NULL", "parent": 228, "children": [], "start_point": {"row": 86, "column": 66}, "end_point": {"row": 86, "column": 70}}, {"id": 230, "type": "number_literal", "text": "0U", "parent": 219, "children": [], "start_point": {"row": 86, "column": 72}, "end_point": {"row": 86, "column": 74}}, {"id": 231, "type": "null", "text": "NULL", "parent": 219, "children": [232], "start_point": {"row": 86, "column": 76}, "end_point": {"row": 86, "column": 80}}, {"id": 232, "type": "NULL", "text": "NULL", "parent": 231, "children": [], "start_point": {"row": 86, "column": 76}, "end_point": {"row": 86, "column": 80}}, {"id": 233, "type": "call_expression", "text": "xTaskCreate(Control, (const char *)\"Control FSM\", 1024, NULL, 0U, NULL)", "parent": 136, "children": [234, 235], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 73}}, {"id": 234, "type": "identifier", "text": "xTaskCreate", "parent": 233, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 13}}, {"id": 235, "type": "argument_list", "text": "(Control, (const char *)\"Control FSM\", 1024, NULL, 0U, NULL)", "parent": 233, "children": [236, 237, 243, 244, 246, 247], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 73}}, {"id": 236, "type": "identifier", "text": "Control", "parent": 235, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 21}}, {"id": 237, "type": "cast_expression", "text": "(const char *)\"Control FSM\"", "parent": 235, "children": [238, 242], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 50}}, {"id": 238, "type": "type_descriptor", "text": "const char *", "parent": 237, "children": [239, 240], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 36}}, {"id": 239, "type": "primitive_type", "text": "char", "parent": 238, "children": [], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 34}}, {"id": 240, "type": "abstract_pointer_declarator", "text": "*", "parent": 238, "children": [241], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 36}}, {"id": 241, "type": "*", "text": "*", "parent": 240, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 36}}, {"id": 242, "type": "string_literal", "text": "\"Control FSM\"", "parent": 237, "children": [], "start_point": {"row": 87, "column": 37}, "end_point": {"row": 87, "column": 50}}, {"id": 243, "type": "number_literal", "text": "1024", "parent": 235, "children": [], "start_point": {"row": 87, "column": 52}, "end_point": {"row": 87, "column": 56}}, {"id": 244, "type": "null", "text": "NULL", "parent": 235, "children": [245], "start_point": {"row": 87, "column": 58}, "end_point": {"row": 87, "column": 62}}, {"id": 245, "type": "NULL", "text": "NULL", "parent": 244, "children": [], "start_point": {"row": 87, "column": 58}, "end_point": {"row": 87, "column": 62}}, {"id": 246, "type": "number_literal", "text": "0U", "parent": 235, "children": [], "start_point": {"row": 87, "column": 64}, "end_point": {"row": 87, "column": 66}}, {"id": 247, "type": "null", "text": "NULL", "parent": 235, "children": [248], "start_point": {"row": 87, "column": 68}, "end_point": {"row": 87, "column": 72}}, {"id": 248, "type": "NULL", "text": "NULL", "parent": 247, "children": [], "start_point": {"row": 87, "column": 68}, "end_point": {"row": 87, "column": 72}}, {"id": 249, "type": "call_expression", "text": "vTaskStartScheduler()", "parent": 136, "children": [250, 251], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 23}}, {"id": 250, "type": "identifier", "text": "vTaskStartScheduler", "parent": 249, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 21}}, {"id": 251, "type": "argument_list", "text": "()", "parent": 249, "children": [], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 23}}, {"id": 252, "type": "while_statement", "text": "while(1);", "parent": 136, "children": [253], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 11}}, {"id": 253, "type": "parenthesized_expression", "text": "(1)", "parent": 252, "children": [254], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 10}}, {"id": 254, "type": "number_literal", "text": "1", "parent": 253, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 9}}, {"id": 255, "type": "function_definition", "text": "void StartStop(void *p) {\r\n // keep track of time\r\n static int curr_onoff_tick_time = 0;\r\n static int prev_onoff_tick_time = 0;\r\n curr_onoff_tick_time = xTaskGetTickCount();\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n\r\n // coordinates of a touch\r\n unsigned long x = 0;\r\n unsigned long y = 0;\r\n while (1) {\r\n curr_onoff_tick_time = xTaskGetTickCount();\r\n\r\n // Check whether the virtual button is pressed\r\n x = Touch_ReadX();\r\n y = Touch_ReadY();\r\n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \r\n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n onoff_pressed = SET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n else {\r\n onoff_pressed = RESET;\r\n }\r\n } else {\r\n onoff_pressed = RESET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n\r\n vTaskDelay(1);\r\n }\r\n}", "parent": null, "children": [256, 257], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 127, "column": 1}}, {"id": 256, "type": "primitive_type", "text": "void", "parent": 255, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 4}}, {"id": 257, "type": "function_declarator", "text": "StartStop(void *p)", "parent": 255, "children": [258, 259], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 23}}, {"id": 258, "type": "identifier", "text": "StartStop", "parent": 257, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 14}}, {"id": 259, "type": "parameter_list", "text": "(void *p)", "parent": 257, "children": [260], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 23}}, {"id": 260, "type": "parameter_declaration", "text": "void *p", "parent": 259, "children": [261, 262], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 22}}, {"id": 261, "type": "primitive_type", "text": "void", "parent": 260, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 19}}, {"id": 262, "type": "pointer_declarator", "text": "*p", "parent": 260, "children": [263, 264], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 22}}, {"id": 263, "type": "*", "text": "*", "parent": 262, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 21}}, {"id": 264, "type": "identifier", "text": "p", "parent": 262, "children": [], "start_point": {"row": 94, "column": 21}, "end_point": {"row": 94, "column": 22}}, {"id": 265, "type": "declaration", "text": "static int curr_onoff_tick_time = 0;", "parent": 255, "children": [266, 267], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 38}}, {"id": 266, "type": "primitive_type", "text": "int", "parent": 265, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 12}}, {"id": 267, "type": "init_declarator", "text": "curr_onoff_tick_time = 0", "parent": 265, "children": [268, 269, 270], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 37}}, {"id": 268, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 267, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 33}}, {"id": 269, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 96, "column": 34}, "end_point": {"row": 96, "column": 35}}, {"id": 270, "type": "number_literal", "text": "0", "parent": 267, "children": [], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 37}}, {"id": 271, "type": "declaration", "text": "static int prev_onoff_tick_time = 0;", "parent": 255, "children": [272, 273], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 38}}, {"id": 272, "type": "primitive_type", "text": "int", "parent": 271, "children": [], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 12}}, {"id": 273, "type": "init_declarator", "text": "prev_onoff_tick_time = 0", "parent": 271, "children": [274, 275, 276], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 37}}, {"id": 274, "type": "identifier", "text": "prev_onoff_tick_time", "parent": 273, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 33}}, {"id": 275, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 97, "column": 34}, "end_point": {"row": 97, "column": 35}}, {"id": 276, "type": "number_literal", "text": "0", "parent": 273, "children": [], "start_point": {"row": 97, "column": 36}, "end_point": {"row": 97, "column": 37}}, {"id": 277, "type": "assignment_expression", "text": "curr_onoff_tick_time = xTaskGetTickCount()", "parent": 255, "children": [278, 279, 280], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 44}}, {"id": 278, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 277, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 22}}, {"id": 279, "type": "=", "text": "=", "parent": 277, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 24}}, {"id": 280, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 277, "children": [281, 282], "start_point": {"row": 98, "column": 25}, "end_point": {"row": 98, "column": 44}}, {"id": 281, "type": "identifier", "text": "xTaskGetTickCount", "parent": 280, "children": [], "start_point": {"row": 98, "column": 25}, "end_point": {"row": 98, "column": 42}}, {"id": 282, "type": "argument_list", "text": "()", "parent": 280, "children": [], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 44}}, {"id": 283, "type": "assignment_expression", "text": "prev_onoff_tick_time = curr_onoff_tick_time", "parent": 255, "children": [284, 285, 286], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 45}}, {"id": 284, "type": "identifier", "text": "prev_onoff_tick_time", "parent": 283, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 22}}, {"id": 285, "type": "=", "text": "=", "parent": 283, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 24}}, {"id": 286, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 283, "children": [], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 45}}, {"id": 287, "type": "declaration", "text": "unsigned long x = 0;", "parent": 255, "children": [288, 291], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 22}}, {"id": 288, "type": "sized_type_specifier", "text": "unsigned long", "parent": 287, "children": [289, 290], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 15}}, {"id": 289, "type": "unsigned", "text": "unsigned", "parent": 288, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 10}}, {"id": 290, "type": "long", "text": "long", "parent": 288, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 15}}, {"id": 291, "type": "init_declarator", "text": "x = 0", "parent": 287, "children": [292, 293, 294], "start_point": {"row": 102, "column": 16}, "end_point": {"row": 102, "column": 21}}, {"id": 292, "type": "identifier", "text": "x", "parent": 291, "children": [], "start_point": {"row": 102, "column": 16}, "end_point": {"row": 102, "column": 17}}, {"id": 293, "type": "=", "text": "=", "parent": 291, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 19}}, {"id": 294, "type": "number_literal", "text": "0", "parent": 291, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 21}}, {"id": 295, "type": "declaration", "text": "unsigned long y = 0;", "parent": 255, "children": [296, 299], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 22}}, {"id": 296, "type": "sized_type_specifier", "text": "unsigned long", "parent": 295, "children": [297, 298], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 15}}, {"id": 297, "type": "unsigned", "text": "unsigned", "parent": 296, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 10}}, {"id": 298, "type": "long", "text": "long", "parent": 296, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 15}}, {"id": 299, "type": "init_declarator", "text": "y = 0", "parent": 295, "children": [300, 301, 302], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 21}}, {"id": 300, "type": "identifier", "text": "y", "parent": 299, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 17}}, {"id": 301, "type": "=", "text": "=", "parent": 299, "children": [], "start_point": {"row": 103, "column": 18}, "end_point": {"row": 103, "column": 19}}, {"id": 302, "type": "number_literal", "text": "0", "parent": 299, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 21}}, {"id": 303, "type": "while_statement", "text": "while (1) {\r\n curr_onoff_tick_time = xTaskGetTickCount();\r\n\r\n // Check whether the virtual button is pressed\r\n x = Touch_ReadX();\r\n y = Touch_ReadY();\r\n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \r\n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n onoff_pressed = SET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n else {\r\n onoff_pressed = RESET;\r\n }\r\n } else {\r\n onoff_pressed = RESET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n\r\n vTaskDelay(1);\r\n }", "parent": 255, "children": [304], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 126, "column": 3}}, {"id": 304, "type": "parenthesized_expression", "text": "(1)", "parent": 303, "children": [305], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 11}}, {"id": 305, "type": "number_literal", "text": "1", "parent": 304, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 10}}, {"id": 306, "type": "assignment_expression", "text": "curr_onoff_tick_time = xTaskGetTickCount()", "parent": 303, "children": [307, 308, 309], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 46}}, {"id": 307, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 306, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 24}}, {"id": 308, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 105, "column": 25}, "end_point": {"row": 105, "column": 26}}, {"id": 309, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 306, "children": [310, 311], "start_point": {"row": 105, "column": 27}, "end_point": {"row": 105, "column": 46}}, {"id": 310, "type": "identifier", "text": "xTaskGetTickCount", "parent": 309, "children": [], "start_point": {"row": 105, "column": 27}, "end_point": {"row": 105, "column": 44}}, {"id": 311, "type": "argument_list", "text": "()", "parent": 309, "children": [], "start_point": {"row": 105, "column": 44}, "end_point": {"row": 105, "column": 46}}, {"id": 312, "type": "assignment_expression", "text": "x = Touch_ReadX()", "parent": 303, "children": [313, 314, 315], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 21}}, {"id": 313, "type": "identifier", "text": "x", "parent": 312, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 5}}, {"id": 314, "type": "=", "text": "=", "parent": 312, "children": [], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 7}}, {"id": 315, "type": "call_expression", "text": "Touch_ReadX()", "parent": 312, "children": [316, 317], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 21}}, {"id": 316, "type": "identifier", "text": "Touch_ReadX", "parent": 315, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 19}}, {"id": 317, "type": "argument_list", "text": "()", "parent": 315, "children": [], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 21}}, {"id": 318, "type": "assignment_expression", "text": "y = Touch_ReadY()", "parent": 303, "children": [319, 320, 321], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 21}}, {"id": 319, "type": "identifier", "text": "y", "parent": 318, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 5}}, {"id": 320, "type": "=", "text": "=", "parent": 318, "children": [], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 7}}, {"id": 321, "type": "call_expression", "text": "Touch_ReadY()", "parent": 318, "children": [322, 323], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 21}}, {"id": 322, "type": "identifier", "text": "Touch_ReadY", "parent": 321, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 19}}, {"id": 323, "type": "argument_list", "text": "()", "parent": 321, "children": [], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 21}}, {"id": 324, "type": "if_statement", "text": "if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \r\n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n onoff_pressed = SET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n else {\r\n onoff_pressed = RESET;\r\n }\r\n } else {\r\n onoff_pressed = RESET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }", "parent": 303, "children": [325, 374], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 123, "column": 5}}, {"id": 325, "type": "parenthesized_expression", "text": "((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT))", "parent": 324, "children": [326], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 111, "column": 66}}, {"id": 326, "type": "parenthesized_expression", "text": "(START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)", "parent": 325, "children": [327], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 111, "column": 65}}, {"id": 327, "type": "binary_expression", "text": "START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT", "parent": 326, "children": [328, 344, 345], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 111, "column": 64}}, {"id": 328, "type": "binary_expression", "text": "START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y", "parent": 327, "children": [329, 339, 340], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 111, "column": 36}}, {"id": 329, "type": "binary_expression", "text": "START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT", "parent": 328, "children": [330, 334, 335], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 64}}, {"id": 330, "type": "binary_expression", "text": "START_STOP_LEFT_LIMIT < x", "parent": 329, "children": [331, 332, 333], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 34}}, {"id": 331, "type": "identifier", "text": "START_STOP_LEFT_LIMIT", "parent": 330, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 30}}, {"id": 332, "type": "<", "text": "<", "parent": 330, "children": [], "start_point": {"row": 110, "column": 31}, "end_point": {"row": 110, "column": 32}}, {"id": 333, "type": "identifier", "text": "x", "parent": 330, "children": [], "start_point": {"row": 110, "column": 33}, "end_point": {"row": 110, "column": 34}}, {"id": 334, "type": "&&", "text": "&&", "parent": 329, "children": [], "start_point": {"row": 110, "column": 35}, "end_point": {"row": 110, "column": 37}}, {"id": 335, "type": "binary_expression", "text": "x < START_STOP_RIGHT_LIMIT", "parent": 329, "children": [336, 337, 338], "start_point": {"row": 110, "column": 38}, "end_point": {"row": 110, "column": 64}}, {"id": 336, "type": "identifier", "text": "x", "parent": 335, "children": [], "start_point": {"row": 110, "column": 38}, "end_point": {"row": 110, "column": 39}}, {"id": 337, "type": "<", "text": "<", "parent": 335, "children": [], "start_point": {"row": 110, "column": 40}, "end_point": {"row": 110, "column": 41}}, {"id": 338, "type": "identifier", "text": "START_STOP_RIGHT_LIMIT", "parent": 335, "children": [], "start_point": {"row": 110, "column": 42}, "end_point": {"row": 110, "column": 64}}, {"id": 339, "type": "&&", "text": "&&", "parent": 328, "children": [], "start_point": {"row": 110, "column": 65}, "end_point": {"row": 110, "column": 67}}, {"id": 340, "type": "binary_expression", "text": "START_STOP_BOTTOM_LIMIT < y", "parent": 328, "children": [341, 342, 343], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 36}}, {"id": 341, "type": "identifier", "text": "START_STOP_BOTTOM_LIMIT", "parent": 340, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 32}}, {"id": 342, "type": "<", "text": "<", "parent": 340, "children": [], "start_point": {"row": 111, "column": 33}, "end_point": {"row": 111, "column": 34}}, {"id": 343, "type": "identifier", "text": "y", "parent": 340, "children": [], "start_point": {"row": 111, "column": 35}, "end_point": {"row": 111, "column": 36}}, {"id": 344, "type": "&&", "text": "&&", "parent": 327, "children": [], "start_point": {"row": 111, "column": 37}, "end_point": {"row": 111, "column": 39}}, {"id": 345, "type": "binary_expression", "text": "y < START_STOP_TOP_LIMIT", "parent": 327, "children": [346, 347, 348], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 64}}, {"id": 346, "type": "identifier", "text": "y", "parent": 345, "children": [], "start_point": {"row": 111, "column": 40}, "end_point": {"row": 111, "column": 41}}, {"id": 347, "type": "<", "text": "<", "parent": 345, "children": [], "start_point": {"row": 111, "column": 42}, "end_point": {"row": 111, "column": 43}}, {"id": 348, "type": "identifier", "text": "START_STOP_TOP_LIMIT", "parent": 345, "children": [], "start_point": {"row": 111, "column": 44}, "end_point": {"row": 111, "column": 64}}, {"id": 349, "type": "if_statement", "text": "if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n onoff_pressed = SET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n else {\r\n onoff_pressed = RESET;\r\n }", "parent": 324, "children": [350, 369], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 119, "column": 7}}, {"id": 350, "type": "parenthesized_expression", "text": "(curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S))", "parent": 349, "children": [351], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 86}}, {"id": 351, "type": "binary_expression", "text": "curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)", "parent": 350, "children": [352, 356, 357], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 85}}, {"id": 352, "type": "binary_expression", "text": "curr_onoff_tick_time - prev_onoff_tick_time", "parent": 351, "children": [353, 354, 355], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 53}}, {"id": 353, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 352, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 30}}, {"id": 354, "type": "-", "text": "-", "parent": 352, "children": [], "start_point": {"row": 112, "column": 31}, "end_point": {"row": 112, "column": 32}}, {"id": 355, "type": "identifier", "text": "prev_onoff_tick_time", "parent": 352, "children": [], "start_point": {"row": 112, "column": 33}, "end_point": {"row": 112, "column": 53}}, {"id": 356, "type": ">=", "text": ">=", "parent": 351, "children": [], "start_point": {"row": 112, "column": 54}, "end_point": {"row": 112, "column": 56}}, {"id": 357, "type": "call_expression", "text": "SEC_TO_MS(BUTTON_PRESS_IN_S)", "parent": 351, "children": [358, 359], "start_point": {"row": 112, "column": 57}, "end_point": {"row": 112, "column": 85}}, {"id": 358, "type": "identifier", "text": "SEC_TO_MS", "parent": 357, "children": [], "start_point": {"row": 112, "column": 57}, "end_point": {"row": 112, "column": 66}}, {"id": 359, "type": "argument_list", "text": "(BUTTON_PRESS_IN_S)", "parent": 357, "children": [360], "start_point": {"row": 112, "column": 66}, "end_point": {"row": 112, "column": 85}}, {"id": 360, "type": "identifier", "text": "BUTTON_PRESS_IN_S", "parent": 359, "children": [], "start_point": {"row": 112, "column": 67}, "end_point": {"row": 112, "column": 84}}, {"id": 361, "type": "assignment_expression", "text": "onoff_pressed = SET", "parent": 349, "children": [362, 363, 364], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 27}}, {"id": 362, "type": "identifier", "text": "onoff_pressed", "parent": 361, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 21}}, {"id": 363, "type": "=", "text": "=", "parent": 361, "children": [], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 23}}, {"id": 364, "type": "identifier", "text": "SET", "parent": 361, "children": [], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 27}}, {"id": 365, "type": "assignment_expression", "text": "prev_onoff_tick_time = curr_onoff_tick_time", "parent": 349, "children": [366, 367, 368], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 51}}, {"id": 366, "type": "identifier", "text": "prev_onoff_tick_time", "parent": 365, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 28}}, {"id": 367, "type": "=", "text": "=", "parent": 365, "children": [], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 30}}, {"id": 368, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 365, "children": [], "start_point": {"row": 115, "column": 31}, "end_point": {"row": 115, "column": 51}}, {"id": 369, "type": "else_clause", "text": "else {\r\n onoff_pressed = RESET;\r\n }", "parent": 349, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 119, "column": 7}}, {"id": 370, "type": "assignment_expression", "text": "onoff_pressed = RESET", "parent": 369, "children": [371, 372, 373], "start_point": {"row": 118, "column": 8}, "end_point": {"row": 118, "column": 29}}, {"id": 371, "type": "identifier", "text": "onoff_pressed", "parent": 370, "children": [], "start_point": {"row": 118, "column": 8}, "end_point": {"row": 118, "column": 21}}, {"id": 372, "type": "=", "text": "=", "parent": 370, "children": [], "start_point": {"row": 118, "column": 22}, "end_point": {"row": 118, "column": 23}}, {"id": 373, "type": "identifier", "text": "RESET", "parent": 370, "children": [], "start_point": {"row": 118, "column": 24}, "end_point": {"row": 118, "column": 29}}, {"id": 374, "type": "else_clause", "text": "else {\r\n onoff_pressed = RESET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }", "parent": 324, "children": [], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 123, "column": 5}}, {"id": 375, "type": "assignment_expression", "text": "onoff_pressed = RESET", "parent": 374, "children": [376, 377, 378], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 27}}, {"id": 376, "type": "identifier", "text": "onoff_pressed", "parent": 375, "children": [], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 19}}, {"id": 377, "type": "=", "text": "=", "parent": 375, "children": [], "start_point": {"row": 121, "column": 20}, "end_point": {"row": 121, "column": 21}}, {"id": 378, "type": "identifier", "text": "RESET", "parent": 375, "children": [], "start_point": {"row": 121, "column": 22}, "end_point": {"row": 121, "column": 27}}, {"id": 379, "type": "assignment_expression", "text": "prev_onoff_tick_time = curr_onoff_tick_time", "parent": 374, "children": [380, 381, 382], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 49}}, {"id": 380, "type": "identifier", "text": "prev_onoff_tick_time", "parent": 379, "children": [], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 26}}, {"id": 381, "type": "=", "text": "=", "parent": 379, "children": [], "start_point": {"row": 122, "column": 27}, "end_point": {"row": 122, "column": 28}}, {"id": 382, "type": "identifier", "text": "curr_onoff_tick_time", "parent": 379, "children": [], "start_point": {"row": 122, "column": 29}, "end_point": {"row": 122, "column": 49}}, {"id": 383, "type": "call_expression", "text": "vTaskDelay(1)", "parent": 303, "children": [384, 385], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 17}}, {"id": 384, "type": "identifier", "text": "vTaskDelay", "parent": 383, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 14}}, {"id": 385, "type": "argument_list", "text": "(1)", "parent": 383, "children": [386], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 17}}, {"id": 386, "type": "number_literal", "text": "1", "parent": 385, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 16}}, {"id": 387, "type": "function_definition", "text": "void Pedestrian(void *p) {\r\n curr_ped_tick_time = xTaskGetTickCount();\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n\r\n // coordinates of a touch\r\n unsigned long x = 0;\r\n unsigned long y = 0;\r\n\r\n while (1) {\r\n curr_ped_tick_time = xTaskGetTickCount();\r\n\r\n // check if button has been pressed\r\n x = Touch_ReadX();\r\n y = Touch_ReadY();\r\n\r\n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \r\n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n pedestrian_pressed = SET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n else {\r\n pedestrian_pressed = RESET;\r\n }\r\n } else {\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n\r\n vTaskDelay(1);\r\n }\r\n}", "parent": null, "children": [388, 389], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 161, "column": 1}}, {"id": 388, "type": "primitive_type", "text": "void", "parent": 387, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 4}}, {"id": 389, "type": "function_declarator", "text": "Pedestrian(void *p)", "parent": 387, "children": [390, 391], "start_point": {"row": 129, "column": 5}, "end_point": {"row": 129, "column": 24}}, {"id": 390, "type": "identifier", "text": "Pedestrian", "parent": 389, "children": [], "start_point": {"row": 129, "column": 5}, "end_point": {"row": 129, "column": 15}}, {"id": 391, "type": "parameter_list", "text": "(void *p)", "parent": 389, "children": [392], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 24}}, {"id": 392, "type": "parameter_declaration", "text": "void *p", "parent": 391, "children": [393, 394], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 23}}, {"id": 393, "type": "primitive_type", "text": "void", "parent": 392, "children": [], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 20}}, {"id": 394, "type": "pointer_declarator", "text": "*p", "parent": 392, "children": [395, 396], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 23}}, {"id": 395, "type": "*", "text": "*", "parent": 394, "children": [], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 22}}, {"id": 396, "type": "identifier", "text": "p", "parent": 394, "children": [], "start_point": {"row": 129, "column": 22}, "end_point": {"row": 129, "column": 23}}, {"id": 397, "type": "assignment_expression", "text": "curr_ped_tick_time = xTaskGetTickCount()", "parent": 387, "children": [398, 399, 400], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 42}}, {"id": 398, "type": "identifier", "text": "curr_ped_tick_time", "parent": 397, "children": [], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 20}}, {"id": 399, "type": "=", "text": "=", "parent": 397, "children": [], "start_point": {"row": 130, "column": 21}, "end_point": {"row": 130, "column": 22}}, {"id": 400, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 397, "children": [401, 402], "start_point": {"row": 130, "column": 23}, "end_point": {"row": 130, "column": 42}}, {"id": 401, "type": "identifier", "text": "xTaskGetTickCount", "parent": 400, "children": [], "start_point": {"row": 130, "column": 23}, "end_point": {"row": 130, "column": 40}}, {"id": 402, "type": "argument_list", "text": "()", "parent": 400, "children": [], "start_point": {"row": 130, "column": 40}, "end_point": {"row": 130, "column": 42}}, {"id": 403, "type": "assignment_expression", "text": "prev_ped_tick_time = curr_ped_tick_time", "parent": 387, "children": [404, 405, 406], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 41}}, {"id": 404, "type": "identifier", "text": "prev_ped_tick_time", "parent": 403, "children": [], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 20}}, {"id": 405, "type": "=", "text": "=", "parent": 403, "children": [], "start_point": {"row": 131, "column": 21}, "end_point": {"row": 131, "column": 22}}, {"id": 406, "type": "identifier", "text": "curr_ped_tick_time", "parent": 403, "children": [], "start_point": {"row": 131, "column": 23}, "end_point": {"row": 131, "column": 41}}, {"id": 407, "type": "declaration", "text": "unsigned long x = 0;", "parent": 387, "children": [408, 411], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 22}}, {"id": 408, "type": "sized_type_specifier", "text": "unsigned long", "parent": 407, "children": [409, 410], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 15}}, {"id": 409, "type": "unsigned", "text": "unsigned", "parent": 408, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 10}}, {"id": 410, "type": "long", "text": "long", "parent": 408, "children": [], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 15}}, {"id": 411, "type": "init_declarator", "text": "x = 0", "parent": 407, "children": [412, 413, 414], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 21}}, {"id": 412, "type": "identifier", "text": "x", "parent": 411, "children": [], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 17}}, {"id": 413, "type": "=", "text": "=", "parent": 411, "children": [], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 19}}, {"id": 414, "type": "number_literal", "text": "0", "parent": 411, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 21}}, {"id": 415, "type": "declaration", "text": "unsigned long y = 0;", "parent": 387, "children": [416, 419], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 22}}, {"id": 416, "type": "sized_type_specifier", "text": "unsigned long", "parent": 415, "children": [417, 418], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 15}}, {"id": 417, "type": "unsigned", "text": "unsigned", "parent": 416, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 10}}, {"id": 418, "type": "long", "text": "long", "parent": 416, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 15}}, {"id": 419, "type": "init_declarator", "text": "y = 0", "parent": 415, "children": [420, 421, 422], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 21}}, {"id": 420, "type": "identifier", "text": "y", "parent": 419, "children": [], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 17}}, {"id": 421, "type": "=", "text": "=", "parent": 419, "children": [], "start_point": {"row": 135, "column": 18}, "end_point": {"row": 135, "column": 19}}, {"id": 422, "type": "number_literal", "text": "0", "parent": 419, "children": [], "start_point": {"row": 135, "column": 20}, "end_point": {"row": 135, "column": 21}}, {"id": 423, "type": "while_statement", "text": "while (1) {\r\n curr_ped_tick_time = xTaskGetTickCount();\r\n\r\n // check if button has been pressed\r\n x = Touch_ReadX();\r\n y = Touch_ReadY();\r\n\r\n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \r\n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n pedestrian_pressed = SET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n else {\r\n pedestrian_pressed = RESET;\r\n }\r\n } else {\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n\r\n vTaskDelay(1);\r\n }", "parent": 387, "children": [424], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 160, "column": 3}}, {"id": 424, "type": "parenthesized_expression", "text": "(1)", "parent": 423, "children": [425], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 11}}, {"id": 425, "type": "number_literal", "text": "1", "parent": 424, "children": [], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 10}}, {"id": 426, "type": "assignment_expression", "text": "curr_ped_tick_time = xTaskGetTickCount()", "parent": 423, "children": [427, 428, 429], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 44}}, {"id": 427, "type": "identifier", "text": "curr_ped_tick_time", "parent": 426, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 22}}, {"id": 428, "type": "=", "text": "=", "parent": 426, "children": [], "start_point": {"row": 138, "column": 23}, "end_point": {"row": 138, "column": 24}}, {"id": 429, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 426, "children": [430, 431], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 44}}, {"id": 430, "type": "identifier", "text": "xTaskGetTickCount", "parent": 429, "children": [], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 42}}, {"id": 431, "type": "argument_list", "text": "()", "parent": 429, "children": [], "start_point": {"row": 138, "column": 42}, "end_point": {"row": 138, "column": 44}}, {"id": 432, "type": "assignment_expression", "text": "x = Touch_ReadX()", "parent": 423, "children": [433, 434, 435], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 21}}, {"id": 433, "type": "identifier", "text": "x", "parent": 432, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 5}}, {"id": 434, "type": "=", "text": "=", "parent": 432, "children": [], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 7}}, {"id": 435, "type": "call_expression", "text": "Touch_ReadX()", "parent": 432, "children": [436, 437], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 21}}, {"id": 436, "type": "identifier", "text": "Touch_ReadX", "parent": 435, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 19}}, {"id": 437, "type": "argument_list", "text": "()", "parent": 435, "children": [], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 141, "column": 21}}, {"id": 438, "type": "assignment_expression", "text": "y = Touch_ReadY()", "parent": 423, "children": [439, 440, 441], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 21}}, {"id": 439, "type": "identifier", "text": "y", "parent": 438, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 5}}, {"id": 440, "type": "=", "text": "=", "parent": 438, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 7}}, {"id": 441, "type": "call_expression", "text": "Touch_ReadY()", "parent": 438, "children": [442, 443], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 21}}, {"id": 442, "type": "identifier", "text": "Touch_ReadY", "parent": 441, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 19}}, {"id": 443, "type": "argument_list", "text": "()", "parent": 441, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 21}}, {"id": 444, "type": "if_statement", "text": "if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \r\n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n pedestrian_pressed = SET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n else {\r\n pedestrian_pressed = RESET;\r\n }\r\n } else {\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }", "parent": 423, "children": [445, 493], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 157, "column": 5}}, {"id": 445, "type": "parenthesized_expression", "text": "(PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT)", "parent": 444, "children": [446], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 145, "column": 47}}, {"id": 446, "type": "binary_expression", "text": "PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT", "parent": 445, "children": [447, 463, 464], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 145, "column": 46}}, {"id": 447, "type": "binary_expression", "text": "PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y", "parent": 446, "children": [448, 458, 459], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 145, "column": 25}}, {"id": 448, "type": "binary_expression", "text": "PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT", "parent": 447, "children": [449, 453, 454], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 49}}, {"id": 449, "type": "binary_expression", "text": "PED_LEFT_LIMIT < x", "parent": 448, "children": [450, 451, 452], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 26}}, {"id": 450, "type": "identifier", "text": "PED_LEFT_LIMIT", "parent": 449, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 22}}, {"id": 451, "type": "<", "text": "<", "parent": 449, "children": [], "start_point": {"row": 144, "column": 23}, "end_point": {"row": 144, "column": 24}}, {"id": 452, "type": "identifier", "text": "x", "parent": 449, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 26}}, {"id": 453, "type": "&&", "text": "&&", "parent": 448, "children": [], "start_point": {"row": 144, "column": 27}, "end_point": {"row": 144, "column": 29}}, {"id": 454, "type": "binary_expression", "text": "x < PED_RIGHT_LIMIT", "parent": 448, "children": [455, 456, 457], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 49}}, {"id": 455, "type": "identifier", "text": "x", "parent": 454, "children": [], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 31}}, {"id": 456, "type": "<", "text": "<", "parent": 454, "children": [], "start_point": {"row": 144, "column": 32}, "end_point": {"row": 144, "column": 33}}, {"id": 457, "type": "identifier", "text": "PED_RIGHT_LIMIT", "parent": 454, "children": [], "start_point": {"row": 144, "column": 34}, "end_point": {"row": 144, "column": 49}}, {"id": 458, "type": "&&", "text": "&&", "parent": 447, "children": [], "start_point": {"row": 144, "column": 50}, "end_point": {"row": 144, "column": 52}}, {"id": 459, "type": "binary_expression", "text": "PED_BOT_LIMIT < y", "parent": 447, "children": [460, 461, 462], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 25}}, {"id": 460, "type": "identifier", "text": "PED_BOT_LIMIT", "parent": 459, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 21}}, {"id": 461, "type": "<", "text": "<", "parent": 459, "children": [], "start_point": {"row": 145, "column": 22}, "end_point": {"row": 145, "column": 23}}, {"id": 462, "type": "identifier", "text": "y", "parent": 459, "children": [], "start_point": {"row": 145, "column": 24}, "end_point": {"row": 145, "column": 25}}, {"id": 463, "type": "&&", "text": "&&", "parent": 446, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 28}}, {"id": 464, "type": "binary_expression", "text": "y < PED_TOP_LIMIT", "parent": 446, "children": [465, 466, 467], "start_point": {"row": 145, "column": 29}, "end_point": {"row": 145, "column": 46}}, {"id": 465, "type": "identifier", "text": "y", "parent": 464, "children": [], "start_point": {"row": 145, "column": 29}, "end_point": {"row": 145, "column": 30}}, {"id": 466, "type": "<", "text": "<", "parent": 464, "children": [], "start_point": {"row": 145, "column": 31}, "end_point": {"row": 145, "column": 32}}, {"id": 467, "type": "identifier", "text": "PED_TOP_LIMIT", "parent": 464, "children": [], "start_point": {"row": 145, "column": 33}, "end_point": {"row": 145, "column": 46}}, {"id": 468, "type": "if_statement", "text": "if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n pedestrian_pressed = SET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n else {\r\n pedestrian_pressed = RESET;\r\n }", "parent": 444, "children": [469, 488], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 153, "column": 7}}, {"id": 469, "type": "parenthesized_expression", "text": "(curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S))", "parent": 468, "children": [470], "start_point": {"row": 146, "column": 9}, "end_point": {"row": 146, "column": 82}}, {"id": 470, "type": "binary_expression", "text": "curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)", "parent": 469, "children": [471, 475, 476], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 81}}, {"id": 471, "type": "binary_expression", "text": "curr_ped_tick_time - prev_ped_tick_time", "parent": 470, "children": [472, 473, 474], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 49}}, {"id": 472, "type": "identifier", "text": "curr_ped_tick_time", "parent": 471, "children": [], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 28}}, {"id": 473, "type": "-", "text": "-", "parent": 471, "children": [], "start_point": {"row": 146, "column": 29}, "end_point": {"row": 146, "column": 30}}, {"id": 474, "type": "identifier", "text": "prev_ped_tick_time", "parent": 471, "children": [], "start_point": {"row": 146, "column": 31}, "end_point": {"row": 146, "column": 49}}, {"id": 475, "type": ">=", "text": ">=", "parent": 470, "children": [], "start_point": {"row": 146, "column": 50}, "end_point": {"row": 146, "column": 52}}, {"id": 476, "type": "call_expression", "text": "SEC_TO_MS(BUTTON_PRESS_IN_S)", "parent": 470, "children": [477, 478], "start_point": {"row": 146, "column": 53}, "end_point": {"row": 146, "column": 81}}, {"id": 477, "type": "identifier", "text": "SEC_TO_MS", "parent": 476, "children": [], "start_point": {"row": 146, "column": 53}, "end_point": {"row": 146, "column": 62}}, {"id": 478, "type": "argument_list", "text": "(BUTTON_PRESS_IN_S)", "parent": 476, "children": [479], "start_point": {"row": 146, "column": 62}, "end_point": {"row": 146, "column": 81}}, {"id": 479, "type": "identifier", "text": "BUTTON_PRESS_IN_S", "parent": 478, "children": [], "start_point": {"row": 146, "column": 63}, "end_point": {"row": 146, "column": 80}}, {"id": 480, "type": "assignment_expression", "text": "pedestrian_pressed = SET", "parent": 468, "children": [481, 482, 483], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 32}}, {"id": 481, "type": "identifier", "text": "pedestrian_pressed", "parent": 480, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 26}}, {"id": 482, "type": "=", "text": "=", "parent": 480, "children": [], "start_point": {"row": 148, "column": 27}, "end_point": {"row": 148, "column": 28}}, {"id": 483, "type": "identifier", "text": "SET", "parent": 480, "children": [], "start_point": {"row": 148, "column": 29}, "end_point": {"row": 148, "column": 32}}, {"id": 484, "type": "assignment_expression", "text": "prev_ped_tick_time = curr_ped_tick_time", "parent": 468, "children": [485, 486, 487], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 47}}, {"id": 485, "type": "identifier", "text": "prev_ped_tick_time", "parent": 484, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 26}}, {"id": 486, "type": "=", "text": "=", "parent": 484, "children": [], "start_point": {"row": 149, "column": 27}, "end_point": {"row": 149, "column": 28}}, {"id": 487, "type": "identifier", "text": "curr_ped_tick_time", "parent": 484, "children": [], "start_point": {"row": 149, "column": 29}, "end_point": {"row": 149, "column": 47}}, {"id": 488, "type": "else_clause", "text": "else {\r\n pedestrian_pressed = RESET;\r\n }", "parent": 468, "children": [], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 153, "column": 7}}, {"id": 489, "type": "assignment_expression", "text": "pedestrian_pressed = RESET", "parent": 488, "children": [490, 491, 492], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 34}}, {"id": 490, "type": "identifier", "text": "pedestrian_pressed", "parent": 489, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 26}}, {"id": 491, "type": "=", "text": "=", "parent": 489, "children": [], "start_point": {"row": 152, "column": 27}, "end_point": {"row": 152, "column": 28}}, {"id": 492, "type": "identifier", "text": "RESET", "parent": 489, "children": [], "start_point": {"row": 152, "column": 29}, "end_point": {"row": 152, "column": 34}}, {"id": 493, "type": "else_clause", "text": "else {\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }", "parent": 444, "children": [], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 157, "column": 5}}, {"id": 494, "type": "assignment_expression", "text": "pedestrian_pressed = RESET", "parent": 493, "children": [495, 496, 497], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 32}}, {"id": 495, "type": "identifier", "text": "pedestrian_pressed", "parent": 494, "children": [], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 24}}, {"id": 496, "type": "=", "text": "=", "parent": 494, "children": [], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 26}}, {"id": 497, "type": "identifier", "text": "RESET", "parent": 494, "children": [], "start_point": {"row": 155, "column": 27}, "end_point": {"row": 155, "column": 32}}, {"id": 498, "type": "assignment_expression", "text": "prev_ped_tick_time = curr_ped_tick_time", "parent": 493, "children": [499, 500, 501], "start_point": {"row": 156, "column": 6}, "end_point": {"row": 156, "column": 45}}, {"id": 499, "type": "identifier", "text": "prev_ped_tick_time", "parent": 498, "children": [], "start_point": {"row": 156, "column": 6}, "end_point": {"row": 156, "column": 24}}, {"id": 500, "type": "=", "text": "=", "parent": 498, "children": [], "start_point": {"row": 156, "column": 25}, "end_point": {"row": 156, "column": 26}}, {"id": 501, "type": "identifier", "text": "curr_ped_tick_time", "parent": 498, "children": [], "start_point": {"row": 156, "column": 27}, "end_point": {"row": 156, "column": 45}}, {"id": 502, "type": "call_expression", "text": "vTaskDelay(1)", "parent": 423, "children": [503, 504], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 17}}, {"id": 503, "type": "identifier", "text": "vTaskDelay", "parent": 502, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 14}}, {"id": 504, "type": "argument_list", "text": "(1)", "parent": 502, "children": [505], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 17}}, {"id": 505, "type": "number_literal", "text": "1", "parent": 504, "children": [], "start_point": {"row": 159, "column": 15}, "end_point": {"row": 159, "column": 16}}, {"id": 506, "type": "function_definition", "text": "void Control(void *p) {\r\n // keep track of time\r\n time_expired = RESET;\r\n curr_light_tick_time = xTaskGetTickCount();\r\n prev_light_tick_time = curr_light_tick_time;\r\n\r\n while (1) {\r\n curr_light_tick_time = xTaskGetTickCount();\r\n\r\n // check if time to make a transition or if there's been virtual input\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \r\n \r\n // register that timer has expired\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) {\r\n time_expired = SET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n } \r\n \r\n FSM();\r\n } else {\r\n time_expired = RESET;\r\n }\r\n\r\n vTaskDelay(1);\r\n }\r\n}", "parent": null, "children": [507, 508], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 188, "column": 1}}, {"id": 507, "type": "primitive_type", "text": "void", "parent": 506, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 4}}, {"id": 508, "type": "function_declarator", "text": "Control(void *p)", "parent": 506, "children": [509, 510], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 21}}, {"id": 509, "type": "identifier", "text": "Control", "parent": 508, "children": [], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 12}}, {"id": 510, "type": "parameter_list", "text": "(void *p)", "parent": 508, "children": [511], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 163, "column": 21}}, {"id": 511, "type": "parameter_declaration", "text": "void *p", "parent": 510, "children": [512, 513], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 20}}, {"id": 512, "type": "primitive_type", "text": "void", "parent": 511, "children": [], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 17}}, {"id": 513, "type": "pointer_declarator", "text": "*p", "parent": 511, "children": [514, 515], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 20}}, {"id": 514, "type": "*", "text": "*", "parent": 513, "children": [], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 19}}, {"id": 515, "type": "identifier", "text": "p", "parent": 513, "children": [], "start_point": {"row": 163, "column": 19}, "end_point": {"row": 163, "column": 20}}, {"id": 516, "type": "assignment_expression", "text": "time_expired = RESET", "parent": 506, "children": [517, 518, 519], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 165, "column": 22}}, {"id": 517, "type": "identifier", "text": "time_expired", "parent": 516, "children": [], "start_point": {"row": 165, "column": 2}, "end_point": {"row": 165, "column": 14}}, {"id": 518, "type": "=", "text": "=", "parent": 516, "children": [], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 16}}, {"id": 519, "type": "identifier", "text": "RESET", "parent": 516, "children": [], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 22}}, {"id": 520, "type": "assignment_expression", "text": "curr_light_tick_time = xTaskGetTickCount()", "parent": 506, "children": [521, 522, 523], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 166, "column": 44}}, {"id": 521, "type": "identifier", "text": "curr_light_tick_time", "parent": 520, "children": [], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 166, "column": 22}}, {"id": 522, "type": "=", "text": "=", "parent": 520, "children": [], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 24}}, {"id": 523, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 520, "children": [524, 525], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 44}}, {"id": 524, "type": "identifier", "text": "xTaskGetTickCount", "parent": 523, "children": [], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 42}}, {"id": 525, "type": "argument_list", "text": "()", "parent": 523, "children": [], "start_point": {"row": 166, "column": 42}, "end_point": {"row": 166, "column": 44}}, {"id": 526, "type": "assignment_expression", "text": "prev_light_tick_time = curr_light_tick_time", "parent": 506, "children": [527, 528, 529], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 45}}, {"id": 527, "type": "identifier", "text": "prev_light_tick_time", "parent": 526, "children": [], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 22}}, {"id": 528, "type": "=", "text": "=", "parent": 526, "children": [], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 24}}, {"id": 529, "type": "identifier", "text": "curr_light_tick_time", "parent": 526, "children": [], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 45}}, {"id": 530, "type": "while_statement", "text": "while (1) {\r\n curr_light_tick_time = xTaskGetTickCount();\r\n\r\n // check if time to make a transition or if there's been virtual input\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \r\n \r\n // register that timer has expired\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) {\r\n time_expired = SET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n } \r\n \r\n FSM();\r\n } else {\r\n time_expired = RESET;\r\n }\r\n\r\n vTaskDelay(1);\r\n }", "parent": 506, "children": [531], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 187, "column": 3}}, {"id": 531, "type": "parenthesized_expression", "text": "(1)", "parent": 530, "children": [532], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 11}}, {"id": 532, "type": "number_literal", "text": "1", "parent": 531, "children": [], "start_point": {"row": 169, "column": 9}, "end_point": {"row": 169, "column": 10}}, {"id": 533, "type": "assignment_expression", "text": "curr_light_tick_time = xTaskGetTickCount()", "parent": 530, "children": [534, 535, 536], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 46}}, {"id": 534, "type": "identifier", "text": "curr_light_tick_time", "parent": 533, "children": [], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 24}}, {"id": 535, "type": "=", "text": "=", "parent": 533, "children": [], "start_point": {"row": 170, "column": 25}, "end_point": {"row": 170, "column": 26}}, {"id": 536, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 533, "children": [537, 538], "start_point": {"row": 170, "column": 27}, "end_point": {"row": 170, "column": 46}}, {"id": 537, "type": "identifier", "text": "xTaskGetTickCount", "parent": 536, "children": [], "start_point": {"row": 170, "column": 27}, "end_point": {"row": 170, "column": 44}}, {"id": 538, "type": "argument_list", "text": "()", "parent": 536, "children": [], "start_point": {"row": 170, "column": 44}, "end_point": {"row": 170, "column": 46}}, {"id": 539, "type": "if_statement", "text": "if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \r\n \r\n // register that timer has expired\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) {\r\n time_expired = SET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n } \r\n \r\n FSM();\r\n } else {\r\n time_expired = RESET;\r\n }", "parent": 530, "children": [540, 580], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 184, "column": 5}}, {"id": 540, "type": "parenthesized_expression", "text": "(curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed)", "parent": 539, "children": [541], "start_point": {"row": 173, "column": 7}, "end_point": {"row": 173, "column": 129}}, {"id": 541, "type": "binary_expression", "text": "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed", "parent": 540, "children": [542, 555, 556], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 128}}, {"id": 542, "type": "binary_expression", "text": "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed", "parent": 541, "children": [543, 553, 554], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 106}}, {"id": 543, "type": "binary_expression", "text": "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)", "parent": 542, "children": [544, 548, 549], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 89}}, {"id": 544, "type": "binary_expression", "text": "curr_light_tick_time - prev_light_tick_time", "parent": 543, "children": [545, 546, 547], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 51}}, {"id": 545, "type": "identifier", "text": "curr_light_tick_time", "parent": 544, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 28}}, {"id": 546, "type": "-", "text": "-", "parent": 544, "children": [], "start_point": {"row": 173, "column": 29}, "end_point": {"row": 173, "column": 30}}, {"id": 547, "type": "identifier", "text": "prev_light_tick_time", "parent": 544, "children": [], "start_point": {"row": 173, "column": 31}, "end_point": {"row": 173, "column": 51}}, {"id": 548, "type": ">=", "text": ">=", "parent": 543, "children": [], "start_point": {"row": 173, "column": 52}, "end_point": {"row": 173, "column": 54}}, {"id": 549, "type": "call_expression", "text": "SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)", "parent": 543, "children": [550, 551], "start_point": {"row": 173, "column": 55}, "end_point": {"row": 173, "column": 89}}, {"id": 550, "type": "identifier", "text": "SEC_TO_MS", "parent": 549, "children": [], "start_point": {"row": 173, "column": 55}, "end_point": {"row": 173, "column": 64}}, {"id": 551, "type": "argument_list", "text": "(TRANSITION_TIMEOUT_IN_S)", "parent": 549, "children": [552], "start_point": {"row": 173, "column": 64}, "end_point": {"row": 173, "column": 89}}, {"id": 552, "type": "identifier", "text": "TRANSITION_TIMEOUT_IN_S", "parent": 551, "children": [], "start_point": {"row": 173, "column": 65}, "end_point": {"row": 173, "column": 88}}, {"id": 553, "type": "||", "text": "||", "parent": 542, "children": [], "start_point": {"row": 173, "column": 90}, "end_point": {"row": 173, "column": 92}}, {"id": 554, "type": "identifier", "text": "onoff_pressed", "parent": 542, "children": [], "start_point": {"row": 173, "column": 93}, "end_point": {"row": 173, "column": 106}}, {"id": 555, "type": "||", "text": "||", "parent": 541, "children": [], "start_point": {"row": 173, "column": 107}, "end_point": {"row": 173, "column": 109}}, {"id": 556, "type": "identifier", "text": "pedestrian_pressed", "parent": 541, "children": [], "start_point": {"row": 173, "column": 110}, "end_point": {"row": 173, "column": 128}}, {"id": 557, "type": "if_statement", "text": "if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) {\r\n time_expired = SET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n }", "parent": 539, "children": [558], "start_point": {"row": 176, "column": 6}, "end_point": {"row": 179, "column": 7}}, {"id": 558, "type": "parenthesized_expression", "text": "(curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S))", "parent": 557, "children": [559], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 92}}, {"id": 559, "type": "binary_expression", "text": "curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)", "parent": 558, "children": [560, 564, 565], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 91}}, {"id": 560, "type": "binary_expression", "text": "curr_light_tick_time - prev_light_tick_time", "parent": 559, "children": [561, 562, 563], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 53}}, {"id": 561, "type": "identifier", "text": "curr_light_tick_time", "parent": 560, "children": [], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 30}}, {"id": 562, "type": "-", "text": "-", "parent": 560, "children": [], "start_point": {"row": 176, "column": 31}, "end_point": {"row": 176, "column": 32}}, {"id": 563, "type": "identifier", "text": "prev_light_tick_time", "parent": 560, "children": [], "start_point": {"row": 176, "column": 33}, "end_point": {"row": 176, "column": 53}}, {"id": 564, "type": ">=", "text": ">=", "parent": 559, "children": [], "start_point": {"row": 176, "column": 54}, "end_point": {"row": 176, "column": 56}}, {"id": 565, "type": "call_expression", "text": "SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)", "parent": 559, "children": [566, 567], "start_point": {"row": 176, "column": 57}, "end_point": {"row": 176, "column": 91}}, {"id": 566, "type": "identifier", "text": "SEC_TO_MS", "parent": 565, "children": [], "start_point": {"row": 176, "column": 57}, "end_point": {"row": 176, "column": 66}}, {"id": 567, "type": "argument_list", "text": "(TRANSITION_TIMEOUT_IN_S)", "parent": 565, "children": [568], "start_point": {"row": 176, "column": 66}, "end_point": {"row": 176, "column": 91}}, {"id": 568, "type": "identifier", "text": "TRANSITION_TIMEOUT_IN_S", "parent": 567, "children": [], "start_point": {"row": 176, "column": 67}, "end_point": {"row": 176, "column": 90}}, {"id": 569, "type": "assignment_expression", "text": "time_expired = SET", "parent": 557, "children": [570, 571, 572], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 26}}, {"id": 570, "type": "identifier", "text": "time_expired", "parent": 569, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 20}}, {"id": 571, "type": "=", "text": "=", "parent": 569, "children": [], "start_point": {"row": 177, "column": 21}, "end_point": {"row": 177, "column": 22}}, {"id": 572, "type": "identifier", "text": "SET", "parent": 569, "children": [], "start_point": {"row": 177, "column": 23}, "end_point": {"row": 177, "column": 26}}, {"id": 573, "type": "assignment_expression", "text": "prev_light_tick_time = curr_light_tick_time", "parent": 557, "children": [574, 575, 576], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 51}}, {"id": 574, "type": "identifier", "text": "prev_light_tick_time", "parent": 573, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 28}}, {"id": 575, "type": "=", "text": "=", "parent": 573, "children": [], "start_point": {"row": 178, "column": 29}, "end_point": {"row": 178, "column": 30}}, {"id": 576, "type": "identifier", "text": "curr_light_tick_time", "parent": 573, "children": [], "start_point": {"row": 178, "column": 31}, "end_point": {"row": 178, "column": 51}}, {"id": 577, "type": "call_expression", "text": "FSM()", "parent": 539, "children": [578, 579], "start_point": {"row": 181, "column": 6}, "end_point": {"row": 181, "column": 11}}, {"id": 578, "type": "identifier", "text": "FSM", "parent": 577, "children": [], "start_point": {"row": 181, "column": 6}, "end_point": {"row": 181, "column": 9}}, {"id": 579, "type": "argument_list", "text": "()", "parent": 577, "children": [], "start_point": {"row": 181, "column": 9}, "end_point": {"row": 181, "column": 11}}, {"id": 580, "type": "else_clause", "text": "else {\r\n time_expired = RESET;\r\n }", "parent": 539, "children": [], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 184, "column": 5}}, {"id": 581, "type": "assignment_expression", "text": "time_expired = RESET", "parent": 580, "children": [582, 583, 584], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 26}}, {"id": 582, "type": "identifier", "text": "time_expired", "parent": 581, "children": [], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 18}}, {"id": 583, "type": "=", "text": "=", "parent": 581, "children": [], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 20}}, {"id": 584, "type": "identifier", "text": "RESET", "parent": 581, "children": [], "start_point": {"row": 183, "column": 21}, "end_point": {"row": 183, "column": 26}}, {"id": 585, "type": "call_expression", "text": "vTaskDelay(1)", "parent": 530, "children": [586, 587], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 17}}, {"id": 586, "type": "identifier", "text": "vTaskDelay", "parent": 585, "children": [], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 14}}, {"id": 587, "type": "argument_list", "text": "(1)", "parent": 585, "children": [588], "start_point": {"row": 186, "column": 14}, "end_point": {"row": 186, "column": 17}}, {"id": 588, "type": "number_literal", "text": "1", "parent": 587, "children": [], "start_point": {"row": 186, "column": 15}, "end_point": {"row": 186, "column": 16}}, {"id": 589, "type": "function_definition", "text": "void FSM(void) {\r\n static TL_states_e present_state = IDLE;\r\n static TL_states_e next_state = IDLE;\r\n\r\n // choose next state\r\n switch (present_state) {\r\n case IDLE:\r\n if (onoff_pressed) {\r\n next_state = STOP;\r\n } else {\r\n next_state = IDLE;\r\n }\r\n break;\r\n\r\n case STOP:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = GO;\r\n }\r\n break;\r\n\r\n case GO:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;\r\n\r\n case WARN:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;\r\n \r\n default:\r\n next_state = IDLE;\r\n break;\r\n } \r\n\r\n if (next_state != present_state) {\r\n present_state = next_state;\r\n time_expired = RESET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n\r\n // produce the output\r\n switch (present_state) {\r\n case IDLE:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case STOP:\r\n if(!RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR);\r\n RedLightOn = SET;\r\n }\r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case GO:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(!GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR);\r\n GreenLightOn = SET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case WARN:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(!YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR);\r\n YellowLightOn = SET;\r\n }\r\n break;\r\n\r\n default:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n }\r\n}", "parent": null, "children": [590, 591], "start_point": {"row": 190, "column": 0}, "end_point": {"row": 320, "column": 1}}, {"id": 590, "type": "primitive_type", "text": "void", "parent": 589, "children": [], "start_point": {"row": 190, "column": 0}, "end_point": {"row": 190, "column": 4}}, {"id": 591, "type": "function_declarator", "text": "FSM(void)", "parent": 589, "children": [592, 593], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 14}}, {"id": 592, "type": "identifier", "text": "FSM", "parent": 591, "children": [], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 8}}, {"id": 593, "type": "parameter_list", "text": "(void)", "parent": 591, "children": [594], "start_point": {"row": 190, "column": 8}, "end_point": {"row": 190, "column": 14}}, {"id": 594, "type": "parameter_declaration", "text": "void", "parent": 593, "children": [595], "start_point": {"row": 190, "column": 9}, "end_point": {"row": 190, "column": 13}}, {"id": 595, "type": "primitive_type", "text": "void", "parent": 594, "children": [], "start_point": {"row": 190, "column": 9}, "end_point": {"row": 190, "column": 13}}, {"id": 596, "type": "declaration", "text": "static TL_states_e present_state = IDLE;", "parent": 589, "children": [597, 598], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 42}}, {"id": 597, "type": "type_identifier", "text": "TL_states_e", "parent": 596, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 20}}, {"id": 598, "type": "init_declarator", "text": "present_state = IDLE", "parent": 596, "children": [599, 600, 601], "start_point": {"row": 191, "column": 21}, "end_point": {"row": 191, "column": 41}}, {"id": 599, "type": "identifier", "text": "present_state", "parent": 598, "children": [], "start_point": {"row": 191, "column": 21}, "end_point": {"row": 191, "column": 34}}, {"id": 600, "type": "=", "text": "=", "parent": 598, "children": [], "start_point": {"row": 191, "column": 35}, "end_point": {"row": 191, "column": 36}}, {"id": 601, "type": "identifier", "text": "IDLE", "parent": 598, "children": [], "start_point": {"row": 191, "column": 37}, "end_point": {"row": 191, "column": 41}}, {"id": 602, "type": "declaration", "text": "static TL_states_e next_state = IDLE;", "parent": 589, "children": [603, 604], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 39}}, {"id": 603, "type": "type_identifier", "text": "TL_states_e", "parent": 602, "children": [], "start_point": {"row": 192, "column": 9}, "end_point": {"row": 192, "column": 20}}, {"id": 604, "type": "init_declarator", "text": "next_state = IDLE", "parent": 602, "children": [605, 606, 607], "start_point": {"row": 192, "column": 21}, "end_point": {"row": 192, "column": 38}}, {"id": 605, "type": "identifier", "text": "next_state", "parent": 604, "children": [], "start_point": {"row": 192, "column": 21}, "end_point": {"row": 192, "column": 31}}, {"id": 606, "type": "=", "text": "=", "parent": 604, "children": [], "start_point": {"row": 192, "column": 32}, "end_point": {"row": 192, "column": 33}}, {"id": 607, "type": "identifier", "text": "IDLE", "parent": 604, "children": [], "start_point": {"row": 192, "column": 34}, "end_point": {"row": 192, "column": 38}}, {"id": 608, "type": "switch_statement", "text": "switch (present_state) {\r\n case IDLE:\r\n if (onoff_pressed) {\r\n next_state = STOP;\r\n } else {\r\n next_state = IDLE;\r\n }\r\n break;\r\n\r\n case STOP:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = GO;\r\n }\r\n break;\r\n\r\n case GO:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;\r\n\r\n case WARN:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;\r\n \r\n default:\r\n next_state = IDLE;\r\n break;\r\n }", "parent": 589, "children": [609, 610], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 233, "column": 3}}, {"id": 609, "type": "switch", "text": "switch", "parent": 608, "children": [], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 195, "column": 8}}, {"id": 610, "type": "parenthesized_expression", "text": "(present_state)", "parent": 608, "children": [611], "start_point": {"row": 195, "column": 9}, "end_point": {"row": 195, "column": 24}}, {"id": 611, "type": "identifier", "text": "present_state", "parent": 610, "children": [], "start_point": {"row": 195, "column": 10}, "end_point": {"row": 195, "column": 23}}, {"id": 612, "type": "case_statement", "text": "case IDLE:\r\n if (onoff_pressed) {\r\n next_state = STOP;\r\n } else {\r\n next_state = IDLE;\r\n }\r\n break;", "parent": 608, "children": [613, 614, 615, 627], "start_point": {"row": 196, "column": 4}, "end_point": {"row": 202, "column": 12}}, {"id": 613, "type": "case", "text": "case", "parent": 612, "children": [], "start_point": {"row": 196, "column": 4}, "end_point": {"row": 196, "column": 8}}, {"id": 614, "type": "identifier", "text": "IDLE", "parent": 612, "children": [], "start_point": {"row": 196, "column": 9}, "end_point": {"row": 196, "column": 13}}, {"id": 615, "type": "if_statement", "text": "if (onoff_pressed) {\r\n next_state = STOP;\r\n } else {\r\n next_state = IDLE;\r\n }", "parent": 612, "children": [616, 622], "start_point": {"row": 197, "column": 6}, "end_point": {"row": 201, "column": 7}}, {"id": 616, "type": "parenthesized_expression", "text": "(onoff_pressed)", "parent": 615, "children": [617], "start_point": {"row": 197, "column": 9}, "end_point": {"row": 197, "column": 24}}, {"id": 617, "type": "identifier", "text": "onoff_pressed", "parent": 616, "children": [], "start_point": {"row": 197, "column": 10}, "end_point": {"row": 197, "column": 23}}, {"id": 618, "type": "assignment_expression", "text": "next_state = STOP", "parent": 615, "children": [619, 620, 621], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 25}}, {"id": 619, "type": "identifier", "text": "next_state", "parent": 618, "children": [], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 18}}, {"id": 620, "type": "=", "text": "=", "parent": 618, "children": [], "start_point": {"row": 198, "column": 19}, "end_point": {"row": 198, "column": 20}}, {"id": 621, "type": "identifier", "text": "STOP", "parent": 618, "children": [], "start_point": {"row": 198, "column": 21}, "end_point": {"row": 198, "column": 25}}, {"id": 622, "type": "else_clause", "text": "else {\r\n next_state = IDLE;\r\n }", "parent": 615, "children": [], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 201, "column": 7}}, {"id": 623, "type": "assignment_expression", "text": "next_state = IDLE", "parent": 622, "children": [624, 625, 626], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 200, "column": 25}}, {"id": 624, "type": "identifier", "text": "next_state", "parent": 623, "children": [], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 200, "column": 18}}, {"id": 625, "type": "=", "text": "=", "parent": 623, "children": [], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 20}}, {"id": 626, "type": "identifier", "text": "IDLE", "parent": 623, "children": [], "start_point": {"row": 200, "column": 21}, "end_point": {"row": 200, "column": 25}}, {"id": 627, "type": "break_statement", "text": "break;", "parent": 612, "children": [628], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 12}}, {"id": 628, "type": "break", "text": "break", "parent": 627, "children": [], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 11}}, {"id": 629, "type": "case_statement", "text": "case STOP:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = GO;\r\n }\r\n break;", "parent": 608, "children": [630, 631, 632, 647], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 210, "column": 12}}, {"id": 630, "type": "case", "text": "case", "parent": 629, "children": [], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 8}}, {"id": 631, "type": "identifier", "text": "STOP", "parent": 629, "children": [], "start_point": {"row": 204, "column": 9}, "end_point": {"row": 204, "column": 13}}, {"id": 632, "type": "if_statement", "text": "if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = GO;\r\n }", "parent": 629, "children": [633, 639], "start_point": {"row": 205, "column": 6}, "end_point": {"row": 209, "column": 7}}, {"id": 633, "type": "parenthesized_expression", "text": "(onoff_pressed)", "parent": 632, "children": [634], "start_point": {"row": 205, "column": 9}, "end_point": {"row": 205, "column": 24}}, {"id": 634, "type": "identifier", "text": "onoff_pressed", "parent": 633, "children": [], "start_point": {"row": 205, "column": 10}, "end_point": {"row": 205, "column": 23}}, {"id": 635, "type": "assignment_expression", "text": "next_state = IDLE", "parent": 632, "children": [636, 637, 638], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 25}}, {"id": 636, "type": "identifier", "text": "next_state", "parent": 635, "children": [], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 18}}, {"id": 637, "type": "=", "text": "=", "parent": 635, "children": [], "start_point": {"row": 206, "column": 19}, "end_point": {"row": 206, "column": 20}}, {"id": 638, "type": "identifier", "text": "IDLE", "parent": 635, "children": [], "start_point": {"row": 206, "column": 21}, "end_point": {"row": 206, "column": 25}}, {"id": 639, "type": "else_clause", "text": "else if(time_expired) {\r\n next_state = GO;\r\n }", "parent": 632, "children": [640], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 209, "column": 7}}, {"id": 640, "type": "if_statement", "text": "if(time_expired) {\r\n next_state = GO;\r\n }", "parent": 639, "children": [641], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 209, "column": 7}}, {"id": 641, "type": "parenthesized_expression", "text": "(time_expired)", "parent": 640, "children": [642], "start_point": {"row": 207, "column": 15}, "end_point": {"row": 207, "column": 29}}, {"id": 642, "type": "identifier", "text": "time_expired", "parent": 641, "children": [], "start_point": {"row": 207, "column": 16}, "end_point": {"row": 207, "column": 28}}, {"id": 643, "type": "assignment_expression", "text": "next_state = GO", "parent": 640, "children": [644, 645, 646], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 23}}, {"id": 644, "type": "identifier", "text": "next_state", "parent": 643, "children": [], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 18}}, {"id": 645, "type": "=", "text": "=", "parent": 643, "children": [], "start_point": {"row": 208, "column": 19}, "end_point": {"row": 208, "column": 20}}, {"id": 646, "type": "identifier", "text": "GO", "parent": 643, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 23}}, {"id": 647, "type": "break_statement", "text": "break;", "parent": 629, "children": [648], "start_point": {"row": 210, "column": 6}, "end_point": {"row": 210, "column": 12}}, {"id": 648, "type": "break", "text": "break", "parent": 647, "children": [], "start_point": {"row": 210, "column": 6}, "end_point": {"row": 210, "column": 11}}, {"id": 649, "type": "case_statement", "text": "case GO:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;", "parent": 608, "children": [650, 651, 652, 675], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 220, "column": 12}}, {"id": 650, "type": "case", "text": "case", "parent": 649, "children": [], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 8}}, {"id": 651, "type": "identifier", "text": "GO", "parent": 649, "children": [], "start_point": {"row": 212, "column": 9}, "end_point": {"row": 212, "column": 11}}, {"id": 652, "type": "if_statement", "text": "if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 649, "children": [653, 659], "start_point": {"row": 213, "column": 6}, "end_point": {"row": 219, "column": 7}}, {"id": 653, "type": "parenthesized_expression", "text": "(onoff_pressed)", "parent": 652, "children": [654], "start_point": {"row": 213, "column": 9}, "end_point": {"row": 213, "column": 24}}, {"id": 654, "type": "identifier", "text": "onoff_pressed", "parent": 653, "children": [], "start_point": {"row": 213, "column": 10}, "end_point": {"row": 213, "column": 23}}, {"id": 655, "type": "assignment_expression", "text": "next_state = IDLE", "parent": 652, "children": [656, 657, 658], "start_point": {"row": 214, "column": 8}, "end_point": {"row": 214, "column": 25}}, {"id": 656, "type": "identifier", "text": "next_state", "parent": 655, "children": [], "start_point": {"row": 214, "column": 8}, "end_point": {"row": 214, "column": 18}}, {"id": 657, "type": "=", "text": "=", "parent": 655, "children": [], "start_point": {"row": 214, "column": 19}, "end_point": {"row": 214, "column": 20}}, {"id": 658, "type": "identifier", "text": "IDLE", "parent": 655, "children": [], "start_point": {"row": 214, "column": 21}, "end_point": {"row": 214, "column": 25}}, {"id": 659, "type": "else_clause", "text": "else if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 652, "children": [660], "start_point": {"row": 215, "column": 8}, "end_point": {"row": 219, "column": 7}}, {"id": 660, "type": "if_statement", "text": "if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 659, "children": [661, 667], "start_point": {"row": 215, "column": 13}, "end_point": {"row": 219, "column": 7}}, {"id": 661, "type": "parenthesized_expression", "text": "(pedestrian_pressed)", "parent": 660, "children": [662], "start_point": {"row": 215, "column": 15}, "end_point": {"row": 215, "column": 35}}, {"id": 662, "type": "identifier", "text": "pedestrian_pressed", "parent": 661, "children": [], "start_point": {"row": 215, "column": 16}, "end_point": {"row": 215, "column": 34}}, {"id": 663, "type": "assignment_expression", "text": "next_state = WARN", "parent": 660, "children": [664, 665, 666], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 25}}, {"id": 664, "type": "identifier", "text": "next_state", "parent": 663, "children": [], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 18}}, {"id": 665, "type": "=", "text": "=", "parent": 663, "children": [], "start_point": {"row": 216, "column": 19}, "end_point": {"row": 216, "column": 20}}, {"id": 666, "type": "identifier", "text": "WARN", "parent": 663, "children": [], "start_point": {"row": 216, "column": 21}, "end_point": {"row": 216, "column": 25}}, {"id": 667, "type": "else_clause", "text": "else if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 660, "children": [668], "start_point": {"row": 217, "column": 8}, "end_point": {"row": 219, "column": 7}}, {"id": 668, "type": "if_statement", "text": "if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 667, "children": [669], "start_point": {"row": 217, "column": 13}, "end_point": {"row": 219, "column": 7}}, {"id": 669, "type": "parenthesized_expression", "text": "(time_expired)", "parent": 668, "children": [670], "start_point": {"row": 217, "column": 15}, "end_point": {"row": 217, "column": 29}}, {"id": 670, "type": "identifier", "text": "time_expired", "parent": 669, "children": [], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 28}}, {"id": 671, "type": "assignment_expression", "text": "next_state = STOP", "parent": 668, "children": [672, 673, 674], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 25}}, {"id": 672, "type": "identifier", "text": "next_state", "parent": 671, "children": [], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 18}}, {"id": 673, "type": "=", "text": "=", "parent": 671, "children": [], "start_point": {"row": 218, "column": 19}, "end_point": {"row": 218, "column": 20}}, {"id": 674, "type": "identifier", "text": "STOP", "parent": 671, "children": [], "start_point": {"row": 218, "column": 21}, "end_point": {"row": 218, "column": 25}}, {"id": 675, "type": "break_statement", "text": "break;", "parent": 649, "children": [676], "start_point": {"row": 220, "column": 6}, "end_point": {"row": 220, "column": 12}}, {"id": 676, "type": "break", "text": "break", "parent": 675, "children": [], "start_point": {"row": 220, "column": 6}, "end_point": {"row": 220, "column": 11}}, {"id": 677, "type": "case_statement", "text": "case WARN:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;", "parent": 608, "children": [678, 679, 680, 695], "start_point": {"row": 222, "column": 4}, "end_point": {"row": 228, "column": 12}}, {"id": 678, "type": "case", "text": "case", "parent": 677, "children": [], "start_point": {"row": 222, "column": 4}, "end_point": {"row": 222, "column": 8}}, {"id": 679, "type": "identifier", "text": "WARN", "parent": 677, "children": [], "start_point": {"row": 222, "column": 9}, "end_point": {"row": 222, "column": 13}}, {"id": 680, "type": "if_statement", "text": "if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 677, "children": [681, 687], "start_point": {"row": 223, "column": 6}, "end_point": {"row": 227, "column": 7}}, {"id": 681, "type": "parenthesized_expression", "text": "(onoff_pressed)", "parent": 680, "children": [682], "start_point": {"row": 223, "column": 9}, "end_point": {"row": 223, "column": 24}}, {"id": 682, "type": "identifier", "text": "onoff_pressed", "parent": 681, "children": [], "start_point": {"row": 223, "column": 10}, "end_point": {"row": 223, "column": 23}}, {"id": 683, "type": "assignment_expression", "text": "next_state = IDLE", "parent": 680, "children": [684, 685, 686], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 25}}, {"id": 684, "type": "identifier", "text": "next_state", "parent": 683, "children": [], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 18}}, {"id": 685, "type": "=", "text": "=", "parent": 683, "children": [], "start_point": {"row": 224, "column": 19}, "end_point": {"row": 224, "column": 20}}, {"id": 686, "type": "identifier", "text": "IDLE", "parent": 683, "children": [], "start_point": {"row": 224, "column": 21}, "end_point": {"row": 224, "column": 25}}, {"id": 687, "type": "else_clause", "text": "else if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 680, "children": [688], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 227, "column": 7}}, {"id": 688, "type": "if_statement", "text": "if(time_expired) {\r\n next_state = STOP;\r\n }", "parent": 687, "children": [689], "start_point": {"row": 225, "column": 13}, "end_point": {"row": 227, "column": 7}}, {"id": 689, "type": "parenthesized_expression", "text": "(time_expired)", "parent": 688, "children": [690], "start_point": {"row": 225, "column": 15}, "end_point": {"row": 225, "column": 29}}, {"id": 690, "type": "identifier", "text": "time_expired", "parent": 689, "children": [], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 28}}, {"id": 691, "type": "assignment_expression", "text": "next_state = STOP", "parent": 688, "children": [692, 693, 694], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 25}}, {"id": 692, "type": "identifier", "text": "next_state", "parent": 691, "children": [], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 18}}, {"id": 693, "type": "=", "text": "=", "parent": 691, "children": [], "start_point": {"row": 226, "column": 19}, "end_point": {"row": 226, "column": 20}}, {"id": 694, "type": "identifier", "text": "STOP", "parent": 691, "children": [], "start_point": {"row": 226, "column": 21}, "end_point": {"row": 226, "column": 25}}, {"id": 695, "type": "break_statement", "text": "break;", "parent": 677, "children": [696], "start_point": {"row": 228, "column": 6}, "end_point": {"row": 228, "column": 12}}, {"id": 696, "type": "break", "text": "break", "parent": 695, "children": [], "start_point": {"row": 228, "column": 6}, "end_point": {"row": 228, "column": 11}}, {"id": 697, "type": "case_statement", "text": "default:\r\n next_state = IDLE;\r\n break;", "parent": 608, "children": [698, 703], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 232, "column": 12}}, {"id": 698, "type": "default", "text": "default", "parent": 697, "children": [], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 230, "column": 11}}, {"id": 699, "type": "assignment_expression", "text": "next_state = IDLE", "parent": 697, "children": [700, 701, 702], "start_point": {"row": 231, "column": 8}, "end_point": {"row": 231, "column": 25}}, {"id": 700, "type": "identifier", "text": "next_state", "parent": 699, "children": [], "start_point": {"row": 231, "column": 8}, "end_point": {"row": 231, "column": 18}}, {"id": 701, "type": "=", "text": "=", "parent": 699, "children": [], "start_point": {"row": 231, "column": 19}, "end_point": {"row": 231, "column": 20}}, {"id": 702, "type": "identifier", "text": "IDLE", "parent": 699, "children": [], "start_point": {"row": 231, "column": 21}, "end_point": {"row": 231, "column": 25}}, {"id": 703, "type": "break_statement", "text": "break;", "parent": 697, "children": [704], "start_point": {"row": 232, "column": 6}, "end_point": {"row": 232, "column": 12}}, {"id": 704, "type": "break", "text": "break", "parent": 703, "children": [], "start_point": {"row": 232, "column": 6}, "end_point": {"row": 232, "column": 11}}, {"id": 705, "type": "if_statement", "text": "if (next_state != present_state) {\r\n present_state = next_state;\r\n time_expired = RESET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }", "parent": 589, "children": [706], "start_point": {"row": 235, "column": 2}, "end_point": {"row": 241, "column": 3}}, {"id": 706, "type": "parenthesized_expression", "text": "(next_state != present_state)", "parent": 705, "children": [707], "start_point": {"row": 235, "column": 5}, "end_point": {"row": 235, "column": 34}}, {"id": 707, "type": "binary_expression", "text": "next_state != present_state", "parent": 706, "children": [708, 709, 710], "start_point": {"row": 235, "column": 6}, "end_point": {"row": 235, "column": 33}}, {"id": 708, "type": "identifier", "text": "next_state", "parent": 707, "children": [], "start_point": {"row": 235, "column": 6}, "end_point": {"row": 235, "column": 16}}, {"id": 709, "type": "!=", "text": "!=", "parent": 707, "children": [], "start_point": {"row": 235, "column": 17}, "end_point": {"row": 235, "column": 19}}, {"id": 710, "type": "identifier", "text": "present_state", "parent": 707, "children": [], "start_point": {"row": 235, "column": 20}, "end_point": {"row": 235, "column": 33}}, {"id": 711, "type": "assignment_expression", "text": "present_state = next_state", "parent": 705, "children": [712, 713, 714], "start_point": {"row": 236, "column": 4}, "end_point": {"row": 236, "column": 30}}, {"id": 712, "type": "identifier", "text": "present_state", "parent": 711, "children": [], "start_point": {"row": 236, "column": 4}, "end_point": {"row": 236, "column": 17}}, {"id": 713, "type": "=", "text": "=", "parent": 711, "children": [], "start_point": {"row": 236, "column": 18}, "end_point": {"row": 236, "column": 19}}, {"id": 714, "type": "identifier", "text": "next_state", "parent": 711, "children": [], "start_point": {"row": 236, "column": 20}, "end_point": {"row": 236, "column": 30}}, {"id": 715, "type": "assignment_expression", "text": "time_expired = RESET", "parent": 705, "children": [716, 717, 718], "start_point": {"row": 237, "column": 4}, "end_point": {"row": 237, "column": 24}}, {"id": 716, "type": "identifier", "text": "time_expired", "parent": 715, "children": [], "start_point": {"row": 237, "column": 4}, "end_point": {"row": 237, "column": 16}}, {"id": 717, "type": "=", "text": "=", "parent": 715, "children": [], "start_point": {"row": 237, "column": 17}, "end_point": {"row": 237, "column": 18}}, {"id": 718, "type": "identifier", "text": "RESET", "parent": 715, "children": [], "start_point": {"row": 237, "column": 19}, "end_point": {"row": 237, "column": 24}}, {"id": 719, "type": "assignment_expression", "text": "prev_light_tick_time = curr_light_tick_time", "parent": 705, "children": [720, 721, 722], "start_point": {"row": 238, "column": 4}, "end_point": {"row": 238, "column": 47}}, {"id": 720, "type": "identifier", "text": "prev_light_tick_time", "parent": 719, "children": [], "start_point": {"row": 238, "column": 4}, "end_point": {"row": 238, "column": 24}}, {"id": 721, "type": "=", "text": "=", "parent": 719, "children": [], "start_point": {"row": 238, "column": 25}, "end_point": {"row": 238, "column": 26}}, {"id": 722, "type": "identifier", "text": "curr_light_tick_time", "parent": 719, "children": [], "start_point": {"row": 238, "column": 27}, "end_point": {"row": 238, "column": 47}}, {"id": 723, "type": "assignment_expression", "text": "pedestrian_pressed = RESET", "parent": 705, "children": [724, 725, 726], "start_point": {"row": 239, "column": 4}, "end_point": {"row": 239, "column": 30}}, {"id": 724, "type": "identifier", "text": "pedestrian_pressed", "parent": 723, "children": [], "start_point": {"row": 239, "column": 4}, "end_point": {"row": 239, "column": 22}}, {"id": 725, "type": "=", "text": "=", "parent": 723, "children": [], "start_point": {"row": 239, "column": 23}, "end_point": {"row": 239, "column": 24}}, {"id": 726, "type": "identifier", "text": "RESET", "parent": 723, "children": [], "start_point": {"row": 239, "column": 25}, "end_point": {"row": 239, "column": 30}}, {"id": 727, "type": "assignment_expression", "text": "prev_ped_tick_time = curr_ped_tick_time", "parent": 705, "children": [728, 729, 730], "start_point": {"row": 240, "column": 4}, "end_point": {"row": 240, "column": 43}}, {"id": 728, "type": "identifier", "text": "prev_ped_tick_time", "parent": 727, "children": [], "start_point": {"row": 240, "column": 4}, "end_point": {"row": 240, "column": 22}}, {"id": 729, "type": "=", "text": "=", "parent": 727, "children": [], "start_point": {"row": 240, "column": 23}, "end_point": {"row": 240, "column": 24}}, {"id": 730, "type": "identifier", "text": "curr_ped_tick_time", "parent": 727, "children": [], "start_point": {"row": 240, "column": 25}, "end_point": {"row": 240, "column": 43}}, {"id": 731, "type": "switch_statement", "text": "switch (present_state) {\r\n case IDLE:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case STOP:\r\n if(!RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR);\r\n RedLightOn = SET;\r\n }\r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case GO:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(!GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR);\r\n GreenLightOn = SET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case WARN:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(!YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR);\r\n YellowLightOn = SET;\r\n }\r\n break;\r\n\r\n default:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n }", "parent": 589, "children": [732, 733], "start_point": {"row": 244, "column": 2}, "end_point": {"row": 319, "column": 3}}, {"id": 732, "type": "switch", "text": "switch", "parent": 731, "children": [], "start_point": {"row": 244, "column": 2}, "end_point": {"row": 244, "column": 8}}, {"id": 733, "type": "parenthesized_expression", "text": "(present_state)", "parent": 731, "children": [734], "start_point": {"row": 244, "column": 9}, "end_point": {"row": 244, "column": 24}}, {"id": 734, "type": "identifier", "text": "present_state", "parent": 733, "children": [], "start_point": {"row": 244, "column": 10}, "end_point": {"row": 244, "column": 23}}, {"id": 735, "type": "case_statement", "text": "case IDLE:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;", "parent": 731, "children": [736, 737, 738, 752, 766, 780], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 258, "column": 12}}, {"id": 736, "type": "case", "text": "case", "parent": 735, "children": [], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 8}}, {"id": 737, "type": "identifier", "text": "IDLE", "parent": 735, "children": [], "start_point": {"row": 245, "column": 9}, "end_point": {"row": 245, "column": 13}}, {"id": 738, "type": "if_statement", "text": "if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n }", "parent": 735, "children": [739], "start_point": {"row": 246, "column": 6}, "end_point": {"row": 249, "column": 7}}, {"id": 739, "type": "parenthesized_expression", "text": "(RedLightOn)", "parent": 738, "children": [740], "start_point": {"row": 246, "column": 8}, "end_point": {"row": 246, "column": 20}}, {"id": 740, "type": "identifier", "text": "RedLightOn", "parent": 739, "children": [], "start_point": {"row": 246, "column": 9}, "end_point": {"row": 246, "column": 19}}, {"id": 741, "type": "call_expression", "text": "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 738, "children": [742, 743], "start_point": {"row": 247, "column": 8}, "end_point": {"row": 247, "column": 68}}, {"id": 742, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 741, "children": [], "start_point": {"row": 247, "column": 8}, "end_point": {"row": 247, "column": 28}}, {"id": 743, "type": "argument_list", "text": "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 741, "children": [744, 745, 746, 747], "start_point": {"row": 247, "column": 28}, "end_point": {"row": 247, "column": 68}}, {"id": 744, "type": "identifier", "text": "RED_X", "parent": 743, "children": [], "start_point": {"row": 247, "column": 29}, "end_point": {"row": 247, "column": 34}}, {"id": 745, "type": "identifier", "text": "RED_Y", "parent": 743, "children": [], "start_point": {"row": 247, "column": 36}, "end_point": {"row": 247, "column": 41}}, {"id": 746, "type": "identifier", "text": "RADIUS", "parent": 743, "children": [], "start_point": {"row": 247, "column": 43}, "end_point": {"row": 247, "column": 49}}, {"id": 747, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 743, "children": [], "start_point": {"row": 247, "column": 51}, "end_point": {"row": 247, "column": 67}}, {"id": 748, "type": "assignment_expression", "text": "RedLightOn = RESET", "parent": 738, "children": [749, 750, 751], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 26}}, {"id": 749, "type": "identifier", "text": "RedLightOn", "parent": 748, "children": [], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 18}}, {"id": 750, "type": "=", "text": "=", "parent": 748, "children": [], "start_point": {"row": 248, "column": 19}, "end_point": {"row": 248, "column": 20}}, {"id": 751, "type": "identifier", "text": "RESET", "parent": 748, "children": [], "start_point": {"row": 248, "column": 21}, "end_point": {"row": 248, "column": 26}}, {"id": 752, "type": "if_statement", "text": "if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }", "parent": 735, "children": [753], "start_point": {"row": 250, "column": 6}, "end_point": {"row": 253, "column": 7}}, {"id": 753, "type": "parenthesized_expression", "text": "(GreenLightOn)", "parent": 752, "children": [754], "start_point": {"row": 250, "column": 8}, "end_point": {"row": 250, "column": 22}}, {"id": 754, "type": "identifier", "text": "GreenLightOn", "parent": 753, "children": [], "start_point": {"row": 250, "column": 9}, "end_point": {"row": 250, "column": 21}}, {"id": 755, "type": "call_expression", "text": "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 752, "children": [756, 757], "start_point": {"row": 251, "column": 8}, "end_point": {"row": 251, "column": 72}}, {"id": 756, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 755, "children": [], "start_point": {"row": 251, "column": 8}, "end_point": {"row": 251, "column": 28}}, {"id": 757, "type": "argument_list", "text": "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 755, "children": [758, 759, 760, 761], "start_point": {"row": 251, "column": 28}, "end_point": {"row": 251, "column": 72}}, {"id": 758, "type": "identifier", "text": "GREEN_X", "parent": 757, "children": [], "start_point": {"row": 251, "column": 29}, "end_point": {"row": 251, "column": 36}}, {"id": 759, "type": "identifier", "text": "GREEN_Y", "parent": 757, "children": [], "start_point": {"row": 251, "column": 38}, "end_point": {"row": 251, "column": 45}}, {"id": 760, "type": "identifier", "text": "RADIUS", "parent": 757, "children": [], "start_point": {"row": 251, "column": 47}, "end_point": {"row": 251, "column": 53}}, {"id": 761, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 757, "children": [], "start_point": {"row": 251, "column": 55}, "end_point": {"row": 251, "column": 71}}, {"id": 762, "type": "assignment_expression", "text": "GreenLightOn = RESET", "parent": 752, "children": [763, 764, 765], "start_point": {"row": 252, "column": 8}, "end_point": {"row": 252, "column": 28}}, {"id": 763, "type": "identifier", "text": "GreenLightOn", "parent": 762, "children": [], "start_point": {"row": 252, "column": 8}, "end_point": {"row": 252, "column": 20}}, {"id": 764, "type": "=", "text": "=", "parent": 762, "children": [], "start_point": {"row": 252, "column": 21}, "end_point": {"row": 252, "column": 22}}, {"id": 765, "type": "identifier", "text": "RESET", "parent": 762, "children": [], "start_point": {"row": 252, "column": 23}, "end_point": {"row": 252, "column": 28}}, {"id": 766, "type": "if_statement", "text": "if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }", "parent": 735, "children": [767], "start_point": {"row": 254, "column": 6}, "end_point": {"row": 257, "column": 7}}, {"id": 767, "type": "parenthesized_expression", "text": "(YellowLightOn)", "parent": 766, "children": [768], "start_point": {"row": 254, "column": 8}, "end_point": {"row": 254, "column": 23}}, {"id": 768, "type": "identifier", "text": "YellowLightOn", "parent": 767, "children": [], "start_point": {"row": 254, "column": 9}, "end_point": {"row": 254, "column": 22}}, {"id": 769, "type": "call_expression", "text": "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 766, "children": [770, 771], "start_point": {"row": 255, "column": 8}, "end_point": {"row": 255, "column": 74}}, {"id": 770, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 769, "children": [], "start_point": {"row": 255, "column": 8}, "end_point": {"row": 255, "column": 28}}, {"id": 771, "type": "argument_list", "text": "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 769, "children": [772, 773, 774, 775], "start_point": {"row": 255, "column": 28}, "end_point": {"row": 255, "column": 74}}, {"id": 772, "type": "identifier", "text": "YELLOW_X", "parent": 771, "children": [], "start_point": {"row": 255, "column": 29}, "end_point": {"row": 255, "column": 37}}, {"id": 773, "type": "identifier", "text": "YELLOW_Y", "parent": 771, "children": [], "start_point": {"row": 255, "column": 39}, "end_point": {"row": 255, "column": 47}}, {"id": 774, "type": "identifier", "text": "RADIUS", "parent": 771, "children": [], "start_point": {"row": 255, "column": 49}, "end_point": {"row": 255, "column": 55}}, {"id": 775, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 771, "children": [], "start_point": {"row": 255, "column": 57}, "end_point": {"row": 255, "column": 73}}, {"id": 776, "type": "assignment_expression", "text": "YellowLightOn = RESET", "parent": 766, "children": [777, 778, 779], "start_point": {"row": 256, "column": 8}, "end_point": {"row": 256, "column": 29}}, {"id": 777, "type": "identifier", "text": "YellowLightOn", "parent": 776, "children": [], "start_point": {"row": 256, "column": 8}, "end_point": {"row": 256, "column": 21}}, {"id": 778, "type": "=", "text": "=", "parent": 776, "children": [], "start_point": {"row": 256, "column": 22}, "end_point": {"row": 256, "column": 23}}, {"id": 779, "type": "identifier", "text": "RESET", "parent": 776, "children": [], "start_point": {"row": 256, "column": 24}, "end_point": {"row": 256, "column": 29}}, {"id": 780, "type": "break_statement", "text": "break;", "parent": 735, "children": [781], "start_point": {"row": 258, "column": 6}, "end_point": {"row": 258, "column": 12}}, {"id": 781, "type": "break", "text": "break", "parent": 780, "children": [], "start_point": {"row": 258, "column": 6}, "end_point": {"row": 258, "column": 11}}, {"id": 782, "type": "case_statement", "text": "case STOP:\r\n if(!RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR);\r\n RedLightOn = SET;\r\n }\r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;", "parent": 731, "children": [783, 784, 785, 801, 815, 829], "start_point": {"row": 260, "column": 4}, "end_point": {"row": 273, "column": 12}}, {"id": 783, "type": "case", "text": "case", "parent": 782, "children": [], "start_point": {"row": 260, "column": 4}, "end_point": {"row": 260, "column": 8}}, {"id": 784, "type": "identifier", "text": "STOP", "parent": 782, "children": [], "start_point": {"row": 260, "column": 9}, "end_point": {"row": 260, "column": 13}}, {"id": 785, "type": "if_statement", "text": "if(!RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR);\r\n RedLightOn = SET;\r\n }", "parent": 782, "children": [786], "start_point": {"row": 261, "column": 6}, "end_point": {"row": 264, "column": 7}}, {"id": 786, "type": "parenthesized_expression", "text": "(!RedLightOn)", "parent": 785, "children": [787], "start_point": {"row": 261, "column": 8}, "end_point": {"row": 261, "column": 21}}, {"id": 787, "type": "unary_expression", "text": "!RedLightOn", "parent": 786, "children": [788, 789], "start_point": {"row": 261, "column": 9}, "end_point": {"row": 261, "column": 20}}, {"id": 788, "type": "!", "text": "!", "parent": 787, "children": [], "start_point": {"row": 261, "column": 9}, "end_point": {"row": 261, "column": 10}}, {"id": 789, "type": "identifier", "text": "RedLightOn", "parent": 787, "children": [], "start_point": {"row": 261, "column": 10}, "end_point": {"row": 261, "column": 20}}, {"id": 790, "type": "call_expression", "text": "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR)", "parent": 785, "children": [791, 792], "start_point": {"row": 262, "column": 8}, "end_point": {"row": 262, "column": 61}}, {"id": 791, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 790, "children": [], "start_point": {"row": 262, "column": 8}, "end_point": {"row": 262, "column": 28}}, {"id": 792, "type": "argument_list", "text": "(RED_X, RED_Y, RADIUS, RED_COLOR)", "parent": 790, "children": [793, 794, 795, 796], "start_point": {"row": 262, "column": 28}, "end_point": {"row": 262, "column": 61}}, {"id": 793, "type": "identifier", "text": "RED_X", "parent": 792, "children": [], "start_point": {"row": 262, "column": 29}, "end_point": {"row": 262, "column": 34}}, {"id": 794, "type": "identifier", "text": "RED_Y", "parent": 792, "children": [], "start_point": {"row": 262, "column": 36}, "end_point": {"row": 262, "column": 41}}, {"id": 795, "type": "identifier", "text": "RADIUS", "parent": 792, "children": [], "start_point": {"row": 262, "column": 43}, "end_point": {"row": 262, "column": 49}}, {"id": 796, "type": "identifier", "text": "RED_COLOR", "parent": 792, "children": [], "start_point": {"row": 262, "column": 51}, "end_point": {"row": 262, "column": 60}}, {"id": 797, "type": "assignment_expression", "text": "RedLightOn = SET", "parent": 785, "children": [798, 799, 800], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 24}}, {"id": 798, "type": "identifier", "text": "RedLightOn", "parent": 797, "children": [], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 18}}, {"id": 799, "type": "=", "text": "=", "parent": 797, "children": [], "start_point": {"row": 263, "column": 19}, "end_point": {"row": 263, "column": 20}}, {"id": 800, "type": "identifier", "text": "SET", "parent": 797, "children": [], "start_point": {"row": 263, "column": 21}, "end_point": {"row": 263, "column": 24}}, {"id": 801, "type": "if_statement", "text": "if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }", "parent": 782, "children": [802], "start_point": {"row": 265, "column": 6}, "end_point": {"row": 268, "column": 7}}, {"id": 802, "type": "parenthesized_expression", "text": "(GreenLightOn)", "parent": 801, "children": [803], "start_point": {"row": 265, "column": 8}, "end_point": {"row": 265, "column": 22}}, {"id": 803, "type": "identifier", "text": "GreenLightOn", "parent": 802, "children": [], "start_point": {"row": 265, "column": 9}, "end_point": {"row": 265, "column": 21}}, {"id": 804, "type": "call_expression", "text": "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 801, "children": [805, 806], "start_point": {"row": 266, "column": 8}, "end_point": {"row": 266, "column": 72}}, {"id": 805, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 804, "children": [], "start_point": {"row": 266, "column": 8}, "end_point": {"row": 266, "column": 28}}, {"id": 806, "type": "argument_list", "text": "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 804, "children": [807, 808, 809, 810], "start_point": {"row": 266, "column": 28}, "end_point": {"row": 266, "column": 72}}, {"id": 807, "type": "identifier", "text": "GREEN_X", "parent": 806, "children": [], "start_point": {"row": 266, "column": 29}, "end_point": {"row": 266, "column": 36}}, {"id": 808, "type": "identifier", "text": "GREEN_Y", "parent": 806, "children": [], "start_point": {"row": 266, "column": 38}, "end_point": {"row": 266, "column": 45}}, {"id": 809, "type": "identifier", "text": "RADIUS", "parent": 806, "children": [], "start_point": {"row": 266, "column": 47}, "end_point": {"row": 266, "column": 53}}, {"id": 810, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 806, "children": [], "start_point": {"row": 266, "column": 55}, "end_point": {"row": 266, "column": 71}}, {"id": 811, "type": "assignment_expression", "text": "GreenLightOn = RESET", "parent": 801, "children": [812, 813, 814], "start_point": {"row": 267, "column": 8}, "end_point": {"row": 267, "column": 28}}, {"id": 812, "type": "identifier", "text": "GreenLightOn", "parent": 811, "children": [], "start_point": {"row": 267, "column": 8}, "end_point": {"row": 267, "column": 20}}, {"id": 813, "type": "=", "text": "=", "parent": 811, "children": [], "start_point": {"row": 267, "column": 21}, "end_point": {"row": 267, "column": 22}}, {"id": 814, "type": "identifier", "text": "RESET", "parent": 811, "children": [], "start_point": {"row": 267, "column": 23}, "end_point": {"row": 267, "column": 28}}, {"id": 815, "type": "if_statement", "text": "if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }", "parent": 782, "children": [816], "start_point": {"row": 269, "column": 6}, "end_point": {"row": 272, "column": 7}}, {"id": 816, "type": "parenthesized_expression", "text": "(YellowLightOn)", "parent": 815, "children": [817], "start_point": {"row": 269, "column": 8}, "end_point": {"row": 269, "column": 23}}, {"id": 817, "type": "identifier", "text": "YellowLightOn", "parent": 816, "children": [], "start_point": {"row": 269, "column": 9}, "end_point": {"row": 269, "column": 22}}, {"id": 818, "type": "call_expression", "text": "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 815, "children": [819, 820], "start_point": {"row": 270, "column": 8}, "end_point": {"row": 270, "column": 74}}, {"id": 819, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 818, "children": [], "start_point": {"row": 270, "column": 8}, "end_point": {"row": 270, "column": 28}}, {"id": 820, "type": "argument_list", "text": "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 818, "children": [821, 822, 823, 824], "start_point": {"row": 270, "column": 28}, "end_point": {"row": 270, "column": 74}}, {"id": 821, "type": "identifier", "text": "YELLOW_X", "parent": 820, "children": [], "start_point": {"row": 270, "column": 29}, "end_point": {"row": 270, "column": 37}}, {"id": 822, "type": "identifier", "text": "YELLOW_Y", "parent": 820, "children": [], "start_point": {"row": 270, "column": 39}, "end_point": {"row": 270, "column": 47}}, {"id": 823, "type": "identifier", "text": "RADIUS", "parent": 820, "children": [], "start_point": {"row": 270, "column": 49}, "end_point": {"row": 270, "column": 55}}, {"id": 824, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 820, "children": [], "start_point": {"row": 270, "column": 57}, "end_point": {"row": 270, "column": 73}}, {"id": 825, "type": "assignment_expression", "text": "YellowLightOn = RESET", "parent": 815, "children": [826, 827, 828], "start_point": {"row": 271, "column": 8}, "end_point": {"row": 271, "column": 29}}, {"id": 826, "type": "identifier", "text": "YellowLightOn", "parent": 825, "children": [], "start_point": {"row": 271, "column": 8}, "end_point": {"row": 271, "column": 21}}, {"id": 827, "type": "=", "text": "=", "parent": 825, "children": [], "start_point": {"row": 271, "column": 22}, "end_point": {"row": 271, "column": 23}}, {"id": 828, "type": "identifier", "text": "RESET", "parent": 825, "children": [], "start_point": {"row": 271, "column": 24}, "end_point": {"row": 271, "column": 29}}, {"id": 829, "type": "break_statement", "text": "break;", "parent": 782, "children": [830], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 12}}, {"id": 830, "type": "break", "text": "break", "parent": 829, "children": [], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 11}}, {"id": 831, "type": "case_statement", "text": "case GO:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(!GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR);\r\n GreenLightOn = SET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;", "parent": 731, "children": [832, 833, 834, 848, 864, 878], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 288, "column": 12}}, {"id": 832, "type": "case", "text": "case", "parent": 831, "children": [], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 8}}, {"id": 833, "type": "identifier", "text": "GO", "parent": 831, "children": [], "start_point": {"row": 275, "column": 9}, "end_point": {"row": 275, "column": 11}}, {"id": 834, "type": "if_statement", "text": "if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n }", "parent": 831, "children": [835], "start_point": {"row": 276, "column": 6}, "end_point": {"row": 279, "column": 7}}, {"id": 835, "type": "parenthesized_expression", "text": "(RedLightOn)", "parent": 834, "children": [836], "start_point": {"row": 276, "column": 8}, "end_point": {"row": 276, "column": 20}}, {"id": 836, "type": "identifier", "text": "RedLightOn", "parent": 835, "children": [], "start_point": {"row": 276, "column": 9}, "end_point": {"row": 276, "column": 19}}, {"id": 837, "type": "call_expression", "text": "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 834, "children": [838, 839], "start_point": {"row": 277, "column": 8}, "end_point": {"row": 277, "column": 68}}, {"id": 838, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 837, "children": [], "start_point": {"row": 277, "column": 8}, "end_point": {"row": 277, "column": 28}}, {"id": 839, "type": "argument_list", "text": "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 837, "children": [840, 841, 842, 843], "start_point": {"row": 277, "column": 28}, "end_point": {"row": 277, "column": 68}}, {"id": 840, "type": "identifier", "text": "RED_X", "parent": 839, "children": [], "start_point": {"row": 277, "column": 29}, "end_point": {"row": 277, "column": 34}}, {"id": 841, "type": "identifier", "text": "RED_Y", "parent": 839, "children": [], "start_point": {"row": 277, "column": 36}, "end_point": {"row": 277, "column": 41}}, {"id": 842, "type": "identifier", "text": "RADIUS", "parent": 839, "children": [], "start_point": {"row": 277, "column": 43}, "end_point": {"row": 277, "column": 49}}, {"id": 843, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 839, "children": [], "start_point": {"row": 277, "column": 51}, "end_point": {"row": 277, "column": 67}}, {"id": 844, "type": "assignment_expression", "text": "RedLightOn = RESET", "parent": 834, "children": [845, 846, 847], "start_point": {"row": 278, "column": 8}, "end_point": {"row": 278, "column": 26}}, {"id": 845, "type": "identifier", "text": "RedLightOn", "parent": 844, "children": [], "start_point": {"row": 278, "column": 8}, "end_point": {"row": 278, "column": 18}}, {"id": 846, "type": "=", "text": "=", "parent": 844, "children": [], "start_point": {"row": 278, "column": 19}, "end_point": {"row": 278, "column": 20}}, {"id": 847, "type": "identifier", "text": "RESET", "parent": 844, "children": [], "start_point": {"row": 278, "column": 21}, "end_point": {"row": 278, "column": 26}}, {"id": 848, "type": "if_statement", "text": "if(!GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR);\r\n GreenLightOn = SET;\r\n }", "parent": 831, "children": [849], "start_point": {"row": 280, "column": 6}, "end_point": {"row": 283, "column": 7}}, {"id": 849, "type": "parenthesized_expression", "text": "(!GreenLightOn)", "parent": 848, "children": [850], "start_point": {"row": 280, "column": 8}, "end_point": {"row": 280, "column": 23}}, {"id": 850, "type": "unary_expression", "text": "!GreenLightOn", "parent": 849, "children": [851, 852], "start_point": {"row": 280, "column": 9}, "end_point": {"row": 280, "column": 22}}, {"id": 851, "type": "!", "text": "!", "parent": 850, "children": [], "start_point": {"row": 280, "column": 9}, "end_point": {"row": 280, "column": 10}}, {"id": 852, "type": "identifier", "text": "GreenLightOn", "parent": 850, "children": [], "start_point": {"row": 280, "column": 10}, "end_point": {"row": 280, "column": 22}}, {"id": 853, "type": "call_expression", "text": "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR)", "parent": 848, "children": [854, 855], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 67}}, {"id": 854, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 853, "children": [], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 28}}, {"id": 855, "type": "argument_list", "text": "(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR)", "parent": 853, "children": [856, 857, 858, 859], "start_point": {"row": 281, "column": 28}, "end_point": {"row": 281, "column": 67}}, {"id": 856, "type": "identifier", "text": "GREEN_X", "parent": 855, "children": [], "start_point": {"row": 281, "column": 29}, "end_point": {"row": 281, "column": 36}}, {"id": 857, "type": "identifier", "text": "GREEN_Y", "parent": 855, "children": [], "start_point": {"row": 281, "column": 38}, "end_point": {"row": 281, "column": 45}}, {"id": 858, "type": "identifier", "text": "RADIUS", "parent": 855, "children": [], "start_point": {"row": 281, "column": 47}, "end_point": {"row": 281, "column": 53}}, {"id": 859, "type": "identifier", "text": "GREEN_COLOR", "parent": 855, "children": [], "start_point": {"row": 281, "column": 55}, "end_point": {"row": 281, "column": 66}}, {"id": 860, "type": "assignment_expression", "text": "GreenLightOn = SET", "parent": 848, "children": [861, 862, 863], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 26}}, {"id": 861, "type": "identifier", "text": "GreenLightOn", "parent": 860, "children": [], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 20}}, {"id": 862, "type": "=", "text": "=", "parent": 860, "children": [], "start_point": {"row": 282, "column": 21}, "end_point": {"row": 282, "column": 22}}, {"id": 863, "type": "identifier", "text": "SET", "parent": 860, "children": [], "start_point": {"row": 282, "column": 23}, "end_point": {"row": 282, "column": 26}}, {"id": 864, "type": "if_statement", "text": "if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }", "parent": 831, "children": [865], "start_point": {"row": 284, "column": 6}, "end_point": {"row": 287, "column": 7}}, {"id": 865, "type": "parenthesized_expression", "text": "(YellowLightOn)", "parent": 864, "children": [866], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 23}}, {"id": 866, "type": "identifier", "text": "YellowLightOn", "parent": 865, "children": [], "start_point": {"row": 284, "column": 9}, "end_point": {"row": 284, "column": 22}}, {"id": 867, "type": "call_expression", "text": "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 864, "children": [868, 869], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 74}}, {"id": 868, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 867, "children": [], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 28}}, {"id": 869, "type": "argument_list", "text": "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 867, "children": [870, 871, 872, 873], "start_point": {"row": 285, "column": 28}, "end_point": {"row": 285, "column": 74}}, {"id": 870, "type": "identifier", "text": "YELLOW_X", "parent": 869, "children": [], "start_point": {"row": 285, "column": 29}, "end_point": {"row": 285, "column": 37}}, {"id": 871, "type": "identifier", "text": "YELLOW_Y", "parent": 869, "children": [], "start_point": {"row": 285, "column": 39}, "end_point": {"row": 285, "column": 47}}, {"id": 872, "type": "identifier", "text": "RADIUS", "parent": 869, "children": [], "start_point": {"row": 285, "column": 49}, "end_point": {"row": 285, "column": 55}}, {"id": 873, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 869, "children": [], "start_point": {"row": 285, "column": 57}, "end_point": {"row": 285, "column": 73}}, {"id": 874, "type": "assignment_expression", "text": "YellowLightOn = RESET", "parent": 864, "children": [875, 876, 877], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 29}}, {"id": 875, "type": "identifier", "text": "YellowLightOn", "parent": 874, "children": [], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 21}}, {"id": 876, "type": "=", "text": "=", "parent": 874, "children": [], "start_point": {"row": 286, "column": 22}, "end_point": {"row": 286, "column": 23}}, {"id": 877, "type": "identifier", "text": "RESET", "parent": 874, "children": [], "start_point": {"row": 286, "column": 24}, "end_point": {"row": 286, "column": 29}}, {"id": 878, "type": "break_statement", "text": "break;", "parent": 831, "children": [879], "start_point": {"row": 288, "column": 6}, "end_point": {"row": 288, "column": 12}}, {"id": 879, "type": "break", "text": "break", "parent": 878, "children": [], "start_point": {"row": 288, "column": 6}, "end_point": {"row": 288, "column": 11}}, {"id": 880, "type": "case_statement", "text": "case WARN:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(!YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR);\r\n YellowLightOn = SET;\r\n }\r\n break;", "parent": 731, "children": [881, 882, 883, 897, 911, 927], "start_point": {"row": 290, "column": 4}, "end_point": {"row": 303, "column": 12}}, {"id": 881, "type": "case", "text": "case", "parent": 880, "children": [], "start_point": {"row": 290, "column": 4}, "end_point": {"row": 290, "column": 8}}, {"id": 882, "type": "identifier", "text": "WARN", "parent": 880, "children": [], "start_point": {"row": 290, "column": 9}, "end_point": {"row": 290, "column": 13}}, {"id": 883, "type": "if_statement", "text": "if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n }", "parent": 880, "children": [884], "start_point": {"row": 291, "column": 6}, "end_point": {"row": 294, "column": 7}}, {"id": 884, "type": "parenthesized_expression", "text": "(RedLightOn)", "parent": 883, "children": [885], "start_point": {"row": 291, "column": 8}, "end_point": {"row": 291, "column": 20}}, {"id": 885, "type": "identifier", "text": "RedLightOn", "parent": 884, "children": [], "start_point": {"row": 291, "column": 9}, "end_point": {"row": 291, "column": 19}}, {"id": 886, "type": "call_expression", "text": "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 883, "children": [887, 888], "start_point": {"row": 292, "column": 8}, "end_point": {"row": 292, "column": 68}}, {"id": 887, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 886, "children": [], "start_point": {"row": 292, "column": 8}, "end_point": {"row": 292, "column": 28}}, {"id": 888, "type": "argument_list", "text": "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 886, "children": [889, 890, 891, 892], "start_point": {"row": 292, "column": 28}, "end_point": {"row": 292, "column": 68}}, {"id": 889, "type": "identifier", "text": "RED_X", "parent": 888, "children": [], "start_point": {"row": 292, "column": 29}, "end_point": {"row": 292, "column": 34}}, {"id": 890, "type": "identifier", "text": "RED_Y", "parent": 888, "children": [], "start_point": {"row": 292, "column": 36}, "end_point": {"row": 292, "column": 41}}, {"id": 891, "type": "identifier", "text": "RADIUS", "parent": 888, "children": [], "start_point": {"row": 292, "column": 43}, "end_point": {"row": 292, "column": 49}}, {"id": 892, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 888, "children": [], "start_point": {"row": 292, "column": 51}, "end_point": {"row": 292, "column": 67}}, {"id": 893, "type": "assignment_expression", "text": "RedLightOn = RESET", "parent": 883, "children": [894, 895, 896], "start_point": {"row": 293, "column": 8}, "end_point": {"row": 293, "column": 26}}, {"id": 894, "type": "identifier", "text": "RedLightOn", "parent": 893, "children": [], "start_point": {"row": 293, "column": 8}, "end_point": {"row": 293, "column": 18}}, {"id": 895, "type": "=", "text": "=", "parent": 893, "children": [], "start_point": {"row": 293, "column": 19}, "end_point": {"row": 293, "column": 20}}, {"id": 896, "type": "identifier", "text": "RESET", "parent": 893, "children": [], "start_point": {"row": 293, "column": 21}, "end_point": {"row": 293, "column": 26}}, {"id": 897, "type": "if_statement", "text": "if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }", "parent": 880, "children": [898], "start_point": {"row": 295, "column": 6}, "end_point": {"row": 298, "column": 7}}, {"id": 898, "type": "parenthesized_expression", "text": "(GreenLightOn)", "parent": 897, "children": [899], "start_point": {"row": 295, "column": 8}, "end_point": {"row": 295, "column": 22}}, {"id": 899, "type": "identifier", "text": "GreenLightOn", "parent": 898, "children": [], "start_point": {"row": 295, "column": 9}, "end_point": {"row": 295, "column": 21}}, {"id": 900, "type": "call_expression", "text": "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 897, "children": [901, 902], "start_point": {"row": 296, "column": 8}, "end_point": {"row": 296, "column": 72}}, {"id": 901, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 900, "children": [], "start_point": {"row": 296, "column": 8}, "end_point": {"row": 296, "column": 28}}, {"id": 902, "type": "argument_list", "text": "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 900, "children": [903, 904, 905, 906], "start_point": {"row": 296, "column": 28}, "end_point": {"row": 296, "column": 72}}, {"id": 903, "type": "identifier", "text": "GREEN_X", "parent": 902, "children": [], "start_point": {"row": 296, "column": 29}, "end_point": {"row": 296, "column": 36}}, {"id": 904, "type": "identifier", "text": "GREEN_Y", "parent": 902, "children": [], "start_point": {"row": 296, "column": 38}, "end_point": {"row": 296, "column": 45}}, {"id": 905, "type": "identifier", "text": "RADIUS", "parent": 902, "children": [], "start_point": {"row": 296, "column": 47}, "end_point": {"row": 296, "column": 53}}, {"id": 906, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 902, "children": [], "start_point": {"row": 296, "column": 55}, "end_point": {"row": 296, "column": 71}}, {"id": 907, "type": "assignment_expression", "text": "GreenLightOn = RESET", "parent": 897, "children": [908, 909, 910], "start_point": {"row": 297, "column": 8}, "end_point": {"row": 297, "column": 28}}, {"id": 908, "type": "identifier", "text": "GreenLightOn", "parent": 907, "children": [], "start_point": {"row": 297, "column": 8}, "end_point": {"row": 297, "column": 20}}, {"id": 909, "type": "=", "text": "=", "parent": 907, "children": [], "start_point": {"row": 297, "column": 21}, "end_point": {"row": 297, "column": 22}}, {"id": 910, "type": "identifier", "text": "RESET", "parent": 907, "children": [], "start_point": {"row": 297, "column": 23}, "end_point": {"row": 297, "column": 28}}, {"id": 911, "type": "if_statement", "text": "if(!YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR);\r\n YellowLightOn = SET;\r\n }", "parent": 880, "children": [912], "start_point": {"row": 299, "column": 6}, "end_point": {"row": 302, "column": 7}}, {"id": 912, "type": "parenthesized_expression", "text": "(!YellowLightOn)", "parent": 911, "children": [913], "start_point": {"row": 299, "column": 8}, "end_point": {"row": 299, "column": 24}}, {"id": 913, "type": "unary_expression", "text": "!YellowLightOn", "parent": 912, "children": [914, 915], "start_point": {"row": 299, "column": 9}, "end_point": {"row": 299, "column": 23}}, {"id": 914, "type": "!", "text": "!", "parent": 913, "children": [], "start_point": {"row": 299, "column": 9}, "end_point": {"row": 299, "column": 10}}, {"id": 915, "type": "identifier", "text": "YellowLightOn", "parent": 913, "children": [], "start_point": {"row": 299, "column": 10}, "end_point": {"row": 299, "column": 23}}, {"id": 916, "type": "call_expression", "text": "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR)", "parent": 911, "children": [917, 918], "start_point": {"row": 300, "column": 8}, "end_point": {"row": 300, "column": 70}}, {"id": 917, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 916, "children": [], "start_point": {"row": 300, "column": 8}, "end_point": {"row": 300, "column": 28}}, {"id": 918, "type": "argument_list", "text": "(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR)", "parent": 916, "children": [919, 920, 921, 922], "start_point": {"row": 300, "column": 28}, "end_point": {"row": 300, "column": 70}}, {"id": 919, "type": "identifier", "text": "YELLOW_X", "parent": 918, "children": [], "start_point": {"row": 300, "column": 29}, "end_point": {"row": 300, "column": 37}}, {"id": 920, "type": "identifier", "text": "YELLOW_Y", "parent": 918, "children": [], "start_point": {"row": 300, "column": 39}, "end_point": {"row": 300, "column": 47}}, {"id": 921, "type": "identifier", "text": "RADIUS", "parent": 918, "children": [], "start_point": {"row": 300, "column": 49}, "end_point": {"row": 300, "column": 55}}, {"id": 922, "type": "identifier", "text": "YELLOW_COLOR", "parent": 918, "children": [], "start_point": {"row": 300, "column": 57}, "end_point": {"row": 300, "column": 69}}, {"id": 923, "type": "assignment_expression", "text": "YellowLightOn = SET", "parent": 911, "children": [924, 925, 926], "start_point": {"row": 301, "column": 8}, "end_point": {"row": 301, "column": 27}}, {"id": 924, "type": "identifier", "text": "YellowLightOn", "parent": 923, "children": [], "start_point": {"row": 301, "column": 8}, "end_point": {"row": 301, "column": 21}}, {"id": 925, "type": "=", "text": "=", "parent": 923, "children": [], "start_point": {"row": 301, "column": 22}, "end_point": {"row": 301, "column": 23}}, {"id": 926, "type": "identifier", "text": "SET", "parent": 923, "children": [], "start_point": {"row": 301, "column": 24}, "end_point": {"row": 301, "column": 27}}, {"id": 927, "type": "break_statement", "text": "break;", "parent": 880, "children": [928], "start_point": {"row": 303, "column": 6}, "end_point": {"row": 303, "column": 12}}, {"id": 928, "type": "break", "text": "break", "parent": 927, "children": [], "start_point": {"row": 303, "column": 6}, "end_point": {"row": 303, "column": 11}}, {"id": 929, "type": "case_statement", "text": "default:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;", "parent": 731, "children": [930, 931, 945, 959, 973], "start_point": {"row": 305, "column": 4}, "end_point": {"row": 318, "column": 12}}, {"id": 930, "type": "default", "text": "default", "parent": 929, "children": [], "start_point": {"row": 305, "column": 4}, "end_point": {"row": 305, "column": 11}}, {"id": 931, "type": "if_statement", "text": "if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n }", "parent": 929, "children": [932], "start_point": {"row": 306, "column": 6}, "end_point": {"row": 309, "column": 7}}, {"id": 932, "type": "parenthesized_expression", "text": "(RedLightOn)", "parent": 931, "children": [933], "start_point": {"row": 306, "column": 8}, "end_point": {"row": 306, "column": 20}}, {"id": 933, "type": "identifier", "text": "RedLightOn", "parent": 932, "children": [], "start_point": {"row": 306, "column": 9}, "end_point": {"row": 306, "column": 19}}, {"id": 934, "type": "call_expression", "text": "LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 931, "children": [935, 936], "start_point": {"row": 307, "column": 8}, "end_point": {"row": 307, "column": 68}}, {"id": 935, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 934, "children": [], "start_point": {"row": 307, "column": 8}, "end_point": {"row": 307, "column": 28}}, {"id": 936, "type": "argument_list", "text": "(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR)", "parent": 934, "children": [937, 938, 939, 940], "start_point": {"row": 307, "column": 28}, "end_point": {"row": 307, "column": 68}}, {"id": 937, "type": "identifier", "text": "RED_X", "parent": 936, "children": [], "start_point": {"row": 307, "column": 29}, "end_point": {"row": 307, "column": 34}}, {"id": 938, "type": "identifier", "text": "RED_Y", "parent": 936, "children": [], "start_point": {"row": 307, "column": 36}, "end_point": {"row": 307, "column": 41}}, {"id": 939, "type": "identifier", "text": "RADIUS", "parent": 936, "children": [], "start_point": {"row": 307, "column": 43}, "end_point": {"row": 307, "column": 49}}, {"id": 940, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 936, "children": [], "start_point": {"row": 307, "column": 51}, "end_point": {"row": 307, "column": 67}}, {"id": 941, "type": "assignment_expression", "text": "RedLightOn = RESET", "parent": 931, "children": [942, 943, 944], "start_point": {"row": 308, "column": 8}, "end_point": {"row": 308, "column": 26}}, {"id": 942, "type": "identifier", "text": "RedLightOn", "parent": 941, "children": [], "start_point": {"row": 308, "column": 8}, "end_point": {"row": 308, "column": 18}}, {"id": 943, "type": "=", "text": "=", "parent": 941, "children": [], "start_point": {"row": 308, "column": 19}, "end_point": {"row": 308, "column": 20}}, {"id": 944, "type": "identifier", "text": "RESET", "parent": 941, "children": [], "start_point": {"row": 308, "column": 21}, "end_point": {"row": 308, "column": 26}}, {"id": 945, "type": "if_statement", "text": "if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }", "parent": 929, "children": [946], "start_point": {"row": 310, "column": 6}, "end_point": {"row": 313, "column": 7}}, {"id": 946, "type": "parenthesized_expression", "text": "(GreenLightOn)", "parent": 945, "children": [947], "start_point": {"row": 310, "column": 8}, "end_point": {"row": 310, "column": 22}}, {"id": 947, "type": "identifier", "text": "GreenLightOn", "parent": 946, "children": [], "start_point": {"row": 310, "column": 9}, "end_point": {"row": 310, "column": 21}}, {"id": 948, "type": "call_expression", "text": "LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 945, "children": [949, 950], "start_point": {"row": 311, "column": 8}, "end_point": {"row": 311, "column": 72}}, {"id": 949, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 948, "children": [], "start_point": {"row": 311, "column": 8}, "end_point": {"row": 311, "column": 28}}, {"id": 950, "type": "argument_list", "text": "(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR)", "parent": 948, "children": [951, 952, 953, 954], "start_point": {"row": 311, "column": 28}, "end_point": {"row": 311, "column": 72}}, {"id": 951, "type": "identifier", "text": "GREEN_X", "parent": 950, "children": [], "start_point": {"row": 311, "column": 29}, "end_point": {"row": 311, "column": 36}}, {"id": 952, "type": "identifier", "text": "GREEN_Y", "parent": 950, "children": [], "start_point": {"row": 311, "column": 38}, "end_point": {"row": 311, "column": 45}}, {"id": 953, "type": "identifier", "text": "RADIUS", "parent": 950, "children": [], "start_point": {"row": 311, "column": 47}, "end_point": {"row": 311, "column": 53}}, {"id": 954, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 950, "children": [], "start_point": {"row": 311, "column": 55}, "end_point": {"row": 311, "column": 71}}, {"id": 955, "type": "assignment_expression", "text": "GreenLightOn = RESET", "parent": 945, "children": [956, 957, 958], "start_point": {"row": 312, "column": 8}, "end_point": {"row": 312, "column": 28}}, {"id": 956, "type": "identifier", "text": "GreenLightOn", "parent": 955, "children": [], "start_point": {"row": 312, "column": 8}, "end_point": {"row": 312, "column": 20}}, {"id": 957, "type": "=", "text": "=", "parent": 955, "children": [], "start_point": {"row": 312, "column": 21}, "end_point": {"row": 312, "column": 22}}, {"id": 958, "type": "identifier", "text": "RESET", "parent": 955, "children": [], "start_point": {"row": 312, "column": 23}, "end_point": {"row": 312, "column": 28}}, {"id": 959, "type": "if_statement", "text": "if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }", "parent": 929, "children": [960], "start_point": {"row": 314, "column": 6}, "end_point": {"row": 317, "column": 7}}, {"id": 960, "type": "parenthesized_expression", "text": "(YellowLightOn)", "parent": 959, "children": [961], "start_point": {"row": 314, "column": 8}, "end_point": {"row": 314, "column": 23}}, {"id": 961, "type": "identifier", "text": "YellowLightOn", "parent": 960, "children": [], "start_point": {"row": 314, "column": 9}, "end_point": {"row": 314, "column": 22}}, {"id": 962, "type": "call_expression", "text": "LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 959, "children": [963, 964], "start_point": {"row": 315, "column": 8}, "end_point": {"row": 315, "column": 74}}, {"id": 963, "type": "identifier", "text": "LCD_DrawFilledCircle", "parent": 962, "children": [], "start_point": {"row": 315, "column": 8}, "end_point": {"row": 315, "column": 28}}, {"id": 964, "type": "argument_list", "text": "(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR)", "parent": 962, "children": [965, 966, 967, 968], "start_point": {"row": 315, "column": 28}, "end_point": {"row": 315, "column": 74}}, {"id": 965, "type": "identifier", "text": "YELLOW_X", "parent": 964, "children": [], "start_point": {"row": 315, "column": 29}, "end_point": {"row": 315, "column": 37}}, {"id": 966, "type": "identifier", "text": "YELLOW_Y", "parent": 964, "children": [], "start_point": {"row": 315, "column": 39}, "end_point": {"row": 315, "column": 47}}, {"id": 967, "type": "identifier", "text": "RADIUS", "parent": 964, "children": [], "start_point": {"row": 315, "column": 49}, "end_point": {"row": 315, "column": 55}}, {"id": 968, "type": "identifier", "text": "BACKGROUND_COLOR", "parent": 964, "children": [], "start_point": {"row": 315, "column": 57}, "end_point": {"row": 315, "column": 73}}, {"id": 969, "type": "assignment_expression", "text": "YellowLightOn = RESET", "parent": 959, "children": [970, 971, 972], "start_point": {"row": 316, "column": 8}, "end_point": {"row": 316, "column": 29}}, {"id": 970, "type": "identifier", "text": "YellowLightOn", "parent": 969, "children": [], "start_point": {"row": 316, "column": 8}, "end_point": {"row": 316, "column": 21}}, {"id": 971, "type": "=", "text": "=", "parent": 969, "children": [], "start_point": {"row": 316, "column": 22}, "end_point": {"row": 316, "column": 23}}, {"id": 972, "type": "identifier", "text": "RESET", "parent": 969, "children": [], "start_point": {"row": 316, "column": 24}, "end_point": {"row": 316, "column": 29}}, {"id": 973, "type": "break_statement", "text": "break;", "parent": 929, "children": [974], "start_point": {"row": 318, "column": 6}, "end_point": {"row": 318, "column": 12}}, {"id": 974, "type": "break", "text": "break", "parent": 973, "children": [], "start_point": {"row": 318, "column": 6}, "end_point": {"row": 318, "column": 11}}]}, "node_categories": {"declarations": {"functions": [85, 95, 105, 115, 120, 122, 136, 138, 255, 257, 387, 389, 506, 508, 589, 591], "variables": [23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 88, 93, 98, 103, 108, 113, 118, 125, 128, 141, 260, 265, 271, 287, 295, 392, 407, 415, 511, 594, 596, 602], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [134, 143, 146, 149, 153, 159, 164, 171, 178, 183, 187, 192, 196, 201, 205, 217, 221, 233, 237, 249, 253, 280, 304, 309, 315, 321, 325, 326, 327, 328, 329, 330, 335, 340, 345, 350, 351, 352, 357, 383, 400, 424, 429, 435, 441, 445, 446, 447, 448, 449, 454, 459, 464, 469, 470, 471, 476, 502, 523, 531, 536, 540, 541, 542, 543, 544, 549, 558, 559, 560, 565, 577, 585, 610, 616, 633, 641, 653, 661, 669, 681, 689, 706, 707, 733, 739, 741, 753, 755, 767, 769, 786, 787, 790, 802, 804, 816, 818, 835, 837, 849, 850, 853, 865, 867, 884, 886, 898, 900, 912, 913, 916, 932, 934, 946, 948, 960, 962], "assignments": [277, 283, 306, 312, 318, 361, 365, 370, 375, 379, 397, 403, 426, 432, 438, 480, 484, 489, 494, 498, 516, 520, 526, 533, 569, 573, 581, 618, 623, 635, 643, 655, 663, 671, 683, 691, 699, 711, 715, 719, 723, 727, 748, 762, 776, 797, 811, 825, 844, 860, 874, 893, 907, 923, 941, 955, 969], "loops": [133, 252, 303, 423, 530], "conditionals": [17, 21, 26, 28, 32, 34, 38, 40, 44, 50, 56, 62, 68, 70, 74, 76, 80, 82, 86, 92, 96, 102, 106, 112, 116, 123, 126, 127, 132, 139, 144, 147, 150, 152, 154, 160, 165, 167, 168, 169, 170, 172, 174, 175, 176, 177, 179, 181, 182, 184, 188, 190, 191, 193, 197, 202, 204, 218, 220, 234, 236, 250, 258, 264, 268, 274, 278, 281, 284, 286, 288, 292, 296, 300, 307, 310, 313, 316, 319, 322, 324, 331, 333, 336, 338, 341, 343, 346, 348, 349, 353, 355, 358, 360, 362, 364, 366, 368, 371, 373, 376, 378, 380, 382, 384, 390, 396, 398, 401, 404, 406, 408, 412, 416, 420, 427, 430, 433, 436, 439, 442, 444, 450, 452, 455, 457, 460, 462, 465, 467, 468, 472, 474, 477, 479, 481, 483, 485, 487, 490, 492, 495, 497, 499, 501, 503, 509, 515, 517, 519, 521, 524, 527, 529, 534, 537, 539, 545, 547, 550, 552, 554, 556, 557, 561, 563, 566, 568, 570, 572, 574, 576, 578, 582, 584, 586, 592, 597, 599, 601, 603, 605, 607, 608, 609, 611, 612, 613, 614, 615, 617, 619, 621, 624, 626, 629, 630, 631, 632, 634, 636, 638, 640, 642, 644, 646, 649, 650, 651, 652, 654, 656, 658, 660, 662, 664, 666, 668, 670, 672, 674, 677, 678, 679, 680, 682, 684, 686, 688, 690, 692, 694, 697, 700, 702, 705, 708, 710, 712, 714, 716, 718, 720, 722, 724, 726, 728, 730, 731, 732, 734, 735, 736, 737, 738, 740, 742, 744, 745, 746, 747, 749, 751, 752, 754, 756, 758, 759, 760, 761, 763, 765, 766, 768, 770, 772, 773, 774, 775, 777, 779, 782, 783, 784, 785, 789, 791, 793, 794, 795, 796, 798, 800, 801, 803, 805, 807, 808, 809, 810, 812, 814, 815, 817, 819, 821, 822, 823, 824, 826, 828, 831, 832, 833, 834, 836, 838, 840, 841, 842, 843, 845, 847, 848, 852, 854, 856, 857, 858, 859, 861, 863, 864, 866, 868, 870, 871, 872, 873, 875, 877, 880, 881, 882, 883, 885, 887, 889, 890, 891, 892, 894, 896, 897, 899, 901, 903, 904, 905, 906, 908, 910, 911, 915, 917, 919, 920, 921, 922, 924, 926, 929, 931, 933, 935, 937, 938, 939, 940, 942, 944, 945, 947, 949, 951, 952, 953, 954, 956, 958, 959, 961, 963, 965, 966, 967, 968, 970, 972], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 46, 52, 58, 64, 135, 156, 157, 158, 162, 163, 186, 195, 199, 200, 210, 211, 214, 226, 227, 230, 242, 243, 246, 254, 270, 276, 294, 302, 305, 386, 414, 422, 425, 505, 532, 588], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "Pedestrian(void *p)"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "StartStop(void *p)"}, {"node_id": 105, "universal_type": "function", "name": "unknown", "text_snippet": "Control(void *p)"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "FSM(void)"}, {"node_id": 120, "universal_type": "function", "name": "vApplicationStackOverflowHook", "text_snippet": "void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) {\r\n while (1) {}\r\n}"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName)"}, {"node_id": 136, "universal_type": "function", "name": "main", "text_snippet": "int main(void) {\r\n // Initialize the display and touch\r\n // functionalities of the SSD2119 touch d"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "main(void)"}, {"node_id": 255, "universal_type": "function", "name": "StartStop", "text_snippet": "void StartStop(void *p) {\r\n // keep track of time\r\n static int curr_onoff_tick_time = 0;\r\n static"}, {"node_id": 257, "universal_type": "function", "name": "unknown", "text_snippet": "StartStop(void *p)"}, {"node_id": 387, "universal_type": "function", "name": "Pedestrian", "text_snippet": "void Pedestrian(void *p) {\r\n curr_ped_tick_time = xTaskGetTickCount();\r\n prev_ped_tick_time = curr"}, {"node_id": 389, "universal_type": "function", "name": "unknown", "text_snippet": "Pedestrian(void *p)"}, {"node_id": 506, "universal_type": "function", "name": "Control", "text_snippet": "void Control(void *p) {\r\n // keep track of time\r\n time_expired = RESET;\r\n curr_light_tick_time = "}, {"node_id": 508, "universal_type": "function", "name": "unknown", "text_snippet": "Control(void *p)"}, {"node_id": 589, "universal_type": "function", "name": "FSM", "text_snippet": "void FSM(void) {\r\n static TL_states_e present_state = IDLE;\r\n static TL_states_e next_state = IDLE"}, {"node_id": 591, "universal_type": "function", "name": "unknown", "text_snippet": "FSM(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"FreeRTOS.h\"\r\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"task.h\"\r\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"SSD2119_Display.h\"\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"SSD2119_Touch.h\"\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"task2.h\"\r\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "\r\n#include \"FreeRTOS.h\"\r\n#include \"task.h\"\r\n\r\n// SSD2119 Display and Touch Drivers\r\n#include \"SSD2119_Display.h\"\r\n#include \"SSD2119_Touch.h\"\r\n\r\n// header file specific to task 2\r\n#include \"task2.h\"\r\n\r\n#define SET 1U \r\n#define RESET 0U\r\n\r\n// Flags for the buttons and the timer\r\nint pedestrian_pressed = RESET;\r\nint onoff_pressed = RESET;\r\nint time_expired = RESET;\r\n\r\n// light_tick is global because FSM() needs to reset the timer when an input\r\n// results in a transition \r\nstatic int curr_light_tick_time = 0;\r\nstatic int prev_light_tick_time = 0;\r\n\r\n// ped_tick global because FSM() needs to reset this timer to ensure that\r\n// the pedestrian button be pressed for two seconds during GO before going to WARN\r\nstatic int curr_ped_tick_time = 0;\r\nstatic int prev_ped_tick_time = 0;\r\n\r\n// Since drawing circles on the screen is time-consuming, we'll keep track of the light states\r\n// so that we don't draw on an already drawn spot\r\nuint8_t GreenLightOn = RESET;\r\nuint8_t YellowLightOn = RESET;\r\nuint8_t RedLightOn = RESET;\r\n\r\n// Task function that checks the state of the virtual pedestrian button.\r\n// Keeps track of how many seconds the pedestrian button has been pressed.\r\n// Once the user has pressed the virtual pedestrian button for 2 seconds,\r\n// it will set the global flag indicating the virtual pedestrian button\r\n// has been pressed.\r\nvoid Pedestrian(void *p);\r\n\r\n// Task function that checks the state of the virtual onoff button.\r\n// Keeps track of how many seconds the onoff button has been pressed.\r\n// Once the user has pressed the onoff button for 2 seconds,\r\n// it will set the global flag indicating the onoff button has been\r\n// pressed\r\nvoid StartStop(void *p);\r\n\r\n// Task function that represents your Finite State Machine.\r\n// Keeps track of how many seconds the virtual traffic light has been\r\n// lighting on. It will update the state of the traffic light system\r\n// every 5 seconds or once there's virtual button input.\r\nvoid Control(void *p);\r\n\r\n// Helper function that represents the traffic light FSM\r\n// Handles the traffic light state transition.\r\nvoid FSM(void);\r\n\r\nvoid vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName) {\r\n while (1) {}\r\n}\r\n\r\nint main(void) {\r\n // Initialize the display and touch\r\n // functionalities of the SSD2119 touch display assembly.\r\n LCD_Init();\r\n Touch_Init();\r\n\r\n // Draw initial state of the screen\r\n LCD_ColorFill(BACKGROUND_COLOR);\r\n LCD_SetTextColor(255, 255, 255);\r\n LCD_SetCursor(0, 0);\r\n\r\n // Draw buttons\r\n LCD_DrawFilledCircle(START_STOP_X, START_STOP_Y, RADIUS, START_STOP_COLOR);\r\n LCD_DrawFilledCircle(PED_X, PED_Y, RADIUS, PED_COLOR);\r\n\r\n // Label buttons\r\n LCD_SetCursor(START_STOP_LABEL_X, START_STOP_LABEL_Y);\r\n LCD_PrintString(\"Start/Stop\");\r\n LCD_SetCursor(PED_LABEL_X, PED_LABEL_Y);\r\n LCD_PrintString(\"Pedestrian\");\r\n LCD_SetCursor(0, 0);\r\n\r\n xTaskCreate(StartStop, (const char *)\"StartStopButton\", 1024, NULL, 0U, NULL);\r\n xTaskCreate(Pedestrian, (const char *)\"PedestrianButton\", 1024, NULL, 0U, NULL);\r\n xTaskCreate(Control, (const char *)\"Control FSM\", 1024, NULL, 0U, NULL);\r\n\r\n vTaskStartScheduler();\r\n\r\n while(1);\r\n}\r\n\r\nvoid StartStop(void *p) {\r\n // keep track of time\r\n static int curr_onoff_tick_time = 0;\r\n static int prev_onoff_tick_time = 0;\r\n curr_onoff_tick_time = xTaskGetTickCount();\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n\r\n // coordinates of a touch\r\n unsigned long x = 0;\r\n unsigned long y = 0;\r\n while (1) {\r\n curr_onoff_tick_time = xTaskGetTickCount();\r\n\r\n // Check whether the virtual button is pressed\r\n x = Touch_ReadX();\r\n y = Touch_ReadY();\r\n if ((START_STOP_LEFT_LIMIT < x && x < START_STOP_RIGHT_LIMIT && \r\n START_STOP_BOTTOM_LIMIT < y && y < START_STOP_TOP_LIMIT)) { \r\n if (curr_onoff_tick_time - prev_onoff_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n onoff_pressed = SET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n else {\r\n onoff_pressed = RESET;\r\n }\r\n } else {\r\n onoff_pressed = RESET;\r\n prev_onoff_tick_time = curr_onoff_tick_time;\r\n }\r\n\r\n vTaskDelay(1);\r\n }\r\n}\r\n\r\nvoid Pedestrian(void *p) {\r\n curr_ped_tick_time = xTaskGetTickCount();\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n\r\n // coordinates of a touch\r\n unsigned long x = 0;\r\n unsigned long y = 0;\r\n\r\n while (1) {\r\n curr_ped_tick_time = xTaskGetTickCount();\r\n\r\n // check if button has been pressed\r\n x = Touch_ReadX();\r\n y = Touch_ReadY();\r\n\r\n if (PED_LEFT_LIMIT < x && x < PED_RIGHT_LIMIT && \r\n PED_BOT_LIMIT < y && y < PED_TOP_LIMIT) { \r\n if (curr_ped_tick_time - prev_ped_tick_time >= SEC_TO_MS(BUTTON_PRESS_IN_S)) {\r\n // register the input\r\n pedestrian_pressed = SET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n else {\r\n pedestrian_pressed = RESET;\r\n }\r\n } else {\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n\r\n vTaskDelay(1);\r\n }\r\n}\r\n\r\nvoid Control(void *p) {\r\n // keep track of time\r\n time_expired = RESET;\r\n curr_light_tick_time = xTaskGetTickCount();\r\n prev_light_tick_time = curr_light_tick_time;\r\n\r\n while (1) {\r\n curr_light_tick_time = xTaskGetTickCount();\r\n\r\n // check if time to make a transition or if there's been virtual input\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S) || onoff_pressed || pedestrian_pressed) { \r\n \r\n // register that timer has expired\r\n if (curr_light_tick_time - prev_light_tick_time >= SEC_TO_MS(TRANSITION_TIMEOUT_IN_S)) {\r\n time_expired = SET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n } \r\n \r\n FSM();\r\n } else {\r\n time_expired = RESET;\r\n }\r\n\r\n vTaskDelay(1);\r\n }\r\n}\r\n\r\nvoid FSM(void) {\r\n static TL_states_e present_state = IDLE;\r\n static TL_states_e next_state = IDLE;\r\n\r\n // choose next state\r\n switch (present_state) {\r\n case IDLE:\r\n if (onoff_pressed) {\r\n next_state = STOP;\r\n } else {\r\n next_state = IDLE;\r\n }\r\n break;\r\n\r\n case STOP:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = GO;\r\n }\r\n break;\r\n\r\n case GO:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(pedestrian_pressed) {\r\n next_state = WARN;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;\r\n\r\n case WARN:\r\n if (onoff_pressed) {\r\n next_state = IDLE;\r\n } else if(time_expired) {\r\n next_state = STOP;\r\n }\r\n break;\r\n \r\n default:\r\n next_state = IDLE;\r\n break;\r\n } \r\n\r\n if (next_state != present_state) {\r\n present_state = next_state;\r\n time_expired = RESET;\r\n prev_light_tick_time = curr_light_tick_time;\r\n pedestrian_pressed = RESET;\r\n prev_ped_tick_time = curr_ped_tick_time;\r\n }\r\n\r\n // produce the output\r\n switch (present_state) {\r\n case IDLE:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case STOP:\r\n if(!RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, RED_COLOR);\r\n RedLightOn = SET;\r\n }\r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case GO:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(!GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, GREEN_COLOR);\r\n GreenLightOn = SET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n\r\n case WARN:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(!YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, YELLOW_COLOR);\r\n YellowLightOn = SET;\r\n }\r\n break;\r\n\r\n default:\r\n if(RedLightOn) {\r\n LCD_DrawFilledCircle(RED_X, RED_Y, RADIUS, BACKGROUND_COLOR);\r\n RedLightOn = RESET;\r\n } \r\n if(GreenLightOn) {\r\n LCD_DrawFilledCircle(GREEN_X, GREEN_Y, RADIUS, BACKGROUND_COLOR);\r\n GreenLightOn = RESET;\r\n }\r\n if(YellowLightOn) {\r\n LCD_DrawFilledCircle(YELLOW_X, YELLOW_Y, RADIUS, BACKGROUND_COLOR);\r\n YellowLightOn = RESET;\r\n }\r\n break;\r\n }\r\n}\r\n"}
219
c
/******************************************************************************* * Copyright 2015 MobileMan GmbH * www.mobileman.com * * 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. ******************************************************************************/ // // StreamSettingsViewController.h // moments // // Created by MobileMan GmbH on 28/05/15. // Copyright (c) 2015 MobileMan GmbH. All rights reserved. // #import <UIKit/UIKit.h> typedef enum _SettingType { kSettingTypeUnknown = -1, kSettingTypeMinBitrate = 0, kSettingTypeMaxBitrate = 1, kSettingTypeSegmentsCount = 2, kSettingTypeSegmentsDuration = 3, kSettingTypeFramerate = 4, kSettingTypePreset = 5, kSettingTypeCodec = 6 } SettingType; @interface StreamSettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate> @property (nonatomic, strong) IBOutlet UIButton *backButton; @property (nonatomic, strong) IBOutlet UILabel *titleLabel; @property (nonatomic, strong) IBOutlet UITableView *tableView; @property (assign) SettingType showingSettingsOfType; - (IBAction)back:(id)sender; @end
38.45
42
(translation_unit) "/*******************************************************************************\n * Copyright 2015 MobileMan GmbH\n * www.mobileman.com\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//\n// StreamSettingsViewController.h\n// moments\n//\n// Created by MobileMan GmbH on 28/05/15.\n// Copyright (c) 2015 MobileMan GmbH. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef enum _SettingType {\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n} SettingType;\n\n@interface StreamSettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton *backButton;\n@property (nonatomic, strong) IBOutlet UILabel *titleLabel;\n@property (nonatomic, strong) IBOutlet UITableView *tableView;\n\n@property (assign) SettingType showingSettingsOfType;\n\n- (IBAction)back:(id)sender;\n\n@end\n" (comment) "/*******************************************************************************\n * Copyright 2015 MobileMan GmbH\n * www.mobileman.com\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) "//" (comment) "// StreamSettingsViewController.h" (comment) "// moments" (comment) "//" (comment) "// Created by MobileMan GmbH on 28/05/15." (comment) "// Copyright (c) 2015 MobileMan GmbH. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (type_definition) "typedef enum _SettingType {\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n} SettingType;" (typedef) "typedef" (enum_specifier) "enum _SettingType {\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n}" (enum) "enum" (type_identifier) "_SettingType" (enumerator_list) "{\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n}" ({) "{" (enumerator) "kSettingTypeUnknown = -1" (identifier) "kSettingTypeUnknown" (=) "=" (number_literal) "-1" (,) "," (enumerator) "kSettingTypeMinBitrate = 0" (identifier) "kSettingTypeMinBitrate" (=) "=" (number_literal) "0" (,) "," (enumerator) "kSettingTypeMaxBitrate = 1" (identifier) "kSettingTypeMaxBitrate" (=) "=" (number_literal) "1" (,) "," (enumerator) "kSettingTypeSegmentsCount = 2" (identifier) "kSettingTypeSegmentsCount" (=) "=" (number_literal) "2" (,) "," (enumerator) "kSettingTypeSegmentsDuration = 3" (identifier) "kSettingTypeSegmentsDuration" (=) "=" (number_literal) "3" (,) "," (enumerator) "kSettingTypeFramerate = 4" (identifier) "kSettingTypeFramerate" (=) "=" (number_literal) "4" (,) "," (enumerator) "kSettingTypePreset = 5" (identifier) "kSettingTypePreset" (=) "=" (number_literal) "5" (,) "," (enumerator) "kSettingTypeCodec = 6" (identifier) "kSettingTypeCodec" (=) "=" (number_literal) "6" (}) "}" (type_identifier) "SettingType" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "interface StreamSettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton *backButton;" (type_identifier) "interface" (identifier) "StreamSettingsViewController" (ERROR) ": UIViewController <UITableViewDataSource" (:) ":" (identifier) "UIViewController" (<) "<" (identifier) "UITableViewDataSource" (,) "," (identifier) "UITableViewDelegate" (,) "," (ERROR) "UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton" (function_declarator) "UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton" (identifier) "UIActionSheetDelegate" (ERROR) ">\n\n@property" (>) ">" (ERROR) "@" (identifier) "property" (parameter_list) "(nonatomic, strong)" (() "(" (parameter_declaration) "nonatomic" (type_identifier) "nonatomic" (,) "," (parameter_declaration) "strong" (type_identifier) "strong" ()) ")" (identifier) "IBOutlet" (identifier) "UIButton" (pointer_declarator) "*backButton" (*) "*" (identifier) "backButton" (;) ";" (ERROR) "@property (nonatomic, strong) IBOutlet" (ERROR) "@" (call_expression) "property (nonatomic, strong)" (identifier) "property" (argument_list) "(nonatomic, strong)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "strong" ()) ")" (identifier) "IBOutlet" (declaration) "UILabel *titleLabel;" (type_identifier) "UILabel" (pointer_declarator) "*titleLabel" (*) "*" (identifier) "titleLabel" (;) ";" (ERROR) "@property (nonatomic, strong) IBOutlet" (ERROR) "@" (call_expression) "property (nonatomic, strong)" (identifier) "property" (argument_list) "(nonatomic, strong)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "strong" ()) ")" (identifier) "IBOutlet" (declaration) "UITableView *tableView;" (type_identifier) "UITableView" (pointer_declarator) "*tableView" (*) "*" (identifier) "tableView" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property (assign) SettingType" (macro_type_specifier) "property (assign)" (identifier) "property" (() "(" (type_descriptor) "assign" (type_identifier) "assign" ()) ")" (identifier) "SettingType" (;) "" (expression_statement) "showingSettingsOfType;" (identifier) "showingSettingsOfType" (;) ";" (expression_statement) "- (IBAction)back:(id)sender;" (unary_expression) "- (IBAction)back" (-) "-" (cast_expression) "(IBAction)back" (() "(" (type_descriptor) "IBAction" (type_identifier) "IBAction" ()) ")" (identifier) "back" (ERROR) ":(id)sender" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "sender" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
164
15
{"language": "c", "success": true, "metadata": {"lines": 42, "avg_line_length": 38.45, "nodes": 115, "errors": 0, "source_hash": "b6edc8e8dd5285e4f21023879b0cbd7520483e2ee6a7b0b6625e8da80410cd8a", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 0, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 23}}, {"id": 3, "type": "type_definition", "text": "typedef enum _SettingType {\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n} SettingType;", "parent": null, "children": [4, 5, 41], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 37, "column": 14}}, {"id": 4, "type": "typedef", "text": "typedef", "parent": 3, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 5, "type": "enum_specifier", "text": "enum _SettingType {\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n}", "parent": 3, "children": [6, 7, 8], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 37, "column": 1}}, {"id": 6, "type": "enum", "text": "enum", "parent": 5, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 12}}, {"id": 7, "type": "type_identifier", "text": "_SettingType", "parent": 5, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 25}}, {"id": 8, "type": "enumerator_list", "text": "{\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n}", "parent": 5, "children": [9, 13, 17, 21, 25, 29, 33, 37], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 37, "column": 1}}, {"id": 9, "type": "enumerator", "text": "kSettingTypeUnknown = -1", "parent": 8, "children": [10, 11, 12], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 28}}, {"id": 10, "type": "identifier", "text": "kSettingTypeUnknown", "parent": 9, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 23}}, {"id": 11, "type": "=", "text": "=", "parent": 9, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 25}}, {"id": 12, "type": "number_literal", "text": "-1", "parent": 9, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 28}}, {"id": 13, "type": "enumerator", "text": "kSettingTypeMinBitrate = 0", "parent": 8, "children": [14, 15, 16], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 30}}, {"id": 14, "type": "identifier", "text": "kSettingTypeMinBitrate", "parent": 13, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 26}}, {"id": 15, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 28}}, {"id": 16, "type": "number_literal", "text": "0", "parent": 13, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 30}}, {"id": 17, "type": "enumerator", "text": "kSettingTypeMaxBitrate = 1", "parent": 8, "children": [18, 19, 20], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 30}}, {"id": 18, "type": "identifier", "text": "kSettingTypeMaxBitrate", "parent": 17, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 26}}, {"id": 19, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 28}}, {"id": 20, "type": "number_literal", "text": "1", "parent": 17, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 30}}, {"id": 21, "type": "enumerator", "text": "kSettingTypeSegmentsCount = 2", "parent": 8, "children": [22, 23, 24], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 33}}, {"id": 22, "type": "identifier", "text": "kSettingTypeSegmentsCount", "parent": 21, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 29}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 31}}, {"id": 24, "type": "number_literal", "text": "2", "parent": 21, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 33}}, {"id": 25, "type": "enumerator", "text": "kSettingTypeSegmentsDuration = 3", "parent": 8, "children": [26, 27, 28], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 36}}, {"id": 26, "type": "identifier", "text": "kSettingTypeSegmentsDuration", "parent": 25, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 32}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 34}}, {"id": 28, "type": "number_literal", "text": "3", "parent": 25, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 36}}, {"id": 29, "type": "enumerator", "text": "kSettingTypeFramerate = 4", "parent": 8, "children": [30, 31, 32], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 29}}, {"id": 30, "type": "identifier", "text": "kSettingTypeFramerate", "parent": 29, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 25}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 27}}, {"id": 32, "type": "number_literal", "text": "4", "parent": 29, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 29}}, {"id": 33, "type": "enumerator", "text": "kSettingTypePreset = 5", "parent": 8, "children": [34, 35, 36], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 26}}, {"id": 34, "type": "identifier", "text": "kSettingTypePreset", "parent": 33, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 22}}, {"id": 35, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 24}}, {"id": 36, "type": "number_literal", "text": "5", "parent": 33, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 26}}, {"id": 37, "type": "enumerator", "text": "kSettingTypeCodec = 6", "parent": 8, "children": [38, 39, 40], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 25}}, {"id": 38, "type": "identifier", "text": "kSettingTypeCodec", "parent": 37, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 21}}, {"id": 39, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 23}}, {"id": 40, "type": "number_literal", "text": "6", "parent": 37, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 25}}, {"id": 41, "type": "type_identifier", "text": "SettingType", "parent": 3, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 13}}, {"id": 42, "type": "ERROR", "text": "@", "parent": null, "children": [43], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 43, "type": "ERROR", "text": "@", "parent": 42, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 44, "type": "declaration", "text": "interface StreamSettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton *backButton;", "parent": null, "children": [45, 46, 47, 51, 52, 66], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 41, "column": 60}}, {"id": 45, "type": "type_identifier", "text": "interface", "parent": 44, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 10}}, {"id": 46, "type": "identifier", "text": "StreamSettingsViewController", "parent": 44, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 39}}, {"id": 47, "type": "ERROR", "text": ": UIViewController <UITableViewDataSource", "parent": 44, "children": [48, 49, 50], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 81}}, {"id": 48, "type": "identifier", "text": "UIViewController", "parent": 47, "children": [], "start_point": {"row": 39, "column": 42}, "end_point": {"row": 39, "column": 58}}, {"id": 49, "type": "<", "text": "<", "parent": 47, "children": [], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 60}}, {"id": 50, "type": "identifier", "text": "UITableViewDataSource", "parent": 47, "children": [], "start_point": {"row": 39, "column": 60}, "end_point": {"row": 39, "column": 81}}, {"id": 51, "type": "identifier", "text": "UITableViewDelegate", "parent": 44, "children": [], "start_point": {"row": 39, "column": 83}, "end_point": {"row": 39, "column": 102}}, {"id": 52, "type": "ERROR", "text": "UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton", "parent": 44, "children": [53], "start_point": {"row": 39, "column": 104}, "end_point": {"row": 41, "column": 47}}, {"id": 53, "type": "function_declarator", "text": "UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton", "parent": 52, "children": [54, 55, 59, 64, 65], "start_point": {"row": 39, "column": 104}, "end_point": {"row": 41, "column": 47}}, {"id": 54, "type": "identifier", "text": "UIActionSheetDelegate", "parent": 53, "children": [], "start_point": {"row": 39, "column": 104}, "end_point": {"row": 39, "column": 125}}, {"id": 55, "type": "ERROR", "text": ">\n\n@property", "parent": 53, "children": [56, 57, 58], "start_point": {"row": 39, "column": 125}, "end_point": {"row": 41, "column": 9}}, {"id": 56, "type": ">", "text": ">", "parent": 55, "children": [], "start_point": {"row": 39, "column": 125}, "end_point": {"row": 39, "column": 126}}, {"id": 57, "type": "ERROR", "text": "@", "parent": 55, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 58, "type": "identifier", "text": "property", "parent": 55, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 9}}, {"id": 59, "type": "parameter_list", "text": "(nonatomic, strong)", "parent": 53, "children": [60, 62], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 29}}, {"id": 60, "type": "parameter_declaration", "text": "nonatomic", "parent": 59, "children": [61], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 20}}, {"id": 61, "type": "type_identifier", "text": "nonatomic", "parent": 60, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 20}}, {"id": 62, "type": "parameter_declaration", "text": "strong", "parent": 59, "children": [63], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 28}}, {"id": 63, "type": "type_identifier", "text": "strong", "parent": 62, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 28}}, {"id": 64, "type": "identifier", "text": "IBOutlet", "parent": 53, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 38}}, {"id": 65, "type": "identifier", "text": "UIButton", "parent": 53, "children": [], "start_point": {"row": 41, "column": 39}, "end_point": {"row": 41, "column": 47}}, {"id": 66, "type": "pointer_declarator", "text": "*backButton", "parent": 44, "children": [67, 68], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 59}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 49}}, {"id": 68, "type": "identifier", "text": "backButton", "parent": 66, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 59}}, {"id": 69, "type": "ERROR", "text": "@property (nonatomic, strong) IBOutlet", "parent": null, "children": [70, 71, 76], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 38}}, {"id": 70, "type": "ERROR", "text": "@", "parent": 69, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 71, "type": "call_expression", "text": "property (nonatomic, strong)", "parent": 69, "children": [72, 73], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 29}}, {"id": 72, "type": "identifier", "text": "property", "parent": 71, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 9}}, {"id": 73, "type": "argument_list", "text": "(nonatomic, strong)", "parent": 71, "children": [74, 75], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 29}}, {"id": 74, "type": "identifier", "text": "nonatomic", "parent": 73, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 20}}, {"id": 75, "type": "identifier", "text": "strong", "parent": 73, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 28}}, {"id": 76, "type": "identifier", "text": "IBOutlet", "parent": 69, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 38}}, {"id": 77, "type": "declaration", "text": "UILabel *titleLabel;", "parent": null, "children": [78, 79], "start_point": {"row": 42, "column": 39}, "end_point": {"row": 42, "column": 59}}, {"id": 78, "type": "type_identifier", "text": "UILabel", "parent": 77, "children": [], "start_point": {"row": 42, "column": 39}, "end_point": {"row": 42, "column": 46}}, {"id": 79, "type": "pointer_declarator", "text": "*titleLabel", "parent": 77, "children": [80, 81], "start_point": {"row": 42, "column": 47}, "end_point": {"row": 42, "column": 58}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 42, "column": 47}, "end_point": {"row": 42, "column": 48}}, {"id": 81, "type": "identifier", "text": "titleLabel", "parent": 79, "children": [], "start_point": {"row": 42, "column": 48}, "end_point": {"row": 42, "column": 58}}, {"id": 82, "type": "ERROR", "text": "@property (nonatomic, strong) IBOutlet", "parent": null, "children": [83, 84, 89], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 38}}, {"id": 83, "type": "ERROR", "text": "@", "parent": 82, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 84, "type": "call_expression", "text": "property (nonatomic, strong)", "parent": 82, "children": [85, 86], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 29}}, {"id": 85, "type": "identifier", "text": "property", "parent": 84, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 9}}, {"id": 86, "type": "argument_list", "text": "(nonatomic, strong)", "parent": 84, "children": [87, 88], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 29}}, {"id": 87, "type": "identifier", "text": "nonatomic", "parent": 86, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 20}}, {"id": 88, "type": "identifier", "text": "strong", "parent": 86, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 28}}, {"id": 89, "type": "identifier", "text": "IBOutlet", "parent": 82, "children": [], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 38}}, {"id": 90, "type": "declaration", "text": "UITableView *tableView;", "parent": null, "children": [91, 92], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 62}}, {"id": 91, "type": "type_identifier", "text": "UITableView", "parent": 90, "children": [], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 50}}, {"id": 92, "type": "pointer_declarator", "text": "*tableView", "parent": 90, "children": [93, 94], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 61}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 52}}, {"id": 94, "type": "identifier", "text": "tableView", "parent": 92, "children": [], "start_point": {"row": 43, "column": 52}, "end_point": {"row": 43, "column": 61}}, {"id": 95, "type": "ERROR", "text": "@", "parent": null, "children": [96], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 96, "type": "ERROR", "text": "@", "parent": 95, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 97, "type": "declaration", "text": "property (assign) SettingType", "parent": null, "children": [98, 102], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 30}}, {"id": 98, "type": "macro_type_specifier", "text": "property (assign)", "parent": 97, "children": [99, 100], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 18}}, {"id": 99, "type": "identifier", "text": "property", "parent": 98, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 9}}, {"id": 100, "type": "type_descriptor", "text": "assign", "parent": 98, "children": [101], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 17}}, {"id": 101, "type": "type_identifier", "text": "assign", "parent": 100, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 17}}, {"id": 102, "type": "identifier", "text": "SettingType", "parent": 97, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 30}}, {"id": 103, "type": "identifier", "text": "showingSettingsOfType", "parent": null, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 52}}, {"id": 104, "type": "unary_expression", "text": "- (IBAction)back", "parent": null, "children": [105, 106], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 16}}, {"id": 105, "type": "-", "text": "-", "parent": 104, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 106, "type": "cast_expression", "text": "(IBAction)back", "parent": 104, "children": [107, 109], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 16}}, {"id": 107, "type": "type_descriptor", "text": "IBAction", "parent": 106, "children": [108], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 11}}, {"id": 108, "type": "type_identifier", "text": "IBAction", "parent": 107, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 11}}, {"id": 109, "type": "identifier", "text": "back", "parent": 106, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 16}}, {"id": 110, "type": "ERROR", "text": ":(id)sender", "parent": null, "children": [111, 112], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 27}}, {"id": 111, "type": "identifier", "text": "id", "parent": 110, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 20}}, {"id": 112, "type": "identifier", "text": "sender", "parent": 110, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 27}}, {"id": 113, "type": "ERROR", "text": "@", "parent": null, "children": [114], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 114, "type": "ERROR", "text": "@", "parent": 113, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 1}}]}, "node_categories": {"declarations": {"functions": [53], "variables": [3, 44, 60, 62, 77, 90, 97], "classes": [], "imports": [], "modules": [], "enums": [5, 6, 8, 9, 13, 17, 21, 25, 29, 33, 37]}, "statements": {"expressions": [71, 84, 104, 106], "assignments": [], "loops": [], "conditionals": [7, 10, 14, 18, 22, 26, 30, 34, 38, 41, 45, 46, 48, 50, 51, 54, 58, 61, 63, 64, 65, 68, 72, 74, 75, 76, 78, 81, 85, 87, 88, 89, 91, 94, 98, 99, 101, 102, 103, 108, 109, 111, 112], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [12, 16, 20, 24, 28, 32, 36, 40], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*******************************************************************************\n * Copyright 2015 MobileMan GmbH\n * www.mobileman.com\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//\n// StreamSettingsViewController.h\n// moments\n//\n// Created by MobileMan GmbH on 28/05/15.\n// Copyright (c) 2015 MobileMan GmbH. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef enum _SettingType {\n kSettingTypeUnknown = -1,\n kSettingTypeMinBitrate = 0,\n kSettingTypeMaxBitrate = 1,\n kSettingTypeSegmentsCount = 2,\n kSettingTypeSegmentsDuration = 3,\n kSettingTypeFramerate = 4,\n kSettingTypePreset = 5,\n kSettingTypeCodec = 6\n \n} SettingType;\n\n@interface StreamSettingsViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate>\n\n@property (nonatomic, strong) IBOutlet UIButton *backButton;\n@property (nonatomic, strong) IBOutlet UILabel *titleLabel;\n@property (nonatomic, strong) IBOutlet UITableView *tableView;\n\n@property (assign) SettingType showingSettingsOfType;\n\n- (IBAction)back:(id)sender;\n\n@end\n"}
220
c
#include "genname.h" #include "../pkg/package.h" #include "../ast/stringtab.h" #include "../ast/lexer.h" #include "../../libponyrt/mem/pool.h" #include <string.h> #include <assert.h> static void types_append(printbuf_t* buf, ast_t* elements); static void type_append(printbuf_t* buf, ast_t* type, bool first) { switch(ast_id(type)) { case TK_UNIONTYPE: { // 3u_Arg1_Arg2_Arg3 printbuf(buf, "%du", ast_childcount(type)); types_append(buf, type); return; } case TK_ISECTTYPE: { // 3i_Arg1_Arg2_Arg3 printbuf(buf, "%di", ast_childcount(type)); types_append(buf, type); return; } case TK_TUPLETYPE: { // 3t_Arg1_Arg2_Arg3 printbuf(buf, "%dt", ast_childcount(type)); types_append(buf, type); return; } case TK_NOMINAL: { // pkg_Type[_Arg1_Arg2]_cap AST_GET_CHILDREN(type, package, name, typeargs, cap, eph); ast_t* def = (ast_t*)ast_data(type); ast_t* pkg = ast_nearest(def, TK_PACKAGE); const char* pkg_name = package_symbol(pkg); if(pkg_name != NULL) printbuf(buf, "%s_", pkg_name); printbuf(buf, "%s", ast_name(name)); types_append(buf, typeargs); if(!first) printbuf(buf, "_%s", ast_get_print(cap)); return; } default: {} } assert(0); } static void types_append(printbuf_t* buf, ast_t* elements) { // _Arg1_Arg2 if(elements == NULL) return; ast_t* elem = ast_child(elements); while(elem != NULL) { printbuf(buf, "_"); type_append(buf, elem, false); elem = ast_sibling(elem); } } static const char* stringtab_buf(printbuf_t* buf) { const char* r = stringtab(buf->m); printbuf_free(buf); return r; } static const char* stringtab_two(const char* a, const char* b) { if(a == NULL) a = "_"; assert(b != NULL); printbuf_t* buf = printbuf_new(); printbuf(buf, "%s_%s", a, b); return stringtab_buf(buf); } const char* genname_type(ast_t* ast) { // package_Type[_Arg1_Arg2] printbuf_t* buf = printbuf_new(); type_append(buf, ast, true); return stringtab_buf(buf); } const char* genname_alloc(const char* type) { return stringtab_two(type, "Alloc"); } const char* genname_traitlist(const char* type) { return stringtab_two(type, "Traits"); } const char* genname_fieldlist(const char* type) { return stringtab_two(type, "Fields"); } const char* genname_trace(const char* type) { return stringtab_two(type, "Trace"); } const char* genname_serialise(const char* type) { return stringtab_two(type, "Serialise"); } const char* genname_deserialise(const char* type) { return stringtab_two(type, "Deserialise"); } const char* genname_dispatch(const char* type) { return stringtab_two(type, "Dispatch"); } const char* genname_descriptor(const char* type) { return stringtab_two(type, "Desc"); } const char* genname_instance(const char* type) { return stringtab_two(type, "Inst"); } const char* genname_fun(token_id cap, const char* name, ast_t* typeargs) { // cap_name[_Arg1_Arg2] printbuf_t* buf = printbuf_new(); printbuf(buf, "%s_%s", lexer_print(cap), name); types_append(buf, typeargs); return stringtab_buf(buf); } const char* genname_be(const char* name) { return stringtab_two(name, "_send"); } const char* genname_box(const char* name) { return stringtab_two(name, "Box"); } const char* genname_unbox(const char* name) { return stringtab_two(name, "Unbox"); }
23.11
143
(translation_unit) "#include "genname.h"\n#include "../pkg/package.h"\n#include "../ast/stringtab.h"\n#include "../ast/lexer.h"\n#include "../../libponyrt/mem/pool.h"\n#include <string.h>\n#include <assert.h>\n\nstatic void types_append(printbuf_t* buf, ast_t* elements);\n\nstatic void type_append(printbuf_t* buf, ast_t* type, bool first)\n{\n switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }\n\n assert(0);\n}\n\nstatic void types_append(printbuf_t* buf, ast_t* elements)\n{\n // _Arg1_Arg2\n if(elements == NULL)\n return;\n\n ast_t* elem = ast_child(elements);\n\n while(elem != NULL)\n {\n printbuf(buf, "_");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }\n}\n\nstatic const char* stringtab_buf(printbuf_t* buf)\n{\n const char* r = stringtab(buf->m);\n printbuf_free(buf);\n return r;\n}\n\nstatic const char* stringtab_two(const char* a, const char* b)\n{\n if(a == NULL)\n a = "_";\n\n assert(b != NULL);\n printbuf_t* buf = printbuf_new();\n printbuf(buf, "%s_%s", a, b);\n return stringtab_buf(buf);\n}\n\nconst char* genname_type(ast_t* ast)\n{\n // package_Type[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n type_append(buf, ast, true);\n return stringtab_buf(buf);\n}\n\nconst char* genname_alloc(const char* type)\n{\n return stringtab_two(type, "Alloc");\n}\n\nconst char* genname_traitlist(const char* type)\n{\n return stringtab_two(type, "Traits");\n}\n\nconst char* genname_fieldlist(const char* type)\n{\n return stringtab_two(type, "Fields");\n}\n\nconst char* genname_trace(const char* type)\n{\n return stringtab_two(type, "Trace");\n}\n\nconst char* genname_serialise(const char* type)\n{\n return stringtab_two(type, "Serialise");\n}\n\nconst char* genname_deserialise(const char* type)\n{\n return stringtab_two(type, "Deserialise");\n}\n\nconst char* genname_dispatch(const char* type)\n{\n return stringtab_two(type, "Dispatch");\n}\n\nconst char* genname_descriptor(const char* type)\n{\n return stringtab_two(type, "Desc");\n}\n\nconst char* genname_instance(const char* type)\n{\n return stringtab_two(type, "Inst");\n}\n\nconst char* genname_fun(token_id cap, const char* name, ast_t* typeargs)\n{\n // cap_name[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n printbuf(buf, "%s_%s", lexer_print(cap), name);\n types_append(buf, typeargs);\n return stringtab_buf(buf);\n}\n\nconst char* genname_be(const char* name)\n{\n return stringtab_two(name, "_send");\n}\n\nconst char* genname_box(const char* name)\n{\n return stringtab_two(name, "Box");\n}\n\nconst char* genname_unbox(const char* name)\n{\n return stringtab_two(name, "Unbox");\n}\n" (preproc_include) "#include "genname.h"\n" (#include) "#include" (string_literal) ""genname.h"" (") """ (string_content) "genname.h" (") """ (preproc_include) "#include "../pkg/package.h"\n" (#include) "#include" (string_literal) ""../pkg/package.h"" (") """ (string_content) "../pkg/package.h" (") """ (preproc_include) "#include "../ast/stringtab.h"\n" (#include) "#include" (string_literal) ""../ast/stringtab.h"" (") """ (string_content) "../ast/stringtab.h" (") """ (preproc_include) "#include "../ast/lexer.h"\n" (#include) "#include" (string_literal) ""../ast/lexer.h"" (") """ (string_content) "../ast/lexer.h" (") """ (preproc_include) "#include "../../libponyrt/mem/pool.h"\n" (#include) "#include" (string_literal) ""../../libponyrt/mem/pool.h"" (") """ (string_content) "../../libponyrt/mem/pool.h" (") """ (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (declaration) "static void types_append(printbuf_t* buf, ast_t* elements);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "types_append(printbuf_t* buf, ast_t* elements)" (identifier) "types_append" (parameter_list) "(printbuf_t* buf, ast_t* elements)" (() "(" (parameter_declaration) "printbuf_t* buf" (type_identifier) "printbuf_t" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "ast_t* elements" (type_identifier) "ast_t" (pointer_declarator) "* elements" (*) "*" (identifier) "elements" ()) ")" (;) ";" (function_definition) "static void type_append(printbuf_t* buf, ast_t* type, bool first)\n{\n switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }\n\n assert(0);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "type_append(printbuf_t* buf, ast_t* type, bool first)" (identifier) "type_append" (parameter_list) "(printbuf_t* buf, ast_t* type, bool first)" (() "(" (parameter_declaration) "printbuf_t* buf" (type_identifier) "printbuf_t" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "ast_t* type" (type_identifier) "ast_t" (pointer_declarator) "* type" (*) "*" (identifier) "type" (,) "," (parameter_declaration) "bool first" (primitive_type) "bool" (identifier) "first" ()) ")" (compound_statement) "{\n switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }\n\n assert(0);\n}" ({) "{" (switch_statement) "switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }" (switch) "switch" (parenthesized_expression) "(ast_id(type))" (() "(" (call_expression) "ast_id(type)" (identifier) "ast_id" (argument_list) "(type)" (() "(" (identifier) "type" ()) ")" ()) ")" (compound_statement) "{\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }" ({) "{" (case_statement) "case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }" (case) "case" (identifier) "TK_UNIONTYPE" (:) ":" (compound_statement) "{\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, "%du", ast_childcount(type));\n types_append(buf, type);\n return;\n }" ({) "{" (comment) "// 3u_Arg1_Arg2_Arg3" (expression_statement) "printbuf(buf, "%du", ast_childcount(type));" (call_expression) "printbuf(buf, "%du", ast_childcount(type))" (identifier) "printbuf" (argument_list) "(buf, "%du", ast_childcount(type))" (() "(" (identifier) "buf" (,) "," (string_literal) ""%du"" (") """ (string_content) "%du" (") """ (,) "," (call_expression) "ast_childcount(type)" (identifier) "ast_childcount" (argument_list) "(type)" (() "(" (identifier) "type" ()) ")" ()) ")" (;) ";" (expression_statement) "types_append(buf, type);" (call_expression) "types_append(buf, type)" (identifier) "types_append" (argument_list) "(buf, type)" (() "(" (identifier) "buf" (,) "," (identifier) "type" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (case_statement) "case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }" (case) "case" (identifier) "TK_ISECTTYPE" (:) ":" (compound_statement) "{\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, "%di", ast_childcount(type));\n types_append(buf, type);\n return;\n }" ({) "{" (comment) "// 3i_Arg1_Arg2_Arg3" (expression_statement) "printbuf(buf, "%di", ast_childcount(type));" (call_expression) "printbuf(buf, "%di", ast_childcount(type))" (identifier) "printbuf" (argument_list) "(buf, "%di", ast_childcount(type))" (() "(" (identifier) "buf" (,) "," (string_literal) ""%di"" (") """ (string_content) "%di" (") """ (,) "," (call_expression) "ast_childcount(type)" (identifier) "ast_childcount" (argument_list) "(type)" (() "(" (identifier) "type" ()) ")" ()) ")" (;) ";" (expression_statement) "types_append(buf, type);" (call_expression) "types_append(buf, type)" (identifier) "types_append" (argument_list) "(buf, type)" (() "(" (identifier) "buf" (,) "," (identifier) "type" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (case_statement) "case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }" (case) "case" (identifier) "TK_TUPLETYPE" (:) ":" (compound_statement) "{\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, "%dt", ast_childcount(type));\n types_append(buf, type);\n return;\n }" ({) "{" (comment) "// 3t_Arg1_Arg2_Arg3" (expression_statement) "printbuf(buf, "%dt", ast_childcount(type));" (call_expression) "printbuf(buf, "%dt", ast_childcount(type))" (identifier) "printbuf" (argument_list) "(buf, "%dt", ast_childcount(type))" (() "(" (identifier) "buf" (,) "," (string_literal) ""%dt"" (") """ (string_content) "%dt" (") """ (,) "," (call_expression) "ast_childcount(type)" (identifier) "ast_childcount" (argument_list) "(type)" (() "(" (identifier) "type" ()) ")" ()) ")" (;) ";" (expression_statement) "types_append(buf, type);" (call_expression) "types_append(buf, type)" (identifier) "types_append" (argument_list) "(buf, type)" (() "(" (identifier) "buf" (,) "," (identifier) "type" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (case_statement) "case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }" (case) "case" (identifier) "TK_NOMINAL" (:) ":" (compound_statement) "{\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);\n\n printbuf(buf, "%s", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));\n\n return;\n }" ({) "{" (comment) "// pkg_Type[_Arg1_Arg2]_cap" (expression_statement) "AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);" (call_expression) "AST_GET_CHILDREN(type, package, name, typeargs, cap, eph)" (identifier) "AST_GET_CHILDREN" (argument_list) "(type, package, name, typeargs, cap, eph)" (() "(" (identifier) "type" (,) "," (identifier) "package" (,) "," (identifier) "name" (,) "," (identifier) "typeargs" (,) "," (identifier) "cap" (,) "," (identifier) "eph" ()) ")" (;) ";" (declaration) "ast_t* def = (ast_t*)ast_data(type);" (type_identifier) "ast_t" (init_declarator) "* def = (ast_t*)ast_data(type)" (pointer_declarator) "* def" (*) "*" (identifier) "def" (=) "=" (cast_expression) "(ast_t*)ast_data(type)" (() "(" (type_descriptor) "ast_t*" (type_identifier) "ast_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "ast_data(type)" (identifier) "ast_data" (argument_list) "(type)" (() "(" (identifier) "type" ()) ")" (;) ";" (declaration) "ast_t* pkg = ast_nearest(def, TK_PACKAGE);" (type_identifier) "ast_t" (init_declarator) "* pkg = ast_nearest(def, TK_PACKAGE)" (pointer_declarator) "* pkg" (*) "*" (identifier) "pkg" (=) "=" (call_expression) "ast_nearest(def, TK_PACKAGE)" (identifier) "ast_nearest" (argument_list) "(def, TK_PACKAGE)" (() "(" (identifier) "def" (,) "," (identifier) "TK_PACKAGE" ()) ")" (;) ";" (declaration) "const char* pkg_name = package_symbol(pkg);" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "* pkg_name = package_symbol(pkg)" (pointer_declarator) "* pkg_name" (*) "*" (identifier) "pkg_name" (=) "=" (call_expression) "package_symbol(pkg)" (identifier) "package_symbol" (argument_list) "(pkg)" (() "(" (identifier) "pkg" ()) ")" (;) ";" (if_statement) "if(pkg_name != NULL)\n printbuf(buf, "%s_", pkg_name);" (if) "if" (parenthesized_expression) "(pkg_name != NULL)" (() "(" (binary_expression) "pkg_name != NULL" (identifier) "pkg_name" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (expression_statement) "printbuf(buf, "%s_", pkg_name);" (call_expression) "printbuf(buf, "%s_", pkg_name)" (identifier) "printbuf" (argument_list) "(buf, "%s_", pkg_name)" (() "(" (identifier) "buf" (,) "," (string_literal) ""%s_"" (") """ (string_content) "%s_" (") """ (,) "," (identifier) "pkg_name" ()) ")" (;) ";" (expression_statement) "printbuf(buf, "%s", ast_name(name));" (call_expression) "printbuf(buf, "%s", ast_name(name))" (identifier) "printbuf" (argument_list) "(buf, "%s", ast_name(name))" (() "(" (identifier) "buf" (,) "," (string_literal) ""%s"" (") """ (string_content) "%s" (") """ (,) "," (call_expression) "ast_name(name)" (identifier) "ast_name" (argument_list) "(name)" (() "(" (identifier) "name" ()) ")" ()) ")" (;) ";" (expression_statement) "types_append(buf, typeargs);" (call_expression) "types_append(buf, typeargs)" (identifier) "types_append" (argument_list) "(buf, typeargs)" (() "(" (identifier) "buf" (,) "," (identifier) "typeargs" ()) ")" (;) ";" (if_statement) "if(!first)\n printbuf(buf, "_%s", ast_get_print(cap));" (if) "if" (parenthesized_expression) "(!first)" (() "(" (unary_expression) "!first" (!) "!" (identifier) "first" ()) ")" (expression_statement) "printbuf(buf, "_%s", ast_get_print(cap));" (call_expression) "printbuf(buf, "_%s", ast_get_print(cap))" (identifier) "printbuf" (argument_list) "(buf, "_%s", ast_get_print(cap))" (() "(" (identifier) "buf" (,) "," (string_literal) ""_%s"" (") """ (string_content) "_%s" (") """ (,) "," (call_expression) "ast_get_print(cap)" (identifier) "ast_get_print" (argument_list) "(cap)" (() "(" (identifier) "cap" ()) ")" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (case_statement) "default: {}" (default) "default" (:) ":" (compound_statement) "{}" ({) "{" (}) "}" (}) "}" (expression_statement) "assert(0);" (call_expression) "assert(0)" (identifier) "assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "static void types_append(printbuf_t* buf, ast_t* elements)\n{\n // _Arg1_Arg2\n if(elements == NULL)\n return;\n\n ast_t* elem = ast_child(elements);\n\n while(elem != NULL)\n {\n printbuf(buf, "_");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "types_append(printbuf_t* buf, ast_t* elements)" (identifier) "types_append" (parameter_list) "(printbuf_t* buf, ast_t* elements)" (() "(" (parameter_declaration) "printbuf_t* buf" (type_identifier) "printbuf_t" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "ast_t* elements" (type_identifier) "ast_t" (pointer_declarator) "* elements" (*) "*" (identifier) "elements" ()) ")" (compound_statement) "{\n // _Arg1_Arg2\n if(elements == NULL)\n return;\n\n ast_t* elem = ast_child(elements);\n\n while(elem != NULL)\n {\n printbuf(buf, "_");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }\n}" ({) "{" (comment) "// _Arg1_Arg2" (if_statement) "if(elements == NULL)\n return;" (if) "if" (parenthesized_expression) "(elements == NULL)" (() "(" (binary_expression) "elements == NULL" (identifier) "elements" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (return_statement) "return;" (return) "return" (;) ";" (declaration) "ast_t* elem = ast_child(elements);" (type_identifier) "ast_t" (init_declarator) "* elem = ast_child(elements)" (pointer_declarator) "* elem" (*) "*" (identifier) "elem" (=) "=" (call_expression) "ast_child(elements)" (identifier) "ast_child" (argument_list) "(elements)" (() "(" (identifier) "elements" ()) ")" (;) ";" (while_statement) "while(elem != NULL)\n {\n printbuf(buf, "_");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }" (while) "while" (parenthesized_expression) "(elem != NULL)" (() "(" (binary_expression) "elem != NULL" (identifier) "elem" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n printbuf(buf, "_");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }" ({) "{" (expression_statement) "printbuf(buf, "_");" (call_expression) "printbuf(buf, "_")" (identifier) "printbuf" (argument_list) "(buf, "_")" (() "(" (identifier) "buf" (,) "," (string_literal) ""_"" (") """ (string_content) "_" (") """ ()) ")" (;) ";" (expression_statement) "type_append(buf, elem, false);" (call_expression) "type_append(buf, elem, false)" (identifier) "type_append" (argument_list) "(buf, elem, false)" (() "(" (identifier) "buf" (,) "," (identifier) "elem" (,) "," (false) "false" ()) ")" (;) ";" (expression_statement) "elem = ast_sibling(elem);" (assignment_expression) "elem = ast_sibling(elem)" (identifier) "elem" (=) "=" (call_expression) "ast_sibling(elem)" (identifier) "ast_sibling" (argument_list) "(elem)" (() "(" (identifier) "elem" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "static const char* stringtab_buf(printbuf_t* buf)\n{\n const char* r = stringtab(buf->m);\n printbuf_free(buf);\n return r;\n}" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* stringtab_buf(printbuf_t* buf)" (*) "*" (function_declarator) "stringtab_buf(printbuf_t* buf)" (identifier) "stringtab_buf" (parameter_list) "(printbuf_t* buf)" (() "(" (parameter_declaration) "printbuf_t* buf" (type_identifier) "printbuf_t" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" ()) ")" (compound_statement) "{\n const char* r = stringtab(buf->m);\n printbuf_free(buf);\n return r;\n}" ({) "{" (declaration) "const char* r = stringtab(buf->m);" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "* r = stringtab(buf->m)" (pointer_declarator) "* r" (*) "*" (identifier) "r" (=) "=" (call_expression) "stringtab(buf->m)" (identifier) "stringtab" (argument_list) "(buf->m)" (() "(" (field_expression) "buf->m" (identifier) "buf" (->) "->" (field_identifier) "m" ()) ")" (;) ";" (expression_statement) "printbuf_free(buf);" (call_expression) "printbuf_free(buf)" (identifier) "printbuf_free" (argument_list) "(buf)" (() "(" (identifier) "buf" ()) ")" (;) ";" (return_statement) "return r;" (return) "return" (identifier) "r" (;) ";" (}) "}" (function_definition) "static const char* stringtab_two(const char* a, const char* b)\n{\n if(a == NULL)\n a = "_";\n\n assert(b != NULL);\n printbuf_t* buf = printbuf_new();\n printbuf(buf, "%s_%s", a, b);\n return stringtab_buf(buf);\n}" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* stringtab_two(const char* a, const char* b)" (*) "*" (function_declarator) "stringtab_two(const char* a, const char* b)" (identifier) "stringtab_two" (parameter_list) "(const char* a, const char* b)" (() "(" (parameter_declaration) "const char* a" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* a" (*) "*" (identifier) "a" (,) "," (parameter_declaration) "const char* b" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* b" (*) "*" (identifier) "b" ()) ")" (compound_statement) "{\n if(a == NULL)\n a = "_";\n\n assert(b != NULL);\n printbuf_t* buf = printbuf_new();\n printbuf(buf, "%s_%s", a, b);\n return stringtab_buf(buf);\n}" ({) "{" (if_statement) "if(a == NULL)\n a = "_";" (if) "if" (parenthesized_expression) "(a == NULL)" (() "(" (binary_expression) "a == NULL" (identifier) "a" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (expression_statement) "a = "_";" (assignment_expression) "a = "_"" (identifier) "a" (=) "=" (string_literal) ""_"" (") """ (string_content) "_" (") """ (;) ";" (expression_statement) "assert(b != NULL);" (call_expression) "assert(b != NULL)" (identifier) "assert" (argument_list) "(b != NULL)" (() "(" (binary_expression) "b != NULL" (identifier) "b" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (declaration) "printbuf_t* buf = printbuf_new();" (type_identifier) "printbuf_t" (init_declarator) "* buf = printbuf_new()" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" (=) "=" (call_expression) "printbuf_new()" (identifier) "printbuf_new" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "printbuf(buf, "%s_%s", a, b);" (call_expression) "printbuf(buf, "%s_%s", a, b)" (identifier) "printbuf" (argument_list) "(buf, "%s_%s", a, b)" (() "(" (identifier) "buf" (,) "," (string_literal) ""%s_%s"" (") """ (string_content) "%s_%s" (") """ (,) "," (identifier) "a" (,) "," (identifier) "b" ()) ")" (;) ";" (return_statement) "return stringtab_buf(buf);" (return) "return" (call_expression) "stringtab_buf(buf)" (identifier) "stringtab_buf" (argument_list) "(buf)" (() "(" (identifier) "buf" ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_type(ast_t* ast)\n{\n // package_Type[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n type_append(buf, ast, true);\n return stringtab_buf(buf);\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_type(ast_t* ast)" (*) "*" (function_declarator) "genname_type(ast_t* ast)" (identifier) "genname_type" (parameter_list) "(ast_t* ast)" (() "(" (parameter_declaration) "ast_t* ast" (type_identifier) "ast_t" (pointer_declarator) "* ast" (*) "*" (identifier) "ast" ()) ")" (compound_statement) "{\n // package_Type[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n type_append(buf, ast, true);\n return stringtab_buf(buf);\n}" ({) "{" (comment) "// package_Type[_Arg1_Arg2]" (declaration) "printbuf_t* buf = printbuf_new();" (type_identifier) "printbuf_t" (init_declarator) "* buf = printbuf_new()" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" (=) "=" (call_expression) "printbuf_new()" (identifier) "printbuf_new" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "type_append(buf, ast, true);" (call_expression) "type_append(buf, ast, true)" (identifier) "type_append" (argument_list) "(buf, ast, true)" (() "(" (identifier) "buf" (,) "," (identifier) "ast" (,) "," (true) "true" ()) ")" (;) ";" (return_statement) "return stringtab_buf(buf);" (return) "return" (call_expression) "stringtab_buf(buf)" (identifier) "stringtab_buf" (argument_list) "(buf)" (() "(" (identifier) "buf" ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_alloc(const char* type)\n{\n return stringtab_two(type, "Alloc");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_alloc(const char* type)" (*) "*" (function_declarator) "genname_alloc(const char* type)" (identifier) "genname_alloc" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Alloc");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Alloc");" (return) "return" (call_expression) "stringtab_two(type, "Alloc")" (identifier) "stringtab_two" (argument_list) "(type, "Alloc")" (() "(" (identifier) "type" (,) "," (string_literal) ""Alloc"" (") """ (string_content) "Alloc" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_traitlist(const char* type)\n{\n return stringtab_two(type, "Traits");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_traitlist(const char* type)" (*) "*" (function_declarator) "genname_traitlist(const char* type)" (identifier) "genname_traitlist" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Traits");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Traits");" (return) "return" (call_expression) "stringtab_two(type, "Traits")" (identifier) "stringtab_two" (argument_list) "(type, "Traits")" (() "(" (identifier) "type" (,) "," (string_literal) ""Traits"" (") """ (string_content) "Traits" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_fieldlist(const char* type)\n{\n return stringtab_two(type, "Fields");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_fieldlist(const char* type)" (*) "*" (function_declarator) "genname_fieldlist(const char* type)" (identifier) "genname_fieldlist" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Fields");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Fields");" (return) "return" (call_expression) "stringtab_two(type, "Fields")" (identifier) "stringtab_two" (argument_list) "(type, "Fields")" (() "(" (identifier) "type" (,) "," (string_literal) ""Fields"" (") """ (string_content) "Fields" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_trace(const char* type)\n{\n return stringtab_two(type, "Trace");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_trace(const char* type)" (*) "*" (function_declarator) "genname_trace(const char* type)" (identifier) "genname_trace" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Trace");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Trace");" (return) "return" (call_expression) "stringtab_two(type, "Trace")" (identifier) "stringtab_two" (argument_list) "(type, "Trace")" (() "(" (identifier) "type" (,) "," (string_literal) ""Trace"" (") """ (string_content) "Trace" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_serialise(const char* type)\n{\n return stringtab_two(type, "Serialise");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_serialise(const char* type)" (*) "*" (function_declarator) "genname_serialise(const char* type)" (identifier) "genname_serialise" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Serialise");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Serialise");" (return) "return" (call_expression) "stringtab_two(type, "Serialise")" (identifier) "stringtab_two" (argument_list) "(type, "Serialise")" (() "(" (identifier) "type" (,) "," (string_literal) ""Serialise"" (") """ (string_content) "Serialise" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_deserialise(const char* type)\n{\n return stringtab_two(type, "Deserialise");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_deserialise(const char* type)" (*) "*" (function_declarator) "genname_deserialise(const char* type)" (identifier) "genname_deserialise" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Deserialise");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Deserialise");" (return) "return" (call_expression) "stringtab_two(type, "Deserialise")" (identifier) "stringtab_two" (argument_list) "(type, "Deserialise")" (() "(" (identifier) "type" (,) "," (string_literal) ""Deserialise"" (") """ (string_content) "Deserialise" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_dispatch(const char* type)\n{\n return stringtab_two(type, "Dispatch");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_dispatch(const char* type)" (*) "*" (function_declarator) "genname_dispatch(const char* type)" (identifier) "genname_dispatch" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Dispatch");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Dispatch");" (return) "return" (call_expression) "stringtab_two(type, "Dispatch")" (identifier) "stringtab_two" (argument_list) "(type, "Dispatch")" (() "(" (identifier) "type" (,) "," (string_literal) ""Dispatch"" (") """ (string_content) "Dispatch" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_descriptor(const char* type)\n{\n return stringtab_two(type, "Desc");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_descriptor(const char* type)" (*) "*" (function_declarator) "genname_descriptor(const char* type)" (identifier) "genname_descriptor" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Desc");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Desc");" (return) "return" (call_expression) "stringtab_two(type, "Desc")" (identifier) "stringtab_two" (argument_list) "(type, "Desc")" (() "(" (identifier) "type" (,) "," (string_literal) ""Desc"" (") """ (string_content) "Desc" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_instance(const char* type)\n{\n return stringtab_two(type, "Inst");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_instance(const char* type)" (*) "*" (function_declarator) "genname_instance(const char* type)" (identifier) "genname_instance" (parameter_list) "(const char* type)" (() "(" (parameter_declaration) "const char* type" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n return stringtab_two(type, "Inst");\n}" ({) "{" (return_statement) "return stringtab_two(type, "Inst");" (return) "return" (call_expression) "stringtab_two(type, "Inst")" (identifier) "stringtab_two" (argument_list) "(type, "Inst")" (() "(" (identifier) "type" (,) "," (string_literal) ""Inst"" (") """ (string_content) "Inst" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_fun(token_id cap, const char* name, ast_t* typeargs)\n{\n // cap_name[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n printbuf(buf, "%s_%s", lexer_print(cap), name);\n types_append(buf, typeargs);\n return stringtab_buf(buf);\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_fun(token_id cap, const char* name, ast_t* typeargs)" (*) "*" (function_declarator) "genname_fun(token_id cap, const char* name, ast_t* typeargs)" (identifier) "genname_fun" (parameter_list) "(token_id cap, const char* name, ast_t* typeargs)" (() "(" (parameter_declaration) "token_id cap" (type_identifier) "token_id" (identifier) "cap" (,) "," (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "ast_t* typeargs" (type_identifier) "ast_t" (pointer_declarator) "* typeargs" (*) "*" (identifier) "typeargs" ()) ")" (compound_statement) "{\n // cap_name[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n printbuf(buf, "%s_%s", lexer_print(cap), name);\n types_append(buf, typeargs);\n return stringtab_buf(buf);\n}" ({) "{" (comment) "// cap_name[_Arg1_Arg2]" (declaration) "printbuf_t* buf = printbuf_new();" (type_identifier) "printbuf_t" (init_declarator) "* buf = printbuf_new()" (pointer_declarator) "* buf" (*) "*" (identifier) "buf" (=) "=" (call_expression) "printbuf_new()" (identifier) "printbuf_new" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "printbuf(buf, "%s_%s", lexer_print(cap), name);" (call_expression) "printbuf(buf, "%s_%s", lexer_print(cap), name)" (identifier) "printbuf" (argument_list) "(buf, "%s_%s", lexer_print(cap), name)" (() "(" (identifier) "buf" (,) "," (string_literal) ""%s_%s"" (") """ (string_content) "%s_%s" (") """ (,) "," (call_expression) "lexer_print(cap)" (identifier) "lexer_print" (argument_list) "(cap)" (() "(" (identifier) "cap" ()) ")" (,) "," (identifier) "name" ()) ")" (;) ";" (expression_statement) "types_append(buf, typeargs);" (call_expression) "types_append(buf, typeargs)" (identifier) "types_append" (argument_list) "(buf, typeargs)" (() "(" (identifier) "buf" (,) "," (identifier) "typeargs" ()) ")" (;) ";" (return_statement) "return stringtab_buf(buf);" (return) "return" (call_expression) "stringtab_buf(buf)" (identifier) "stringtab_buf" (argument_list) "(buf)" (() "(" (identifier) "buf" ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_be(const char* name)\n{\n return stringtab_two(name, "_send");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_be(const char* name)" (*) "*" (function_declarator) "genname_be(const char* name)" (identifier) "genname_be" (parameter_list) "(const char* name)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (compound_statement) "{\n return stringtab_two(name, "_send");\n}" ({) "{" (return_statement) "return stringtab_two(name, "_send");" (return) "return" (call_expression) "stringtab_two(name, "_send")" (identifier) "stringtab_two" (argument_list) "(name, "_send")" (() "(" (identifier) "name" (,) "," (string_literal) ""_send"" (") """ (string_content) "_send" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_box(const char* name)\n{\n return stringtab_two(name, "Box");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_box(const char* name)" (*) "*" (function_declarator) "genname_box(const char* name)" (identifier) "genname_box" (parameter_list) "(const char* name)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (compound_statement) "{\n return stringtab_two(name, "Box");\n}" ({) "{" (return_statement) "return stringtab_two(name, "Box");" (return) "return" (call_expression) "stringtab_two(name, "Box")" (identifier) "stringtab_two" (argument_list) "(name, "Box")" (() "(" (identifier) "name" (,) "," (string_literal) ""Box"" (") """ (string_content) "Box" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "const char* genname_unbox(const char* name)\n{\n return stringtab_two(name, "Unbox");\n}" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* genname_unbox(const char* name)" (*) "*" (function_declarator) "genname_unbox(const char* name)" (identifier) "genname_unbox" (parameter_list) "(const char* name)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (compound_statement) "{\n return stringtab_two(name, "Unbox");\n}" ({) "{" (return_statement) "return stringtab_two(name, "Unbox");" (return) "return" (call_expression) "stringtab_two(name, "Unbox")" (identifier) "stringtab_two" (argument_list) "(name, "Unbox")" (() "(" (identifier) "name" (,) "," (string_literal) ""Unbox"" (") """ (string_content) "Unbox" (") """ ()) ")" (;) ";" (}) "}"
1,214
0
{"language": "c", "success": true, "metadata": {"lines": 143, "avg_line_length": 23.11, "nodes": 658, "errors": 0, "source_hash": "c5a10786a4986837c5b28e959b3494df03735dc803c0f545c1941ebbac25cee5", "categorized_nodes": 415}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"genname.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": "\"genname.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include \"../pkg/package.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": "\"../pkg/package.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include \"../ast/stringtab.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": "\"../ast/stringtab.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 29}}, {"id": 9, "type": "preproc_include", "text": "#include \"../ast/lexer.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"../ast/lexer.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include \"../../libponyrt/mem/pool.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"../../libponyrt/mem/pool.h\"", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 37}}, {"id": 15, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<string.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include <assert.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<assert.h>", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 21, "type": "declaration", "text": "static void types_append(printbuf_t* buf, ast_t* elements);", "parent": null, "children": [22, 23], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 59}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 11}}, {"id": 23, "type": "function_declarator", "text": "types_append(printbuf_t* buf, ast_t* elements)", "parent": 21, "children": [24, 25], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 58}}, {"id": 24, "type": "identifier", "text": "types_append", "parent": 23, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 24}}, {"id": 25, "type": "parameter_list", "text": "(printbuf_t* buf, ast_t* elements)", "parent": 23, "children": [26, 31], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 58}}, {"id": 26, "type": "parameter_declaration", "text": "printbuf_t* buf", "parent": 25, "children": [27, 28], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 40}}, {"id": 27, "type": "type_identifier", "text": "printbuf_t", "parent": 26, "children": [], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 35}}, {"id": 28, "type": "pointer_declarator", "text": "* buf", "parent": 26, "children": [29, 30], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 40}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 36}}, {"id": 30, "type": "identifier", "text": "buf", "parent": 28, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 40}}, {"id": 31, "type": "parameter_declaration", "text": "ast_t* elements", "parent": 25, "children": [32, 33], "start_point": {"row": 8, "column": 42}, "end_point": {"row": 8, "column": 57}}, {"id": 32, "type": "type_identifier", "text": "ast_t", "parent": 31, "children": [], "start_point": {"row": 8, "column": 42}, "end_point": {"row": 8, "column": 47}}, {"id": 33, "type": "pointer_declarator", "text": "* elements", "parent": 31, "children": [34, 35], "start_point": {"row": 8, "column": 47}, "end_point": {"row": 8, "column": 57}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 8, "column": 47}, "end_point": {"row": 8, "column": 48}}, {"id": 35, "type": "identifier", "text": "elements", "parent": 33, "children": [], "start_point": {"row": 8, "column": 49}, "end_point": {"row": 8, "column": 57}}, {"id": 36, "type": "function_definition", "text": "static void type_append(printbuf_t* buf, ast_t* type, bool first)\n{\n switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, \"%du\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, \"%di\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, \"%dt\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, \"%s_\", pkg_name);\n\n printbuf(buf, \"%s\", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, \"_%s\", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }\n\n assert(0);\n}", "parent": null, "children": [37, 38], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 37, "type": "primitive_type", "text": "void", "parent": 36, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 11}}, {"id": 38, "type": "function_declarator", "text": "type_append(printbuf_t* buf, ast_t* type, bool first)", "parent": 36, "children": [39, 40], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 65}}, {"id": 39, "type": "identifier", "text": "type_append", "parent": 38, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 23}}, {"id": 40, "type": "parameter_list", "text": "(printbuf_t* buf, ast_t* type, bool first)", "parent": 38, "children": [41, 46, 51], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 65}}, {"id": 41, "type": "parameter_declaration", "text": "printbuf_t* buf", "parent": 40, "children": [42, 43], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 39}}, {"id": 42, "type": "type_identifier", "text": "printbuf_t", "parent": 41, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 34}}, {"id": 43, "type": "pointer_declarator", "text": "* buf", "parent": 41, "children": [44, 45], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 39}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 35}}, {"id": 45, "type": "identifier", "text": "buf", "parent": 43, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 39}}, {"id": 46, "type": "parameter_declaration", "text": "ast_t* type", "parent": 40, "children": [47, 48], "start_point": {"row": 10, "column": 41}, "end_point": {"row": 10, "column": 52}}, {"id": 47, "type": "type_identifier", "text": "ast_t", "parent": 46, "children": [], "start_point": {"row": 10, "column": 41}, "end_point": {"row": 10, "column": 46}}, {"id": 48, "type": "pointer_declarator", "text": "* type", "parent": 46, "children": [49, 50], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 52}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 47}}, {"id": 50, "type": "identifier", "text": "type", "parent": 48, "children": [], "start_point": {"row": 10, "column": 48}, "end_point": {"row": 10, "column": 52}}, {"id": 51, "type": "parameter_declaration", "text": "bool first", "parent": 40, "children": [52, 53], "start_point": {"row": 10, "column": 54}, "end_point": {"row": 10, "column": 64}}, {"id": 52, "type": "primitive_type", "text": "bool", "parent": 51, "children": [], "start_point": {"row": 10, "column": 54}, "end_point": {"row": 10, "column": 58}}, {"id": 53, "type": "identifier", "text": "first", "parent": 51, "children": [], "start_point": {"row": 10, "column": 59}, "end_point": {"row": 10, "column": 64}}, {"id": 54, "type": "switch_statement", "text": "switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, \"%du\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, \"%di\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, \"%dt\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, \"%s_\", pkg_name);\n\n printbuf(buf, \"%s\", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, \"_%s\", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }", "parent": 36, "children": [55, 56], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 60, "column": 3}}, {"id": 55, "type": "switch", "text": "switch", "parent": 54, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 8}}, {"id": 56, "type": "parenthesized_expression", "text": "(ast_id(type))", "parent": 54, "children": [57], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 22}}, {"id": 57, "type": "call_expression", "text": "ast_id(type)", "parent": 56, "children": [58, 59], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 21}}, {"id": 58, "type": "identifier", "text": "ast_id", "parent": 57, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 15}}, {"id": 59, "type": "argument_list", "text": "(type)", "parent": 57, "children": [60], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 21}}, {"id": 60, "type": "identifier", "text": "type", "parent": 59, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 20}}, {"id": 61, "type": "case_statement", "text": "case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, \"%du\", ast_childcount(type));\n types_append(buf, type);\n return;\n }", "parent": 54, "children": [62, 63], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 62, "type": "case", "text": "case", "parent": 61, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 63, "type": "identifier", "text": "TK_UNIONTYPE", "parent": 61, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 21}}, {"id": 64, "type": "call_expression", "text": "printbuf(buf, \"%du\", ast_childcount(type))", "parent": 61, "children": [65, 66], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 48}}, {"id": 65, "type": "identifier", "text": "printbuf", "parent": 64, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 14}}, {"id": 66, "type": "argument_list", "text": "(buf, \"%du\", ast_childcount(type))", "parent": 64, "children": [67, 68, 69], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 48}}, {"id": 67, "type": "identifier", "text": "buf", "parent": 66, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 18}}, {"id": 68, "type": "string_literal", "text": "\"%du\"", "parent": 66, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 25}}, {"id": 69, "type": "call_expression", "text": "ast_childcount(type)", "parent": 66, "children": [70, 71], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 47}}, {"id": 70, "type": "identifier", "text": "ast_childcount", "parent": 69, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 41}}, {"id": 71, "type": "argument_list", "text": "(type)", "parent": 69, "children": [72], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 47}}, {"id": 72, "type": "identifier", "text": "type", "parent": 71, "children": [], "start_point": {"row": 17, "column": 42}, "end_point": {"row": 17, "column": 46}}, {"id": 73, "type": "call_expression", "text": "types_append(buf, type)", "parent": 61, "children": [74, 75], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 29}}, {"id": 74, "type": "identifier", "text": "types_append", "parent": 73, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 18}}, {"id": 75, "type": "argument_list", "text": "(buf, type)", "parent": 73, "children": [76, 77], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 29}}, {"id": 76, "type": "identifier", "text": "buf", "parent": 75, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 22}}, {"id": 77, "type": "identifier", "text": "type", "parent": 75, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 28}}, {"id": 78, "type": "return_statement", "text": "return;", "parent": 61, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 13}}, {"id": 79, "type": "case_statement", "text": "case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, \"%di\", ast_childcount(type));\n types_append(buf, type);\n return;\n }", "parent": 54, "children": [80, 81], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 80, "type": "case", "text": "case", "parent": 79, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 81, "type": "identifier", "text": "TK_ISECTTYPE", "parent": 79, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 21}}, {"id": 82, "type": "call_expression", "text": "printbuf(buf, \"%di\", ast_childcount(type))", "parent": 79, "children": [83, 84], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 48}}, {"id": 83, "type": "identifier", "text": "printbuf", "parent": 82, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 14}}, {"id": 84, "type": "argument_list", "text": "(buf, \"%di\", ast_childcount(type))", "parent": 82, "children": [85, 86, 87], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 48}}, {"id": 85, "type": "identifier", "text": "buf", "parent": 84, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 18}}, {"id": 86, "type": "string_literal", "text": "\"%di\"", "parent": 84, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 25}}, {"id": 87, "type": "call_expression", "text": "ast_childcount(type)", "parent": 84, "children": [88, 89], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 47}}, {"id": 88, "type": "identifier", "text": "ast_childcount", "parent": 87, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 41}}, {"id": 89, "type": "argument_list", "text": "(type)", "parent": 87, "children": [90], "start_point": {"row": 25, "column": 41}, "end_point": {"row": 25, "column": 47}}, {"id": 90, "type": "identifier", "text": "type", "parent": 89, "children": [], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 46}}, {"id": 91, "type": "call_expression", "text": "types_append(buf, type)", "parent": 79, "children": [92, 93], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 29}}, {"id": 92, "type": "identifier", "text": "types_append", "parent": 91, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 18}}, {"id": 93, "type": "argument_list", "text": "(buf, type)", "parent": 91, "children": [94, 95], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 29}}, {"id": 94, "type": "identifier", "text": "buf", "parent": 93, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 22}}, {"id": 95, "type": "identifier", "text": "type", "parent": 93, "children": [], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 28}}, {"id": 96, "type": "return_statement", "text": "return;", "parent": 79, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 13}}, {"id": 97, "type": "case_statement", "text": "case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, \"%dt\", ast_childcount(type));\n types_append(buf, type);\n return;\n }", "parent": 54, "children": [98, 99], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 98, "type": "case", "text": "case", "parent": 97, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 99, "type": "identifier", "text": "TK_TUPLETYPE", "parent": 97, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 21}}, {"id": 100, "type": "call_expression", "text": "printbuf(buf, \"%dt\", ast_childcount(type))", "parent": 97, "children": [101, 102], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 48}}, {"id": 101, "type": "identifier", "text": "printbuf", "parent": 100, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 14}}, {"id": 102, "type": "argument_list", "text": "(buf, \"%dt\", ast_childcount(type))", "parent": 100, "children": [103, 104, 105], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 48}}, {"id": 103, "type": "identifier", "text": "buf", "parent": 102, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 18}}, {"id": 104, "type": "string_literal", "text": "\"%dt\"", "parent": 102, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 25}}, {"id": 105, "type": "call_expression", "text": "ast_childcount(type)", "parent": 102, "children": [106, 107], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 47}}, {"id": 106, "type": "identifier", "text": "ast_childcount", "parent": 105, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 41}}, {"id": 107, "type": "argument_list", "text": "(type)", "parent": 105, "children": [108], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 47}}, {"id": 108, "type": "identifier", "text": "type", "parent": 107, "children": [], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 33, "column": 46}}, {"id": 109, "type": "call_expression", "text": "types_append(buf, type)", "parent": 97, "children": [110, 111], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 29}}, {"id": 110, "type": "identifier", "text": "types_append", "parent": 109, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 18}}, {"id": 111, "type": "argument_list", "text": "(buf, type)", "parent": 109, "children": [112, 113], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 29}}, {"id": 112, "type": "identifier", "text": "buf", "parent": 111, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 22}}, {"id": 113, "type": "identifier", "text": "type", "parent": 111, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 28}}, {"id": 114, "type": "return_statement", "text": "return;", "parent": 97, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 13}}, {"id": 115, "type": "case_statement", "text": "case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, \"%s_\", pkg_name);\n\n printbuf(buf, \"%s\", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, \"_%s\", ast_get_print(cap));\n\n return;\n }", "parent": 54, "children": [116, 117], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 57, "column": 5}}, {"id": 116, "type": "case", "text": "case", "parent": 115, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 117, "type": "identifier", "text": "TK_NOMINAL", "parent": 115, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 19}}, {"id": 118, "type": "call_expression", "text": "AST_GET_CHILDREN(type, package, name, typeargs, cap, eph)", "parent": 115, "children": [119, 120], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 63}}, {"id": 119, "type": "identifier", "text": "AST_GET_CHILDREN", "parent": 118, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 22}}, {"id": 120, "type": "argument_list", "text": "(type, package, name, typeargs, cap, eph)", "parent": 118, "children": [121, 122, 123, 124, 125], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 63}}, {"id": 121, "type": "identifier", "text": "type", "parent": 120, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 27}}, {"id": 122, "type": "identifier", "text": "name", "parent": 120, "children": [], "start_point": {"row": 41, "column": 38}, "end_point": {"row": 41, "column": 42}}, {"id": 123, "type": "identifier", "text": "typeargs", "parent": 120, "children": [], "start_point": {"row": 41, "column": 44}, "end_point": {"row": 41, "column": 52}}, {"id": 124, "type": "identifier", "text": "cap", "parent": 120, "children": [], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 57}}, {"id": 125, "type": "identifier", "text": "eph", "parent": 120, "children": [], "start_point": {"row": 41, "column": 59}, "end_point": {"row": 41, "column": 62}}, {"id": 126, "type": "declaration", "text": "ast_t* def = (ast_t*)ast_data(type);", "parent": 115, "children": [127, 128], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 42}}, {"id": 127, "type": "type_identifier", "text": "ast_t", "parent": 126, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 11}}, {"id": 128, "type": "init_declarator", "text": "* def = (ast_t*)ast_data(type)", "parent": 126, "children": [129, 131, 132], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 41}}, {"id": 129, "type": "pointer_declarator", "text": "* def", "parent": 128, "children": [130], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 16}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 12}}, {"id": 131, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 132, "type": "cast_expression", "text": "(ast_t*)ast_data(type)", "parent": 128, "children": [133, 137], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 41}}, {"id": 133, "type": "type_descriptor", "text": "ast_t*", "parent": 132, "children": [134, 135], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 26}}, {"id": 134, "type": "type_identifier", "text": "ast_t", "parent": 133, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 25}}, {"id": 135, "type": "abstract_pointer_declarator", "text": "*", "parent": 133, "children": [136], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 26}}, {"id": 136, "type": "*", "text": "*", "parent": 135, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 26}}, {"id": 137, "type": "call_expression", "text": "ast_data(type)", "parent": 132, "children": [138, 139], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 41}}, {"id": 138, "type": "identifier", "text": "ast_data", "parent": 137, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 35}}, {"id": 139, "type": "argument_list", "text": "(type)", "parent": 137, "children": [140], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 41}}, {"id": 140, "type": "identifier", "text": "type", "parent": 139, "children": [], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 40}}, {"id": 141, "type": "declaration", "text": "ast_t* pkg = ast_nearest(def, TK_PACKAGE);", "parent": 115, "children": [142, 143], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 48}}, {"id": 142, "type": "type_identifier", "text": "ast_t", "parent": 141, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 11}}, {"id": 143, "type": "init_declarator", "text": "* pkg = ast_nearest(def, TK_PACKAGE)", "parent": 141, "children": [144, 147, 148], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 47}}, {"id": 144, "type": "pointer_declarator", "text": "* pkg", "parent": 143, "children": [145, 146], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 16}}, {"id": 145, "type": "*", "text": "*", "parent": 144, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 12}}, {"id": 146, "type": "identifier", "text": "pkg", "parent": 144, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 16}}, {"id": 147, "type": "=", "text": "=", "parent": 143, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 18}}, {"id": 148, "type": "call_expression", "text": "ast_nearest(def, TK_PACKAGE)", "parent": 143, "children": [149, 150], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 47}}, {"id": 149, "type": "identifier", "text": "ast_nearest", "parent": 148, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 30}}, {"id": 150, "type": "argument_list", "text": "(def, TK_PACKAGE)", "parent": 148, "children": [151], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 47}}, {"id": 151, "type": "identifier", "text": "TK_PACKAGE", "parent": 150, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 46}}, {"id": 152, "type": "declaration", "text": "const char* pkg_name = package_symbol(pkg);", "parent": 115, "children": [153, 154], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 49}}, {"id": 153, "type": "primitive_type", "text": "char", "parent": 152, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 16}}, {"id": 154, "type": "init_declarator", "text": "* pkg_name = package_symbol(pkg)", "parent": 152, "children": [155, 158, 159], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 48}}, {"id": 155, "type": "pointer_declarator", "text": "* pkg_name", "parent": 154, "children": [156, 157], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 26}}, {"id": 156, "type": "*", "text": "*", "parent": 155, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 17}}, {"id": 157, "type": "identifier", "text": "pkg_name", "parent": 155, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 26}}, {"id": 158, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 28}}, {"id": 159, "type": "call_expression", "text": "package_symbol(pkg)", "parent": 154, "children": [160, 161], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 48}}, {"id": 160, "type": "identifier", "text": "package_symbol", "parent": 159, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 43}}, {"id": 161, "type": "argument_list", "text": "(pkg)", "parent": 159, "children": [162], "start_point": {"row": 45, "column": 43}, "end_point": {"row": 45, "column": 48}}, {"id": 162, "type": "identifier", "text": "pkg", "parent": 161, "children": [], "start_point": {"row": 45, "column": 44}, "end_point": {"row": 45, "column": 47}}, {"id": 163, "type": "if_statement", "text": "if(pkg_name != NULL)\n printbuf(buf, \"%s_\", pkg_name);", "parent": 115, "children": [164], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 48, "column": 39}}, {"id": 164, "type": "parenthesized_expression", "text": "(pkg_name != NULL)", "parent": 163, "children": [165], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 26}}, {"id": 165, "type": "binary_expression", "text": "pkg_name != NULL", "parent": 164, "children": [166, 167, 168], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 25}}, {"id": 166, "type": "identifier", "text": "pkg_name", "parent": 165, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 17}}, {"id": 167, "type": "!=", "text": "!=", "parent": 165, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 20}}, {"id": 168, "type": "null", "text": "NULL", "parent": 165, "children": [169], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 169, "type": "NULL", "text": "NULL", "parent": 168, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 170, "type": "call_expression", "text": "printbuf(buf, \"%s_\", pkg_name)", "parent": 163, "children": [171, 172], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 38}}, {"id": 171, "type": "identifier", "text": "printbuf", "parent": 170, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 16}}, {"id": 172, "type": "argument_list", "text": "(buf, \"%s_\", pkg_name)", "parent": 170, "children": [173, 174, 175], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 38}}, {"id": 173, "type": "identifier", "text": "buf", "parent": 172, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 20}}, {"id": 174, "type": "string_literal", "text": "\"%s_\"", "parent": 172, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 27}}, {"id": 175, "type": "identifier", "text": "pkg_name", "parent": 172, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 37}}, {"id": 176, "type": "call_expression", "text": "printbuf(buf, \"%s\", ast_name(name))", "parent": 115, "children": [177, 178], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 41}}, {"id": 177, "type": "identifier", "text": "printbuf", "parent": 176, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 14}}, {"id": 178, "type": "argument_list", "text": "(buf, \"%s\", ast_name(name))", "parent": 176, "children": [179, 180, 181], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 41}}, {"id": 179, "type": "identifier", "text": "buf", "parent": 178, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 18}}, {"id": 180, "type": "string_literal", "text": "\"%s\"", "parent": 178, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 24}}, {"id": 181, "type": "call_expression", "text": "ast_name(name)", "parent": 178, "children": [182, 183], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 40}}, {"id": 182, "type": "identifier", "text": "ast_name", "parent": 181, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 34}}, {"id": 183, "type": "argument_list", "text": "(name)", "parent": 181, "children": [184], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 40}}, {"id": 184, "type": "identifier", "text": "name", "parent": 183, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 39}}, {"id": 185, "type": "call_expression", "text": "types_append(buf, typeargs)", "parent": 115, "children": [186, 187], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 33}}, {"id": 186, "type": "identifier", "text": "types_append", "parent": 185, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 18}}, {"id": 187, "type": "argument_list", "text": "(buf, typeargs)", "parent": 185, "children": [188, 189], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 33}}, {"id": 188, "type": "identifier", "text": "buf", "parent": 187, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 22}}, {"id": 189, "type": "identifier", "text": "typeargs", "parent": 187, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 32}}, {"id": 190, "type": "if_statement", "text": "if(!first)\n printbuf(buf, \"_%s\", ast_get_print(cap));", "parent": 115, "children": [191], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 54, "column": 49}}, {"id": 191, "type": "parenthesized_expression", "text": "(!first)", "parent": 190, "children": [192], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 16}}, {"id": 192, "type": "unary_expression", "text": "!first", "parent": 191, "children": [193, 194], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 15}}, {"id": 193, "type": "!", "text": "!", "parent": 192, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 10}}, {"id": 194, "type": "identifier", "text": "first", "parent": 192, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 15}}, {"id": 195, "type": "call_expression", "text": "printbuf(buf, \"_%s\", ast_get_print(cap))", "parent": 190, "children": [196, 197], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 48}}, {"id": 196, "type": "identifier", "text": "printbuf", "parent": 195, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 16}}, {"id": 197, "type": "argument_list", "text": "(buf, \"_%s\", ast_get_print(cap))", "parent": 195, "children": [198, 199, 200], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 48}}, {"id": 198, "type": "identifier", "text": "buf", "parent": 197, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 20}}, {"id": 199, "type": "string_literal", "text": "\"_%s\"", "parent": 197, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 27}}, {"id": 200, "type": "call_expression", "text": "ast_get_print(cap)", "parent": 197, "children": [201, 202], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 47}}, {"id": 201, "type": "identifier", "text": "ast_get_print", "parent": 200, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 42}}, {"id": 202, "type": "argument_list", "text": "(cap)", "parent": 200, "children": [203], "start_point": {"row": 54, "column": 42}, "end_point": {"row": 54, "column": 47}}, {"id": 203, "type": "identifier", "text": "cap", "parent": 202, "children": [], "start_point": {"row": 54, "column": 43}, "end_point": {"row": 54, "column": 46}}, {"id": 204, "type": "return_statement", "text": "return;", "parent": 115, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 13}}, {"id": 205, "type": "case_statement", "text": "default: {}", "parent": 54, "children": [206], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 15}}, {"id": 206, "type": "default", "text": "default", "parent": 205, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 11}}, {"id": 207, "type": "call_expression", "text": "assert(0)", "parent": 36, "children": [208, 209], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 11}}, {"id": 208, "type": "identifier", "text": "assert", "parent": 207, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 8}}, {"id": 209, "type": "argument_list", "text": "(0)", "parent": 207, "children": [210], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 11}}, {"id": 210, "type": "number_literal", "text": "0", "parent": 209, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 10}}, {"id": 211, "type": "function_definition", "text": "static void types_append(printbuf_t* buf, ast_t* elements)\n{\n // _Arg1_Arg2\n if(elements == NULL)\n return;\n\n ast_t* elem = ast_child(elements);\n\n while(elem != NULL)\n {\n printbuf(buf, \"_\");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }\n}", "parent": null, "children": [212, 213], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 212, "type": "primitive_type", "text": "void", "parent": 211, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 11}}, {"id": 213, "type": "function_declarator", "text": "types_append(printbuf_t* buf, ast_t* elements)", "parent": 211, "children": [214, 215], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 58}}, {"id": 214, "type": "identifier", "text": "types_append", "parent": 213, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 24}}, {"id": 215, "type": "parameter_list", "text": "(printbuf_t* buf, ast_t* elements)", "parent": 213, "children": [216, 221], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 58}}, {"id": 216, "type": "parameter_declaration", "text": "printbuf_t* buf", "parent": 215, "children": [217, 218], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 40}}, {"id": 217, "type": "type_identifier", "text": "printbuf_t", "parent": 216, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 35}}, {"id": 218, "type": "pointer_declarator", "text": "* buf", "parent": 216, "children": [219, 220], "start_point": {"row": 65, "column": 35}, "end_point": {"row": 65, "column": 40}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 65, "column": 35}, "end_point": {"row": 65, "column": 36}}, {"id": 220, "type": "identifier", "text": "buf", "parent": 218, "children": [], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 40}}, {"id": 221, "type": "parameter_declaration", "text": "ast_t* elements", "parent": 215, "children": [222, 223], "start_point": {"row": 65, "column": 42}, "end_point": {"row": 65, "column": 57}}, {"id": 222, "type": "type_identifier", "text": "ast_t", "parent": 221, "children": [], "start_point": {"row": 65, "column": 42}, "end_point": {"row": 65, "column": 47}}, {"id": 223, "type": "pointer_declarator", "text": "* elements", "parent": 221, "children": [224, 225], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 57}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 48}}, {"id": 225, "type": "identifier", "text": "elements", "parent": 223, "children": [], "start_point": {"row": 65, "column": 49}, "end_point": {"row": 65, "column": 57}}, {"id": 226, "type": "if_statement", "text": "if(elements == NULL)\n return;", "parent": 211, "children": [227, 233], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 69, "column": 11}}, {"id": 227, "type": "parenthesized_expression", "text": "(elements == NULL)", "parent": 226, "children": [228], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 22}}, {"id": 228, "type": "binary_expression", "text": "elements == NULL", "parent": 227, "children": [229, 230, 231], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 21}}, {"id": 229, "type": "identifier", "text": "elements", "parent": 228, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 13}}, {"id": 230, "type": "==", "text": "==", "parent": 228, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 16}}, {"id": 231, "type": "null", "text": "NULL", "parent": 228, "children": [232], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 21}}, {"id": 232, "type": "NULL", "text": "NULL", "parent": 231, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 21}}, {"id": 233, "type": "return_statement", "text": "return;", "parent": 226, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 11}}, {"id": 234, "type": "declaration", "text": "ast_t* elem = ast_child(elements);", "parent": 211, "children": [235, 236], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 36}}, {"id": 235, "type": "type_identifier", "text": "ast_t", "parent": 234, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 7}}, {"id": 236, "type": "init_declarator", "text": "* elem = ast_child(elements)", "parent": 234, "children": [237, 240, 241], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 35}}, {"id": 237, "type": "pointer_declarator", "text": "* elem", "parent": 236, "children": [238, 239], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 13}}, {"id": 238, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 8}}, {"id": 239, "type": "identifier", "text": "elem", "parent": 237, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 13}}, {"id": 240, "type": "=", "text": "=", "parent": 236, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 15}}, {"id": 241, "type": "call_expression", "text": "ast_child(elements)", "parent": 236, "children": [242, 243], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 35}}, {"id": 242, "type": "identifier", "text": "ast_child", "parent": 241, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 25}}, {"id": 243, "type": "argument_list", "text": "(elements)", "parent": 241, "children": [244], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 35}}, {"id": 244, "type": "identifier", "text": "elements", "parent": 243, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 34}}, {"id": 245, "type": "while_statement", "text": "while(elem != NULL)\n {\n printbuf(buf, \"_\");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }", "parent": 211, "children": [246], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 78, "column": 3}}, {"id": 246, "type": "parenthesized_expression", "text": "(elem != NULL)", "parent": 245, "children": [247], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 21}}, {"id": 247, "type": "binary_expression", "text": "elem != NULL", "parent": 246, "children": [248, 249, 250], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 20}}, {"id": 248, "type": "identifier", "text": "elem", "parent": 247, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 12}}, {"id": 249, "type": "!=", "text": "!=", "parent": 247, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 15}}, {"id": 250, "type": "null", "text": "NULL", "parent": 247, "children": [251], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 20}}, {"id": 251, "type": "NULL", "text": "NULL", "parent": 250, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 20}}, {"id": 252, "type": "call_expression", "text": "printbuf(buf, \"_\")", "parent": 245, "children": [253, 254], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 22}}, {"id": 253, "type": "identifier", "text": "printbuf", "parent": 252, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 12}}, {"id": 254, "type": "argument_list", "text": "(buf, \"_\")", "parent": 252, "children": [255, 256], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 22}}, {"id": 255, "type": "identifier", "text": "buf", "parent": 254, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 16}}, {"id": 256, "type": "string_literal", "text": "\"_\"", "parent": 254, "children": [], "start_point": {"row": 75, "column": 18}, "end_point": {"row": 75, "column": 21}}, {"id": 257, "type": "call_expression", "text": "type_append(buf, elem, false)", "parent": 245, "children": [258, 259], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 33}}, {"id": 258, "type": "identifier", "text": "type_append", "parent": 257, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 15}}, {"id": 259, "type": "argument_list", "text": "(buf, elem, false)", "parent": 257, "children": [260, 261, 262], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 33}}, {"id": 260, "type": "identifier", "text": "buf", "parent": 259, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 19}}, {"id": 261, "type": "identifier", "text": "elem", "parent": 259, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 25}}, {"id": 262, "type": "false", "text": "false", "parent": 259, "children": [], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 32}}, {"id": 263, "type": "assignment_expression", "text": "elem = ast_sibling(elem)", "parent": 245, "children": [264, 265, 266], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 28}}, {"id": 264, "type": "identifier", "text": "elem", "parent": 263, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 8}}, {"id": 265, "type": "=", "text": "=", "parent": 263, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 10}}, {"id": 266, "type": "call_expression", "text": "ast_sibling(elem)", "parent": 263, "children": [267, 268], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 28}}, {"id": 267, "type": "identifier", "text": "ast_sibling", "parent": 266, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 22}}, {"id": 268, "type": "argument_list", "text": "(elem)", "parent": 266, "children": [269], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 28}}, {"id": 269, "type": "identifier", "text": "elem", "parent": 268, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 27}}, {"id": 270, "type": "function_definition", "text": "static const char* stringtab_buf(printbuf_t* buf)\n{\n const char* r = stringtab(buf->m);\n printbuf_free(buf);\n return r;\n}", "parent": null, "children": [271, 272], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 271, "type": "primitive_type", "text": "char", "parent": 270, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 17}}, {"id": 272, "type": "pointer_declarator", "text": "* stringtab_buf(printbuf_t* buf)", "parent": 270, "children": [273, 274], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 49}}, {"id": 273, "type": "*", "text": "*", "parent": 272, "children": [], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 18}}, {"id": 274, "type": "function_declarator", "text": "stringtab_buf(printbuf_t* buf)", "parent": 272, "children": [275, 276], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 49}}, {"id": 275, "type": "identifier", "text": "stringtab_buf", "parent": 274, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 32}}, {"id": 276, "type": "parameter_list", "text": "(printbuf_t* buf)", "parent": 274, "children": [277], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 49}}, {"id": 277, "type": "parameter_declaration", "text": "printbuf_t* buf", "parent": 276, "children": [278, 279], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 48}}, {"id": 278, "type": "type_identifier", "text": "printbuf_t", "parent": 277, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 43}}, {"id": 279, "type": "pointer_declarator", "text": "* buf", "parent": 277, "children": [280, 281], "start_point": {"row": 81, "column": 43}, "end_point": {"row": 81, "column": 48}}, {"id": 280, "type": "*", "text": "*", "parent": 279, "children": [], "start_point": {"row": 81, "column": 43}, "end_point": {"row": 81, "column": 44}}, {"id": 281, "type": "identifier", "text": "buf", "parent": 279, "children": [], "start_point": {"row": 81, "column": 45}, "end_point": {"row": 81, "column": 48}}, {"id": 282, "type": "declaration", "text": "const char* r = stringtab(buf->m);", "parent": 270, "children": [283, 284], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 36}}, {"id": 283, "type": "primitive_type", "text": "char", "parent": 282, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 12}}, {"id": 284, "type": "init_declarator", "text": "* r = stringtab(buf->m)", "parent": 282, "children": [285, 288, 289], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 35}}, {"id": 285, "type": "pointer_declarator", "text": "* r", "parent": 284, "children": [286, 287], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 15}}, {"id": 286, "type": "*", "text": "*", "parent": 285, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 13}}, {"id": 287, "type": "identifier", "text": "r", "parent": 285, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 15}}, {"id": 288, "type": "=", "text": "=", "parent": 284, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 17}}, {"id": 289, "type": "call_expression", "text": "stringtab(buf->m)", "parent": 284, "children": [290, 291], "start_point": {"row": 83, "column": 18}, "end_point": {"row": 83, "column": 35}}, {"id": 290, "type": "identifier", "text": "stringtab", "parent": 289, "children": [], "start_point": {"row": 83, "column": 18}, "end_point": {"row": 83, "column": 27}}, {"id": 291, "type": "argument_list", "text": "(buf->m)", "parent": 289, "children": [292], "start_point": {"row": 83, "column": 27}, "end_point": {"row": 83, "column": 35}}, {"id": 292, "type": "field_expression", "text": "buf->m", "parent": 291, "children": [293, 294], "start_point": {"row": 83, "column": 28}, "end_point": {"row": 83, "column": 34}}, {"id": 293, "type": "identifier", "text": "buf", "parent": 292, "children": [], "start_point": {"row": 83, "column": 28}, "end_point": {"row": 83, "column": 31}}, {"id": 294, "type": "field_identifier", "text": "m", "parent": 292, "children": [], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 34}}, {"id": 295, "type": "call_expression", "text": "printbuf_free(buf)", "parent": 270, "children": [296, 297], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 20}}, {"id": 296, "type": "identifier", "text": "printbuf_free", "parent": 295, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 15}}, {"id": 297, "type": "argument_list", "text": "(buf)", "parent": 295, "children": [298], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 20}}, {"id": 298, "type": "identifier", "text": "buf", "parent": 297, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 19}}, {"id": 299, "type": "return_statement", "text": "return r;", "parent": 270, "children": [300], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 11}}, {"id": 300, "type": "identifier", "text": "r", "parent": 299, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 10}}, {"id": 301, "type": "function_definition", "text": "static const char* stringtab_two(const char* a, const char* b)\n{\n if(a == NULL)\n a = \"_\";\n\n assert(b != NULL);\n printbuf_t* buf = printbuf_new();\n printbuf(buf, \"%s_%s\", a, b);\n return stringtab_buf(buf);\n}", "parent": null, "children": [302, 303], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 97, "column": 1}}, {"id": 302, "type": "primitive_type", "text": "char", "parent": 301, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 17}}, {"id": 303, "type": "pointer_declarator", "text": "* stringtab_two(const char* a, const char* b)", "parent": 301, "children": [304, 305], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 62}}, {"id": 304, "type": "*", "text": "*", "parent": 303, "children": [], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 18}}, {"id": 305, "type": "function_declarator", "text": "stringtab_two(const char* a, const char* b)", "parent": 303, "children": [306, 307], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 62}}, {"id": 306, "type": "identifier", "text": "stringtab_two", "parent": 305, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 32}}, {"id": 307, "type": "parameter_list", "text": "(const char* a, const char* b)", "parent": 305, "children": [308, 313], "start_point": {"row": 88, "column": 32}, "end_point": {"row": 88, "column": 62}}, {"id": 308, "type": "parameter_declaration", "text": "const char* a", "parent": 307, "children": [309, 310], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 46}}, {"id": 309, "type": "primitive_type", "text": "char", "parent": 308, "children": [], "start_point": {"row": 88, "column": 39}, "end_point": {"row": 88, "column": 43}}, {"id": 310, "type": "pointer_declarator", "text": "* a", "parent": 308, "children": [311, 312], "start_point": {"row": 88, "column": 43}, "end_point": {"row": 88, "column": 46}}, {"id": 311, "type": "*", "text": "*", "parent": 310, "children": [], "start_point": {"row": 88, "column": 43}, "end_point": {"row": 88, "column": 44}}, {"id": 312, "type": "identifier", "text": "a", "parent": 310, "children": [], "start_point": {"row": 88, "column": 45}, "end_point": {"row": 88, "column": 46}}, {"id": 313, "type": "parameter_declaration", "text": "const char* b", "parent": 307, "children": [314, 315], "start_point": {"row": 88, "column": 48}, "end_point": {"row": 88, "column": 61}}, {"id": 314, "type": "primitive_type", "text": "char", "parent": 313, "children": [], "start_point": {"row": 88, "column": 54}, "end_point": {"row": 88, "column": 58}}, {"id": 315, "type": "pointer_declarator", "text": "* b", "parent": 313, "children": [316, 317], "start_point": {"row": 88, "column": 58}, "end_point": {"row": 88, "column": 61}}, {"id": 316, "type": "*", "text": "*", "parent": 315, "children": [], "start_point": {"row": 88, "column": 58}, "end_point": {"row": 88, "column": 59}}, {"id": 317, "type": "identifier", "text": "b", "parent": 315, "children": [], "start_point": {"row": 88, "column": 60}, "end_point": {"row": 88, "column": 61}}, {"id": 318, "type": "if_statement", "text": "if(a == NULL)\n a = \"_\";", "parent": 301, "children": [319], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 91, "column": 12}}, {"id": 319, "type": "parenthesized_expression", "text": "(a == NULL)", "parent": 318, "children": [320], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 15}}, {"id": 320, "type": "binary_expression", "text": "a == NULL", "parent": 319, "children": [321, 322, 323], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 14}}, {"id": 321, "type": "identifier", "text": "a", "parent": 320, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 6}}, {"id": 322, "type": "==", "text": "==", "parent": 320, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 9}}, {"id": 323, "type": "null", "text": "NULL", "parent": 320, "children": [324], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 14}}, {"id": 324, "type": "NULL", "text": "NULL", "parent": 323, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 14}}, {"id": 325, "type": "assignment_expression", "text": "a = \"_\"", "parent": 318, "children": [326, 327, 328], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 11}}, {"id": 326, "type": "identifier", "text": "a", "parent": 325, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 5}}, {"id": 327, "type": "=", "text": "=", "parent": 325, "children": [], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 7}}, {"id": 328, "type": "string_literal", "text": "\"_\"", "parent": 325, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 11}}, {"id": 329, "type": "call_expression", "text": "assert(b != NULL)", "parent": 301, "children": [330, 331], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 19}}, {"id": 330, "type": "identifier", "text": "assert", "parent": 329, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 8}}, {"id": 331, "type": "argument_list", "text": "(b != NULL)", "parent": 329, "children": [332], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 19}}, {"id": 332, "type": "binary_expression", "text": "b != NULL", "parent": 331, "children": [333, 334, 335], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 18}}, {"id": 333, "type": "identifier", "text": "b", "parent": 332, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 10}}, {"id": 334, "type": "!=", "text": "!=", "parent": 332, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 13}}, {"id": 335, "type": "null", "text": "NULL", "parent": 332, "children": [336], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 18}}, {"id": 336, "type": "NULL", "text": "NULL", "parent": 335, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 18}}, {"id": 337, "type": "declaration", "text": "printbuf_t* buf = printbuf_new();", "parent": 301, "children": [338, 339], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 35}}, {"id": 338, "type": "type_identifier", "text": "printbuf_t", "parent": 337, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 12}}, {"id": 339, "type": "init_declarator", "text": "* buf = printbuf_new()", "parent": 337, "children": [340, 343, 344], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 34}}, {"id": 340, "type": "pointer_declarator", "text": "* buf", "parent": 339, "children": [341, 342], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 17}}, {"id": 341, "type": "*", "text": "*", "parent": 340, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 13}}, {"id": 342, "type": "identifier", "text": "buf", "parent": 340, "children": [], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 17}}, {"id": 343, "type": "=", "text": "=", "parent": 339, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 19}}, {"id": 344, "type": "call_expression", "text": "printbuf_new()", "parent": 339, "children": [345, 346], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 34}}, {"id": 345, "type": "identifier", "text": "printbuf_new", "parent": 344, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 32}}, {"id": 346, "type": "argument_list", "text": "()", "parent": 344, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 34}}, {"id": 347, "type": "call_expression", "text": "printbuf(buf, \"%s_%s\", a, b)", "parent": 301, "children": [348, 349], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 30}}, {"id": 348, "type": "identifier", "text": "printbuf", "parent": 347, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 10}}, {"id": 349, "type": "argument_list", "text": "(buf, \"%s_%s\", a, b)", "parent": 347, "children": [350, 351, 352, 353], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 30}}, {"id": 350, "type": "identifier", "text": "buf", "parent": 349, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 14}}, {"id": 351, "type": "string_literal", "text": "\"%s_%s\"", "parent": 349, "children": [], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 23}}, {"id": 352, "type": "identifier", "text": "a", "parent": 349, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 26}}, {"id": 353, "type": "identifier", "text": "b", "parent": 349, "children": [], "start_point": {"row": 95, "column": 28}, "end_point": {"row": 95, "column": 29}}, {"id": 354, "type": "return_statement", "text": "return stringtab_buf(buf);", "parent": 301, "children": [355], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 28}}, {"id": 355, "type": "call_expression", "text": "stringtab_buf(buf)", "parent": 354, "children": [356, 357], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 27}}, {"id": 356, "type": "identifier", "text": "stringtab_buf", "parent": 355, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 22}}, {"id": 357, "type": "argument_list", "text": "(buf)", "parent": 355, "children": [358], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 27}}, {"id": 358, "type": "identifier", "text": "buf", "parent": 357, "children": [], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 26}}, {"id": 359, "type": "function_definition", "text": "const char* genname_type(ast_t* ast)\n{\n // package_Type[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n type_append(buf, ast, true);\n return stringtab_buf(buf);\n}", "parent": null, "children": [360, 361], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 360, "type": "primitive_type", "text": "char", "parent": 359, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 10}}, {"id": 361, "type": "pointer_declarator", "text": "* genname_type(ast_t* ast)", "parent": 359, "children": [362, 363], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 36}}, {"id": 362, "type": "*", "text": "*", "parent": 361, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 11}}, {"id": 363, "type": "function_declarator", "text": "genname_type(ast_t* ast)", "parent": 361, "children": [364, 365], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 36}}, {"id": 364, "type": "identifier", "text": "genname_type", "parent": 363, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 24}}, {"id": 365, "type": "parameter_list", "text": "(ast_t* ast)", "parent": 363, "children": [366], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 36}}, {"id": 366, "type": "parameter_declaration", "text": "ast_t* ast", "parent": 365, "children": [367, 368], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 35}}, {"id": 367, "type": "type_identifier", "text": "ast_t", "parent": 366, "children": [], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 30}}, {"id": 368, "type": "pointer_declarator", "text": "* ast", "parent": 366, "children": [369, 370], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 35}}, {"id": 369, "type": "*", "text": "*", "parent": 368, "children": [], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 31}}, {"id": 370, "type": "identifier", "text": "ast", "parent": 368, "children": [], "start_point": {"row": 99, "column": 32}, "end_point": {"row": 99, "column": 35}}, {"id": 371, "type": "declaration", "text": "printbuf_t* buf = printbuf_new();", "parent": 359, "children": [372, 373], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 35}}, {"id": 372, "type": "type_identifier", "text": "printbuf_t", "parent": 371, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 12}}, {"id": 373, "type": "init_declarator", "text": "* buf = printbuf_new()", "parent": 371, "children": [374, 377, 378], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 34}}, {"id": 374, "type": "pointer_declarator", "text": "* buf", "parent": 373, "children": [375, 376], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 17}}, {"id": 375, "type": "*", "text": "*", "parent": 374, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 13}}, {"id": 376, "type": "identifier", "text": "buf", "parent": 374, "children": [], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 17}}, {"id": 377, "type": "=", "text": "=", "parent": 373, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 19}}, {"id": 378, "type": "call_expression", "text": "printbuf_new()", "parent": 373, "children": [379, 380], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 34}}, {"id": 379, "type": "identifier", "text": "printbuf_new", "parent": 378, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 32}}, {"id": 380, "type": "argument_list", "text": "()", "parent": 378, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 34}}, {"id": 381, "type": "call_expression", "text": "type_append(buf, ast, true)", "parent": 359, "children": [382, 383], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 29}}, {"id": 382, "type": "identifier", "text": "type_append", "parent": 381, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 13}}, {"id": 383, "type": "argument_list", "text": "(buf, ast, true)", "parent": 381, "children": [384, 385, 386], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 29}}, {"id": 384, "type": "identifier", "text": "buf", "parent": 383, "children": [], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 17}}, {"id": 385, "type": "identifier", "text": "ast", "parent": 383, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 22}}, {"id": 386, "type": "true", "text": "true", "parent": 383, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 28}}, {"id": 387, "type": "return_statement", "text": "return stringtab_buf(buf);", "parent": 359, "children": [388], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 28}}, {"id": 388, "type": "call_expression", "text": "stringtab_buf(buf)", "parent": 387, "children": [389, 390], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 27}}, {"id": 389, "type": "identifier", "text": "stringtab_buf", "parent": 388, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 22}}, {"id": 390, "type": "argument_list", "text": "(buf)", "parent": 388, "children": [391], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 27}}, {"id": 391, "type": "identifier", "text": "buf", "parent": 390, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 26}}, {"id": 392, "type": "function_definition", "text": "const char* genname_alloc(const char* type)\n{\n return stringtab_two(type, \"Alloc\");\n}", "parent": null, "children": [393, 394], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 110, "column": 1}}, {"id": 393, "type": "primitive_type", "text": "char", "parent": 392, "children": [], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 107, "column": 10}}, {"id": 394, "type": "pointer_declarator", "text": "* genname_alloc(const char* type)", "parent": 392, "children": [395, 396], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 43}}, {"id": 395, "type": "*", "text": "*", "parent": 394, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 11}}, {"id": 396, "type": "function_declarator", "text": "genname_alloc(const char* type)", "parent": 394, "children": [397, 398], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 43}}, {"id": 397, "type": "identifier", "text": "genname_alloc", "parent": 396, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 25}}, {"id": 398, "type": "parameter_list", "text": "(const char* type)", "parent": 396, "children": [399], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 43}}, {"id": 399, "type": "parameter_declaration", "text": "const char* type", "parent": 398, "children": [400, 401], "start_point": {"row": 107, "column": 26}, "end_point": {"row": 107, "column": 42}}, {"id": 400, "type": "primitive_type", "text": "char", "parent": 399, "children": [], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 36}}, {"id": 401, "type": "pointer_declarator", "text": "* type", "parent": 399, "children": [402, 403], "start_point": {"row": 107, "column": 36}, "end_point": {"row": 107, "column": 42}}, {"id": 402, "type": "*", "text": "*", "parent": 401, "children": [], "start_point": {"row": 107, "column": 36}, "end_point": {"row": 107, "column": 37}}, {"id": 403, "type": "identifier", "text": "type", "parent": 401, "children": [], "start_point": {"row": 107, "column": 38}, "end_point": {"row": 107, "column": 42}}, {"id": 404, "type": "return_statement", "text": "return stringtab_two(type, \"Alloc\");", "parent": 392, "children": [405], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 38}}, {"id": 405, "type": "call_expression", "text": "stringtab_two(type, \"Alloc\")", "parent": 404, "children": [406, 407], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 37}}, {"id": 406, "type": "identifier", "text": "stringtab_two", "parent": 405, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 22}}, {"id": 407, "type": "argument_list", "text": "(type, \"Alloc\")", "parent": 405, "children": [408, 409], "start_point": {"row": 109, "column": 22}, "end_point": {"row": 109, "column": 37}}, {"id": 408, "type": "identifier", "text": "type", "parent": 407, "children": [], "start_point": {"row": 109, "column": 23}, "end_point": {"row": 109, "column": 27}}, {"id": 409, "type": "string_literal", "text": "\"Alloc\"", "parent": 407, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 36}}, {"id": 410, "type": "function_definition", "text": "const char* genname_traitlist(const char* type)\n{\n return stringtab_two(type, \"Traits\");\n}", "parent": null, "children": [411, 412], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 115, "column": 1}}, {"id": 411, "type": "primitive_type", "text": "char", "parent": 410, "children": [], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 10}}, {"id": 412, "type": "pointer_declarator", "text": "* genname_traitlist(const char* type)", "parent": 410, "children": [413, 414], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 47}}, {"id": 413, "type": "*", "text": "*", "parent": 412, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 11}}, {"id": 414, "type": "function_declarator", "text": "genname_traitlist(const char* type)", "parent": 412, "children": [415, 416], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 47}}, {"id": 415, "type": "identifier", "text": "genname_traitlist", "parent": 414, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 29}}, {"id": 416, "type": "parameter_list", "text": "(const char* type)", "parent": 414, "children": [417], "start_point": {"row": 112, "column": 29}, "end_point": {"row": 112, "column": 47}}, {"id": 417, "type": "parameter_declaration", "text": "const char* type", "parent": 416, "children": [418, 419], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 46}}, {"id": 418, "type": "primitive_type", "text": "char", "parent": 417, "children": [], "start_point": {"row": 112, "column": 36}, "end_point": {"row": 112, "column": 40}}, {"id": 419, "type": "pointer_declarator", "text": "* type", "parent": 417, "children": [420, 421], "start_point": {"row": 112, "column": 40}, "end_point": {"row": 112, "column": 46}}, {"id": 420, "type": "*", "text": "*", "parent": 419, "children": [], "start_point": {"row": 112, "column": 40}, "end_point": {"row": 112, "column": 41}}, {"id": 421, "type": "identifier", "text": "type", "parent": 419, "children": [], "start_point": {"row": 112, "column": 42}, "end_point": {"row": 112, "column": 46}}, {"id": 422, "type": "return_statement", "text": "return stringtab_two(type, \"Traits\");", "parent": 410, "children": [423], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 39}}, {"id": 423, "type": "call_expression", "text": "stringtab_two(type, \"Traits\")", "parent": 422, "children": [424, 425], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 38}}, {"id": 424, "type": "identifier", "text": "stringtab_two", "parent": 423, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 22}}, {"id": 425, "type": "argument_list", "text": "(type, \"Traits\")", "parent": 423, "children": [426, 427], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 38}}, {"id": 426, "type": "identifier", "text": "type", "parent": 425, "children": [], "start_point": {"row": 114, "column": 23}, "end_point": {"row": 114, "column": 27}}, {"id": 427, "type": "string_literal", "text": "\"Traits\"", "parent": 425, "children": [], "start_point": {"row": 114, "column": 29}, "end_point": {"row": 114, "column": 37}}, {"id": 428, "type": "function_definition", "text": "const char* genname_fieldlist(const char* type)\n{\n return stringtab_two(type, \"Fields\");\n}", "parent": null, "children": [429, 430], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 120, "column": 1}}, {"id": 429, "type": "primitive_type", "text": "char", "parent": 428, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 10}}, {"id": 430, "type": "pointer_declarator", "text": "* genname_fieldlist(const char* type)", "parent": 428, "children": [431, 432], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 47}}, {"id": 431, "type": "*", "text": "*", "parent": 430, "children": [], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 11}}, {"id": 432, "type": "function_declarator", "text": "genname_fieldlist(const char* type)", "parent": 430, "children": [433, 434], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 47}}, {"id": 433, "type": "identifier", "text": "genname_fieldlist", "parent": 432, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 29}}, {"id": 434, "type": "parameter_list", "text": "(const char* type)", "parent": 432, "children": [435], "start_point": {"row": 117, "column": 29}, "end_point": {"row": 117, "column": 47}}, {"id": 435, "type": "parameter_declaration", "text": "const char* type", "parent": 434, "children": [436, 437], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 46}}, {"id": 436, "type": "primitive_type", "text": "char", "parent": 435, "children": [], "start_point": {"row": 117, "column": 36}, "end_point": {"row": 117, "column": 40}}, {"id": 437, "type": "pointer_declarator", "text": "* type", "parent": 435, "children": [438, 439], "start_point": {"row": 117, "column": 40}, "end_point": {"row": 117, "column": 46}}, {"id": 438, "type": "*", "text": "*", "parent": 437, "children": [], "start_point": {"row": 117, "column": 40}, "end_point": {"row": 117, "column": 41}}, {"id": 439, "type": "identifier", "text": "type", "parent": 437, "children": [], "start_point": {"row": 117, "column": 42}, "end_point": {"row": 117, "column": 46}}, {"id": 440, "type": "return_statement", "text": "return stringtab_two(type, \"Fields\");", "parent": 428, "children": [441], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 39}}, {"id": 441, "type": "call_expression", "text": "stringtab_two(type, \"Fields\")", "parent": 440, "children": [442, 443], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 38}}, {"id": 442, "type": "identifier", "text": "stringtab_two", "parent": 441, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 22}}, {"id": 443, "type": "argument_list", "text": "(type, \"Fields\")", "parent": 441, "children": [444, 445], "start_point": {"row": 119, "column": 22}, "end_point": {"row": 119, "column": 38}}, {"id": 444, "type": "identifier", "text": "type", "parent": 443, "children": [], "start_point": {"row": 119, "column": 23}, "end_point": {"row": 119, "column": 27}}, {"id": 445, "type": "string_literal", "text": "\"Fields\"", "parent": 443, "children": [], "start_point": {"row": 119, "column": 29}, "end_point": {"row": 119, "column": 37}}, {"id": 446, "type": "function_definition", "text": "const char* genname_trace(const char* type)\n{\n return stringtab_two(type, \"Trace\");\n}", "parent": null, "children": [447, 448], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 125, "column": 1}}, {"id": 447, "type": "primitive_type", "text": "char", "parent": 446, "children": [], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 10}}, {"id": 448, "type": "pointer_declarator", "text": "* genname_trace(const char* type)", "parent": 446, "children": [449, 450], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 43}}, {"id": 449, "type": "*", "text": "*", "parent": 448, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 11}}, {"id": 450, "type": "function_declarator", "text": "genname_trace(const char* type)", "parent": 448, "children": [451, 452], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 43}}, {"id": 451, "type": "identifier", "text": "genname_trace", "parent": 450, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 25}}, {"id": 452, "type": "parameter_list", "text": "(const char* type)", "parent": 450, "children": [453], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 43}}, {"id": 453, "type": "parameter_declaration", "text": "const char* type", "parent": 452, "children": [454, 455], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 42}}, {"id": 454, "type": "primitive_type", "text": "char", "parent": 453, "children": [], "start_point": {"row": 122, "column": 32}, "end_point": {"row": 122, "column": 36}}, {"id": 455, "type": "pointer_declarator", "text": "* type", "parent": 453, "children": [456, 457], "start_point": {"row": 122, "column": 36}, "end_point": {"row": 122, "column": 42}}, {"id": 456, "type": "*", "text": "*", "parent": 455, "children": [], "start_point": {"row": 122, "column": 36}, "end_point": {"row": 122, "column": 37}}, {"id": 457, "type": "identifier", "text": "type", "parent": 455, "children": [], "start_point": {"row": 122, "column": 38}, "end_point": {"row": 122, "column": 42}}, {"id": 458, "type": "return_statement", "text": "return stringtab_two(type, \"Trace\");", "parent": 446, "children": [459], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 38}}, {"id": 459, "type": "call_expression", "text": "stringtab_two(type, \"Trace\")", "parent": 458, "children": [460, 461], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 37}}, {"id": 460, "type": "identifier", "text": "stringtab_two", "parent": 459, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 22}}, {"id": 461, "type": "argument_list", "text": "(type, \"Trace\")", "parent": 459, "children": [462, 463], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 37}}, {"id": 462, "type": "identifier", "text": "type", "parent": 461, "children": [], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 27}}, {"id": 463, "type": "string_literal", "text": "\"Trace\"", "parent": 461, "children": [], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 36}}, {"id": 464, "type": "function_definition", "text": "const char* genname_serialise(const char* type)\n{\n return stringtab_two(type, \"Serialise\");\n}", "parent": null, "children": [465, 466], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 130, "column": 1}}, {"id": 465, "type": "primitive_type", "text": "char", "parent": 464, "children": [], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 10}}, {"id": 466, "type": "pointer_declarator", "text": "* genname_serialise(const char* type)", "parent": 464, "children": [467, 468], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 47}}, {"id": 467, "type": "*", "text": "*", "parent": 466, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 11}}, {"id": 468, "type": "function_declarator", "text": "genname_serialise(const char* type)", "parent": 466, "children": [469, 470], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 47}}, {"id": 469, "type": "identifier", "text": "genname_serialise", "parent": 468, "children": [], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 29}}, {"id": 470, "type": "parameter_list", "text": "(const char* type)", "parent": 468, "children": [471], "start_point": {"row": 127, "column": 29}, "end_point": {"row": 127, "column": 47}}, {"id": 471, "type": "parameter_declaration", "text": "const char* type", "parent": 470, "children": [472, 473], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 46}}, {"id": 472, "type": "primitive_type", "text": "char", "parent": 471, "children": [], "start_point": {"row": 127, "column": 36}, "end_point": {"row": 127, "column": 40}}, {"id": 473, "type": "pointer_declarator", "text": "* type", "parent": 471, "children": [474, 475], "start_point": {"row": 127, "column": 40}, "end_point": {"row": 127, "column": 46}}, {"id": 474, "type": "*", "text": "*", "parent": 473, "children": [], "start_point": {"row": 127, "column": 40}, "end_point": {"row": 127, "column": 41}}, {"id": 475, "type": "identifier", "text": "type", "parent": 473, "children": [], "start_point": {"row": 127, "column": 42}, "end_point": {"row": 127, "column": 46}}, {"id": 476, "type": "return_statement", "text": "return stringtab_two(type, \"Serialise\");", "parent": 464, "children": [477], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 42}}, {"id": 477, "type": "call_expression", "text": "stringtab_two(type, \"Serialise\")", "parent": 476, "children": [478, 479], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 41}}, {"id": 478, "type": "identifier", "text": "stringtab_two", "parent": 477, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 22}}, {"id": 479, "type": "argument_list", "text": "(type, \"Serialise\")", "parent": 477, "children": [480, 481], "start_point": {"row": 129, "column": 22}, "end_point": {"row": 129, "column": 41}}, {"id": 480, "type": "identifier", "text": "type", "parent": 479, "children": [], "start_point": {"row": 129, "column": 23}, "end_point": {"row": 129, "column": 27}}, {"id": 481, "type": "string_literal", "text": "\"Serialise\"", "parent": 479, "children": [], "start_point": {"row": 129, "column": 29}, "end_point": {"row": 129, "column": 40}}, {"id": 482, "type": "function_definition", "text": "const char* genname_deserialise(const char* type)\n{\n return stringtab_two(type, \"Deserialise\");\n}", "parent": null, "children": [483, 484], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 135, "column": 1}}, {"id": 483, "type": "primitive_type", "text": "char", "parent": 482, "children": [], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 132, "column": 10}}, {"id": 484, "type": "pointer_declarator", "text": "* genname_deserialise(const char* type)", "parent": 482, "children": [485, 486], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 49}}, {"id": 485, "type": "*", "text": "*", "parent": 484, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 11}}, {"id": 486, "type": "function_declarator", "text": "genname_deserialise(const char* type)", "parent": 484, "children": [487, 488], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 49}}, {"id": 487, "type": "identifier", "text": "genname_deserialise", "parent": 486, "children": [], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 31}}, {"id": 488, "type": "parameter_list", "text": "(const char* type)", "parent": 486, "children": [489], "start_point": {"row": 132, "column": 31}, "end_point": {"row": 132, "column": 49}}, {"id": 489, "type": "parameter_declaration", "text": "const char* type", "parent": 488, "children": [490, 491], "start_point": {"row": 132, "column": 32}, "end_point": {"row": 132, "column": 48}}, {"id": 490, "type": "primitive_type", "text": "char", "parent": 489, "children": [], "start_point": {"row": 132, "column": 38}, "end_point": {"row": 132, "column": 42}}, {"id": 491, "type": "pointer_declarator", "text": "* type", "parent": 489, "children": [492, 493], "start_point": {"row": 132, "column": 42}, "end_point": {"row": 132, "column": 48}}, {"id": 492, "type": "*", "text": "*", "parent": 491, "children": [], "start_point": {"row": 132, "column": 42}, "end_point": {"row": 132, "column": 43}}, {"id": 493, "type": "identifier", "text": "type", "parent": 491, "children": [], "start_point": {"row": 132, "column": 44}, "end_point": {"row": 132, "column": 48}}, {"id": 494, "type": "return_statement", "text": "return stringtab_two(type, \"Deserialise\");", "parent": 482, "children": [495], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 44}}, {"id": 495, "type": "call_expression", "text": "stringtab_two(type, \"Deserialise\")", "parent": 494, "children": [496, 497], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 43}}, {"id": 496, "type": "identifier", "text": "stringtab_two", "parent": 495, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 22}}, {"id": 497, "type": "argument_list", "text": "(type, \"Deserialise\")", "parent": 495, "children": [498, 499], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 43}}, {"id": 498, "type": "identifier", "text": "type", "parent": 497, "children": [], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 27}}, {"id": 499, "type": "string_literal", "text": "\"Deserialise\"", "parent": 497, "children": [], "start_point": {"row": 134, "column": 29}, "end_point": {"row": 134, "column": 42}}, {"id": 500, "type": "function_definition", "text": "const char* genname_dispatch(const char* type)\n{\n return stringtab_two(type, \"Dispatch\");\n}", "parent": null, "children": [501, 502], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 140, "column": 1}}, {"id": 501, "type": "primitive_type", "text": "char", "parent": 500, "children": [], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 10}}, {"id": 502, "type": "pointer_declarator", "text": "* genname_dispatch(const char* type)", "parent": 500, "children": [503, 504], "start_point": {"row": 137, "column": 10}, "end_point": {"row": 137, "column": 46}}, {"id": 503, "type": "*", "text": "*", "parent": 502, "children": [], "start_point": {"row": 137, "column": 10}, "end_point": {"row": 137, "column": 11}}, {"id": 504, "type": "function_declarator", "text": "genname_dispatch(const char* type)", "parent": 502, "children": [505, 506], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 46}}, {"id": 505, "type": "identifier", "text": "genname_dispatch", "parent": 504, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 28}}, {"id": 506, "type": "parameter_list", "text": "(const char* type)", "parent": 504, "children": [507], "start_point": {"row": 137, "column": 28}, "end_point": {"row": 137, "column": 46}}, {"id": 507, "type": "parameter_declaration", "text": "const char* type", "parent": 506, "children": [508, 509], "start_point": {"row": 137, "column": 29}, "end_point": {"row": 137, "column": 45}}, {"id": 508, "type": "primitive_type", "text": "char", "parent": 507, "children": [], "start_point": {"row": 137, "column": 35}, "end_point": {"row": 137, "column": 39}}, {"id": 509, "type": "pointer_declarator", "text": "* type", "parent": 507, "children": [510, 511], "start_point": {"row": 137, "column": 39}, "end_point": {"row": 137, "column": 45}}, {"id": 510, "type": "*", "text": "*", "parent": 509, "children": [], "start_point": {"row": 137, "column": 39}, "end_point": {"row": 137, "column": 40}}, {"id": 511, "type": "identifier", "text": "type", "parent": 509, "children": [], "start_point": {"row": 137, "column": 41}, "end_point": {"row": 137, "column": 45}}, {"id": 512, "type": "return_statement", "text": "return stringtab_two(type, \"Dispatch\");", "parent": 500, "children": [513], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 41}}, {"id": 513, "type": "call_expression", "text": "stringtab_two(type, \"Dispatch\")", "parent": 512, "children": [514, 515], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 40}}, {"id": 514, "type": "identifier", "text": "stringtab_two", "parent": 513, "children": [], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 22}}, {"id": 515, "type": "argument_list", "text": "(type, \"Dispatch\")", "parent": 513, "children": [516, 517], "start_point": {"row": 139, "column": 22}, "end_point": {"row": 139, "column": 40}}, {"id": 516, "type": "identifier", "text": "type", "parent": 515, "children": [], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 27}}, {"id": 517, "type": "string_literal", "text": "\"Dispatch\"", "parent": 515, "children": [], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 39}}, {"id": 518, "type": "function_definition", "text": "const char* genname_descriptor(const char* type)\n{\n return stringtab_two(type, \"Desc\");\n}", "parent": null, "children": [519, 520], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 145, "column": 1}}, {"id": 519, "type": "primitive_type", "text": "char", "parent": 518, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 10}}, {"id": 520, "type": "pointer_declarator", "text": "* genname_descriptor(const char* type)", "parent": 518, "children": [521, 522], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 48}}, {"id": 521, "type": "*", "text": "*", "parent": 520, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 11}}, {"id": 522, "type": "function_declarator", "text": "genname_descriptor(const char* type)", "parent": 520, "children": [523, 524], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 48}}, {"id": 523, "type": "identifier", "text": "genname_descriptor", "parent": 522, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 30}}, {"id": 524, "type": "parameter_list", "text": "(const char* type)", "parent": 522, "children": [525], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 48}}, {"id": 525, "type": "parameter_declaration", "text": "const char* type", "parent": 524, "children": [526, 527], "start_point": {"row": 142, "column": 31}, "end_point": {"row": 142, "column": 47}}, {"id": 526, "type": "primitive_type", "text": "char", "parent": 525, "children": [], "start_point": {"row": 142, "column": 37}, "end_point": {"row": 142, "column": 41}}, {"id": 527, "type": "pointer_declarator", "text": "* type", "parent": 525, "children": [528, 529], "start_point": {"row": 142, "column": 41}, "end_point": {"row": 142, "column": 47}}, {"id": 528, "type": "*", "text": "*", "parent": 527, "children": [], "start_point": {"row": 142, "column": 41}, "end_point": {"row": 142, "column": 42}}, {"id": 529, "type": "identifier", "text": "type", "parent": 527, "children": [], "start_point": {"row": 142, "column": 43}, "end_point": {"row": 142, "column": 47}}, {"id": 530, "type": "return_statement", "text": "return stringtab_two(type, \"Desc\");", "parent": 518, "children": [531], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 37}}, {"id": 531, "type": "call_expression", "text": "stringtab_two(type, \"Desc\")", "parent": 530, "children": [532, 533], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 36}}, {"id": 532, "type": "identifier", "text": "stringtab_two", "parent": 531, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 22}}, {"id": 533, "type": "argument_list", "text": "(type, \"Desc\")", "parent": 531, "children": [534, 535], "start_point": {"row": 144, "column": 22}, "end_point": {"row": 144, "column": 36}}, {"id": 534, "type": "identifier", "text": "type", "parent": 533, "children": [], "start_point": {"row": 144, "column": 23}, "end_point": {"row": 144, "column": 27}}, {"id": 535, "type": "string_literal", "text": "\"Desc\"", "parent": 533, "children": [], "start_point": {"row": 144, "column": 29}, "end_point": {"row": 144, "column": 35}}, {"id": 536, "type": "function_definition", "text": "const char* genname_instance(const char* type)\n{\n return stringtab_two(type, \"Inst\");\n}", "parent": null, "children": [537, 538], "start_point": {"row": 147, "column": 0}, "end_point": {"row": 150, "column": 1}}, {"id": 537, "type": "primitive_type", "text": "char", "parent": 536, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 10}}, {"id": 538, "type": "pointer_declarator", "text": "* genname_instance(const char* type)", "parent": 536, "children": [539, 540], "start_point": {"row": 147, "column": 10}, "end_point": {"row": 147, "column": 46}}, {"id": 539, "type": "*", "text": "*", "parent": 538, "children": [], "start_point": {"row": 147, "column": 10}, "end_point": {"row": 147, "column": 11}}, {"id": 540, "type": "function_declarator", "text": "genname_instance(const char* type)", "parent": 538, "children": [541, 542], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 46}}, {"id": 541, "type": "identifier", "text": "genname_instance", "parent": 540, "children": [], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 28}}, {"id": 542, "type": "parameter_list", "text": "(const char* type)", "parent": 540, "children": [543], "start_point": {"row": 147, "column": 28}, "end_point": {"row": 147, "column": 46}}, {"id": 543, "type": "parameter_declaration", "text": "const char* type", "parent": 542, "children": [544, 545], "start_point": {"row": 147, "column": 29}, "end_point": {"row": 147, "column": 45}}, {"id": 544, "type": "primitive_type", "text": "char", "parent": 543, "children": [], "start_point": {"row": 147, "column": 35}, "end_point": {"row": 147, "column": 39}}, {"id": 545, "type": "pointer_declarator", "text": "* type", "parent": 543, "children": [546, 547], "start_point": {"row": 147, "column": 39}, "end_point": {"row": 147, "column": 45}}, {"id": 546, "type": "*", "text": "*", "parent": 545, "children": [], "start_point": {"row": 147, "column": 39}, "end_point": {"row": 147, "column": 40}}, {"id": 547, "type": "identifier", "text": "type", "parent": 545, "children": [], "start_point": {"row": 147, "column": 41}, "end_point": {"row": 147, "column": 45}}, {"id": 548, "type": "return_statement", "text": "return stringtab_two(type, \"Inst\");", "parent": 536, "children": [549], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 37}}, {"id": 549, "type": "call_expression", "text": "stringtab_two(type, \"Inst\")", "parent": 548, "children": [550, 551], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 36}}, {"id": 550, "type": "identifier", "text": "stringtab_two", "parent": 549, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 22}}, {"id": 551, "type": "argument_list", "text": "(type, \"Inst\")", "parent": 549, "children": [552, 553], "start_point": {"row": 149, "column": 22}, "end_point": {"row": 149, "column": 36}}, {"id": 552, "type": "identifier", "text": "type", "parent": 551, "children": [], "start_point": {"row": 149, "column": 23}, "end_point": {"row": 149, "column": 27}}, {"id": 553, "type": "string_literal", "text": "\"Inst\"", "parent": 551, "children": [], "start_point": {"row": 149, "column": 29}, "end_point": {"row": 149, "column": 35}}, {"id": 554, "type": "function_definition", "text": "const char* genname_fun(token_id cap, const char* name, ast_t* typeargs)\n{\n // cap_name[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n printbuf(buf, \"%s_%s\", lexer_print(cap), name);\n types_append(buf, typeargs);\n return stringtab_buf(buf);\n}", "parent": null, "children": [555, 556], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 159, "column": 1}}, {"id": 555, "type": "primitive_type", "text": "char", "parent": 554, "children": [], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 10}}, {"id": 556, "type": "pointer_declarator", "text": "* genname_fun(token_id cap, const char* name, ast_t* typeargs)", "parent": 554, "children": [557, 558], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 72}}, {"id": 557, "type": "*", "text": "*", "parent": 556, "children": [], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 11}}, {"id": 558, "type": "function_declarator", "text": "genname_fun(token_id cap, const char* name, ast_t* typeargs)", "parent": 556, "children": [559, 560], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 72}}, {"id": 559, "type": "identifier", "text": "genname_fun", "parent": 558, "children": [], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 23}}, {"id": 560, "type": "parameter_list", "text": "(token_id cap, const char* name, ast_t* typeargs)", "parent": 558, "children": [561, 564, 569], "start_point": {"row": 152, "column": 23}, "end_point": {"row": 152, "column": 72}}, {"id": 561, "type": "parameter_declaration", "text": "token_id cap", "parent": 560, "children": [562, 563], "start_point": {"row": 152, "column": 24}, "end_point": {"row": 152, "column": 36}}, {"id": 562, "type": "type_identifier", "text": "token_id", "parent": 561, "children": [], "start_point": {"row": 152, "column": 24}, "end_point": {"row": 152, "column": 32}}, {"id": 563, "type": "identifier", "text": "cap", "parent": 561, "children": [], "start_point": {"row": 152, "column": 33}, "end_point": {"row": 152, "column": 36}}, {"id": 564, "type": "parameter_declaration", "text": "const char* name", "parent": 560, "children": [565, 566], "start_point": {"row": 152, "column": 38}, "end_point": {"row": 152, "column": 54}}, {"id": 565, "type": "primitive_type", "text": "char", "parent": 564, "children": [], "start_point": {"row": 152, "column": 44}, "end_point": {"row": 152, "column": 48}}, {"id": 566, "type": "pointer_declarator", "text": "* name", "parent": 564, "children": [567, 568], "start_point": {"row": 152, "column": 48}, "end_point": {"row": 152, "column": 54}}, {"id": 567, "type": "*", "text": "*", "parent": 566, "children": [], "start_point": {"row": 152, "column": 48}, "end_point": {"row": 152, "column": 49}}, {"id": 568, "type": "identifier", "text": "name", "parent": 566, "children": [], "start_point": {"row": 152, "column": 50}, "end_point": {"row": 152, "column": 54}}, {"id": 569, "type": "parameter_declaration", "text": "ast_t* typeargs", "parent": 560, "children": [570, 571], "start_point": {"row": 152, "column": 56}, "end_point": {"row": 152, "column": 71}}, {"id": 570, "type": "type_identifier", "text": "ast_t", "parent": 569, "children": [], "start_point": {"row": 152, "column": 56}, "end_point": {"row": 152, "column": 61}}, {"id": 571, "type": "pointer_declarator", "text": "* typeargs", "parent": 569, "children": [572, 573], "start_point": {"row": 152, "column": 61}, "end_point": {"row": 152, "column": 71}}, {"id": 572, "type": "*", "text": "*", "parent": 571, "children": [], "start_point": {"row": 152, "column": 61}, "end_point": {"row": 152, "column": 62}}, {"id": 573, "type": "identifier", "text": "typeargs", "parent": 571, "children": [], "start_point": {"row": 152, "column": 63}, "end_point": {"row": 152, "column": 71}}, {"id": 574, "type": "declaration", "text": "printbuf_t* buf = printbuf_new();", "parent": 554, "children": [575, 576], "start_point": {"row": 155, "column": 2}, "end_point": {"row": 155, "column": 35}}, {"id": 575, "type": "type_identifier", "text": "printbuf_t", "parent": 574, "children": [], "start_point": {"row": 155, "column": 2}, "end_point": {"row": 155, "column": 12}}, {"id": 576, "type": "init_declarator", "text": "* buf = printbuf_new()", "parent": 574, "children": [577, 580, 581], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 34}}, {"id": 577, "type": "pointer_declarator", "text": "* buf", "parent": 576, "children": [578, 579], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 17}}, {"id": 578, "type": "*", "text": "*", "parent": 577, "children": [], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 13}}, {"id": 579, "type": "identifier", "text": "buf", "parent": 577, "children": [], "start_point": {"row": 155, "column": 14}, "end_point": {"row": 155, "column": 17}}, {"id": 580, "type": "=", "text": "=", "parent": 576, "children": [], "start_point": {"row": 155, "column": 18}, "end_point": {"row": 155, "column": 19}}, {"id": 581, "type": "call_expression", "text": "printbuf_new()", "parent": 576, "children": [582, 583], "start_point": {"row": 155, "column": 20}, "end_point": {"row": 155, "column": 34}}, {"id": 582, "type": "identifier", "text": "printbuf_new", "parent": 581, "children": [], "start_point": {"row": 155, "column": 20}, "end_point": {"row": 155, "column": 32}}, {"id": 583, "type": "argument_list", "text": "()", "parent": 581, "children": [], "start_point": {"row": 155, "column": 32}, "end_point": {"row": 155, "column": 34}}, {"id": 584, "type": "call_expression", "text": "printbuf(buf, \"%s_%s\", lexer_print(cap), name)", "parent": 554, "children": [585, 586], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 156, "column": 48}}, {"id": 585, "type": "identifier", "text": "printbuf", "parent": 584, "children": [], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 156, "column": 10}}, {"id": 586, "type": "argument_list", "text": "(buf, \"%s_%s\", lexer_print(cap), name)", "parent": 584, "children": [587, 588, 589, 593], "start_point": {"row": 156, "column": 10}, "end_point": {"row": 156, "column": 48}}, {"id": 587, "type": "identifier", "text": "buf", "parent": 586, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 14}}, {"id": 588, "type": "string_literal", "text": "\"%s_%s\"", "parent": 586, "children": [], "start_point": {"row": 156, "column": 16}, "end_point": {"row": 156, "column": 23}}, {"id": 589, "type": "call_expression", "text": "lexer_print(cap)", "parent": 586, "children": [590, 591], "start_point": {"row": 156, "column": 25}, "end_point": {"row": 156, "column": 41}}, {"id": 590, "type": "identifier", "text": "lexer_print", "parent": 589, "children": [], "start_point": {"row": 156, "column": 25}, "end_point": {"row": 156, "column": 36}}, {"id": 591, "type": "argument_list", "text": "(cap)", "parent": 589, "children": [592], "start_point": {"row": 156, "column": 36}, "end_point": {"row": 156, "column": 41}}, {"id": 592, "type": "identifier", "text": "cap", "parent": 591, "children": [], "start_point": {"row": 156, "column": 37}, "end_point": {"row": 156, "column": 40}}, {"id": 593, "type": "identifier", "text": "name", "parent": 586, "children": [], "start_point": {"row": 156, "column": 43}, "end_point": {"row": 156, "column": 47}}, {"id": 594, "type": "call_expression", "text": "types_append(buf, typeargs)", "parent": 554, "children": [595, 596], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 29}}, {"id": 595, "type": "identifier", "text": "types_append", "parent": 594, "children": [], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 14}}, {"id": 596, "type": "argument_list", "text": "(buf, typeargs)", "parent": 594, "children": [597, 598], "start_point": {"row": 157, "column": 14}, "end_point": {"row": 157, "column": 29}}, {"id": 597, "type": "identifier", "text": "buf", "parent": 596, "children": [], "start_point": {"row": 157, "column": 15}, "end_point": {"row": 157, "column": 18}}, {"id": 598, "type": "identifier", "text": "typeargs", "parent": 596, "children": [], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 28}}, {"id": 599, "type": "return_statement", "text": "return stringtab_buf(buf);", "parent": 554, "children": [600], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 28}}, {"id": 600, "type": "call_expression", "text": "stringtab_buf(buf)", "parent": 599, "children": [601, 602], "start_point": {"row": 158, "column": 9}, "end_point": {"row": 158, "column": 27}}, {"id": 601, "type": "identifier", "text": "stringtab_buf", "parent": 600, "children": [], "start_point": {"row": 158, "column": 9}, "end_point": {"row": 158, "column": 22}}, {"id": 602, "type": "argument_list", "text": "(buf)", "parent": 600, "children": [603], "start_point": {"row": 158, "column": 22}, "end_point": {"row": 158, "column": 27}}, {"id": 603, "type": "identifier", "text": "buf", "parent": 602, "children": [], "start_point": {"row": 158, "column": 23}, "end_point": {"row": 158, "column": 26}}, {"id": 604, "type": "function_definition", "text": "const char* genname_be(const char* name)\n{\n return stringtab_two(name, \"_send\");\n}", "parent": null, "children": [605, 606], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 164, "column": 1}}, {"id": 605, "type": "primitive_type", "text": "char", "parent": 604, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 10}}, {"id": 606, "type": "pointer_declarator", "text": "* genname_be(const char* name)", "parent": 604, "children": [607, 608], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 40}}, {"id": 607, "type": "*", "text": "*", "parent": 606, "children": [], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 11}}, {"id": 608, "type": "function_declarator", "text": "genname_be(const char* name)", "parent": 606, "children": [609, 610], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 40}}, {"id": 609, "type": "identifier", "text": "genname_be", "parent": 608, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 22}}, {"id": 610, "type": "parameter_list", "text": "(const char* name)", "parent": 608, "children": [611], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 40}}, {"id": 611, "type": "parameter_declaration", "text": "const char* name", "parent": 610, "children": [612, 613], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 39}}, {"id": 612, "type": "primitive_type", "text": "char", "parent": 611, "children": [], "start_point": {"row": 161, "column": 29}, "end_point": {"row": 161, "column": 33}}, {"id": 613, "type": "pointer_declarator", "text": "* name", "parent": 611, "children": [614, 615], "start_point": {"row": 161, "column": 33}, "end_point": {"row": 161, "column": 39}}, {"id": 614, "type": "*", "text": "*", "parent": 613, "children": [], "start_point": {"row": 161, "column": 33}, "end_point": {"row": 161, "column": 34}}, {"id": 615, "type": "identifier", "text": "name", "parent": 613, "children": [], "start_point": {"row": 161, "column": 35}, "end_point": {"row": 161, "column": 39}}, {"id": 616, "type": "return_statement", "text": "return stringtab_two(name, \"_send\");", "parent": 604, "children": [617], "start_point": {"row": 163, "column": 2}, "end_point": {"row": 163, "column": 38}}, {"id": 617, "type": "call_expression", "text": "stringtab_two(name, \"_send\")", "parent": 616, "children": [618, 619], "start_point": {"row": 163, "column": 9}, "end_point": {"row": 163, "column": 37}}, {"id": 618, "type": "identifier", "text": "stringtab_two", "parent": 617, "children": [], "start_point": {"row": 163, "column": 9}, "end_point": {"row": 163, "column": 22}}, {"id": 619, "type": "argument_list", "text": "(name, \"_send\")", "parent": 617, "children": [620, 621], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 37}}, {"id": 620, "type": "identifier", "text": "name", "parent": 619, "children": [], "start_point": {"row": 163, "column": 23}, "end_point": {"row": 163, "column": 27}}, {"id": 621, "type": "string_literal", "text": "\"_send\"", "parent": 619, "children": [], "start_point": {"row": 163, "column": 29}, "end_point": {"row": 163, "column": 36}}, {"id": 622, "type": "function_definition", "text": "const char* genname_box(const char* name)\n{\n return stringtab_two(name, \"Box\");\n}", "parent": null, "children": [623, 624], "start_point": {"row": 166, "column": 0}, "end_point": {"row": 169, "column": 1}}, {"id": 623, "type": "primitive_type", "text": "char", "parent": 622, "children": [], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 10}}, {"id": 624, "type": "pointer_declarator", "text": "* genname_box(const char* name)", "parent": 622, "children": [625, 626], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 41}}, {"id": 625, "type": "*", "text": "*", "parent": 624, "children": [], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 11}}, {"id": 626, "type": "function_declarator", "text": "genname_box(const char* name)", "parent": 624, "children": [627, 628], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 166, "column": 41}}, {"id": 627, "type": "identifier", "text": "genname_box", "parent": 626, "children": [], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 166, "column": 23}}, {"id": 628, "type": "parameter_list", "text": "(const char* name)", "parent": 626, "children": [629], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 41}}, {"id": 629, "type": "parameter_declaration", "text": "const char* name", "parent": 628, "children": [630, 631], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 40}}, {"id": 630, "type": "primitive_type", "text": "char", "parent": 629, "children": [], "start_point": {"row": 166, "column": 30}, "end_point": {"row": 166, "column": 34}}, {"id": 631, "type": "pointer_declarator", "text": "* name", "parent": 629, "children": [632, 633], "start_point": {"row": 166, "column": 34}, "end_point": {"row": 166, "column": 40}}, {"id": 632, "type": "*", "text": "*", "parent": 631, "children": [], "start_point": {"row": 166, "column": 34}, "end_point": {"row": 166, "column": 35}}, {"id": 633, "type": "identifier", "text": "name", "parent": 631, "children": [], "start_point": {"row": 166, "column": 36}, "end_point": {"row": 166, "column": 40}}, {"id": 634, "type": "return_statement", "text": "return stringtab_two(name, \"Box\");", "parent": 622, "children": [635], "start_point": {"row": 168, "column": 2}, "end_point": {"row": 168, "column": 36}}, {"id": 635, "type": "call_expression", "text": "stringtab_two(name, \"Box\")", "parent": 634, "children": [636, 637], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 35}}, {"id": 636, "type": "identifier", "text": "stringtab_two", "parent": 635, "children": [], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 22}}, {"id": 637, "type": "argument_list", "text": "(name, \"Box\")", "parent": 635, "children": [638, 639], "start_point": {"row": 168, "column": 22}, "end_point": {"row": 168, "column": 35}}, {"id": 638, "type": "identifier", "text": "name", "parent": 637, "children": [], "start_point": {"row": 168, "column": 23}, "end_point": {"row": 168, "column": 27}}, {"id": 639, "type": "string_literal", "text": "\"Box\"", "parent": 637, "children": [], "start_point": {"row": 168, "column": 29}, "end_point": {"row": 168, "column": 34}}, {"id": 640, "type": "function_definition", "text": "const char* genname_unbox(const char* name)\n{\n return stringtab_two(name, \"Unbox\");\n}", "parent": null, "children": [641, 642], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 174, "column": 1}}, {"id": 641, "type": "primitive_type", "text": "char", "parent": 640, "children": [], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 10}}, {"id": 642, "type": "pointer_declarator", "text": "* genname_unbox(const char* name)", "parent": 640, "children": [643, 644], "start_point": {"row": 171, "column": 10}, "end_point": {"row": 171, "column": 43}}, {"id": 643, "type": "*", "text": "*", "parent": 642, "children": [], "start_point": {"row": 171, "column": 10}, "end_point": {"row": 171, "column": 11}}, {"id": 644, "type": "function_declarator", "text": "genname_unbox(const char* name)", "parent": 642, "children": [645, 646], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 43}}, {"id": 645, "type": "identifier", "text": "genname_unbox", "parent": 644, "children": [], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 25}}, {"id": 646, "type": "parameter_list", "text": "(const char* name)", "parent": 644, "children": [647], "start_point": {"row": 171, "column": 25}, "end_point": {"row": 171, "column": 43}}, {"id": 647, "type": "parameter_declaration", "text": "const char* name", "parent": 646, "children": [648, 649], "start_point": {"row": 171, "column": 26}, "end_point": {"row": 171, "column": 42}}, {"id": 648, "type": "primitive_type", "text": "char", "parent": 647, "children": [], "start_point": {"row": 171, "column": 32}, "end_point": {"row": 171, "column": 36}}, {"id": 649, "type": "pointer_declarator", "text": "* name", "parent": 647, "children": [650, 651], "start_point": {"row": 171, "column": 36}, "end_point": {"row": 171, "column": 42}}, {"id": 650, "type": "*", "text": "*", "parent": 649, "children": [], "start_point": {"row": 171, "column": 36}, "end_point": {"row": 171, "column": 37}}, {"id": 651, "type": "identifier", "text": "name", "parent": 649, "children": [], "start_point": {"row": 171, "column": 38}, "end_point": {"row": 171, "column": 42}}, {"id": 652, "type": "return_statement", "text": "return stringtab_two(name, \"Unbox\");", "parent": 640, "children": [653], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 38}}, {"id": 653, "type": "call_expression", "text": "stringtab_two(name, \"Unbox\")", "parent": 652, "children": [654, 655], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 37}}, {"id": 654, "type": "identifier", "text": "stringtab_two", "parent": 653, "children": [], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 22}}, {"id": 655, "type": "argument_list", "text": "(name, \"Unbox\")", "parent": 653, "children": [656, 657], "start_point": {"row": 173, "column": 22}, "end_point": {"row": 173, "column": 37}}, {"id": 656, "type": "identifier", "text": "name", "parent": 655, "children": [], "start_point": {"row": 173, "column": 23}, "end_point": {"row": 173, "column": 27}}, {"id": 657, "type": "string_literal", "text": "\"Unbox\"", "parent": 655, "children": [], "start_point": {"row": 173, "column": 29}, "end_point": {"row": 173, "column": 36}}]}, "node_categories": {"declarations": {"functions": [23, 36, 38, 211, 213, 270, 274, 301, 305, 359, 363, 392, 396, 410, 414, 428, 432, 446, 450, 464, 468, 482, 486, 500, 504, 518, 522, 536, 540, 554, 558, 604, 608, 622, 626, 640, 644], "variables": [21, 26, 31, 41, 46, 51, 126, 141, 152, 216, 221, 234, 277, 282, 308, 313, 337, 366, 371, 399, 417, 435, 453, 471, 489, 507, 525, 543, 561, 564, 569, 574, 611, 629, 647], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [56, 57, 64, 69, 73, 82, 87, 91, 100, 105, 109, 118, 132, 137, 148, 159, 164, 165, 170, 176, 181, 185, 191, 192, 195, 200, 207, 227, 228, 241, 246, 247, 252, 257, 266, 289, 292, 295, 319, 320, 329, 332, 344, 347, 355, 378, 381, 388, 405, 423, 441, 459, 477, 495, 513, 531, 549, 581, 584, 589, 594, 600, 617, 635, 653], "assignments": [263, 325], "loops": [245], "conditionals": [24, 27, 30, 32, 35, 39, 42, 45, 47, 50, 53, 54, 55, 58, 60, 61, 62, 63, 65, 67, 70, 72, 74, 76, 77, 79, 80, 81, 83, 85, 88, 90, 92, 94, 95, 97, 98, 99, 101, 103, 106, 108, 110, 112, 113, 115, 116, 117, 119, 121, 122, 123, 124, 125, 127, 134, 138, 140, 142, 146, 149, 151, 157, 160, 162, 163, 166, 171, 173, 175, 177, 179, 182, 184, 186, 188, 189, 190, 194, 196, 198, 201, 203, 205, 208, 214, 217, 220, 222, 225, 226, 229, 235, 239, 242, 244, 248, 253, 255, 258, 260, 261, 264, 267, 269, 275, 278, 281, 287, 290, 293, 294, 296, 298, 300, 306, 312, 317, 318, 321, 326, 330, 333, 338, 342, 345, 348, 350, 352, 353, 356, 358, 364, 367, 370, 372, 376, 379, 382, 384, 385, 389, 391, 397, 403, 406, 408, 415, 421, 424, 426, 433, 439, 442, 444, 451, 457, 460, 462, 469, 475, 478, 480, 487, 493, 496, 498, 505, 511, 514, 516, 523, 529, 532, 534, 541, 547, 550, 552, 559, 562, 563, 568, 570, 573, 575, 579, 582, 585, 587, 590, 592, 593, 595, 597, 598, 601, 603, 609, 615, 618, 620, 627, 633, 636, 638, 645, 651, 654, 656], "returns": [78, 96, 114, 204, 233, 299, 354, 387, 404, 422, 440, 458, 476, 494, 512, 530, 548, 599, 616, 634, 652], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 68, 86, 104, 174, 180, 199, 210, 256, 328, 351, 409, 427, 445, 463, 481, 499, 517, 535, 553, 588, 621, 639, 657], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "types_append(printbuf_t* buf, ast_t* elements)"}, {"node_id": 36, "universal_type": "function", "name": "type_append", "text_snippet": "static void type_append(printbuf_t* buf, ast_t* type, bool first)\n{\n switch(ast_id(type))\n {\n c"}, {"node_id": 38, "universal_type": "function", "name": "first)", "text_snippet": "type_append(printbuf_t* buf, ast_t* type, bool first)"}, {"node_id": 211, "universal_type": "function", "name": "types_append", "text_snippet": "static void types_append(printbuf_t* buf, ast_t* elements)\n{\n // _Arg1_Arg2\n if(elements == NULL)\n"}, {"node_id": 213, "universal_type": "function", "name": "unknown", "text_snippet": "types_append(printbuf_t* buf, ast_t* elements)"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "static const char* stringtab_buf(printbuf_t* buf)\n{\n const char* r = stringtab(buf->m);\n printbuf_"}, {"node_id": 274, "universal_type": "function", "name": "unknown", "text_snippet": "stringtab_buf(printbuf_t* buf)"}, {"node_id": 301, "universal_type": "function", "name": "unknown", "text_snippet": "static const char* stringtab_two(const char* a, const char* b)\n{\n if(a == NULL)\n a = \"_\";\n\n ass"}, {"node_id": 305, "universal_type": "function", "name": "unknown", "text_snippet": "stringtab_two(const char* a, const char* b)"}, {"node_id": 359, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_type(ast_t* ast)\n{\n // package_Type[_Arg1_Arg2]\n printbuf_t* buf = printbuf_ne"}, {"node_id": 363, "universal_type": "function", "name": "unknown", "text_snippet": "genname_type(ast_t* ast)"}, {"node_id": 392, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_alloc(const char* type)\n{\n return stringtab_two(type, \"Alloc\");\n}"}, {"node_id": 396, "universal_type": "function", "name": "unknown", "text_snippet": "genname_alloc(const char* type)"}, {"node_id": 410, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_traitlist(const char* type)\n{\n return stringtab_two(type, \"Traits\");\n}"}, {"node_id": 414, "universal_type": "function", "name": "unknown", "text_snippet": "genname_traitlist(const char* type)"}, {"node_id": 428, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_fieldlist(const char* type)\n{\n return stringtab_two(type, \"Fields\");\n}"}, {"node_id": 432, "universal_type": "function", "name": "unknown", "text_snippet": "genname_fieldlist(const char* type)"}, {"node_id": 446, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_trace(const char* type)\n{\n return stringtab_two(type, \"Trace\");\n}"}, {"node_id": 450, "universal_type": "function", "name": "unknown", "text_snippet": "genname_trace(const char* type)"}, {"node_id": 464, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_serialise(const char* type)\n{\n return stringtab_two(type, \"Serialise\");\n}"}, {"node_id": 468, "universal_type": "function", "name": "unknown", "text_snippet": "genname_serialise(const char* type)"}, {"node_id": 482, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_deserialise(const char* type)\n{\n return stringtab_two(type, \"Deserialise\");\n}"}, {"node_id": 486, "universal_type": "function", "name": "unknown", "text_snippet": "genname_deserialise(const char* type)"}, {"node_id": 500, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_dispatch(const char* type)\n{\n return stringtab_two(type, \"Dispatch\");\n}"}, {"node_id": 504, "universal_type": "function", "name": "unknown", "text_snippet": "genname_dispatch(const char* type)"}, {"node_id": 518, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_descriptor(const char* type)\n{\n return stringtab_two(type, \"Desc\");\n}"}, {"node_id": 522, "universal_type": "function", "name": "unknown", "text_snippet": "genname_descriptor(const char* type)"}, {"node_id": 536, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_instance(const char* type)\n{\n return stringtab_two(type, \"Inst\");\n}"}, {"node_id": 540, "universal_type": "function", "name": "unknown", "text_snippet": "genname_instance(const char* type)"}, {"node_id": 554, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_fun(token_id cap, const char* name, ast_t* typeargs)\n{\n // cap_name[_Arg1_Arg2]"}, {"node_id": 558, "universal_type": "function", "name": "unknown", "text_snippet": "genname_fun(token_id cap, const char* name, ast_t* typeargs)"}, {"node_id": 604, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_be(const char* name)\n{\n return stringtab_two(name, \"_send\");\n}"}, {"node_id": 608, "universal_type": "function", "name": "unknown", "text_snippet": "genname_be(const char* name)"}, {"node_id": 622, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_box(const char* name)\n{\n return stringtab_two(name, \"Box\");\n}"}, {"node_id": 626, "universal_type": "function", "name": "unknown", "text_snippet": "genname_box(const char* name)"}, {"node_id": 640, "universal_type": "function", "name": "unknown", "text_snippet": "const char* genname_unbox(const char* name)\n{\n return stringtab_two(name, \"Unbox\");\n}"}, {"node_id": 644, "universal_type": "function", "name": "unknown", "text_snippet": "genname_unbox(const char* name)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"genname.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"../pkg/package.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"../ast/stringtab.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"../ast/lexer.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"../../libponyrt/mem/pool.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 <assert.h>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#include \"genname.h\"\n#include \"../pkg/package.h\"\n#include \"../ast/stringtab.h\"\n#include \"../ast/lexer.h\"\n#include \"../../libponyrt/mem/pool.h\"\n#include <string.h>\n#include <assert.h>\n\nstatic void types_append(printbuf_t* buf, ast_t* elements);\n\nstatic void type_append(printbuf_t* buf, ast_t* type, bool first)\n{\n switch(ast_id(type))\n {\n case TK_UNIONTYPE:\n {\n // 3u_Arg1_Arg2_Arg3\n printbuf(buf, \"%du\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_ISECTTYPE:\n {\n // 3i_Arg1_Arg2_Arg3\n printbuf(buf, \"%di\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_TUPLETYPE:\n {\n // 3t_Arg1_Arg2_Arg3\n printbuf(buf, \"%dt\", ast_childcount(type));\n types_append(buf, type);\n return;\n }\n\n case TK_NOMINAL:\n {\n // pkg_Type[_Arg1_Arg2]_cap\n AST_GET_CHILDREN(type, package, name, typeargs, cap, eph);\n\n ast_t* def = (ast_t*)ast_data(type);\n ast_t* pkg = ast_nearest(def, TK_PACKAGE);\n const char* pkg_name = package_symbol(pkg);\n\n if(pkg_name != NULL)\n printbuf(buf, \"%s_\", pkg_name);\n\n printbuf(buf, \"%s\", ast_name(name));\n types_append(buf, typeargs);\n\n if(!first)\n printbuf(buf, \"_%s\", ast_get_print(cap));\n\n return;\n }\n\n default: {}\n }\n\n assert(0);\n}\n\nstatic void types_append(printbuf_t* buf, ast_t* elements)\n{\n // _Arg1_Arg2\n if(elements == NULL)\n return;\n\n ast_t* elem = ast_child(elements);\n\n while(elem != NULL)\n {\n printbuf(buf, \"_\");\n type_append(buf, elem, false);\n elem = ast_sibling(elem);\n }\n}\n\nstatic const char* stringtab_buf(printbuf_t* buf)\n{\n const char* r = stringtab(buf->m);\n printbuf_free(buf);\n return r;\n}\n\nstatic const char* stringtab_two(const char* a, const char* b)\n{\n if(a == NULL)\n a = \"_\";\n\n assert(b != NULL);\n printbuf_t* buf = printbuf_new();\n printbuf(buf, \"%s_%s\", a, b);\n return stringtab_buf(buf);\n}\n\nconst char* genname_type(ast_t* ast)\n{\n // package_Type[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n type_append(buf, ast, true);\n return stringtab_buf(buf);\n}\n\nconst char* genname_alloc(const char* type)\n{\n return stringtab_two(type, \"Alloc\");\n}\n\nconst char* genname_traitlist(const char* type)\n{\n return stringtab_two(type, \"Traits\");\n}\n\nconst char* genname_fieldlist(const char* type)\n{\n return stringtab_two(type, \"Fields\");\n}\n\nconst char* genname_trace(const char* type)\n{\n return stringtab_two(type, \"Trace\");\n}\n\nconst char* genname_serialise(const char* type)\n{\n return stringtab_two(type, \"Serialise\");\n}\n\nconst char* genname_deserialise(const char* type)\n{\n return stringtab_two(type, \"Deserialise\");\n}\n\nconst char* genname_dispatch(const char* type)\n{\n return stringtab_two(type, \"Dispatch\");\n}\n\nconst char* genname_descriptor(const char* type)\n{\n return stringtab_two(type, \"Desc\");\n}\n\nconst char* genname_instance(const char* type)\n{\n return stringtab_two(type, \"Inst\");\n}\n\nconst char* genname_fun(token_id cap, const char* name, ast_t* typeargs)\n{\n // cap_name[_Arg1_Arg2]\n printbuf_t* buf = printbuf_new();\n printbuf(buf, \"%s_%s\", lexer_print(cap), name);\n types_append(buf, typeargs);\n return stringtab_buf(buf);\n}\n\nconst char* genname_be(const char* name)\n{\n return stringtab_two(name, \"_send\");\n}\n\nconst char* genname_box(const char* name)\n{\n return stringtab_two(name, \"Box\");\n}\n\nconst char* genname_unbox(const char* name)\n{\n return stringtab_two(name, \"Unbox\");\n}\n"}
221
c
void printArray(int a[], int n){ int i; for(i=0;i<n;i++){ printf("%d\t",a[i]); } printf("\n-----------------------------------------------------\n"); }
21.57
7
(translation_unit) "void printArray(int a[], int n){\n int i;\n for(i=0;i<n;i++){\n printf("%d\t",a[i]);\n }\n printf("\n-----------------------------------------------------\n");\n}" (function_definition) "void printArray(int a[], int n){\n int i;\n for(i=0;i<n;i++){\n printf("%d\t",a[i]);\n }\n printf("\n-----------------------------------------------------\n");\n}" (primitive_type) "void" (function_declarator) "printArray(int a[], int n)" (identifier) "printArray" (parameter_list) "(int a[], int n)" (() "(" (parameter_declaration) "int a[]" (primitive_type) "int" (array_declarator) "a[]" (identifier) "a" ([) "[" (]) "]" (,) "," (parameter_declaration) "int n" (primitive_type) "int" (identifier) "n" ()) ")" (compound_statement) "{\n int i;\n for(i=0;i<n;i++){\n printf("%d\t",a[i]);\n }\n printf("\n-----------------------------------------------------\n");\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for(i=0;i<n;i++){\n printf("%d\t",a[i]);\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 printf("%d\t",a[i]);\n }" ({) "{" (expression_statement) "printf("%d\t",a[i]);" (call_expression) "printf("%d\t",a[i])" (identifier) "printf" (argument_list) "("%d\t",a[i])" (() "(" (string_literal) ""%d\t"" (") """ (string_content) "%d" (escape_sequence) "\t" (") """ (,) "," (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n-----------------------------------------------------\n");" (call_expression) "printf("\n-----------------------------------------------------\n")" (identifier) "printf" (argument_list) "("\n-----------------------------------------------------\n")" (() "(" (string_literal) ""\n-----------------------------------------------------\n"" (") """ (escape_sequence) "\n" (string_content) "-----------------------------------------------------" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
76
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 21.57, "nodes": 41, "errors": 0, "source_hash": "b1df63b912d9b1c1525bff1c56839be7d58037f4e13d7344806012df32f082bc", "categorized_nodes": 27}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "void printArray(int a[], int n){\n\tint i;\n\tfor(i=0;i<n;i++){\n\t\tprintf(\"%d\\t\",a[i]);\n\t}\n\tprintf(\"\\n-----------------------------------------------------\\n\");\n}", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 1, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 4}}, {"id": 2, "type": "function_declarator", "text": "printArray(int a[], int n)", "parent": 0, "children": [3, 4], "start_point": {"row": 0, "column": 5}, "end_point": {"row": 0, "column": 31}}, {"id": 3, "type": "identifier", "text": "printArray", "parent": 2, "children": [], "start_point": {"row": 0, "column": 5}, "end_point": {"row": 0, "column": 15}}, {"id": 4, "type": "parameter_list", "text": "(int a[], int n)", "parent": 2, "children": [5, 9], "start_point": {"row": 0, "column": 15}, "end_point": {"row": 0, "column": 31}}, {"id": 5, "type": "parameter_declaration", "text": "int a[]", "parent": 4, "children": [6, 7], "start_point": {"row": 0, "column": 16}, "end_point": {"row": 0, "column": 23}}, {"id": 6, "type": "primitive_type", "text": "int", "parent": 5, "children": [], "start_point": {"row": 0, "column": 16}, "end_point": {"row": 0, "column": 19}}, {"id": 7, "type": "array_declarator", "text": "a[]", "parent": 5, "children": [8], "start_point": {"row": 0, "column": 20}, "end_point": {"row": 0, "column": 23}}, {"id": 8, "type": "identifier", "text": "a", "parent": 7, "children": [], "start_point": {"row": 0, "column": 20}, "end_point": {"row": 0, "column": 21}}, {"id": 9, "type": "parameter_declaration", "text": "int n", "parent": 4, "children": [10, 11], "start_point": {"row": 0, "column": 25}, "end_point": {"row": 0, "column": 30}}, {"id": 10, "type": "primitive_type", "text": "int", "parent": 9, "children": [], "start_point": {"row": 0, "column": 25}, "end_point": {"row": 0, "column": 28}}, {"id": 11, "type": "identifier", "text": "n", "parent": 9, "children": [], "start_point": {"row": 0, "column": 29}, "end_point": {"row": 0, "column": 30}}, {"id": 12, "type": "declaration", "text": "int i;", "parent": 0, "children": [13, 14], "start_point": {"row": 1, "column": 1}, "end_point": {"row": 1, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 1, "column": 1}, "end_point": {"row": 1, "column": 4}}, {"id": 14, "type": "identifier", "text": "i", "parent": 12, "children": [], "start_point": {"row": 1, "column": 5}, "end_point": {"row": 1, "column": 6}}, {"id": 15, "type": "for_statement", "text": "for(i=0;i<n;i++){\n\t\tprintf(\"%d\\t\",a[i]);\n\t}", "parent": 0, "children": [16, 20, 24], "start_point": {"row": 2, "column": 1}, "end_point": {"row": 4, "column": 2}}, {"id": 16, "type": "assignment_expression", "text": "i=0", "parent": 15, "children": [17, 18, 19], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 8}}, {"id": 17, "type": "identifier", "text": "i", "parent": 16, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 6}}, {"id": 18, "type": "=", "text": "=", "parent": 16, "children": [], "start_point": {"row": 2, "column": 6}, "end_point": {"row": 2, "column": 7}}, {"id": 19, "type": "number_literal", "text": "0", "parent": 16, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 8}}, {"id": 20, "type": "binary_expression", "text": "i<n", "parent": 15, "children": [21, 22, 23], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 12}}, {"id": 21, "type": "identifier", "text": "i", "parent": 20, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 10}}, {"id": 22, "type": "<", "text": "<", "parent": 20, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 11}}, {"id": 23, "type": "identifier", "text": "n", "parent": 20, "children": [], "start_point": {"row": 2, "column": 11}, "end_point": {"row": 2, "column": 12}}, {"id": 24, "type": "update_expression", "text": "i++", "parent": 15, "children": [25, 26], "start_point": {"row": 2, "column": 13}, "end_point": {"row": 2, "column": 16}}, {"id": 25, "type": "identifier", "text": "i", "parent": 24, "children": [], "start_point": {"row": 2, "column": 13}, "end_point": {"row": 2, "column": 14}}, {"id": 26, "type": "++", "text": "++", "parent": 24, "children": [], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 16}}, {"id": 27, "type": "call_expression", "text": "printf(\"%d\\t\",a[i])", "parent": 15, "children": [28, 29], "start_point": {"row": 3, "column": 2}, "end_point": {"row": 3, "column": 21}}, {"id": 28, "type": "identifier", "text": "printf", "parent": 27, "children": [], "start_point": {"row": 3, "column": 2}, "end_point": {"row": 3, "column": 8}}, {"id": 29, "type": "argument_list", "text": "(\"%d\\t\",a[i])", "parent": 27, "children": [30, 32], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 21}}, {"id": 30, "type": "string_literal", "text": "\"%d\\t\"", "parent": 29, "children": [31], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 15}}, {"id": 31, "type": "escape_sequence", "text": "\\t", "parent": 30, "children": [], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 14}}, {"id": 32, "type": "subscript_expression", "text": "a[i]", "parent": 29, "children": [33, 34], "start_point": {"row": 3, "column": 16}, "end_point": {"row": 3, "column": 20}}, {"id": 33, "type": "identifier", "text": "a", "parent": 32, "children": [], "start_point": {"row": 3, "column": 16}, "end_point": {"row": 3, "column": 17}}, {"id": 34, "type": "identifier", "text": "i", "parent": 32, "children": [], "start_point": {"row": 3, "column": 18}, "end_point": {"row": 3, "column": 19}}, {"id": 35, "type": "call_expression", "text": "printf(\"\\n-----------------------------------------------------\\n\")", "parent": 0, "children": [36, 37], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 68}}, {"id": 36, "type": "identifier", "text": "printf", "parent": 35, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 7}}, {"id": 37, "type": "argument_list", "text": "(\"\\n-----------------------------------------------------\\n\")", "parent": 35, "children": [38], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 68}}, {"id": 38, "type": "string_literal", "text": "\"\\n-----------------------------------------------------\\n\"", "parent": 37, "children": [39, 40], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 67}}, {"id": 39, "type": "escape_sequence", "text": "\\n", "parent": 38, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 11}}, {"id": 40, "type": "escape_sequence", "text": "\\n", "parent": 38, "children": [], "start_point": {"row": 5, "column": 64}, "end_point": {"row": 5, "column": 66}}]}, "node_categories": {"declarations": {"functions": [0, 2], "variables": [5, 9, 12], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [20, 24, 27, 32, 35], "assignments": [16], "loops": [15], "conditionals": [3, 8, 11, 14, 17, 21, 23, 25, 28, 33, 34, 36], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [19, 30, 38], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "printArray", "text_snippet": "void printArray(int a[], int n){\n\tint i;\n\tfor(i=0;i<n;i++){\n\t\tprintf(\"%d\\t\",a[i]);\n\t}\n\tprintf(\"\\n---"}, {"node_id": 2, "universal_type": "function", "name": "n)", "text_snippet": "printArray(int a[], int n)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "void printArray(int a[], int n){\n\tint i;\n\tfor(i=0;i<n;i++){\n\t\tprintf(\"%d\\t\",a[i]);\n\t}\n\tprintf(\"\\n-----------------------------------------------------\\n\");\n}"}
222
c
// // ViewController.h // FIDLazyGet // // Created by Fidetro on 2017/4/19. // Copyright © 2017年 Fidetro. All rights reserved. // #import <Cocoa/Cocoa.h> @interface ViewController : NSViewController @end
18
11
(translation_unit) "//\n// ViewController.h\n// FIDLazyGet\n//\n// Created by Fidetro on 2017/4/19.\n// Copyright © 2017年 Fidetro. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n@interface ViewController : NSViewController\n\n\n@end\n\n" (comment) "//" (comment) "// ViewController.h" (comment) "// FIDLazyGet" (comment) "//" (comment) "// Created by Fidetro on 2017/4/19." (comment) "// Copyright © 2017年 Fidetro. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <Cocoa/Cocoa.h>\n\n@i" (preproc_directive) "port <C" (preproc_arg) "coa/Cocoa.h>\n\n@" (ERROR) "t" (ERROR) "t" (declaration) "erface ViewController : NSViewController\n\n\n@end\n\n" (type_identifier) "erface Vi" (ERROR) "wController : NSViewController\n\n\n@end" (identifier) "wController : " (:) "S" (identifier) "iewController\n\n\n" (ERROR) "d" (identifier) "\n\n" (;) ""
22
4
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 18.0, "nodes": 12, "errors": 0, "source_hash": "2f5f976e234d10c91cc28aaabd7dbf6a875b9d6c028ac9284170984545dd631b", "categorized_nodes": 6}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <Cocoa/Cocoa.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 <C", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "coa/Cocoa.h>\n\n@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "t", "parent": null, "children": [4], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "ERROR", "text": "t", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "declaration", "text": "erface ViewController : NSViewController\n\n\n@end\n\n", "parent": null, "children": [6, 7, 11], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 13, "column": 4}}, {"id": 6, "type": "type_identifier", "text": "erface Vi", "parent": 5, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "ERROR", "text": "wController : NSViewController\n\n\n@end", "parent": 5, "children": [8, 9, 10], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 13, "column": 1}}, {"id": 8, "type": "identifier", "text": "wController : ", "parent": 7, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 25}}, {"id": 9, "type": "identifier", "text": "iewController\n\n\n", "parent": 7, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 44}}, {"id": 10, "type": "ERROR", "text": "d", "parent": 7, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 11, "type": "identifier", "text": "\n\n", "parent": 5, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [6, 8, 9, 11], "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// ViewController.h\n// FIDLazyGet\n//\n// Created by Fidetro on 2017/4/19.\n// Copyright \u00a9 2017\u5e74 Fidetro. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n@interface ViewController : NSViewController\n\n\n@end\n\n"}
223
c
/* Test for some basic aspects of -traditional directive processing. */ /* { dg-do preprocess } */ #define HASH # HASH /* There is a #error directive. */ #error bad /* { dg-error "bad" } */ /* Directives with their #s indented are not recognized. */ #if 0 /* { dg-bogus "unterminated" } */ #wrong /* { dg-error "invalid" } */ #define foo 2 #define bar + 3 #define foobar 6 #if foo/**/bar != 5 # error Comments in directive is a separator /* { dg-bogus "error" } */ #endif
30.73
15
(translation_unit) "/* Test for some basic aspects of -traditional directive processing. */\n\n/* { dg-do preprocess } */\n\n#define HASH #\nHASH\n\n/* There is a #error directive. */\n\n#error bad /* { dg-error "bad" } */\n\n/* Directives with their #s indented are not recognized. */\n #if 0 /* { dg-bogus "unterminated" } */\n\n#wrong /* { dg-error "invalid" } */\n\n#define foo 2\n#define bar + 3\n#define foobar 6\n\n#if foo/**/bar != 5\n# error Comments in directive is a separator /* { dg-bogus "error" } */\n#endif\n" (comment) "/* Test for some basic aspects of -traditional directive processing. */" (comment) "/* { dg-do preprocess } */" (preproc_def) "#define HASH #\n" (#define) "#define" (identifier) "HASH" (preproc_arg) "#" (expression_statement) "HASH\n\n/* There is a #error directive. */" (identifier) "HASH" (comment) "/* There is a #error directive. */" (;) "" (preproc_call) "#error bad /* { dg-error "bad" } */\n" (preproc_directive) "#error" (preproc_arg) "bad " (comment) "/* { dg-error "bad" } */" (comment) "/* Directives with their #s indented are not recognized. */" (preproc_if) "#if 0 /* { dg-bogus "unterminated" } */\n\n#wrong /* { dg-error "invalid" } */\n\n#define foo 2\n#define bar + 3\n#define foobar 6\n\n#if foo/**/bar != 5\n# error Comments in directive is a separator /* { dg-bogus "error" } */\n#endif" (#if) "#if" (number_literal) "0" (comment) "/* { dg-bogus "unterminated" } */" ( ) "\n\n" (preproc_call) "#wrong /* { dg-error "invalid" } */\n" (preproc_directive) "#wrong" (comment) "/* { dg-error "invalid" } */" (preproc_def) "#define foo 2\n" (#define) "#define" (identifier) "foo" (preproc_arg) "2" (preproc_def) "#define bar + 3\n" (#define) "#define" (identifier) "bar" (preproc_arg) "+ 3" (preproc_def) "#define foobar 6\n" (#define) "#define" (identifier) "foobar" (preproc_arg) "6" (preproc_if) "#if foo/**/bar != 5\n# error Comments in directive is a separator /* { dg-bogus "error" } */\n#endif" (#if) "#if" (ERROR) "foo" (identifier) "foo" (comment) "/**/" (binary_expression) "bar != 5" (identifier) "bar" (!=) "!=" (number_literal) "5" ( ) "\n" (preproc_call) "# error Comments in directive is a separator /* { dg-bogus "error" } */\n" (preproc_directive) "# error" (preproc_arg) "Comments in directive is a separator " (comment) "/* { dg-bogus "error" } */" (#endif) "#endif" (#endif) ""
52
1
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 30.73, "nodes": 40, "errors": 0, "source_hash": "2226548e75e295c78365530dff74046b96e0eb4d05377910e5176f8f1d01331a", "categorized_nodes": 19}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define HASH #\n", "parent": null, "children": [1, 2, 3], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "HASH", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 12}}, {"id": 3, "type": "preproc_arg", "text": "#", "parent": 0, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 14}}, {"id": 4, "type": "identifier", "text": "HASH", "parent": null, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 4}}, {"id": 5, "type": "preproc_call", "text": "#error bad\t/* { dg-error \"bad\" } */\n", "parent": null, "children": [6, 7], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 6, "type": "preproc_directive", "text": "#error", "parent": 5, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 7, "type": "preproc_arg", "text": "bad\t", "parent": 5, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 11}}, {"id": 8, "type": "preproc_if", "text": "#if 0\t/* { dg-bogus \"unterminated\" } */\n\n#wrong\t/* { dg-error \"invalid\" } */\n\n#define foo 2\n#define bar + 3\n#define foobar 6\n\n#if foo/**/bar != 5\n# error Comments in directive is a separator /* { dg-bogus \"error\" } */\n#endif", "parent": null, "children": [9, 10, 11, 12, 14, 18, 22, 26, 39], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 22, "column": 6}}, {"id": 9, "type": "#if", "text": "#if", "parent": 8, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 4}}, {"id": 10, "type": "number_literal", "text": "0", "parent": 8, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 6}}, {"id": 11, "type": "\n", "text": "\n\n", "parent": 8, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 14, "column": 0}}, {"id": 12, "type": "preproc_call", "text": "#wrong\t/* { dg-error \"invalid\" } */\n", "parent": 8, "children": [13], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "preproc_directive", "text": "#wrong", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 14, "type": "preproc_def", "text": "#define foo 2\n", "parent": 8, "children": [15, 16, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 15, "type": "#define", "text": "#define", "parent": 14, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 16, "type": "identifier", "text": "foo", "parent": 14, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 11}}, {"id": 17, "type": "preproc_arg", "text": "2", "parent": 14, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 18, "type": "preproc_def", "text": "#define bar + 3\n", "parent": 8, "children": [19, 20, 21], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 20, "type": "identifier", "text": "bar", "parent": 18, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 11}}, {"id": 21, "type": "preproc_arg", "text": "+ 3", "parent": 18, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 15}}, {"id": 22, "type": "preproc_def", "text": "#define foobar 6\n", "parent": 8, "children": [23, 24, 25], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 24, "type": "identifier", "text": "foobar", "parent": 22, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 14}}, {"id": 25, "type": "preproc_arg", "text": "6", "parent": 22, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 16}}, {"id": 26, "type": "preproc_if", "text": "#if foo/**/bar != 5\n# error Comments in directive is a separator /* { dg-bogus \"error\" } */\n#endif", "parent": 8, "children": [27, 28, 30, 34, 35, 38], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 27, "type": "#if", "text": "#if", "parent": 26, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 3}}, {"id": 28, "type": "ERROR", "text": "foo", "parent": 26, "children": [29], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 29, "type": "identifier", "text": "foo", "parent": 28, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 30, "type": "binary_expression", "text": "bar != 5", "parent": 26, "children": [31, 32, 33], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 19}}, {"id": 31, "type": "identifier", "text": "bar", "parent": 30, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 14}}, {"id": 32, "type": "!=", "text": "!=", "parent": 30, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 17}}, {"id": 33, "type": "number_literal", "text": "5", "parent": 30, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 19}}, {"id": 34, "type": "\n", "text": "\n", "parent": 26, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 21, "column": 0}}, {"id": 35, "type": "preproc_call", "text": "# error Comments in directive is a separator /* { dg-bogus \"error\" } */\n", "parent": 26, "children": [36, 37], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 36, "type": "preproc_directive", "text": "# error", "parent": 35, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 37, "type": "preproc_arg", "text": "Comments in directive is a separator ", "parent": 35, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 45}}, {"id": 38, "type": "#endif", "text": "#endif", "parent": 26, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 39, "type": "#endif", "text": "", "parent": 8, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [30], "assignments": [], "loops": [], "conditionals": [2, 4, 8, 9, 16, 20, 24, 26, 27, 29, 31, 38, 39], "returns": [], "exceptions": []}, "expressions": {"calls": [5, 12, 35], "literals": [10, 33], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "/* Test for some basic aspects of -traditional directive processing. */\n\n/* { dg-do preprocess } */\n\n#define HASH #\nHASH\n\n/* There is a #error directive. */\n\n#error bad\t/* { dg-error \"bad\" } */\n\n/* Directives with their #s indented are not recognized. */\n #if 0\t/* { dg-bogus \"unterminated\" } */\n\n#wrong\t/* { dg-error \"invalid\" } */\n\n#define foo 2\n#define bar + 3\n#define foobar 6\n\n#if foo/**/bar != 5\n# error Comments in directive is a separator /* { dg-bogus \"error\" } */\n#endif\n"}
224
c
#ifndef LOG4CPLUS_CONFIG_DEFINES_HXX #define LOG4CPLUS_CONFIG_DEFINES_HXX /* */ #ifdef HAVE_SYSLOG_H #define LOG4CPLUS_HAVE_SYSLOG_H #endif /* */ #ifdef HAVE_NETINET_IN_H #define LOG4CPLUS_HAVE_NETINET_IN_H #endif /* */ #ifdef HAVE_SYS_TYPES_H #define LOG4CPLUS_HAVE_SYS_TYPES_H #endif /* */ #ifdef HAVE_SYS_SOCKET_H #define LOG4CPLUS_HAVE_SYS_SOCKET_H #endif /* */ #ifdef HAVE_NETDB_H #define LOG4CPLUS_HAVE_NETDB_H #endif /* */ #ifdef HAVE_UNISTD_H #define LOG4CPLUS_HAVE_UNISTD_H #endif /* */ #ifdef HAVE_FTIME #define LOG4CPLUS_HAVE_FTIME #endif /* */ #ifdef HAVE_GETADDRINFO #define LOG4CPLUS_HAVE_GETADDRINFO #endif /* */ // This is from dcuid.cc #if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT) #define LOG4CPLUS_HAVE_GETHOSTBYNAME_R #endif /* */ #ifdef HAVE_GETPID #define LOG4CPLUS_HAVE_GETPID #endif /* */ #ifdef HAVE_PROTOTYPE_GETTIMEOFDAY #define LOG4CPLUS_HAVE_GETTIMEOFDAY #endif /* */ #ifdef HAVE_GMTIME_R #define LOG4CPLUS_HAVE_GMTIME_R #endif /* */ #ifdef HAVE_HTONL #define LOG4CPLUS_HAVE_HTONL #endif /* */ #ifdef HAVE_HTONS #define LOG4CPLUS_HAVE_HTONS #endif /* */ #ifdef HAVE_LOCALTIME_R #define LOG4CPLUS_HAVE_LOCALTIME_R #endif /* */ #ifdef HAVE_LSTAT #define LOG4CPLUS_HAVE_LSTAT #endif /* */ #ifdef HAVE_NTOHL #define LOG4CPLUS_HAVE_NTOHL #endif /* */ #ifdef HAVE_NTOHS #define LOG4CPLUS_HAVE_NTOHS #endif /* */ #ifdef HAVE_STAT #define LOG4CPLUS_HAVE_STAT #endif /* */ #ifdef WITH_THREADS #define LOG4CPLUS_USE_PTHREADS #else /* Define if this is a single-threaded library. */ #define LOG4CPLUS_SINGLE_THREADED #endif /* Define for compilers/standard libraries that support more than just the "C" locale. */ #undef LOG4CPLUS_WORKING_LOCALE /* Define to int if undefined. */ #if 0 /* This block is handled by configure completely */ #undef socklen_t #ifndef HAVE_DECLARATION_SOCKLEN_T #define socklen_t int #endif #endif /* Defined for --enable-debugging builds. */ #ifdef DEBUG #define LOG4CPLUS_DEBUGGING #endif /* These two are not needed since we build static libraries */ /* Defined if the compiler understands __declspec(export) or __attribute__((export)) construct. */ #define LOG4CPLUS_DECLSPEC_EXPORT /* Defined if the compiler understands __declspec(import) or __attribute__((import)) construct. */ #define LOG4CPLUS_DECLSPEC_IMPORT /* Defined if the host OS provides ENAMETOOLONG errno value. */ #ifdef HAVE_ENAMETOOLONG #define LOG4CPLUS_HAVE_ENAMETOOLONG #endif #endif // LOG4CPLUS_CONFIG_DEFINES_HXX
21.32
111
(translation_unit) "#ifndef LOG4CPLUS_CONFIG_DEFINES_HXX\n#define LOG4CPLUS_CONFIG_DEFINES_HXX\n\n/* */\n#ifdef HAVE_SYSLOG_H\n#define LOG4CPLUS_HAVE_SYSLOG_H\n#endif\n\n/* */\n#ifdef HAVE_NETINET_IN_H\n#define LOG4CPLUS_HAVE_NETINET_IN_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_TYPES_H\n#define LOG4CPLUS_HAVE_SYS_TYPES_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_SOCKET_H\n#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n#endif\n\n/* */\n#ifdef HAVE_NETDB_H\n#define LOG4CPLUS_HAVE_NETDB_H\n#endif\n\n/* */\n#ifdef HAVE_UNISTD_H\n#define LOG4CPLUS_HAVE_UNISTD_H\n#endif\n\n/* */\n#ifdef HAVE_FTIME\n#define LOG4CPLUS_HAVE_FTIME\n#endif\n\n/* */\n#ifdef HAVE_GETADDRINFO\n#define LOG4CPLUS_HAVE_GETADDRINFO\n#endif\n\n/* */\n// This is from dcuid.cc\n#if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)\n#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n#endif\n\n/* */\n#ifdef HAVE_GETPID\n#define LOG4CPLUS_HAVE_GETPID\n#endif\n\n/* */\n#ifdef HAVE_PROTOTYPE_GETTIMEOFDAY\n#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n#endif\n\n/* */\n#ifdef HAVE_GMTIME_R\n#define LOG4CPLUS_HAVE_GMTIME_R\n#endif\n\n/* */\n#ifdef HAVE_HTONL\n#define LOG4CPLUS_HAVE_HTONL\n#endif\n\n/* */\n#ifdef HAVE_HTONS\n#define LOG4CPLUS_HAVE_HTONS\n#endif\n\n/* */\n#ifdef HAVE_LOCALTIME_R\n#define LOG4CPLUS_HAVE_LOCALTIME_R\n#endif\n\n/* */\n#ifdef HAVE_LSTAT\n#define LOG4CPLUS_HAVE_LSTAT\n#endif\n\n/* */\n#ifdef HAVE_NTOHL\n#define LOG4CPLUS_HAVE_NTOHL\n#endif\n\n/* */\n#ifdef HAVE_NTOHS\n#define LOG4CPLUS_HAVE_NTOHS\n#endif\n\n/* */\n#ifdef HAVE_STAT\n#define LOG4CPLUS_HAVE_STAT\n#endif\n\n/* */\n#ifdef WITH_THREADS\n#define LOG4CPLUS_USE_PTHREADS\n#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n#endif\n\n/* Define for compilers/standard libraries that support more than just the "C"\n locale. */\n#undef LOG4CPLUS_WORKING_LOCALE\n\n/* Define to int if undefined. */\n#if 0\n/* This block is handled by configure completely */\n#undef socklen_t\n#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif\n#endif\n\n/* Defined for --enable-debugging builds. */\n#ifdef DEBUG\n#define LOG4CPLUS_DEBUGGING\n#endif\n\n/* These two are not needed since we build static libraries */\n/* Defined if the compiler understands __declspec(export) or __attribute__((export)) construct. */\n#define LOG4CPLUS_DECLSPEC_EXPORT\n/* Defined if the compiler understands __declspec(import) or __attribute__((import)) construct. */\n#define LOG4CPLUS_DECLSPEC_IMPORT\n\n/* Defined if the host OS provides ENAMETOOLONG errno value. */\n#ifdef HAVE_ENAMETOOLONG\n#define LOG4CPLUS_HAVE_ENAMETOOLONG\n#endif\n\n#endif // LOG4CPLUS_CONFIG_DEFINES_HXX\n" (preproc_ifdef) "#ifndef LOG4CPLUS_CONFIG_DEFINES_HXX\n#define LOG4CPLUS_CONFIG_DEFINES_HXX\n\n/* */\n#ifdef HAVE_SYSLOG_H\n#define LOG4CPLUS_HAVE_SYSLOG_H\n#endif\n\n/* */\n#ifdef HAVE_NETINET_IN_H\n#define LOG4CPLUS_HAVE_NETINET_IN_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_TYPES_H\n#define LOG4CPLUS_HAVE_SYS_TYPES_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_SOCKET_H\n#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n#endif\n\n/* */\n#ifdef HAVE_NETDB_H\n#define LOG4CPLUS_HAVE_NETDB_H\n#endif\n\n/* */\n#ifdef HAVE_UNISTD_H\n#define LOG4CPLUS_HAVE_UNISTD_H\n#endif\n\n/* */\n#ifdef HAVE_FTIME\n#define LOG4CPLUS_HAVE_FTIME\n#endif\n\n/* */\n#ifdef HAVE_GETADDRINFO\n#define LOG4CPLUS_HAVE_GETADDRINFO\n#endif\n\n/* */\n// This is from dcuid.cc\n#if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)\n#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n#endif\n\n/* */\n#ifdef HAVE_GETPID\n#define LOG4CPLUS_HAVE_GETPID\n#endif\n\n/* */\n#ifdef HAVE_PROTOTYPE_GETTIMEOFDAY\n#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n#endif\n\n/* */\n#ifdef HAVE_GMTIME_R\n#define LOG4CPLUS_HAVE_GMTIME_R\n#endif\n\n/* */\n#ifdef HAVE_HTONL\n#define LOG4CPLUS_HAVE_HTONL\n#endif\n\n/* */\n#ifdef HAVE_HTONS\n#define LOG4CPLUS_HAVE_HTONS\n#endif\n\n/* */\n#ifdef HAVE_LOCALTIME_R\n#define LOG4CPLUS_HAVE_LOCALTIME_R\n#endif\n\n/* */\n#ifdef HAVE_LSTAT\n#define LOG4CPLUS_HAVE_LSTAT\n#endif\n\n/* */\n#ifdef HAVE_NTOHL\n#define LOG4CPLUS_HAVE_NTOHL\n#endif\n\n/* */\n#ifdef HAVE_NTOHS\n#define LOG4CPLUS_HAVE_NTOHS\n#endif\n\n/* */\n#ifdef HAVE_STAT\n#define LOG4CPLUS_HAVE_STAT\n#endif\n\n/* */\n#ifdef WITH_THREADS\n#define LOG4CPLUS_USE_PTHREADS\n#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n#endif\n\n/* Define for compilers/standard libraries that support more than just the "C"\n locale. */\n#undef LOG4CPLUS_WORKING_LOCALE\n\n/* Define to int if undefined. */\n#if 0\n/* This block is handled by configure completely */\n#undef socklen_t\n#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif\n#endif\n\n/* Defined for --enable-debugging builds. */\n#ifdef DEBUG\n#define LOG4CPLUS_DEBUGGING\n#endif\n\n/* These two are not needed since we build static libraries */\n/* Defined if the compiler understands __declspec(export) or __attribute__((export)) construct. */\n#define LOG4CPLUS_DECLSPEC_EXPORT\n/* Defined if the compiler understands __declspec(import) or __attribute__((import)) construct. */\n#define LOG4CPLUS_DECLSPEC_IMPORT\n\n/* Defined if the host OS provides ENAMETOOLONG errno value. */\n#ifdef HAVE_ENAMETOOLONG\n#define LOG4CPLUS_HAVE_ENAMETOOLONG\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "LOG4CPLUS_CONFIG_DEFINES_HXX" (preproc_def) "#define LOG4CPLUS_CONFIG_DEFINES_HXX\n" (#define) "#define" (identifier) "LOG4CPLUS_CONFIG_DEFINES_HXX" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_SYSLOG_H\n#define LOG4CPLUS_HAVE_SYSLOG_H\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_SYSLOG_H" (preproc_def) "#define LOG4CPLUS_HAVE_SYSLOG_H\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_SYSLOG_H" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_NETINET_IN_H\n#define LOG4CPLUS_HAVE_NETINET_IN_H\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_NETINET_IN_H" (preproc_def) "#define LOG4CPLUS_HAVE_NETINET_IN_H\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_NETINET_IN_H" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_SYS_TYPES_H\n#define LOG4CPLUS_HAVE_SYS_TYPES_H\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_SYS_TYPES_H" (preproc_def) "#define LOG4CPLUS_HAVE_SYS_TYPES_H\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_SYS_TYPES_H" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_SYS_SOCKET_H\n#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_SYS_SOCKET_H" (preproc_def) "#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_SYS_SOCKET_H" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_NETDB_H\n#define LOG4CPLUS_HAVE_NETDB_H\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_NETDB_H" (preproc_def) "#define LOG4CPLUS_HAVE_NETDB_H\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_NETDB_H" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_UNISTD_H\n#define LOG4CPLUS_HAVE_UNISTD_H\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_UNISTD_H" (preproc_def) "#define LOG4CPLUS_HAVE_UNISTD_H\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_UNISTD_H" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_FTIME\n#define LOG4CPLUS_HAVE_FTIME\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_FTIME" (preproc_def) "#define LOG4CPLUS_HAVE_FTIME\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_FTIME" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_GETADDRINFO\n#define LOG4CPLUS_HAVE_GETADDRINFO\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_GETADDRINFO" (preproc_def) "#define LOG4CPLUS_HAVE_GETADDRINFO\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_GETADDRINFO" (#endif) "#endif" (comment) "/* */" (comment) "// This is from dcuid.cc" (preproc_if) "#if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)\n#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n#endif" (#if) "#if" (binary_expression) "defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)" (binary_expression) "defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME)" (preproc_defined) "defined(HAVE_GETHOSTNAME)" (defined) "defined" (() "(" (identifier) "HAVE_GETHOSTNAME" ()) ")" (&&) "&&" (preproc_defined) "defined(HAVE_GETHOSTBYNAME)" (defined) "defined" (() "(" (identifier) "HAVE_GETHOSTBYNAME" ()) ")" (&&) "&&" (preproc_defined) "defined(_REENTRANT)" (defined) "defined" (() "(" (identifier) "_REENTRANT" ()) ")" ( ) "\n" (preproc_def) "#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_GETHOSTBYNAME_R" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_GETPID\n#define LOG4CPLUS_HAVE_GETPID\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_GETPID" (preproc_def) "#define LOG4CPLUS_HAVE_GETPID\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_GETPID" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_PROTOTYPE_GETTIMEOFDAY\n#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_PROTOTYPE_GETTIMEOFDAY" (preproc_def) "#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_GETTIMEOFDAY" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_GMTIME_R\n#define LOG4CPLUS_HAVE_GMTIME_R\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_GMTIME_R" (preproc_def) "#define LOG4CPLUS_HAVE_GMTIME_R\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_GMTIME_R" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_HTONL\n#define LOG4CPLUS_HAVE_HTONL\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_HTONL" (preproc_def) "#define LOG4CPLUS_HAVE_HTONL\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_HTONL" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_HTONS\n#define LOG4CPLUS_HAVE_HTONS\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_HTONS" (preproc_def) "#define LOG4CPLUS_HAVE_HTONS\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_HTONS" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_LOCALTIME_R\n#define LOG4CPLUS_HAVE_LOCALTIME_R\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_LOCALTIME_R" (preproc_def) "#define LOG4CPLUS_HAVE_LOCALTIME_R\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_LOCALTIME_R" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_LSTAT\n#define LOG4CPLUS_HAVE_LSTAT\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_LSTAT" (preproc_def) "#define LOG4CPLUS_HAVE_LSTAT\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_LSTAT" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_NTOHL\n#define LOG4CPLUS_HAVE_NTOHL\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_NTOHL" (preproc_def) "#define LOG4CPLUS_HAVE_NTOHL\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_NTOHL" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_NTOHS\n#define LOG4CPLUS_HAVE_NTOHS\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_NTOHS" (preproc_def) "#define LOG4CPLUS_HAVE_NTOHS\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_NTOHS" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef HAVE_STAT\n#define LOG4CPLUS_HAVE_STAT\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_STAT" (preproc_def) "#define LOG4CPLUS_HAVE_STAT\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_STAT" (#endif) "#endif" (comment) "/* */" (preproc_ifdef) "#ifdef WITH_THREADS\n#define LOG4CPLUS_USE_PTHREADS\n#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n#endif" (#ifdef) "#ifdef" (identifier) "WITH_THREADS" (preproc_def) "#define LOG4CPLUS_USE_PTHREADS\n" (#define) "#define" (identifier) "LOG4CPLUS_USE_PTHREADS" (preproc_else) "#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n" (#else) "#else" (comment) "/* Define if this is a single-threaded library. */" (preproc_def) "#define LOG4CPLUS_SINGLE_THREADED\n" (#define) "#define" (identifier) "LOG4CPLUS_SINGLE_THREADED" (#endif) "#endif" (comment) "/* Define for compilers/standard libraries that support more than just the "C"\n locale. */" (preproc_call) "#undef LOG4CPLUS_WORKING_LOCALE\n" (preproc_directive) "#undef" (preproc_arg) "LOG4CPLUS_WORKING_LOCALE" (comment) "/* Define to int if undefined. */" (preproc_if) "#if 0\n/* This block is handled by configure completely */\n#undef socklen_t\n#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif\n#endif" (#if) "#if" (number_literal) "0" ( ) "\n" (comment) "/* This block is handled by configure completely */" (preproc_call) "#undef socklen_t\n" (preproc_directive) "#undef" (preproc_arg) "socklen_t" (preproc_ifdef) "#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif" (#ifndef) "#ifndef" (identifier) "HAVE_DECLARATION_SOCKLEN_T" (preproc_def) "#define socklen_t int\n" (#define) "#define" (identifier) "socklen_t" (preproc_arg) "int" (#endif) "#endif" (#endif) "#endif" (comment) "/* Defined for --enable-debugging builds. */" (preproc_ifdef) "#ifdef DEBUG\n#define LOG4CPLUS_DEBUGGING\n#endif" (#ifdef) "#ifdef" (identifier) "DEBUG" (preproc_def) "#define LOG4CPLUS_DEBUGGING\n" (#define) "#define" (identifier) "LOG4CPLUS_DEBUGGING" (#endif) "#endif" (comment) "/* These two are not needed since we build static libraries */" (comment) "/* Defined if the compiler understands __declspec(export) or __attribute__((export)) construct. */" (preproc_def) "#define LOG4CPLUS_DECLSPEC_EXPORT\n" (#define) "#define" (identifier) "LOG4CPLUS_DECLSPEC_EXPORT" (comment) "/* Defined if the compiler understands __declspec(import) or __attribute__((import)) construct. */" (preproc_def) "#define LOG4CPLUS_DECLSPEC_IMPORT\n" (#define) "#define" (identifier) "LOG4CPLUS_DECLSPEC_IMPORT" (comment) "/* Defined if the host OS provides ENAMETOOLONG errno value. */" (preproc_ifdef) "#ifdef HAVE_ENAMETOOLONG\n#define LOG4CPLUS_HAVE_ENAMETOOLONG\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_ENAMETOOLONG" (preproc_def) "#define LOG4CPLUS_HAVE_ENAMETOOLONG\n" (#define) "#define" (identifier) "LOG4CPLUS_HAVE_ENAMETOOLONG" (#endif) "#endif" (#endif) "#endif" (comment) "// LOG4CPLUS_CONFIG_DEFINES_HXX"
242
0
{"language": "c", "success": true, "metadata": {"lines": 111, "avg_line_length": 21.32, "nodes": 204, "errors": 0, "source_hash": "e8cf54dd13f226a4be1f150e2018399eedfca8ac99d0c0b2eda84aae94658a71", "categorized_nodes": 133}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef LOG4CPLUS_CONFIG_DEFINES_HXX\n#define LOG4CPLUS_CONFIG_DEFINES_HXX\n\n/* */\n#ifdef HAVE_SYSLOG_H\n#define LOG4CPLUS_HAVE_SYSLOG_H\n#endif\n\n/* */\n#ifdef HAVE_NETINET_IN_H\n#define LOG4CPLUS_HAVE_NETINET_IN_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_TYPES_H\n#define LOG4CPLUS_HAVE_SYS_TYPES_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_SOCKET_H\n#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n#endif\n\n/* */\n#ifdef HAVE_NETDB_H\n#define LOG4CPLUS_HAVE_NETDB_H\n#endif\n\n/* */\n#ifdef HAVE_UNISTD_H\n#define LOG4CPLUS_HAVE_UNISTD_H\n#endif\n\n/* */\n#ifdef HAVE_FTIME\n#define LOG4CPLUS_HAVE_FTIME\n#endif\n\n/* */\n#ifdef HAVE_GETADDRINFO\n#define LOG4CPLUS_HAVE_GETADDRINFO\n#endif\n\n/* */\n// This is from dcuid.cc\n#if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)\n#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n#endif\n\n/* */\n#ifdef HAVE_GETPID\n#define LOG4CPLUS_HAVE_GETPID\n#endif\n\n/* */\n#ifdef HAVE_PROTOTYPE_GETTIMEOFDAY\n#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n#endif\n\n/* */\n#ifdef HAVE_GMTIME_R\n#define LOG4CPLUS_HAVE_GMTIME_R\n#endif\n\n/* */\n#ifdef HAVE_HTONL\n#define LOG4CPLUS_HAVE_HTONL\n#endif\n\n/* */\n#ifdef HAVE_HTONS\n#define LOG4CPLUS_HAVE_HTONS\n#endif\n\n/* */\n#ifdef HAVE_LOCALTIME_R\n#define LOG4CPLUS_HAVE_LOCALTIME_R\n#endif\n\n/* */\n#ifdef HAVE_LSTAT\n#define LOG4CPLUS_HAVE_LSTAT\n#endif\n\n/* */\n#ifdef HAVE_NTOHL\n#define LOG4CPLUS_HAVE_NTOHL\n#endif\n\n/* */\n#ifdef HAVE_NTOHS\n#define LOG4CPLUS_HAVE_NTOHS\n#endif\n\n/* */\n#ifdef HAVE_STAT\n#define LOG4CPLUS_HAVE_STAT\n#endif\n\n/* */\n#ifdef WITH_THREADS\n#define LOG4CPLUS_USE_PTHREADS\n#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n#endif\n\n/* Define for compilers/standard libraries that support more than just the \"C\"\n locale. */\n#undef LOG4CPLUS_WORKING_LOCALE\n\n/* Define to int if undefined. */\n#if 0\n/* This block is handled by configure completely */\n#undef socklen_t\n#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif\n#endif\n\n/* Defined for --enable-debugging builds. */\n#ifdef DEBUG\n#define LOG4CPLUS_DEBUGGING\n#endif\n\n/* These two are not needed since we build static libraries */\n/* Defined if the compiler understands __declspec(export) or __attribute__((export)) construct. */\n#define LOG4CPLUS_DECLSPEC_EXPORT\n/* Defined if the compiler understands __declspec(import) or __attribute__((import)) construct. */\n#define LOG4CPLUS_DECLSPEC_IMPORT\n\n/* Defined if the host OS provides ENAMETOOLONG errno value. */\n#ifdef HAVE_ENAMETOOLONG\n#define LOG4CPLUS_HAVE_ENAMETOOLONG\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 13, 20, 27, 34, 41, 48, 55, 62, 82, 89, 96, 103, 110, 117, 124, 131, 138, 145, 152, 164, 167, 183, 190, 193, 196, 203], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 136, "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": "LOG4CPLUS_CONFIG_DEFINES_HXX", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 36}}, {"id": 3, "type": "preproc_def", "text": "#define LOG4CPLUS_CONFIG_DEFINES_HXX\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": "LOG4CPLUS_CONFIG_DEFINES_HXX", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 36}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef HAVE_SYSLOG_H\n#define LOG4CPLUS_HAVE_SYSLOG_H\n#endif", "parent": 0, "children": [7, 8, 9, 12], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 8, "type": "identifier", "text": "HAVE_SYSLOG_H", "parent": 6, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 20}}, {"id": 9, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_SYSLOG_H\n", "parent": 6, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "identifier", "text": "LOG4CPLUS_HAVE_SYSLOG_H", "parent": 9, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 31}}, {"id": 12, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 13, "type": "preproc_ifdef", "text": "#ifdef HAVE_NETINET_IN_H\n#define LOG4CPLUS_HAVE_NETINET_IN_H\n#endif", "parent": 0, "children": [14, 15, 16, 19], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 14, "type": "#ifdef", "text": "#ifdef", "parent": 13, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 15, "type": "identifier", "text": "HAVE_NETINET_IN_H", "parent": 13, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 24}}, {"id": 16, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_NETINET_IN_H\n", "parent": 13, "children": [17, 18], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 18, "type": "identifier", "text": "LOG4CPLUS_HAVE_NETINET_IN_H", "parent": 16, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 35}}, {"id": 19, "type": "#endif", "text": "#endif", "parent": 13, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 20, "type": "preproc_ifdef", "text": "#ifdef HAVE_SYS_TYPES_H\n#define LOG4CPLUS_HAVE_SYS_TYPES_H\n#endif", "parent": 0, "children": [21, 22, 23, 26], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 21, "type": "#ifdef", "text": "#ifdef", "parent": 20, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 22, "type": "identifier", "text": "HAVE_SYS_TYPES_H", "parent": 20, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 23}}, {"id": 23, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_SYS_TYPES_H\n", "parent": 20, "children": [24, 25], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 24, "type": "#define", "text": "#define", "parent": 23, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 25, "type": "identifier", "text": "LOG4CPLUS_HAVE_SYS_TYPES_H", "parent": 23, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 34}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 20, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 27, "type": "preproc_ifdef", "text": "#ifdef HAVE_SYS_SOCKET_H\n#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n#endif", "parent": 0, "children": [28, 29, 30, 33], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 28, "type": "#ifdef", "text": "#ifdef", "parent": 27, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 29, "type": "identifier", "text": "HAVE_SYS_SOCKET_H", "parent": 27, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 24}}, {"id": 30, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n", "parent": 27, "children": [31, 32], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 32, "type": "identifier", "text": "LOG4CPLUS_HAVE_SYS_SOCKET_H", "parent": 30, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 35}}, {"id": 33, "type": "#endif", "text": "#endif", "parent": 27, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 34, "type": "preproc_ifdef", "text": "#ifdef HAVE_NETDB_H\n#define LOG4CPLUS_HAVE_NETDB_H\n#endif", "parent": 0, "children": [35, 36, 37, 40], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 35, "type": "#ifdef", "text": "#ifdef", "parent": 34, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 36, "type": "identifier", "text": "HAVE_NETDB_H", "parent": 34, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 19}}, {"id": 37, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_NETDB_H\n", "parent": 34, "children": [38, 39], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 38, "type": "#define", "text": "#define", "parent": 37, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 39, "type": "identifier", "text": "LOG4CPLUS_HAVE_NETDB_H", "parent": 37, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 30}}, {"id": 40, "type": "#endif", "text": "#endif", "parent": 34, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 41, "type": "preproc_ifdef", "text": "#ifdef HAVE_UNISTD_H\n#define LOG4CPLUS_HAVE_UNISTD_H\n#endif", "parent": 0, "children": [42, 43, 44, 47], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 42, "type": "#ifdef", "text": "#ifdef", "parent": 41, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 43, "type": "identifier", "text": "HAVE_UNISTD_H", "parent": 41, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 20}}, {"id": 44, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_UNISTD_H\n", "parent": 41, "children": [45, 46], "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": "LOG4CPLUS_HAVE_UNISTD_H", "parent": 44, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 31}}, {"id": 47, "type": "#endif", "text": "#endif", "parent": 41, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 48, "type": "preproc_ifdef", "text": "#ifdef HAVE_FTIME\n#define LOG4CPLUS_HAVE_FTIME\n#endif", "parent": 0, "children": [49, 50, 51, 54], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 49, "type": "#ifdef", "text": "#ifdef", "parent": 48, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 50, "type": "identifier", "text": "HAVE_FTIME", "parent": 48, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 17}}, {"id": 51, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_FTIME\n", "parent": 48, "children": [52, 53], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 52, "type": "#define", "text": "#define", "parent": 51, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 53, "type": "identifier", "text": "LOG4CPLUS_HAVE_FTIME", "parent": 51, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 28}}, {"id": 54, "type": "#endif", "text": "#endif", "parent": 48, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 55, "type": "preproc_ifdef", "text": "#ifdef HAVE_GETADDRINFO\n#define LOG4CPLUS_HAVE_GETADDRINFO\n#endif", "parent": 0, "children": [56, 57, 58, 61], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 56, "type": "#ifdef", "text": "#ifdef", "parent": 55, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 6}}, {"id": 57, "type": "identifier", "text": "HAVE_GETADDRINFO", "parent": 55, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 23}}, {"id": 58, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_GETADDRINFO\n", "parent": 55, "children": [59, 60], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 59, "type": "#define", "text": "#define", "parent": 58, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 60, "type": "identifier", "text": "LOG4CPLUS_HAVE_GETADDRINFO", "parent": 58, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 34}}, {"id": 61, "type": "#endif", "text": "#endif", "parent": 55, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 62, "type": "preproc_if", "text": "#if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)\n#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n#endif", "parent": 0, "children": [63, 64, 77, 78, 81], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 63, "type": "#if", "text": "#if", "parent": 62, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 3}}, {"id": 64, "type": "binary_expression", "text": "defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)", "parent": 62, "children": [65, 73, 74], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 83}}, {"id": 65, "type": "binary_expression", "text": "defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME)", "parent": 64, "children": [66, 69, 70], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 60}}, {"id": 66, "type": "preproc_defined", "text": "defined(HAVE_GETHOSTNAME)", "parent": 65, "children": [67, 68], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 29}}, {"id": 67, "type": "defined", "text": "defined", "parent": 66, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 68, "type": "identifier", "text": "HAVE_GETHOSTNAME", "parent": 66, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 28}}, {"id": 69, "type": "&&", "text": "&&", "parent": 65, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 32}}, {"id": 70, "type": "preproc_defined", "text": "defined(HAVE_GETHOSTBYNAME)", "parent": 65, "children": [71, 72], "start_point": {"row": 45, "column": 33}, "end_point": {"row": 45, "column": 60}}, {"id": 71, "type": "defined", "text": "defined", "parent": 70, "children": [], "start_point": {"row": 45, "column": 33}, "end_point": {"row": 45, "column": 40}}, {"id": 72, "type": "identifier", "text": "HAVE_GETHOSTBYNAME", "parent": 70, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 59}}, {"id": 73, "type": "&&", "text": "&&", "parent": 64, "children": [], "start_point": {"row": 45, "column": 61}, "end_point": {"row": 45, "column": 63}}, {"id": 74, "type": "preproc_defined", "text": "defined(_REENTRANT)", "parent": 64, "children": [75, 76], "start_point": {"row": 45, "column": 64}, "end_point": {"row": 45, "column": 83}}, {"id": 75, "type": "defined", "text": "defined", "parent": 74, "children": [], "start_point": {"row": 45, "column": 64}, "end_point": {"row": 45, "column": 71}}, {"id": 76, "type": "identifier", "text": "_REENTRANT", "parent": 74, "children": [], "start_point": {"row": 45, "column": 72}, "end_point": {"row": 45, "column": 82}}, {"id": 77, "type": "\n", "text": "\n", "parent": 62, "children": [], "start_point": {"row": 45, "column": 83}, "end_point": {"row": 46, "column": 0}}, {"id": 78, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n", "parent": 62, "children": [79, 80], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 79, "type": "#define", "text": "#define", "parent": 78, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 80, "type": "identifier", "text": "LOG4CPLUS_HAVE_GETHOSTBYNAME_R", "parent": 78, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 38}}, {"id": 81, "type": "#endif", "text": "#endif", "parent": 62, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 82, "type": "preproc_ifdef", "text": "#ifdef HAVE_GETPID\n#define LOG4CPLUS_HAVE_GETPID\n#endif", "parent": 0, "children": [83, 84, 85, 88], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 83, "type": "#ifdef", "text": "#ifdef", "parent": 82, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 84, "type": "identifier", "text": "HAVE_GETPID", "parent": 82, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 18}}, {"id": 85, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_GETPID\n", "parent": 82, "children": [86, 87], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 86, "type": "#define", "text": "#define", "parent": 85, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 7}}, {"id": 87, "type": "identifier", "text": "LOG4CPLUS_HAVE_GETPID", "parent": 85, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 29}}, {"id": 88, "type": "#endif", "text": "#endif", "parent": 82, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 89, "type": "preproc_ifdef", "text": "#ifdef HAVE_PROTOTYPE_GETTIMEOFDAY\n#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n#endif", "parent": 0, "children": [90, 91, 92, 95], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 90, "type": "#ifdef", "text": "#ifdef", "parent": 89, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 91, "type": "identifier", "text": "HAVE_PROTOTYPE_GETTIMEOFDAY", "parent": 89, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 34}}, {"id": 92, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n", "parent": 89, "children": [93, 94], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 57, "column": 0}}, {"id": 93, "type": "#define", "text": "#define", "parent": 92, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 94, "type": "identifier", "text": "LOG4CPLUS_HAVE_GETTIMEOFDAY", "parent": 92, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 35}}, {"id": 95, "type": "#endif", "text": "#endif", "parent": 89, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 96, "type": "preproc_ifdef", "text": "#ifdef HAVE_GMTIME_R\n#define LOG4CPLUS_HAVE_GMTIME_R\n#endif", "parent": 0, "children": [97, 98, 99, 102], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 97, "type": "#ifdef", "text": "#ifdef", "parent": 96, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 98, "type": "identifier", "text": "HAVE_GMTIME_R", "parent": 96, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 20}}, {"id": 99, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_GMTIME_R\n", "parent": 96, "children": [100, 101], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 62, "column": 0}}, {"id": 100, "type": "#define", "text": "#define", "parent": 99, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 101, "type": "identifier", "text": "LOG4CPLUS_HAVE_GMTIME_R", "parent": 99, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 31}}, {"id": 102, "type": "#endif", "text": "#endif", "parent": 96, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 103, "type": "preproc_ifdef", "text": "#ifdef HAVE_HTONL\n#define LOG4CPLUS_HAVE_HTONL\n#endif", "parent": 0, "children": [104, 105, 106, 109], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 67, "column": 6}}, {"id": 104, "type": "#ifdef", "text": "#ifdef", "parent": 103, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 105, "type": "identifier", "text": "HAVE_HTONL", "parent": 103, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 17}}, {"id": 106, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_HTONL\n", "parent": 103, "children": [107, 108], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 67, "column": 0}}, {"id": 107, "type": "#define", "text": "#define", "parent": 106, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 7}}, {"id": 108, "type": "identifier", "text": "LOG4CPLUS_HAVE_HTONL", "parent": 106, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 28}}, {"id": 109, "type": "#endif", "text": "#endif", "parent": 103, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 6}}, {"id": 110, "type": "preproc_ifdef", "text": "#ifdef HAVE_HTONS\n#define LOG4CPLUS_HAVE_HTONS\n#endif", "parent": 0, "children": [111, 112, 113, 116], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 72, "column": 6}}, {"id": 111, "type": "#ifdef", "text": "#ifdef", "parent": 110, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 112, "type": "identifier", "text": "HAVE_HTONS", "parent": 110, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 17}}, {"id": 113, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_HTONS\n", "parent": 110, "children": [114, 115], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 72, "column": 0}}, {"id": 114, "type": "#define", "text": "#define", "parent": 113, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 7}}, {"id": 115, "type": "identifier", "text": "LOG4CPLUS_HAVE_HTONS", "parent": 113, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 28}}, {"id": 116, "type": "#endif", "text": "#endif", "parent": 110, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 6}}, {"id": 117, "type": "preproc_ifdef", "text": "#ifdef HAVE_LOCALTIME_R\n#define LOG4CPLUS_HAVE_LOCALTIME_R\n#endif", "parent": 0, "children": [118, 119, 120, 123], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 118, "type": "#ifdef", "text": "#ifdef", "parent": 117, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 119, "type": "identifier", "text": "HAVE_LOCALTIME_R", "parent": 117, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 23}}, {"id": 120, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_LOCALTIME_R\n", "parent": 117, "children": [121, 122], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 77, "column": 0}}, {"id": 121, "type": "#define", "text": "#define", "parent": 120, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 7}}, {"id": 122, "type": "identifier", "text": "LOG4CPLUS_HAVE_LOCALTIME_R", "parent": 120, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 34}}, {"id": 123, "type": "#endif", "text": "#endif", "parent": 117, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 124, "type": "preproc_ifdef", "text": "#ifdef HAVE_LSTAT\n#define LOG4CPLUS_HAVE_LSTAT\n#endif", "parent": 0, "children": [125, 126, 127, 130], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 82, "column": 6}}, {"id": 125, "type": "#ifdef", "text": "#ifdef", "parent": 124, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 126, "type": "identifier", "text": "HAVE_LSTAT", "parent": 124, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 17}}, {"id": 127, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_LSTAT\n", "parent": 124, "children": [128, 129], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 82, "column": 0}}, {"id": 128, "type": "#define", "text": "#define", "parent": 127, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 7}}, {"id": 129, "type": "identifier", "text": "LOG4CPLUS_HAVE_LSTAT", "parent": 127, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 28}}, {"id": 130, "type": "#endif", "text": "#endif", "parent": 124, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 6}}, {"id": 131, "type": "preproc_ifdef", "text": "#ifdef HAVE_NTOHL\n#define LOG4CPLUS_HAVE_NTOHL\n#endif", "parent": 0, "children": [132, 133, 134, 137], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 87, "column": 6}}, {"id": 132, "type": "#ifdef", "text": "#ifdef", "parent": 131, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 6}}, {"id": 133, "type": "identifier", "text": "HAVE_NTOHL", "parent": 131, "children": [], "start_point": {"row": 85, "column": 7}, "end_point": {"row": 85, "column": 17}}, {"id": 134, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_NTOHL\n", "parent": 131, "children": [135, 136], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 87, "column": 0}}, {"id": 135, "type": "#define", "text": "#define", "parent": 134, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 7}}, {"id": 136, "type": "identifier", "text": "LOG4CPLUS_HAVE_NTOHL", "parent": 134, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 28}}, {"id": 137, "type": "#endif", "text": "#endif", "parent": 131, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 6}}, {"id": 138, "type": "preproc_ifdef", "text": "#ifdef HAVE_NTOHS\n#define LOG4CPLUS_HAVE_NTOHS\n#endif", "parent": 0, "children": [139, 140, 141, 144], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 139, "type": "#ifdef", "text": "#ifdef", "parent": 138, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 6}}, {"id": 140, "type": "identifier", "text": "HAVE_NTOHS", "parent": 138, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 17}}, {"id": 141, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_NTOHS\n", "parent": 138, "children": [142, 143], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 92, "column": 0}}, {"id": 142, "type": "#define", "text": "#define", "parent": 141, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 7}}, {"id": 143, "type": "identifier", "text": "LOG4CPLUS_HAVE_NTOHS", "parent": 141, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 28}}, {"id": 144, "type": "#endif", "text": "#endif", "parent": 138, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 145, "type": "preproc_ifdef", "text": "#ifdef HAVE_STAT\n#define LOG4CPLUS_HAVE_STAT\n#endif", "parent": 0, "children": [146, 147, 148, 151], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 97, "column": 6}}, {"id": 146, "type": "#ifdef", "text": "#ifdef", "parent": 145, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 6}}, {"id": 147, "type": "identifier", "text": "HAVE_STAT", "parent": 145, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 16}}, {"id": 148, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_STAT\n", "parent": 145, "children": [149, 150], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 97, "column": 0}}, {"id": 149, "type": "#define", "text": "#define", "parent": 148, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 7}}, {"id": 150, "type": "identifier", "text": "LOG4CPLUS_HAVE_STAT", "parent": 148, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 27}}, {"id": 151, "type": "#endif", "text": "#endif", "parent": 145, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 6}}, {"id": 152, "type": "preproc_ifdef", "text": "#ifdef WITH_THREADS\n#define LOG4CPLUS_USE_PTHREADS\n#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n#endif", "parent": 0, "children": [153, 154, 155, 158, 163], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 105, "column": 6}}, {"id": 153, "type": "#ifdef", "text": "#ifdef", "parent": 152, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 154, "type": "identifier", "text": "WITH_THREADS", "parent": 152, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 19}}, {"id": 155, "type": "preproc_def", "text": "#define LOG4CPLUS_USE_PTHREADS\n", "parent": 152, "children": [156, 157], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 102, "column": 0}}, {"id": 156, "type": "#define", "text": "#define", "parent": 155, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 7}}, {"id": 157, "type": "identifier", "text": "LOG4CPLUS_USE_PTHREADS", "parent": 155, "children": [], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 30}}, {"id": 158, "type": "preproc_else", "text": "#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n", "parent": 152, "children": [159, 160], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 105, "column": 0}}, {"id": 159, "type": "#else", "text": "#else", "parent": 158, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 5}}, {"id": 160, "type": "preproc_def", "text": "#define LOG4CPLUS_SINGLE_THREADED\n", "parent": 158, "children": [161, 162], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 105, "column": 0}}, {"id": 161, "type": "#define", "text": "#define", "parent": 160, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 7}}, {"id": 162, "type": "identifier", "text": "LOG4CPLUS_SINGLE_THREADED", "parent": 160, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 33}}, {"id": 163, "type": "#endif", "text": "#endif", "parent": 152, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 6}}, {"id": 164, "type": "preproc_call", "text": "#undef LOG4CPLUS_WORKING_LOCALE\n", "parent": 0, "children": [165, 166], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 110, "column": 0}}, {"id": 165, "type": "preproc_directive", "text": "#undef", "parent": 164, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 6}}, {"id": 166, "type": "preproc_arg", "text": "LOG4CPLUS_WORKING_LOCALE", "parent": 164, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 31}}, {"id": 167, "type": "preproc_if", "text": "#if 0\n/* This block is handled by configure completely */\n#undef socklen_t\n#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif\n#endif", "parent": 0, "children": [168, 169, 170, 171, 174, 182], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 168, "type": "#if", "text": "#if", "parent": 167, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 3}}, {"id": 169, "type": "number_literal", "text": "0", "parent": 167, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 5}}, {"id": 170, "type": "\n", "text": "\n", "parent": 167, "children": [], "start_point": {"row": 112, "column": 5}, "end_point": {"row": 113, "column": 0}}, {"id": 171, "type": "preproc_call", "text": "#undef socklen_t\n", "parent": 167, "children": [172, 173], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 115, "column": 0}}, {"id": 172, "type": "preproc_directive", "text": "#undef", "parent": 171, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 6}}, {"id": 173, "type": "preproc_arg", "text": "socklen_t", "parent": 171, "children": [], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 16}}, {"id": 174, "type": "preproc_ifdef", "text": "#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif", "parent": 167, "children": [175, 176, 177, 181], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 117, "column": 6}}, {"id": 175, "type": "#ifndef", "text": "#ifndef", "parent": 174, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 7}}, {"id": 176, "type": "identifier", "text": "HAVE_DECLARATION_SOCKLEN_T", "parent": 174, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 34}}, {"id": 177, "type": "preproc_def", "text": "#define socklen_t int\n", "parent": 174, "children": [178, 179, 180], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 117, "column": 0}}, {"id": 178, "type": "#define", "text": "#define", "parent": 177, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 7}}, {"id": 179, "type": "identifier", "text": "socklen_t", "parent": 177, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 17}}, {"id": 180, "type": "preproc_arg", "text": "int", "parent": 177, "children": [], "start_point": {"row": 116, "column": 18}, "end_point": {"row": 116, "column": 21}}, {"id": 181, "type": "#endif", "text": "#endif", "parent": 174, "children": [], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 6}}, {"id": 182, "type": "#endif", "text": "#endif", "parent": 167, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 183, "type": "preproc_ifdef", "text": "#ifdef DEBUG\n#define LOG4CPLUS_DEBUGGING\n#endif", "parent": 0, "children": [184, 185, 186, 189], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 123, "column": 6}}, {"id": 184, "type": "#ifdef", "text": "#ifdef", "parent": 183, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 6}}, {"id": 185, "type": "identifier", "text": "DEBUG", "parent": 183, "children": [], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 12}}, {"id": 186, "type": "preproc_def", "text": "#define LOG4CPLUS_DEBUGGING\n", "parent": 183, "children": [187, 188], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 123, "column": 0}}, {"id": 187, "type": "#define", "text": "#define", "parent": 186, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 7}}, {"id": 188, "type": "identifier", "text": "LOG4CPLUS_DEBUGGING", "parent": 186, "children": [], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 27}}, {"id": 189, "type": "#endif", "text": "#endif", "parent": 183, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 6}}, {"id": 190, "type": "preproc_def", "text": "#define LOG4CPLUS_DECLSPEC_EXPORT\n", "parent": 0, "children": [191, 192], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 128, "column": 0}}, {"id": 191, "type": "#define", "text": "#define", "parent": 190, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 7}}, {"id": 192, "type": "identifier", "text": "LOG4CPLUS_DECLSPEC_EXPORT", "parent": 190, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 33}}, {"id": 193, "type": "preproc_def", "text": "#define LOG4CPLUS_DECLSPEC_IMPORT\n", "parent": 0, "children": [194, 195], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 130, "column": 0}}, {"id": 194, "type": "#define", "text": "#define", "parent": 193, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 7}}, {"id": 195, "type": "identifier", "text": "LOG4CPLUS_DECLSPEC_IMPORT", "parent": 193, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 33}}, {"id": 196, "type": "preproc_ifdef", "text": "#ifdef HAVE_ENAMETOOLONG\n#define LOG4CPLUS_HAVE_ENAMETOOLONG\n#endif", "parent": 0, "children": [197, 198, 199, 202], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 134, "column": 6}}, {"id": 197, "type": "#ifdef", "text": "#ifdef", "parent": 196, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 6}}, {"id": 198, "type": "identifier", "text": "HAVE_ENAMETOOLONG", "parent": 196, "children": [], "start_point": {"row": 132, "column": 7}, "end_point": {"row": 132, "column": 24}}, {"id": 199, "type": "preproc_def", "text": "#define LOG4CPLUS_HAVE_ENAMETOOLONG\n", "parent": 196, "children": [200, 201], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 134, "column": 0}}, {"id": 200, "type": "#define", "text": "#define", "parent": 199, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 7}}, {"id": 201, "type": "identifier", "text": "LOG4CPLUS_HAVE_ENAMETOOLONG", "parent": 199, "children": [], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 35}}, {"id": 202, "type": "#endif", "text": "#endif", "parent": 196, "children": [], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 134, "column": 6}}, {"id": 203, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 136, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [64, 65], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 11, 12, 13, 14, 15, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 39, 40, 41, 42, 43, 46, 47, 48, 49, 50, 53, 54, 55, 56, 57, 60, 61, 62, 63, 68, 72, 76, 80, 81, 82, 83, 84, 87, 88, 89, 90, 91, 94, 95, 96, 97, 98, 101, 102, 103, 104, 105, 108, 109, 110, 111, 112, 115, 116, 117, 118, 119, 122, 123, 124, 125, 126, 129, 130, 131, 132, 133, 136, 137, 138, 139, 140, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 157, 162, 163, 167, 168, 174, 175, 176, 179, 181, 182, 183, 184, 185, 188, 189, 192, 195, 196, 197, 198, 201, 202, 203], "returns": [], "exceptions": []}, "expressions": {"calls": [164, 171], "literals": [169], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "#ifndef LOG4CPLUS_CONFIG_DEFINES_HXX\n#define LOG4CPLUS_CONFIG_DEFINES_HXX\n\n/* */\n#ifdef HAVE_SYSLOG_H\n#define LOG4CPLUS_HAVE_SYSLOG_H\n#endif\n\n/* */\n#ifdef HAVE_NETINET_IN_H\n#define LOG4CPLUS_HAVE_NETINET_IN_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_TYPES_H\n#define LOG4CPLUS_HAVE_SYS_TYPES_H\n#endif\n\n/* */\n#ifdef HAVE_SYS_SOCKET_H\n#define LOG4CPLUS_HAVE_SYS_SOCKET_H\n#endif\n\n/* */\n#ifdef HAVE_NETDB_H\n#define LOG4CPLUS_HAVE_NETDB_H\n#endif\n\n/* */\n#ifdef HAVE_UNISTD_H\n#define LOG4CPLUS_HAVE_UNISTD_H\n#endif\n\n/* */\n#ifdef HAVE_FTIME\n#define LOG4CPLUS_HAVE_FTIME\n#endif\n\n/* */\n#ifdef HAVE_GETADDRINFO\n#define LOG4CPLUS_HAVE_GETADDRINFO\n#endif\n\n/* */\n// This is from dcuid.cc\n#if defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) && defined(_REENTRANT)\n#define LOG4CPLUS_HAVE_GETHOSTBYNAME_R\n#endif\n\n/* */\n#ifdef HAVE_GETPID\n#define LOG4CPLUS_HAVE_GETPID\n#endif\n\n/* */\n#ifdef HAVE_PROTOTYPE_GETTIMEOFDAY\n#define LOG4CPLUS_HAVE_GETTIMEOFDAY\n#endif\n\n/* */\n#ifdef HAVE_GMTIME_R\n#define LOG4CPLUS_HAVE_GMTIME_R\n#endif\n\n/* */\n#ifdef HAVE_HTONL\n#define LOG4CPLUS_HAVE_HTONL\n#endif\n\n/* */\n#ifdef HAVE_HTONS\n#define LOG4CPLUS_HAVE_HTONS\n#endif\n\n/* */\n#ifdef HAVE_LOCALTIME_R\n#define LOG4CPLUS_HAVE_LOCALTIME_R\n#endif\n\n/* */\n#ifdef HAVE_LSTAT\n#define LOG4CPLUS_HAVE_LSTAT\n#endif\n\n/* */\n#ifdef HAVE_NTOHL\n#define LOG4CPLUS_HAVE_NTOHL\n#endif\n\n/* */\n#ifdef HAVE_NTOHS\n#define LOG4CPLUS_HAVE_NTOHS\n#endif\n\n/* */\n#ifdef HAVE_STAT\n#define LOG4CPLUS_HAVE_STAT\n#endif\n\n/* */\n#ifdef WITH_THREADS\n#define LOG4CPLUS_USE_PTHREADS\n#else\n/* Define if this is a single-threaded library. */\n#define LOG4CPLUS_SINGLE_THREADED\n#endif\n\n/* Define for compilers/standard libraries that support more than just the \"C\"\n locale. */\n#undef LOG4CPLUS_WORKING_LOCALE\n\n/* Define to int if undefined. */\n#if 0\n/* This block is handled by configure completely */\n#undef socklen_t\n#ifndef HAVE_DECLARATION_SOCKLEN_T\n#define socklen_t int\n#endif\n#endif\n\n/* Defined for --enable-debugging builds. */\n#ifdef DEBUG\n#define LOG4CPLUS_DEBUGGING\n#endif\n\n/* These two are not needed since we build static libraries */\n/* Defined if the compiler understands __declspec(export) or __attribute__((export)) construct. */\n#define LOG4CPLUS_DECLSPEC_EXPORT\n/* Defined if the compiler understands __declspec(import) or __attribute__((import)) construct. */\n#define LOG4CPLUS_DECLSPEC_IMPORT\n\n/* Defined if the host OS provides ENAMETOOLONG errno value. */\n#ifdef HAVE_ENAMETOOLONG\n#define LOG4CPLUS_HAVE_ENAMETOOLONG\n#endif\n\n#endif // LOG4CPLUS_CONFIG_DEFINES_HXX\n"}
225
c
// // XXGJSycncNetKit.h // xxdcchat_ios // // Created by 刘朝龙 on 2017/3/19. // Copyright © 2017年 刘朝龙. All rights reserved. // #import <Foundation/Foundation.h> @interface XXGJSycncNetKit : NSObject #include "XXGJNetKitHeader.h" + (NSDictionary *)getCityFile; /** 查找一个群组 @param param 查找参数[1. group_id] */ + (NSDictionary *)searchGroup:(NSDictionary *)param; /** 判断自己是否在该群组里 @param param 判断参数[1. user_id 2. group_id] */ + (NSDictionary *)checkInGroup:(NSDictionary *)param; /** 获取用户跟自己的关系 @param param 获取关系参数 [1. user_id, 2. from_user_id] */ + (NSDictionary *)getPersonRelation:(NSDictionary *)param; /** 获取好友信息 @param param 好友信息参数 [1. user_id] */ + (NSDictionary *)getFriend:(NSDictionary *)param; /** 获取好友列表 @param param 获取好友列表参数 [1. user_id 2. relation_type 3. currentPage 4. pageSize 5. nick_name] ** 注意:relation_type 0-个人好友 1-群好友 * ** 注意:nick_name 为选填参数 * */ + (NSDictionary *)getFriendList:(NSDictionary *)param; /** 根据用户名查询全体用户列表 @param param 查询参数 [1. nick_name 2. current_page 3. page_size] */ + (NSDictionary *)searchUserList:(NSDictionary *)param; /** 获取当前消息免打扰设置 @param param 获取设置参数[1. user_id,2. friend_id,3. type] ** 注意 user_id是当前用户id * ** 注意 friend_id是好友或群id * ** 注意 type:0好友 1群 * */ + (NSDictionary *)getLocalSet:(NSDictionary *)param; /** 获取群组中成员信息 @param param 参数 @return 返回信息 */ + (NSDictionary *)getGroupUserList:(NSDictionary *)param; @end
20.33
66
(translation_unit) "//\n// XXGJSycncNetKit.h\n// xxdcchat_ios\n//\n// Created by 刘朝龙 on 2017/3/19.\n// Copyright © 2017年 刘朝龙. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface XXGJSycncNetKit : NSObject\n#include "XXGJNetKitHeader.h"\n\n+ (NSDictionary *)getCityFile;\n\n/**\n 查找一个群组\n \n @param param 查找参数[1. group_id]\n */\n+ (NSDictionary *)searchGroup:(NSDictionary *)param;\n\n/**\n 判断自己是否在该群组里\n \n @param param 判断参数[1. user_id 2. group_id]\n */\n+ (NSDictionary *)checkInGroup:(NSDictionary *)param;\n\n/**\n 获取用户跟自己的关系\n \n @param param 获取关系参数 [1. user_id, 2. from_user_id]\n */\n+ (NSDictionary *)getPersonRelation:(NSDictionary *)param;\n\n/**\n 获取好友信息\n \n @param param 好友信息参数 [1. user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary *)param;\n\n/**\n 获取好友列表\n \n @param param 获取好友列表参数 [1. user_id 2. relation_type 3. currentPage 4. pageSize 5. nick_name]\n ** 注意:relation_type 0-个人好友 1-群好友 *\n ** 注意:nick_name 为选填参数 *\n */\n+ (NSDictionary *)getFriendList:(NSDictionary *)param;\n\n/**\n 根据用户名查询全体用户列表\n \n @param param 查询参数 [1. nick_name 2. current_page 3. page_size]\n */\n+ (NSDictionary *)searchUserList:(NSDictionary *)param;\n\n/**\n 获取当前消息免打扰设置\n \n @param param 获取设置参数[1. user_id,2. friend_id,3. type]\n ** 注意 user_id是当前用户id *\n ** 注意 friend_id是好友或群id *\n ** 注意 type:0好友 1群 *\n */\n+ (NSDictionary *)getLocalSet:(NSDictionary *)param;\n\n/**\n 获取群组中成员信息\n \n @param param 参数\n @return 返回信息\n */\n+ (NSDictionary *)getGroupUserList:(NSDictionary *)param;\n@end\n" (comment) "//" (comment) "// XXGJSycncNetKit.h" (comment) "// xxdcchat_ios" (comment) "//" (comment) "// Created by 刘朝龙 on 2017/3/19.\n// C" (comment) "pyright © 2017年 刘朝龙. All rights reserved.\n//\n\n#import <F" (comment) "un" (preproc_call) "tion/Foundation.h>\n\n@interface XXG" (preproc_directive) "tion/Fo" (preproc_arg) "ndation.h>\n\n@interface XX" (ERROR) "SycncNetKit : NSObject\n#include "XXGJ" (ERROR) "S" (type_identifier) "ycncNetKi" (identifier) " : NSObject\n#in" (:) "l" (identifier) "de "XXGJ" (preproc_include) "etKitHeader.h"\n\n+ (NSDictionar" (#include) "etKitHea" (string_literal) "er.h"\n\n+ (NSDictiona" (") "e" (string_content) "r.h"\n\n+ (NSDiction" (") "a" (expression_statement) " *)getCityFile;\n\n/**\n 查找一个群组\n " (unary_expression) " *)getCityFile;\n\n/**\n 查找一个群组\n" (+) " " (cast_expression) ")getCityFile;\n\n/**\n 查找一个群组\n" (() ")" (type_descriptor) "getCityFile;\n\n" (type_identifier) "getCityFile;" (abstract_pointer_declarator) "\n" (*) "\n" ()) "/" (identifier) "**\n 查找一个群组\n" (;) " " (comment) "@param param 查找参数[1. group_id]\n */\n+ (NSDictionary *)searchGroup:(NSD" (expression_statement) "ctionary *)param;\n\n/**\n 判断自己是否在该群组里\n \n @param param " (update_expression) "ctionary *)param;\n\n/**\n 判断自己是否在该群组里\n \n @param param" (binary_expression) "ctionary *)param;\n\n/**\n 判断自己是否在该群组里\n \n @param param" (unary_expression) "ctionary *)param;\n\n/**\n 判断自己是" (+) "c" (cast_expression) "ionary *)param;\n\n/**\n 判断自己是" (() "i" (type_descriptor) "onary *)param;" (type_identifier) "onary *)para" (abstract_pointer_declarator) ";" (*) ";" ()) "\n" (identifier) "\n/**\n 判断自己是" (ERROR) "否在该群组里\n \n @par" (:) "否" (() "在" (identifier) "该群组里\n \n @par" (*) "m" (ERROR) " " ()) " " (identifier) "param" (--) "" (;) " " (comment) "参数[1. user_id 2. group_id]\n */\n+ (NSDictionary *)checkInGroup:(NSDictionary *)param;\n\n/**\n 获取用户" (expression_statement) "自己的关系\n \n @param param 获取关系参数 [1. user_id, 2. from_use" (update_expression) "自己的关系\n \n @param param 获取关系参数 [1. user_id, 2. from_us" (binary_expression) "自己的关系\n \n @param param 获取关系参数 [1. user_id, 2. from_us" (unary_expression) "自己的关系\n \n @param param 获取关系参数 [" (+) "自" (cast_expression) "的关系\n \n @param param 获取关系参数 [" (() "的" (type_descriptor) "关系\n \n @param p" (type_identifier) "关系\n \n @param" (abstract_pointer_declarator) "p" (*) "p" ()) "a" (identifier) "ram 获取关系参数 [" (ERROR) "1. user_id, 2." (:) "1" (() "." (identifier) " user_id, 2." (*) "f" (ERROR) "r" ()) "r" (identifier) "om_us" (--) "" (;) "e" (comment) "id]\n */\n+ (NSDictionary *)getPersonRelation:(NSDictionary *)param;\n\n/**\n 获取好友信息\n \n @param param 好友信息参数 [" (expression_statement) ". user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary *" (update_expression) ". user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary " (binary_expression) ". user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary " (unary_expression) ". user_id]\n */\n+ (NSDictionary *)ge" (+) "." (cast_expression) "user_id]\n */\n+ (NSDictionary *)ge" (() "u" (type_descriptor) "ser_id]\n */\n+ " (type_identifier) "ser_id]\n */\n" (abstract_pointer_declarator) " " (*) " " ()) "(" (identifier) "NSDictionary *)ge" (ERROR) "tFriend:(NSDic" (:) "t" (() "F" (identifier) "riend:(NSDic" (*) "i" (ERROR) "o" ()) "o" (identifier) "nary " (--) "" (;) "*" (comment) "aram;\n\n/**\n 获取好友列表\n \n @param param 获取好友列表参数 [1. user_id 2. relation_type 3." (expression_statement) "currentPage 4. pageSize 5. nick_name]\n ** 注意:relat" (update_expression) "currentPage 4. pageSize 5. nick_name]\n ** 注意:rela" (binary_expression) "currentPage 4. pageSize 5. nick_name]\n ** 注意:rela" (unary_expression) "currentPage 4. pageSize 5. " (+) "c" (cast_expression) "rrentPage 4. pageSize 5. " (() "r" (type_descriptor) "rentPage 4. pa" (type_identifier) "rentPage 4. " (abstract_pointer_declarator) "a" (*) "a" ()) "g" (identifier) "eSize 5. " (ERROR) "nick_name]\n **" (:) "n" (() "i" (identifier) "ck_name]\n **" (*) "注" (ERROR) "意" ()) "意" (identifier) ":rela" (--) "" (;) "t" (comment) "n_type 0-个人好友 1-群好友 *\n ** 注意:nick_name 为选填参数 *\n */\n+ (NSDictionary *)getFriendList:(NSDictionary *)param;\n\n/**\n 根据用户名查询全体用户列表\n \n @param param 查询参数 [1. nick_name 2. current_page 3. page_size]\n */\n+ (NSDictionary *)searchUserList:(NSDict" (expression_statement) "onary *)param;\n\n/**\n 获取当前消息免打扰设置\n \n @param param 获取设置参" (update_expression) "onary *)param;\n\n/**\n 获取当前消息免打扰设置\n \n @param param 获取设置" (binary_expression) "onary *)param;\n\n/**\n 获取当前消息免打扰设置\n \n @param param 获取设置" (unary_expression) "onary *)param;\n\n/**\n 获取当前消息免打扰设" (+) "o" (cast_expression) "ary *)param;\n\n/**\n 获取当前消息免打扰设" (() "a" (type_descriptor) "ry *)param;\n\n/" (type_identifier) "ry *)param;\n" (abstract_pointer_declarator) "/" (*) "/" ()) "*" (identifier) "*\n 获取当前消息免打扰设" (ERROR) "置\n \n @param pa" (:) "置" (() "\n" (identifier) " \n @param pa" (*) "a" (ERROR) "m" ()) "m" (identifier) " 获取设置" (--) "" (;) "参" (comment) "1. user_id,2. friend_id,3. type]\n ** 注意 user_id是当前用户id *\n ** 注意 friend_id是好友或群id *\n ** 注意 type:0好友 1群 *\n */\n+ (NSDiction" (expression_statement) "ry *)getLocalSet:(NSDictionary *)param;\n\n/**\n 获取群组中成员信息" (update_expression) "ry *)getLocalSet:(NSDictionary *)param;\n\n/**\n 获取群组中成员信" (binary_expression) "ry *)getLocalSet:(NSDictionary *)param;\n\n/**\n 获取群组中成员信" (unary_expression) "ry *)getLocalSet:(NSDictionary *" (+) "r" (cast_expression) " *)getLocalSet:(NSDictionary *" (() " " (type_descriptor) "*)getLocalSet:" (type_identifier) "*)getLocalSe" (abstract_pointer_declarator) ":" (*) ":" ()) "(" (identifier) "NSDictionary *" (ERROR) ")param;\n\n/**\n " (:) ")" (() "p" (identifier) "aram;\n\n/**\n " (*) "取" (ERROR) "群" ()) "群" (identifier) "组中成员信" (--) "" (;) "息" (comment) "\n @param param 参数\n @return 返回信息\n */\n+ (NSDictionary *)getGroupUserList:(NSDictionary *)param;\n@end\n" (expression_statement) "" (update_expression) "" (binary_expression) "" (unary_expression) "" (+) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" (abstract_pointer_declarator) "" (*) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (--) "" (;) "" (comment) "" (ERROR) "" (binary_expression) "" (unary_expression) "" (+) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" (abstract_pointer_declarator) "" (*) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" (*) "" (ERROR) "" ()) "" (identifier) "" (;) "" (ERROR) "" (identifier) ""
227
20
{"language": "c", "success": true, "metadata": {"lines": 66, "avg_line_length": 20.33, "nodes": 143, "errors": 0, "source_hash": "8a443f7c83e7c30029f64123623691b22272cab9dd7763b026f6c8dea36e5c4f", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "tion/Foundation.h>\n\n@interface XXG", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "tion/Fo", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "ndation.h>\n\n@interface XX", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "ERROR", "text": "SycncNetKit : NSObject\n#include \"XXGJ", "parent": null, "children": [4, 5, 6, 7], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 37}}, {"id": 4, "type": "ERROR", "text": "S", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "ycncNetKi", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": " : NSObject\n#in", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 26}}, {"id": 7, "type": "identifier", "text": "de \"XXGJ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 37}}, {"id": 8, "type": "preproc_include", "text": "etKitHeader.h\"\n\n+ (NSDictionar", "parent": null, "children": [9, 10], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 9, "type": "#include", "text": "etKitHea", "parent": 8, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 10, "type": "string_literal", "text": "er.h\"\n\n+ (NSDictiona", "parent": 8, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 29}}, {"id": 11, "type": "unary_expression", "text": " *)getCityFile;\n\n/**\n \u67e5\u627e\u4e00\u4e2a\u7fa4\u7ec4\n", "parent": null, "children": [12, 13], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 29}}, {"id": 12, "type": "+", "text": " ", "parent": 11, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 13, "type": "cast_expression", "text": ")getCityFile;\n\n/**\n \u67e5\u627e\u4e00\u4e2a\u7fa4\u7ec4\n", "parent": 11, "children": [14, 18], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 29}}, {"id": 14, "type": "type_descriptor", "text": "getCityFile;\n\n", "parent": 13, "children": [15, 16], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 17}}, {"id": 15, "type": "type_identifier", "text": "getCityFile;", "parent": 14, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 15}}, {"id": 16, "type": "abstract_pointer_declarator", "text": "\n", "parent": 14, "children": [17], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 17}}, {"id": 17, "type": "*", "text": "\n", "parent": 16, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 17}}, {"id": 18, "type": "identifier", "text": "**\n \u67e5\u627e\u4e00\u4e2a\u7fa4\u7ec4\n", "parent": 13, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 29}}, {"id": 19, "type": "update_expression", "text": "ctionary *)param;\n\n/**\n \u5224\u65ad\u81ea\u5df1\u662f\u5426\u5728\u8be5\u7fa4\u7ec4\u91cc\n \n @param param", "parent": null, "children": [20, 32], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 51}}, {"id": 20, "type": "binary_expression", "text": "ctionary *)param;\n\n/**\n \u5224\u65ad\u81ea\u5df1\u662f\u5426\u5728\u8be5\u7fa4\u7ec4\u91cc\n \n @param param", "parent": 19, "children": [21, 27, 29, 30, 31], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 51}}, {"id": 21, "type": "unary_expression", "text": "ctionary *)param;\n\n/**\n \u5224\u65ad\u81ea\u5df1\u662f", "parent": 20, "children": [22, 23], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 29}}, {"id": 22, "type": "+", "text": "c", "parent": 21, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 23, "type": "cast_expression", "text": "ionary *)param;\n\n/**\n \u5224\u65ad\u81ea\u5df1\u662f", "parent": 21, "children": [24, 26], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 29}}, {"id": 24, "type": "type_descriptor", "text": "onary *)param;", "parent": 23, "children": [25], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 17}}, {"id": 25, "type": "type_identifier", "text": "onary *)para", "parent": 24, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 15}}, {"id": 26, "type": "identifier", "text": "\n/**\n \u5224\u65ad\u81ea\u5df1\u662f", "parent": 23, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 29}}, {"id": 27, "type": "ERROR", "text": "\u5426\u5728\u8be5\u7fa4\u7ec4\u91cc\n \n @par", "parent": 20, "children": [28], "start_point": {"row": 20, "column": 29}, "end_point": {"row": 20, "column": 43}}, {"id": 28, "type": "identifier", "text": "\u8be5\u7fa4\u7ec4\u91cc\n \n @par", "parent": 27, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 43}}, {"id": 29, "type": "*", "text": "m", "parent": 20, "children": [], "start_point": {"row": 20, "column": 44}, "end_point": {"row": 20, "column": 45}}, {"id": 30, "type": "ERROR", "text": " ", "parent": 20, "children": [], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 46}}, {"id": 31, "type": "identifier", "text": "param", "parent": 20, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 51}}, {"id": 32, "type": "--", "text": "", "parent": 19, "children": [], "start_point": {"row": 20, "column": 51}, "end_point": {"row": 20, "column": 51}}, {"id": 33, "type": "update_expression", "text": "\u81ea\u5df1\u7684\u5173\u7cfb\n \n @param param \u83b7\u53d6\u5173\u7cfb\u53c2\u6570 [1. user_id, 2. from_us", "parent": null, "children": [34, 48], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 52}}, {"id": 34, "type": "binary_expression", "text": "\u81ea\u5df1\u7684\u5173\u7cfb\n \n @param param \u83b7\u53d6\u5173\u7cfb\u53c2\u6570 [1. user_id, 2. from_us", "parent": 33, "children": [35, 43, 45, 46, 47], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 52}}, {"id": 35, "type": "unary_expression", "text": "\u81ea\u5df1\u7684\u5173\u7cfb\n \n @param param \u83b7\u53d6\u5173\u7cfb\u53c2\u6570 [", "parent": 34, "children": [36, 37], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 30}}, {"id": 36, "type": "+", "text": "\u81ea", "parent": 35, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 37, "type": "cast_expression", "text": "\u7684\u5173\u7cfb\n \n @param param \u83b7\u53d6\u5173\u7cfb\u53c2\u6570 [", "parent": 35, "children": [38, 42], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 30}}, {"id": 38, "type": "type_descriptor", "text": "\u5173\u7cfb\n \n @param p", "parent": 37, "children": [39, 40], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 17}}, {"id": 39, "type": "type_identifier", "text": "\u5173\u7cfb\n \n @param", "parent": 38, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 15}}, {"id": 40, "type": "abstract_pointer_declarator", "text": "p", "parent": 38, "children": [41], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 41, "type": "*", "text": "p", "parent": 40, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 42, "type": "identifier", "text": "ram \u83b7\u53d6\u5173\u7cfb\u53c2\u6570 [", "parent": 37, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 30}}, {"id": 43, "type": "ERROR", "text": "1. user_id, 2.", "parent": 34, "children": [44], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 44}}, {"id": 44, "type": "identifier", "text": " user_id, 2.", "parent": 43, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 44}}, {"id": 45, "type": "*", "text": "f", "parent": 34, "children": [], "start_point": {"row": 27, "column": 45}, "end_point": {"row": 27, "column": 46}}, {"id": 46, "type": "ERROR", "text": "r", "parent": 34, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 47}}, {"id": 47, "type": "identifier", "text": "om_us", "parent": 34, "children": [], "start_point": {"row": 27, "column": 47}, "end_point": {"row": 27, "column": 52}}, {"id": 48, "type": "--", "text": "", "parent": 33, "children": [], "start_point": {"row": 27, "column": 52}, "end_point": {"row": 27, "column": 52}}, {"id": 49, "type": "update_expression", "text": ". user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary ", "parent": null, "children": [50, 63], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 57}}, {"id": 50, "type": "binary_expression", "text": ". user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary ", "parent": 49, "children": [51, 58, 60, 61, 62], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 57}}, {"id": 51, "type": "unary_expression", "text": ". user_id]\n */\n+ (NSDictionary *)ge", "parent": 50, "children": [52], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 35}}, {"id": 52, "type": "cast_expression", "text": "user_id]\n */\n+ (NSDictionary *)ge", "parent": 51, "children": [53, 57], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 35}}, {"id": 53, "type": "type_descriptor", "text": "ser_id]\n */\n+ ", "parent": 52, "children": [54, 55], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 17}}, {"id": 54, "type": "type_identifier", "text": "ser_id]\n */\n", "parent": 53, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 15}}, {"id": 55, "type": "abstract_pointer_declarator", "text": " ", "parent": 53, "children": [56], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 56, "type": "*", "text": " ", "parent": 55, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 57, "type": "identifier", "text": "NSDictionary *)ge", "parent": 52, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 35}}, {"id": 58, "type": "ERROR", "text": "tFriend:(NSDic", "parent": 50, "children": [59], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 49}}, {"id": 59, "type": "identifier", "text": "riend:(NSDic", "parent": 58, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 49}}, {"id": 60, "type": "*", "text": "i", "parent": 50, "children": [], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 51}}, {"id": 61, "type": "ERROR", "text": "o", "parent": 50, "children": [], "start_point": {"row": 34, "column": 51}, "end_point": {"row": 34, "column": 52}}, {"id": 62, "type": "identifier", "text": "nary ", "parent": 50, "children": [], "start_point": {"row": 34, "column": 52}, "end_point": {"row": 34, "column": 57}}, {"id": 63, "type": "--", "text": "", "parent": 49, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 57}}, {"id": 64, "type": "update_expression", "text": "currentPage 4. pageSize 5. nick_name]\n ** \u6ce8\u610f\uff1arela", "parent": null, "children": [65, 79], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 49}}, {"id": 65, "type": "binary_expression", "text": "currentPage 4. pageSize 5. nick_name]\n ** \u6ce8\u610f\uff1arela", "parent": 64, "children": [66, 74, 76, 77, 78], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 49}}, {"id": 66, "type": "unary_expression", "text": "currentPage 4. pageSize 5. ", "parent": 65, "children": [67, 68], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 27}}, {"id": 67, "type": "+", "text": "c", "parent": 66, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 68, "type": "cast_expression", "text": "rrentPage 4. pageSize 5. ", "parent": 66, "children": [69, 73], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 27}}, {"id": 69, "type": "type_descriptor", "text": "rentPage 4. pa", "parent": 68, "children": [70, 71], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 17}}, {"id": 70, "type": "type_identifier", "text": "rentPage 4. ", "parent": 69, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 15}}, {"id": 71, "type": "abstract_pointer_declarator", "text": "a", "parent": 69, "children": [72], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 72, "type": "*", "text": "a", "parent": 71, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 73, "type": "identifier", "text": "eSize 5. ", "parent": 68, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 27}}, {"id": 74, "type": "ERROR", "text": "nick_name]\n **", "parent": 65, "children": [75], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 41}}, {"id": 75, "type": "identifier", "text": "ck_name]\n **", "parent": 74, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 41}}, {"id": 76, "type": "*", "text": "\u6ce8", "parent": 65, "children": [], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 43}}, {"id": 77, "type": "ERROR", "text": "\u610f", "parent": 65, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 44}}, {"id": 78, "type": "identifier", "text": "\uff1arela", "parent": 65, "children": [], "start_point": {"row": 41, "column": 44}, "end_point": {"row": 41, "column": 49}}, {"id": 79, "type": "--", "text": "", "parent": 64, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 49}}, {"id": 80, "type": "update_expression", "text": "onary *)param;\n\n/**\n \u83b7\u53d6\u5f53\u524d\u6d88\u606f\u514d\u6253\u6270\u8bbe\u7f6e\n \n @param param \u83b7\u53d6\u8bbe\u7f6e", "parent": null, "children": [81, 95], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 53}}, {"id": 81, "type": "binary_expression", "text": "onary *)param;\n\n/**\n \u83b7\u53d6\u5f53\u524d\u6d88\u606f\u514d\u6253\u6270\u8bbe\u7f6e\n \n @param param \u83b7\u53d6\u8bbe\u7f6e", "parent": 80, "children": [82, 90, 92, 93, 94], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 53}}, {"id": 82, "type": "unary_expression", "text": "onary *)param;\n\n/**\n \u83b7\u53d6\u5f53\u524d\u6d88\u606f\u514d\u6253\u6270\u8bbe", "parent": 81, "children": [83, 84], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 31}}, {"id": 83, "type": "+", "text": "o", "parent": 82, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 84, "type": "cast_expression", "text": "ary *)param;\n\n/**\n \u83b7\u53d6\u5f53\u524d\u6d88\u606f\u514d\u6253\u6270\u8bbe", "parent": 82, "children": [85, 89], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 31}}, {"id": 85, "type": "type_descriptor", "text": "ry *)param;\n\n/", "parent": 84, "children": [86, 87], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 17}}, {"id": 86, "type": "type_identifier", "text": "ry *)param;\n", "parent": 85, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 15}}, {"id": 87, "type": "abstract_pointer_declarator", "text": "/", "parent": 85, "children": [88], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 88, "type": "*", "text": "/", "parent": 87, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 89, "type": "identifier", "text": "*\n \u83b7\u53d6\u5f53\u524d\u6d88\u606f\u514d\u6253\u6270\u8bbe", "parent": 84, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 31}}, {"id": 90, "type": "ERROR", "text": "\u7f6e\n \n @param pa", "parent": 81, "children": [91], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 45}}, {"id": 91, "type": "identifier", "text": " \n @param pa", "parent": 90, "children": [], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 45}}, {"id": 92, "type": "*", "text": "a", "parent": 81, "children": [], "start_point": {"row": 50, "column": 46}, "end_point": {"row": 50, "column": 47}}, {"id": 93, "type": "ERROR", "text": "m", "parent": 81, "children": [], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 48}}, {"id": 94, "type": "identifier", "text": " \u83b7\u53d6\u8bbe\u7f6e", "parent": 81, "children": [], "start_point": {"row": 50, "column": 48}, "end_point": {"row": 50, "column": 53}}, {"id": 95, "type": "--", "text": "", "parent": 80, "children": [], "start_point": {"row": 50, "column": 53}, "end_point": {"row": 50, "column": 53}}, {"id": 96, "type": "update_expression", "text": "ry *)getLocalSet:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u7fa4\u7ec4\u4e2d\u6210\u5458\u4fe1", "parent": null, "children": [97, 109], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 54}}, {"id": 97, "type": "binary_expression", "text": "ry *)getLocalSet:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u7fa4\u7ec4\u4e2d\u6210\u5458\u4fe1", "parent": 96, "children": [98, 104, 106, 107, 108], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 54}}, {"id": 98, "type": "unary_expression", "text": "ry *)getLocalSet:(NSDictionary *", "parent": 97, "children": [99, 100], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 32}}, {"id": 99, "type": "+", "text": "r", "parent": 98, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 1}}, {"id": 100, "type": "cast_expression", "text": " *)getLocalSet:(NSDictionary *", "parent": 98, "children": [101, 103], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 32}}, {"id": 101, "type": "type_descriptor", "text": "*)getLocalSet:", "parent": 100, "children": [102], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 17}}, {"id": 102, "type": "type_identifier", "text": "*)getLocalSe", "parent": 101, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 15}}, {"id": 103, "type": "identifier", "text": "NSDictionary *", "parent": 100, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 32}}, {"id": 104, "type": "ERROR", "text": ")param;\n\n/**\n ", "parent": 97, "children": [105], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 46}}, {"id": 105, "type": "identifier", "text": "aram;\n\n/**\n ", "parent": 104, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 46}}, {"id": 106, "type": "*", "text": "\u53d6", "parent": 97, "children": [], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 48}}, {"id": 107, "type": "ERROR", "text": "\u7fa4", "parent": 97, "children": [], "start_point": {"row": 57, "column": 48}, "end_point": {"row": 57, "column": 49}}, {"id": 108, "type": "identifier", "text": "\u7ec4\u4e2d\u6210\u5458\u4fe1", "parent": 97, "children": [], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 54}}, {"id": 109, "type": "--", "text": "", "parent": 96, "children": [], "start_point": {"row": 57, "column": 54}, "end_point": {"row": 57, "column": 54}}, {"id": 110, "type": "update_expression", "text": "", "parent": null, "children": [111, 125], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 51}}, {"id": 111, "type": "binary_expression", "text": "", "parent": 110, "children": [112, 120, 122, 123, 124], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 51}}, {"id": 112, "type": "unary_expression", "text": "", "parent": 111, "children": [113, 114], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 29}}, {"id": 113, "type": "+", "text": "", "parent": 112, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 1}}, {"id": 114, "type": "cast_expression", "text": "", "parent": 112, "children": [115, 119], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 29}}, {"id": 115, "type": "type_descriptor", "text": "", "parent": 114, "children": [116, 117], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 17}}, {"id": 116, "type": "type_identifier", "text": "", "parent": 115, "children": [], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 15}}, {"id": 117, "type": "abstract_pointer_declarator", "text": "", "parent": 115, "children": [118], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 118, "type": "*", "text": "", "parent": 117, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 119, "type": "identifier", "text": "", "parent": 114, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 29}}, {"id": 120, "type": "ERROR", "text": "", "parent": 111, "children": [121], "start_point": {"row": 67, "column": 29}, "end_point": {"row": 67, "column": 43}}, {"id": 121, "type": "identifier", "text": "", "parent": 120, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 43}}, {"id": 122, "type": "*", "text": "", "parent": 111, "children": [], "start_point": {"row": 67, "column": 44}, "end_point": {"row": 67, "column": 45}}, {"id": 123, "type": "ERROR", "text": "", "parent": 111, "children": [], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 46}}, {"id": 124, "type": "identifier", "text": "", "parent": 111, "children": [], "start_point": {"row": 67, "column": 46}, "end_point": {"row": 67, "column": 51}}, {"id": 125, "type": "--", "text": "", "parent": 110, "children": [], "start_point": {"row": 67, "column": 51}, "end_point": {"row": 67, "column": 51}}, {"id": 126, "type": "ERROR", "text": "", "parent": null, "children": [127, 141, 142], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 76, "column": 4}}, {"id": 127, "type": "binary_expression", "text": "", "parent": 126, "children": [128, 136, 138, 139, 140], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 56}}, {"id": 128, "type": "unary_expression", "text": "", "parent": 127, "children": [129, 130], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 34}}, {"id": 129, "type": "+", "text": "", "parent": 128, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 130, "type": "cast_expression", "text": "", "parent": 128, "children": [131, 135], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 34}}, {"id": 131, "type": "type_descriptor", "text": "", "parent": 130, "children": [132, 133], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 17}}, {"id": 132, "type": "type_identifier", "text": "", "parent": 131, "children": [], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 15}}, {"id": 133, "type": "abstract_pointer_declarator", "text": "", "parent": 131, "children": [134], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 17}}, {"id": 134, "type": "*", "text": "", "parent": 133, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 17}}, {"id": 135, "type": "identifier", "text": "", "parent": 130, "children": [], "start_point": {"row": 75, "column": 18}, "end_point": {"row": 75, "column": 34}}, {"id": 136, "type": "ERROR", "text": "", "parent": 127, "children": [137], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 48}}, {"id": 137, "type": "identifier", "text": "", "parent": 136, "children": [], "start_point": {"row": 75, "column": 36}, "end_point": {"row": 75, "column": 48}}, {"id": 138, "type": "*", "text": "", "parent": 127, "children": [], "start_point": {"row": 75, "column": 49}, "end_point": {"row": 75, "column": 50}}, {"id": 139, "type": "ERROR", "text": "", "parent": 127, "children": [], "start_point": {"row": 75, "column": 50}, "end_point": {"row": 75, "column": 51}}, {"id": 140, "type": "identifier", "text": "", "parent": 127, "children": [], "start_point": {"row": 75, "column": 51}, "end_point": {"row": 75, "column": 56}}, {"id": 141, "type": "ERROR", "text": "", "parent": 126, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 142, "type": "identifier", "text": "", "parent": 126, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [8, 9], "modules": [], "enums": []}, "statements": {"expressions": [11, 13, 19, 20, 21, 23, 33, 34, 35, 37, 49, 50, 51, 52, 64, 65, 66, 68, 80, 81, 82, 84, 96, 97, 98, 100, 110, 111, 112, 114, 127, 128, 130], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 15, 18, 25, 26, 28, 31, 39, 42, 44, 47, 54, 57, 59, 62, 70, 73, 75, 78, 86, 89, 91, 94, 102, 103, 105, 108, 116, 119, 121, 124, 132, 135, 137, 140, 142], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [10], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 8, "text": "etKitHeader.h\"\n\n+ (NSDictionar"}, {"node_id": 9, "text": "etKitHea"}]}, "original_source_code": "//\n// XXGJSycncNetKit.h\n// xxdcchat_ios\n//\n// Created by \u5218\u671d\u9f99 on 2017/3/19.\n// Copyright \u00a9 2017\u5e74 \u5218\u671d\u9f99. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface XXGJSycncNetKit : NSObject\n#include \"XXGJNetKitHeader.h\"\n\n+ (NSDictionary *)getCityFile;\n\n/**\n \u67e5\u627e\u4e00\u4e2a\u7fa4\u7ec4\n \n @param param \u67e5\u627e\u53c2\u6570[1. group_id]\n */\n+ (NSDictionary *)searchGroup:(NSDictionary *)param;\n\n/**\n \u5224\u65ad\u81ea\u5df1\u662f\u5426\u5728\u8be5\u7fa4\u7ec4\u91cc\n \n @param param \u5224\u65ad\u53c2\u6570[1. user_id 2. group_id]\n */\n+ (NSDictionary *)checkInGroup:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u7528\u6237\u8ddf\u81ea\u5df1\u7684\u5173\u7cfb\n \n @param param \u83b7\u53d6\u5173\u7cfb\u53c2\u6570 [1. user_id, 2. from_user_id]\n */\n+ (NSDictionary *)getPersonRelation:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u597d\u53cb\u4fe1\u606f\n \n @param param \u597d\u53cb\u4fe1\u606f\u53c2\u6570 [1. user_id]\n */\n+ (NSDictionary *)getFriend:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u597d\u53cb\u5217\u8868\n \n @param param \u83b7\u53d6\u597d\u53cb\u5217\u8868\u53c2\u6570 [1. user_id 2. relation_type 3. currentPage 4. pageSize 5. nick_name]\n ** \u6ce8\u610f\uff1arelation_type 0-\u4e2a\u4eba\u597d\u53cb 1-\u7fa4\u597d\u53cb *\n ** \u6ce8\u610f\uff1anick_name \u4e3a\u9009\u586b\u53c2\u6570 *\n */\n+ (NSDictionary *)getFriendList:(NSDictionary *)param;\n\n/**\n \u6839\u636e\u7528\u6237\u540d\u67e5\u8be2\u5168\u4f53\u7528\u6237\u5217\u8868\n \n @param param \u67e5\u8be2\u53c2\u6570 [1. nick_name 2. current_page 3. page_size]\n */\n+ (NSDictionary *)searchUserList:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u5f53\u524d\u6d88\u606f\u514d\u6253\u6270\u8bbe\u7f6e\n \n @param param \u83b7\u53d6\u8bbe\u7f6e\u53c2\u6570[1. user_id\uff0c2. friend_id\uff0c3. type]\n ** \u6ce8\u610f user_id\u662f\u5f53\u524d\u7528\u6237id *\n ** \u6ce8\u610f friend_id\u662f\u597d\u53cb\u6216\u7fa4id *\n ** \u6ce8\u610f type\uff1a0\u597d\u53cb 1\u7fa4 *\n */\n+ (NSDictionary *)getLocalSet:(NSDictionary *)param;\n\n/**\n \u83b7\u53d6\u7fa4\u7ec4\u4e2d\u6210\u5458\u4fe1\u606f\n \n @param param \u53c2\u6570\n @return \u8fd4\u56de\u4fe1\u606f\n */\n+ (NSDictionary *)getGroupUserList:(NSDictionary *)param;\n@end\n"}
226
c
/* * Copyright (C) 2017 XRADIO TECHNOLOGY CO., LTD. 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 XRADIO TECHNOLOGY CO., LTD. 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. */ #ifndef _UTIL_ATOMIC_H_ #define _UTIL_ATOMIC_H_ #include <stdint.h> #include "compiler.h" static __inline int arch_atomic_read(volatile int *v) { return (*v); } static __inline int arch_atomic_set(volatile int *v, int i) { *v = i; return i; } int arch_atomic_add_return(int *v, int i); int arch_atomic_sub_return(int *v, int i); int arch_atomic_and_return(int *v, int i); int arch_atomic_or_return(int *v, int i); int arch_atomic_xor_return(int *v, int i); int arch_atomic_nand_return(int *v, int i); static __inline int arch_atomic_inc_return(int *v) { return arch_atomic_add_return(v, 1); } static __inline int arch_atomic_dec_return(int *v) { return arch_atomic_sub_return(v, 1); } static __inline void arch_atomic_add(int *v, int i) { arch_atomic_add_return(v, i); } static __inline void arch_atomic_sub(int *v, int i) { arch_atomic_sub_return(v, i); } static __inline void arch_atomic_and(int *v, int i) { arch_atomic_and_return(v, i); } static __inline void arch_atomic_or(int *v, int i) { arch_atomic_or_return(v, i); } static __inline void arch_atomic_xor(int *v, int i) { arch_atomic_xor_return(v, i); } static __inline void arch_atomic_nand(int *v, int i) { arch_atomic_nand_return(v, i); } static __inline void arch_atomic_inc(int *v) { arch_atomic_add_return(v, 1); } static __inline void arch_atomic_dec(int *v) { arch_atomic_sub_return(v, 1); } int arch_atomic_xchg(int *v, int i); int arch_atomic_cmpxchg(int *v, int old, int new_v); void arch_atomic_clear_mask(uint32_t *addr, uint32_t mask); void arch_atomic_set_mask(uint32_t *addr, uint32_t mask); #endif /* _UTIL_ATOMIC_H_ */
34.34
92
(translation_unit) "/*\n * Copyright (C) 2017 XRADIO TECHNOLOGY CO., LTD. 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\n * distribution.\n * 3. Neither the name of XRADIO TECHNOLOGY CO., LTD. nor the names of\n * its contributors may be used to endorse or promote products derived\n * 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\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef _UTIL_ATOMIC_H_\n#define _UTIL_ATOMIC_H_\n\n#include <stdint.h>\n#include "compiler.h"\n\nstatic __inline int arch_atomic_read(volatile int *v)\n{\n return (*v);\n}\n\nstatic __inline int arch_atomic_set(volatile int *v, int i)\n{\n *v = i;\n return i;\n}\n\nint arch_atomic_add_return(int *v, int i);\nint arch_atomic_sub_return(int *v, int i);\nint arch_atomic_and_return(int *v, int i);\nint arch_atomic_or_return(int *v, int i);\nint arch_atomic_xor_return(int *v, int i);\nint arch_atomic_nand_return(int *v, int i);\n\nstatic __inline int arch_atomic_inc_return(int *v)\n{\n return arch_atomic_add_return(v, 1);\n}\n\nstatic __inline int arch_atomic_dec_return(int *v)\n{\n return arch_atomic_sub_return(v, 1);\n}\n\nstatic __inline void arch_atomic_add(int *v, int i)\n{\n arch_atomic_add_return(v, i);\n}\n\nstatic __inline void arch_atomic_sub(int *v, int i)\n{\n arch_atomic_sub_return(v, i);\n}\n\nstatic __inline void arch_atomic_and(int *v, int i)\n{\n arch_atomic_and_return(v, i);\n}\n\nstatic __inline void arch_atomic_or(int *v, int i)\n{\n arch_atomic_or_return(v, i);\n}\n\nstatic __inline void arch_atomic_xor(int *v, int i)\n{\n arch_atomic_xor_return(v, i);\n}\n\nstatic __inline void arch_atomic_nand(int *v, int i)\n{\n arch_atomic_nand_return(v, i);\n}\n\nstatic __inline void arch_atomic_inc(int *v)\n{\n arch_atomic_add_return(v, 1);\n}\n\nstatic __inline void arch_atomic_dec(int *v)\n{\n arch_atomic_sub_return(v, 1);\n}\n\nint arch_atomic_xchg(int *v, int i);\nint arch_atomic_cmpxchg(int *v, int old, int new_v);\n\nvoid arch_atomic_clear_mask(uint32_t *addr, uint32_t mask);\nvoid arch_atomic_set_mask(uint32_t *addr, uint32_t mask);\n\n#endif /* _UTIL_ATOMIC_H_ */\n" (comment) "/*\n * Copyright (C) 2017 XRADIO TECHNOLOGY CO., LTD. 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\n * distribution.\n * 3. Neither the name of XRADIO TECHNOLOGY CO., LTD. nor the names of\n * its contributors may be used to endorse or promote products derived\n * 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\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */" (preproc_ifdef) "#ifndef _UTIL_ATOMIC_H_\n#define _UTIL_ATOMIC_H_\n\n#include <stdint.h>\n#include "compiler.h"\n\nstatic __inline int arch_atomic_read(volatile int *v)\n{\n return (*v);\n}\n\nstatic __inline int arch_atomic_set(volatile int *v, int i)\n{\n *v = i;\n return i;\n}\n\nint arch_atomic_add_return(int *v, int i);\nint arch_atomic_sub_return(int *v, int i);\nint arch_atomic_and_return(int *v, int i);\nint arch_atomic_or_return(int *v, int i);\nint arch_atomic_xor_return(int *v, int i);\nint arch_atomic_nand_return(int *v, int i);\n\nstatic __inline int arch_atomic_inc_return(int *v)\n{\n return arch_atomic_add_return(v, 1);\n}\n\nstatic __inline int arch_atomic_dec_return(int *v)\n{\n return arch_atomic_sub_return(v, 1);\n}\n\nstatic __inline void arch_atomic_add(int *v, int i)\n{\n arch_atomic_add_return(v, i);\n}\n\nstatic __inline void arch_atomic_sub(int *v, int i)\n{\n arch_atomic_sub_return(v, i);\n}\n\nstatic __inline void arch_atomic_and(int *v, int i)\n{\n arch_atomic_and_return(v, i);\n}\n\nstatic __inline void arch_atomic_or(int *v, int i)\n{\n arch_atomic_or_return(v, i);\n}\n\nstatic __inline void arch_atomic_xor(int *v, int i)\n{\n arch_atomic_xor_return(v, i);\n}\n\nstatic __inline void arch_atomic_nand(int *v, int i)\n{\n arch_atomic_nand_return(v, i);\n}\n\nstatic __inline void arch_atomic_inc(int *v)\n{\n arch_atomic_add_return(v, 1);\n}\n\nstatic __inline void arch_atomic_dec(int *v)\n{\n arch_atomic_sub_return(v, 1);\n}\n\nint arch_atomic_xchg(int *v, int i);\nint arch_atomic_cmpxchg(int *v, int old, int new_v);\n\nvoid arch_atomic_clear_mask(uint32_t *addr, uint32_t mask);\nvoid arch_atomic_set_mask(uint32_t *addr, uint32_t mask);\n\n#endif" (#ifndef) "#ifndef" (identifier) "_UTIL_ATOMIC_H_" (preproc_def) "#define _UTIL_ATOMIC_H_\n" (#define) "#define" (identifier) "_UTIL_ATOMIC_H_" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include "compiler.h"\n" (#include) "#include" (string_literal) ""compiler.h"" (") """ (string_content) "compiler.h" (") """ (function_definition) "static __inline int arch_atomic_read(volatile int *v)\n{\n return (*v);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "int" (function_declarator) "arch_atomic_read(volatile int *v)" (identifier) "arch_atomic_read" (parameter_list) "(volatile int *v)" (() "(" (parameter_declaration) "volatile int *v" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (compound_statement) "{\n return (*v);\n}" ({) "{" (return_statement) "return (*v);" (return) "return" (parenthesized_expression) "(*v)" (() "(" (pointer_expression) "*v" (*) "*" (identifier) "v" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline int arch_atomic_set(volatile int *v, int i)\n{\n *v = i;\n return i;\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "int" (function_declarator) "arch_atomic_set(volatile int *v, int i)" (identifier) "arch_atomic_set" (parameter_list) "(volatile int *v, int i)" (() "(" (parameter_declaration) "volatile int *v" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n *v = i;\n return i;\n}" ({) "{" (expression_statement) "*v = i;" (assignment_expression) "*v = i" (pointer_expression) "*v" (*) "*" (identifier) "v" (=) "=" (identifier) "i" (;) ";" (return_statement) "return i;" (return) "return" (identifier) "i" (;) ";" (}) "}" (declaration) "int arch_atomic_add_return(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_add_return(int *v, int i)" (identifier) "arch_atomic_add_return" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "int arch_atomic_sub_return(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_sub_return(int *v, int i)" (identifier) "arch_atomic_sub_return" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "int arch_atomic_and_return(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_and_return(int *v, int i)" (identifier) "arch_atomic_and_return" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "int arch_atomic_or_return(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_or_return(int *v, int i)" (identifier) "arch_atomic_or_return" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "int arch_atomic_xor_return(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_xor_return(int *v, int i)" (identifier) "arch_atomic_xor_return" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "int arch_atomic_nand_return(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_nand_return(int *v, int i)" (identifier) "arch_atomic_nand_return" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (function_definition) "static __inline int arch_atomic_inc_return(int *v)\n{\n return arch_atomic_add_return(v, 1);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "int" (function_declarator) "arch_atomic_inc_return(int *v)" (identifier) "arch_atomic_inc_return" (parameter_list) "(int *v)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (compound_statement) "{\n return arch_atomic_add_return(v, 1);\n}" ({) "{" (return_statement) "return arch_atomic_add_return(v, 1);" (return) "return" (call_expression) "arch_atomic_add_return(v, 1)" (identifier) "arch_atomic_add_return" (argument_list) "(v, 1)" (() "(" (identifier) "v" (,) "," (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline int arch_atomic_dec_return(int *v)\n{\n return arch_atomic_sub_return(v, 1);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "int" (function_declarator) "arch_atomic_dec_return(int *v)" (identifier) "arch_atomic_dec_return" (parameter_list) "(int *v)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (compound_statement) "{\n return arch_atomic_sub_return(v, 1);\n}" ({) "{" (return_statement) "return arch_atomic_sub_return(v, 1);" (return) "return" (call_expression) "arch_atomic_sub_return(v, 1)" (identifier) "arch_atomic_sub_return" (argument_list) "(v, 1)" (() "(" (identifier) "v" (,) "," (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_add(int *v, int i)\n{\n arch_atomic_add_return(v, i);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_add(int *v, int i)" (identifier) "arch_atomic_add" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n arch_atomic_add_return(v, i);\n}" ({) "{" (expression_statement) "arch_atomic_add_return(v, i);" (call_expression) "arch_atomic_add_return(v, i)" (identifier) "arch_atomic_add_return" (argument_list) "(v, i)" (() "(" (identifier) "v" (,) "," (identifier) "i" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_sub(int *v, int i)\n{\n arch_atomic_sub_return(v, i);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_sub(int *v, int i)" (identifier) "arch_atomic_sub" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n arch_atomic_sub_return(v, i);\n}" ({) "{" (expression_statement) "arch_atomic_sub_return(v, i);" (call_expression) "arch_atomic_sub_return(v, i)" (identifier) "arch_atomic_sub_return" (argument_list) "(v, i)" (() "(" (identifier) "v" (,) "," (identifier) "i" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_and(int *v, int i)\n{\n arch_atomic_and_return(v, i);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_and(int *v, int i)" (identifier) "arch_atomic_and" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n arch_atomic_and_return(v, i);\n}" ({) "{" (expression_statement) "arch_atomic_and_return(v, i);" (call_expression) "arch_atomic_and_return(v, i)" (identifier) "arch_atomic_and_return" (argument_list) "(v, i)" (() "(" (identifier) "v" (,) "," (identifier) "i" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_or(int *v, int i)\n{\n arch_atomic_or_return(v, i);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_or(int *v, int i)" (identifier) "arch_atomic_or" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n arch_atomic_or_return(v, i);\n}" ({) "{" (expression_statement) "arch_atomic_or_return(v, i);" (call_expression) "arch_atomic_or_return(v, i)" (identifier) "arch_atomic_or_return" (argument_list) "(v, i)" (() "(" (identifier) "v" (,) "," (identifier) "i" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_xor(int *v, int i)\n{\n arch_atomic_xor_return(v, i);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_xor(int *v, int i)" (identifier) "arch_atomic_xor" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n arch_atomic_xor_return(v, i);\n}" ({) "{" (expression_statement) "arch_atomic_xor_return(v, i);" (call_expression) "arch_atomic_xor_return(v, i)" (identifier) "arch_atomic_xor_return" (argument_list) "(v, i)" (() "(" (identifier) "v" (,) "," (identifier) "i" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_nand(int *v, int i)\n{\n arch_atomic_nand_return(v, i);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_nand(int *v, int i)" (identifier) "arch_atomic_nand" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (compound_statement) "{\n arch_atomic_nand_return(v, i);\n}" ({) "{" (expression_statement) "arch_atomic_nand_return(v, i);" (call_expression) "arch_atomic_nand_return(v, i)" (identifier) "arch_atomic_nand_return" (argument_list) "(v, i)" (() "(" (identifier) "v" (,) "," (identifier) "i" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_inc(int *v)\n{\n arch_atomic_add_return(v, 1);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_inc(int *v)" (identifier) "arch_atomic_inc" (parameter_list) "(int *v)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (compound_statement) "{\n arch_atomic_add_return(v, 1);\n}" ({) "{" (expression_statement) "arch_atomic_add_return(v, 1);" (call_expression) "arch_atomic_add_return(v, 1)" (identifier) "arch_atomic_add_return" (argument_list) "(v, 1)" (() "(" (identifier) "v" (,) "," (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "static __inline void arch_atomic_dec(int *v)\n{\n arch_atomic_sub_return(v, 1);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline" (__inline) "__inline" (primitive_type) "void" (function_declarator) "arch_atomic_dec(int *v)" (identifier) "arch_atomic_dec" (parameter_list) "(int *v)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (compound_statement) "{\n arch_atomic_sub_return(v, 1);\n}" ({) "{" (expression_statement) "arch_atomic_sub_return(v, 1);" (call_expression) "arch_atomic_sub_return(v, 1)" (identifier) "arch_atomic_sub_return" (argument_list) "(v, 1)" (() "(" (identifier) "v" (,) "," (number_literal) "1" ()) ")" (;) ";" (}) "}" (declaration) "int arch_atomic_xchg(int *v, int i);" (primitive_type) "int" (function_declarator) "arch_atomic_xchg(int *v, int i)" (identifier) "arch_atomic_xchg" (parameter_list) "(int *v, int i)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "int arch_atomic_cmpxchg(int *v, int old, int new_v);" (primitive_type) "int" (function_declarator) "arch_atomic_cmpxchg(int *v, int old, int new_v)" (identifier) "arch_atomic_cmpxchg" (parameter_list) "(int *v, int old, int new_v)" (() "(" (parameter_declaration) "int *v" (primitive_type) "int" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int old" (primitive_type) "int" (identifier) "old" (,) "," (parameter_declaration) "int new_v" (primitive_type) "int" (identifier) "new_v" ()) ")" (;) ";" (declaration) "void arch_atomic_clear_mask(uint32_t *addr, uint32_t mask);" (primitive_type) "void" (function_declarator) "arch_atomic_clear_mask(uint32_t *addr, uint32_t mask)" (identifier) "arch_atomic_clear_mask" (parameter_list) "(uint32_t *addr, uint32_t mask)" (() "(" (parameter_declaration) "uint32_t *addr" (primitive_type) "uint32_t" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "uint32_t mask" (primitive_type) "uint32_t" (identifier) "mask" ()) ")" (;) ";" (declaration) "void arch_atomic_set_mask(uint32_t *addr, uint32_t mask);" (primitive_type) "void" (function_declarator) "arch_atomic_set_mask(uint32_t *addr, uint32_t mask)" (identifier) "arch_atomic_set_mask" (parameter_list) "(uint32_t *addr, uint32_t mask)" (() "(" (parameter_declaration) "uint32_t *addr" (primitive_type) "uint32_t" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "uint32_t mask" (primitive_type) "uint32_t" (identifier) "mask" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* _UTIL_ATOMIC_H_ */"
576
0
{"language": "c", "success": true, "metadata": {"lines": 92, "avg_line_length": 34.34, "nodes": 380, "errors": 0, "source_hash": "a7daabc3d65f07a0367cf1d106d6d86866f20c2243b66c6cc44956dfa5483e26", "categorized_nodes": 223}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _UTIL_ATOMIC_H_\n#define _UTIL_ATOMIC_H_\n\n#include <stdint.h>\n#include \"compiler.h\"\n\nstatic __inline int arch_atomic_read(volatile int *v)\n{\n\treturn (*v);\n}\n\nstatic __inline int arch_atomic_set(volatile int *v, int i)\n{\n\t*v = i;\n\treturn i;\n}\n\nint arch_atomic_add_return(int *v, int i);\nint arch_atomic_sub_return(int *v, int i);\nint arch_atomic_and_return(int *v, int i);\nint arch_atomic_or_return(int *v, int i);\nint arch_atomic_xor_return(int *v, int i);\nint arch_atomic_nand_return(int *v, int i);\n\nstatic __inline int arch_atomic_inc_return(int *v)\n{\n\treturn arch_atomic_add_return(v, 1);\n}\n\nstatic __inline int arch_atomic_dec_return(int *v)\n{\n\treturn arch_atomic_sub_return(v, 1);\n}\n\nstatic __inline void arch_atomic_add(int *v, int i)\n{\n\tarch_atomic_add_return(v, i);\n}\n\nstatic __inline void arch_atomic_sub(int *v, int i)\n{\n\tarch_atomic_sub_return(v, i);\n}\n\nstatic __inline void arch_atomic_and(int *v, int i)\n{\n\tarch_atomic_and_return(v, i);\n}\n\nstatic __inline void arch_atomic_or(int *v, int i)\n{\n\tarch_atomic_or_return(v, i);\n}\n\nstatic __inline void arch_atomic_xor(int *v, int i)\n{\n\tarch_atomic_xor_return(v, i);\n}\n\nstatic __inline void arch_atomic_nand(int *v, int i)\n{\n\tarch_atomic_nand_return(v, i);\n}\n\nstatic __inline void arch_atomic_inc(int *v)\n{\n\tarch_atomic_add_return(v, 1);\n}\n\nstatic __inline void arch_atomic_dec(int *v)\n{\n\tarch_atomic_sub_return(v, 1);\n}\n\nint arch_atomic_xchg(int *v, int i);\nint arch_atomic_cmpxchg(int *v, int old, int new_v);\n\nvoid arch_atomic_clear_mask(uint32_t *addr, uint32_t mask);\nvoid arch_atomic_set_mask(uint32_t *addr, uint32_t mask);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 31, 56, 69, 82, 95, 108, 121, 134, 152, 170, 190, 210, 230, 250, 270, 290, 307, 324, 337, 353, 366, 379], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 109, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 2, "type": "identifier", "text": "_UTIL_ATOMIC_H_", "parent": 0, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define _UTIL_ATOMIC_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 5, "type": "identifier", "text": "_UTIL_ATOMIC_H_", "parent": 3, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "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": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"compiler.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"compiler.h\"", "parent": 9, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 21}}, {"id": 12, "type": "function_definition", "text": "static __inline int arch_atomic_read(volatile int *v)\n{\n\treturn (*v);\n}", "parent": 0, "children": [13, 15, 16], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 13, "type": "storage_class_specifier", "text": "__inline", "parent": 12, "children": [14], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 15}}, {"id": 14, "type": "__inline", "text": "__inline", "parent": 13, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 15}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 19}}, {"id": 16, "type": "function_declarator", "text": "arch_atomic_read(volatile int *v)", "parent": 12, "children": [17, 18], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 53}}, {"id": 17, "type": "identifier", "text": "arch_atomic_read", "parent": 16, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 36}}, {"id": 18, "type": "parameter_list", "text": "(volatile int *v)", "parent": 16, "children": [19], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 53}}, {"id": 19, "type": "parameter_declaration", "text": "volatile int *v", "parent": 18, "children": [20, 22, 23], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 52}}, {"id": 20, "type": "type_qualifier", "text": "volatile", "parent": 19, "children": [21], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 45}}, {"id": 21, "type": "volatile", "text": "volatile", "parent": 20, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 45}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 19, "children": [], "start_point": {"row": 35, "column": 46}, "end_point": {"row": 35, "column": 49}}, {"id": 23, "type": "pointer_declarator", "text": "*v", "parent": 19, "children": [24, 25], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 52}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 51}}, {"id": 25, "type": "identifier", "text": "v", "parent": 23, "children": [], "start_point": {"row": 35, "column": 51}, "end_point": {"row": 35, "column": 52}}, {"id": 26, "type": "return_statement", "text": "return (*v);", "parent": 12, "children": [27], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 13}}, {"id": 27, "type": "parenthesized_expression", "text": "(*v)", "parent": 26, "children": [28], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 28, "type": "pointer_expression", "text": "*v", "parent": 27, "children": [29, 30], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 11}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 10}}, {"id": 30, "type": "identifier", "text": "v", "parent": 28, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 11}}, {"id": 31, "type": "function_definition", "text": "static __inline int arch_atomic_set(volatile int *v, int i)\n{\n\t*v = i;\n\treturn i;\n}", "parent": 0, "children": [32, 34, 35], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 32, "type": "storage_class_specifier", "text": "__inline", "parent": 31, "children": [33], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 15}}, {"id": 33, "type": "__inline", "text": "__inline", "parent": 32, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 15}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 19}}, {"id": 35, "type": "function_declarator", "text": "arch_atomic_set(volatile int *v, int i)", "parent": 31, "children": [36, 37], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 59}}, {"id": 36, "type": "identifier", "text": "arch_atomic_set", "parent": 35, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 35}}, {"id": 37, "type": "parameter_list", "text": "(volatile int *v, int i)", "parent": 35, "children": [38, 45], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 59}}, {"id": 38, "type": "parameter_declaration", "text": "volatile int *v", "parent": 37, "children": [39, 41, 42], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 51}}, {"id": 39, "type": "type_qualifier", "text": "volatile", "parent": 38, "children": [40], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 44}}, {"id": 40, "type": "volatile", "text": "volatile", "parent": 39, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 44}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 40, "column": 45}, "end_point": {"row": 40, "column": 48}}, {"id": 42, "type": "pointer_declarator", "text": "*v", "parent": 38, "children": [43, 44], "start_point": {"row": 40, "column": 49}, "end_point": {"row": 40, "column": 51}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 40, "column": 49}, "end_point": {"row": 40, "column": 50}}, {"id": 44, "type": "identifier", "text": "v", "parent": 42, "children": [], "start_point": {"row": 40, "column": 50}, "end_point": {"row": 40, "column": 51}}, {"id": 45, "type": "parameter_declaration", "text": "int i", "parent": 37, "children": [46, 47], "start_point": {"row": 40, "column": 53}, "end_point": {"row": 40, "column": 58}}, {"id": 46, "type": "primitive_type", "text": "int", "parent": 45, "children": [], "start_point": {"row": 40, "column": 53}, "end_point": {"row": 40, "column": 56}}, {"id": 47, "type": "identifier", "text": "i", "parent": 45, "children": [], "start_point": {"row": 40, "column": 57}, "end_point": {"row": 40, "column": 58}}, {"id": 48, "type": "assignment_expression", "text": "*v = i", "parent": 31, "children": [49, 52, 53], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 7}}, {"id": 49, "type": "pointer_expression", "text": "*v", "parent": 48, "children": [50, 51], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 3}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 2}}, {"id": 51, "type": "identifier", "text": "v", "parent": 49, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 3}}, {"id": 52, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 53, "type": "identifier", "text": "i", "parent": 48, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 7}}, {"id": 54, "type": "return_statement", "text": "return i;", "parent": 31, "children": [55], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 10}}, {"id": 55, "type": "identifier", "text": "i", "parent": 54, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 9}}, {"id": 56, "type": "declaration", "text": "int arch_atomic_add_return(int *v, int i);", "parent": 0, "children": [57, 58], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 42}}, {"id": 57, "type": "primitive_type", "text": "int", "parent": 56, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 3}}, {"id": 58, "type": "function_declarator", "text": "arch_atomic_add_return(int *v, int i)", "parent": 56, "children": [59, 60], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 41}}, {"id": 59, "type": "identifier", "text": "arch_atomic_add_return", "parent": 58, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 26}}, {"id": 60, "type": "parameter_list", "text": "(int *v, int i)", "parent": 58, "children": [61, 66], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 41}}, {"id": 61, "type": "parameter_declaration", "text": "int *v", "parent": 60, "children": [62, 63], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 33}}, {"id": 62, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 30}}, {"id": 63, "type": "pointer_declarator", "text": "*v", "parent": 61, "children": [64, 65], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 33}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 32}}, {"id": 65, "type": "identifier", "text": "v", "parent": 63, "children": [], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 33}}, {"id": 66, "type": "parameter_declaration", "text": "int i", "parent": 60, "children": [67, 68], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 40}}, {"id": 67, "type": "primitive_type", "text": "int", "parent": 66, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 38}}, {"id": 68, "type": "identifier", "text": "i", "parent": 66, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 40}}, {"id": 69, "type": "declaration", "text": "int arch_atomic_sub_return(int *v, int i);", "parent": 0, "children": [70, 71], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 42}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 3}}, {"id": 71, "type": "function_declarator", "text": "arch_atomic_sub_return(int *v, int i)", "parent": 69, "children": [72, 73], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 41}}, {"id": 72, "type": "identifier", "text": "arch_atomic_sub_return", "parent": 71, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 26}}, {"id": 73, "type": "parameter_list", "text": "(int *v, int i)", "parent": 71, "children": [74, 79], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 41}}, {"id": 74, "type": "parameter_declaration", "text": "int *v", "parent": 73, "children": [75, 76], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 33}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 30}}, {"id": 76, "type": "pointer_declarator", "text": "*v", "parent": 74, "children": [77, 78], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 33}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 32}}, {"id": 78, "type": "identifier", "text": "v", "parent": 76, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 33}}, {"id": 79, "type": "parameter_declaration", "text": "int i", "parent": 73, "children": [80, 81], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 40}}, {"id": 80, "type": "primitive_type", "text": "int", "parent": 79, "children": [], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 38}}, {"id": 81, "type": "identifier", "text": "i", "parent": 79, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 40}}, {"id": 82, "type": "declaration", "text": "int arch_atomic_and_return(int *v, int i);", "parent": 0, "children": [83, 84], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 42}}, {"id": 83, "type": "primitive_type", "text": "int", "parent": 82, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 3}}, {"id": 84, "type": "function_declarator", "text": "arch_atomic_and_return(int *v, int i)", "parent": 82, "children": [85, 86], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 41}}, {"id": 85, "type": "identifier", "text": "arch_atomic_and_return", "parent": 84, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 26}}, {"id": 86, "type": "parameter_list", "text": "(int *v, int i)", "parent": 84, "children": [87, 92], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 41}}, {"id": 87, "type": "parameter_declaration", "text": "int *v", "parent": 86, "children": [88, 89], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 33}}, {"id": 88, "type": "primitive_type", "text": "int", "parent": 87, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 30}}, {"id": 89, "type": "pointer_declarator", "text": "*v", "parent": 87, "children": [90, 91], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 33}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 32}}, {"id": 91, "type": "identifier", "text": "v", "parent": 89, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 33}}, {"id": 92, "type": "parameter_declaration", "text": "int i", "parent": 86, "children": [93, 94], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 40}}, {"id": 93, "type": "primitive_type", "text": "int", "parent": 92, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 38}}, {"id": 94, "type": "identifier", "text": "i", "parent": 92, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 40}}, {"id": 95, "type": "declaration", "text": "int arch_atomic_or_return(int *v, int i);", "parent": 0, "children": [96, 97], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 41}}, {"id": 96, "type": "primitive_type", "text": "int", "parent": 95, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 97, "type": "function_declarator", "text": "arch_atomic_or_return(int *v, int i)", "parent": 95, "children": [98, 99], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 40}}, {"id": 98, "type": "identifier", "text": "arch_atomic_or_return", "parent": 97, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 25}}, {"id": 99, "type": "parameter_list", "text": "(int *v, int i)", "parent": 97, "children": [100, 105], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 40}}, {"id": 100, "type": "parameter_declaration", "text": "int *v", "parent": 99, "children": [101, 102], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 32}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 29}}, {"id": 102, "type": "pointer_declarator", "text": "*v", "parent": 100, "children": [103, 104], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 32}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 31}}, {"id": 104, "type": "identifier", "text": "v", "parent": 102, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 32}}, {"id": 105, "type": "parameter_declaration", "text": "int i", "parent": 99, "children": [106, 107], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 39}}, {"id": 106, "type": "primitive_type", "text": "int", "parent": 105, "children": [], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 37}}, {"id": 107, "type": "identifier", "text": "i", "parent": 105, "children": [], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 39}}, {"id": 108, "type": "declaration", "text": "int arch_atomic_xor_return(int *v, int i);", "parent": 0, "children": [109, 110], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 42}}, {"id": 109, "type": "primitive_type", "text": "int", "parent": 108, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 3}}, {"id": 110, "type": "function_declarator", "text": "arch_atomic_xor_return(int *v, int i)", "parent": 108, "children": [111, 112], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 41}}, {"id": 111, "type": "identifier", "text": "arch_atomic_xor_return", "parent": 110, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 26}}, {"id": 112, "type": "parameter_list", "text": "(int *v, int i)", "parent": 110, "children": [113, 118], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 41}}, {"id": 113, "type": "parameter_declaration", "text": "int *v", "parent": 112, "children": [114, 115], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 33}}, {"id": 114, "type": "primitive_type", "text": "int", "parent": 113, "children": [], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 30}}, {"id": 115, "type": "pointer_declarator", "text": "*v", "parent": 113, "children": [116, 117], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 33}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 32}}, {"id": 117, "type": "identifier", "text": "v", "parent": 115, "children": [], "start_point": {"row": 50, "column": 32}, "end_point": {"row": 50, "column": 33}}, {"id": 118, "type": "parameter_declaration", "text": "int i", "parent": 112, "children": [119, 120], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 40}}, {"id": 119, "type": "primitive_type", "text": "int", "parent": 118, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 38}}, {"id": 120, "type": "identifier", "text": "i", "parent": 118, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 121, "type": "declaration", "text": "int arch_atomic_nand_return(int *v, int i);", "parent": 0, "children": [122, 123], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 43}}, {"id": 122, "type": "primitive_type", "text": "int", "parent": 121, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 3}}, {"id": 123, "type": "function_declarator", "text": "arch_atomic_nand_return(int *v, int i)", "parent": 121, "children": [124, 125], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 42}}, {"id": 124, "type": "identifier", "text": "arch_atomic_nand_return", "parent": 123, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 27}}, {"id": 125, "type": "parameter_list", "text": "(int *v, int i)", "parent": 123, "children": [126, 131], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 42}}, {"id": 126, "type": "parameter_declaration", "text": "int *v", "parent": 125, "children": [127, 128], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 34}}, {"id": 127, "type": "primitive_type", "text": "int", "parent": 126, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 31}}, {"id": 128, "type": "pointer_declarator", "text": "*v", "parent": 126, "children": [129, 130], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 34}}, {"id": 129, "type": "*", "text": "*", "parent": 128, "children": [], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 33}}, {"id": 130, "type": "identifier", "text": "v", "parent": 128, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 34}}, {"id": 131, "type": "parameter_declaration", "text": "int i", "parent": 125, "children": [132, 133], "start_point": {"row": 51, "column": 36}, "end_point": {"row": 51, "column": 41}}, {"id": 132, "type": "primitive_type", "text": "int", "parent": 131, "children": [], "start_point": {"row": 51, "column": 36}, "end_point": {"row": 51, "column": 39}}, {"id": 133, "type": "identifier", "text": "i", "parent": 131, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 41}}, {"id": 134, "type": "function_definition", "text": "static __inline int arch_atomic_inc_return(int *v)\n{\n\treturn arch_atomic_add_return(v, 1);\n}", "parent": 0, "children": [135, 137, 138], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 135, "type": "storage_class_specifier", "text": "__inline", "parent": 134, "children": [136], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 15}}, {"id": 136, "type": "__inline", "text": "__inline", "parent": 135, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 15}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 134, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 19}}, {"id": 138, "type": "function_declarator", "text": "arch_atomic_inc_return(int *v)", "parent": 134, "children": [139, 140], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 50}}, {"id": 139, "type": "identifier", "text": "arch_atomic_inc_return", "parent": 138, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 42}}, {"id": 140, "type": "parameter_list", "text": "(int *v)", "parent": 138, "children": [141], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 50}}, {"id": 141, "type": "parameter_declaration", "text": "int *v", "parent": 140, "children": [142, 143], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 49}}, {"id": 142, "type": "primitive_type", "text": "int", "parent": 141, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 46}}, {"id": 143, "type": "pointer_declarator", "text": "*v", "parent": 141, "children": [144, 145], "start_point": {"row": 53, "column": 47}, "end_point": {"row": 53, "column": 49}}, {"id": 144, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 53, "column": 47}, "end_point": {"row": 53, "column": 48}}, {"id": 145, "type": "identifier", "text": "v", "parent": 143, "children": [], "start_point": {"row": 53, "column": 48}, "end_point": {"row": 53, "column": 49}}, {"id": 146, "type": "return_statement", "text": "return arch_atomic_add_return(v, 1);", "parent": 134, "children": [147], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 37}}, {"id": 147, "type": "call_expression", "text": "arch_atomic_add_return(v, 1)", "parent": 146, "children": [148, 149], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 36}}, {"id": 148, "type": "identifier", "text": "arch_atomic_add_return", "parent": 147, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 30}}, {"id": 149, "type": "argument_list", "text": "(v, 1)", "parent": 147, "children": [150, 151], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 36}}, {"id": 150, "type": "identifier", "text": "v", "parent": 149, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 32}}, {"id": 151, "type": "number_literal", "text": "1", "parent": 149, "children": [], "start_point": {"row": 55, "column": 34}, "end_point": {"row": 55, "column": 35}}, {"id": 152, "type": "function_definition", "text": "static __inline int arch_atomic_dec_return(int *v)\n{\n\treturn arch_atomic_sub_return(v, 1);\n}", "parent": 0, "children": [153, 155, 156], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 153, "type": "storage_class_specifier", "text": "__inline", "parent": 152, "children": [154], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 15}}, {"id": 154, "type": "__inline", "text": "__inline", "parent": 153, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 15}}, {"id": 155, "type": "primitive_type", "text": "int", "parent": 152, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 19}}, {"id": 156, "type": "function_declarator", "text": "arch_atomic_dec_return(int *v)", "parent": 152, "children": [157, 158], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 50}}, {"id": 157, "type": "identifier", "text": "arch_atomic_dec_return", "parent": 156, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 42}}, {"id": 158, "type": "parameter_list", "text": "(int *v)", "parent": 156, "children": [159], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 50}}, {"id": 159, "type": "parameter_declaration", "text": "int *v", "parent": 158, "children": [160, 161], "start_point": {"row": 58, "column": 43}, "end_point": {"row": 58, "column": 49}}, {"id": 160, "type": "primitive_type", "text": "int", "parent": 159, "children": [], "start_point": {"row": 58, "column": 43}, "end_point": {"row": 58, "column": 46}}, {"id": 161, "type": "pointer_declarator", "text": "*v", "parent": 159, "children": [162, 163], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 49}}, {"id": 162, "type": "*", "text": "*", "parent": 161, "children": [], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 48}}, {"id": 163, "type": "identifier", "text": "v", "parent": 161, "children": [], "start_point": {"row": 58, "column": 48}, "end_point": {"row": 58, "column": 49}}, {"id": 164, "type": "return_statement", "text": "return arch_atomic_sub_return(v, 1);", "parent": 152, "children": [165], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 37}}, {"id": 165, "type": "call_expression", "text": "arch_atomic_sub_return(v, 1)", "parent": 164, "children": [166, 167], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 36}}, {"id": 166, "type": "identifier", "text": "arch_atomic_sub_return", "parent": 165, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 30}}, {"id": 167, "type": "argument_list", "text": "(v, 1)", "parent": 165, "children": [168, 169], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 36}}, {"id": 168, "type": "identifier", "text": "v", "parent": 167, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 32}}, {"id": 169, "type": "number_literal", "text": "1", "parent": 167, "children": [], "start_point": {"row": 60, "column": 34}, "end_point": {"row": 60, "column": 35}}, {"id": 170, "type": "function_definition", "text": "static __inline void arch_atomic_add(int *v, int i)\n{\n\tarch_atomic_add_return(v, i);\n}", "parent": 0, "children": [171, 173, 174], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 66, "column": 1}}, {"id": 171, "type": "storage_class_specifier", "text": "__inline", "parent": 170, "children": [172], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 15}}, {"id": 172, "type": "__inline", "text": "__inline", "parent": 171, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 15}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 20}}, {"id": 174, "type": "function_declarator", "text": "arch_atomic_add(int *v, int i)", "parent": 170, "children": [175, 176], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 51}}, {"id": 175, "type": "identifier", "text": "arch_atomic_add", "parent": 174, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 36}}, {"id": 176, "type": "parameter_list", "text": "(int *v, int i)", "parent": 174, "children": [177, 182], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 51}}, {"id": 177, "type": "parameter_declaration", "text": "int *v", "parent": 176, "children": [178, 179], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 43}}, {"id": 178, "type": "primitive_type", "text": "int", "parent": 177, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 40}}, {"id": 179, "type": "pointer_declarator", "text": "*v", "parent": 177, "children": [180, 181], "start_point": {"row": 63, "column": 41}, "end_point": {"row": 63, "column": 43}}, {"id": 180, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 63, "column": 41}, "end_point": {"row": 63, "column": 42}}, {"id": 181, "type": "identifier", "text": "v", "parent": 179, "children": [], "start_point": {"row": 63, "column": 42}, "end_point": {"row": 63, "column": 43}}, {"id": 182, "type": "parameter_declaration", "text": "int i", "parent": 176, "children": [183, 184], "start_point": {"row": 63, "column": 45}, "end_point": {"row": 63, "column": 50}}, {"id": 183, "type": "primitive_type", "text": "int", "parent": 182, "children": [], "start_point": {"row": 63, "column": 45}, "end_point": {"row": 63, "column": 48}}, {"id": 184, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 63, "column": 49}, "end_point": {"row": 63, "column": 50}}, {"id": 185, "type": "call_expression", "text": "arch_atomic_add_return(v, i)", "parent": 170, "children": [186, 187], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 29}}, {"id": 186, "type": "identifier", "text": "arch_atomic_add_return", "parent": 185, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 23}}, {"id": 187, "type": "argument_list", "text": "(v, i)", "parent": 185, "children": [188, 189], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 29}}, {"id": 188, "type": "identifier", "text": "v", "parent": 187, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 25}}, {"id": 189, "type": "identifier", "text": "i", "parent": 187, "children": [], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 28}}, {"id": 190, "type": "function_definition", "text": "static __inline void arch_atomic_sub(int *v, int i)\n{\n\tarch_atomic_sub_return(v, i);\n}", "parent": 0, "children": [191, 193, 194], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 191, "type": "storage_class_specifier", "text": "__inline", "parent": 190, "children": [192], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 15}}, {"id": 192, "type": "__inline", "text": "__inline", "parent": 191, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 15}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 190, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 20}}, {"id": 194, "type": "function_declarator", "text": "arch_atomic_sub(int *v, int i)", "parent": 190, "children": [195, 196], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 51}}, {"id": 195, "type": "identifier", "text": "arch_atomic_sub", "parent": 194, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 36}}, {"id": 196, "type": "parameter_list", "text": "(int *v, int i)", "parent": 194, "children": [197, 202], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 51}}, {"id": 197, "type": "parameter_declaration", "text": "int *v", "parent": 196, "children": [198, 199], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 43}}, {"id": 198, "type": "primitive_type", "text": "int", "parent": 197, "children": [], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 40}}, {"id": 199, "type": "pointer_declarator", "text": "*v", "parent": 197, "children": [200, 201], "start_point": {"row": 68, "column": 41}, "end_point": {"row": 68, "column": 43}}, {"id": 200, "type": "*", "text": "*", "parent": 199, "children": [], "start_point": {"row": 68, "column": 41}, "end_point": {"row": 68, "column": 42}}, {"id": 201, "type": "identifier", "text": "v", "parent": 199, "children": [], "start_point": {"row": 68, "column": 42}, "end_point": {"row": 68, "column": 43}}, {"id": 202, "type": "parameter_declaration", "text": "int i", "parent": 196, "children": [203, 204], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 50}}, {"id": 203, "type": "primitive_type", "text": "int", "parent": 202, "children": [], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 48}}, {"id": 204, "type": "identifier", "text": "i", "parent": 202, "children": [], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 50}}, {"id": 205, "type": "call_expression", "text": "arch_atomic_sub_return(v, i)", "parent": 190, "children": [206, 207], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 29}}, {"id": 206, "type": "identifier", "text": "arch_atomic_sub_return", "parent": 205, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 23}}, {"id": 207, "type": "argument_list", "text": "(v, i)", "parent": 205, "children": [208, 209], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 29}}, {"id": 208, "type": "identifier", "text": "v", "parent": 207, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 25}}, {"id": 209, "type": "identifier", "text": "i", "parent": 207, "children": [], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 28}}, {"id": 210, "type": "function_definition", "text": "static __inline void arch_atomic_and(int *v, int i)\n{\n\tarch_atomic_and_return(v, i);\n}", "parent": 0, "children": [211, 213, 214], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 211, "type": "storage_class_specifier", "text": "__inline", "parent": 210, "children": [212], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 15}}, {"id": 212, "type": "__inline", "text": "__inline", "parent": 211, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 15}}, {"id": 213, "type": "primitive_type", "text": "void", "parent": 210, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 20}}, {"id": 214, "type": "function_declarator", "text": "arch_atomic_and(int *v, int i)", "parent": 210, "children": [215, 216], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 51}}, {"id": 215, "type": "identifier", "text": "arch_atomic_and", "parent": 214, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 36}}, {"id": 216, "type": "parameter_list", "text": "(int *v, int i)", "parent": 214, "children": [217, 222], "start_point": {"row": 73, "column": 36}, "end_point": {"row": 73, "column": 51}}, {"id": 217, "type": "parameter_declaration", "text": "int *v", "parent": 216, "children": [218, 219], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 43}}, {"id": 218, "type": "primitive_type", "text": "int", "parent": 217, "children": [], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 40}}, {"id": 219, "type": "pointer_declarator", "text": "*v", "parent": 217, "children": [220, 221], "start_point": {"row": 73, "column": 41}, "end_point": {"row": 73, "column": 43}}, {"id": 220, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 73, "column": 41}, "end_point": {"row": 73, "column": 42}}, {"id": 221, "type": "identifier", "text": "v", "parent": 219, "children": [], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 43}}, {"id": 222, "type": "parameter_declaration", "text": "int i", "parent": 216, "children": [223, 224], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 50}}, {"id": 223, "type": "primitive_type", "text": "int", "parent": 222, "children": [], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 48}}, {"id": 224, "type": "identifier", "text": "i", "parent": 222, "children": [], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 50}}, {"id": 225, "type": "call_expression", "text": "arch_atomic_and_return(v, i)", "parent": 210, "children": [226, 227], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 29}}, {"id": 226, "type": "identifier", "text": "arch_atomic_and_return", "parent": 225, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 23}}, {"id": 227, "type": "argument_list", "text": "(v, i)", "parent": 225, "children": [228, 229], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 29}}, {"id": 228, "type": "identifier", "text": "v", "parent": 227, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 25}}, {"id": 229, "type": "identifier", "text": "i", "parent": 227, "children": [], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 28}}, {"id": 230, "type": "function_definition", "text": "static __inline void arch_atomic_or(int *v, int i)\n{\n\tarch_atomic_or_return(v, i);\n}", "parent": 0, "children": [231, 233, 234], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 81, "column": 1}}, {"id": 231, "type": "storage_class_specifier", "text": "__inline", "parent": 230, "children": [232], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 15}}, {"id": 232, "type": "__inline", "text": "__inline", "parent": 231, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 15}}, {"id": 233, "type": "primitive_type", "text": "void", "parent": 230, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 20}}, {"id": 234, "type": "function_declarator", "text": "arch_atomic_or(int *v, int i)", "parent": 230, "children": [235, 236], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 50}}, {"id": 235, "type": "identifier", "text": "arch_atomic_or", "parent": 234, "children": [], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 35}}, {"id": 236, "type": "parameter_list", "text": "(int *v, int i)", "parent": 234, "children": [237, 242], "start_point": {"row": 78, "column": 35}, "end_point": {"row": 78, "column": 50}}, {"id": 237, "type": "parameter_declaration", "text": "int *v", "parent": 236, "children": [238, 239], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 42}}, {"id": 238, "type": "primitive_type", "text": "int", "parent": 237, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 39}}, {"id": 239, "type": "pointer_declarator", "text": "*v", "parent": 237, "children": [240, 241], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 42}}, {"id": 240, "type": "*", "text": "*", "parent": 239, "children": [], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 41}}, {"id": 241, "type": "identifier", "text": "v", "parent": 239, "children": [], "start_point": {"row": 78, "column": 41}, "end_point": {"row": 78, "column": 42}}, {"id": 242, "type": "parameter_declaration", "text": "int i", "parent": 236, "children": [243, 244], "start_point": {"row": 78, "column": 44}, "end_point": {"row": 78, "column": 49}}, {"id": 243, "type": "primitive_type", "text": "int", "parent": 242, "children": [], "start_point": {"row": 78, "column": 44}, "end_point": {"row": 78, "column": 47}}, {"id": 244, "type": "identifier", "text": "i", "parent": 242, "children": [], "start_point": {"row": 78, "column": 48}, "end_point": {"row": 78, "column": 49}}, {"id": 245, "type": "call_expression", "text": "arch_atomic_or_return(v, i)", "parent": 230, "children": [246, 247], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 28}}, {"id": 246, "type": "identifier", "text": "arch_atomic_or_return", "parent": 245, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 22}}, {"id": 247, "type": "argument_list", "text": "(v, i)", "parent": 245, "children": [248, 249], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 28}}, {"id": 248, "type": "identifier", "text": "v", "parent": 247, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 24}}, {"id": 249, "type": "identifier", "text": "i", "parent": 247, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 27}}, {"id": 250, "type": "function_definition", "text": "static __inline void arch_atomic_xor(int *v, int i)\n{\n\tarch_atomic_xor_return(v, i);\n}", "parent": 0, "children": [251, 253, 254], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 251, "type": "storage_class_specifier", "text": "__inline", "parent": 250, "children": [252], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 15}}, {"id": 252, "type": "__inline", "text": "__inline", "parent": 251, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 15}}, {"id": 253, "type": "primitive_type", "text": "void", "parent": 250, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 20}}, {"id": 254, "type": "function_declarator", "text": "arch_atomic_xor(int *v, int i)", "parent": 250, "children": [255, 256], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 51}}, {"id": 255, "type": "identifier", "text": "arch_atomic_xor", "parent": 254, "children": [], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 36}}, {"id": 256, "type": "parameter_list", "text": "(int *v, int i)", "parent": 254, "children": [257, 262], "start_point": {"row": 83, "column": 36}, "end_point": {"row": 83, "column": 51}}, {"id": 257, "type": "parameter_declaration", "text": "int *v", "parent": 256, "children": [258, 259], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 43}}, {"id": 258, "type": "primitive_type", "text": "int", "parent": 257, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 40}}, {"id": 259, "type": "pointer_declarator", "text": "*v", "parent": 257, "children": [260, 261], "start_point": {"row": 83, "column": 41}, "end_point": {"row": 83, "column": 43}}, {"id": 260, "type": "*", "text": "*", "parent": 259, "children": [], "start_point": {"row": 83, "column": 41}, "end_point": {"row": 83, "column": 42}}, {"id": 261, "type": "identifier", "text": "v", "parent": 259, "children": [], "start_point": {"row": 83, "column": 42}, "end_point": {"row": 83, "column": 43}}, {"id": 262, "type": "parameter_declaration", "text": "int i", "parent": 256, "children": [263, 264], "start_point": {"row": 83, "column": 45}, "end_point": {"row": 83, "column": 50}}, {"id": 263, "type": "primitive_type", "text": "int", "parent": 262, "children": [], "start_point": {"row": 83, "column": 45}, "end_point": {"row": 83, "column": 48}}, {"id": 264, "type": "identifier", "text": "i", "parent": 262, "children": [], "start_point": {"row": 83, "column": 49}, "end_point": {"row": 83, "column": 50}}, {"id": 265, "type": "call_expression", "text": "arch_atomic_xor_return(v, i)", "parent": 250, "children": [266, 267], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 29}}, {"id": 266, "type": "identifier", "text": "arch_atomic_xor_return", "parent": 265, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 23}}, {"id": 267, "type": "argument_list", "text": "(v, i)", "parent": 265, "children": [268, 269], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 29}}, {"id": 268, "type": "identifier", "text": "v", "parent": 267, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 25}}, {"id": 269, "type": "identifier", "text": "i", "parent": 267, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 28}}, {"id": 270, "type": "function_definition", "text": "static __inline void arch_atomic_nand(int *v, int i)\n{\n\tarch_atomic_nand_return(v, i);\n}", "parent": 0, "children": [271, 273, 274], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 91, "column": 1}}, {"id": 271, "type": "storage_class_specifier", "text": "__inline", "parent": 270, "children": [272], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 15}}, {"id": 272, "type": "__inline", "text": "__inline", "parent": 271, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 15}}, {"id": 273, "type": "primitive_type", "text": "void", "parent": 270, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 20}}, {"id": 274, "type": "function_declarator", "text": "arch_atomic_nand(int *v, int i)", "parent": 270, "children": [275, 276], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 52}}, {"id": 275, "type": "identifier", "text": "arch_atomic_nand", "parent": 274, "children": [], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 37}}, {"id": 276, "type": "parameter_list", "text": "(int *v, int i)", "parent": 274, "children": [277, 282], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 52}}, {"id": 277, "type": "parameter_declaration", "text": "int *v", "parent": 276, "children": [278, 279], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 44}}, {"id": 278, "type": "primitive_type", "text": "int", "parent": 277, "children": [], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 41}}, {"id": 279, "type": "pointer_declarator", "text": "*v", "parent": 277, "children": [280, 281], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 44}}, {"id": 280, "type": "*", "text": "*", "parent": 279, "children": [], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 43}}, {"id": 281, "type": "identifier", "text": "v", "parent": 279, "children": [], "start_point": {"row": 88, "column": 43}, "end_point": {"row": 88, "column": 44}}, {"id": 282, "type": "parameter_declaration", "text": "int i", "parent": 276, "children": [283, 284], "start_point": {"row": 88, "column": 46}, "end_point": {"row": 88, "column": 51}}, {"id": 283, "type": "primitive_type", "text": "int", "parent": 282, "children": [], "start_point": {"row": 88, "column": 46}, "end_point": {"row": 88, "column": 49}}, {"id": 284, "type": "identifier", "text": "i", "parent": 282, "children": [], "start_point": {"row": 88, "column": 50}, "end_point": {"row": 88, "column": 51}}, {"id": 285, "type": "call_expression", "text": "arch_atomic_nand_return(v, i)", "parent": 270, "children": [286, 287], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 30}}, {"id": 286, "type": "identifier", "text": "arch_atomic_nand_return", "parent": 285, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 24}}, {"id": 287, "type": "argument_list", "text": "(v, i)", "parent": 285, "children": [288, 289], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 30}}, {"id": 288, "type": "identifier", "text": "v", "parent": 287, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 26}}, {"id": 289, "type": "identifier", "text": "i", "parent": 287, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 29}}, {"id": 290, "type": "function_definition", "text": "static __inline void arch_atomic_inc(int *v)\n{\n\tarch_atomic_add_return(v, 1);\n}", "parent": 0, "children": [291, 293, 294], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 291, "type": "storage_class_specifier", "text": "__inline", "parent": 290, "children": [292], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 15}}, {"id": 292, "type": "__inline", "text": "__inline", "parent": 291, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 15}}, {"id": 293, "type": "primitive_type", "text": "void", "parent": 290, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 20}}, {"id": 294, "type": "function_declarator", "text": "arch_atomic_inc(int *v)", "parent": 290, "children": [295, 296], "start_point": {"row": 93, "column": 21}, "end_point": {"row": 93, "column": 44}}, {"id": 295, "type": "identifier", "text": "arch_atomic_inc", "parent": 294, "children": [], "start_point": {"row": 93, "column": 21}, "end_point": {"row": 93, "column": 36}}, {"id": 296, "type": "parameter_list", "text": "(int *v)", "parent": 294, "children": [297], "start_point": {"row": 93, "column": 36}, "end_point": {"row": 93, "column": 44}}, {"id": 297, "type": "parameter_declaration", "text": "int *v", "parent": 296, "children": [298, 299], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 43}}, {"id": 298, "type": "primitive_type", "text": "int", "parent": 297, "children": [], "start_point": {"row": 93, "column": 37}, "end_point": {"row": 93, "column": 40}}, {"id": 299, "type": "pointer_declarator", "text": "*v", "parent": 297, "children": [300, 301], "start_point": {"row": 93, "column": 41}, "end_point": {"row": 93, "column": 43}}, {"id": 300, "type": "*", "text": "*", "parent": 299, "children": [], "start_point": {"row": 93, "column": 41}, "end_point": {"row": 93, "column": 42}}, {"id": 301, "type": "identifier", "text": "v", "parent": 299, "children": [], "start_point": {"row": 93, "column": 42}, "end_point": {"row": 93, "column": 43}}, {"id": 302, "type": "call_expression", "text": "arch_atomic_add_return(v, 1)", "parent": 290, "children": [303, 304], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 29}}, {"id": 303, "type": "identifier", "text": "arch_atomic_add_return", "parent": 302, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 23}}, {"id": 304, "type": "argument_list", "text": "(v, 1)", "parent": 302, "children": [305, 306], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 29}}, {"id": 305, "type": "identifier", "text": "v", "parent": 304, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 95, "column": 25}}, {"id": 306, "type": "number_literal", "text": "1", "parent": 304, "children": [], "start_point": {"row": 95, "column": 27}, "end_point": {"row": 95, "column": 28}}, {"id": 307, "type": "function_definition", "text": "static __inline void arch_atomic_dec(int *v)\n{\n\tarch_atomic_sub_return(v, 1);\n}", "parent": 0, "children": [308, 310, 311], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 101, "column": 1}}, {"id": 308, "type": "storage_class_specifier", "text": "__inline", "parent": 307, "children": [309], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 15}}, {"id": 309, "type": "__inline", "text": "__inline", "parent": 308, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 15}}, {"id": 310, "type": "primitive_type", "text": "void", "parent": 307, "children": [], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 20}}, {"id": 311, "type": "function_declarator", "text": "arch_atomic_dec(int *v)", "parent": 307, "children": [312, 313], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 44}}, {"id": 312, "type": "identifier", "text": "arch_atomic_dec", "parent": 311, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 36}}, {"id": 313, "type": "parameter_list", "text": "(int *v)", "parent": 311, "children": [314], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 44}}, {"id": 314, "type": "parameter_declaration", "text": "int *v", "parent": 313, "children": [315, 316], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 43}}, {"id": 315, "type": "primitive_type", "text": "int", "parent": 314, "children": [], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 40}}, {"id": 316, "type": "pointer_declarator", "text": "*v", "parent": 314, "children": [317, 318], "start_point": {"row": 98, "column": 41}, "end_point": {"row": 98, "column": 43}}, {"id": 317, "type": "*", "text": "*", "parent": 316, "children": [], "start_point": {"row": 98, "column": 41}, "end_point": {"row": 98, "column": 42}}, {"id": 318, "type": "identifier", "text": "v", "parent": 316, "children": [], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 43}}, {"id": 319, "type": "call_expression", "text": "arch_atomic_sub_return(v, 1)", "parent": 307, "children": [320, 321], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 29}}, {"id": 320, "type": "identifier", "text": "arch_atomic_sub_return", "parent": 319, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 23}}, {"id": 321, "type": "argument_list", "text": "(v, 1)", "parent": 319, "children": [322, 323], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 29}}, {"id": 322, "type": "identifier", "text": "v", "parent": 321, "children": [], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 25}}, {"id": 323, "type": "number_literal", "text": "1", "parent": 321, "children": [], "start_point": {"row": 100, "column": 27}, "end_point": {"row": 100, "column": 28}}, {"id": 324, "type": "declaration", "text": "int arch_atomic_xchg(int *v, int i);", "parent": 0, "children": [325, 326], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 36}}, {"id": 325, "type": "primitive_type", "text": "int", "parent": 324, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 3}}, {"id": 326, "type": "function_declarator", "text": "arch_atomic_xchg(int *v, int i)", "parent": 324, "children": [327, 328], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 35}}, {"id": 327, "type": "identifier", "text": "arch_atomic_xchg", "parent": 326, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 20}}, {"id": 328, "type": "parameter_list", "text": "(int *v, int i)", "parent": 326, "children": [329, 334], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 35}}, {"id": 329, "type": "parameter_declaration", "text": "int *v", "parent": 328, "children": [330, 331], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 27}}, {"id": 330, "type": "primitive_type", "text": "int", "parent": 329, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 24}}, {"id": 331, "type": "pointer_declarator", "text": "*v", "parent": 329, "children": [332, 333], "start_point": {"row": 103, "column": 25}, "end_point": {"row": 103, "column": 27}}, {"id": 332, "type": "*", "text": "*", "parent": 331, "children": [], "start_point": {"row": 103, "column": 25}, "end_point": {"row": 103, "column": 26}}, {"id": 333, "type": "identifier", "text": "v", "parent": 331, "children": [], "start_point": {"row": 103, "column": 26}, "end_point": {"row": 103, "column": 27}}, {"id": 334, "type": "parameter_declaration", "text": "int i", "parent": 328, "children": [335, 336], "start_point": {"row": 103, "column": 29}, "end_point": {"row": 103, "column": 34}}, {"id": 335, "type": "primitive_type", "text": "int", "parent": 334, "children": [], "start_point": {"row": 103, "column": 29}, "end_point": {"row": 103, "column": 32}}, {"id": 336, "type": "identifier", "text": "i", "parent": 334, "children": [], "start_point": {"row": 103, "column": 33}, "end_point": {"row": 103, "column": 34}}, {"id": 337, "type": "declaration", "text": "int arch_atomic_cmpxchg(int *v, int old, int new_v);", "parent": 0, "children": [338, 339], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 52}}, {"id": 338, "type": "primitive_type", "text": "int", "parent": 337, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 3}}, {"id": 339, "type": "function_declarator", "text": "arch_atomic_cmpxchg(int *v, int old, int new_v)", "parent": 337, "children": [340, 341], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 51}}, {"id": 340, "type": "identifier", "text": "arch_atomic_cmpxchg", "parent": 339, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 23}}, {"id": 341, "type": "parameter_list", "text": "(int *v, int old, int new_v)", "parent": 339, "children": [342, 347, 350], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 51}}, {"id": 342, "type": "parameter_declaration", "text": "int *v", "parent": 341, "children": [343, 344], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 30}}, {"id": 343, "type": "primitive_type", "text": "int", "parent": 342, "children": [], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 27}}, {"id": 344, "type": "pointer_declarator", "text": "*v", "parent": 342, "children": [345, 346], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 104, "column": 30}}, {"id": 345, "type": "*", "text": "*", "parent": 344, "children": [], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 104, "column": 29}}, {"id": 346, "type": "identifier", "text": "v", "parent": 344, "children": [], "start_point": {"row": 104, "column": 29}, "end_point": {"row": 104, "column": 30}}, {"id": 347, "type": "parameter_declaration", "text": "int old", "parent": 341, "children": [348, 349], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 39}}, {"id": 348, "type": "primitive_type", "text": "int", "parent": 347, "children": [], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 35}}, {"id": 349, "type": "identifier", "text": "old", "parent": 347, "children": [], "start_point": {"row": 104, "column": 36}, "end_point": {"row": 104, "column": 39}}, {"id": 350, "type": "parameter_declaration", "text": "int new_v", "parent": 341, "children": [351, 352], "start_point": {"row": 104, "column": 41}, "end_point": {"row": 104, "column": 50}}, {"id": 351, "type": "primitive_type", "text": "int", "parent": 350, "children": [], "start_point": {"row": 104, "column": 41}, "end_point": {"row": 104, "column": 44}}, {"id": 352, "type": "identifier", "text": "new_v", "parent": 350, "children": [], "start_point": {"row": 104, "column": 45}, "end_point": {"row": 104, "column": 50}}, {"id": 353, "type": "declaration", "text": "void arch_atomic_clear_mask(uint32_t *addr, uint32_t mask);", "parent": 0, "children": [354, 355], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 59}}, {"id": 354, "type": "primitive_type", "text": "void", "parent": 353, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 4}}, {"id": 355, "type": "function_declarator", "text": "arch_atomic_clear_mask(uint32_t *addr, uint32_t mask)", "parent": 353, "children": [356, 357], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 58}}, {"id": 356, "type": "identifier", "text": "arch_atomic_clear_mask", "parent": 355, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 27}}, {"id": 357, "type": "parameter_list", "text": "(uint32_t *addr, uint32_t mask)", "parent": 355, "children": [358, 363], "start_point": {"row": 106, "column": 27}, "end_point": {"row": 106, "column": 58}}, {"id": 358, "type": "parameter_declaration", "text": "uint32_t *addr", "parent": 357, "children": [359, 360], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 42}}, {"id": 359, "type": "primitive_type", "text": "uint32_t", "parent": 358, "children": [], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 36}}, {"id": 360, "type": "pointer_declarator", "text": "*addr", "parent": 358, "children": [361, 362], "start_point": {"row": 106, "column": 37}, "end_point": {"row": 106, "column": 42}}, {"id": 361, "type": "*", "text": "*", "parent": 360, "children": [], "start_point": {"row": 106, "column": 37}, "end_point": {"row": 106, "column": 38}}, {"id": 362, "type": "identifier", "text": "addr", "parent": 360, "children": [], "start_point": {"row": 106, "column": 38}, "end_point": {"row": 106, "column": 42}}, {"id": 363, "type": "parameter_declaration", "text": "uint32_t mask", "parent": 357, "children": [364, 365], "start_point": {"row": 106, "column": 44}, "end_point": {"row": 106, "column": 57}}, {"id": 364, "type": "primitive_type", "text": "uint32_t", "parent": 363, "children": [], "start_point": {"row": 106, "column": 44}, "end_point": {"row": 106, "column": 52}}, {"id": 365, "type": "identifier", "text": "mask", "parent": 363, "children": [], "start_point": {"row": 106, "column": 53}, "end_point": {"row": 106, "column": 57}}, {"id": 366, "type": "declaration", "text": "void arch_atomic_set_mask(uint32_t *addr, uint32_t mask);", "parent": 0, "children": [367, 368], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 57}}, {"id": 367, "type": "primitive_type", "text": "void", "parent": 366, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 4}}, {"id": 368, "type": "function_declarator", "text": "arch_atomic_set_mask(uint32_t *addr, uint32_t mask)", "parent": 366, "children": [369, 370], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 56}}, {"id": 369, "type": "identifier", "text": "arch_atomic_set_mask", "parent": 368, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 25}}, {"id": 370, "type": "parameter_list", "text": "(uint32_t *addr, uint32_t mask)", "parent": 368, "children": [371, 376], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 56}}, {"id": 371, "type": "parameter_declaration", "text": "uint32_t *addr", "parent": 370, "children": [372, 373], "start_point": {"row": 107, "column": 26}, "end_point": {"row": 107, "column": 40}}, {"id": 372, "type": "primitive_type", "text": "uint32_t", "parent": 371, "children": [], "start_point": {"row": 107, "column": 26}, "end_point": {"row": 107, "column": 34}}, {"id": 373, "type": "pointer_declarator", "text": "*addr", "parent": 371, "children": [374, 375], "start_point": {"row": 107, "column": 35}, "end_point": {"row": 107, "column": 40}}, {"id": 374, "type": "*", "text": "*", "parent": 373, "children": [], "start_point": {"row": 107, "column": 35}, "end_point": {"row": 107, "column": 36}}, {"id": 375, "type": "identifier", "text": "addr", "parent": 373, "children": [], "start_point": {"row": 107, "column": 36}, "end_point": {"row": 107, "column": 40}}, {"id": 376, "type": "parameter_declaration", "text": "uint32_t mask", "parent": 370, "children": [377, 378], "start_point": {"row": 107, "column": 42}, "end_point": {"row": 107, "column": 55}}, {"id": 377, "type": "primitive_type", "text": "uint32_t", "parent": 376, "children": [], "start_point": {"row": 107, "column": 42}, "end_point": {"row": 107, "column": 50}}, {"id": 378, "type": "identifier", "text": "mask", "parent": 376, "children": [], "start_point": {"row": 107, "column": 51}, "end_point": {"row": 107, "column": 55}}, {"id": 379, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 16, 31, 35, 58, 71, 84, 97, 110, 123, 134, 138, 152, 156, 170, 174, 190, 194, 210, 214, 230, 234, 250, 254, 270, 274, 290, 294, 307, 311, 326, 339, 355, 368], "variables": [19, 38, 45, 56, 61, 66, 69, 74, 79, 82, 87, 92, 95, 100, 105, 108, 113, 118, 121, 126, 131, 141, 159, 177, 182, 197, 202, 217, 222, 237, 242, 257, 262, 277, 282, 297, 314, 324, 329, 334, 337, 342, 347, 350, 353, 358, 363, 366, 371, 376], "classes": [13, 32, 135, 153, 171, 191, 211, 231, 251, 271, 291, 308], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [27, 28, 49, 147, 165, 185, 205, 225, 245, 265, 285, 302, 319], "assignments": [48], "loops": [], "conditionals": [0, 1, 2, 5, 17, 20, 25, 30, 36, 39, 44, 47, 51, 53, 55, 59, 65, 68, 72, 78, 81, 85, 91, 94, 98, 104, 107, 111, 117, 120, 124, 130, 133, 139, 145, 148, 150, 157, 163, 166, 168, 175, 181, 184, 186, 188, 189, 195, 201, 204, 206, 208, 209, 215, 221, 224, 226, 228, 229, 235, 241, 244, 246, 248, 249, 255, 261, 264, 266, 268, 269, 275, 281, 284, 286, 288, 289, 295, 301, 303, 305, 312, 318, 320, 322, 327, 333, 336, 340, 346, 349, 352, 356, 362, 365, 369, 375, 378, 379], "returns": [26, 54, 146, 164], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 151, 169, 306, 323], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "arch_atomic_read", "text_snippet": "static __inline int arch_atomic_read(volatile int *v)\n{\n\treturn (*v);\n}"}, {"node_id": 16, "universal_type": "function", "name": "*v)", "text_snippet": "arch_atomic_read(volatile int *v)"}, {"node_id": 31, "universal_type": "function", "name": "arch_atomic_set", "text_snippet": "static __inline int arch_atomic_set(volatile int *v, int i)\n{\n\t*v = i;\n\treturn i;\n}"}, {"node_id": 35, "universal_type": "function", "name": "*v,", "text_snippet": "arch_atomic_set(volatile int *v, int i)"}, {"node_id": 58, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_add_return(int *v, int i)"}, {"node_id": 71, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_sub_return(int *v, int i)"}, {"node_id": 84, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_and_return(int *v, int i)"}, {"node_id": 97, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_or_return(int *v, int i)"}, {"node_id": 110, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_xor_return(int *v, int i)"}, {"node_id": 123, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_nand_return(int *v, int i)"}, {"node_id": 134, "universal_type": "function", "name": "arch_atomic_inc_return", "text_snippet": "static __inline int arch_atomic_inc_return(int *v)\n{\n\treturn arch_atomic_add_return(v, 1);\n}"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "arch_atomic_inc_return(int *v)"}, {"node_id": 152, "universal_type": "function", "name": "arch_atomic_dec_return", "text_snippet": "static __inline int arch_atomic_dec_return(int *v)\n{\n\treturn arch_atomic_sub_return(v, 1);\n}"}, {"node_id": 156, "universal_type": "function", "name": "unknown", "text_snippet": "arch_atomic_dec_return(int *v)"}, {"node_id": 170, "universal_type": "function", "name": "arch_atomic_add", "text_snippet": "static __inline void arch_atomic_add(int *v, int i)\n{\n\tarch_atomic_add_return(v, i);\n}"}, {"node_id": 174, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_add(int *v, int i)"}, {"node_id": 190, "universal_type": "function", "name": "arch_atomic_sub", "text_snippet": "static __inline void arch_atomic_sub(int *v, int i)\n{\n\tarch_atomic_sub_return(v, i);\n}"}, {"node_id": 194, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_sub(int *v, int i)"}, {"node_id": 210, "universal_type": "function", "name": "arch_atomic_and", "text_snippet": "static __inline void arch_atomic_and(int *v, int i)\n{\n\tarch_atomic_and_return(v, i);\n}"}, {"node_id": 214, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_and(int *v, int i)"}, {"node_id": 230, "universal_type": "function", "name": "arch_atomic_or", "text_snippet": "static __inline void arch_atomic_or(int *v, int i)\n{\n\tarch_atomic_or_return(v, i);\n}"}, {"node_id": 234, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_or(int *v, int i)"}, {"node_id": 250, "universal_type": "function", "name": "arch_atomic_xor", "text_snippet": "static __inline void arch_atomic_xor(int *v, int i)\n{\n\tarch_atomic_xor_return(v, i);\n}"}, {"node_id": 254, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_xor(int *v, int i)"}, {"node_id": 270, "universal_type": "function", "name": "arch_atomic_nand", "text_snippet": "static __inline void arch_atomic_nand(int *v, int i)\n{\n\tarch_atomic_nand_return(v, i);\n}"}, {"node_id": 274, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_nand(int *v, int i)"}, {"node_id": 290, "universal_type": "function", "name": "arch_atomic_inc", "text_snippet": "static __inline void arch_atomic_inc(int *v)\n{\n\tarch_atomic_add_return(v, 1);\n}"}, {"node_id": 294, "universal_type": "function", "name": "unknown", "text_snippet": "arch_atomic_inc(int *v)"}, {"node_id": 307, "universal_type": "function", "name": "arch_atomic_dec", "text_snippet": "static __inline void arch_atomic_dec(int *v)\n{\n\tarch_atomic_sub_return(v, 1);\n}"}, {"node_id": 311, "universal_type": "function", "name": "unknown", "text_snippet": "arch_atomic_dec(int *v)"}, {"node_id": 326, "universal_type": "function", "name": "i)", "text_snippet": "arch_atomic_xchg(int *v, int i)"}, {"node_id": 339, "universal_type": "function", "name": "old,", "text_snippet": "arch_atomic_cmpxchg(int *v, int old, int new_v)"}, {"node_id": 355, "universal_type": "function", "name": "unknown", "text_snippet": "arch_atomic_clear_mask(uint32_t *addr, uint32_t mask)"}, {"node_id": 368, "universal_type": "function", "name": "unknown", "text_snippet": "arch_atomic_set_mask(uint32_t *addr, uint32_t mask)"}], "class_declarations": [{"node_id": 13, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 32, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 135, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 153, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 171, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 191, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 211, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 231, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 251, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 271, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 291, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}, {"node_id": 308, "universal_type": "class", "name": "unknown", "text_snippet": "__inline"}], "import_statements": [{"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"compiler.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) 2017 XRADIO TECHNOLOGY CO., LTD. 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\n * distribution.\n * 3. Neither the name of XRADIO TECHNOLOGY CO., LTD. nor the names of\n * its contributors may be used to endorse or promote products derived\n * 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\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef _UTIL_ATOMIC_H_\n#define _UTIL_ATOMIC_H_\n\n#include <stdint.h>\n#include \"compiler.h\"\n\nstatic __inline int arch_atomic_read(volatile int *v)\n{\n\treturn (*v);\n}\n\nstatic __inline int arch_atomic_set(volatile int *v, int i)\n{\n\t*v = i;\n\treturn i;\n}\n\nint arch_atomic_add_return(int *v, int i);\nint arch_atomic_sub_return(int *v, int i);\nint arch_atomic_and_return(int *v, int i);\nint arch_atomic_or_return(int *v, int i);\nint arch_atomic_xor_return(int *v, int i);\nint arch_atomic_nand_return(int *v, int i);\n\nstatic __inline int arch_atomic_inc_return(int *v)\n{\n\treturn arch_atomic_add_return(v, 1);\n}\n\nstatic __inline int arch_atomic_dec_return(int *v)\n{\n\treturn arch_atomic_sub_return(v, 1);\n}\n\nstatic __inline void arch_atomic_add(int *v, int i)\n{\n\tarch_atomic_add_return(v, i);\n}\n\nstatic __inline void arch_atomic_sub(int *v, int i)\n{\n\tarch_atomic_sub_return(v, i);\n}\n\nstatic __inline void arch_atomic_and(int *v, int i)\n{\n\tarch_atomic_and_return(v, i);\n}\n\nstatic __inline void arch_atomic_or(int *v, int i)\n{\n\tarch_atomic_or_return(v, i);\n}\n\nstatic __inline void arch_atomic_xor(int *v, int i)\n{\n\tarch_atomic_xor_return(v, i);\n}\n\nstatic __inline void arch_atomic_nand(int *v, int i)\n{\n\tarch_atomic_nand_return(v, i);\n}\n\nstatic __inline void arch_atomic_inc(int *v)\n{\n\tarch_atomic_add_return(v, 1);\n}\n\nstatic __inline void arch_atomic_dec(int *v)\n{\n\tarch_atomic_sub_return(v, 1);\n}\n\nint arch_atomic_xchg(int *v, int i);\nint arch_atomic_cmpxchg(int *v, int old, int new_v);\n\nvoid arch_atomic_clear_mask(uint32_t *addr, uint32_t mask);\nvoid arch_atomic_set_mask(uint32_t *addr, uint32_t mask);\n\n#endif /* _UTIL_ATOMIC_H_ */\n"}
227
c
// // Level.h // Hexagon // // Created by <NAME> on 7/12/15. // Copyright (c) 2015 Chi Corp. All rights reserved. // #import <SpriteKit/SpriteKit.h> #import "Tile.h" #import "CajunAlert.h" #import "ColorUtil.h" #import "StringUtil.h" @interface Level : NSObject { SKScene *scene; NSString *level_id; long level_height; long level_width; long screen_height; long screen_width; } -(instancetype) initWithData:(NSArray *) data; -(NSMutableArray *)getBlocks; -(BOOL)isLevelWon; -(BOOL)isLevelLost; -(void)touchLogicWithTouch:(UITouch *)touch; @property NSMutableArray *levelDesign; @property NSMutableArray *tileDesign; @end
20.26
31
(translation_unit) "//\n// Level.h\n// Hexagon\n//\n// Created by <NAME> on 7/12/15.\n// Copyright (c) 2015 Chi Corp. All rights reserved.\n//\n\n#import <SpriteKit/SpriteKit.h>\n#import "Tile.h"\n#import "CajunAlert.h"\n#import "ColorUtil.h"\n#import "StringUtil.h"\n\n@interface Level : NSObject\n{\n SKScene *scene;\n NSString *level_id;\n \n long level_height;\n long level_width;\n \n long screen_height;\n long screen_width;\n}\n\n-(instancetype) initWithData:(NSArray *) data;\n-(NSMutableArray *)getBlocks;\n-(BOOL)isLevelWon;\n-(BOOL)isLevelLost;\n\n-(void)touchLogicWithTouch:(UITouch *)touch;\n\n@property NSMutableArray *levelDesign;\n@property NSMutableArray *tileDesign;\n\n@end\n" (comment) "//" (comment) "// Level.h" (comment) "// Hexagon" (comment) "//" (comment) "// Created by <NAME> on 7/12/15." (comment) "// Copyright (c) 2015 Chi Corp. All rights reserved." (comment) "//" (preproc_call) "#import <SpriteKit/SpriteKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<SpriteKit/SpriteKit.h>" (preproc_call) "#import "Tile.h"\n" (preproc_directive) "#import" (preproc_arg) ""Tile.h"" (preproc_call) "#import "CajunAlert.h"\n" (preproc_directive) "#import" (preproc_arg) ""CajunAlert.h"" (preproc_call) "#import "ColorUtil.h"\n" (preproc_directive) "#import" (preproc_arg) ""ColorUtil.h"" (preproc_call) "#import "StringUtil.h"\n" (preproc_directive) "#import" (preproc_arg) ""StringUtil.h"" (ERROR) "@" (ERROR) "@" (function_definition) "interface Level : NSObject\n{\n SKScene *scene;\n NSString *level_id;\n \n long level_height;\n long level_width;\n \n long screen_height;\n long screen_width;\n}" (type_identifier) "interface" (ERROR) "Level :" (identifier) "Level" (:) ":" (identifier) "NSObject" (compound_statement) "{\n SKScene *scene;\n NSString *level_id;\n \n long level_height;\n long level_width;\n \n long screen_height;\n long screen_width;\n}" ({) "{" (declaration) "SKScene *scene;" (type_identifier) "SKScene" (pointer_declarator) "*scene" (*) "*" (identifier) "scene" (;) ";" (declaration) "NSString *level_id;" (type_identifier) "NSString" (pointer_declarator) "*level_id" (*) "*" (identifier) "level_id" (;) ";" (declaration) "long level_height;" (sized_type_specifier) "long" (long) "long" (identifier) "level_height" (;) ";" (declaration) "long level_width;" (sized_type_specifier) "long" (long) "long" (identifier) "level_width" (;) ";" (declaration) "long screen_height;" (sized_type_specifier) "long" (long) "long" (identifier) "screen_height" (;) ";" (declaration) "long screen_width;" (sized_type_specifier) "long" (long) "long" (identifier) "screen_width" (;) ";" (}) "}" (expression_statement) "-(instancetype) initWithData:(NSArray *) data;" (update_expression) "-(instancetype) initWithData:(NSArray *) data" (binary_expression) "-(instancetype) initWithData:(NSArray *) data" (unary_expression) "-(instancetype) initWithData" (-) "-" (cast_expression) "(instancetype) initWithData" (() "(" (type_descriptor) "instancetype" (type_identifier) "instancetype" ()) ")" (identifier) "initWithData" (ERROR) ":(NSArray" (:) ":" (() "(" (identifier) "NSArray" (*) "*" (ERROR) ")" ()) ")" (identifier) "data" (--) "" (;) ";" (expression_statement) "-(NSMutableArray *)getBlocks;" (unary_expression) "-(NSMutableArray *)getBlocks" (-) "-" (cast_expression) "(NSMutableArray *)getBlocks" (() "(" (type_descriptor) "NSMutableArray *" (type_identifier) "NSMutableArray" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "getBlocks" (;) ";" (expression_statement) "-(BOOL)isLevelWon;" (unary_expression) "-(BOOL)isLevelWon" (-) "-" (cast_expression) "(BOOL)isLevelWon" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isLevelWon" (;) ";" (expression_statement) "-(BOOL)isLevelLost;" (unary_expression) "-(BOOL)isLevelLost" (-) "-" (cast_expression) "(BOOL)isLevelLost" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isLevelLost" (;) ";" (ERROR) "-(void)touchLogicWithTouch:(UITouch *)touch;\n\n@" (binary_expression) "-(void)touchLogicWithTouch:(UITouch *)touch" (unary_expression) "-(void)touchLogicWithTouch" (-) "-" (cast_expression) "(void)touchLogicWithTouch" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "touchLogicWithTouch" (ERROR) ":(UITouch" (:) ":" (() "(" (identifier) "UITouch" (*) "*" (ERROR) ")" ()) ")" (identifier) "touch" (;) ";" (ERROR) "@" (declaration) "property NSMutableArray" (type_identifier) "property" (identifier) "NSMutableArray" (;) "" (expression_statement) "*levelDesign;" (pointer_expression) "*levelDesign" (*) "*" (identifier) "levelDesign" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property NSMutableArray" (type_identifier) "property" (identifier) "NSMutableArray" (;) "" (expression_statement) "*tileDesign;" (pointer_expression) "*tileDesign" (*) "*" (identifier) "tileDesign" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
164
13
{"language": "c", "success": true, "metadata": {"lines": 31, "avg_line_length": 20.26, "nodes": 110, "errors": 0, "source_hash": "d602e544f4ad71ba8ef419c8266790a3d14ce96c972f60410321abeaf53480cf", "categorized_nodes": 63}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <SpriteKit/SpriteKit.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": "<SpriteKit/SpriteKit.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 31}}, {"id": 3, "type": "preproc_call", "text": "#import \"Tile.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": "\"Tile.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 16}}, {"id": 6, "type": "preproc_call", "text": "#import \"CajunAlert.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 7, "type": "preproc_directive", "text": "#import", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 8, "type": "preproc_arg", "text": "\"CajunAlert.h\"", "parent": 6, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 22}}, {"id": 9, "type": "preproc_call", "text": "#import \"ColorUtil.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "#import", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 11, "type": "preproc_arg", "text": "\"ColorUtil.h\"", "parent": 9, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 21}}, {"id": 12, "type": "preproc_call", "text": "#import \"StringUtil.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 13, "type": "preproc_directive", "text": "#import", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 14, "type": "preproc_arg", "text": "\"StringUtil.h\"", "parent": 12, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 22}}, {"id": 15, "type": "ERROR", "text": "@", "parent": null, "children": [16], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 16, "type": "ERROR", "text": "@", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 17, "type": "function_definition", "text": "interface Level : NSObject\n{\n SKScene *scene;\n NSString *level_id;\n \n long level_height;\n long level_width;\n \n long screen_height;\n long screen_width;\n}", "parent": null, "children": [18, 19, 21], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 24, "column": 1}}, {"id": 18, "type": "type_identifier", "text": "interface", "parent": 17, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 10}}, {"id": 19, "type": "ERROR", "text": "Level :", "parent": 17, "children": [20], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 18}}, {"id": 20, "type": "identifier", "text": "Level", "parent": 19, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 16}}, {"id": 21, "type": "identifier", "text": "NSObject", "parent": 17, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 27}}, {"id": 22, "type": "declaration", "text": "SKScene *scene;", "parent": 17, "children": [23, 24], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 19}}, {"id": 23, "type": "type_identifier", "text": "SKScene", "parent": 22, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 11}}, {"id": 24, "type": "pointer_declarator", "text": "*scene", "parent": 22, "children": [25, 26], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 18}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 26, "type": "identifier", "text": "scene", "parent": 24, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 18}}, {"id": 27, "type": "declaration", "text": "NSString *level_id;", "parent": 17, "children": [28, 29], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 23}}, {"id": 28, "type": "type_identifier", "text": "NSString", "parent": 27, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 12}}, {"id": 29, "type": "pointer_declarator", "text": "*level_id", "parent": 27, "children": [30, 31], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 22}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 14}}, {"id": 31, "type": "identifier", "text": "level_id", "parent": 29, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 22}}, {"id": 32, "type": "declaration", "text": "long level_height;", "parent": 17, "children": [33, 35], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 22}}, {"id": 33, "type": "sized_type_specifier", "text": "long", "parent": 32, "children": [34], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 8}}, {"id": 34, "type": "long", "text": "long", "parent": 33, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 8}}, {"id": 35, "type": "identifier", "text": "level_height", "parent": 32, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 21}}, {"id": 36, "type": "declaration", "text": "long level_width;", "parent": 17, "children": [37, 39], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 21}}, {"id": 37, "type": "sized_type_specifier", "text": "long", "parent": 36, "children": [38], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 8}}, {"id": 38, "type": "long", "text": "long", "parent": 37, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 8}}, {"id": 39, "type": "identifier", "text": "level_width", "parent": 36, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 20}}, {"id": 40, "type": "declaration", "text": "long screen_height;", "parent": 17, "children": [41, 43], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 23}}, {"id": 41, "type": "sized_type_specifier", "text": "long", "parent": 40, "children": [42], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 42, "type": "long", "text": "long", "parent": 41, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 43, "type": "identifier", "text": "screen_height", "parent": 40, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 22}}, {"id": 44, "type": "declaration", "text": "long screen_width;", "parent": 17, "children": [45, 47], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 22}}, {"id": 45, "type": "sized_type_specifier", "text": "long", "parent": 44, "children": [46], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 46, "type": "long", "text": "long", "parent": 45, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 47, "type": "identifier", "text": "screen_width", "parent": 44, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 21}}, {"id": 48, "type": "update_expression", "text": "-(instancetype) initWithData:(NSArray *) data", "parent": null, "children": [49, 60], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 45}}, {"id": 49, "type": "binary_expression", "text": "-(instancetype) initWithData:(NSArray *) data", "parent": 48, "children": [50, 56, 58, 59], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 45}}, {"id": 50, "type": "unary_expression", "text": "-(instancetype) initWithData", "parent": 49, "children": [51, 52], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 28}}, {"id": 51, "type": "-", "text": "-", "parent": 50, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 52, "type": "cast_expression", "text": "(instancetype) initWithData", "parent": 50, "children": [53, 55], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 28}}, {"id": 53, "type": "type_descriptor", "text": "instancetype", "parent": 52, "children": [54], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 14}}, {"id": 54, "type": "type_identifier", "text": "instancetype", "parent": 53, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 14}}, {"id": 55, "type": "identifier", "text": "initWithData", "parent": 52, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 28}}, {"id": 56, "type": "ERROR", "text": ":(NSArray", "parent": 49, "children": [57], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 37}}, {"id": 57, "type": "identifier", "text": "NSArray", "parent": 56, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 37}}, {"id": 58, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 39}}, {"id": 59, "type": "identifier", "text": "data", "parent": 49, "children": [], "start_point": {"row": 26, "column": 41}, "end_point": {"row": 26, "column": 45}}, {"id": 60, "type": "--", "text": "", "parent": 48, "children": [], "start_point": {"row": 26, "column": 45}, "end_point": {"row": 26, "column": 45}}, {"id": 61, "type": "unary_expression", "text": "-(NSMutableArray *)getBlocks", "parent": null, "children": [62, 63], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 28}}, {"id": 62, "type": "-", "text": "-", "parent": 61, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 63, "type": "cast_expression", "text": "(NSMutableArray *)getBlocks", "parent": 61, "children": [64, 68], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 28}}, {"id": 64, "type": "type_descriptor", "text": "NSMutableArray *", "parent": 63, "children": [65, 66], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 18}}, {"id": 65, "type": "type_identifier", "text": "NSMutableArray", "parent": 64, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 16}}, {"id": 66, "type": "abstract_pointer_declarator", "text": "*", "parent": 64, "children": [67], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 18}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 18}}, {"id": 68, "type": "identifier", "text": "getBlocks", "parent": 63, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 28}}, {"id": 69, "type": "unary_expression", "text": "-(BOOL)isLevelWon", "parent": null, "children": [70, 71], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 17}}, {"id": 70, "type": "-", "text": "-", "parent": 69, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 71, "type": "cast_expression", "text": "(BOOL)isLevelWon", "parent": 69, "children": [72, 74], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 17}}, {"id": 72, "type": "type_descriptor", "text": "BOOL", "parent": 71, "children": [73], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 6}}, {"id": 73, "type": "type_identifier", "text": "BOOL", "parent": 72, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 6}}, {"id": 74, "type": "identifier", "text": "isLevelWon", "parent": 71, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 17}}, {"id": 75, "type": "unary_expression", "text": "-(BOOL)isLevelLost", "parent": null, "children": [76, 77], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 18}}, {"id": 76, "type": "-", "text": "-", "parent": 75, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 77, "type": "cast_expression", "text": "(BOOL)isLevelLost", "parent": 75, "children": [78, 80], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 18}}, {"id": 78, "type": "type_descriptor", "text": "BOOL", "parent": 77, "children": [79], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 6}}, {"id": 79, "type": "type_identifier", "text": "BOOL", "parent": 78, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 6}}, {"id": 80, "type": "identifier", "text": "isLevelLost", "parent": 77, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 18}}, {"id": 81, "type": "ERROR", "text": "-(void)touchLogicWithTouch:(UITouch *)touch;\n\n@", "parent": null, "children": [82, 93], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 82, "type": "binary_expression", "text": "-(void)touchLogicWithTouch:(UITouch *)touch", "parent": 81, "children": [83, 89, 91, 92], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 43}}, {"id": 83, "type": "unary_expression", "text": "-(void)touchLogicWithTouch", "parent": 82, "children": [84, 85], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 26}}, {"id": 84, "type": "-", "text": "-", "parent": 83, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 85, "type": "cast_expression", "text": "(void)touchLogicWithTouch", "parent": 83, "children": [86, 88], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 26}}, {"id": 86, "type": "type_descriptor", "text": "void", "parent": 85, "children": [87], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 88, "type": "identifier", "text": "touchLogicWithTouch", "parent": 85, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 26}}, {"id": 89, "type": "ERROR", "text": ":(UITouch", "parent": 82, "children": [90], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 35}}, {"id": 90, "type": "identifier", "text": "UITouch", "parent": 89, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 35}}, {"id": 91, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 37}}, {"id": 92, "type": "identifier", "text": "touch", "parent": 82, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 43}}, {"id": 93, "type": "ERROR", "text": "@", "parent": 81, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 94, "type": "declaration", "text": "property NSMutableArray", "parent": null, "children": [95, 96], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 24}}, {"id": 95, "type": "type_identifier", "text": "property", "parent": 94, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 96, "type": "identifier", "text": "NSMutableArray", "parent": 94, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 24}}, {"id": 97, "type": "pointer_expression", "text": "*levelDesign", "parent": null, "children": [98, 99], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 37}}, {"id": 98, "type": "*", "text": "*", "parent": 97, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 26}}, {"id": 99, "type": "identifier", "text": "levelDesign", "parent": 97, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 37}}, {"id": 100, "type": "ERROR", "text": "@", "parent": null, "children": [101], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 101, "type": "ERROR", "text": "@", "parent": 100, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 102, "type": "declaration", "text": "property NSMutableArray", "parent": null, "children": [103, 104], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 24}}, {"id": 103, "type": "type_identifier", "text": "property", "parent": 102, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 9}}, {"id": 104, "type": "identifier", "text": "NSMutableArray", "parent": 102, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 24}}, {"id": 105, "type": "pointer_expression", "text": "*tileDesign", "parent": null, "children": [106, 107], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 36}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 26}}, {"id": 107, "type": "identifier", "text": "tileDesign", "parent": 105, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 36}}, {"id": 108, "type": "ERROR", "text": "@", "parent": null, "children": [109], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 109, "type": "ERROR", "text": "@", "parent": 108, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 1}}]}, "node_categories": {"declarations": {"functions": [17], "variables": [22, 27, 32, 36, 40, 44, 94, 102], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [48, 49, 50, 52, 61, 63, 69, 71, 75, 77, 82, 83, 85, 97, 105], "assignments": [], "loops": [], "conditionals": [18, 20, 21, 23, 26, 28, 31, 33, 35, 37, 39, 41, 43, 45, 47, 54, 55, 57, 59, 65, 68, 73, 74, 79, 80, 88, 90, 92, 95, 96, 99, 103, 104, 107], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3, 6, 9, 12], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": "Level", "text_snippet": "interface Level : NSObject\n{\n SKScene *scene;\n NSString *level_id;\n \n long level_height;"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// Level.h\n// Hexagon\n//\n// Created by <NAME> on 7/12/15.\n// Copyright (c) 2015 Chi Corp. All rights reserved.\n//\n\n#import <SpriteKit/SpriteKit.h>\n#import \"Tile.h\"\n#import \"CajunAlert.h\"\n#import \"ColorUtil.h\"\n#import \"StringUtil.h\"\n\n@interface Level : NSObject\n{\n SKScene *scene;\n NSString *level_id;\n \n long level_height;\n long level_width;\n \n long screen_height;\n long screen_width;\n}\n\n-(instancetype) initWithData:(NSArray *) data;\n-(NSMutableArray *)getBlocks;\n-(BOOL)isLevelWon;\n-(BOOL)isLevelLost;\n\n-(void)touchLogicWithTouch:(UITouch *)touch;\n\n@property NSMutableArray *levelDesign;\n@property NSMutableArray *tileDesign;\n\n@end\n"}
228
c
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2020 <NAME> // All rights reserved. #pragma once #include <djvGL/Enum.h> #include <djvCore/RapidJSONFunc.h> #include <sstream> #include <vector> namespace djv { namespace GL { DJV_ENUM_HELPERS(SwapInterval); } // namespace UI DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval); rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&); //! Throws: //! - std::exception void fromJSON(const rapidjson::Value&, GL::SwapInterval&); } // namespace djv
27.05
20
(translation_unit) "// SPDX-License-Identifier: BSD-3-Clause\n// Copyright (c) 2020 <NAME>\n// All rights reserved.\n\n#pragma once\n\n#include <djvGL/Enum.h>\n\n#include <djvCore/RapidJSONFunc.h>\n\n#include <sstream>\n#include <vector>\n\nnamespace djv\n{\n namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n } // namespace UI\n\n DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval);\n\n rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);\n\n //! Throws:\n //! - std::exception\n void fromJSON(const rapidjson::Value&, GL::SwapInterval&);\n\n} // namespace djv\n\n" (comment) "// SPDX-License-Identifier: BSD-3-Clause" (comment) "// Copyright (c) 2020 <NAME>" (comment) "// All rights reserved." (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <djvGL/Enum.h>\n" (#include) "#include" (system_lib_string) "<djvGL/Enum.h>" (preproc_include) "#include <djvCore/RapidJSONFunc.h>\n" (#include) "#include" (system_lib_string) "<djvCore/RapidJSONFunc.h>" (preproc_include) "#include <sstream>\n" (#include) "#include" (system_lib_string) "<sstream>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (function_definition) "namespace djv\n{\n namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n } // namespace UI\n\n DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval);\n\n rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);\n\n //! Throws:\n //! - std::exception\n void fromJSON(const rapidjson::Value&, GL::SwapInterval&);\n\n}" (type_identifier) "namespace" (identifier) "djv" (compound_statement) "{\n namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n } // namespace UI\n\n DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval);\n\n rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);\n\n //! Throws:\n //! - std::exception\n void fromJSON(const rapidjson::Value&, GL::SwapInterval&);\n\n}" ({) "{" (function_definition) "namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n }" (type_identifier) "namespace" (identifier) "GL" (compound_statement) "{\n DJV_ENUM_HELPERS(SwapInterval);\n\n }" ({) "{" (expression_statement) "DJV_ENUM_HELPERS(SwapInterval);" (call_expression) "DJV_ENUM_HELPERS(SwapInterval)" (identifier) "DJV_ENUM_HELPERS" (argument_list) "(SwapInterval)" (() "(" (identifier) "SwapInterval" ()) ")" (;) ";" (}) "}" (comment) "// namespace UI" (macro_type_specifier) "DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval)" (identifier) "DJV_ENUM_SERIALIZE_HELPERS" (() "(" (ERROR) "GL::" (type_descriptor) "GL" (type_identifier) "GL" (:) ":" (:) ":" (type_descriptor) "SwapInterval" (type_identifier) "SwapInterval" ()) ")" (;) ";" (labeled_statement) "rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);" (statement_identifier) "rapidjson" (ERROR) "::Value toJSON(GL::SwapInterval, rapidjson:" (:) ":" (:) ":" (type_identifier) "Value" (identifier) "toJSON" (() "(" (type_identifier) "GL" (:) ":" (:) ":" (comma_expression) "SwapInterval, rapidjson" (identifier) "SwapInterval" (,) "," (identifier) "rapidjson" (:) ":" (:) ":" (labeled_statement) "Document::AllocatorType&);" (statement_identifier) "Document" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "AllocatorType&);" (identifier) "AllocatorType" (ERROR) "&)" (&) "&" ()) ")" (;) ";" (comment) "//! Throws:" (comment) "//! - std::exception" (declaration) "void fromJSON(const rapidjson::Value&, GL::SwapInterval&);" (primitive_type) "void" (function_declarator) "fromJSON(const rapidjson::Value&, GL::SwapInterval&)" (identifier) "fromJSON" (parameter_list) "(const rapidjson::Value&, GL::SwapInterval&)" (() "(" (parameter_declaration) "const rapidjson::Value" (type_qualifier) "const" (const) "const" (type_identifier) "rapidjson" (ERROR) "::" (:) ":" (:) ":" (identifier) "Value" (ERROR) "&" (&) "&" (,) "," (parameter_declaration) "GL::SwapInterval" (type_identifier) "GL" (ERROR) "::" (:) ":" (:) ":" (identifier) "SwapInterval" (ERROR) "&" (&) "&" ()) ")" (;) ";" (}) "}" (comment) "// namespace djv"
110
8
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 27.05, "nodes": 56, "errors": 0, "source_hash": "1eb724902e9066c00dce4e7ccf2171f0191addc1980e42c755a5d2cc03d8c761", "categorized_nodes": 44}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <djvGL/Enum.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<djvGL/Enum.h>", "parent": 3, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <djvCore/RapidJSONFunc.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": "<djvCore/RapidJSONFunc.h>", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 34}}, {"id": 9, "type": "preproc_include", "text": "#include <sstream>\n", "parent": null, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<sstream>", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <vector>\n", "parent": null, "children": [13, 14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<vector>", "parent": 12, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 15, "type": "function_definition", "text": "namespace djv\n{\n namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n } // namespace UI\n\n DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval);\n\n rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);\n\n //! Throws:\n //! - std::exception\n void fromJSON(const rapidjson::Value&, GL::SwapInterval&);\n\n}", "parent": null, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 9}}, {"id": 17, "type": "identifier", "text": "djv", "parent": 15, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 13}}, {"id": 18, "type": "function_definition", "text": "namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n }", "parent": 15, "children": [19, 20], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 19, "column": 5}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 13}}, {"id": 20, "type": "identifier", "text": "GL", "parent": 18, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 16}}, {"id": 21, "type": "call_expression", "text": "DJV_ENUM_HELPERS(SwapInterval)", "parent": 18, "children": [22, 23], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 38}}, {"id": 22, "type": "identifier", "text": "DJV_ENUM_HELPERS", "parent": 21, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 24}}, {"id": 23, "type": "argument_list", "text": "(SwapInterval)", "parent": 21, "children": [24], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 38}}, {"id": 24, "type": "identifier", "text": "SwapInterval", "parent": 23, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 37}}, {"id": 25, "type": "macro_type_specifier", "text": "DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval)", "parent": 15, "children": [26, 27, 30], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 48}}, {"id": 26, "type": "identifier", "text": "DJV_ENUM_SERIALIZE_HELPERS", "parent": 25, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 30}}, {"id": 27, "type": "ERROR", "text": "GL::", "parent": 25, "children": [28], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 35}}, {"id": 28, "type": "type_descriptor", "text": "GL", "parent": 27, "children": [29], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 33}}, {"id": 29, "type": "type_identifier", "text": "GL", "parent": 28, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 33}}, {"id": 30, "type": "type_descriptor", "text": "SwapInterval", "parent": 25, "children": [31], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 47}}, {"id": 31, "type": "type_identifier", "text": "SwapInterval", "parent": 30, "children": [], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 47}}, {"id": 32, "type": "labeled_statement", "text": "rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);", "parent": 15, "children": [33, 34, 41], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 83}}, {"id": 33, "type": "statement_identifier", "text": "rapidjson", "parent": 32, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 13}}, {"id": 34, "type": "ERROR", "text": "::Value toJSON(GL::SwapInterval, rapidjson:", "parent": 32, "children": [35, 36, 37, 38], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 56}}, {"id": 35, "type": "type_identifier", "text": "Value", "parent": 34, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 20}}, {"id": 36, "type": "identifier", "text": "toJSON", "parent": 34, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 27}}, {"id": 37, "type": "type_identifier", "text": "GL", "parent": 34, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 30}}, {"id": 38, "type": "comma_expression", "text": "SwapInterval, rapidjson", "parent": 34, "children": [39, 40], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 55}}, {"id": 39, "type": "identifier", "text": "SwapInterval", "parent": 38, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 44}}, {"id": 40, "type": "identifier", "text": "rapidjson", "parent": 38, "children": [], "start_point": {"row": 23, "column": 46}, "end_point": {"row": 23, "column": 55}}, {"id": 41, "type": "labeled_statement", "text": "Document::AllocatorType&);", "parent": 32, "children": [42], "start_point": {"row": 23, "column": 57}, "end_point": {"row": 23, "column": 83}}, {"id": 42, "type": "statement_identifier", "text": "Document", "parent": 41, "children": [], "start_point": {"row": 23, "column": 57}, "end_point": {"row": 23, "column": 65}}, {"id": 43, "type": "identifier", "text": "AllocatorType", "parent": 41, "children": [], "start_point": {"row": 23, "column": 67}, "end_point": {"row": 23, "column": 80}}, {"id": 44, "type": "ERROR", "text": "&)", "parent": 41, "children": [], "start_point": {"row": 23, "column": 80}, "end_point": {"row": 23, "column": 82}}, {"id": 45, "type": "declaration", "text": "void fromJSON(const rapidjson::Value&, GL::SwapInterval&);", "parent": 15, "children": [46, 47], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 62}}, {"id": 46, "type": "primitive_type", "text": "void", "parent": 45, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 47, "type": "function_declarator", "text": "fromJSON(const rapidjson::Value&, GL::SwapInterval&)", "parent": 45, "children": [48, 49], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 61}}, {"id": 48, "type": "identifier", "text": "fromJSON", "parent": 47, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 17}}, {"id": 49, "type": "parameter_list", "text": "(const rapidjson::Value&, GL::SwapInterval&)", "parent": 47, "children": [50, 53], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 61}}, {"id": 50, "type": "parameter_declaration", "text": "const rapidjson::Value", "parent": 49, "children": [51, 52], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 40}}, {"id": 51, "type": "type_identifier", "text": "rapidjson", "parent": 50, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 33}}, {"id": 52, "type": "identifier", "text": "Value", "parent": 50, "children": [], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 40}}, {"id": 53, "type": "parameter_declaration", "text": "GL::SwapInterval", "parent": 49, "children": [54, 55], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 59}}, {"id": 54, "type": "type_identifier", "text": "GL", "parent": 53, "children": [], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 45}}, {"id": 55, "type": "identifier", "text": "SwapInterval", "parent": 53, "children": [], "start_point": {"row": 27, "column": 47}, "end_point": {"row": 27, "column": 59}}]}, "node_categories": {"declarations": {"functions": [15, 18, 47], "variables": [45, 50, 53], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [21, 38], "assignments": [], "loops": [], "conditionals": [16, 17, 19, 20, 22, 24, 25, 26, 29, 31, 33, 35, 36, 37, 39, 40, 42, 43, 48, 51, 52, 54, 55], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "fromJSON", "text_snippet": "namespace djv\n{\n namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n } // namespace U"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n }"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "fromJSON(const rapidjson::Value&, GL::SwapInterval&)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <djvGL/Enum.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <djvCore/RapidJSONFunc.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sstream>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <vector>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "// SPDX-License-Identifier: BSD-3-Clause\n// Copyright (c) 2020 <NAME>\n// All rights reserved.\n\n#pragma once\n\n#include <djvGL/Enum.h>\n\n#include <djvCore/RapidJSONFunc.h>\n\n#include <sstream>\n#include <vector>\n\nnamespace djv\n{\n namespace GL\n {\n DJV_ENUM_HELPERS(SwapInterval);\n\n } // namespace UI\n\n DJV_ENUM_SERIALIZE_HELPERS(GL::SwapInterval);\n\n rapidjson::Value toJSON(GL::SwapInterval, rapidjson::Document::AllocatorType&);\n\n //! Throws:\n //! - std::exception\n void fromJSON(const rapidjson::Value&, GL::SwapInterval&);\n\n} // namespace djv\n\n"}
229
c
// // ScrollDragView.h // HorizontalScrollDrag // // Created by Simay on 16/4/28. // Copyright © 2016年 Simay. All rights reserved. // #import <UIKit/UIKit.h> @interface ScrollDragView : UIScrollView @property (nonatomic, assign) CGSize itemSize; @property (nonatomic, assign) UIEdgeInsets itemInsert;//上下左右margin @property (nonatomic, assign) CGFloat spacingWidth; //间距大小 @property (nonatomic, assign,readonly) NSUInteger itemCount; //item数量 @property (nonatomic, assign) BOOL isHaveAddButton; @property (nonatomic, strong ,readonly) UIButton *addItemButton; //- (void)addImage:(UIImage *)image; - (void)addItem:(UIView *)item; //- (void)addImage:(UIImage *)image; //- (void)insertImage:(UIImage *)image atIndex:(NSUInteger)index; @end
36.85
20
(translation_unit) "//\n// ScrollDragView.h\n// HorizontalScrollDrag\n//\n// Created by Simay on 16/4/28.\n// Copyright © 2016年 Simay. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ScrollDragView : UIScrollView\n\n@property (nonatomic, assign) CGSize itemSize;\n@property (nonatomic, assign) UIEdgeInsets itemInsert;//上下左右margin\n@property (nonatomic, assign) CGFloat spacingWidth; //间距大小\n@property (nonatomic, assign,readonly) NSUInteger itemCount; //item数量\n@property (nonatomic, assign) BOOL isHaveAddButton;\n@property (nonatomic, strong ,readonly) UIButton *addItemButton;\n\n//- (void)addImage:(UIImage *)image;\n- (void)addItem:(UIView *)item;\n\n//- (void)addImage:(UIImage *)image;\n//- (void)insertImage:(UIImage *)image atIndex:(NSUInteger)index;\n\n@end\n" (comment) "//" (comment) "// ScrollDragView.h" (comment) "// HorizontalScrollDrag" (comment) "//" (comment) "// Created by Simay on 16/4/28." (comment) "// Copyright © 2016年 Simay. 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 ScrollDragView : UIScrollView\n\n@property (nonatomic, assign) CGSize itemSize;\n@property (nonatomic, assign) UIEdgeInsets itemInsert;//上下左右margin\n@property (nonatomic, assign) CGFloat spacingWidth; //间距大小\n@property (nonatomic, assign,readonly) NSUInteger itemCount; //item数量\n@property (nonatomic, assign) BOOL isHaveAddButton;\n@property (nonatomic, strong ,readonly) UIButton *addItemButton;\n\n//- (void)addImage:(UIImage *)image;\n- (void)addItem:(UIView *)item;\n\n//- (void)addImage:(UIImage *)image;\n//- (void)insertImage:(UIImage *)image atIndex:(NSUInteger)index;\n\n@end\n" (ERROR) "t" (type_identifier) "erface Sc" (function_declarator) "ollDragView : UIScrollView\n\n@property (nonatomic, assign) CG" (identifier) "ollDragView : " (ERROR) "IScrollView\n\n@property (n" (:) "I" (identifier) "crollView\n\n@" (ERROR) "o" (identifier) "perty (n" (parameter_list) "natomic, assign) CG" (() "n" (identifier) "atomic, a" (,) "s" (identifier) "ign) C" ()) "G" (declaration) "ize itemSize;\n@p" (type_identifier) "ize " (identifier) "mSize;\n@" (;) "p" (ERROR) "o" (ERROR) "o" (declaration) "perty (nonatomic, assign) UIEdgeInsets itemInsert;//上" (macro_type_specifier) "perty (nonatomic, assign) UI" (identifier) "perty (n" (() "n" (type_descriptor) "atomic, a" (type_identifier) "atomic, a" (ERROR) "ssign) U" (,) "s" (identifier) "ign) U" ()) "I" (identifier) "dgeInsets i" (ERROR) "mInsert;//" (identifier) "mInsert;//" (;) "上" (comment) "下左右margin\n@property " (ERROR) "n" (ERROR) "n" (declaration) "onatomic, assign) CGFloat spacingWidth; //间距大小\n@pr" (macro_type_specifier) "onatomic, assign) CGFloat " (identifier) "onatomic" (() " " (type_descriptor) "assign) C" (type_identifier) "assign) C" (ERROR) "GFloat " (,) "G" (identifier) "loat " ()) " " (ERROR) " spac" (identifier) " spac" (identifier) "h; //间距大小\n@p" (;) "r" (comment) "perty (nonatom" (ERROR) "c" (ERROR) "c" (declaration) ", assign,readonly) NSUInteger itemCount; //item数量\n@property" (macro_type_specifier) ", assign,readonly) NSUInteger item" (identifier) ", assign" (() "r" (type_descriptor) "eadonly) " (type_identifier) "eadonly) " (ERROR) "NSUInteger ite" (,) "N" (identifier) "UInteg" (,) "e" (identifier) "r ite" ()) "m" (identifier) "ount; //it" (ERROR) "\n@propert" (identifier) "\n@propert" (;) "y" (comment) "(nonatomic, " (ERROR) "s" (ERROR) "s" (declaration) "sign) BOOL isHaveAddButton;\n@property (nonatomic, " (macro_type_specifier) "sign) BOOL isHaveAddButton;\n" (identifier) "sign) BO" (() "L" (type_descriptor) " isHaveAd" (type_identifier) " isHaveAd" (ERROR) "dButton;" (,) "d" (identifier) "utton;" ()) "\n" (ERROR) "prop" (identifier) "prop" (identifier) "rty (nonatomic," (;) " " (ERROR) "t" (ERROR) "t" (declaration) "rong ,readonly) UIButton *addItemButton;\n\n//- (void)addImage:(U" (macro_type_specifier) "rong ,readonly) UIButton *addItemButto" (identifier) "rong ,re" (() "d" (type_descriptor) "only) UIB" (type_identifier) "only) UIB" (ERROR) "utton *addItemButt" (,) "u" (identifier) "ton *a" (,) "d" (identifier) "ItemButt" ()) "o" (ERROR) ";\n\n//- (" (identifier) ";\n\n//- (" (pointer_declarator) "oid)addImage:(" (*) "o" (identifier) "id)addImage:(" (;) "U" (comment) "mage *)image;\n- (void)addItem:(UIVie" (ERROR) " *)" (-) " " (() ")" (declaration) "item;\n\n//- (void)addImage:(U" (primitive_type) "item" (ERROR) ";\n\n//- (void)addIma" ()) ";" (identifier) "\n\n//- (" (:) "v" (() "o" (identifier) "id)add" (*) "m" ()) "a" (identifier) "ge:(" (;) "U" (comment) "mage *)image;\n//- (void)insertImage:" (comment) "UIImage *)image atIndex:(NSUInteger)index;\n\n@end\n" (ERROR) "" (ERROR) "" (identifier) ""
141
28
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 36.85, "nodes": 94, "errors": 0, "source_hash": "c894380cf9cf81a8217a2d709a084c14f73f6f4351e8c57a8fcd2e2ec68d5183", "categorized_nodes": 53}, "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 ScrollDragView : UIScrollView\n\n@property (nonatomic, assign) CGSize itemSize;\n@property (nonatomic, assign) UIEdgeInsets itemInsert;//\u4e0a\u4e0b\u5de6\u53f3margin\n@property (nonatomic, assign) CGFloat spacingWidth; //\u95f4\u8ddd\u5927\u5c0f\n@property (nonatomic, assign,readonly) NSUInteger itemCount; //item\u6570\u91cf\n@property (nonatomic, assign) BOOL isHaveAddButton;\n@property (nonatomic, strong ,readonly) UIButton *addItemButton;\n\n//- (void)addImage:(UIImage *)image;\n- (void)addItem:(UIView *)item;\n\n//- (void)addImage:(UIImage *)image;\n//- (void)insertImage:(UIImage *)image atIndex:(NSUInteger)index;\n\n@end\n", "parent": null, "children": [4, 5, 6, 15, 18, 20, 30, 32, 42, 44, 55, 57, 67, 69, 82, 84, 91, 93], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 25, "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 Sc", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "function_declarator", "text": "ollDragView : UIScrollView\n\n@property (nonatomic, assign) CG", "parent": 3, "children": [7, 8, 12], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 12, "column": 29}}, {"id": 7, "type": "identifier", "text": "ollDragView : ", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 25}}, {"id": 8, "type": "ERROR", "text": "IScrollView\n\n@property (n", "parent": 6, "children": [9, 10, 11], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 12, "column": 9}}, {"id": 9, "type": "identifier", "text": "crollView\n\n@", "parent": 8, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 40}}, {"id": 10, "type": "ERROR", "text": "o", "parent": 8, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 11, "type": "identifier", "text": "perty (n", "parent": 8, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 12, "type": "parameter_list", "text": "natomic, assign) CG", "parent": 6, "children": [13, 14], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 29}}, {"id": 13, "type": "identifier", "text": "atomic, a", "parent": 12, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 20}}, {"id": 14, "type": "identifier", "text": "ign) C", "parent": 12, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 28}}, {"id": 15, "type": "declaration", "text": "ize itemSize;\n@p", "parent": 3, "children": [16, 17], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 53}}, {"id": 16, "type": "type_identifier", "text": "ize ", "parent": 15, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 36}}, {"id": 17, "type": "identifier", "text": "mSize;\n@", "parent": 15, "children": [], "start_point": {"row": 12, "column": 44}, "end_point": {"row": 12, "column": 52}}, {"id": 18, "type": "ERROR", "text": "o", "parent": 3, "children": [19], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 19, "type": "ERROR", "text": "o", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 20, "type": "declaration", "text": "perty (nonatomic, assign) UIEdgeInsets itemInsert;//\u4e0a", "parent": 3, "children": [21, 27, 28], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 55}}, {"id": 21, "type": "macro_type_specifier", "text": "perty (nonatomic, assign) UI", "parent": 20, "children": [22, 23, 25], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 29}}, {"id": 22, "type": "identifier", "text": "perty (n", "parent": 21, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 23, "type": "type_descriptor", "text": "atomic, a", "parent": 21, "children": [24], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 24, "type": "type_identifier", "text": "atomic, a", "parent": 23, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 25, "type": "ERROR", "text": "ssign) U", "parent": 21, "children": [26], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 28}}, {"id": 26, "type": "identifier", "text": "ign) U", "parent": 25, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 28}}, {"id": 27, "type": "identifier", "text": "dgeInsets i", "parent": 20, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 42}}, {"id": 28, "type": "ERROR", "text": "mInsert;//", "parent": 20, "children": [29], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 54}}, {"id": 29, "type": "identifier", "text": "mInsert;//", "parent": 28, "children": [], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 54}}, {"id": 30, "type": "ERROR", "text": "n", "parent": 3, "children": [31], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 31, "type": "ERROR", "text": "n", "parent": 30, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 32, "type": "declaration", "text": "onatomic, assign) CGFloat spacingWidth; //\u95f4\u8ddd\u5927\u5c0f\n@pr", "parent": 3, "children": [33, 39, 41], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 57}}, {"id": 33, "type": "macro_type_specifier", "text": "onatomic, assign) CGFloat ", "parent": 32, "children": [34, 35, 37], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 29}}, {"id": 34, "type": "identifier", "text": "onatomic", "parent": 33, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 35, "type": "type_descriptor", "text": "assign) C", "parent": 33, "children": [36], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 36, "type": "type_identifier", "text": "assign) C", "parent": 35, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 37, "type": "ERROR", "text": "GFloat ", "parent": 33, "children": [38], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 28}}, {"id": 38, "type": "identifier", "text": "loat ", "parent": 37, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 28}}, {"id": 39, "type": "ERROR", "text": " spac", "parent": 32, "children": [40], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 37}}, {"id": 40, "type": "identifier", "text": " spac", "parent": 39, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 37}}, {"id": 41, "type": "identifier", "text": "h; //\u95f4\u8ddd\u5927\u5c0f\n@p", "parent": 32, "children": [], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 56}}, {"id": 42, "type": "ERROR", "text": "c", "parent": 3, "children": [43], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 43, "type": "ERROR", "text": "c", "parent": 42, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 44, "type": "declaration", "text": ", assign,readonly) NSUInteger itemCount; //item\u6570\u91cf\n@property", "parent": 3, "children": [45, 52, 53], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 63}}, {"id": 45, "type": "macro_type_specifier", "text": ", assign,readonly) NSUInteger item", "parent": 44, "children": [46, 47, 49], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 38}}, {"id": 46, "type": "identifier", "text": ", assign", "parent": 45, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 47, "type": "type_descriptor", "text": "eadonly) ", "parent": 45, "children": [48], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 48, "type": "type_identifier", "text": "eadonly) ", "parent": 47, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 49, "type": "ERROR", "text": "NSUInteger ite", "parent": 45, "children": [50, 51], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 37}}, {"id": 50, "type": "identifier", "text": "UInteg", "parent": 49, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 28}}, {"id": 51, "type": "identifier", "text": "r ite", "parent": 49, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 37}}, {"id": 52, "type": "identifier", "text": "ount; //it", "parent": 44, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 49}}, {"id": 53, "type": "ERROR", "text": "\n@propert", "parent": 44, "children": [54], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 62}}, {"id": 54, "type": "identifier", "text": "\n@propert", "parent": 53, "children": [], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 62}}, {"id": 55, "type": "ERROR", "text": "s", "parent": 3, "children": [56], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 56, "type": "ERROR", "text": "s", "parent": 55, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 57, "type": "declaration", "text": "sign) BOOL isHaveAddButton;\n@property (nonatomic, ", "parent": 3, "children": [58, 64, 66], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 51}}, {"id": 58, "type": "macro_type_specifier", "text": "sign) BOOL isHaveAddButton;\n", "parent": 57, "children": [59, 60, 62], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 29}}, {"id": 59, "type": "identifier", "text": "sign) BO", "parent": 58, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 60, "type": "type_descriptor", "text": " isHaveAd", "parent": 58, "children": [61], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 61, "type": "type_identifier", "text": " isHaveAd", "parent": 60, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 62, "type": "ERROR", "text": "dButton;", "parent": 58, "children": [63], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 28}}, {"id": 63, "type": "identifier", "text": "utton;", "parent": 62, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 28}}, {"id": 64, "type": "ERROR", "text": "prop", "parent": 57, "children": [65], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 34}}, {"id": 65, "type": "identifier", "text": "prop", "parent": 64, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 34}}, {"id": 66, "type": "identifier", "text": "rty (nonatomic,", "parent": 57, "children": [], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 50}}, {"id": 67, "type": "ERROR", "text": "t", "parent": 3, "children": [68], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 68, "type": "ERROR", "text": "t", "parent": 67, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 69, "type": "declaration", "text": "rong ,readonly) UIButton *addItemButton;\n\n//- (void)addImage:(U", "parent": 3, "children": [70, 77, 79], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 64}}, {"id": 70, "type": "macro_type_specifier", "text": "rong ,readonly) UIButton *addItemButto", "parent": 69, "children": [71, 72, 74], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 39}}, {"id": 71, "type": "identifier", "text": "rong ,re", "parent": 70, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 72, "type": "type_descriptor", "text": "only) UIB", "parent": 70, "children": [73], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 73, "type": "type_identifier", "text": "only) UIB", "parent": 72, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 74, "type": "ERROR", "text": "utton *addItemButt", "parent": 70, "children": [75, 76], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 38}}, {"id": 75, "type": "identifier", "text": "ton *a", "parent": 74, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 28}}, {"id": 76, "type": "identifier", "text": "ItemButt", "parent": 74, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 38}}, {"id": 77, "type": "ERROR", "text": ";\n\n//- (", "parent": 69, "children": [78], "start_point": {"row": 17, "column": 40}, "end_point": {"row": 17, "column": 48}}, {"id": 78, "type": "identifier", "text": ";\n\n//- (", "parent": 77, "children": [], "start_point": {"row": 17, "column": 40}, "end_point": {"row": 17, "column": 48}}, {"id": 79, "type": "pointer_declarator", "text": "oid)addImage:(", "parent": 69, "children": [80, 81], "start_point": {"row": 17, "column": 49}, "end_point": {"row": 17, "column": 63}}, {"id": 80, "type": "*", "text": "o", "parent": 79, "children": [], "start_point": {"row": 17, "column": 49}, "end_point": {"row": 17, "column": 50}}, {"id": 81, "type": "identifier", "text": "id)addImage:(", "parent": 79, "children": [], "start_point": {"row": 17, "column": 50}, "end_point": {"row": 17, "column": 63}}, {"id": 82, "type": "ERROR", "text": " *)", "parent": 3, "children": [83], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 3}}, {"id": 83, "type": "-", "text": " ", "parent": 82, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 84, "type": "declaration", "text": "item;\n\n//- (void)addImage:(U", "parent": 3, "children": [85, 86, 90], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 31}}, {"id": 85, "type": "primitive_type", "text": "item", "parent": 84, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 86, "type": "ERROR", "text": ";\n\n//- (void)addIma", "parent": 84, "children": [87, 88, 89], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 26}}, {"id": 87, "type": "identifier", "text": "\n\n//- (", "parent": 86, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 15}}, {"id": 88, "type": "identifier", "text": "id)add", "parent": 86, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 23}}, {"id": 89, "type": "*", "text": "m", "parent": 86, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 25}}, {"id": 90, "type": "identifier", "text": "ge:(", "parent": 84, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 30}}, {"id": 91, "type": "ERROR", "text": "", "parent": 3, "children": [92], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 92, "type": "ERROR", "text": "", "parent": 91, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 93, "type": "identifier", "text": "", "parent": 3, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [15, 20, 32, 44, 57, 69, 84], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 11, 13, 14, 16, 17, 21, 22, 24, 26, 27, 29, 33, 34, 36, 38, 40, 41, 45, 46, 48, 50, 51, 52, 54, 58, 59, 61, 63, 65, 66, 70, 71, 73, 75, 76, 78, 81, 87, 88, 90, 93], "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": "ollDragView : UIScrollView\n\n@property (nonatomic, assign) CG"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// ScrollDragView.h\n// HorizontalScrollDrag\n//\n// Created by Simay on 16/4/28.\n// Copyright \u00a9 2016\u5e74 Simay. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ScrollDragView : UIScrollView\n\n@property (nonatomic, assign) CGSize itemSize;\n@property (nonatomic, assign) UIEdgeInsets itemInsert;//\u4e0a\u4e0b\u5de6\u53f3margin\n@property (nonatomic, assign) CGFloat spacingWidth; //\u95f4\u8ddd\u5927\u5c0f\n@property (nonatomic, assign,readonly) NSUInteger itemCount; //item\u6570\u91cf\n@property (nonatomic, assign) BOOL isHaveAddButton;\n@property (nonatomic, strong ,readonly) UIButton *addItemButton;\n\n//- (void)addImage:(UIImage *)image;\n- (void)addItem:(UIView *)item;\n\n//- (void)addImage:(UIImage *)image;\n//- (void)insertImage:(UIImage *)image atIndex:(NSUInteger)index;\n\n@end\n"}
230
c
// // AppDelegate.h // remember // // Created by Apple on 2017/5/7. // Copyright © 2017年 ZKC. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
20.75
12
(translation_unit) "//\n// AppDelegate.h\n// remember\n//\n// Created by Apple on 2017/5/7.\n// Copyright © 2017年 ZKC. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n" (comment) "//" (comment) "// AppDelegate.h" (comment) "// remember" (comment) "//" (comment) "// Created by Apple on 2017/5/7." (comment) "// Copyright © 2017年 ZKC. 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 AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n" (ERROR) "t" (type_identifier) "erface Ap" (ERROR) "Delegate : UIResponder <UIApplicationDelegate>\n\n@pro" (identifier) "Delegate : " (:) "I" (identifier) "esponder <U" (<) "A" (identifier) "pplicationDelegate>\n\n" (>) "@" (ERROR) "o" (function_declarator) "perty (strong, nonatomic) UI" (identifier) "perty (s" (parameter_list) "rong, nonatomic) UI" (() "r" (identifier) "ong, n" (,) "o" (identifier) "atomic) U" ()) "I" (declaration) "indow *window;\n\n\n" (type_identifier) "indow *w" (pointer_declarator) "ndow;\n\n" (*) "n" (identifier) "dow;\n\n" (;) "\n" (ERROR) "d" (ERROR) "d" (identifier) "\n\n"
39
6
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 20.75, "nodes": 26, "errors": 0, "source_hash": "a1f7b5442b4d09ec7c084a55820f2fff4c28479133d0e77974a1772b9f7af2b1", "categorized_nodes": 13}, "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 AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n", "parent": null, "children": [4, 5, 6, 13, 18, 23, 25], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 15, "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 Ap", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "ERROR", "text": "Delegate : UIResponder <UIApplicationDelegate>\n\n@pro", "parent": 3, "children": [7, 8, 9, 10, 11, 12], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 12, "column": 1}}, {"id": 7, "type": "identifier", "text": "Delegate : ", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 22}}, {"id": 8, "type": "identifier", "text": "esponder <U", "parent": 6, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 36}}, {"id": 9, "type": "<", "text": "A", "parent": 6, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 38}}, {"id": 10, "type": "identifier", "text": "pplicationDelegate>\n\n", "parent": 6, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 59}}, {"id": 11, "type": ">", "text": "@", "parent": 6, "children": [], "start_point": {"row": 10, "column": 59}, "end_point": {"row": 10, "column": 60}}, {"id": 12, "type": "ERROR", "text": "o", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 13, "type": "function_declarator", "text": "perty (strong, nonatomic) UI", "parent": 3, "children": [14, 15], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 29}}, {"id": 14, "type": "identifier", "text": "perty (s", "parent": 13, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 15, "type": "parameter_list", "text": "rong, nonatomic) UI", "parent": 13, "children": [16, 17], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 29}}, {"id": 16, "type": "identifier", "text": "ong, n", "parent": 15, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 17}}, {"id": 17, "type": "identifier", "text": "atomic) U", "parent": 15, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 28}}, {"id": 18, "type": "declaration", "text": "indow *window;\n\n\n", "parent": 3, "children": [19, 20], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 47}}, {"id": 19, "type": "type_identifier", "text": "indow *w", "parent": 18, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 38}}, {"id": 20, "type": "pointer_declarator", "text": "ndow;\n\n", "parent": 18, "children": [21, 22], "start_point": {"row": 12, "column": 39}, "end_point": {"row": 12, "column": 46}}, {"id": 21, "type": "*", "text": "n", "parent": 20, "children": [], "start_point": {"row": 12, "column": 39}, "end_point": {"row": 12, "column": 40}}, {"id": 22, "type": "identifier", "text": "dow;\n\n", "parent": 20, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 46}}, {"id": 23, "type": "ERROR", "text": "d", "parent": 3, "children": [24], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 24, "type": "ERROR", "text": "d", "parent": 23, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 25, "type": "identifier", "text": "\n\n", "parent": 3, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}]}, "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, 25], "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": "perty (strong, nonatomic) UI"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// AppDelegate.h\n// remember\n//\n// Created by Apple on 2017/5/7.\n// Copyright \u00a9 2017\u5e74 ZKC. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n\n@end\n\n"}
231
c
/***************************************************************************//** * @file main.c * @brief Demonstrate how to implement a composite device.(Virtual com port and Mass storage device) * @version 2.0.0 * * @copyright (C) 2016 Nuvoton Technology Corp. All rights reserved. ******************************************************************************/ #include <stdio.h> #include "NuMicro.h" #include "vcom_serial.h" #include "massstorage.h" #define CRYSTAL_LESS 1 #define TRIM_INIT (SYS_BASE+0x10C) /*--------------------------------------------------------------------------*/ STR_VCOM_LINE_CODING gLineCoding = {115200, 0, 0, 8}; /* Baud rate : 115200 */ /* Stop bit */ /* parity */ /* data bits */ uint16_t gCtrlSignal = 0; /* BIT0: DTR(Data Terminal Ready) , BIT1: RTS(Request To Send) */ /*--------------------------------------------------------------------------*/ #define RXBUFSIZE 512 /* RX buffer size */ #define TXBUFSIZE 512 /* RX buffer size */ #define TX_FIFO_SIZE 16 /* TX Hardware FIFO size */ #define DATA_FLASH_BASE 0x40000 /*---------------------------------------------------------------------------------------------------------*/ /* Global variables */ /*---------------------------------------------------------------------------------------------------------*/ /* UART0 */ volatile uint8_t comRbuf[RXBUFSIZE]; volatile uint16_t comRbytes = 0; volatile uint16_t comRhead = 0; volatile uint16_t comRtail = 0; volatile uint8_t comTbuf[TXBUFSIZE]; volatile uint16_t comTbytes = 0; volatile uint16_t comThead = 0; volatile uint16_t comTtail = 0; uint8_t gRxBuf[64] = {0}; uint8_t *gpu8RxBuf = 0; uint32_t gu32RxSize = 0; uint32_t gu32TxSize = 0; volatile int8_t gi8BulkOutReady = 0; void SYS_Init(void) { /* Unlock protected registers */ SYS_UnlockReg(); /* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */ PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk); /* Enable External XTAL (4~24 MHz) */ CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk); /* Waiting for 12MHz clock ready */ CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk); /* Switch HCLK clock source to HXT */ CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1)); /* Set core clock as PLL_CLOCK from PLL */ CLK_SetCoreClock(FREQ_192MHZ); /* Set both PCLK0 and PCLK1 as HCLK/2 */ CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2; /* M480LD support crystal-less */ if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)) { CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk; /* Select IP clock source */ CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk; } else { /* Select IP clock source */ CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk; CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4); } /* Select USBD */ SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk; /* Enable IP clock */ CLK_EnableModuleClock(USBD_MODULE); /* Select IP clock source */ CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1)); /* Enable IP clock */ CLK_EnableModuleClock(UART0_MODULE); /* Set PA.12 ~ PA.14 to input mode */ PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk); SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk); SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID); /* Set GPB multi-function pins for UART0 RXD and TXD */ SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk); SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD); } void UART0_Init(void) { /* Configure UART0 and set UART0 Baudrate */ UART_Open(UART0, 115200); /* Enable Interrupt and install the call back function */ UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk)); } void UART0_IRQHandler(void) { uint8_t bInChar; int32_t size; uint32_t u32IntStatus; u32IntStatus = UART0->INTSTS; if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk)) { /* Receiver FIFO threshold level is reached or Rx time out */ /* Get all the input characters */ while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk)) { /* Get the character from UART Buffer */ bInChar = UART0->DAT; /* Check if buffer full */ if(comRbytes < RXBUFSIZE) { /* Enqueue the character */ comRbuf[comRtail++] = bInChar; if(comRtail >= RXBUFSIZE) comRtail = 0; comRbytes++; } else { /* FIFO over run */ } } } if(u32IntStatus & UART_INTSTS_THREIF_Msk) { if(comTbytes) { /* Fill the Tx FIFO */ size = comTbytes; if(size >= TX_FIFO_SIZE) { size = TX_FIFO_SIZE; } while(size) { bInChar = comTbuf[comThead++]; UART0->DAT = bInChar; if(comThead >= TXBUFSIZE) comThead = 0; comTbytes--; size--; } } else { /* No more data, just stop Tx (Stop work) */ UART0->INTEN &= ~UART_INTEN_THREIEN_Msk; } } } void VCOM_TransferData(void) { int32_t i, i32Len; /* Check whether USB is ready for next packet or not*/ if(gu32TxSize == 0) { /* Check whether we have new COM Rx data to send to USB or not */ if(comRbytes) { i32Len = comRbytes; if(i32Len > EP2_MAX_PKT_SIZE) i32Len = EP2_MAX_PKT_SIZE; for(i = 0; i < i32Len; i++) { gRxBuf[i] = comRbuf[comRhead++]; if(comRhead >= RXBUFSIZE) comRhead = 0; } __set_PRIMASK(1); comRbytes -= i32Len; __set_PRIMASK(0); gu32TxSize = i32Len; USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len); USBD_SET_PAYLOAD_LEN(EP2, i32Len); } else { /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and no more data to send at this moment to note Host the transfer has been done */ i32Len = USBD_GET_PAYLOAD_LEN(EP2); if(i32Len == EP2_MAX_PKT_SIZE) USBD_SET_PAYLOAD_LEN(EP2, 0); } } /* Process the Bulk out data when bulk out data is ready. */ if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes)) { for(i = 0; i < gu32RxSize; i++) { comTbuf[comTtail++] = gpu8RxBuf[i]; if(comTtail >= TXBUFSIZE) comTtail = 0; } __set_PRIMASK(1); comTbytes += gu32RxSize; __set_PRIMASK(0); gu32RxSize = 0; gi8BulkOutReady = 0; /* Clear bulk out ready flag */ /* Ready to get next BULK out */ USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE); } /* Process the software Tx FIFO */ if(comTbytes) { /* Check if Tx is working */ if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0) { /* Send one bytes out */ UART0->DAT = comTbuf[comThead++]; if(comThead >= TXBUFSIZE) comThead = 0; __set_PRIMASK(1); comTbytes--; __set_PRIMASK(0); /* Enable Tx Empty Interrupt. (Trigger first one) */ UART0->INTEN |= UART_INTEN_THREIEN_Msk; } } } int32_t main (void) { uint32_t u32TrimInit; uint32_t au32Config[2]; SYS_Init(); UART0_Init(); SYS_UnlockReg(); /* Enable FMC ISP function */ FMC_Open(); /* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */ if (FMC_ReadConfig(au32Config, 2) < 0) return -1; if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) ) { FMC_ENABLE_CFG_UPDATE(); au32Config[0] &= ~0x1; au32Config[1] = DATA_FLASH_BASE; if (FMC_WriteConfig(au32Config, 2) < 0) return -1; FMC_ReadConfig(au32Config, 2); if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE)) { printf("Error: Program Config Failed!\n"); /* Disable FMC ISP function */ FMC_Close(); SYS_LockReg(); return -1; } /* Reset Chip to reload new CONFIG value */ SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk; } USBD_Open(&gsInfo, VCOM_ClassRequest, NULL); USBD_SetConfigCallback(MSC_SetConfig); /* Endpoint configuration */ VCOM_Init(); USBD_Start(); SYS_UnlockReg(); if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)) { /* Start USB trim */ USBD->INTSTS = USBD_INTSTS_SOFIF_Msk; while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0); SYS->HIRCTCTL = 0x1; SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk; /* Backup default trim */ u32TrimInit = M32(TRIM_INIT); } NVIC_EnableIRQ(UART0_IRQn); NVIC_EnableIRQ(USBD_IRQn); while(1) { if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)) { /* Start USB trim if it is not enabled. */ if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1) { if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) { /* Clear SOF */ USBD->INTSTS = USBD_INTSTS_SOFIF_Msk; /* Re-enable crystal-less */ SYS->HIRCTCTL = 0x1; SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk; } } /* Disable USB Trim when error */ if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk)) { /* Init TRIM */ M32(TRIM_INIT) = u32TrimInit; /* Disable crystal-less */ SYS->HIRCTCTL = 0; /* Clear error flags */ SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk; /* Clear SOF */ USBD->INTSTS = USBD_INTSTS_SOFIF_Msk; } } VCOM_TransferData(); MSC_ProcessCmd(); } } /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/
35.53
304
(translation_unit) "/***************************************************************************//**\n * @file main.c\n * @brief Demonstrate how to implement a composite device.(Virtual com port and Mass storage device)\n * @version 2.0.0\n *\n * @copyright (C) 2016 Nuvoton Technology Corp. All rights reserved.\n ******************************************************************************/\n#include <stdio.h>\n#include "NuMicro.h"\n#include "vcom_serial.h"\n#include "massstorage.h"\n\n#define CRYSTAL_LESS 1\n#define TRIM_INIT (SYS_BASE+0x10C)\n\n/*--------------------------------------------------------------------------*/\nSTR_VCOM_LINE_CODING gLineCoding = {115200, 0, 0, 8}; /* Baud rate : 115200 */\n/* Stop bit */\n/* parity */\n/* data bits */\nuint16_t gCtrlSignal = 0; /* BIT0: DTR(Data Terminal Ready) , BIT1: RTS(Request To Send) */\n\n/*--------------------------------------------------------------------------*/\n#define RXBUFSIZE 512 /* RX buffer size */\n#define TXBUFSIZE 512 /* RX buffer size */\n\n#define TX_FIFO_SIZE 16 /* TX Hardware FIFO size */\n\n#define DATA_FLASH_BASE 0x40000\n/*---------------------------------------------------------------------------------------------------------*/\n/* Global variables */\n/*---------------------------------------------------------------------------------------------------------*/\n/* UART0 */\nvolatile uint8_t comRbuf[RXBUFSIZE];\nvolatile uint16_t comRbytes = 0;\nvolatile uint16_t comRhead = 0;\nvolatile uint16_t comRtail = 0;\n\nvolatile uint8_t comTbuf[TXBUFSIZE];\nvolatile uint16_t comTbytes = 0;\nvolatile uint16_t comThead = 0;\nvolatile uint16_t comTtail = 0;\n\nuint8_t gRxBuf[64] = {0};\nuint8_t *gpu8RxBuf = 0;\nuint32_t gu32RxSize = 0;\nuint32_t gu32TxSize = 0;\n\nvolatile int8_t gi8BulkOutReady = 0;\n\nvoid SYS_Init(void)\n{\n /* Unlock protected registers */\n SYS_UnlockReg();\n\n /* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */\n PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk);\n\n /* Enable External XTAL (4~24 MHz) */\n CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);\n\n /* Waiting for 12MHz clock ready */\n CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);\n\n /* Switch HCLK clock source to HXT */\n CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1));\n\n /* Set core clock as PLL_CLOCK from PLL */\n CLK_SetCoreClock(FREQ_192MHZ);\n\n /* Set both PCLK0 and PCLK1 as HCLK/2 */\n CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2;\n\n /* M480LD support crystal-less */\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }\n\n /* Select USBD */\n SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk;\n\n /* Enable IP clock */\n CLK_EnableModuleClock(USBD_MODULE);\n\n /* Select IP clock source */\n CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1));\n\n /* Enable IP clock */\n CLK_EnableModuleClock(UART0_MODULE);\n /* Set PA.12 ~ PA.14 to input mode */\n PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk);\n SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk);\n SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID);\n\n /* Set GPB multi-function pins for UART0 RXD and TXD */\n SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);\n SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);\n\n}\n\nvoid UART0_Init(void)\n{\n /* Configure UART0 and set UART0 Baudrate */\n UART_Open(UART0, 115200);\n\n /* Enable Interrupt and install the call back function */\n UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk));\n}\n\n\nvoid UART0_IRQHandler(void)\n{\n uint8_t bInChar;\n int32_t size;\n uint32_t u32IntStatus;\n\n u32IntStatus = UART0->INTSTS;\n\n if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }\n\n if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }\n}\n\nvoid VCOM_TransferData(void)\n{\n int32_t i, i32Len;\n\n /* Check whether USB is ready for next packet or not*/\n if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }\n\n /* Process the Bulk out data when bulk out data is ready. */\n if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }\n\n /* Process the software Tx FIFO */\n if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }\n}\n\n\nint32_t main (void)\n{\n uint32_t u32TrimInit;\n uint32_t au32Config[2];\n\n SYS_Init();\n UART0_Init();\n\n SYS_UnlockReg();\n\n /* Enable FMC ISP function */\n FMC_Open();\n\n /* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */\n if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;\n\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }\n\n USBD_Open(&gsInfo, VCOM_ClassRequest, NULL);\n USBD_SetConfigCallback(MSC_SetConfig);\n /* Endpoint configuration */\n VCOM_Init();\n USBD_Start();\n\n SYS_UnlockReg();\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }\n NVIC_EnableIRQ(UART0_IRQn);\n NVIC_EnableIRQ(USBD_IRQn);\n\n while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }\n}\n\n\n\n/*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/\n\n" (comment) "/***************************************************************************/" (comment) "/**\n * @file main.c\n * @brief Demonstrate how to implement a composite device.(Virtual com port and Mass storage device)\n * @version 2.0.0\n *\n * @copyright (C) 2016 Nuvoton Technology Corp. All rights reserved.\n ******************************************************************************/" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include "NuMicro.h"\n" (#include) "#include" (string_literal) ""NuMicro.h"" (") """ (string_content) "NuMicro.h" (") """ (preproc_include) "#include "vcom_serial.h"\n" (#include) "#include" (string_literal) ""vcom_serial.h"" (") """ (string_content) "vcom_serial.h" (") """ (preproc_include) "#include "massstorage.h"\n" (#include) "#include" (string_literal) ""massstorage.h"" (") """ (string_content) "massstorage.h" (") """ (preproc_def) "#define CRYSTAL_LESS 1\n" (#define) "#define" (identifier) "CRYSTAL_LESS" (preproc_arg) "1" (preproc_def) "#define TRIM_INIT (SYS_BASE+0x10C)\n" (#define) "#define" (identifier) "TRIM_INIT" (preproc_arg) "(SYS_BASE+0x10C)" (comment) "/*--------------------------------------------------------------------------*/" (declaration) "STR_VCOM_LINE_CODING gLineCoding = {115200, 0, 0, 8};" (type_identifier) "STR_VCOM_LINE_CODING" (init_declarator) "gLineCoding = {115200, 0, 0, 8}" (identifier) "gLineCoding" (=) "=" (initializer_list) "{115200, 0, 0, 8}" ({) "{" (number_literal) "115200" (,) "," (number_literal) "0" (,) "," (number_literal) "0" (,) "," (number_literal) "8" (}) "}" (;) ";" (comment) "/* Baud rate : 115200 */" (comment) "/* Stop bit */" (comment) "/* parity */" (comment) "/* data bits */" (declaration) "uint16_t gCtrlSignal = 0;" (primitive_type) "uint16_t" (init_declarator) "gCtrlSignal = 0" (identifier) "gCtrlSignal" (=) "=" (number_literal) "0" (;) ";" (comment) "/* BIT0: DTR(Data Terminal Ready) , BIT1: RTS(Request To Send) */" (comment) "/*--------------------------------------------------------------------------*/" (preproc_def) "#define RXBUFSIZE 512 /* RX buffer size */\n" (#define) "#define" (identifier) "RXBUFSIZE" (preproc_arg) "512 " (comment) "/* RX buffer size */" (preproc_def) "#define TXBUFSIZE 512 /* RX buffer size */\n" (#define) "#define" (identifier) "TXBUFSIZE" (preproc_arg) "512 " (comment) "/* RX buffer size */" (preproc_def) "#define TX_FIFO_SIZE 16 /* TX Hardware FIFO size */\n" (#define) "#define" (identifier) "TX_FIFO_SIZE" (preproc_arg) "16 " (comment) "/* TX Hardware FIFO size */" (preproc_def) "#define DATA_FLASH_BASE 0x40000\n" (#define) "#define" (identifier) "DATA_FLASH_BASE" (preproc_arg) "0x40000" (comment) "/*---------------------------------------------------------------------------------------------------------*/" (comment) "/* Global variables */" (comment) "/*---------------------------------------------------------------------------------------------------------*/" (comment) "/* UART0 */" (declaration) "volatile uint8_t comRbuf[RXBUFSIZE];" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint8_t" (array_declarator) "comRbuf[RXBUFSIZE]" (identifier) "comRbuf" ([) "[" (identifier) "RXBUFSIZE" (]) "]" (;) ";" (declaration) "volatile uint16_t comRbytes = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint16_t" (init_declarator) "comRbytes = 0" (identifier) "comRbytes" (=) "=" (number_literal) "0" (;) ";" (declaration) "volatile uint16_t comRhead = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint16_t" (init_declarator) "comRhead = 0" (identifier) "comRhead" (=) "=" (number_literal) "0" (;) ";" (declaration) "volatile uint16_t comRtail = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint16_t" (init_declarator) "comRtail = 0" (identifier) "comRtail" (=) "=" (number_literal) "0" (;) ";" (declaration) "volatile uint8_t comTbuf[TXBUFSIZE];" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint8_t" (array_declarator) "comTbuf[TXBUFSIZE]" (identifier) "comTbuf" ([) "[" (identifier) "TXBUFSIZE" (]) "]" (;) ";" (declaration) "volatile uint16_t comTbytes = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint16_t" (init_declarator) "comTbytes = 0" (identifier) "comTbytes" (=) "=" (number_literal) "0" (;) ";" (declaration) "volatile uint16_t comThead = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint16_t" (init_declarator) "comThead = 0" (identifier) "comThead" (=) "=" (number_literal) "0" (;) ";" (declaration) "volatile uint16_t comTtail = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "uint16_t" (init_declarator) "comTtail = 0" (identifier) "comTtail" (=) "=" (number_literal) "0" (;) ";" (declaration) "uint8_t gRxBuf[64] = {0};" (primitive_type) "uint8_t" (init_declarator) "gRxBuf[64] = {0}" (array_declarator) "gRxBuf[64]" (identifier) "gRxBuf" ([) "[" (number_literal) "64" (]) "]" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (declaration) "uint8_t *gpu8RxBuf = 0;" (primitive_type) "uint8_t" (init_declarator) "*gpu8RxBuf = 0" (pointer_declarator) "*gpu8RxBuf" (*) "*" (identifier) "gpu8RxBuf" (=) "=" (number_literal) "0" (;) ";" (declaration) "uint32_t gu32RxSize = 0;" (primitive_type) "uint32_t" (init_declarator) "gu32RxSize = 0" (identifier) "gu32RxSize" (=) "=" (number_literal) "0" (;) ";" (declaration) "uint32_t gu32TxSize = 0;" (primitive_type) "uint32_t" (init_declarator) "gu32TxSize = 0" (identifier) "gu32TxSize" (=) "=" (number_literal) "0" (;) ";" (declaration) "volatile int8_t gi8BulkOutReady = 0;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "int8_t" (init_declarator) "gi8BulkOutReady = 0" (identifier) "gi8BulkOutReady" (=) "=" (number_literal) "0" (;) ";" (function_definition) "void SYS_Init(void)\n{\n /* Unlock protected registers */\n SYS_UnlockReg();\n\n /* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */\n PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk);\n\n /* Enable External XTAL (4~24 MHz) */\n CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);\n\n /* Waiting for 12MHz clock ready */\n CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);\n\n /* Switch HCLK clock source to HXT */\n CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1));\n\n /* Set core clock as PLL_CLOCK from PLL */\n CLK_SetCoreClock(FREQ_192MHZ);\n\n /* Set both PCLK0 and PCLK1 as HCLK/2 */\n CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2;\n\n /* M480LD support crystal-less */\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }\n\n /* Select USBD */\n SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk;\n\n /* Enable IP clock */\n CLK_EnableModuleClock(USBD_MODULE);\n\n /* Select IP clock source */\n CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1));\n\n /* Enable IP clock */\n CLK_EnableModuleClock(UART0_MODULE);\n /* Set PA.12 ~ PA.14 to input mode */\n PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk);\n SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk);\n SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID);\n\n /* Set GPB multi-function pins for UART0 RXD and TXD */\n SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);\n SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);\n\n}" (primitive_type) "void" (function_declarator) "SYS_Init(void)" (identifier) "SYS_Init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n /* Unlock protected registers */\n SYS_UnlockReg();\n\n /* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */\n PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk);\n\n /* Enable External XTAL (4~24 MHz) */\n CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);\n\n /* Waiting for 12MHz clock ready */\n CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);\n\n /* Switch HCLK clock source to HXT */\n CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1));\n\n /* Set core clock as PLL_CLOCK from PLL */\n CLK_SetCoreClock(FREQ_192MHZ);\n\n /* Set both PCLK0 and PCLK1 as HCLK/2 */\n CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2;\n\n /* M480LD support crystal-less */\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }\n\n /* Select USBD */\n SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk;\n\n /* Enable IP clock */\n CLK_EnableModuleClock(USBD_MODULE);\n\n /* Select IP clock source */\n CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1));\n\n /* Enable IP clock */\n CLK_EnableModuleClock(UART0_MODULE);\n /* Set PA.12 ~ PA.14 to input mode */\n PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk);\n SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk);\n SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID);\n\n /* Set GPB multi-function pins for UART0 RXD and TXD */\n SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);\n SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);\n\n}" ({) "{" (comment) "/* Unlock protected registers */" (expression_statement) "SYS_UnlockReg();" (call_expression) "SYS_UnlockReg()" (identifier) "SYS_UnlockReg" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */" (expression_statement) "PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk);" (assignment_expression) "PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk)" (field_expression) "PF->MODE" (identifier) "PF" (->) "->" (field_identifier) "MODE" (&=) "&=" (unary_expression) "~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk)" (~) "~" (parenthesized_expression) "(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk)" (() "(" (binary_expression) "GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk" (identifier) "GPIO_MODE_MODE2_Msk" (|) "|" (identifier) "GPIO_MODE_MODE3_Msk" ()) ")" (;) ";" (comment) "/* Enable External XTAL (4~24 MHz) */" (expression_statement) "CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);" (call_expression) "CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk)" (identifier) "CLK_EnableXtalRC" (argument_list) "(CLK_PWRCTL_HXTEN_Msk)" (() "(" (identifier) "CLK_PWRCTL_HXTEN_Msk" ()) ")" (;) ";" (comment) "/* Waiting for 12MHz clock ready */" (expression_statement) "CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);" (call_expression) "CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk)" (identifier) "CLK_WaitClockReady" (argument_list) "(CLK_STATUS_HXTSTB_Msk)" (() "(" (identifier) "CLK_STATUS_HXTSTB_Msk" ()) ")" (;) ";" (comment) "/* Switch HCLK clock source to HXT */" (expression_statement) "CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1));" (call_expression) "CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1))" (identifier) "CLK_SetHCLK" (argument_list) "(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1))" (() "(" (identifier) "CLK_CLKSEL0_HCLKSEL_HXT" (,) "," (call_expression) "CLK_CLKDIV0_HCLK(1)" (identifier) "CLK_CLKDIV0_HCLK" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" ()) ")" (;) ";" (comment) "/* Set core clock as PLL_CLOCK from PLL */" (expression_statement) "CLK_SetCoreClock(FREQ_192MHZ);" (call_expression) "CLK_SetCoreClock(FREQ_192MHZ)" (identifier) "CLK_SetCoreClock" (argument_list) "(FREQ_192MHZ)" (() "(" (identifier) "FREQ_192MHZ" ()) ")" (;) ";" (comment) "/* Set both PCLK0 and PCLK1 as HCLK/2 */" (expression_statement) "CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2;" (assignment_expression) "CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2" (field_expression) "CLK->PCLKDIV" (identifier) "CLK" (->) "->" (field_identifier) "PCLKDIV" (=) "=" (binary_expression) "CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2" (identifier) "CLK_PCLKDIV_APB0DIV_DIV2" (|) "|" (identifier) "CLK_PCLKDIV_APB1DIV_DIV2" (;) ";" (comment) "/* M480LD support crystal-less */" (if_statement) "if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }" (if) "if" (parenthesized_expression) "(((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))" (() "(" (binary_expression) "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)" (parenthesized_expression) "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1)" (() "(" (binary_expression) "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1" (parenthesized_expression) "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk)" (() "(" (binary_expression) "SYS->CSERVER & SYS_CSERVER_VERSION_Msk" (field_expression) "SYS->CSERVER" (identifier) "SYS" (->) "->" (field_identifier) "CSERVER" (&) "&" (identifier) "SYS_CSERVER_VERSION_Msk" ()) ")" (==) "==" (number_literal) "0x1" ()) ")" (&&) "&&" (parenthesized_expression) "(CRYSTAL_LESS)" (() "(" (identifier) "CRYSTAL_LESS" ()) ")" ()) ")" (compound_statement) "{\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }" ({) "{" (expression_statement) "CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;" (assignment_expression) "CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk" (field_expression) "CLK->PWRCTL" (identifier) "CLK" (->) "->" (field_identifier) "PWRCTL" (|=) "|=" (identifier) "CLK_PWRCTL_HIRC48MEN_Msk" (;) ";" (comment) "/* Select IP clock source */" (expression_statement) "CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;" (assignment_expression) "CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk" (field_expression) "CLK->CLKSEL0" (identifier) "CLK" (->) "->" (field_identifier) "CLKSEL0" (&=) "&=" (unary_expression) "~CLK_CLKSEL0_USBSEL_Msk" (~) "~" (identifier) "CLK_CLKSEL0_USBSEL_Msk" (;) ";" (}) "}" (else_clause) "else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }" (else) "else" (compound_statement) "{\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }" ({) "{" (comment) "/* Select IP clock source */" (expression_statement) "CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;" (assignment_expression) "CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk" (field_expression) "CLK->CLKSEL0" (identifier) "CLK" (->) "->" (field_identifier) "CLKSEL0" (|=) "|=" (identifier) "CLK_CLKSEL0_USBSEL_Msk" (;) ";" (expression_statement) "CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);" (assignment_expression) "CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4)" (field_expression) "CLK->CLKDIV0" (identifier) "CLK" (->) "->" (field_identifier) "CLKDIV0" (=) "=" (binary_expression) "(CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4)" (parenthesized_expression) "(CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk)" (() "(" (binary_expression) "CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk" (field_expression) "CLK->CLKDIV0" (identifier) "CLK" (->) "->" (field_identifier) "CLKDIV0" (&) "&" (unary_expression) "~CLK_CLKDIV0_USBDIV_Msk" (~) "~" (identifier) "CLK_CLKDIV0_USBDIV_Msk" ()) ")" (|) "|" (call_expression) "CLK_CLKDIV0_USB(4)" (identifier) "CLK_CLKDIV0_USB" (argument_list) "(4)" (() "(" (number_literal) "4" ()) ")" (;) ";" (}) "}" (comment) "/* Select USBD */" (expression_statement) "SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk;" (assignment_expression) "SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk" (field_expression) "SYS->USBPHY" (identifier) "SYS" (->) "->" (field_identifier) "USBPHY" (=) "=" (binary_expression) "(SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk" (binary_expression) "(SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk" (parenthesized_expression) "(SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk)" (() "(" (binary_expression) "SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk" (field_expression) "SYS->USBPHY" (identifier) "SYS" (->) "->" (field_identifier) "USBPHY" (&) "&" (unary_expression) "~SYS_USBPHY_USBROLE_Msk" (~) "~" (identifier) "SYS_USBPHY_USBROLE_Msk" ()) ")" (|) "|" (identifier) "SYS_USBPHY_USBEN_Msk" (|) "|" (identifier) "SYS_USBPHY_SBO_Msk" (;) ";" (comment) "/* Enable IP clock */" (expression_statement) "CLK_EnableModuleClock(USBD_MODULE);" (call_expression) "CLK_EnableModuleClock(USBD_MODULE)" (identifier) "CLK_EnableModuleClock" (argument_list) "(USBD_MODULE)" (() "(" (identifier) "USBD_MODULE" ()) ")" (;) ";" (comment) "/* Select IP clock source */" (expression_statement) "CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1));" (call_expression) "CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1))" (identifier) "CLK_SetModuleClock" (argument_list) "(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1))" (() "(" (identifier) "UART0_MODULE" (,) "," (identifier) "CLK_CLKSEL1_UART0SEL_HIRC" (,) "," (call_expression) "CLK_CLKDIV0_UART0(1)" (identifier) "CLK_CLKDIV0_UART0" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" ()) ")" (;) ";" (comment) "/* Enable IP clock */" (expression_statement) "CLK_EnableModuleClock(UART0_MODULE);" (call_expression) "CLK_EnableModuleClock(UART0_MODULE)" (identifier) "CLK_EnableModuleClock" (argument_list) "(UART0_MODULE)" (() "(" (identifier) "UART0_MODULE" ()) ")" (;) ";" (comment) "/* Set PA.12 ~ PA.14 to input mode */" (expression_statement) "PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk);" (assignment_expression) "PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk)" (field_expression) "PA->MODE" (identifier) "PA" (->) "->" (field_identifier) "MODE" (&=) "&=" (unary_expression) "~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk)" (~) "~" (parenthesized_expression) "(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk)" (() "(" (binary_expression) "GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk" (binary_expression) "GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk" (identifier) "GPIO_MODE_MODE12_Msk" (|) "|" (identifier) "GPIO_MODE_MODE13_Msk" (|) "|" (identifier) "GPIO_MODE_MODE14_Msk" ()) ")" (;) ";" (expression_statement) "SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk);" (assignment_expression) "SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk)" (field_expression) "SYS->GPA_MFPH" (identifier) "SYS" (->) "->" (field_identifier) "GPA_MFPH" (&=) "&=" (unary_expression) "~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk)" (~) "~" (parenthesized_expression) "(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk)" (() "(" (binary_expression) "SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk" (binary_expression) "SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk" (binary_expression) "SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk" (identifier) "SYS_GPA_MFPH_PA12MFP_Msk" (|) "|" (identifier) "SYS_GPA_MFPH_PA13MFP_Msk" (|) "|" (identifier) "SYS_GPA_MFPH_PA14MFP_Msk" (|) "|" (identifier) "SYS_GPA_MFPH_PA15MFP_Msk" ()) ")" (;) ";" (expression_statement) "SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID);" (assignment_expression) "SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID)" (field_expression) "SYS->GPA_MFPH" (identifier) "SYS" (->) "->" (field_identifier) "GPA_MFPH" (|=) "|=" (parenthesized_expression) "(SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID)" (() "(" (binary_expression) "SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID" (binary_expression) "SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P" (binary_expression) "SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N" (identifier) "SYS_GPA_MFPH_PA12MFP_USB_VBUS" (|) "|" (identifier) "SYS_GPA_MFPH_PA13MFP_USB_D_N" (|) "|" (identifier) "SYS_GPA_MFPH_PA14MFP_USB_D_P" (|) "|" (identifier) "SYS_GPA_MFPH_PA15MFP_USB_OTG_ID" ()) ")" (;) ";" (comment) "/* Set GPB multi-function pins for UART0 RXD and TXD */" (expression_statement) "SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);" (assignment_expression) "SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk)" (field_expression) "SYS->GPB_MFPH" (identifier) "SYS" (->) "->" (field_identifier) "GPB_MFPH" (&=) "&=" (unary_expression) "~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk)" (~) "~" (parenthesized_expression) "(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk)" (() "(" (binary_expression) "SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk" (identifier) "SYS_GPB_MFPH_PB12MFP_Msk" (|) "|" (identifier) "SYS_GPB_MFPH_PB13MFP_Msk" ()) ")" (;) ";" (expression_statement) "SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);" (assignment_expression) "SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD)" (field_expression) "SYS->GPB_MFPH" (identifier) "SYS" (->) "->" (field_identifier) "GPB_MFPH" (|=) "|=" (parenthesized_expression) "(SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD)" (() "(" (binary_expression) "SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD" (identifier) "SYS_GPB_MFPH_PB12MFP_UART0_RXD" (|) "|" (identifier) "SYS_GPB_MFPH_PB13MFP_UART0_TXD" ()) ")" (;) ";" (}) "}" (function_definition) "void UART0_Init(void)\n{\n /* Configure UART0 and set UART0 Baudrate */\n UART_Open(UART0, 115200);\n\n /* Enable Interrupt and install the call back function */\n UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk));\n}" (primitive_type) "void" (function_declarator) "UART0_Init(void)" (identifier) "UART0_Init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n /* Configure UART0 and set UART0 Baudrate */\n UART_Open(UART0, 115200);\n\n /* Enable Interrupt and install the call back function */\n UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk));\n}" ({) "{" (comment) "/* Configure UART0 and set UART0 Baudrate */" (expression_statement) "UART_Open(UART0, 115200);" (call_expression) "UART_Open(UART0, 115200)" (identifier) "UART_Open" (argument_list) "(UART0, 115200)" (() "(" (identifier) "UART0" (,) "," (number_literal) "115200" ()) ")" (;) ";" (comment) "/* Enable Interrupt and install the call back function */" (expression_statement) "UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk));" (call_expression) "UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk))" (identifier) "UART_ENABLE_INT" (argument_list) "(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk))" (() "(" (identifier) "UART0" (,) "," (parenthesized_expression) "(UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk)" (() "(" (binary_expression) "UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk" (binary_expression) "UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk" (identifier) "UART_INTEN_RDAIEN_Msk" (|) "|" (identifier) "UART_INTEN_THREIEN_Msk" (|) "|" (identifier) "UART_INTEN_RXTOIEN_Msk" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "void UART0_IRQHandler(void)\n{\n uint8_t bInChar;\n int32_t size;\n uint32_t u32IntStatus;\n\n u32IntStatus = UART0->INTSTS;\n\n if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }\n\n if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }\n}" (primitive_type) "void" (function_declarator) "UART0_IRQHandler(void)" (identifier) "UART0_IRQHandler" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n uint8_t bInChar;\n int32_t size;\n uint32_t u32IntStatus;\n\n u32IntStatus = UART0->INTSTS;\n\n if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }\n\n if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }\n}" ({) "{" (declaration) "uint8_t bInChar;" (primitive_type) "uint8_t" (identifier) "bInChar" (;) ";" (declaration) "int32_t size;" (primitive_type) "int32_t" (identifier) "size" (;) ";" (declaration) "uint32_t u32IntStatus;" (primitive_type) "uint32_t" (identifier) "u32IntStatus" (;) ";" (expression_statement) "u32IntStatus = UART0->INTSTS;" (assignment_expression) "u32IntStatus = UART0->INTSTS" (identifier) "u32IntStatus" (=) "=" (field_expression) "UART0->INTSTS" (identifier) "UART0" (->) "->" (field_identifier) "INTSTS" (;) ";" (if_statement) "if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }" (if) "if" (parenthesized_expression) "((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))" (() "(" (binary_expression) "(u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk)" (parenthesized_expression) "(u32IntStatus & UART_INTSTS_RDAIF_Msk)" (() "(" (binary_expression) "u32IntStatus & UART_INTSTS_RDAIF_Msk" (identifier) "u32IntStatus" (&) "&" (identifier) "UART_INTSTS_RDAIF_Msk" ()) ")" (||) "||" (parenthesized_expression) "(u32IntStatus & UART_INTSTS_RXTOIF_Msk)" (() "(" (binary_expression) "u32IntStatus & UART_INTSTS_RXTOIF_Msk" (identifier) "u32IntStatus" (&) "&" (identifier) "UART_INTSTS_RXTOIF_Msk" ()) ")" ()) ")" (compound_statement) "{\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }" ({) "{" (comment) "/* Receiver FIFO threshold level is reached or Rx time out */" (comment) "/* Get all the input characters */" (while_statement) "while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }" (while) "while" (parenthesized_expression) "(!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))" (() "(" (unary_expression) "!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk)" (!) "!" (parenthesized_expression) "(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk)" (() "(" (binary_expression) "UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk" (field_expression) "UART0->FIFOSTS" (identifier) "UART0" (->) "->" (field_identifier) "FIFOSTS" (&) "&" (identifier) "UART_FIFOSTS_RXEMPTY_Msk" ()) ")" ()) ")" (compound_statement) "{\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }" ({) "{" (comment) "/* Get the character from UART Buffer */" (expression_statement) "bInChar = UART0->DAT;" (assignment_expression) "bInChar = UART0->DAT" (identifier) "bInChar" (=) "=" (field_expression) "UART0->DAT" (identifier) "UART0" (->) "->" (field_identifier) "DAT" (;) ";" (comment) "/* Check if buffer full */" (if_statement) "if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }" (if) "if" (parenthesized_expression) "(comRbytes < RXBUFSIZE)" (() "(" (binary_expression) "comRbytes < RXBUFSIZE" (identifier) "comRbytes" (<) "<" (identifier) "RXBUFSIZE" ()) ")" (compound_statement) "{\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }" ({) "{" (comment) "/* Enqueue the character */" (expression_statement) "comRbuf[comRtail++] = bInChar;" (assignment_expression) "comRbuf[comRtail++] = bInChar" (subscript_expression) "comRbuf[comRtail++]" (identifier) "comRbuf" ([) "[" (update_expression) "comRtail++" (identifier) "comRtail" (++) "++" (]) "]" (=) "=" (identifier) "bInChar" (;) ";" (if_statement) "if(comRtail >= RXBUFSIZE)\n comRtail = 0;" (if) "if" (parenthesized_expression) "(comRtail >= RXBUFSIZE)" (() "(" (binary_expression) "comRtail >= RXBUFSIZE" (identifier) "comRtail" (>=) ">=" (identifier) "RXBUFSIZE" ()) ")" (expression_statement) "comRtail = 0;" (assignment_expression) "comRtail = 0" (identifier) "comRtail" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "comRbytes++;" (update_expression) "comRbytes++" (identifier) "comRbytes" (++) "++" (;) ";" (}) "}" (else_clause) "else\n {\n /* FIFO over run */\n }" (else) "else" (compound_statement) "{\n /* FIFO over run */\n }" ({) "{" (comment) "/* FIFO over run */" (}) "}" (}) "}" (}) "}" (if_statement) "if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }" (if) "if" (parenthesized_expression) "(u32IntStatus & UART_INTSTS_THREIF_Msk)" (() "(" (binary_expression) "u32IntStatus & UART_INTSTS_THREIF_Msk" (identifier) "u32IntStatus" (&) "&" (identifier) "UART_INTSTS_THREIF_Msk" ()) ")" (compound_statement) "{\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }" ({) "{" (if_statement) "if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }" (if) "if" (parenthesized_expression) "(comTbytes)" (() "(" (identifier) "comTbytes" ()) ")" (compound_statement) "{\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }" ({) "{" (comment) "/* Fill the Tx FIFO */" (expression_statement) "size = comTbytes;" (assignment_expression) "size = comTbytes" (identifier) "size" (=) "=" (identifier) "comTbytes" (;) ";" (if_statement) "if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }" (if) "if" (parenthesized_expression) "(size >= TX_FIFO_SIZE)" (() "(" (binary_expression) "size >= TX_FIFO_SIZE" (identifier) "size" (>=) ">=" (identifier) "TX_FIFO_SIZE" ()) ")" (compound_statement) "{\n size = TX_FIFO_SIZE;\n }" ({) "{" (expression_statement) "size = TX_FIFO_SIZE;" (assignment_expression) "size = TX_FIFO_SIZE" (identifier) "size" (=) "=" (identifier) "TX_FIFO_SIZE" (;) ";" (}) "}" (while_statement) "while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }" (while) "while" (parenthesized_expression) "(size)" (() "(" (identifier) "size" ()) ")" (compound_statement) "{\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }" ({) "{" (expression_statement) "bInChar = comTbuf[comThead++];" (assignment_expression) "bInChar = comTbuf[comThead++]" (identifier) "bInChar" (=) "=" (subscript_expression) "comTbuf[comThead++]" (identifier) "comTbuf" ([) "[" (update_expression) "comThead++" (identifier) "comThead" (++) "++" (]) "]" (;) ";" (expression_statement) "UART0->DAT = bInChar;" (assignment_expression) "UART0->DAT = bInChar" (field_expression) "UART0->DAT" (identifier) "UART0" (->) "->" (field_identifier) "DAT" (=) "=" (identifier) "bInChar" (;) ";" (if_statement) "if(comThead >= TXBUFSIZE)\n comThead = 0;" (if) "if" (parenthesized_expression) "(comThead >= TXBUFSIZE)" (() "(" (binary_expression) "comThead >= TXBUFSIZE" (identifier) "comThead" (>=) ">=" (identifier) "TXBUFSIZE" ()) ")" (expression_statement) "comThead = 0;" (assignment_expression) "comThead = 0" (identifier) "comThead" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "comTbytes--;" (update_expression) "comTbytes--" (identifier) "comTbytes" (--) "--" (;) ";" (expression_statement) "size--;" (update_expression) "size--" (identifier) "size" (--) "--" (;) ";" (}) "}" (}) "}" (else_clause) "else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }" (else) "else" (compound_statement) "{\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }" ({) "{" (comment) "/* No more data, just stop Tx (Stop work) */" (expression_statement) "UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;" (assignment_expression) "UART0->INTEN &= ~UART_INTEN_THREIEN_Msk" (field_expression) "UART0->INTEN" (identifier) "UART0" (->) "->" (field_identifier) "INTEN" (&=) "&=" (unary_expression) "~UART_INTEN_THREIEN_Msk" (~) "~" (identifier) "UART_INTEN_THREIEN_Msk" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "void VCOM_TransferData(void)\n{\n int32_t i, i32Len;\n\n /* Check whether USB is ready for next packet or not*/\n if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }\n\n /* Process the Bulk out data when bulk out data is ready. */\n if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }\n\n /* Process the software Tx FIFO */\n if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }\n}" (primitive_type) "void" (function_declarator) "VCOM_TransferData(void)" (identifier) "VCOM_TransferData" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n int32_t i, i32Len;\n\n /* Check whether USB is ready for next packet or not*/\n if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }\n\n /* Process the Bulk out data when bulk out data is ready. */\n if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }\n\n /* Process the software Tx FIFO */\n if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }\n}" ({) "{" (declaration) "int32_t i, i32Len;" (primitive_type) "int32_t" (identifier) "i" (,) "," (identifier) "i32Len" (;) ";" (comment) "/* Check whether USB is ready for next packet or not*/" (if_statement) "if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }" (if) "if" (parenthesized_expression) "(gu32TxSize == 0)" (() "(" (binary_expression) "gu32TxSize == 0" (identifier) "gu32TxSize" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }" ({) "{" (comment) "/* Check whether we have new COM Rx data to send to USB or not */" (if_statement) "if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }" (if) "if" (parenthesized_expression) "(comRbytes)" (() "(" (identifier) "comRbytes" ()) ")" (compound_statement) "{\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }" ({) "{" (expression_statement) "i32Len = comRbytes;" (assignment_expression) "i32Len = comRbytes" (identifier) "i32Len" (=) "=" (identifier) "comRbytes" (;) ";" (if_statement) "if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;" (if) "if" (parenthesized_expression) "(i32Len > EP2_MAX_PKT_SIZE)" (() "(" (binary_expression) "i32Len > EP2_MAX_PKT_SIZE" (identifier) "i32Len" (>) ">" (identifier) "EP2_MAX_PKT_SIZE" ()) ")" (expression_statement) "i32Len = EP2_MAX_PKT_SIZE;" (assignment_expression) "i32Len = EP2_MAX_PKT_SIZE" (identifier) "i32Len" (=) "=" (identifier) "EP2_MAX_PKT_SIZE" (;) ";" (for_statement) "for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < i32Len" (identifier) "i" (<) "<" (identifier) "i32Len" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }" ({) "{" (expression_statement) "gRxBuf[i] = comRbuf[comRhead++];" (assignment_expression) "gRxBuf[i] = comRbuf[comRhead++]" (subscript_expression) "gRxBuf[i]" (identifier) "gRxBuf" ([) "[" (identifier) "i" (]) "]" (=) "=" (subscript_expression) "comRbuf[comRhead++]" (identifier) "comRbuf" ([) "[" (update_expression) "comRhead++" (identifier) "comRhead" (++) "++" (]) "]" (;) ";" (if_statement) "if(comRhead >= RXBUFSIZE)\n comRhead = 0;" (if) "if" (parenthesized_expression) "(comRhead >= RXBUFSIZE)" (() "(" (binary_expression) "comRhead >= RXBUFSIZE" (identifier) "comRhead" (>=) ">=" (identifier) "RXBUFSIZE" ()) ")" (expression_statement) "comRhead = 0;" (assignment_expression) "comRhead = 0" (identifier) "comRhead" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) "__set_PRIMASK(1);" (call_expression) "__set_PRIMASK(1)" (identifier) "__set_PRIMASK" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "comRbytes -= i32Len;" (assignment_expression) "comRbytes -= i32Len" (identifier) "comRbytes" (-=) "-=" (identifier) "i32Len" (;) ";" (expression_statement) "__set_PRIMASK(0);" (call_expression) "__set_PRIMASK(0)" (identifier) "__set_PRIMASK" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (expression_statement) "gu32TxSize = i32Len;" (assignment_expression) "gu32TxSize = i32Len" (identifier) "gu32TxSize" (=) "=" (identifier) "i32Len" (;) ";" (expression_statement) "USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);" (call_expression) "USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len)" (identifier) "USBD_MemCopy" (argument_list) "((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len)" (() "(" (cast_expression) "(uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2))" (() "(" (type_descriptor) "uint8_t *" (primitive_type) "uint8_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2))" (() "(" (binary_expression) "USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)" (identifier) "USBD_BUF_BASE" (+) "+" (call_expression) "USBD_GET_EP_BUF_ADDR(EP2)" (identifier) "USBD_GET_EP_BUF_ADDR" (argument_list) "(EP2)" (() "(" (identifier) "EP2" ()) ")" ()) ")" (,) "," (cast_expression) "(uint8_t *)gRxBuf" (() "(" (type_descriptor) "uint8_t *" (primitive_type) "uint8_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "gRxBuf" (,) "," (identifier) "i32Len" ()) ")" (;) ";" (expression_statement) "USBD_SET_PAYLOAD_LEN(EP2, i32Len);" (call_expression) "USBD_SET_PAYLOAD_LEN(EP2, i32Len)" (identifier) "USBD_SET_PAYLOAD_LEN" (argument_list) "(EP2, i32Len)" (() "(" (identifier) "EP2" (,) "," (identifier) "i32Len" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }" (else) "else" (compound_statement) "{\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }" ({) "{" (comment) "/* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */" (expression_statement) "i32Len = USBD_GET_PAYLOAD_LEN(EP2);" (assignment_expression) "i32Len = USBD_GET_PAYLOAD_LEN(EP2)" (identifier) "i32Len" (=) "=" (call_expression) "USBD_GET_PAYLOAD_LEN(EP2)" (identifier) "USBD_GET_PAYLOAD_LEN" (argument_list) "(EP2)" (() "(" (identifier) "EP2" ()) ")" (;) ";" (if_statement) "if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);" (if) "if" (parenthesized_expression) "(i32Len == EP2_MAX_PKT_SIZE)" (() "(" (binary_expression) "i32Len == EP2_MAX_PKT_SIZE" (identifier) "i32Len" (==) "==" (identifier) "EP2_MAX_PKT_SIZE" ()) ")" (expression_statement) "USBD_SET_PAYLOAD_LEN(EP2, 0);" (call_expression) "USBD_SET_PAYLOAD_LEN(EP2, 0)" (identifier) "USBD_SET_PAYLOAD_LEN" (argument_list) "(EP2, 0)" (() "(" (identifier) "EP2" (,) "," (number_literal) "0" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "/* Process the Bulk out data when bulk out data is ready. */" (if_statement) "if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }" (if) "if" (parenthesized_expression) "(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))" (() "(" (binary_expression) "gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes)" (identifier) "gi8BulkOutReady" (&&) "&&" (parenthesized_expression) "(gu32RxSize <= TXBUFSIZE - comTbytes)" (() "(" (binary_expression) "gu32RxSize <= TXBUFSIZE - comTbytes" (identifier) "gu32RxSize" (<=) "<=" (binary_expression) "TXBUFSIZE - comTbytes" (identifier) "TXBUFSIZE" (-) "-" (identifier) "comTbytes" ()) ")" ()) ")" (compound_statement) "{\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }" ({) "{" (for_statement) "for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < gu32RxSize" (identifier) "i" (<) "<" (identifier) "gu32RxSize" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }" ({) "{" (expression_statement) "comTbuf[comTtail++] = gpu8RxBuf[i];" (assignment_expression) "comTbuf[comTtail++] = gpu8RxBuf[i]" (subscript_expression) "comTbuf[comTtail++]" (identifier) "comTbuf" ([) "[" (update_expression) "comTtail++" (identifier) "comTtail" (++) "++" (]) "]" (=) "=" (subscript_expression) "gpu8RxBuf[i]" (identifier) "gpu8RxBuf" ([) "[" (identifier) "i" (]) "]" (;) ";" (if_statement) "if(comTtail >= TXBUFSIZE)\n comTtail = 0;" (if) "if" (parenthesized_expression) "(comTtail >= TXBUFSIZE)" (() "(" (binary_expression) "comTtail >= TXBUFSIZE" (identifier) "comTtail" (>=) ">=" (identifier) "TXBUFSIZE" ()) ")" (expression_statement) "comTtail = 0;" (assignment_expression) "comTtail = 0" (identifier) "comTtail" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) "__set_PRIMASK(1);" (call_expression) "__set_PRIMASK(1)" (identifier) "__set_PRIMASK" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "comTbytes += gu32RxSize;" (assignment_expression) "comTbytes += gu32RxSize" (identifier) "comTbytes" (+=) "+=" (identifier) "gu32RxSize" (;) ";" (expression_statement) "__set_PRIMASK(0);" (call_expression) "__set_PRIMASK(0)" (identifier) "__set_PRIMASK" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (expression_statement) "gu32RxSize = 0;" (assignment_expression) "gu32RxSize = 0" (identifier) "gu32RxSize" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "gi8BulkOutReady = 0;" (assignment_expression) "gi8BulkOutReady = 0" (identifier) "gi8BulkOutReady" (=) "=" (number_literal) "0" (;) ";" (comment) "/* Clear bulk out ready flag */" (comment) "/* Ready to get next BULK out */" (expression_statement) "USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);" (call_expression) "USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE)" (identifier) "USBD_SET_PAYLOAD_LEN" (argument_list) "(EP3, EP3_MAX_PKT_SIZE)" (() "(" (identifier) "EP3" (,) "," (identifier) "EP3_MAX_PKT_SIZE" ()) ")" (;) ";" (}) "}" (comment) "/* Process the software Tx FIFO */" (if_statement) "if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }" (if) "if" (parenthesized_expression) "(comTbytes)" (() "(" (identifier) "comTbytes" ()) ")" (compound_statement) "{\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }" ({) "{" (comment) "/* Check if Tx is working */" (if_statement) "if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }" (if) "if" (parenthesized_expression) "((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)" (() "(" (binary_expression) "(UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0" (parenthesized_expression) "(UART0->INTEN & UART_INTEN_THREIEN_Msk)" (() "(" (binary_expression) "UART0->INTEN & UART_INTEN_THREIEN_Msk" (field_expression) "UART0->INTEN" (identifier) "UART0" (->) "->" (field_identifier) "INTEN" (&) "&" (identifier) "UART_INTEN_THREIEN_Msk" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }" ({) "{" (comment) "/* Send one bytes out */" (expression_statement) "UART0->DAT = comTbuf[comThead++];" (assignment_expression) "UART0->DAT = comTbuf[comThead++]" (field_expression) "UART0->DAT" (identifier) "UART0" (->) "->" (field_identifier) "DAT" (=) "=" (subscript_expression) "comTbuf[comThead++]" (identifier) "comTbuf" ([) "[" (update_expression) "comThead++" (identifier) "comThead" (++) "++" (]) "]" (;) ";" (if_statement) "if(comThead >= TXBUFSIZE)\n comThead = 0;" (if) "if" (parenthesized_expression) "(comThead >= TXBUFSIZE)" (() "(" (binary_expression) "comThead >= TXBUFSIZE" (identifier) "comThead" (>=) ">=" (identifier) "TXBUFSIZE" ()) ")" (expression_statement) "comThead = 0;" (assignment_expression) "comThead = 0" (identifier) "comThead" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "__set_PRIMASK(1);" (call_expression) "__set_PRIMASK(1)" (identifier) "__set_PRIMASK" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "comTbytes--;" (update_expression) "comTbytes--" (identifier) "comTbytes" (--) "--" (;) ";" (expression_statement) "__set_PRIMASK(0);" (call_expression) "__set_PRIMASK(0)" (identifier) "__set_PRIMASK" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (comment) "/* Enable Tx Empty Interrupt. (Trigger first one) */" (expression_statement) "UART0->INTEN |= UART_INTEN_THREIEN_Msk;" (assignment_expression) "UART0->INTEN |= UART_INTEN_THREIEN_Msk" (field_expression) "UART0->INTEN" (identifier) "UART0" (->) "->" (field_identifier) "INTEN" (|=) "|=" (identifier) "UART_INTEN_THREIEN_Msk" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "int32_t main (void)\n{\n uint32_t u32TrimInit;\n uint32_t au32Config[2];\n\n SYS_Init();\n UART0_Init();\n\n SYS_UnlockReg();\n\n /* Enable FMC ISP function */\n FMC_Open();\n\n /* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */\n if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;\n\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }\n\n USBD_Open(&gsInfo, VCOM_ClassRequest, NULL);\n USBD_SetConfigCallback(MSC_SetConfig);\n /* Endpoint configuration */\n VCOM_Init();\n USBD_Start();\n\n SYS_UnlockReg();\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }\n NVIC_EnableIRQ(UART0_IRQn);\n NVIC_EnableIRQ(USBD_IRQn);\n\n while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }\n}" (primitive_type) "int32_t" (function_declarator) "main (void)" (identifier) "main" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n uint32_t u32TrimInit;\n uint32_t au32Config[2];\n\n SYS_Init();\n UART0_Init();\n\n SYS_UnlockReg();\n\n /* Enable FMC ISP function */\n FMC_Open();\n\n /* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */\n if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;\n\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }\n\n USBD_Open(&gsInfo, VCOM_ClassRequest, NULL);\n USBD_SetConfigCallback(MSC_SetConfig);\n /* Endpoint configuration */\n VCOM_Init();\n USBD_Start();\n\n SYS_UnlockReg();\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }\n NVIC_EnableIRQ(UART0_IRQn);\n NVIC_EnableIRQ(USBD_IRQn);\n\n while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }\n}" ({) "{" (declaration) "uint32_t u32TrimInit;" (primitive_type) "uint32_t" (identifier) "u32TrimInit" (;) ";" (declaration) "uint32_t au32Config[2];" (primitive_type) "uint32_t" (array_declarator) "au32Config[2]" (identifier) "au32Config" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) "SYS_Init();" (call_expression) "SYS_Init()" (identifier) "SYS_Init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "UART0_Init();" (call_expression) "UART0_Init()" (identifier) "UART0_Init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "SYS_UnlockReg();" (call_expression) "SYS_UnlockReg()" (identifier) "SYS_UnlockReg" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* Enable FMC ISP function */" (expression_statement) "FMC_Open();" (call_expression) "FMC_Open()" (identifier) "FMC_Open" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */" (if_statement) "if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;" (if) "if" (parenthesized_expression) "(FMC_ReadConfig(au32Config, 2) < 0)" (() "(" (binary_expression) "FMC_ReadConfig(au32Config, 2) < 0" (call_expression) "FMC_ReadConfig(au32Config, 2)" (identifier) "FMC_ReadConfig" (argument_list) "(au32Config, 2)" (() "(" (identifier) "au32Config" (,) "," (number_literal) "2" ()) ")" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (if_statement) "if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }" (if) "if" (parenthesized_expression) "(((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )" (() "(" (binary_expression) "((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE)" (parenthesized_expression) "((au32Config[0] & 0x01) == 1)" (() "(" (binary_expression) "(au32Config[0] & 0x01) == 1" (parenthesized_expression) "(au32Config[0] & 0x01)" (() "(" (binary_expression) "au32Config[0] & 0x01" (subscript_expression) "au32Config[0]" (identifier) "au32Config" ([) "[" (number_literal) "0" (]) "]" (&) "&" (number_literal) "0x01" ()) ")" (==) "==" (number_literal) "1" ()) ")" (||) "||" (parenthesized_expression) "(au32Config[1] != DATA_FLASH_BASE)" (() "(" (binary_expression) "au32Config[1] != DATA_FLASH_BASE" (subscript_expression) "au32Config[1]" (identifier) "au32Config" ([) "[" (number_literal) "1" (]) "]" (!=) "!=" (identifier) "DATA_FLASH_BASE" ()) ")" ()) ")" (compound_statement) "{\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }" ({) "{" (expression_statement) "FMC_ENABLE_CFG_UPDATE();" (call_expression) "FMC_ENABLE_CFG_UPDATE()" (identifier) "FMC_ENABLE_CFG_UPDATE" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "au32Config[0] &= ~0x1;" (assignment_expression) "au32Config[0] &= ~0x1" (subscript_expression) "au32Config[0]" (identifier) "au32Config" ([) "[" (number_literal) "0" (]) "]" (&=) "&=" (unary_expression) "~0x1" (~) "~" (number_literal) "0x1" (;) ";" (expression_statement) "au32Config[1] = DATA_FLASH_BASE;" (assignment_expression) "au32Config[1] = DATA_FLASH_BASE" (subscript_expression) "au32Config[1]" (identifier) "au32Config" ([) "[" (number_literal) "1" (]) "]" (=) "=" (identifier) "DATA_FLASH_BASE" (;) ";" (if_statement) "if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;" (if) "if" (parenthesized_expression) "(FMC_WriteConfig(au32Config, 2) < 0)" (() "(" (binary_expression) "FMC_WriteConfig(au32Config, 2) < 0" (call_expression) "FMC_WriteConfig(au32Config, 2)" (identifier) "FMC_WriteConfig" (argument_list) "(au32Config, 2)" (() "(" (identifier) "au32Config" (,) "," (number_literal) "2" ()) ")" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (expression_statement) "FMC_ReadConfig(au32Config, 2);" (call_expression) "FMC_ReadConfig(au32Config, 2)" (identifier) "FMC_ReadConfig" (argument_list) "(au32Config, 2)" (() "(" (identifier) "au32Config" (,) "," (number_literal) "2" ()) ")" (;) ";" (if_statement) "if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }" (if) "if" (parenthesized_expression) "(((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))" (() "(" (binary_expression) "((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE)" (parenthesized_expression) "((au32Config[0] & 0x01) == 1)" (() "(" (binary_expression) "(au32Config[0] & 0x01) == 1" (parenthesized_expression) "(au32Config[0] & 0x01)" (() "(" (binary_expression) "au32Config[0] & 0x01" (subscript_expression) "au32Config[0]" (identifier) "au32Config" ([) "[" (number_literal) "0" (]) "]" (&) "&" (number_literal) "0x01" ()) ")" (==) "==" (number_literal) "1" ()) ")" (||) "||" (parenthesized_expression) "(au32Config[1] != DATA_FLASH_BASE)" (() "(" (binary_expression) "au32Config[1] != DATA_FLASH_BASE" (subscript_expression) "au32Config[1]" (identifier) "au32Config" ([) "[" (number_literal) "1" (]) "]" (!=) "!=" (identifier) "DATA_FLASH_BASE" ()) ")" ()) ")" (compound_statement) "{\n printf("Error: Program Config Failed!\n");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }" ({) "{" (expression_statement) "printf("Error: Program Config Failed!\n");" (call_expression) "printf("Error: Program Config Failed!\n")" (identifier) "printf" (argument_list) "("Error: Program Config Failed!\n")" (() "(" (string_literal) ""Error: Program Config Failed!\n"" (") """ (string_content) "Error: Program Config Failed!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (comment) "/* Disable FMC ISP function */" (expression_statement) "FMC_Close();" (call_expression) "FMC_Close()" (identifier) "FMC_Close" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "SYS_LockReg();" (call_expression) "SYS_LockReg()" (identifier) "SYS_LockReg" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (comment) "/* Reset Chip to reload new CONFIG value */" (expression_statement) "SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;" (assignment_expression) "SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk" (field_expression) "SYS->IPRST0" (identifier) "SYS" (->) "->" (field_identifier) "IPRST0" (=) "=" (identifier) "SYS_IPRST0_CHIPRST_Msk" (;) ";" (}) "}" (expression_statement) "USBD_Open(&gsInfo, VCOM_ClassRequest, NULL);" (call_expression) "USBD_Open(&gsInfo, VCOM_ClassRequest, NULL)" (identifier) "USBD_Open" (argument_list) "(&gsInfo, VCOM_ClassRequest, NULL)" (() "(" (pointer_expression) "&gsInfo" (&) "&" (identifier) "gsInfo" (,) "," (identifier) "VCOM_ClassRequest" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (expression_statement) "USBD_SetConfigCallback(MSC_SetConfig);" (call_expression) "USBD_SetConfigCallback(MSC_SetConfig)" (identifier) "USBD_SetConfigCallback" (argument_list) "(MSC_SetConfig)" (() "(" (identifier) "MSC_SetConfig" ()) ")" (;) ";" (comment) "/* Endpoint configuration */" (expression_statement) "VCOM_Init();" (call_expression) "VCOM_Init()" (identifier) "VCOM_Init" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "USBD_Start();" (call_expression) "USBD_Start()" (identifier) "USBD_Start" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "SYS_UnlockReg();" (call_expression) "SYS_UnlockReg()" (identifier) "SYS_UnlockReg" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }" (if) "if" (parenthesized_expression) "(((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))" (() "(" (binary_expression) "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)" (parenthesized_expression) "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1)" (() "(" (binary_expression) "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1" (parenthesized_expression) "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk)" (() "(" (binary_expression) "SYS->CSERVER & SYS_CSERVER_VERSION_Msk" (field_expression) "SYS->CSERVER" (identifier) "SYS" (->) "->" (field_identifier) "CSERVER" (&) "&" (identifier) "SYS_CSERVER_VERSION_Msk" ()) ")" (==) "==" (number_literal) "0x1" ()) ")" (&&) "&&" (parenthesized_expression) "(CRYSTAL_LESS)" (() "(" (identifier) "CRYSTAL_LESS" ()) ")" ()) ")" (compound_statement) "{\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }" ({) "{" (comment) "/* Start USB trim */" (expression_statement) "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;" (assignment_expression) "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk" (field_expression) "USBD->INTSTS" (identifier) "USBD" (->) "->" (field_identifier) "INTSTS" (=) "=" (identifier) "USBD_INTSTS_SOFIF_Msk" (;) ";" (while_statement) "while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);" (while) "while" (parenthesized_expression) "((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0)" (() "(" (binary_expression) "(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0" (parenthesized_expression) "(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)" (() "(" (binary_expression) "USBD->INTSTS & USBD_INTSTS_SOFIF_Msk" (field_expression) "USBD->INTSTS" (identifier) "USBD" (->) "->" (field_identifier) "INTSTS" (&) "&" (identifier) "USBD_INTSTS_SOFIF_Msk" ()) ")" (==) "==" (number_literal) "0" ()) ")" (expression_statement) ";" (;) ";" (expression_statement) "SYS->HIRCTCTL = 0x1;" (assignment_expression) "SYS->HIRCTCTL = 0x1" (field_expression) "SYS->HIRCTCTL" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTCTL" (=) "=" (number_literal) "0x1" (;) ";" (expression_statement) "SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;" (assignment_expression) "SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk" (field_expression) "SYS->HIRCTCTL" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTCTL" (|=) "|=" (identifier) "SYS_HIRCTCTL_REFCKSEL_Msk" (;) ";" (comment) "/* Backup default trim */" (expression_statement) "u32TrimInit = M32(TRIM_INIT);" (assignment_expression) "u32TrimInit = M32(TRIM_INIT)" (identifier) "u32TrimInit" (=) "=" (call_expression) "M32(TRIM_INIT)" (identifier) "M32" (argument_list) "(TRIM_INIT)" (() "(" (identifier) "TRIM_INIT" ()) ")" (;) ";" (}) "}" (expression_statement) "NVIC_EnableIRQ(UART0_IRQn);" (call_expression) "NVIC_EnableIRQ(UART0_IRQn)" (identifier) "NVIC_EnableIRQ" (argument_list) "(UART0_IRQn)" (() "(" (identifier) "UART0_IRQn" ()) ")" (;) ";" (expression_statement) "NVIC_EnableIRQ(USBD_IRQn);" (call_expression) "NVIC_EnableIRQ(USBD_IRQn)" (identifier) "NVIC_EnableIRQ" (argument_list) "(USBD_IRQn)" (() "(" (identifier) "USBD_IRQn" ()) ")" (;) ";" (while_statement) "while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }" ({) "{" (if_statement) "if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }" (if) "if" (parenthesized_expression) "(((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))" (() "(" (binary_expression) "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)" (parenthesized_expression) "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1)" (() "(" (binary_expression) "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1" (parenthesized_expression) "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk)" (() "(" (binary_expression) "SYS->CSERVER & SYS_CSERVER_VERSION_Msk" (field_expression) "SYS->CSERVER" (identifier) "SYS" (->) "->" (field_identifier) "CSERVER" (&) "&" (identifier) "SYS_CSERVER_VERSION_Msk" ()) ")" (==) "==" (number_literal) "0x1" ()) ")" (&&) "&&" (parenthesized_expression) "(CRYSTAL_LESS)" (() "(" (identifier) "CRYSTAL_LESS" ()) ")" ()) ")" (compound_statement) "{\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }" ({) "{" (comment) "/* Start USB trim if it is not enabled. */" (if_statement) "if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }" (if) "if" (parenthesized_expression) "((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)" (() "(" (binary_expression) "(SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1" (parenthesized_expression) "(SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk)" (() "(" (binary_expression) "SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk" (field_expression) "SYS->HIRCTCTL" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTCTL" (&) "&" (identifier) "SYS_HIRCTCTL_FREQSEL_Msk" ()) ")" (!=) "!=" (number_literal) "1" ()) ")" (compound_statement) "{\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }" ({) "{" (if_statement) "if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }" (if) "if" (parenthesized_expression) "(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)" (() "(" (binary_expression) "USBD->INTSTS & USBD_INTSTS_SOFIF_Msk" (field_expression) "USBD->INTSTS" (identifier) "USBD" (->) "->" (field_identifier) "INTSTS" (&) "&" (identifier) "USBD_INTSTS_SOFIF_Msk" ()) ")" (compound_statement) "{\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }" ({) "{" (comment) "/* Clear SOF */" (expression_statement) "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;" (assignment_expression) "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk" (field_expression) "USBD->INTSTS" (identifier) "USBD" (->) "->" (field_identifier) "INTSTS" (=) "=" (identifier) "USBD_INTSTS_SOFIF_Msk" (;) ";" (comment) "/* Re-enable crystal-less */" (expression_statement) "SYS->HIRCTCTL = 0x1;" (assignment_expression) "SYS->HIRCTCTL = 0x1" (field_expression) "SYS->HIRCTCTL" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTCTL" (=) "=" (number_literal) "0x1" (;) ";" (expression_statement) "SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;" (assignment_expression) "SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk" (field_expression) "SYS->HIRCTCTL" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTCTL" (|=) "|=" (identifier) "SYS_HIRCTCTL_REFCKSEL_Msk" (;) ";" (}) "}" (}) "}" (comment) "/* Disable USB Trim when error */" (if_statement) "if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }" (if) "if" (parenthesized_expression) "(SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))" (() "(" (binary_expression) "SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk)" (field_expression) "SYS->HIRCTISTS" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTISTS" (&) "&" (parenthesized_expression) "(SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk)" (() "(" (binary_expression) "SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk" (identifier) "SYS_HIRCTISTS_CLKERRIF_Msk" (|) "|" (identifier) "SYS_HIRCTISTS_TFAILIF_Msk" ()) ")" ()) ")" (compound_statement) "{\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }" ({) "{" (comment) "/* Init TRIM */" (expression_statement) "M32(TRIM_INIT) = u32TrimInit;" (assignment_expression) "M32(TRIM_INIT) = u32TrimInit" (call_expression) "M32(TRIM_INIT)" (identifier) "M32" (argument_list) "(TRIM_INIT)" (() "(" (identifier) "TRIM_INIT" ()) ")" (=) "=" (identifier) "u32TrimInit" (;) ";" (comment) "/* Disable crystal-less */" (expression_statement) "SYS->HIRCTCTL = 0;" (assignment_expression) "SYS->HIRCTCTL = 0" (field_expression) "SYS->HIRCTCTL" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTCTL" (=) "=" (number_literal) "0" (;) ";" (comment) "/* Clear error flags */" (expression_statement) "SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;" (assignment_expression) "SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk" (field_expression) "SYS->HIRCTISTS" (identifier) "SYS" (->) "->" (field_identifier) "HIRCTISTS" (=) "=" (binary_expression) "SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk" (identifier) "SYS_HIRCTISTS_CLKERRIF_Msk" (|) "|" (identifier) "SYS_HIRCTISTS_TFAILIF_Msk" (;) ";" (comment) "/* Clear SOF */" (expression_statement) "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;" (assignment_expression) "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk" (field_expression) "USBD->INTSTS" (identifier) "USBD" (->) "->" (field_identifier) "INTSTS" (=) "=" (identifier) "USBD_INTSTS_SOFIF_Msk" (;) ";" (}) "}" (}) "}" (expression_statement) "VCOM_TransferData();" (call_expression) "VCOM_TransferData()" (identifier) "VCOM_TransferData" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "MSC_ProcessCmd();" (call_expression) "MSC_ProcessCmd()" (identifier) "MSC_ProcessCmd" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "/*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/"
1,882
0
{"language": "c", "success": true, "metadata": {"lines": 304, "avg_line_length": 35.53, "nodes": 1077, "errors": 0, "source_hash": "4053b6c36480fb330f40fdb545da0b69067cd3182dc436c5aaae2098c719067c", "categorized_nodes": 811}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include \"NuMicro.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"NuMicro.h\"", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"vcom_serial.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"vcom_serial.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include \"massstorage.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"massstorage.h\"", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 24}}, {"id": 12, "type": "preproc_def", "text": "#define CRYSTAL_LESS 1\n", "parent": null, "children": [13, 14, 15], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 14, "type": "identifier", "text": "CRYSTAL_LESS", "parent": 12, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 20}}, {"id": 15, "type": "preproc_arg", "text": "1", "parent": 12, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 29}}, {"id": 16, "type": "preproc_def", "text": "#define TRIM_INIT (SYS_BASE+0x10C)\n", "parent": null, "children": [17, 18, 19], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 18, "type": "identifier", "text": "TRIM_INIT", "parent": 16, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 19, "type": "preproc_arg", "text": "(SYS_BASE+0x10C)", "parent": 16, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 44}}, {"id": 20, "type": "declaration", "text": "STR_VCOM_LINE_CODING gLineCoding = {115200, 0, 0, 8};", "parent": null, "children": [21, 22], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 53}}, {"id": 21, "type": "type_identifier", "text": "STR_VCOM_LINE_CODING", "parent": 20, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 20}}, {"id": 22, "type": "init_declarator", "text": "gLineCoding = {115200, 0, 0, 8}", "parent": 20, "children": [23, 24, 25], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 52}}, {"id": 23, "type": "identifier", "text": "gLineCoding", "parent": 22, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 32}}, {"id": 24, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 34}}, {"id": 25, "type": "initializer_list", "text": "{115200, 0, 0, 8}", "parent": 22, "children": [26, 27, 28, 29], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 52}}, {"id": 26, "type": "number_literal", "text": "115200", "parent": 25, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 42}}, {"id": 27, "type": "number_literal", "text": "0", "parent": 25, "children": [], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 45}}, {"id": 28, "type": "number_literal", "text": "0", "parent": 25, "children": [], "start_point": {"row": 16, "column": 47}, "end_point": {"row": 16, "column": 48}}, {"id": 29, "type": "number_literal", "text": "8", "parent": 25, "children": [], "start_point": {"row": 16, "column": 50}, "end_point": {"row": 16, "column": 51}}, {"id": 30, "type": "declaration", "text": "uint16_t gCtrlSignal = 0;", "parent": null, "children": [31, 32], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 25}}, {"id": 31, "type": "primitive_type", "text": "uint16_t", "parent": 30, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 32, "type": "init_declarator", "text": "gCtrlSignal = 0", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 24}}, {"id": 33, "type": "identifier", "text": "gCtrlSignal", "parent": 32, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 20}}, {"id": 34, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 22}}, {"id": 35, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 24}}, {"id": 36, "type": "preproc_def", "text": "#define RXBUFSIZE 512 /* RX buffer size */\n", "parent": null, "children": [37, 38, 39], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 38, "type": "identifier", "text": "RXBUFSIZE", "parent": 36, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 17}}, {"id": 39, "type": "preproc_arg", "text": "512 ", "parent": 36, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 32}}, {"id": 40, "type": "preproc_def", "text": "#define TXBUFSIZE 512 /* RX buffer size */\n", "parent": null, "children": [41, 42, 43], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 41, "type": "#define", "text": "#define", "parent": 40, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 42, "type": "identifier", "text": "TXBUFSIZE", "parent": 40, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 17}}, {"id": 43, "type": "preproc_arg", "text": "512 ", "parent": 40, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 32}}, {"id": 44, "type": "preproc_def", "text": "#define TX_FIFO_SIZE 16 /* TX Hardware FIFO size */\n", "parent": null, "children": [45, 46, 47], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 45, "type": "#define", "text": "#define", "parent": 44, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 46, "type": "identifier", "text": "TX_FIFO_SIZE", "parent": 44, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 20}}, {"id": 47, "type": "preproc_arg", "text": "16 ", "parent": 44, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 32}}, {"id": 48, "type": "preproc_def", "text": "#define DATA_FLASH_BASE 0x40000\n", "parent": null, "children": [49, 50, 51], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 49, "type": "#define", "text": "#define", "parent": 48, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 50, "type": "identifier", "text": "DATA_FLASH_BASE", "parent": 48, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 23}}, {"id": 51, "type": "preproc_arg", "text": "0x40000", "parent": 48, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 32}}, {"id": 52, "type": "declaration", "text": "volatile uint8_t comRbuf[RXBUFSIZE];", "parent": null, "children": [53, 55, 56], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 36}}, {"id": 53, "type": "type_qualifier", "text": "volatile", "parent": 52, "children": [54], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 54, "type": "volatile", "text": "volatile", "parent": 53, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 55, "type": "primitive_type", "text": "uint8_t", "parent": 52, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 16}}, {"id": 56, "type": "array_declarator", "text": "comRbuf[RXBUFSIZE]", "parent": 52, "children": [57, 58], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 35}}, {"id": 57, "type": "identifier", "text": "comRbuf", "parent": 56, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 24}}, {"id": 58, "type": "identifier", "text": "RXBUFSIZE", "parent": 56, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 34}}, {"id": 59, "type": "declaration", "text": "volatile uint16_t comRbytes = 0;", "parent": null, "children": [60, 62, 63], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 32}}, {"id": 60, "type": "type_qualifier", "text": "volatile", "parent": 59, "children": [61], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 61, "type": "volatile", "text": "volatile", "parent": 60, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 62, "type": "primitive_type", "text": "uint16_t", "parent": 59, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 17}}, {"id": 63, "type": "init_declarator", "text": "comRbytes = 0", "parent": 59, "children": [64, 65, 66], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 31}}, {"id": 64, "type": "identifier", "text": "comRbytes", "parent": 63, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 27}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 29}}, {"id": 66, "type": "number_literal", "text": "0", "parent": 63, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 31}}, {"id": 67, "type": "declaration", "text": "volatile uint16_t comRhead = 0;", "parent": null, "children": [68, 70, 71], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 31}}, {"id": 68, "type": "type_qualifier", "text": "volatile", "parent": 67, "children": [69], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 69, "type": "volatile", "text": "volatile", "parent": 68, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 70, "type": "primitive_type", "text": "uint16_t", "parent": 67, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 17}}, {"id": 71, "type": "init_declarator", "text": "comRhead = 0", "parent": 67, "children": [72, 73, 74], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 30}}, {"id": 72, "type": "identifier", "text": "comRhead", "parent": 71, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 26}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 28}}, {"id": 74, "type": "number_literal", "text": "0", "parent": 71, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 30}}, {"id": 75, "type": "declaration", "text": "volatile uint16_t comRtail = 0;", "parent": null, "children": [76, 78, 79], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 31}}, {"id": 76, "type": "type_qualifier", "text": "volatile", "parent": 75, "children": [77], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 77, "type": "volatile", "text": "volatile", "parent": 76, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 78, "type": "primitive_type", "text": "uint16_t", "parent": 75, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 17}}, {"id": 79, "type": "init_declarator", "text": "comRtail = 0", "parent": 75, "children": [80, 81, 82], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 30}}, {"id": 80, "type": "identifier", "text": "comRtail", "parent": 79, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 26}}, {"id": 81, "type": "=", "text": "=", "parent": 79, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 28}}, {"id": 82, "type": "number_literal", "text": "0", "parent": 79, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 30}}, {"id": 83, "type": "declaration", "text": "volatile uint8_t comTbuf[TXBUFSIZE];", "parent": null, "children": [84, 86, 87], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 36}}, {"id": 84, "type": "type_qualifier", "text": "volatile", "parent": 83, "children": [85], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 85, "type": "volatile", "text": "volatile", "parent": 84, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 86, "type": "primitive_type", "text": "uint8_t", "parent": 83, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 16}}, {"id": 87, "type": "array_declarator", "text": "comTbuf[TXBUFSIZE]", "parent": 83, "children": [88, 89], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 35}}, {"id": 88, "type": "identifier", "text": "comTbuf", "parent": 87, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 24}}, {"id": 89, "type": "identifier", "text": "TXBUFSIZE", "parent": 87, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 34}}, {"id": 90, "type": "declaration", "text": "volatile uint16_t comTbytes = 0;", "parent": null, "children": [91, 93, 94], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 32}}, {"id": 91, "type": "type_qualifier", "text": "volatile", "parent": 90, "children": [92], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 92, "type": "volatile", "text": "volatile", "parent": 91, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 93, "type": "primitive_type", "text": "uint16_t", "parent": 90, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 17}}, {"id": 94, "type": "init_declarator", "text": "comTbytes = 0", "parent": 90, "children": [95, 96, 97], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 31}}, {"id": 95, "type": "identifier", "text": "comTbytes", "parent": 94, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 27}}, {"id": 96, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 29}}, {"id": 97, "type": "number_literal", "text": "0", "parent": 94, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 31}}, {"id": 98, "type": "declaration", "text": "volatile uint16_t comThead = 0;", "parent": null, "children": [99, 101, 102], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 31}}, {"id": 99, "type": "type_qualifier", "text": "volatile", "parent": 98, "children": [100], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 8}}, {"id": 100, "type": "volatile", "text": "volatile", "parent": 99, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 8}}, {"id": 101, "type": "primitive_type", "text": "uint16_t", "parent": 98, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 17}}, {"id": 102, "type": "init_declarator", "text": "comThead = 0", "parent": 98, "children": [103, 104, 105], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 30}}, {"id": 103, "type": "identifier", "text": "comThead", "parent": 102, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 26}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 28}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 102, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 30}}, {"id": 106, "type": "declaration", "text": "volatile uint16_t comTtail = 0;", "parent": null, "children": [107, 109, 110], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 31}}, {"id": 107, "type": "type_qualifier", "text": "volatile", "parent": 106, "children": [108], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 108, "type": "volatile", "text": "volatile", "parent": 107, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 109, "type": "primitive_type", "text": "uint16_t", "parent": 106, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 17}}, {"id": 110, "type": "init_declarator", "text": "comTtail = 0", "parent": 106, "children": [111, 112, 113], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 30}}, {"id": 111, "type": "identifier", "text": "comTtail", "parent": 110, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 26}}, {"id": 112, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 28}}, {"id": 113, "type": "number_literal", "text": "0", "parent": 110, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 30}}, {"id": 114, "type": "declaration", "text": "uint8_t gRxBuf[64] = {0};", "parent": null, "children": [115, 116], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 25}}, {"id": 115, "type": "primitive_type", "text": "uint8_t", "parent": 114, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 116, "type": "init_declarator", "text": "gRxBuf[64] = {0}", "parent": 114, "children": [117, 120, 121], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 24}}, {"id": 117, "type": "array_declarator", "text": "gRxBuf[64]", "parent": 116, "children": [118, 119], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 18}}, {"id": 118, "type": "identifier", "text": "gRxBuf", "parent": 117, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 14}}, {"id": 119, "type": "number_literal", "text": "64", "parent": 117, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 17}}, {"id": 120, "type": "=", "text": "=", "parent": 116, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 20}}, {"id": 121, "type": "initializer_list", "text": "{0}", "parent": 116, "children": [122], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 24}}, {"id": 122, "type": "number_literal", "text": "0", "parent": 121, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 123, "type": "declaration", "text": "uint8_t *gpu8RxBuf = 0;", "parent": null, "children": [124, 125], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 23}}, {"id": 124, "type": "primitive_type", "text": "uint8_t", "parent": 123, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 125, "type": "init_declarator", "text": "*gpu8RxBuf = 0", "parent": 123, "children": [126, 129, 130], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 22}}, {"id": 126, "type": "pointer_declarator", "text": "*gpu8RxBuf", "parent": 125, "children": [127, 128], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 18}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 9}}, {"id": 128, "type": "identifier", "text": "gpu8RxBuf", "parent": 126, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 18}}, {"id": 129, "type": "=", "text": "=", "parent": 125, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 20}}, {"id": 130, "type": "number_literal", "text": "0", "parent": 125, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 22}}, {"id": 131, "type": "declaration", "text": "uint32_t gu32RxSize = 0;", "parent": null, "children": [132, 133], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 24}}, {"id": 132, "type": "primitive_type", "text": "uint32_t", "parent": 131, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 8}}, {"id": 133, "type": "init_declarator", "text": "gu32RxSize = 0", "parent": 131, "children": [134, 135, 136], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 23}}, {"id": 134, "type": "identifier", "text": "gu32RxSize", "parent": 133, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 19}}, {"id": 135, "type": "=", "text": "=", "parent": 133, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 21}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 133, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 23}}, {"id": 137, "type": "declaration", "text": "uint32_t gu32TxSize = 0;", "parent": null, "children": [138, 139], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 24}}, {"id": 138, "type": "primitive_type", "text": "uint32_t", "parent": 137, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 8}}, {"id": 139, "type": "init_declarator", "text": "gu32TxSize = 0", "parent": 137, "children": [140, 141, 142], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 23}}, {"id": 140, "type": "identifier", "text": "gu32TxSize", "parent": 139, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 19}}, {"id": 141, "type": "=", "text": "=", "parent": 139, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 21}}, {"id": 142, "type": "number_literal", "text": "0", "parent": 139, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 23}}, {"id": 143, "type": "declaration", "text": "volatile int8_t gi8BulkOutReady = 0;", "parent": null, "children": [144, 146, 147], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 36}}, {"id": 144, "type": "type_qualifier", "text": "volatile", "parent": 143, "children": [145], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 8}}, {"id": 145, "type": "volatile", "text": "volatile", "parent": 144, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 8}}, {"id": 146, "type": "primitive_type", "text": "int8_t", "parent": 143, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 15}}, {"id": 147, "type": "init_declarator", "text": "gi8BulkOutReady = 0", "parent": 143, "children": [148, 149, 150], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 35}}, {"id": 148, "type": "identifier", "text": "gi8BulkOutReady", "parent": 147, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 31}}, {"id": 149, "type": "=", "text": "=", "parent": 147, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 33}}, {"id": 150, "type": "number_literal", "text": "0", "parent": 147, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 35}}, {"id": 151, "type": "function_definition", "text": "void SYS_Init(void)\n{\n /* Unlock protected registers */\n SYS_UnlockReg();\n\n /* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */\n PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk);\n\n /* Enable External XTAL (4~24 MHz) */\n CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);\n\n /* Waiting for 12MHz clock ready */\n CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);\n\n /* Switch HCLK clock source to HXT */\n CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1));\n\n /* Set core clock as PLL_CLOCK from PLL */\n CLK_SetCoreClock(FREQ_192MHZ);\n\n /* Set both PCLK0 and PCLK1 as HCLK/2 */\n CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2;\n\n /* M480LD support crystal-less */\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }\n\n /* Select USBD */\n SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk;\n\n /* Enable IP clock */\n CLK_EnableModuleClock(USBD_MODULE);\n\n /* Select IP clock source */\n CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1));\n\n /* Enable IP clock */\n CLK_EnableModuleClock(UART0_MODULE);\n /* Set PA.12 ~ PA.14 to input mode */\n PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk);\n SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk);\n SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID);\n\n /* Set GPB multi-function pins for UART0 RXD and TXD */\n SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);\n SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);\n\n}", "parent": null, "children": [152, 153], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 107, "column": 1}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 4}}, {"id": 153, "type": "function_declarator", "text": "SYS_Init(void)", "parent": 151, "children": [154, 155], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 19}}, {"id": 154, "type": "identifier", "text": "SYS_Init", "parent": 153, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 13}}, {"id": 155, "type": "parameter_list", "text": "(void)", "parent": 153, "children": [156], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 19}}, {"id": 156, "type": "parameter_declaration", "text": "void", "parent": 155, "children": [157], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 18}}, {"id": 157, "type": "primitive_type", "text": "void", "parent": 156, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 18}}, {"id": 158, "type": "call_expression", "text": "SYS_UnlockReg()", "parent": 151, "children": [159, 160], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 19}}, {"id": 159, "type": "identifier", "text": "SYS_UnlockReg", "parent": 158, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 17}}, {"id": 160, "type": "argument_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 19}}, {"id": 161, "type": "assignment_expression", "text": "PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk)", "parent": 151, "children": [162, 165, 166], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 60}}, {"id": 162, "type": "field_expression", "text": "PF->MODE", "parent": 161, "children": [163, 164], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 12}}, {"id": 163, "type": "identifier", "text": "PF", "parent": 162, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 6}}, {"id": 164, "type": "field_identifier", "text": "MODE", "parent": 162, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 12}}, {"id": 165, "type": "&=", "text": "&=", "parent": 161, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 15}}, {"id": 166, "type": "unary_expression", "text": "~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk)", "parent": 161, "children": [167, 168], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 60}}, {"id": 167, "type": "~", "text": "~", "parent": 166, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 17}}, {"id": 168, "type": "parenthesized_expression", "text": "(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk)", "parent": 166, "children": [169], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 60}}, {"id": 169, "type": "binary_expression", "text": "GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk", "parent": 168, "children": [170, 171], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 59}}, {"id": 170, "type": "identifier", "text": "GPIO_MODE_MODE2_Msk", "parent": 169, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 37}}, {"id": 171, "type": "identifier", "text": "GPIO_MODE_MODE3_Msk", "parent": 169, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 59}}, {"id": 172, "type": "call_expression", "text": "CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk)", "parent": 151, "children": [173, 174], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 42}}, {"id": 173, "type": "identifier", "text": "CLK_EnableXtalRC", "parent": 172, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 20}}, {"id": 174, "type": "argument_list", "text": "(CLK_PWRCTL_HXTEN_Msk)", "parent": 172, "children": [175], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 42}}, {"id": 175, "type": "identifier", "text": "CLK_PWRCTL_HXTEN_Msk", "parent": 174, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 41}}, {"id": 176, "type": "call_expression", "text": "CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk)", "parent": 151, "children": [177, 178], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 45}}, {"id": 177, "type": "identifier", "text": "CLK_WaitClockReady", "parent": 176, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 22}}, {"id": 178, "type": "argument_list", "text": "(CLK_STATUS_HXTSTB_Msk)", "parent": 176, "children": [179], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 45}}, {"id": 179, "type": "identifier", "text": "CLK_STATUS_HXTSTB_Msk", "parent": 178, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 44}}, {"id": 180, "type": "call_expression", "text": "CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1))", "parent": 151, "children": [181, 182], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 60}}, {"id": 181, "type": "identifier", "text": "CLK_SetHCLK", "parent": 180, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 15}}, {"id": 182, "type": "argument_list", "text": "(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1))", "parent": 180, "children": [183, 184], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 60}}, {"id": 183, "type": "identifier", "text": "CLK_CLKSEL0_HCLKSEL_HXT", "parent": 182, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 39}}, {"id": 184, "type": "call_expression", "text": "CLK_CLKDIV0_HCLK(1)", "parent": 182, "children": [185, 186], "start_point": {"row": 65, "column": 40}, "end_point": {"row": 65, "column": 59}}, {"id": 185, "type": "identifier", "text": "CLK_CLKDIV0_HCLK", "parent": 184, "children": [], "start_point": {"row": 65, "column": 40}, "end_point": {"row": 65, "column": 56}}, {"id": 186, "type": "argument_list", "text": "(1)", "parent": 184, "children": [187], "start_point": {"row": 65, "column": 56}, "end_point": {"row": 65, "column": 59}}, {"id": 187, "type": "number_literal", "text": "1", "parent": 186, "children": [], "start_point": {"row": 65, "column": 57}, "end_point": {"row": 65, "column": 58}}, {"id": 188, "type": "call_expression", "text": "CLK_SetCoreClock(FREQ_192MHZ)", "parent": 151, "children": [189, 190], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 33}}, {"id": 189, "type": "identifier", "text": "CLK_SetCoreClock", "parent": 188, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 20}}, {"id": 190, "type": "argument_list", "text": "(FREQ_192MHZ)", "parent": 188, "children": [191], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 33}}, {"id": 191, "type": "identifier", "text": "FREQ_192MHZ", "parent": 190, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 32}}, {"id": 192, "type": "assignment_expression", "text": "CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2", "parent": 151, "children": [193, 196, 197], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 70}}, {"id": 193, "type": "field_expression", "text": "CLK->PCLKDIV", "parent": 192, "children": [194, 195], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 16}}, {"id": 194, "type": "identifier", "text": "CLK", "parent": 193, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 7}}, {"id": 195, "type": "field_identifier", "text": "PCLKDIV", "parent": 193, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 16}}, {"id": 196, "type": "=", "text": "=", "parent": 192, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 18}}, {"id": 197, "type": "binary_expression", "text": "CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2", "parent": 192, "children": [198, 199], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 70}}, {"id": 198, "type": "identifier", "text": "CLK_PCLKDIV_APB0DIV_DIV2", "parent": 197, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 43}}, {"id": 199, "type": "identifier", "text": "CLK_PCLKDIV_APB1DIV_DIV2", "parent": 197, "children": [], "start_point": {"row": 71, "column": 46}, "end_point": {"row": 71, "column": 70}}, {"id": 200, "type": "if_statement", "text": "if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }", "parent": 151, "children": [201, 230], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 85, "column": 5}}, {"id": 201, "type": "parenthesized_expression", "text": "(((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))", "parent": 200, "children": [202], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 76}}, {"id": 202, "type": "binary_expression", "text": "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)", "parent": 201, "children": [203, 213, 214], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 75}}, {"id": 203, "type": "parenthesized_expression", "text": "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1)", "parent": 202, "children": [204], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 57}}, {"id": 204, "type": "binary_expression", "text": "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1", "parent": 203, "children": [205, 211, 212], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 56}}, {"id": 205, "type": "parenthesized_expression", "text": "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk)", "parent": 204, "children": [206], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 49}}, {"id": 206, "type": "binary_expression", "text": "SYS->CSERVER & SYS_CSERVER_VERSION_Msk", "parent": 205, "children": [207, 210], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 48}}, {"id": 207, "type": "field_expression", "text": "SYS->CSERVER", "parent": 206, "children": [208, 209], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 22}}, {"id": 208, "type": "identifier", "text": "SYS", "parent": 207, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 13}}, {"id": 209, "type": "field_identifier", "text": "CSERVER", "parent": 207, "children": [], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 22}}, {"id": 210, "type": "identifier", "text": "SYS_CSERVER_VERSION_Msk", "parent": 206, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 48}}, {"id": 211, "type": "==", "text": "==", "parent": 204, "children": [], "start_point": {"row": 74, "column": 50}, "end_point": {"row": 74, "column": 52}}, {"id": 212, "type": "number_literal", "text": "0x1", "parent": 204, "children": [], "start_point": {"row": 74, "column": 53}, "end_point": {"row": 74, "column": 56}}, {"id": 213, "type": "&&", "text": "&&", "parent": 202, "children": [], "start_point": {"row": 74, "column": 58}, "end_point": {"row": 74, "column": 60}}, {"id": 214, "type": "parenthesized_expression", "text": "(CRYSTAL_LESS)", "parent": 202, "children": [215], "start_point": {"row": 74, "column": 61}, "end_point": {"row": 74, "column": 75}}, {"id": 215, "type": "identifier", "text": "CRYSTAL_LESS", "parent": 214, "children": [], "start_point": {"row": 74, "column": 62}, "end_point": {"row": 74, "column": 74}}, {"id": 216, "type": "assignment_expression", "text": "CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk", "parent": 200, "children": [217, 220, 221], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 47}}, {"id": 217, "type": "field_expression", "text": "CLK->PWRCTL", "parent": 216, "children": [218, 219], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 19}}, {"id": 218, "type": "identifier", "text": "CLK", "parent": 217, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 11}}, {"id": 219, "type": "field_identifier", "text": "PWRCTL", "parent": 217, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 19}}, {"id": 220, "type": "|=", "text": "|=", "parent": 216, "children": [], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 22}}, {"id": 221, "type": "identifier", "text": "CLK_PWRCTL_HIRC48MEN_Msk", "parent": 216, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 47}}, {"id": 222, "type": "assignment_expression", "text": "CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk", "parent": 200, "children": [223, 226, 227], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 47}}, {"id": 223, "type": "field_expression", "text": "CLK->CLKSEL0", "parent": 222, "children": [224, 225], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 20}}, {"id": 224, "type": "identifier", "text": "CLK", "parent": 223, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 11}}, {"id": 225, "type": "field_identifier", "text": "CLKSEL0", "parent": 223, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 20}}, {"id": 226, "type": "&=", "text": "&=", "parent": 222, "children": [], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 23}}, {"id": 227, "type": "unary_expression", "text": "~CLK_CLKSEL0_USBSEL_Msk", "parent": 222, "children": [228, 229], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 47}}, {"id": 228, "type": "~", "text": "~", "parent": 227, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 25}}, {"id": 229, "type": "identifier", "text": "CLK_CLKSEL0_USBSEL_Msk", "parent": 227, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 47}}, {"id": 230, "type": "else_clause", "text": "else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }", "parent": 200, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 85, "column": 5}}, {"id": 231, "type": "assignment_expression", "text": "CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk", "parent": 230, "children": [232, 235, 236], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 46}}, {"id": 232, "type": "field_expression", "text": "CLK->CLKSEL0", "parent": 231, "children": [233, 234], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 20}}, {"id": 233, "type": "identifier", "text": "CLK", "parent": 232, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 11}}, {"id": 234, "type": "field_identifier", "text": "CLKSEL0", "parent": 232, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 20}}, {"id": 235, "type": "|=", "text": "|=", "parent": 231, "children": [], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 23}}, {"id": 236, "type": "identifier", "text": "CLK_CLKSEL0_USBSEL_Msk", "parent": 231, "children": [], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 46}}, {"id": 237, "type": "assignment_expression", "text": "CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4)", "parent": 230, "children": [238, 241, 242], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 84}}, {"id": 238, "type": "field_expression", "text": "CLK->CLKDIV0", "parent": 237, "children": [239, 240], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 20}}, {"id": 239, "type": "identifier", "text": "CLK", "parent": 238, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 11}}, {"id": 240, "type": "field_identifier", "text": "CLKDIV0", "parent": 238, "children": [], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 20}}, {"id": 241, "type": "=", "text": "=", "parent": 237, "children": [], "start_point": {"row": 84, "column": 21}, "end_point": {"row": 84, "column": 22}}, {"id": 242, "type": "binary_expression", "text": "(CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4)", "parent": 237, "children": [243, 251], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 84}}, {"id": 243, "type": "parenthesized_expression", "text": "(CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk)", "parent": 242, "children": [244], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 63}}, {"id": 244, "type": "binary_expression", "text": "CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk", "parent": 243, "children": [245, 248], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 62}}, {"id": 245, "type": "field_expression", "text": "CLK->CLKDIV0", "parent": 244, "children": [246, 247], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 36}}, {"id": 246, "type": "identifier", "text": "CLK", "parent": 245, "children": [], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 27}}, {"id": 247, "type": "field_identifier", "text": "CLKDIV0", "parent": 245, "children": [], "start_point": {"row": 84, "column": 29}, "end_point": {"row": 84, "column": 36}}, {"id": 248, "type": "unary_expression", "text": "~CLK_CLKDIV0_USBDIV_Msk", "parent": 244, "children": [249, 250], "start_point": {"row": 84, "column": 39}, "end_point": {"row": 84, "column": 62}}, {"id": 249, "type": "~", "text": "~", "parent": 248, "children": [], "start_point": {"row": 84, "column": 39}, "end_point": {"row": 84, "column": 40}}, {"id": 250, "type": "identifier", "text": "CLK_CLKDIV0_USBDIV_Msk", "parent": 248, "children": [], "start_point": {"row": 84, "column": 40}, "end_point": {"row": 84, "column": 62}}, {"id": 251, "type": "call_expression", "text": "CLK_CLKDIV0_USB(4)", "parent": 242, "children": [252, 253], "start_point": {"row": 84, "column": 66}, "end_point": {"row": 84, "column": 84}}, {"id": 252, "type": "identifier", "text": "CLK_CLKDIV0_USB", "parent": 251, "children": [], "start_point": {"row": 84, "column": 66}, "end_point": {"row": 84, "column": 81}}, {"id": 253, "type": "argument_list", "text": "(4)", "parent": 251, "children": [254], "start_point": {"row": 84, "column": 81}, "end_point": {"row": 84, "column": 84}}, {"id": 254, "type": "number_literal", "text": "4", "parent": 253, "children": [], "start_point": {"row": 84, "column": 82}, "end_point": {"row": 84, "column": 83}}, {"id": 255, "type": "assignment_expression", "text": "SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk", "parent": 151, "children": [256, 259, 260], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 101}}, {"id": 256, "type": "field_expression", "text": "SYS->USBPHY", "parent": 255, "children": [257, 258], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 15}}, {"id": 257, "type": "identifier", "text": "SYS", "parent": 256, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 7}}, {"id": 258, "type": "field_identifier", "text": "USBPHY", "parent": 256, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 15}}, {"id": 259, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 17}}, {"id": 260, "type": "binary_expression", "text": "(SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk", "parent": 255, "children": [261, 271], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 101}}, {"id": 261, "type": "binary_expression", "text": "(SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk", "parent": 260, "children": [262, 270], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 80}}, {"id": 262, "type": "parenthesized_expression", "text": "(SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk)", "parent": 261, "children": [263], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 57}}, {"id": 263, "type": "binary_expression", "text": "SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk", "parent": 262, "children": [264, 267], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 56}}, {"id": 264, "type": "field_expression", "text": "SYS->USBPHY", "parent": 263, "children": [265, 266], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 30}}, {"id": 265, "type": "identifier", "text": "SYS", "parent": 264, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 22}}, {"id": 266, "type": "field_identifier", "text": "USBPHY", "parent": 264, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 30}}, {"id": 267, "type": "unary_expression", "text": "~SYS_USBPHY_USBROLE_Msk", "parent": 263, "children": [268, 269], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 56}}, {"id": 268, "type": "~", "text": "~", "parent": 267, "children": [], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 34}}, {"id": 269, "type": "identifier", "text": "SYS_USBPHY_USBROLE_Msk", "parent": 267, "children": [], "start_point": {"row": 88, "column": 34}, "end_point": {"row": 88, "column": 56}}, {"id": 270, "type": "identifier", "text": "SYS_USBPHY_USBEN_Msk", "parent": 261, "children": [], "start_point": {"row": 88, "column": 60}, "end_point": {"row": 88, "column": 80}}, {"id": 271, "type": "identifier", "text": "SYS_USBPHY_SBO_Msk", "parent": 260, "children": [], "start_point": {"row": 88, "column": 83}, "end_point": {"row": 88, "column": 101}}, {"id": 272, "type": "call_expression", "text": "CLK_EnableModuleClock(USBD_MODULE)", "parent": 151, "children": [273, 274], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 38}}, {"id": 273, "type": "identifier", "text": "CLK_EnableModuleClock", "parent": 272, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 25}}, {"id": 274, "type": "argument_list", "text": "(USBD_MODULE)", "parent": 272, "children": [275], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 38}}, {"id": 275, "type": "identifier", "text": "USBD_MODULE", "parent": 274, "children": [], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 37}}, {"id": 276, "type": "call_expression", "text": "CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1))", "parent": 151, "children": [277, 278], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 85}}, {"id": 277, "type": "identifier", "text": "CLK_SetModuleClock", "parent": 276, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 22}}, {"id": 278, "type": "argument_list", "text": "(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1))", "parent": 276, "children": [279, 280, 281], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 85}}, {"id": 279, "type": "identifier", "text": "UART0_MODULE", "parent": 278, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 35}}, {"id": 280, "type": "identifier", "text": "CLK_CLKSEL1_UART0SEL_HIRC", "parent": 278, "children": [], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 62}}, {"id": 281, "type": "call_expression", "text": "CLK_CLKDIV0_UART0(1)", "parent": 278, "children": [282, 283], "start_point": {"row": 94, "column": 64}, "end_point": {"row": 94, "column": 84}}, {"id": 282, "type": "identifier", "text": "CLK_CLKDIV0_UART0", "parent": 281, "children": [], "start_point": {"row": 94, "column": 64}, "end_point": {"row": 94, "column": 81}}, {"id": 283, "type": "argument_list", "text": "(1)", "parent": 281, "children": [284], "start_point": {"row": 94, "column": 81}, "end_point": {"row": 94, "column": 84}}, {"id": 284, "type": "number_literal", "text": "1", "parent": 283, "children": [], "start_point": {"row": 94, "column": 82}, "end_point": {"row": 94, "column": 83}}, {"id": 285, "type": "call_expression", "text": "CLK_EnableModuleClock(UART0_MODULE)", "parent": 151, "children": [286, 287], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 39}}, {"id": 286, "type": "identifier", "text": "CLK_EnableModuleClock", "parent": 285, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 25}}, {"id": 287, "type": "argument_list", "text": "(UART0_MODULE)", "parent": 285, "children": [288], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 39}}, {"id": 288, "type": "identifier", "text": "UART0_MODULE", "parent": 287, "children": [], "start_point": {"row": 97, "column": 26}, "end_point": {"row": 97, "column": 38}}, {"id": 289, "type": "assignment_expression", "text": "PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk)", "parent": 151, "children": [290, 293, 294], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 85}}, {"id": 290, "type": "field_expression", "text": "PA->MODE", "parent": 289, "children": [291, 292], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 12}}, {"id": 291, "type": "identifier", "text": "PA", "parent": 290, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 6}}, {"id": 292, "type": "field_identifier", "text": "MODE", "parent": 290, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 12}}, {"id": 293, "type": "&=", "text": "&=", "parent": 289, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 15}}, {"id": 294, "type": "unary_expression", "text": "~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk)", "parent": 289, "children": [295, 296], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 85}}, {"id": 295, "type": "~", "text": "~", "parent": 294, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 17}}, {"id": 296, "type": "parenthesized_expression", "text": "(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk)", "parent": 294, "children": [297], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 85}}, {"id": 297, "type": "binary_expression", "text": "GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk", "parent": 296, "children": [298, 301], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 84}}, {"id": 298, "type": "binary_expression", "text": "GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk", "parent": 297, "children": [299, 300], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 61}}, {"id": 299, "type": "identifier", "text": "GPIO_MODE_MODE12_Msk", "parent": 298, "children": [], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 38}}, {"id": 300, "type": "identifier", "text": "GPIO_MODE_MODE13_Msk", "parent": 298, "children": [], "start_point": {"row": 99, "column": 41}, "end_point": {"row": 99, "column": 61}}, {"id": 301, "type": "identifier", "text": "GPIO_MODE_MODE14_Msk", "parent": 297, "children": [], "start_point": {"row": 99, "column": 64}, "end_point": {"row": 99, "column": 84}}, {"id": 302, "type": "assignment_expression", "text": "SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk)", "parent": 151, "children": [303, 306, 307], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 123}}, {"id": 303, "type": "field_expression", "text": "SYS->GPA_MFPH", "parent": 302, "children": [304, 305], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 17}}, {"id": 304, "type": "identifier", "text": "SYS", "parent": 303, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 7}}, {"id": 305, "type": "field_identifier", "text": "GPA_MFPH", "parent": 303, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 17}}, {"id": 306, "type": "&=", "text": "&=", "parent": 302, "children": [], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 20}}, {"id": 307, "type": "unary_expression", "text": "~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk)", "parent": 302, "children": [308, 309], "start_point": {"row": 100, "column": 21}, "end_point": {"row": 100, "column": 123}}, {"id": 308, "type": "~", "text": "~", "parent": 307, "children": [], "start_point": {"row": 100, "column": 21}, "end_point": {"row": 100, "column": 22}}, {"id": 309, "type": "parenthesized_expression", "text": "(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk)", "parent": 307, "children": [310], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 123}}, {"id": 310, "type": "binary_expression", "text": "SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk", "parent": 309, "children": [311, 316], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 122}}, {"id": 311, "type": "binary_expression", "text": "SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk", "parent": 310, "children": [312, 315], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 97}}, {"id": 312, "type": "binary_expression", "text": "SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk", "parent": 311, "children": [313, 314], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 72}}, {"id": 313, "type": "identifier", "text": "SYS_GPA_MFPH_PA12MFP_Msk", "parent": 312, "children": [], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 47}}, {"id": 314, "type": "identifier", "text": "SYS_GPA_MFPH_PA13MFP_Msk", "parent": 312, "children": [], "start_point": {"row": 100, "column": 48}, "end_point": {"row": 100, "column": 72}}, {"id": 315, "type": "identifier", "text": "SYS_GPA_MFPH_PA14MFP_Msk", "parent": 311, "children": [], "start_point": {"row": 100, "column": 73}, "end_point": {"row": 100, "column": 97}}, {"id": 316, "type": "identifier", "text": "SYS_GPA_MFPH_PA15MFP_Msk", "parent": 310, "children": [], "start_point": {"row": 100, "column": 98}, "end_point": {"row": 100, "column": 122}}, {"id": 317, "type": "assignment_expression", "text": "SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID)", "parent": 151, "children": [318, 321, 322], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 142}}, {"id": 318, "type": "field_expression", "text": "SYS->GPA_MFPH", "parent": 317, "children": [319, 320], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 17}}, {"id": 319, "type": "identifier", "text": "SYS", "parent": 318, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 7}}, {"id": 320, "type": "field_identifier", "text": "GPA_MFPH", "parent": 318, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 17}}, {"id": 321, "type": "|=", "text": "|=", "parent": 317, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 20}}, {"id": 322, "type": "parenthesized_expression", "text": "(SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID)", "parent": 317, "children": [323], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 142}}, {"id": 323, "type": "binary_expression", "text": "SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID", "parent": 322, "children": [324, 329], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 141}}, {"id": 324, "type": "binary_expression", "text": "SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P", "parent": 323, "children": [325, 328], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 109}}, {"id": 325, "type": "binary_expression", "text": "SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N", "parent": 324, "children": [326, 327], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 80}}, {"id": 326, "type": "identifier", "text": "SYS_GPA_MFPH_PA12MFP_USB_VBUS", "parent": 325, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 51}}, {"id": 327, "type": "identifier", "text": "SYS_GPA_MFPH_PA13MFP_USB_D_N", "parent": 325, "children": [], "start_point": {"row": 101, "column": 52}, "end_point": {"row": 101, "column": 80}}, {"id": 328, "type": "identifier", "text": "SYS_GPA_MFPH_PA14MFP_USB_D_P", "parent": 324, "children": [], "start_point": {"row": 101, "column": 81}, "end_point": {"row": 101, "column": 109}}, {"id": 329, "type": "identifier", "text": "SYS_GPA_MFPH_PA15MFP_USB_OTG_ID", "parent": 323, "children": [], "start_point": {"row": 101, "column": 110}, "end_point": {"row": 101, "column": 141}}, {"id": 330, "type": "assignment_expression", "text": "SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk)", "parent": 151, "children": [331, 334, 335], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 75}}, {"id": 331, "type": "field_expression", "text": "SYS->GPB_MFPH", "parent": 330, "children": [332, 333], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 17}}, {"id": 332, "type": "identifier", "text": "SYS", "parent": 331, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 7}}, {"id": 333, "type": "field_identifier", "text": "GPB_MFPH", "parent": 331, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 17}}, {"id": 334, "type": "&=", "text": "&=", "parent": 330, "children": [], "start_point": {"row": 104, "column": 18}, "end_point": {"row": 104, "column": 20}}, {"id": 335, "type": "unary_expression", "text": "~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk)", "parent": 330, "children": [336, 337], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 75}}, {"id": 336, "type": "~", "text": "~", "parent": 335, "children": [], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 22}}, {"id": 337, "type": "parenthesized_expression", "text": "(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk)", "parent": 335, "children": [338], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 75}}, {"id": 338, "type": "binary_expression", "text": "SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk", "parent": 337, "children": [339, 340], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 74}}, {"id": 339, "type": "identifier", "text": "SYS_GPB_MFPH_PB12MFP_Msk", "parent": 338, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 47}}, {"id": 340, "type": "identifier", "text": "SYS_GPB_MFPH_PB13MFP_Msk", "parent": 338, "children": [], "start_point": {"row": 104, "column": 50}, "end_point": {"row": 104, "column": 74}}, {"id": 341, "type": "assignment_expression", "text": "SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD)", "parent": 151, "children": [342, 345, 346], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 86}}, {"id": 342, "type": "field_expression", "text": "SYS->GPB_MFPH", "parent": 341, "children": [343, 344], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 17}}, {"id": 343, "type": "identifier", "text": "SYS", "parent": 342, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 7}}, {"id": 344, "type": "field_identifier", "text": "GPB_MFPH", "parent": 342, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 17}}, {"id": 345, "type": "|=", "text": "|=", "parent": 341, "children": [], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 20}}, {"id": 346, "type": "parenthesized_expression", "text": "(SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD)", "parent": 341, "children": [347], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 86}}, {"id": 347, "type": "binary_expression", "text": "SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD", "parent": 346, "children": [348, 349], "start_point": {"row": 105, "column": 22}, "end_point": {"row": 105, "column": 85}}, {"id": 348, "type": "identifier", "text": "SYS_GPB_MFPH_PB12MFP_UART0_RXD", "parent": 347, "children": [], "start_point": {"row": 105, "column": 22}, "end_point": {"row": 105, "column": 52}}, {"id": 349, "type": "identifier", "text": "SYS_GPB_MFPH_PB13MFP_UART0_TXD", "parent": 347, "children": [], "start_point": {"row": 105, "column": 55}, "end_point": {"row": 105, "column": 85}}, {"id": 350, "type": "function_definition", "text": "void UART0_Init(void)\n{\n /* Configure UART0 and set UART0 Baudrate */\n UART_Open(UART0, 115200);\n\n /* Enable Interrupt and install the call back function */\n UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk));\n}", "parent": null, "children": [351, 352], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 116, "column": 1}}, {"id": 351, "type": "primitive_type", "text": "void", "parent": 350, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 4}}, {"id": 352, "type": "function_declarator", "text": "UART0_Init(void)", "parent": 350, "children": [353, 354], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 21}}, {"id": 353, "type": "identifier", "text": "UART0_Init", "parent": 352, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 15}}, {"id": 354, "type": "parameter_list", "text": "(void)", "parent": 352, "children": [355], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 21}}, {"id": 355, "type": "parameter_declaration", "text": "void", "parent": 354, "children": [356], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 20}}, {"id": 356, "type": "primitive_type", "text": "void", "parent": 355, "children": [], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 20}}, {"id": 357, "type": "call_expression", "text": "UART_Open(UART0, 115200)", "parent": 350, "children": [358, 359], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 28}}, {"id": 358, "type": "identifier", "text": "UART_Open", "parent": 357, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 13}}, {"id": 359, "type": "argument_list", "text": "(UART0, 115200)", "parent": 357, "children": [360, 361], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 28}}, {"id": 360, "type": "identifier", "text": "UART0", "parent": 359, "children": [], "start_point": {"row": 112, "column": 14}, "end_point": {"row": 112, "column": 19}}, {"id": 361, "type": "number_literal", "text": "115200", "parent": 359, "children": [], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 27}}, {"id": 362, "type": "call_expression", "text": "UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk))", "parent": 350, "children": [363, 364], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 101}}, {"id": 363, "type": "identifier", "text": "UART_ENABLE_INT", "parent": 362, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 19}}, {"id": 364, "type": "argument_list", "text": "(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk))", "parent": 362, "children": [365, 366], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 101}}, {"id": 365, "type": "identifier", "text": "UART0", "parent": 364, "children": [], "start_point": {"row": 115, "column": 20}, "end_point": {"row": 115, "column": 25}}, {"id": 366, "type": "parenthesized_expression", "text": "(UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk)", "parent": 364, "children": [367], "start_point": {"row": 115, "column": 27}, "end_point": {"row": 115, "column": 100}}, {"id": 367, "type": "binary_expression", "text": "UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk", "parent": 366, "children": [368, 371], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 99}}, {"id": 368, "type": "binary_expression", "text": "UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk", "parent": 367, "children": [369, 370], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 74}}, {"id": 369, "type": "identifier", "text": "UART_INTEN_RDAIEN_Msk", "parent": 368, "children": [], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 49}}, {"id": 370, "type": "identifier", "text": "UART_INTEN_THREIEN_Msk", "parent": 368, "children": [], "start_point": {"row": 115, "column": 52}, "end_point": {"row": 115, "column": 74}}, {"id": 371, "type": "identifier", "text": "UART_INTEN_RXTOIEN_Msk", "parent": 367, "children": [], "start_point": {"row": 115, "column": 77}, "end_point": {"row": 115, "column": 99}}, {"id": 372, "type": "function_definition", "text": "void UART0_IRQHandler(void)\n{\n uint8_t bInChar;\n int32_t size;\n uint32_t u32IntStatus;\n\n u32IntStatus = UART0->INTSTS;\n\n if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }\n\n if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }\n}", "parent": null, "children": [373, 374], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 181, "column": 1}}, {"id": 373, "type": "primitive_type", "text": "void", "parent": 372, "children": [], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 4}}, {"id": 374, "type": "function_declarator", "text": "UART0_IRQHandler(void)", "parent": 372, "children": [375, 376], "start_point": {"row": 119, "column": 5}, "end_point": {"row": 119, "column": 27}}, {"id": 375, "type": "identifier", "text": "UART0_IRQHandler", "parent": 374, "children": [], "start_point": {"row": 119, "column": 5}, "end_point": {"row": 119, "column": 21}}, {"id": 376, "type": "parameter_list", "text": "(void)", "parent": 374, "children": [377], "start_point": {"row": 119, "column": 21}, "end_point": {"row": 119, "column": 27}}, {"id": 377, "type": "parameter_declaration", "text": "void", "parent": 376, "children": [378], "start_point": {"row": 119, "column": 22}, "end_point": {"row": 119, "column": 26}}, {"id": 378, "type": "primitive_type", "text": "void", "parent": 377, "children": [], "start_point": {"row": 119, "column": 22}, "end_point": {"row": 119, "column": 26}}, {"id": 379, "type": "declaration", "text": "uint8_t bInChar;", "parent": 372, "children": [380, 381], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 20}}, {"id": 380, "type": "primitive_type", "text": "uint8_t", "parent": 379, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 11}}, {"id": 381, "type": "identifier", "text": "bInChar", "parent": 379, "children": [], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 19}}, {"id": 382, "type": "declaration", "text": "int32_t size;", "parent": 372, "children": [383, 384], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 17}}, {"id": 383, "type": "primitive_type", "text": "int32_t", "parent": 382, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 11}}, {"id": 384, "type": "identifier", "text": "size", "parent": 382, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 16}}, {"id": 385, "type": "declaration", "text": "uint32_t u32IntStatus;", "parent": 372, "children": [386, 387], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 26}}, {"id": 386, "type": "primitive_type", "text": "uint32_t", "parent": 385, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 12}}, {"id": 387, "type": "identifier", "text": "u32IntStatus", "parent": 385, "children": [], "start_point": {"row": 123, "column": 13}, "end_point": {"row": 123, "column": 25}}, {"id": 388, "type": "assignment_expression", "text": "u32IntStatus = UART0->INTSTS", "parent": 372, "children": [389, 390, 391], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 32}}, {"id": 389, "type": "identifier", "text": "u32IntStatus", "parent": 388, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 16}}, {"id": 390, "type": "=", "text": "=", "parent": 388, "children": [], "start_point": {"row": 125, "column": 17}, "end_point": {"row": 125, "column": 18}}, {"id": 391, "type": "field_expression", "text": "UART0->INTSTS", "parent": 388, "children": [392, 393], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 32}}, {"id": 392, "type": "identifier", "text": "UART0", "parent": 391, "children": [], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 24}}, {"id": 393, "type": "field_identifier", "text": "INTSTS", "parent": 391, "children": [], "start_point": {"row": 125, "column": 26}, "end_point": {"row": 125, "column": 32}}, {"id": 394, "type": "if_statement", "text": "if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }", "parent": 372, "children": [395], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 151, "column": 5}}, {"id": 395, "type": "parenthesized_expression", "text": "((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))", "parent": 394, "children": [396], "start_point": {"row": 127, "column": 6}, "end_point": {"row": 127, "column": 89}}, {"id": 396, "type": "binary_expression", "text": "(u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk)", "parent": 395, "children": [397, 401, 402], "start_point": {"row": 127, "column": 7}, "end_point": {"row": 127, "column": 88}}, {"id": 397, "type": "parenthesized_expression", "text": "(u32IntStatus & UART_INTSTS_RDAIF_Msk)", "parent": 396, "children": [398], "start_point": {"row": 127, "column": 7}, "end_point": {"row": 127, "column": 45}}, {"id": 398, "type": "binary_expression", "text": "u32IntStatus & UART_INTSTS_RDAIF_Msk", "parent": 397, "children": [399, 400], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 44}}, {"id": 399, "type": "identifier", "text": "u32IntStatus", "parent": 398, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 20}}, {"id": 400, "type": "identifier", "text": "UART_INTSTS_RDAIF_Msk", "parent": 398, "children": [], "start_point": {"row": 127, "column": 23}, "end_point": {"row": 127, "column": 44}}, {"id": 401, "type": "||", "text": "||", "parent": 396, "children": [], "start_point": {"row": 127, "column": 46}, "end_point": {"row": 127, "column": 48}}, {"id": 402, "type": "parenthesized_expression", "text": "(u32IntStatus & UART_INTSTS_RXTOIF_Msk)", "parent": 396, "children": [403], "start_point": {"row": 127, "column": 49}, "end_point": {"row": 127, "column": 88}}, {"id": 403, "type": "binary_expression", "text": "u32IntStatus & UART_INTSTS_RXTOIF_Msk", "parent": 402, "children": [404, 405], "start_point": {"row": 127, "column": 50}, "end_point": {"row": 127, "column": 87}}, {"id": 404, "type": "identifier", "text": "u32IntStatus", "parent": 403, "children": [], "start_point": {"row": 127, "column": 50}, "end_point": {"row": 127, "column": 62}}, {"id": 405, "type": "identifier", "text": "UART_INTSTS_RXTOIF_Msk", "parent": 403, "children": [], "start_point": {"row": 127, "column": 65}, "end_point": {"row": 127, "column": 87}}, {"id": 406, "type": "while_statement", "text": "while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }", "parent": 394, "children": [407], "start_point": {"row": 132, "column": 8}, "end_point": {"row": 150, "column": 9}}, {"id": 407, "type": "parenthesized_expression", "text": "(!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))", "parent": 406, "children": [408], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 60}}, {"id": 408, "type": "unary_expression", "text": "!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk)", "parent": 407, "children": [409, 410], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 59}}, {"id": 409, "type": "!", "text": "!", "parent": 408, "children": [], "start_point": {"row": 132, "column": 15}, "end_point": {"row": 132, "column": 16}}, {"id": 410, "type": "parenthesized_expression", "text": "(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk)", "parent": 408, "children": [411], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 59}}, {"id": 411, "type": "binary_expression", "text": "UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk", "parent": 410, "children": [412, 415], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 58}}, {"id": 412, "type": "field_expression", "text": "UART0->FIFOSTS", "parent": 411, "children": [413, 414], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 31}}, {"id": 413, "type": "identifier", "text": "UART0", "parent": 412, "children": [], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 22}}, {"id": 414, "type": "field_identifier", "text": "FIFOSTS", "parent": 412, "children": [], "start_point": {"row": 132, "column": 24}, "end_point": {"row": 132, "column": 31}}, {"id": 415, "type": "identifier", "text": "UART_FIFOSTS_RXEMPTY_Msk", "parent": 411, "children": [], "start_point": {"row": 132, "column": 34}, "end_point": {"row": 132, "column": 58}}, {"id": 416, "type": "assignment_expression", "text": "bInChar = UART0->DAT", "parent": 406, "children": [417, 418, 419], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 32}}, {"id": 417, "type": "identifier", "text": "bInChar", "parent": 416, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 19}}, {"id": 418, "type": "=", "text": "=", "parent": 416, "children": [], "start_point": {"row": 135, "column": 20}, "end_point": {"row": 135, "column": 21}}, {"id": 419, "type": "field_expression", "text": "UART0->DAT", "parent": 416, "children": [420, 421], "start_point": {"row": 135, "column": 22}, "end_point": {"row": 135, "column": 32}}, {"id": 420, "type": "identifier", "text": "UART0", "parent": 419, "children": [], "start_point": {"row": 135, "column": 22}, "end_point": {"row": 135, "column": 27}}, {"id": 421, "type": "field_identifier", "text": "DAT", "parent": 419, "children": [], "start_point": {"row": 135, "column": 29}, "end_point": {"row": 135, "column": 32}}, {"id": 422, "type": "if_statement", "text": "if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }", "parent": 406, "children": [423, 449], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 149, "column": 13}}, {"id": 423, "type": "parenthesized_expression", "text": "(comRbytes < RXBUFSIZE)", "parent": 422, "children": [424], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 37}}, {"id": 424, "type": "binary_expression", "text": "comRbytes < RXBUFSIZE", "parent": 423, "children": [425, 426, 427], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 36}}, {"id": 425, "type": "identifier", "text": "comRbytes", "parent": 424, "children": [], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 24}}, {"id": 426, "type": "<", "text": "<", "parent": 424, "children": [], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 26}}, {"id": 427, "type": "identifier", "text": "RXBUFSIZE", "parent": 424, "children": [], "start_point": {"row": 138, "column": 27}, "end_point": {"row": 138, "column": 36}}, {"id": 428, "type": "assignment_expression", "text": "comRbuf[comRtail++] = bInChar", "parent": 422, "children": [429, 434, 435], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 45}}, {"id": 429, "type": "subscript_expression", "text": "comRbuf[comRtail++]", "parent": 428, "children": [430, 431], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 35}}, {"id": 430, "type": "identifier", "text": "comRbuf", "parent": 429, "children": [], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 23}}, {"id": 431, "type": "update_expression", "text": "comRtail++", "parent": 429, "children": [432, 433], "start_point": {"row": 141, "column": 24}, "end_point": {"row": 141, "column": 34}}, {"id": 432, "type": "identifier", "text": "comRtail", "parent": 431, "children": [], "start_point": {"row": 141, "column": 24}, "end_point": {"row": 141, "column": 32}}, {"id": 433, "type": "++", "text": "++", "parent": 431, "children": [], "start_point": {"row": 141, "column": 32}, "end_point": {"row": 141, "column": 34}}, {"id": 434, "type": "=", "text": "=", "parent": 428, "children": [], "start_point": {"row": 141, "column": 36}, "end_point": {"row": 141, "column": 37}}, {"id": 435, "type": "identifier", "text": "bInChar", "parent": 428, "children": [], "start_point": {"row": 141, "column": 38}, "end_point": {"row": 141, "column": 45}}, {"id": 436, "type": "if_statement", "text": "if(comRtail >= RXBUFSIZE)\n comRtail = 0;", "parent": 422, "children": [437], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 143, "column": 33}}, {"id": 437, "type": "parenthesized_expression", "text": "(comRtail >= RXBUFSIZE)", "parent": 436, "children": [438], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 41}}, {"id": 438, "type": "binary_expression", "text": "comRtail >= RXBUFSIZE", "parent": 437, "children": [439, 440, 441], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 40}}, {"id": 439, "type": "identifier", "text": "comRtail", "parent": 438, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 27}}, {"id": 440, "type": ">=", "text": ">=", "parent": 438, "children": [], "start_point": {"row": 142, "column": 28}, "end_point": {"row": 142, "column": 30}}, {"id": 441, "type": "identifier", "text": "RXBUFSIZE", "parent": 438, "children": [], "start_point": {"row": 142, "column": 31}, "end_point": {"row": 142, "column": 40}}, {"id": 442, "type": "assignment_expression", "text": "comRtail = 0", "parent": 436, "children": [443, 444, 445], "start_point": {"row": 143, "column": 20}, "end_point": {"row": 143, "column": 32}}, {"id": 443, "type": "identifier", "text": "comRtail", "parent": 442, "children": [], "start_point": {"row": 143, "column": 20}, "end_point": {"row": 143, "column": 28}}, {"id": 444, "type": "=", "text": "=", "parent": 442, "children": [], "start_point": {"row": 143, "column": 29}, "end_point": {"row": 143, "column": 30}}, {"id": 445, "type": "number_literal", "text": "0", "parent": 442, "children": [], "start_point": {"row": 143, "column": 31}, "end_point": {"row": 143, "column": 32}}, {"id": 446, "type": "update_expression", "text": "comRbytes++", "parent": 422, "children": [447, 448], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 27}}, {"id": 447, "type": "identifier", "text": "comRbytes", "parent": 446, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 25}}, {"id": 448, "type": "++", "text": "++", "parent": 446, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 27}}, {"id": 449, "type": "else_clause", "text": "else\n {\n /* FIFO over run */\n }", "parent": 422, "children": [], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 149, "column": 13}}, {"id": 450, "type": "if_statement", "text": "if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }", "parent": 372, "children": [451], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 180, "column": 5}}, {"id": 451, "type": "parenthesized_expression", "text": "(u32IntStatus & UART_INTSTS_THREIF_Msk)", "parent": 450, "children": [452], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 45}}, {"id": 452, "type": "binary_expression", "text": "u32IntStatus & UART_INTSTS_THREIF_Msk", "parent": 451, "children": [453, 454], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 44}}, {"id": 453, "type": "identifier", "text": "u32IntStatus", "parent": 452, "children": [], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 19}}, {"id": 454, "type": "identifier", "text": "UART_INTSTS_THREIF_Msk", "parent": 452, "children": [], "start_point": {"row": 153, "column": 22}, "end_point": {"row": 153, "column": 44}}, {"id": 455, "type": "if_statement", "text": "if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }", "parent": 450, "children": [456, 505], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 179, "column": 9}}, {"id": 456, "type": "parenthesized_expression", "text": "(comTbytes)", "parent": 455, "children": [457], "start_point": {"row": 156, "column": 10}, "end_point": {"row": 156, "column": 21}}, {"id": 457, "type": "identifier", "text": "comTbytes", "parent": 456, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 20}}, {"id": 458, "type": "assignment_expression", "text": "size = comTbytes", "parent": 455, "children": [459, 460, 461], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 28}}, {"id": 459, "type": "identifier", "text": "size", "parent": 458, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 16}}, {"id": 460, "type": "=", "text": "=", "parent": 458, "children": [], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 18}}, {"id": 461, "type": "identifier", "text": "comTbytes", "parent": 458, "children": [], "start_point": {"row": 159, "column": 19}, "end_point": {"row": 159, "column": 28}}, {"id": 462, "type": "if_statement", "text": "if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }", "parent": 455, "children": [463], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 163, "column": 13}}, {"id": 463, "type": "parenthesized_expression", "text": "(size >= TX_FIFO_SIZE)", "parent": 462, "children": [464], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 36}}, {"id": 464, "type": "binary_expression", "text": "size >= TX_FIFO_SIZE", "parent": 463, "children": [465, 466, 467], "start_point": {"row": 160, "column": 15}, "end_point": {"row": 160, "column": 35}}, {"id": 465, "type": "identifier", "text": "size", "parent": 464, "children": [], "start_point": {"row": 160, "column": 15}, "end_point": {"row": 160, "column": 19}}, {"id": 466, "type": ">=", "text": ">=", "parent": 464, "children": [], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 22}}, {"id": 467, "type": "identifier", "text": "TX_FIFO_SIZE", "parent": 464, "children": [], "start_point": {"row": 160, "column": 23}, "end_point": {"row": 160, "column": 35}}, {"id": 468, "type": "assignment_expression", "text": "size = TX_FIFO_SIZE", "parent": 462, "children": [469, 470, 471], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 35}}, {"id": 469, "type": "identifier", "text": "size", "parent": 468, "children": [], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 20}}, {"id": 470, "type": "=", "text": "=", "parent": 468, "children": [], "start_point": {"row": 162, "column": 21}, "end_point": {"row": 162, "column": 22}}, {"id": 471, "type": "identifier", "text": "TX_FIFO_SIZE", "parent": 468, "children": [], "start_point": {"row": 162, "column": 23}, "end_point": {"row": 162, "column": 35}}, {"id": 472, "type": "while_statement", "text": "while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }", "parent": 455, "children": [473], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 173, "column": 13}}, {"id": 473, "type": "parenthesized_expression", "text": "(size)", "parent": 472, "children": [474], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 23}}, {"id": 474, "type": "identifier", "text": "size", "parent": 473, "children": [], "start_point": {"row": 165, "column": 18}, "end_point": {"row": 165, "column": 22}}, {"id": 475, "type": "assignment_expression", "text": "bInChar = comTbuf[comThead++]", "parent": 472, "children": [476, 477, 478], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 45}}, {"id": 476, "type": "identifier", "text": "bInChar", "parent": 475, "children": [], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 23}}, {"id": 477, "type": "=", "text": "=", "parent": 475, "children": [], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 25}}, {"id": 478, "type": "subscript_expression", "text": "comTbuf[comThead++]", "parent": 475, "children": [479, 480], "start_point": {"row": 167, "column": 26}, "end_point": {"row": 167, "column": 45}}, {"id": 479, "type": "identifier", "text": "comTbuf", "parent": 478, "children": [], "start_point": {"row": 167, "column": 26}, "end_point": {"row": 167, "column": 33}}, {"id": 480, "type": "update_expression", "text": "comThead++", "parent": 478, "children": [481, 482], "start_point": {"row": 167, "column": 34}, "end_point": {"row": 167, "column": 44}}, {"id": 481, "type": "identifier", "text": "comThead", "parent": 480, "children": [], "start_point": {"row": 167, "column": 34}, "end_point": {"row": 167, "column": 42}}, {"id": 482, "type": "++", "text": "++", "parent": 480, "children": [], "start_point": {"row": 167, "column": 42}, "end_point": {"row": 167, "column": 44}}, {"id": 483, "type": "assignment_expression", "text": "UART0->DAT = bInChar", "parent": 472, "children": [484, 487, 488], "start_point": {"row": 168, "column": 16}, "end_point": {"row": 168, "column": 36}}, {"id": 484, "type": "field_expression", "text": "UART0->DAT", "parent": 483, "children": [485, 486], "start_point": {"row": 168, "column": 16}, "end_point": {"row": 168, "column": 26}}, {"id": 485, "type": "identifier", "text": "UART0", "parent": 484, "children": [], "start_point": {"row": 168, "column": 16}, "end_point": {"row": 168, "column": 21}}, {"id": 486, "type": "field_identifier", "text": "DAT", "parent": 484, "children": [], "start_point": {"row": 168, "column": 23}, "end_point": {"row": 168, "column": 26}}, {"id": 487, "type": "=", "text": "=", "parent": 483, "children": [], "start_point": {"row": 168, "column": 27}, "end_point": {"row": 168, "column": 28}}, {"id": 488, "type": "identifier", "text": "bInChar", "parent": 483, "children": [], "start_point": {"row": 168, "column": 29}, "end_point": {"row": 168, "column": 36}}, {"id": 489, "type": "if_statement", "text": "if(comThead >= TXBUFSIZE)\n comThead = 0;", "parent": 472, "children": [490], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 170, "column": 33}}, {"id": 490, "type": "parenthesized_expression", "text": "(comThead >= TXBUFSIZE)", "parent": 489, "children": [491], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 41}}, {"id": 491, "type": "binary_expression", "text": "comThead >= TXBUFSIZE", "parent": 490, "children": [492, 493, 494], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 40}}, {"id": 492, "type": "identifier", "text": "comThead", "parent": 491, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 27}}, {"id": 493, "type": ">=", "text": ">=", "parent": 491, "children": [], "start_point": {"row": 169, "column": 28}, "end_point": {"row": 169, "column": 30}}, {"id": 494, "type": "identifier", "text": "TXBUFSIZE", "parent": 491, "children": [], "start_point": {"row": 169, "column": 31}, "end_point": {"row": 169, "column": 40}}, {"id": 495, "type": "assignment_expression", "text": "comThead = 0", "parent": 489, "children": [496, 497, 498], "start_point": {"row": 170, "column": 20}, "end_point": {"row": 170, "column": 32}}, {"id": 496, "type": "identifier", "text": "comThead", "parent": 495, "children": [], "start_point": {"row": 170, "column": 20}, "end_point": {"row": 170, "column": 28}}, {"id": 497, "type": "=", "text": "=", "parent": 495, "children": [], "start_point": {"row": 170, "column": 29}, "end_point": {"row": 170, "column": 30}}, {"id": 498, "type": "number_literal", "text": "0", "parent": 495, "children": [], "start_point": {"row": 170, "column": 31}, "end_point": {"row": 170, "column": 32}}, {"id": 499, "type": "update_expression", "text": "comTbytes--", "parent": 472, "children": [500, 501], "start_point": {"row": 171, "column": 16}, "end_point": {"row": 171, "column": 27}}, {"id": 500, "type": "identifier", "text": "comTbytes", "parent": 499, "children": [], "start_point": {"row": 171, "column": 16}, "end_point": {"row": 171, "column": 25}}, {"id": 501, "type": "--", "text": "--", "parent": 499, "children": [], "start_point": {"row": 171, "column": 25}, "end_point": {"row": 171, "column": 27}}, {"id": 502, "type": "update_expression", "text": "size--", "parent": 472, "children": [503, 504], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 22}}, {"id": 503, "type": "identifier", "text": "size", "parent": 502, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 20}}, {"id": 504, "type": "--", "text": "--", "parent": 502, "children": [], "start_point": {"row": 172, "column": 20}, "end_point": {"row": 172, "column": 22}}, {"id": 505, "type": "else_clause", "text": "else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }", "parent": 455, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 179, "column": 9}}, {"id": 506, "type": "assignment_expression", "text": "UART0->INTEN &= ~UART_INTEN_THREIEN_Msk", "parent": 505, "children": [507, 510, 511], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 51}}, {"id": 507, "type": "field_expression", "text": "UART0->INTEN", "parent": 506, "children": [508, 509], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 24}}, {"id": 508, "type": "identifier", "text": "UART0", "parent": 507, "children": [], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 17}}, {"id": 509, "type": "field_identifier", "text": "INTEN", "parent": 507, "children": [], "start_point": {"row": 178, "column": 19}, "end_point": {"row": 178, "column": 24}}, {"id": 510, "type": "&=", "text": "&=", "parent": 506, "children": [], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 27}}, {"id": 511, "type": "unary_expression", "text": "~UART_INTEN_THREIEN_Msk", "parent": 506, "children": [512, 513], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 51}}, {"id": 512, "type": "~", "text": "~", "parent": 511, "children": [], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 29}}, {"id": 513, "type": "identifier", "text": "UART_INTEN_THREIEN_Msk", "parent": 511, "children": [], "start_point": {"row": 178, "column": 29}, "end_point": {"row": 178, "column": 51}}, {"id": 514, "type": "function_definition", "text": "void VCOM_TransferData(void)\n{\n int32_t i, i32Len;\n\n /* Check whether USB is ready for next packet or not*/\n if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }\n\n /* Process the Bulk out data when bulk out data is ready. */\n if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }\n\n /* Process the software Tx FIFO */\n if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }\n}", "parent": null, "children": [515, 516], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 262, "column": 1}}, {"id": 515, "type": "primitive_type", "text": "void", "parent": 514, "children": [], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 183, "column": 4}}, {"id": 516, "type": "function_declarator", "text": "VCOM_TransferData(void)", "parent": 514, "children": [517, 518], "start_point": {"row": 183, "column": 5}, "end_point": {"row": 183, "column": 28}}, {"id": 517, "type": "identifier", "text": "VCOM_TransferData", "parent": 516, "children": [], "start_point": {"row": 183, "column": 5}, "end_point": {"row": 183, "column": 22}}, {"id": 518, "type": "parameter_list", "text": "(void)", "parent": 516, "children": [519], "start_point": {"row": 183, "column": 22}, "end_point": {"row": 183, "column": 28}}, {"id": 519, "type": "parameter_declaration", "text": "void", "parent": 518, "children": [520], "start_point": {"row": 183, "column": 23}, "end_point": {"row": 183, "column": 27}}, {"id": 520, "type": "primitive_type", "text": "void", "parent": 519, "children": [], "start_point": {"row": 183, "column": 23}, "end_point": {"row": 183, "column": 27}}, {"id": 521, "type": "declaration", "text": "int32_t i, i32Len;", "parent": 514, "children": [522, 523, 524], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 22}}, {"id": 522, "type": "primitive_type", "text": "int32_t", "parent": 521, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 11}}, {"id": 523, "type": "identifier", "text": "i", "parent": 521, "children": [], "start_point": {"row": 185, "column": 12}, "end_point": {"row": 185, "column": 13}}, {"id": 524, "type": "identifier", "text": "i32Len", "parent": 521, "children": [], "start_point": {"row": 185, "column": 15}, "end_point": {"row": 185, "column": 21}}, {"id": 525, "type": "if_statement", "text": "if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }", "parent": 514, "children": [526], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 220, "column": 5}}, {"id": 526, "type": "parenthesized_expression", "text": "(gu32TxSize == 0)", "parent": 525, "children": [527], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 23}}, {"id": 527, "type": "binary_expression", "text": "gu32TxSize == 0", "parent": 526, "children": [528, 529, 530], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 22}}, {"id": 528, "type": "identifier", "text": "gu32TxSize", "parent": 527, "children": [], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 17}}, {"id": 529, "type": "==", "text": "==", "parent": 527, "children": [], "start_point": {"row": 188, "column": 18}, "end_point": {"row": 188, "column": 20}}, {"id": 530, "type": "number_literal", "text": "0", "parent": 527, "children": [], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 22}}, {"id": 531, "type": "if_statement", "text": "if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }", "parent": 525, "children": [532, 624], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 219, "column": 9}}, {"id": 532, "type": "parenthesized_expression", "text": "(comRbytes)", "parent": 531, "children": [533], "start_point": {"row": 191, "column": 10}, "end_point": {"row": 191, "column": 21}}, {"id": 533, "type": "identifier", "text": "comRbytes", "parent": 532, "children": [], "start_point": {"row": 191, "column": 11}, "end_point": {"row": 191, "column": 20}}, {"id": 534, "type": "assignment_expression", "text": "i32Len = comRbytes", "parent": 531, "children": [535, 536, 537], "start_point": {"row": 193, "column": 12}, "end_point": {"row": 193, "column": 30}}, {"id": 535, "type": "identifier", "text": "i32Len", "parent": 534, "children": [], "start_point": {"row": 193, "column": 12}, "end_point": {"row": 193, "column": 18}}, {"id": 536, "type": "=", "text": "=", "parent": 534, "children": [], "start_point": {"row": 193, "column": 19}, "end_point": {"row": 193, "column": 20}}, {"id": 537, "type": "identifier", "text": "comRbytes", "parent": 534, "children": [], "start_point": {"row": 193, "column": 21}, "end_point": {"row": 193, "column": 30}}, {"id": 538, "type": "if_statement", "text": "if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;", "parent": 531, "children": [539], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 195, "column": 42}}, {"id": 539, "type": "parenthesized_expression", "text": "(i32Len > EP2_MAX_PKT_SIZE)", "parent": 538, "children": [540], "start_point": {"row": 194, "column": 14}, "end_point": {"row": 194, "column": 41}}, {"id": 540, "type": "binary_expression", "text": "i32Len > EP2_MAX_PKT_SIZE", "parent": 539, "children": [541, 542, 543], "start_point": {"row": 194, "column": 15}, "end_point": {"row": 194, "column": 40}}, {"id": 541, "type": "identifier", "text": "i32Len", "parent": 540, "children": [], "start_point": {"row": 194, "column": 15}, "end_point": {"row": 194, "column": 21}}, {"id": 542, "type": ">", "text": ">", "parent": 540, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 23}}, {"id": 543, "type": "identifier", "text": "EP2_MAX_PKT_SIZE", "parent": 540, "children": [], "start_point": {"row": 194, "column": 24}, "end_point": {"row": 194, "column": 40}}, {"id": 544, "type": "assignment_expression", "text": "i32Len = EP2_MAX_PKT_SIZE", "parent": 538, "children": [545, 546, 547], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 41}}, {"id": 545, "type": "identifier", "text": "i32Len", "parent": 544, "children": [], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 22}}, {"id": 546, "type": "=", "text": "=", "parent": 544, "children": [], "start_point": {"row": 195, "column": 23}, "end_point": {"row": 195, "column": 24}}, {"id": 547, "type": "identifier", "text": "EP2_MAX_PKT_SIZE", "parent": 544, "children": [], "start_point": {"row": 195, "column": 25}, "end_point": {"row": 195, "column": 41}}, {"id": 548, "type": "for_statement", "text": "for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }", "parent": 531, "children": [549, 553, 557], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 202, "column": 13}}, {"id": 549, "type": "assignment_expression", "text": "i = 0", "parent": 548, "children": [550, 551, 552], "start_point": {"row": 197, "column": 16}, "end_point": {"row": 197, "column": 21}}, {"id": 550, "type": "identifier", "text": "i", "parent": 549, "children": [], "start_point": {"row": 197, "column": 16}, "end_point": {"row": 197, "column": 17}}, {"id": 551, "type": "=", "text": "=", "parent": 549, "children": [], "start_point": {"row": 197, "column": 18}, "end_point": {"row": 197, "column": 19}}, {"id": 552, "type": "number_literal", "text": "0", "parent": 549, "children": [], "start_point": {"row": 197, "column": 20}, "end_point": {"row": 197, "column": 21}}, {"id": 553, "type": "binary_expression", "text": "i < i32Len", "parent": 548, "children": [554, 555, 556], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 33}}, {"id": 554, "type": "identifier", "text": "i", "parent": 553, "children": [], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 24}}, {"id": 555, "type": "<", "text": "<", "parent": 553, "children": [], "start_point": {"row": 197, "column": 25}, "end_point": {"row": 197, "column": 26}}, {"id": 556, "type": "identifier", "text": "i32Len", "parent": 553, "children": [], "start_point": {"row": 197, "column": 27}, "end_point": {"row": 197, "column": 33}}, {"id": 557, "type": "update_expression", "text": "i++", "parent": 548, "children": [558, 559], "start_point": {"row": 197, "column": 35}, "end_point": {"row": 197, "column": 38}}, {"id": 558, "type": "identifier", "text": "i", "parent": 557, "children": [], "start_point": {"row": 197, "column": 35}, "end_point": {"row": 197, "column": 36}}, {"id": 559, "type": "++", "text": "++", "parent": 557, "children": [], "start_point": {"row": 197, "column": 36}, "end_point": {"row": 197, "column": 38}}, {"id": 560, "type": "assignment_expression", "text": "gRxBuf[i] = comRbuf[comRhead++]", "parent": 548, "children": [561, 564, 565], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 47}}, {"id": 561, "type": "subscript_expression", "text": "gRxBuf[i]", "parent": 560, "children": [562, 563], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 25}}, {"id": 562, "type": "identifier", "text": "gRxBuf", "parent": 561, "children": [], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 22}}, {"id": 563, "type": "identifier", "text": "i", "parent": 561, "children": [], "start_point": {"row": 199, "column": 23}, "end_point": {"row": 199, "column": 24}}, {"id": 564, "type": "=", "text": "=", "parent": 560, "children": [], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 27}}, {"id": 565, "type": "subscript_expression", "text": "comRbuf[comRhead++]", "parent": 560, "children": [566, 567], "start_point": {"row": 199, "column": 28}, "end_point": {"row": 199, "column": 47}}, {"id": 566, "type": "identifier", "text": "comRbuf", "parent": 565, "children": [], "start_point": {"row": 199, "column": 28}, "end_point": {"row": 199, "column": 35}}, {"id": 567, "type": "update_expression", "text": "comRhead++", "parent": 565, "children": [568, 569], "start_point": {"row": 199, "column": 36}, "end_point": {"row": 199, "column": 46}}, {"id": 568, "type": "identifier", "text": "comRhead", "parent": 567, "children": [], "start_point": {"row": 199, "column": 36}, "end_point": {"row": 199, "column": 44}}, {"id": 569, "type": "++", "text": "++", "parent": 567, "children": [], "start_point": {"row": 199, "column": 44}, "end_point": {"row": 199, "column": 46}}, {"id": 570, "type": "if_statement", "text": "if(comRhead >= RXBUFSIZE)\n comRhead = 0;", "parent": 548, "children": [571], "start_point": {"row": 200, "column": 16}, "end_point": {"row": 201, "column": 33}}, {"id": 571, "type": "parenthesized_expression", "text": "(comRhead >= RXBUFSIZE)", "parent": 570, "children": [572], "start_point": {"row": 200, "column": 18}, "end_point": {"row": 200, "column": 41}}, {"id": 572, "type": "binary_expression", "text": "comRhead >= RXBUFSIZE", "parent": 571, "children": [573, 574, 575], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 40}}, {"id": 573, "type": "identifier", "text": "comRhead", "parent": 572, "children": [], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 200, "column": 27}}, {"id": 574, "type": ">=", "text": ">=", "parent": 572, "children": [], "start_point": {"row": 200, "column": 28}, "end_point": {"row": 200, "column": 30}}, {"id": 575, "type": "identifier", "text": "RXBUFSIZE", "parent": 572, "children": [], "start_point": {"row": 200, "column": 31}, "end_point": {"row": 200, "column": 40}}, {"id": 576, "type": "assignment_expression", "text": "comRhead = 0", "parent": 570, "children": [577, 578, 579], "start_point": {"row": 201, "column": 20}, "end_point": {"row": 201, "column": 32}}, {"id": 577, "type": "identifier", "text": "comRhead", "parent": 576, "children": [], "start_point": {"row": 201, "column": 20}, "end_point": {"row": 201, "column": 28}}, {"id": 578, "type": "=", "text": "=", "parent": 576, "children": [], "start_point": {"row": 201, "column": 29}, "end_point": {"row": 201, "column": 30}}, {"id": 579, "type": "number_literal", "text": "0", "parent": 576, "children": [], "start_point": {"row": 201, "column": 31}, "end_point": {"row": 201, "column": 32}}, {"id": 580, "type": "call_expression", "text": "__set_PRIMASK(1)", "parent": 531, "children": [581, 582], "start_point": {"row": 204, "column": 12}, "end_point": {"row": 204, "column": 28}}, {"id": 581, "type": "identifier", "text": "__set_PRIMASK", "parent": 580, "children": [], "start_point": {"row": 204, "column": 12}, "end_point": {"row": 204, "column": 25}}, {"id": 582, "type": "argument_list", "text": "(1)", "parent": 580, "children": [583], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 28}}, {"id": 583, "type": "number_literal", "text": "1", "parent": 582, "children": [], "start_point": {"row": 204, "column": 26}, "end_point": {"row": 204, "column": 27}}, {"id": 584, "type": "assignment_expression", "text": "comRbytes -= i32Len", "parent": 531, "children": [585, 586, 587], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 31}}, {"id": 585, "type": "identifier", "text": "comRbytes", "parent": 584, "children": [], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 21}}, {"id": 586, "type": "-=", "text": "-=", "parent": 584, "children": [], "start_point": {"row": 205, "column": 22}, "end_point": {"row": 205, "column": 24}}, {"id": 587, "type": "identifier", "text": "i32Len", "parent": 584, "children": [], "start_point": {"row": 205, "column": 25}, "end_point": {"row": 205, "column": 31}}, {"id": 588, "type": "call_expression", "text": "__set_PRIMASK(0)", "parent": 531, "children": [589, 590], "start_point": {"row": 206, "column": 12}, "end_point": {"row": 206, "column": 28}}, {"id": 589, "type": "identifier", "text": "__set_PRIMASK", "parent": 588, "children": [], "start_point": {"row": 206, "column": 12}, "end_point": {"row": 206, "column": 25}}, {"id": 590, "type": "argument_list", "text": "(0)", "parent": 588, "children": [591], "start_point": {"row": 206, "column": 25}, "end_point": {"row": 206, "column": 28}}, {"id": 591, "type": "number_literal", "text": "0", "parent": 590, "children": [], "start_point": {"row": 206, "column": 26}, "end_point": {"row": 206, "column": 27}}, {"id": 592, "type": "assignment_expression", "text": "gu32TxSize = i32Len", "parent": 531, "children": [593, 594, 595], "start_point": {"row": 208, "column": 12}, "end_point": {"row": 208, "column": 31}}, {"id": 593, "type": "identifier", "text": "gu32TxSize", "parent": 592, "children": [], "start_point": {"row": 208, "column": 12}, "end_point": {"row": 208, "column": 22}}, {"id": 594, "type": "=", "text": "=", "parent": 592, "children": [], "start_point": {"row": 208, "column": 23}, "end_point": {"row": 208, "column": 24}}, {"id": 595, "type": "identifier", "text": "i32Len", "parent": 592, "children": [], "start_point": {"row": 208, "column": 25}, "end_point": {"row": 208, "column": 31}}, {"id": 596, "type": "call_expression", "text": "USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len)", "parent": 531, "children": [597, 598], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 107}}, {"id": 597, "type": "identifier", "text": "USBD_MemCopy", "parent": 596, "children": [], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 24}}, {"id": 598, "type": "argument_list", "text": "((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len)", "parent": 596, "children": [599, 612, 618], "start_point": {"row": 209, "column": 24}, "end_point": {"row": 209, "column": 107}}, {"id": 599, "type": "cast_expression", "text": "(uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2))", "parent": 598, "children": [600, 604], "start_point": {"row": 209, "column": 25}, "end_point": {"row": 209, "column": 79}}, {"id": 600, "type": "type_descriptor", "text": "uint8_t *", "parent": 599, "children": [601, 602], "start_point": {"row": 209, "column": 26}, "end_point": {"row": 209, "column": 35}}, {"id": 601, "type": "primitive_type", "text": "uint8_t", "parent": 600, "children": [], "start_point": {"row": 209, "column": 26}, "end_point": {"row": 209, "column": 33}}, {"id": 602, "type": "abstract_pointer_declarator", "text": "*", "parent": 600, "children": [603], "start_point": {"row": 209, "column": 34}, "end_point": {"row": 209, "column": 35}}, {"id": 603, "type": "*", "text": "*", "parent": 602, "children": [], "start_point": {"row": 209, "column": 34}, "end_point": {"row": 209, "column": 35}}, {"id": 604, "type": "parenthesized_expression", "text": "(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2))", "parent": 599, "children": [605], "start_point": {"row": 209, "column": 36}, "end_point": {"row": 209, "column": 79}}, {"id": 605, "type": "binary_expression", "text": "USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)", "parent": 604, "children": [606, 607, 608], "start_point": {"row": 209, "column": 37}, "end_point": {"row": 209, "column": 78}}, {"id": 606, "type": "identifier", "text": "USBD_BUF_BASE", "parent": 605, "children": [], "start_point": {"row": 209, "column": 37}, "end_point": {"row": 209, "column": 50}}, {"id": 607, "type": "+", "text": "+", "parent": 605, "children": [], "start_point": {"row": 209, "column": 51}, "end_point": {"row": 209, "column": 52}}, {"id": 608, "type": "call_expression", "text": "USBD_GET_EP_BUF_ADDR(EP2)", "parent": 605, "children": [609, 610], "start_point": {"row": 209, "column": 53}, "end_point": {"row": 209, "column": 78}}, {"id": 609, "type": "identifier", "text": "USBD_GET_EP_BUF_ADDR", "parent": 608, "children": [], "start_point": {"row": 209, "column": 53}, "end_point": {"row": 209, "column": 73}}, {"id": 610, "type": "argument_list", "text": "(EP2)", "parent": 608, "children": [611], "start_point": {"row": 209, "column": 73}, "end_point": {"row": 209, "column": 78}}, {"id": 611, "type": "identifier", "text": "EP2", "parent": 610, "children": [], "start_point": {"row": 209, "column": 74}, "end_point": {"row": 209, "column": 77}}, {"id": 612, "type": "cast_expression", "text": "(uint8_t *)gRxBuf", "parent": 598, "children": [613, 617], "start_point": {"row": 209, "column": 81}, "end_point": {"row": 209, "column": 98}}, {"id": 613, "type": "type_descriptor", "text": "uint8_t *", "parent": 612, "children": [614, 615], "start_point": {"row": 209, "column": 82}, "end_point": {"row": 209, "column": 91}}, {"id": 614, "type": "primitive_type", "text": "uint8_t", "parent": 613, "children": [], "start_point": {"row": 209, "column": 82}, "end_point": {"row": 209, "column": 89}}, {"id": 615, "type": "abstract_pointer_declarator", "text": "*", "parent": 613, "children": [616], "start_point": {"row": 209, "column": 90}, "end_point": {"row": 209, "column": 91}}, {"id": 616, "type": "*", "text": "*", "parent": 615, "children": [], "start_point": {"row": 209, "column": 90}, "end_point": {"row": 209, "column": 91}}, {"id": 617, "type": "identifier", "text": "gRxBuf", "parent": 612, "children": [], "start_point": {"row": 209, "column": 92}, "end_point": {"row": 209, "column": 98}}, {"id": 618, "type": "identifier", "text": "i32Len", "parent": 598, "children": [], "start_point": {"row": 209, "column": 100}, "end_point": {"row": 209, "column": 106}}, {"id": 619, "type": "call_expression", "text": "USBD_SET_PAYLOAD_LEN(EP2, i32Len)", "parent": 531, "children": [620, 621], "start_point": {"row": 210, "column": 12}, "end_point": {"row": 210, "column": 45}}, {"id": 620, "type": "identifier", "text": "USBD_SET_PAYLOAD_LEN", "parent": 619, "children": [], "start_point": {"row": 210, "column": 12}, "end_point": {"row": 210, "column": 32}}, {"id": 621, "type": "argument_list", "text": "(EP2, i32Len)", "parent": 619, "children": [622, 623], "start_point": {"row": 210, "column": 32}, "end_point": {"row": 210, "column": 45}}, {"id": 622, "type": "identifier", "text": "EP2", "parent": 621, "children": [], "start_point": {"row": 210, "column": 33}, "end_point": {"row": 210, "column": 36}}, {"id": 623, "type": "identifier", "text": "i32Len", "parent": 621, "children": [], "start_point": {"row": 210, "column": 38}, "end_point": {"row": 210, "column": 44}}, {"id": 624, "type": "else_clause", "text": "else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }", "parent": 531, "children": [], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 219, "column": 9}}, {"id": 625, "type": "assignment_expression", "text": "i32Len = USBD_GET_PAYLOAD_LEN(EP2)", "parent": 624, "children": [626, 627, 628], "start_point": {"row": 216, "column": 12}, "end_point": {"row": 216, "column": 46}}, {"id": 626, "type": "identifier", "text": "i32Len", "parent": 625, "children": [], "start_point": {"row": 216, "column": 12}, "end_point": {"row": 216, "column": 18}}, {"id": 627, "type": "=", "text": "=", "parent": 625, "children": [], "start_point": {"row": 216, "column": 19}, "end_point": {"row": 216, "column": 20}}, {"id": 628, "type": "call_expression", "text": "USBD_GET_PAYLOAD_LEN(EP2)", "parent": 625, "children": [629, 630], "start_point": {"row": 216, "column": 21}, "end_point": {"row": 216, "column": 46}}, {"id": 629, "type": "identifier", "text": "USBD_GET_PAYLOAD_LEN", "parent": 628, "children": [], "start_point": {"row": 216, "column": 21}, "end_point": {"row": 216, "column": 41}}, {"id": 630, "type": "argument_list", "text": "(EP2)", "parent": 628, "children": [631], "start_point": {"row": 216, "column": 41}, "end_point": {"row": 216, "column": 46}}, {"id": 631, "type": "identifier", "text": "EP2", "parent": 630, "children": [], "start_point": {"row": 216, "column": 42}, "end_point": {"row": 216, "column": 45}}, {"id": 632, "type": "if_statement", "text": "if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);", "parent": 624, "children": [633], "start_point": {"row": 217, "column": 12}, "end_point": {"row": 218, "column": 45}}, {"id": 633, "type": "parenthesized_expression", "text": "(i32Len == EP2_MAX_PKT_SIZE)", "parent": 632, "children": [634], "start_point": {"row": 217, "column": 14}, "end_point": {"row": 217, "column": 42}}, {"id": 634, "type": "binary_expression", "text": "i32Len == EP2_MAX_PKT_SIZE", "parent": 633, "children": [635, 636, 637], "start_point": {"row": 217, "column": 15}, "end_point": {"row": 217, "column": 41}}, {"id": 635, "type": "identifier", "text": "i32Len", "parent": 634, "children": [], "start_point": {"row": 217, "column": 15}, "end_point": {"row": 217, "column": 21}}, {"id": 636, "type": "==", "text": "==", "parent": 634, "children": [], "start_point": {"row": 217, "column": 22}, "end_point": {"row": 217, "column": 24}}, {"id": 637, "type": "identifier", "text": "EP2_MAX_PKT_SIZE", "parent": 634, "children": [], "start_point": {"row": 217, "column": 25}, "end_point": {"row": 217, "column": 41}}, {"id": 638, "type": "call_expression", "text": "USBD_SET_PAYLOAD_LEN(EP2, 0)", "parent": 632, "children": [639, 640], "start_point": {"row": 218, "column": 16}, "end_point": {"row": 218, "column": 44}}, {"id": 639, "type": "identifier", "text": "USBD_SET_PAYLOAD_LEN", "parent": 638, "children": [], "start_point": {"row": 218, "column": 16}, "end_point": {"row": 218, "column": 36}}, {"id": 640, "type": "argument_list", "text": "(EP2, 0)", "parent": 638, "children": [641, 642], "start_point": {"row": 218, "column": 36}, "end_point": {"row": 218, "column": 44}}, {"id": 641, "type": "identifier", "text": "EP2", "parent": 640, "children": [], "start_point": {"row": 218, "column": 37}, "end_point": {"row": 218, "column": 40}}, {"id": 642, "type": "number_literal", "text": "0", "parent": 640, "children": [], "start_point": {"row": 218, "column": 42}, "end_point": {"row": 218, "column": 43}}, {"id": 643, "type": "if_statement", "text": "if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }", "parent": 514, "children": [644], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 241, "column": 5}}, {"id": 644, "type": "parenthesized_expression", "text": "(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))", "parent": 643, "children": [645], "start_point": {"row": 223, "column": 6}, "end_point": {"row": 223, "column": 64}}, {"id": 645, "type": "binary_expression", "text": "gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes)", "parent": 644, "children": [646, 647, 648], "start_point": {"row": 223, "column": 7}, "end_point": {"row": 223, "column": 63}}, {"id": 646, "type": "identifier", "text": "gi8BulkOutReady", "parent": 645, "children": [], "start_point": {"row": 223, "column": 7}, "end_point": {"row": 223, "column": 22}}, {"id": 647, "type": "&&", "text": "&&", "parent": 645, "children": [], "start_point": {"row": 223, "column": 23}, "end_point": {"row": 223, "column": 25}}, {"id": 648, "type": "parenthesized_expression", "text": "(gu32RxSize <= TXBUFSIZE - comTbytes)", "parent": 645, "children": [649], "start_point": {"row": 223, "column": 26}, "end_point": {"row": 223, "column": 63}}, {"id": 649, "type": "binary_expression", "text": "gu32RxSize <= TXBUFSIZE - comTbytes", "parent": 648, "children": [650, 651, 652], "start_point": {"row": 223, "column": 27}, "end_point": {"row": 223, "column": 62}}, {"id": 650, "type": "identifier", "text": "gu32RxSize", "parent": 649, "children": [], "start_point": {"row": 223, "column": 27}, "end_point": {"row": 223, "column": 37}}, {"id": 651, "type": "<=", "text": "<=", "parent": 649, "children": [], "start_point": {"row": 223, "column": 38}, "end_point": {"row": 223, "column": 40}}, {"id": 652, "type": "binary_expression", "text": "TXBUFSIZE - comTbytes", "parent": 649, "children": [653, 654, 655], "start_point": {"row": 223, "column": 41}, "end_point": {"row": 223, "column": 62}}, {"id": 653, "type": "identifier", "text": "TXBUFSIZE", "parent": 652, "children": [], "start_point": {"row": 223, "column": 41}, "end_point": {"row": 223, "column": 50}}, {"id": 654, "type": "-", "text": "-", "parent": 652, "children": [], "start_point": {"row": 223, "column": 51}, "end_point": {"row": 223, "column": 52}}, {"id": 655, "type": "identifier", "text": "comTbytes", "parent": 652, "children": [], "start_point": {"row": 223, "column": 53}, "end_point": {"row": 223, "column": 62}}, {"id": 656, "type": "for_statement", "text": "for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }", "parent": 643, "children": [657, 661, 665], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 230, "column": 9}}, {"id": 657, "type": "assignment_expression", "text": "i = 0", "parent": 656, "children": [658, 659, 660], "start_point": {"row": 225, "column": 12}, "end_point": {"row": 225, "column": 17}}, {"id": 658, "type": "identifier", "text": "i", "parent": 657, "children": [], "start_point": {"row": 225, "column": 12}, "end_point": {"row": 225, "column": 13}}, {"id": 659, "type": "=", "text": "=", "parent": 657, "children": [], "start_point": {"row": 225, "column": 14}, "end_point": {"row": 225, "column": 15}}, {"id": 660, "type": "number_literal", "text": "0", "parent": 657, "children": [], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 17}}, {"id": 661, "type": "binary_expression", "text": "i < gu32RxSize", "parent": 656, "children": [662, 663, 664], "start_point": {"row": 225, "column": 19}, "end_point": {"row": 225, "column": 33}}, {"id": 662, "type": "identifier", "text": "i", "parent": 661, "children": [], "start_point": {"row": 225, "column": 19}, "end_point": {"row": 225, "column": 20}}, {"id": 663, "type": "<", "text": "<", "parent": 661, "children": [], "start_point": {"row": 225, "column": 21}, "end_point": {"row": 225, "column": 22}}, {"id": 664, "type": "identifier", "text": "gu32RxSize", "parent": 661, "children": [], "start_point": {"row": 225, "column": 23}, "end_point": {"row": 225, "column": 33}}, {"id": 665, "type": "update_expression", "text": "i++", "parent": 656, "children": [666, 667], "start_point": {"row": 225, "column": 35}, "end_point": {"row": 225, "column": 38}}, {"id": 666, "type": "identifier", "text": "i", "parent": 665, "children": [], "start_point": {"row": 225, "column": 35}, "end_point": {"row": 225, "column": 36}}, {"id": 667, "type": "++", "text": "++", "parent": 665, "children": [], "start_point": {"row": 225, "column": 36}, "end_point": {"row": 225, "column": 38}}, {"id": 668, "type": "assignment_expression", "text": "comTbuf[comTtail++] = gpu8RxBuf[i]", "parent": 656, "children": [669, 674, 675], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 46}}, {"id": 669, "type": "subscript_expression", "text": "comTbuf[comTtail++]", "parent": 668, "children": [670, 671], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 31}}, {"id": 670, "type": "identifier", "text": "comTbuf", "parent": 669, "children": [], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 19}}, {"id": 671, "type": "update_expression", "text": "comTtail++", "parent": 669, "children": [672, 673], "start_point": {"row": 227, "column": 20}, "end_point": {"row": 227, "column": 30}}, {"id": 672, "type": "identifier", "text": "comTtail", "parent": 671, "children": [], "start_point": {"row": 227, "column": 20}, "end_point": {"row": 227, "column": 28}}, {"id": 673, "type": "++", "text": "++", "parent": 671, "children": [], "start_point": {"row": 227, "column": 28}, "end_point": {"row": 227, "column": 30}}, {"id": 674, "type": "=", "text": "=", "parent": 668, "children": [], "start_point": {"row": 227, "column": 32}, "end_point": {"row": 227, "column": 33}}, {"id": 675, "type": "subscript_expression", "text": "gpu8RxBuf[i]", "parent": 668, "children": [676, 677], "start_point": {"row": 227, "column": 34}, "end_point": {"row": 227, "column": 46}}, {"id": 676, "type": "identifier", "text": "gpu8RxBuf", "parent": 675, "children": [], "start_point": {"row": 227, "column": 34}, "end_point": {"row": 227, "column": 43}}, {"id": 677, "type": "identifier", "text": "i", "parent": 675, "children": [], "start_point": {"row": 227, "column": 44}, "end_point": {"row": 227, "column": 45}}, {"id": 678, "type": "if_statement", "text": "if(comTtail >= TXBUFSIZE)\n comTtail = 0;", "parent": 656, "children": [679], "start_point": {"row": 228, "column": 12}, "end_point": {"row": 229, "column": 29}}, {"id": 679, "type": "parenthesized_expression", "text": "(comTtail >= TXBUFSIZE)", "parent": 678, "children": [680], "start_point": {"row": 228, "column": 14}, "end_point": {"row": 228, "column": 37}}, {"id": 680, "type": "binary_expression", "text": "comTtail >= TXBUFSIZE", "parent": 679, "children": [681, 682, 683], "start_point": {"row": 228, "column": 15}, "end_point": {"row": 228, "column": 36}}, {"id": 681, "type": "identifier", "text": "comTtail", "parent": 680, "children": [], "start_point": {"row": 228, "column": 15}, "end_point": {"row": 228, "column": 23}}, {"id": 682, "type": ">=", "text": ">=", "parent": 680, "children": [], "start_point": {"row": 228, "column": 24}, "end_point": {"row": 228, "column": 26}}, {"id": 683, "type": "identifier", "text": "TXBUFSIZE", "parent": 680, "children": [], "start_point": {"row": 228, "column": 27}, "end_point": {"row": 228, "column": 36}}, {"id": 684, "type": "assignment_expression", "text": "comTtail = 0", "parent": 678, "children": [685, 686, 687], "start_point": {"row": 229, "column": 16}, "end_point": {"row": 229, "column": 28}}, {"id": 685, "type": "identifier", "text": "comTtail", "parent": 684, "children": [], "start_point": {"row": 229, "column": 16}, "end_point": {"row": 229, "column": 24}}, {"id": 686, "type": "=", "text": "=", "parent": 684, "children": [], "start_point": {"row": 229, "column": 25}, "end_point": {"row": 229, "column": 26}}, {"id": 687, "type": "number_literal", "text": "0", "parent": 684, "children": [], "start_point": {"row": 229, "column": 27}, "end_point": {"row": 229, "column": 28}}, {"id": 688, "type": "call_expression", "text": "__set_PRIMASK(1)", "parent": 643, "children": [689, 690], "start_point": {"row": 232, "column": 8}, "end_point": {"row": 232, "column": 24}}, {"id": 689, "type": "identifier", "text": "__set_PRIMASK", "parent": 688, "children": [], "start_point": {"row": 232, "column": 8}, "end_point": {"row": 232, "column": 21}}, {"id": 690, "type": "argument_list", "text": "(1)", "parent": 688, "children": [691], "start_point": {"row": 232, "column": 21}, "end_point": {"row": 232, "column": 24}}, {"id": 691, "type": "number_literal", "text": "1", "parent": 690, "children": [], "start_point": {"row": 232, "column": 22}, "end_point": {"row": 232, "column": 23}}, {"id": 692, "type": "assignment_expression", "text": "comTbytes += gu32RxSize", "parent": 643, "children": [693, 694, 695], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 31}}, {"id": 693, "type": "identifier", "text": "comTbytes", "parent": 692, "children": [], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 17}}, {"id": 694, "type": "+=", "text": "+=", "parent": 692, "children": [], "start_point": {"row": 233, "column": 18}, "end_point": {"row": 233, "column": 20}}, {"id": 695, "type": "identifier", "text": "gu32RxSize", "parent": 692, "children": [], "start_point": {"row": 233, "column": 21}, "end_point": {"row": 233, "column": 31}}, {"id": 696, "type": "call_expression", "text": "__set_PRIMASK(0)", "parent": 643, "children": [697, 698], "start_point": {"row": 234, "column": 8}, "end_point": {"row": 234, "column": 24}}, {"id": 697, "type": "identifier", "text": "__set_PRIMASK", "parent": 696, "children": [], "start_point": {"row": 234, "column": 8}, "end_point": {"row": 234, "column": 21}}, {"id": 698, "type": "argument_list", "text": "(0)", "parent": 696, "children": [699], "start_point": {"row": 234, "column": 21}, "end_point": {"row": 234, "column": 24}}, {"id": 699, "type": "number_literal", "text": "0", "parent": 698, "children": [], "start_point": {"row": 234, "column": 22}, "end_point": {"row": 234, "column": 23}}, {"id": 700, "type": "assignment_expression", "text": "gu32RxSize = 0", "parent": 643, "children": [701, 702, 703], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 22}}, {"id": 701, "type": "identifier", "text": "gu32RxSize", "parent": 700, "children": [], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 18}}, {"id": 702, "type": "=", "text": "=", "parent": 700, "children": [], "start_point": {"row": 236, "column": 19}, "end_point": {"row": 236, "column": 20}}, {"id": 703, "type": "number_literal", "text": "0", "parent": 700, "children": [], "start_point": {"row": 236, "column": 21}, "end_point": {"row": 236, "column": 22}}, {"id": 704, "type": "assignment_expression", "text": "gi8BulkOutReady = 0", "parent": 643, "children": [705, 706, 707], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 27}}, {"id": 705, "type": "identifier", "text": "gi8BulkOutReady", "parent": 704, "children": [], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 23}}, {"id": 706, "type": "=", "text": "=", "parent": 704, "children": [], "start_point": {"row": 237, "column": 24}, "end_point": {"row": 237, "column": 25}}, {"id": 707, "type": "number_literal", "text": "0", "parent": 704, "children": [], "start_point": {"row": 237, "column": 26}, "end_point": {"row": 237, "column": 27}}, {"id": 708, "type": "call_expression", "text": "USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE)", "parent": 643, "children": [709, 710], "start_point": {"row": 240, "column": 8}, "end_point": {"row": 240, "column": 51}}, {"id": 709, "type": "identifier", "text": "USBD_SET_PAYLOAD_LEN", "parent": 708, "children": [], "start_point": {"row": 240, "column": 8}, "end_point": {"row": 240, "column": 28}}, {"id": 710, "type": "argument_list", "text": "(EP3, EP3_MAX_PKT_SIZE)", "parent": 708, "children": [711, 712], "start_point": {"row": 240, "column": 28}, "end_point": {"row": 240, "column": 51}}, {"id": 711, "type": "identifier", "text": "EP3", "parent": 710, "children": [], "start_point": {"row": 240, "column": 29}, "end_point": {"row": 240, "column": 32}}, {"id": 712, "type": "identifier", "text": "EP3_MAX_PKT_SIZE", "parent": 710, "children": [], "start_point": {"row": 240, "column": 34}, "end_point": {"row": 240, "column": 50}}, {"id": 713, "type": "if_statement", "text": "if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }", "parent": 514, "children": [714], "start_point": {"row": 244, "column": 4}, "end_point": {"row": 261, "column": 5}}, {"id": 714, "type": "parenthesized_expression", "text": "(comTbytes)", "parent": 713, "children": [715], "start_point": {"row": 244, "column": 6}, "end_point": {"row": 244, "column": 17}}, {"id": 715, "type": "identifier", "text": "comTbytes", "parent": 714, "children": [], "start_point": {"row": 244, "column": 7}, "end_point": {"row": 244, "column": 16}}, {"id": 716, "type": "if_statement", "text": "if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }", "parent": 713, "children": [717], "start_point": {"row": 247, "column": 8}, "end_point": {"row": 260, "column": 9}}, {"id": 717, "type": "parenthesized_expression", "text": "((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)", "parent": 716, "children": [718], "start_point": {"row": 247, "column": 10}, "end_point": {"row": 247, "column": 56}}, {"id": 718, "type": "binary_expression", "text": "(UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0", "parent": 717, "children": [719, 725, 726], "start_point": {"row": 247, "column": 11}, "end_point": {"row": 247, "column": 55}}, {"id": 719, "type": "parenthesized_expression", "text": "(UART0->INTEN & UART_INTEN_THREIEN_Msk)", "parent": 718, "children": [720], "start_point": {"row": 247, "column": 11}, "end_point": {"row": 247, "column": 50}}, {"id": 720, "type": "binary_expression", "text": "UART0->INTEN & UART_INTEN_THREIEN_Msk", "parent": 719, "children": [721, 724], "start_point": {"row": 247, "column": 12}, "end_point": {"row": 247, "column": 49}}, {"id": 721, "type": "field_expression", "text": "UART0->INTEN", "parent": 720, "children": [722, 723], "start_point": {"row": 247, "column": 12}, "end_point": {"row": 247, "column": 24}}, {"id": 722, "type": "identifier", "text": "UART0", "parent": 721, "children": [], "start_point": {"row": 247, "column": 12}, "end_point": {"row": 247, "column": 17}}, {"id": 723, "type": "field_identifier", "text": "INTEN", "parent": 721, "children": [], "start_point": {"row": 247, "column": 19}, "end_point": {"row": 247, "column": 24}}, {"id": 724, "type": "identifier", "text": "UART_INTEN_THREIEN_Msk", "parent": 720, "children": [], "start_point": {"row": 247, "column": 27}, "end_point": {"row": 247, "column": 49}}, {"id": 725, "type": "==", "text": "==", "parent": 718, "children": [], "start_point": {"row": 247, "column": 51}, "end_point": {"row": 247, "column": 53}}, {"id": 726, "type": "number_literal", "text": "0", "parent": 718, "children": [], "start_point": {"row": 247, "column": 54}, "end_point": {"row": 247, "column": 55}}, {"id": 727, "type": "assignment_expression", "text": "UART0->DAT = comTbuf[comThead++]", "parent": 716, "children": [728, 731, 732], "start_point": {"row": 250, "column": 12}, "end_point": {"row": 250, "column": 44}}, {"id": 728, "type": "field_expression", "text": "UART0->DAT", "parent": 727, "children": [729, 730], "start_point": {"row": 250, "column": 12}, "end_point": {"row": 250, "column": 22}}, {"id": 729, "type": "identifier", "text": "UART0", "parent": 728, "children": [], "start_point": {"row": 250, "column": 12}, "end_point": {"row": 250, "column": 17}}, {"id": 730, "type": "field_identifier", "text": "DAT", "parent": 728, "children": [], "start_point": {"row": 250, "column": 19}, "end_point": {"row": 250, "column": 22}}, {"id": 731, "type": "=", "text": "=", "parent": 727, "children": [], "start_point": {"row": 250, "column": 23}, "end_point": {"row": 250, "column": 24}}, {"id": 732, "type": "subscript_expression", "text": "comTbuf[comThead++]", "parent": 727, "children": [733, 734], "start_point": {"row": 250, "column": 25}, "end_point": {"row": 250, "column": 44}}, {"id": 733, "type": "identifier", "text": "comTbuf", "parent": 732, "children": [], "start_point": {"row": 250, "column": 25}, "end_point": {"row": 250, "column": 32}}, {"id": 734, "type": "update_expression", "text": "comThead++", "parent": 732, "children": [735, 736], "start_point": {"row": 250, "column": 33}, "end_point": {"row": 250, "column": 43}}, {"id": 735, "type": "identifier", "text": "comThead", "parent": 734, "children": [], "start_point": {"row": 250, "column": 33}, "end_point": {"row": 250, "column": 41}}, {"id": 736, "type": "++", "text": "++", "parent": 734, "children": [], "start_point": {"row": 250, "column": 41}, "end_point": {"row": 250, "column": 43}}, {"id": 737, "type": "if_statement", "text": "if(comThead >= TXBUFSIZE)\n comThead = 0;", "parent": 716, "children": [738], "start_point": {"row": 251, "column": 12}, "end_point": {"row": 252, "column": 29}}, {"id": 738, "type": "parenthesized_expression", "text": "(comThead >= TXBUFSIZE)", "parent": 737, "children": [739], "start_point": {"row": 251, "column": 14}, "end_point": {"row": 251, "column": 37}}, {"id": 739, "type": "binary_expression", "text": "comThead >= TXBUFSIZE", "parent": 738, "children": [740, 741, 742], "start_point": {"row": 251, "column": 15}, "end_point": {"row": 251, "column": 36}}, {"id": 740, "type": "identifier", "text": "comThead", "parent": 739, "children": [], "start_point": {"row": 251, "column": 15}, "end_point": {"row": 251, "column": 23}}, {"id": 741, "type": ">=", "text": ">=", "parent": 739, "children": [], "start_point": {"row": 251, "column": 24}, "end_point": {"row": 251, "column": 26}}, {"id": 742, "type": "identifier", "text": "TXBUFSIZE", "parent": 739, "children": [], "start_point": {"row": 251, "column": 27}, "end_point": {"row": 251, "column": 36}}, {"id": 743, "type": "assignment_expression", "text": "comThead = 0", "parent": 737, "children": [744, 745, 746], "start_point": {"row": 252, "column": 16}, "end_point": {"row": 252, "column": 28}}, {"id": 744, "type": "identifier", "text": "comThead", "parent": 743, "children": [], "start_point": {"row": 252, "column": 16}, "end_point": {"row": 252, "column": 24}}, {"id": 745, "type": "=", "text": "=", "parent": 743, "children": [], "start_point": {"row": 252, "column": 25}, "end_point": {"row": 252, "column": 26}}, {"id": 746, "type": "number_literal", "text": "0", "parent": 743, "children": [], "start_point": {"row": 252, "column": 27}, "end_point": {"row": 252, "column": 28}}, {"id": 747, "type": "call_expression", "text": "__set_PRIMASK(1)", "parent": 716, "children": [748, 749], "start_point": {"row": 254, "column": 12}, "end_point": {"row": 254, "column": 28}}, {"id": 748, "type": "identifier", "text": "__set_PRIMASK", "parent": 747, "children": [], "start_point": {"row": 254, "column": 12}, "end_point": {"row": 254, "column": 25}}, {"id": 749, "type": "argument_list", "text": "(1)", "parent": 747, "children": [750], "start_point": {"row": 254, "column": 25}, "end_point": {"row": 254, "column": 28}}, {"id": 750, "type": "number_literal", "text": "1", "parent": 749, "children": [], "start_point": {"row": 254, "column": 26}, "end_point": {"row": 254, "column": 27}}, {"id": 751, "type": "update_expression", "text": "comTbytes--", "parent": 716, "children": [752, 753], "start_point": {"row": 255, "column": 12}, "end_point": {"row": 255, "column": 23}}, {"id": 752, "type": "identifier", "text": "comTbytes", "parent": 751, "children": [], "start_point": {"row": 255, "column": 12}, "end_point": {"row": 255, "column": 21}}, {"id": 753, "type": "--", "text": "--", "parent": 751, "children": [], "start_point": {"row": 255, "column": 21}, "end_point": {"row": 255, "column": 23}}, {"id": 754, "type": "call_expression", "text": "__set_PRIMASK(0)", "parent": 716, "children": [755, 756], "start_point": {"row": 256, "column": 12}, "end_point": {"row": 256, "column": 28}}, {"id": 755, "type": "identifier", "text": "__set_PRIMASK", "parent": 754, "children": [], "start_point": {"row": 256, "column": 12}, "end_point": {"row": 256, "column": 25}}, {"id": 756, "type": "argument_list", "text": "(0)", "parent": 754, "children": [757], "start_point": {"row": 256, "column": 25}, "end_point": {"row": 256, "column": 28}}, {"id": 757, "type": "number_literal", "text": "0", "parent": 756, "children": [], "start_point": {"row": 256, "column": 26}, "end_point": {"row": 256, "column": 27}}, {"id": 758, "type": "assignment_expression", "text": "UART0->INTEN |= UART_INTEN_THREIEN_Msk", "parent": 716, "children": [759, 762, 763], "start_point": {"row": 259, "column": 12}, "end_point": {"row": 259, "column": 50}}, {"id": 759, "type": "field_expression", "text": "UART0->INTEN", "parent": 758, "children": [760, 761], "start_point": {"row": 259, "column": 12}, "end_point": {"row": 259, "column": 24}}, {"id": 760, "type": "identifier", "text": "UART0", "parent": 759, "children": [], "start_point": {"row": 259, "column": 12}, "end_point": {"row": 259, "column": 17}}, {"id": 761, "type": "field_identifier", "text": "INTEN", "parent": 759, "children": [], "start_point": {"row": 259, "column": 19}, "end_point": {"row": 259, "column": 24}}, {"id": 762, "type": "|=", "text": "|=", "parent": 758, "children": [], "start_point": {"row": 259, "column": 25}, "end_point": {"row": 259, "column": 27}}, {"id": 763, "type": "identifier", "text": "UART_INTEN_THREIEN_Msk", "parent": 758, "children": [], "start_point": {"row": 259, "column": 28}, "end_point": {"row": 259, "column": 50}}, {"id": 764, "type": "function_definition", "text": "int32_t main (void)\n{\n uint32_t u32TrimInit;\n uint32_t au32Config[2];\n\n SYS_Init();\n UART0_Init();\n\n SYS_UnlockReg();\n\n /* Enable FMC ISP function */\n FMC_Open();\n\n /* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */\n if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;\n\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf(\"Error: Program Config Failed!\\n\");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }\n\n USBD_Open(&gsInfo, VCOM_ClassRequest, NULL);\n USBD_SetConfigCallback(MSC_SetConfig);\n /* Endpoint configuration */\n VCOM_Init();\n USBD_Start();\n\n SYS_UnlockReg();\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }\n NVIC_EnableIRQ(UART0_IRQn);\n NVIC_EnableIRQ(USBD_IRQn);\n\n while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }\n}", "parent": null, "children": [765, 766], "start_point": {"row": 265, "column": 0}, "end_point": {"row": 361, "column": 1}}, {"id": 765, "type": "primitive_type", "text": "int32_t", "parent": 764, "children": [], "start_point": {"row": 265, "column": 0}, "end_point": {"row": 265, "column": 7}}, {"id": 766, "type": "function_declarator", "text": "main (void)", "parent": 764, "children": [767, 768], "start_point": {"row": 265, "column": 8}, "end_point": {"row": 265, "column": 19}}, {"id": 767, "type": "identifier", "text": "main", "parent": 766, "children": [], "start_point": {"row": 265, "column": 8}, "end_point": {"row": 265, "column": 12}}, {"id": 768, "type": "parameter_list", "text": "(void)", "parent": 766, "children": [769], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 19}}, {"id": 769, "type": "parameter_declaration", "text": "void", "parent": 768, "children": [770], "start_point": {"row": 265, "column": 14}, "end_point": {"row": 265, "column": 18}}, {"id": 770, "type": "primitive_type", "text": "void", "parent": 769, "children": [], "start_point": {"row": 265, "column": 14}, "end_point": {"row": 265, "column": 18}}, {"id": 771, "type": "declaration", "text": "uint32_t u32TrimInit;", "parent": 764, "children": [772, 773], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 25}}, {"id": 772, "type": "primitive_type", "text": "uint32_t", "parent": 771, "children": [], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 12}}, {"id": 773, "type": "identifier", "text": "u32TrimInit", "parent": 771, "children": [], "start_point": {"row": 267, "column": 13}, "end_point": {"row": 267, "column": 24}}, {"id": 774, "type": "declaration", "text": "uint32_t au32Config[2];", "parent": 764, "children": [775, 776], "start_point": {"row": 268, "column": 4}, "end_point": {"row": 268, "column": 27}}, {"id": 775, "type": "primitive_type", "text": "uint32_t", "parent": 774, "children": [], "start_point": {"row": 268, "column": 4}, "end_point": {"row": 268, "column": 12}}, {"id": 776, "type": "array_declarator", "text": "au32Config[2]", "parent": 774, "children": [777, 778], "start_point": {"row": 268, "column": 13}, "end_point": {"row": 268, "column": 26}}, {"id": 777, "type": "identifier", "text": "au32Config", "parent": 776, "children": [], "start_point": {"row": 268, "column": 13}, "end_point": {"row": 268, "column": 23}}, {"id": 778, "type": "number_literal", "text": "2", "parent": 776, "children": [], "start_point": {"row": 268, "column": 24}, "end_point": {"row": 268, "column": 25}}, {"id": 779, "type": "call_expression", "text": "SYS_Init()", "parent": 764, "children": [780, 781], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 14}}, {"id": 780, "type": "identifier", "text": "SYS_Init", "parent": 779, "children": [], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 12}}, {"id": 781, "type": "argument_list", "text": "()", "parent": 779, "children": [], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 14}}, {"id": 782, "type": "call_expression", "text": "UART0_Init()", "parent": 764, "children": [783, 784], "start_point": {"row": 271, "column": 4}, "end_point": {"row": 271, "column": 16}}, {"id": 783, "type": "identifier", "text": "UART0_Init", "parent": 782, "children": [], "start_point": {"row": 271, "column": 4}, "end_point": {"row": 271, "column": 14}}, {"id": 784, "type": "argument_list", "text": "()", "parent": 782, "children": [], "start_point": {"row": 271, "column": 14}, "end_point": {"row": 271, "column": 16}}, {"id": 785, "type": "call_expression", "text": "SYS_UnlockReg()", "parent": 764, "children": [786, 787], "start_point": {"row": 273, "column": 4}, "end_point": {"row": 273, "column": 19}}, {"id": 786, "type": "identifier", "text": "SYS_UnlockReg", "parent": 785, "children": [], "start_point": {"row": 273, "column": 4}, "end_point": {"row": 273, "column": 17}}, {"id": 787, "type": "argument_list", "text": "()", "parent": 785, "children": [], "start_point": {"row": 273, "column": 17}, "end_point": {"row": 273, "column": 19}}, {"id": 788, "type": "call_expression", "text": "FMC_Open()", "parent": 764, "children": [789, 790], "start_point": {"row": 276, "column": 4}, "end_point": {"row": 276, "column": 14}}, {"id": 789, "type": "identifier", "text": "FMC_Open", "parent": 788, "children": [], "start_point": {"row": 276, "column": 4}, "end_point": {"row": 276, "column": 12}}, {"id": 790, "type": "argument_list", "text": "()", "parent": 788, "children": [], "start_point": {"row": 276, "column": 12}, "end_point": {"row": 276, "column": 14}}, {"id": 791, "type": "if_statement", "text": "if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;", "parent": 764, "children": [792, 801], "start_point": {"row": 279, "column": 4}, "end_point": {"row": 280, "column": 18}}, {"id": 792, "type": "parenthesized_expression", "text": "(FMC_ReadConfig(au32Config, 2) < 0)", "parent": 791, "children": [793], "start_point": {"row": 279, "column": 7}, "end_point": {"row": 279, "column": 42}}, {"id": 793, "type": "binary_expression", "text": "FMC_ReadConfig(au32Config, 2) < 0", "parent": 792, "children": [794, 799, 800], "start_point": {"row": 279, "column": 8}, "end_point": {"row": 279, "column": 41}}, {"id": 794, "type": "call_expression", "text": "FMC_ReadConfig(au32Config, 2)", "parent": 793, "children": [795, 796], "start_point": {"row": 279, "column": 8}, "end_point": {"row": 279, "column": 37}}, {"id": 795, "type": "identifier", "text": "FMC_ReadConfig", "parent": 794, "children": [], "start_point": {"row": 279, "column": 8}, "end_point": {"row": 279, "column": 22}}, {"id": 796, "type": "argument_list", "text": "(au32Config, 2)", "parent": 794, "children": [797, 798], "start_point": {"row": 279, "column": 22}, "end_point": {"row": 279, "column": 37}}, {"id": 797, "type": "identifier", "text": "au32Config", "parent": 796, "children": [], "start_point": {"row": 279, "column": 23}, "end_point": {"row": 279, "column": 33}}, {"id": 798, "type": "number_literal", "text": "2", "parent": 796, "children": [], "start_point": {"row": 279, "column": 35}, "end_point": {"row": 279, "column": 36}}, {"id": 799, "type": "<", "text": "<", "parent": 793, "children": [], "start_point": {"row": 279, "column": 38}, "end_point": {"row": 279, "column": 39}}, {"id": 800, "type": "number_literal", "text": "0", "parent": 793, "children": [], "start_point": {"row": 279, "column": 40}, "end_point": {"row": 279, "column": 41}}, {"id": 801, "type": "return_statement", "text": "return -1;", "parent": 791, "children": [802], "start_point": {"row": 280, "column": 8}, "end_point": {"row": 280, "column": 18}}, {"id": 802, "type": "number_literal", "text": "-1", "parent": 801, "children": [], "start_point": {"row": 280, "column": 15}, "end_point": {"row": 280, "column": 17}}, {"id": 803, "type": "if_statement", "text": "if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf(\"Error: Program Config Failed!\\n\");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }", "parent": 764, "children": [804], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 302, "column": 5}}, {"id": 804, "type": "parenthesized_expression", "text": "(((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )", "parent": 803, "children": [805], "start_point": {"row": 282, "column": 7}, "end_point": {"row": 282, "column": 77}}, {"id": 805, "type": "binary_expression", "text": "((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE)", "parent": 804, "children": [806, 816, 817], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 75}}, {"id": 806, "type": "parenthesized_expression", "text": "((au32Config[0] & 0x01) == 1)", "parent": 805, "children": [807], "start_point": {"row": 282, "column": 8}, "end_point": {"row": 282, "column": 37}}, {"id": 807, "type": "binary_expression", "text": "(au32Config[0] & 0x01) == 1", "parent": 806, "children": [808, 814, 815], "start_point": {"row": 282, "column": 9}, "end_point": {"row": 282, "column": 36}}, {"id": 808, "type": "parenthesized_expression", "text": "(au32Config[0] & 0x01)", "parent": 807, "children": [809], "start_point": {"row": 282, "column": 9}, "end_point": {"row": 282, "column": 31}}, {"id": 809, "type": "binary_expression", "text": "au32Config[0] & 0x01", "parent": 808, "children": [810, 813], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 30}}, {"id": 810, "type": "subscript_expression", "text": "au32Config[0]", "parent": 809, "children": [811, 812], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 23}}, {"id": 811, "type": "identifier", "text": "au32Config", "parent": 810, "children": [], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 20}}, {"id": 812, "type": "number_literal", "text": "0", "parent": 810, "children": [], "start_point": {"row": 282, "column": 21}, "end_point": {"row": 282, "column": 22}}, {"id": 813, "type": "number_literal", "text": "0x01", "parent": 809, "children": [], "start_point": {"row": 282, "column": 26}, "end_point": {"row": 282, "column": 30}}, {"id": 814, "type": "==", "text": "==", "parent": 807, "children": [], "start_point": {"row": 282, "column": 32}, "end_point": {"row": 282, "column": 34}}, {"id": 815, "type": "number_literal", "text": "1", "parent": 807, "children": [], "start_point": {"row": 282, "column": 35}, "end_point": {"row": 282, "column": 36}}, {"id": 816, "type": "||", "text": "||", "parent": 805, "children": [], "start_point": {"row": 282, "column": 38}, "end_point": {"row": 282, "column": 40}}, {"id": 817, "type": "parenthesized_expression", "text": "(au32Config[1] != DATA_FLASH_BASE)", "parent": 805, "children": [818], "start_point": {"row": 282, "column": 41}, "end_point": {"row": 282, "column": 75}}, {"id": 818, "type": "binary_expression", "text": "au32Config[1] != DATA_FLASH_BASE", "parent": 817, "children": [819, 822, 823], "start_point": {"row": 282, "column": 42}, "end_point": {"row": 282, "column": 74}}, {"id": 819, "type": "subscript_expression", "text": "au32Config[1]", "parent": 818, "children": [820, 821], "start_point": {"row": 282, "column": 42}, "end_point": {"row": 282, "column": 55}}, {"id": 820, "type": "identifier", "text": "au32Config", "parent": 819, "children": [], "start_point": {"row": 282, "column": 42}, "end_point": {"row": 282, "column": 52}}, {"id": 821, "type": "number_literal", "text": "1", "parent": 819, "children": [], "start_point": {"row": 282, "column": 53}, "end_point": {"row": 282, "column": 54}}, {"id": 822, "type": "!=", "text": "!=", "parent": 818, "children": [], "start_point": {"row": 282, "column": 56}, "end_point": {"row": 282, "column": 58}}, {"id": 823, "type": "identifier", "text": "DATA_FLASH_BASE", "parent": 818, "children": [], "start_point": {"row": 282, "column": 59}, "end_point": {"row": 282, "column": 74}}, {"id": 824, "type": "call_expression", "text": "FMC_ENABLE_CFG_UPDATE()", "parent": 803, "children": [825, 826], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 31}}, {"id": 825, "type": "identifier", "text": "FMC_ENABLE_CFG_UPDATE", "parent": 824, "children": [], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 29}}, {"id": 826, "type": "argument_list", "text": "()", "parent": 824, "children": [], "start_point": {"row": 284, "column": 29}, "end_point": {"row": 284, "column": 31}}, {"id": 827, "type": "assignment_expression", "text": "au32Config[0] &= ~0x1", "parent": 803, "children": [828, 831, 832], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 29}}, {"id": 828, "type": "subscript_expression", "text": "au32Config[0]", "parent": 827, "children": [829, 830], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 21}}, {"id": 829, "type": "identifier", "text": "au32Config", "parent": 828, "children": [], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 18}}, {"id": 830, "type": "number_literal", "text": "0", "parent": 828, "children": [], "start_point": {"row": 285, "column": 19}, "end_point": {"row": 285, "column": 20}}, {"id": 831, "type": "&=", "text": "&=", "parent": 827, "children": [], "start_point": {"row": 285, "column": 22}, "end_point": {"row": 285, "column": 24}}, {"id": 832, "type": "unary_expression", "text": "~0x1", "parent": 827, "children": [833, 834], "start_point": {"row": 285, "column": 25}, "end_point": {"row": 285, "column": 29}}, {"id": 833, "type": "~", "text": "~", "parent": 832, "children": [], "start_point": {"row": 285, "column": 25}, "end_point": {"row": 285, "column": 26}}, {"id": 834, "type": "number_literal", "text": "0x1", "parent": 832, "children": [], "start_point": {"row": 285, "column": 26}, "end_point": {"row": 285, "column": 29}}, {"id": 835, "type": "assignment_expression", "text": "au32Config[1] = DATA_FLASH_BASE", "parent": 803, "children": [836, 839, 840], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 39}}, {"id": 836, "type": "subscript_expression", "text": "au32Config[1]", "parent": 835, "children": [837, 838], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 21}}, {"id": 837, "type": "identifier", "text": "au32Config", "parent": 836, "children": [], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 18}}, {"id": 838, "type": "number_literal", "text": "1", "parent": 836, "children": [], "start_point": {"row": 286, "column": 19}, "end_point": {"row": 286, "column": 20}}, {"id": 839, "type": "=", "text": "=", "parent": 835, "children": [], "start_point": {"row": 286, "column": 22}, "end_point": {"row": 286, "column": 23}}, {"id": 840, "type": "identifier", "text": "DATA_FLASH_BASE", "parent": 835, "children": [], "start_point": {"row": 286, "column": 24}, "end_point": {"row": 286, "column": 39}}, {"id": 841, "type": "if_statement", "text": "if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;", "parent": 803, "children": [842, 851], "start_point": {"row": 287, "column": 8}, "end_point": {"row": 288, "column": 22}}, {"id": 842, "type": "parenthesized_expression", "text": "(FMC_WriteConfig(au32Config, 2) < 0)", "parent": 841, "children": [843], "start_point": {"row": 287, "column": 11}, "end_point": {"row": 287, "column": 47}}, {"id": 843, "type": "binary_expression", "text": "FMC_WriteConfig(au32Config, 2) < 0", "parent": 842, "children": [844, 849, 850], "start_point": {"row": 287, "column": 12}, "end_point": {"row": 287, "column": 46}}, {"id": 844, "type": "call_expression", "text": "FMC_WriteConfig(au32Config, 2)", "parent": 843, "children": [845, 846], "start_point": {"row": 287, "column": 12}, "end_point": {"row": 287, "column": 42}}, {"id": 845, "type": "identifier", "text": "FMC_WriteConfig", "parent": 844, "children": [], "start_point": {"row": 287, "column": 12}, "end_point": {"row": 287, "column": 27}}, {"id": 846, "type": "argument_list", "text": "(au32Config, 2)", "parent": 844, "children": [847, 848], "start_point": {"row": 287, "column": 27}, "end_point": {"row": 287, "column": 42}}, {"id": 847, "type": "identifier", "text": "au32Config", "parent": 846, "children": [], "start_point": {"row": 287, "column": 28}, "end_point": {"row": 287, "column": 38}}, {"id": 848, "type": "number_literal", "text": "2", "parent": 846, "children": [], "start_point": {"row": 287, "column": 40}, "end_point": {"row": 287, "column": 41}}, {"id": 849, "type": "<", "text": "<", "parent": 843, "children": [], "start_point": {"row": 287, "column": 43}, "end_point": {"row": 287, "column": 44}}, {"id": 850, "type": "number_literal", "text": "0", "parent": 843, "children": [], "start_point": {"row": 287, "column": 45}, "end_point": {"row": 287, "column": 46}}, {"id": 851, "type": "return_statement", "text": "return -1;", "parent": 841, "children": [852], "start_point": {"row": 288, "column": 12}, "end_point": {"row": 288, "column": 22}}, {"id": 852, "type": "number_literal", "text": "-1", "parent": 851, "children": [], "start_point": {"row": 288, "column": 19}, "end_point": {"row": 288, "column": 21}}, {"id": 853, "type": "call_expression", "text": "FMC_ReadConfig(au32Config, 2)", "parent": 803, "children": [854, 855], "start_point": {"row": 290, "column": 8}, "end_point": {"row": 290, "column": 37}}, {"id": 854, "type": "identifier", "text": "FMC_ReadConfig", "parent": 853, "children": [], "start_point": {"row": 290, "column": 8}, "end_point": {"row": 290, "column": 22}}, {"id": 855, "type": "argument_list", "text": "(au32Config, 2)", "parent": 853, "children": [856, 857], "start_point": {"row": 290, "column": 22}, "end_point": {"row": 290, "column": 37}}, {"id": 856, "type": "identifier", "text": "au32Config", "parent": 855, "children": [], "start_point": {"row": 290, "column": 23}, "end_point": {"row": 290, "column": 33}}, {"id": 857, "type": "number_literal", "text": "2", "parent": 855, "children": [], "start_point": {"row": 290, "column": 35}, "end_point": {"row": 290, "column": 36}}, {"id": 858, "type": "if_statement", "text": "if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf(\"Error: Program Config Failed!\\n\");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }", "parent": 803, "children": [859], "start_point": {"row": 291, "column": 8}, "end_point": {"row": 298, "column": 9}}, {"id": 859, "type": "parenthesized_expression", "text": "(((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))", "parent": 858, "children": [860], "start_point": {"row": 291, "column": 11}, "end_point": {"row": 291, "column": 80}}, {"id": 860, "type": "binary_expression", "text": "((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE)", "parent": 859, "children": [861, 871, 872], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 79}}, {"id": 861, "type": "parenthesized_expression", "text": "((au32Config[0] & 0x01) == 1)", "parent": 860, "children": [862], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 41}}, {"id": 862, "type": "binary_expression", "text": "(au32Config[0] & 0x01) == 1", "parent": 861, "children": [863, 869, 870], "start_point": {"row": 291, "column": 13}, "end_point": {"row": 291, "column": 40}}, {"id": 863, "type": "parenthesized_expression", "text": "(au32Config[0] & 0x01)", "parent": 862, "children": [864], "start_point": {"row": 291, "column": 13}, "end_point": {"row": 291, "column": 35}}, {"id": 864, "type": "binary_expression", "text": "au32Config[0] & 0x01", "parent": 863, "children": [865, 868], "start_point": {"row": 291, "column": 14}, "end_point": {"row": 291, "column": 34}}, {"id": 865, "type": "subscript_expression", "text": "au32Config[0]", "parent": 864, "children": [866, 867], "start_point": {"row": 291, "column": 14}, "end_point": {"row": 291, "column": 27}}, {"id": 866, "type": "identifier", "text": "au32Config", "parent": 865, "children": [], "start_point": {"row": 291, "column": 14}, "end_point": {"row": 291, "column": 24}}, {"id": 867, "type": "number_literal", "text": "0", "parent": 865, "children": [], "start_point": {"row": 291, "column": 25}, "end_point": {"row": 291, "column": 26}}, {"id": 868, "type": "number_literal", "text": "0x01", "parent": 864, "children": [], "start_point": {"row": 291, "column": 30}, "end_point": {"row": 291, "column": 34}}, {"id": 869, "type": "==", "text": "==", "parent": 862, "children": [], "start_point": {"row": 291, "column": 36}, "end_point": {"row": 291, "column": 38}}, {"id": 870, "type": "number_literal", "text": "1", "parent": 862, "children": [], "start_point": {"row": 291, "column": 39}, "end_point": {"row": 291, "column": 40}}, {"id": 871, "type": "||", "text": "||", "parent": 860, "children": [], "start_point": {"row": 291, "column": 42}, "end_point": {"row": 291, "column": 44}}, {"id": 872, "type": "parenthesized_expression", "text": "(au32Config[1] != DATA_FLASH_BASE)", "parent": 860, "children": [873], "start_point": {"row": 291, "column": 45}, "end_point": {"row": 291, "column": 79}}, {"id": 873, "type": "binary_expression", "text": "au32Config[1] != DATA_FLASH_BASE", "parent": 872, "children": [874, 877, 878], "start_point": {"row": 291, "column": 46}, "end_point": {"row": 291, "column": 78}}, {"id": 874, "type": "subscript_expression", "text": "au32Config[1]", "parent": 873, "children": [875, 876], "start_point": {"row": 291, "column": 46}, "end_point": {"row": 291, "column": 59}}, {"id": 875, "type": "identifier", "text": "au32Config", "parent": 874, "children": [], "start_point": {"row": 291, "column": 46}, "end_point": {"row": 291, "column": 56}}, {"id": 876, "type": "number_literal", "text": "1", "parent": 874, "children": [], "start_point": {"row": 291, "column": 57}, "end_point": {"row": 291, "column": 58}}, {"id": 877, "type": "!=", "text": "!=", "parent": 873, "children": [], "start_point": {"row": 291, "column": 60}, "end_point": {"row": 291, "column": 62}}, {"id": 878, "type": "identifier", "text": "DATA_FLASH_BASE", "parent": 873, "children": [], "start_point": {"row": 291, "column": 63}, "end_point": {"row": 291, "column": 78}}, {"id": 879, "type": "call_expression", "text": "printf(\"Error: Program Config Failed!\\n\")", "parent": 858, "children": [880, 881], "start_point": {"row": 293, "column": 12}, "end_point": {"row": 293, "column": 53}}, {"id": 880, "type": "identifier", "text": "printf", "parent": 879, "children": [], "start_point": {"row": 293, "column": 12}, "end_point": {"row": 293, "column": 18}}, {"id": 881, "type": "argument_list", "text": "(\"Error: Program Config Failed!\\n\")", "parent": 879, "children": [882], "start_point": {"row": 293, "column": 18}, "end_point": {"row": 293, "column": 53}}, {"id": 882, "type": "string_literal", "text": "\"Error: Program Config Failed!\\n\"", "parent": 881, "children": [883], "start_point": {"row": 293, "column": 19}, "end_point": {"row": 293, "column": 52}}, {"id": 883, "type": "escape_sequence", "text": "\\n", "parent": 882, "children": [], "start_point": {"row": 293, "column": 49}, "end_point": {"row": 293, "column": 51}}, {"id": 884, "type": "call_expression", "text": "FMC_Close()", "parent": 858, "children": [885, 886], "start_point": {"row": 295, "column": 12}, "end_point": {"row": 295, "column": 23}}, {"id": 885, "type": "identifier", "text": "FMC_Close", "parent": 884, "children": [], "start_point": {"row": 295, "column": 12}, "end_point": {"row": 295, "column": 21}}, {"id": 886, "type": "argument_list", "text": "()", "parent": 884, "children": [], "start_point": {"row": 295, "column": 21}, "end_point": {"row": 295, "column": 23}}, {"id": 887, "type": "call_expression", "text": "SYS_LockReg()", "parent": 858, "children": [888, 889], "start_point": {"row": 296, "column": 12}, "end_point": {"row": 296, "column": 25}}, {"id": 888, "type": "identifier", "text": "SYS_LockReg", "parent": 887, "children": [], "start_point": {"row": 296, "column": 12}, "end_point": {"row": 296, "column": 23}}, {"id": 889, "type": "argument_list", "text": "()", "parent": 887, "children": [], "start_point": {"row": 296, "column": 23}, "end_point": {"row": 296, "column": 25}}, {"id": 890, "type": "return_statement", "text": "return -1;", "parent": 858, "children": [891], "start_point": {"row": 297, "column": 12}, "end_point": {"row": 297, "column": 22}}, {"id": 891, "type": "number_literal", "text": "-1", "parent": 890, "children": [], "start_point": {"row": 297, "column": 19}, "end_point": {"row": 297, "column": 21}}, {"id": 892, "type": "assignment_expression", "text": "SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk", "parent": 803, "children": [893, 896, 897], "start_point": {"row": 301, "column": 8}, "end_point": {"row": 301, "column": 44}}, {"id": 893, "type": "field_expression", "text": "SYS->IPRST0", "parent": 892, "children": [894, 895], "start_point": {"row": 301, "column": 8}, "end_point": {"row": 301, "column": 19}}, {"id": 894, "type": "identifier", "text": "SYS", "parent": 893, "children": [], "start_point": {"row": 301, "column": 8}, "end_point": {"row": 301, "column": 11}}, {"id": 895, "type": "field_identifier", "text": "IPRST0", "parent": 893, "children": [], "start_point": {"row": 301, "column": 13}, "end_point": {"row": 301, "column": 19}}, {"id": 896, "type": "=", "text": "=", "parent": 892, "children": [], "start_point": {"row": 301, "column": 20}, "end_point": {"row": 301, "column": 21}}, {"id": 897, "type": "identifier", "text": "SYS_IPRST0_CHIPRST_Msk", "parent": 892, "children": [], "start_point": {"row": 301, "column": 22}, "end_point": {"row": 301, "column": 44}}, {"id": 898, "type": "call_expression", "text": "USBD_Open(&gsInfo, VCOM_ClassRequest, NULL)", "parent": 764, "children": [899, 900], "start_point": {"row": 304, "column": 4}, "end_point": {"row": 304, "column": 47}}, {"id": 899, "type": "identifier", "text": "USBD_Open", "parent": 898, "children": [], "start_point": {"row": 304, "column": 4}, "end_point": {"row": 304, "column": 13}}, {"id": 900, "type": "argument_list", "text": "(&gsInfo, VCOM_ClassRequest, NULL)", "parent": 898, "children": [901, 903, 904], "start_point": {"row": 304, "column": 13}, "end_point": {"row": 304, "column": 47}}, {"id": 901, "type": "pointer_expression", "text": "&gsInfo", "parent": 900, "children": [902], "start_point": {"row": 304, "column": 14}, "end_point": {"row": 304, "column": 21}}, {"id": 902, "type": "identifier", "text": "gsInfo", "parent": 901, "children": [], "start_point": {"row": 304, "column": 15}, "end_point": {"row": 304, "column": 21}}, {"id": 903, "type": "identifier", "text": "VCOM_ClassRequest", "parent": 900, "children": [], "start_point": {"row": 304, "column": 23}, "end_point": {"row": 304, "column": 40}}, {"id": 904, "type": "null", "text": "NULL", "parent": 900, "children": [905], "start_point": {"row": 304, "column": 42}, "end_point": {"row": 304, "column": 46}}, {"id": 905, "type": "NULL", "text": "NULL", "parent": 904, "children": [], "start_point": {"row": 304, "column": 42}, "end_point": {"row": 304, "column": 46}}, {"id": 906, "type": "call_expression", "text": "USBD_SetConfigCallback(MSC_SetConfig)", "parent": 764, "children": [907, 908], "start_point": {"row": 305, "column": 4}, "end_point": {"row": 305, "column": 41}}, {"id": 907, "type": "identifier", "text": "USBD_SetConfigCallback", "parent": 906, "children": [], "start_point": {"row": 305, "column": 4}, "end_point": {"row": 305, "column": 26}}, {"id": 908, "type": "argument_list", "text": "(MSC_SetConfig)", "parent": 906, "children": [909], "start_point": {"row": 305, "column": 26}, "end_point": {"row": 305, "column": 41}}, {"id": 909, "type": "identifier", "text": "MSC_SetConfig", "parent": 908, "children": [], "start_point": {"row": 305, "column": 27}, "end_point": {"row": 305, "column": 40}}, {"id": 910, "type": "call_expression", "text": "VCOM_Init()", "parent": 764, "children": [911, 912], "start_point": {"row": 307, "column": 4}, "end_point": {"row": 307, "column": 15}}, {"id": 911, "type": "identifier", "text": "VCOM_Init", "parent": 910, "children": [], "start_point": {"row": 307, "column": 4}, "end_point": {"row": 307, "column": 13}}, {"id": 912, "type": "argument_list", "text": "()", "parent": 910, "children": [], "start_point": {"row": 307, "column": 13}, "end_point": {"row": 307, "column": 15}}, {"id": 913, "type": "call_expression", "text": "USBD_Start()", "parent": 764, "children": [914, 915], "start_point": {"row": 308, "column": 4}, "end_point": {"row": 308, "column": 16}}, {"id": 914, "type": "identifier", "text": "USBD_Start", "parent": 913, "children": [], "start_point": {"row": 308, "column": 4}, "end_point": {"row": 308, "column": 14}}, {"id": 915, "type": "argument_list", "text": "()", "parent": 913, "children": [], "start_point": {"row": 308, "column": 14}, "end_point": {"row": 308, "column": 16}}, {"id": 916, "type": "call_expression", "text": "SYS_UnlockReg()", "parent": 764, "children": [917, 918], "start_point": {"row": 310, "column": 4}, "end_point": {"row": 310, "column": 19}}, {"id": 917, "type": "identifier", "text": "SYS_UnlockReg", "parent": 916, "children": [], "start_point": {"row": 310, "column": 4}, "end_point": {"row": 310, "column": 17}}, {"id": 918, "type": "argument_list", "text": "()", "parent": 916, "children": [], "start_point": {"row": 310, "column": 17}, "end_point": {"row": 310, "column": 19}}, {"id": 919, "type": "if_statement", "text": "if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }", "parent": 764, "children": [920], "start_point": {"row": 311, "column": 4}, "end_point": {"row": 320, "column": 5}}, {"id": 920, "type": "parenthesized_expression", "text": "(((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))", "parent": 919, "children": [921], "start_point": {"row": 311, "column": 7}, "end_point": {"row": 311, "column": 76}}, {"id": 921, "type": "binary_expression", "text": "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)", "parent": 920, "children": [922, 932, 933], "start_point": {"row": 311, "column": 8}, "end_point": {"row": 311, "column": 75}}, {"id": 922, "type": "parenthesized_expression", "text": "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1)", "parent": 921, "children": [923], "start_point": {"row": 311, "column": 8}, "end_point": {"row": 311, "column": 57}}, {"id": 923, "type": "binary_expression", "text": "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1", "parent": 922, "children": [924, 930, 931], "start_point": {"row": 311, "column": 9}, "end_point": {"row": 311, "column": 56}}, {"id": 924, "type": "parenthesized_expression", "text": "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk)", "parent": 923, "children": [925], "start_point": {"row": 311, "column": 9}, "end_point": {"row": 311, "column": 49}}, {"id": 925, "type": "binary_expression", "text": "SYS->CSERVER & SYS_CSERVER_VERSION_Msk", "parent": 924, "children": [926, 929], "start_point": {"row": 311, "column": 10}, "end_point": {"row": 311, "column": 48}}, {"id": 926, "type": "field_expression", "text": "SYS->CSERVER", "parent": 925, "children": [927, 928], "start_point": {"row": 311, "column": 10}, "end_point": {"row": 311, "column": 22}}, {"id": 927, "type": "identifier", "text": "SYS", "parent": 926, "children": [], "start_point": {"row": 311, "column": 10}, "end_point": {"row": 311, "column": 13}}, {"id": 928, "type": "field_identifier", "text": "CSERVER", "parent": 926, "children": [], "start_point": {"row": 311, "column": 15}, "end_point": {"row": 311, "column": 22}}, {"id": 929, "type": "identifier", "text": "SYS_CSERVER_VERSION_Msk", "parent": 925, "children": [], "start_point": {"row": 311, "column": 25}, "end_point": {"row": 311, "column": 48}}, {"id": 930, "type": "==", "text": "==", "parent": 923, "children": [], "start_point": {"row": 311, "column": 50}, "end_point": {"row": 311, "column": 52}}, {"id": 931, "type": "number_literal", "text": "0x1", "parent": 923, "children": [], "start_point": {"row": 311, "column": 53}, "end_point": {"row": 311, "column": 56}}, {"id": 932, "type": "&&", "text": "&&", "parent": 921, "children": [], "start_point": {"row": 311, "column": 58}, "end_point": {"row": 311, "column": 60}}, {"id": 933, "type": "parenthesized_expression", "text": "(CRYSTAL_LESS)", "parent": 921, "children": [934], "start_point": {"row": 311, "column": 61}, "end_point": {"row": 311, "column": 75}}, {"id": 934, "type": "identifier", "text": "CRYSTAL_LESS", "parent": 933, "children": [], "start_point": {"row": 311, "column": 62}, "end_point": {"row": 311, "column": 74}}, {"id": 935, "type": "assignment_expression", "text": "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk", "parent": 919, "children": [936, 939, 940], "start_point": {"row": 314, "column": 8}, "end_point": {"row": 314, "column": 44}}, {"id": 936, "type": "field_expression", "text": "USBD->INTSTS", "parent": 935, "children": [937, 938], "start_point": {"row": 314, "column": 8}, "end_point": {"row": 314, "column": 20}}, {"id": 937, "type": "identifier", "text": "USBD", "parent": 936, "children": [], "start_point": {"row": 314, "column": 8}, "end_point": {"row": 314, "column": 12}}, {"id": 938, "type": "field_identifier", "text": "INTSTS", "parent": 936, "children": [], "start_point": {"row": 314, "column": 14}, "end_point": {"row": 314, "column": 20}}, {"id": 939, "type": "=", "text": "=", "parent": 935, "children": [], "start_point": {"row": 314, "column": 21}, "end_point": {"row": 314, "column": 22}}, {"id": 940, "type": "identifier", "text": "USBD_INTSTS_SOFIF_Msk", "parent": 935, "children": [], "start_point": {"row": 314, "column": 23}, "end_point": {"row": 314, "column": 44}}, {"id": 941, "type": "while_statement", "text": "while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);", "parent": 919, "children": [942], "start_point": {"row": 315, "column": 8}, "end_point": {"row": 315, "column": 59}}, {"id": 942, "type": "parenthesized_expression", "text": "((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0)", "parent": 941, "children": [943], "start_point": {"row": 315, "column": 13}, "end_point": {"row": 315, "column": 58}}, {"id": 943, "type": "binary_expression", "text": "(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0", "parent": 942, "children": [944, 950, 951], "start_point": {"row": 315, "column": 14}, "end_point": {"row": 315, "column": 57}}, {"id": 944, "type": "parenthesized_expression", "text": "(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)", "parent": 943, "children": [945], "start_point": {"row": 315, "column": 14}, "end_point": {"row": 315, "column": 52}}, {"id": 945, "type": "binary_expression", "text": "USBD->INTSTS & USBD_INTSTS_SOFIF_Msk", "parent": 944, "children": [946, 949], "start_point": {"row": 315, "column": 15}, "end_point": {"row": 315, "column": 51}}, {"id": 946, "type": "field_expression", "text": "USBD->INTSTS", "parent": 945, "children": [947, 948], "start_point": {"row": 315, "column": 15}, "end_point": {"row": 315, "column": 27}}, {"id": 947, "type": "identifier", "text": "USBD", "parent": 946, "children": [], "start_point": {"row": 315, "column": 15}, "end_point": {"row": 315, "column": 19}}, {"id": 948, "type": "field_identifier", "text": "INTSTS", "parent": 946, "children": [], "start_point": {"row": 315, "column": 21}, "end_point": {"row": 315, "column": 27}}, {"id": 949, "type": "identifier", "text": "USBD_INTSTS_SOFIF_Msk", "parent": 945, "children": [], "start_point": {"row": 315, "column": 30}, "end_point": {"row": 315, "column": 51}}, {"id": 950, "type": "==", "text": "==", "parent": 943, "children": [], "start_point": {"row": 315, "column": 53}, "end_point": {"row": 315, "column": 55}}, {"id": 951, "type": "number_literal", "text": "0", "parent": 943, "children": [], "start_point": {"row": 315, "column": 56}, "end_point": {"row": 315, "column": 57}}, {"id": 952, "type": "assignment_expression", "text": "SYS->HIRCTCTL = 0x1", "parent": 919, "children": [953, 956, 957], "start_point": {"row": 316, "column": 8}, "end_point": {"row": 316, "column": 27}}, {"id": 953, "type": "field_expression", "text": "SYS->HIRCTCTL", "parent": 952, "children": [954, 955], "start_point": {"row": 316, "column": 8}, "end_point": {"row": 316, "column": 21}}, {"id": 954, "type": "identifier", "text": "SYS", "parent": 953, "children": [], "start_point": {"row": 316, "column": 8}, "end_point": {"row": 316, "column": 11}}, {"id": 955, "type": "field_identifier", "text": "HIRCTCTL", "parent": 953, "children": [], "start_point": {"row": 316, "column": 13}, "end_point": {"row": 316, "column": 21}}, {"id": 956, "type": "=", "text": "=", "parent": 952, "children": [], "start_point": {"row": 316, "column": 22}, "end_point": {"row": 316, "column": 23}}, {"id": 957, "type": "number_literal", "text": "0x1", "parent": 952, "children": [], "start_point": {"row": 316, "column": 24}, "end_point": {"row": 316, "column": 27}}, {"id": 958, "type": "assignment_expression", "text": "SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk", "parent": 919, "children": [959, 962, 963], "start_point": {"row": 317, "column": 8}, "end_point": {"row": 317, "column": 50}}, {"id": 959, "type": "field_expression", "text": "SYS->HIRCTCTL", "parent": 958, "children": [960, 961], "start_point": {"row": 317, "column": 8}, "end_point": {"row": 317, "column": 21}}, {"id": 960, "type": "identifier", "text": "SYS", "parent": 959, "children": [], "start_point": {"row": 317, "column": 8}, "end_point": {"row": 317, "column": 11}}, {"id": 961, "type": "field_identifier", "text": "HIRCTCTL", "parent": 959, "children": [], "start_point": {"row": 317, "column": 13}, "end_point": {"row": 317, "column": 21}}, {"id": 962, "type": "|=", "text": "|=", "parent": 958, "children": [], "start_point": {"row": 317, "column": 22}, "end_point": {"row": 317, "column": 24}}, {"id": 963, "type": "identifier", "text": "SYS_HIRCTCTL_REFCKSEL_Msk", "parent": 958, "children": [], "start_point": {"row": 317, "column": 25}, "end_point": {"row": 317, "column": 50}}, {"id": 964, "type": "assignment_expression", "text": "u32TrimInit = M32(TRIM_INIT)", "parent": 919, "children": [965, 966, 967], "start_point": {"row": 319, "column": 8}, "end_point": {"row": 319, "column": 36}}, {"id": 965, "type": "identifier", "text": "u32TrimInit", "parent": 964, "children": [], "start_point": {"row": 319, "column": 8}, "end_point": {"row": 319, "column": 19}}, {"id": 966, "type": "=", "text": "=", "parent": 964, "children": [], "start_point": {"row": 319, "column": 20}, "end_point": {"row": 319, "column": 21}}, {"id": 967, "type": "call_expression", "text": "M32(TRIM_INIT)", "parent": 964, "children": [968, 969], "start_point": {"row": 319, "column": 22}, "end_point": {"row": 319, "column": 36}}, {"id": 968, "type": "identifier", "text": "M32", "parent": 967, "children": [], "start_point": {"row": 319, "column": 22}, "end_point": {"row": 319, "column": 25}}, {"id": 969, "type": "argument_list", "text": "(TRIM_INIT)", "parent": 967, "children": [970], "start_point": {"row": 319, "column": 25}, "end_point": {"row": 319, "column": 36}}, {"id": 970, "type": "identifier", "text": "TRIM_INIT", "parent": 969, "children": [], "start_point": {"row": 319, "column": 26}, "end_point": {"row": 319, "column": 35}}, {"id": 971, "type": "call_expression", "text": "NVIC_EnableIRQ(UART0_IRQn)", "parent": 764, "children": [972, 973], "start_point": {"row": 321, "column": 4}, "end_point": {"row": 321, "column": 30}}, {"id": 972, "type": "identifier", "text": "NVIC_EnableIRQ", "parent": 971, "children": [], "start_point": {"row": 321, "column": 4}, "end_point": {"row": 321, "column": 18}}, {"id": 973, "type": "argument_list", "text": "(UART0_IRQn)", "parent": 971, "children": [974], "start_point": {"row": 321, "column": 18}, "end_point": {"row": 321, "column": 30}}, {"id": 974, "type": "identifier", "text": "UART0_IRQn", "parent": 973, "children": [], "start_point": {"row": 321, "column": 19}, "end_point": {"row": 321, "column": 29}}, {"id": 975, "type": "call_expression", "text": "NVIC_EnableIRQ(USBD_IRQn)", "parent": 764, "children": [976, 977], "start_point": {"row": 322, "column": 4}, "end_point": {"row": 322, "column": 29}}, {"id": 976, "type": "identifier", "text": "NVIC_EnableIRQ", "parent": 975, "children": [], "start_point": {"row": 322, "column": 4}, "end_point": {"row": 322, "column": 18}}, {"id": 977, "type": "argument_list", "text": "(USBD_IRQn)", "parent": 975, "children": [978], "start_point": {"row": 322, "column": 18}, "end_point": {"row": 322, "column": 29}}, {"id": 978, "type": "identifier", "text": "USBD_IRQn", "parent": 977, "children": [], "start_point": {"row": 322, "column": 19}, "end_point": {"row": 322, "column": 28}}, {"id": 979, "type": "while_statement", "text": "while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }", "parent": 764, "children": [980], "start_point": {"row": 324, "column": 4}, "end_point": {"row": 360, "column": 5}}, {"id": 980, "type": "parenthesized_expression", "text": "(1)", "parent": 979, "children": [981], "start_point": {"row": 324, "column": 9}, "end_point": {"row": 324, "column": 12}}, {"id": 981, "type": "number_literal", "text": "1", "parent": 980, "children": [], "start_point": {"row": 324, "column": 10}, "end_point": {"row": 324, "column": 11}}, {"id": 982, "type": "if_statement", "text": "if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }", "parent": 979, "children": [983], "start_point": {"row": 326, "column": 8}, "end_point": {"row": 357, "column": 9}}, {"id": 983, "type": "parenthesized_expression", "text": "(((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))", "parent": 982, "children": [984], "start_point": {"row": 326, "column": 11}, "end_point": {"row": 326, "column": 80}}, {"id": 984, "type": "binary_expression", "text": "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS)", "parent": 983, "children": [985, 995, 996], "start_point": {"row": 326, "column": 12}, "end_point": {"row": 326, "column": 79}}, {"id": 985, "type": "parenthesized_expression", "text": "((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1)", "parent": 984, "children": [986], "start_point": {"row": 326, "column": 12}, "end_point": {"row": 326, "column": 61}}, {"id": 986, "type": "binary_expression", "text": "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1", "parent": 985, "children": [987, 993, 994], "start_point": {"row": 326, "column": 13}, "end_point": {"row": 326, "column": 60}}, {"id": 987, "type": "parenthesized_expression", "text": "(SYS->CSERVER & SYS_CSERVER_VERSION_Msk)", "parent": 986, "children": [988], "start_point": {"row": 326, "column": 13}, "end_point": {"row": 326, "column": 53}}, {"id": 988, "type": "binary_expression", "text": "SYS->CSERVER & SYS_CSERVER_VERSION_Msk", "parent": 987, "children": [989, 992], "start_point": {"row": 326, "column": 14}, "end_point": {"row": 326, "column": 52}}, {"id": 989, "type": "field_expression", "text": "SYS->CSERVER", "parent": 988, "children": [990, 991], "start_point": {"row": 326, "column": 14}, "end_point": {"row": 326, "column": 26}}, {"id": 990, "type": "identifier", "text": "SYS", "parent": 989, "children": [], "start_point": {"row": 326, "column": 14}, "end_point": {"row": 326, "column": 17}}, {"id": 991, "type": "field_identifier", "text": "CSERVER", "parent": 989, "children": [], "start_point": {"row": 326, "column": 19}, "end_point": {"row": 326, "column": 26}}, {"id": 992, "type": "identifier", "text": "SYS_CSERVER_VERSION_Msk", "parent": 988, "children": [], "start_point": {"row": 326, "column": 29}, "end_point": {"row": 326, "column": 52}}, {"id": 993, "type": "==", "text": "==", "parent": 986, "children": [], "start_point": {"row": 326, "column": 54}, "end_point": {"row": 326, "column": 56}}, {"id": 994, "type": "number_literal", "text": "0x1", "parent": 986, "children": [], "start_point": {"row": 326, "column": 57}, "end_point": {"row": 326, "column": 60}}, {"id": 995, "type": "&&", "text": "&&", "parent": 984, "children": [], "start_point": {"row": 326, "column": 62}, "end_point": {"row": 326, "column": 64}}, {"id": 996, "type": "parenthesized_expression", "text": "(CRYSTAL_LESS)", "parent": 984, "children": [997], "start_point": {"row": 326, "column": 65}, "end_point": {"row": 326, "column": 79}}, {"id": 997, "type": "identifier", "text": "CRYSTAL_LESS", "parent": 996, "children": [], "start_point": {"row": 326, "column": 66}, "end_point": {"row": 326, "column": 78}}, {"id": 998, "type": "if_statement", "text": "if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }", "parent": 982, "children": [999], "start_point": {"row": 329, "column": 12}, "end_point": {"row": 340, "column": 13}}, {"id": 999, "type": "parenthesized_expression", "text": "((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)", "parent": 998, "children": [1000], "start_point": {"row": 329, "column": 15}, "end_point": {"row": 329, "column": 64}}, {"id": 1000, "type": "binary_expression", "text": "(SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1", "parent": 999, "children": [1001, 1007, 1008], "start_point": {"row": 329, "column": 16}, "end_point": {"row": 329, "column": 63}}, {"id": 1001, "type": "parenthesized_expression", "text": "(SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk)", "parent": 1000, "children": [1002], "start_point": {"row": 329, "column": 16}, "end_point": {"row": 329, "column": 58}}, {"id": 1002, "type": "binary_expression", "text": "SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk", "parent": 1001, "children": [1003, 1006], "start_point": {"row": 329, "column": 17}, "end_point": {"row": 329, "column": 57}}, {"id": 1003, "type": "field_expression", "text": "SYS->HIRCTCTL", "parent": 1002, "children": [1004, 1005], "start_point": {"row": 329, "column": 17}, "end_point": {"row": 329, "column": 30}}, {"id": 1004, "type": "identifier", "text": "SYS", "parent": 1003, "children": [], "start_point": {"row": 329, "column": 17}, "end_point": {"row": 329, "column": 20}}, {"id": 1005, "type": "field_identifier", "text": "HIRCTCTL", "parent": 1003, "children": [], "start_point": {"row": 329, "column": 22}, "end_point": {"row": 329, "column": 30}}, {"id": 1006, "type": "identifier", "text": "SYS_HIRCTCTL_FREQSEL_Msk", "parent": 1002, "children": [], "start_point": {"row": 329, "column": 33}, "end_point": {"row": 329, "column": 57}}, {"id": 1007, "type": "!=", "text": "!=", "parent": 1000, "children": [], "start_point": {"row": 329, "column": 59}, "end_point": {"row": 329, "column": 61}}, {"id": 1008, "type": "number_literal", "text": "1", "parent": 1000, "children": [], "start_point": {"row": 329, "column": 62}, "end_point": {"row": 329, "column": 63}}, {"id": 1009, "type": "if_statement", "text": "if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }", "parent": 998, "children": [1010], "start_point": {"row": 331, "column": 16}, "end_point": {"row": 339, "column": 17}}, {"id": 1010, "type": "parenthesized_expression", "text": "(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)", "parent": 1009, "children": [1011], "start_point": {"row": 331, "column": 18}, "end_point": {"row": 331, "column": 56}}, {"id": 1011, "type": "binary_expression", "text": "USBD->INTSTS & USBD_INTSTS_SOFIF_Msk", "parent": 1010, "children": [1012, 1015], "start_point": {"row": 331, "column": 19}, "end_point": {"row": 331, "column": 55}}, {"id": 1012, "type": "field_expression", "text": "USBD->INTSTS", "parent": 1011, "children": [1013, 1014], "start_point": {"row": 331, "column": 19}, "end_point": {"row": 331, "column": 31}}, {"id": 1013, "type": "identifier", "text": "USBD", "parent": 1012, "children": [], "start_point": {"row": 331, "column": 19}, "end_point": {"row": 331, "column": 23}}, {"id": 1014, "type": "field_identifier", "text": "INTSTS", "parent": 1012, "children": [], "start_point": {"row": 331, "column": 25}, "end_point": {"row": 331, "column": 31}}, {"id": 1015, "type": "identifier", "text": "USBD_INTSTS_SOFIF_Msk", "parent": 1011, "children": [], "start_point": {"row": 331, "column": 34}, "end_point": {"row": 331, "column": 55}}, {"id": 1016, "type": "assignment_expression", "text": "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk", "parent": 1009, "children": [1017, 1020, 1021], "start_point": {"row": 334, "column": 20}, "end_point": {"row": 334, "column": 56}}, {"id": 1017, "type": "field_expression", "text": "USBD->INTSTS", "parent": 1016, "children": [1018, 1019], "start_point": {"row": 334, "column": 20}, "end_point": {"row": 334, "column": 32}}, {"id": 1018, "type": "identifier", "text": "USBD", "parent": 1017, "children": [], "start_point": {"row": 334, "column": 20}, "end_point": {"row": 334, "column": 24}}, {"id": 1019, "type": "field_identifier", "text": "INTSTS", "parent": 1017, "children": [], "start_point": {"row": 334, "column": 26}, "end_point": {"row": 334, "column": 32}}, {"id": 1020, "type": "=", "text": "=", "parent": 1016, "children": [], "start_point": {"row": 334, "column": 33}, "end_point": {"row": 334, "column": 34}}, {"id": 1021, "type": "identifier", "text": "USBD_INTSTS_SOFIF_Msk", "parent": 1016, "children": [], "start_point": {"row": 334, "column": 35}, "end_point": {"row": 334, "column": 56}}, {"id": 1022, "type": "assignment_expression", "text": "SYS->HIRCTCTL = 0x1", "parent": 1009, "children": [1023, 1026, 1027], "start_point": {"row": 337, "column": 20}, "end_point": {"row": 337, "column": 39}}, {"id": 1023, "type": "field_expression", "text": "SYS->HIRCTCTL", "parent": 1022, "children": [1024, 1025], "start_point": {"row": 337, "column": 20}, "end_point": {"row": 337, "column": 33}}, {"id": 1024, "type": "identifier", "text": "SYS", "parent": 1023, "children": [], "start_point": {"row": 337, "column": 20}, "end_point": {"row": 337, "column": 23}}, {"id": 1025, "type": "field_identifier", "text": "HIRCTCTL", "parent": 1023, "children": [], "start_point": {"row": 337, "column": 25}, "end_point": {"row": 337, "column": 33}}, {"id": 1026, "type": "=", "text": "=", "parent": 1022, "children": [], "start_point": {"row": 337, "column": 34}, "end_point": {"row": 337, "column": 35}}, {"id": 1027, "type": "number_literal", "text": "0x1", "parent": 1022, "children": [], "start_point": {"row": 337, "column": 36}, "end_point": {"row": 337, "column": 39}}, {"id": 1028, "type": "assignment_expression", "text": "SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk", "parent": 1009, "children": [1029, 1032, 1033], "start_point": {"row": 338, "column": 20}, "end_point": {"row": 338, "column": 62}}, {"id": 1029, "type": "field_expression", "text": "SYS->HIRCTCTL", "parent": 1028, "children": [1030, 1031], "start_point": {"row": 338, "column": 20}, "end_point": {"row": 338, "column": 33}}, {"id": 1030, "type": "identifier", "text": "SYS", "parent": 1029, "children": [], "start_point": {"row": 338, "column": 20}, "end_point": {"row": 338, "column": 23}}, {"id": 1031, "type": "field_identifier", "text": "HIRCTCTL", "parent": 1029, "children": [], "start_point": {"row": 338, "column": 25}, "end_point": {"row": 338, "column": 33}}, {"id": 1032, "type": "|=", "text": "|=", "parent": 1028, "children": [], "start_point": {"row": 338, "column": 34}, "end_point": {"row": 338, "column": 36}}, {"id": 1033, "type": "identifier", "text": "SYS_HIRCTCTL_REFCKSEL_Msk", "parent": 1028, "children": [], "start_point": {"row": 338, "column": 37}, "end_point": {"row": 338, "column": 62}}, {"id": 1034, "type": "if_statement", "text": "if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }", "parent": 982, "children": [1035], "start_point": {"row": 343, "column": 12}, "end_point": {"row": 356, "column": 13}}, {"id": 1035, "type": "parenthesized_expression", "text": "(SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))", "parent": 1034, "children": [1036], "start_point": {"row": 343, "column": 15}, "end_point": {"row": 343, "column": 90}}, {"id": 1036, "type": "binary_expression", "text": "SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk)", "parent": 1035, "children": [1037, 1040], "start_point": {"row": 343, "column": 16}, "end_point": {"row": 343, "column": 89}}, {"id": 1037, "type": "field_expression", "text": "SYS->HIRCTISTS", "parent": 1036, "children": [1038, 1039], "start_point": {"row": 343, "column": 16}, "end_point": {"row": 343, "column": 30}}, {"id": 1038, "type": "identifier", "text": "SYS", "parent": 1037, "children": [], "start_point": {"row": 343, "column": 16}, "end_point": {"row": 343, "column": 19}}, {"id": 1039, "type": "field_identifier", "text": "HIRCTISTS", "parent": 1037, "children": [], "start_point": {"row": 343, "column": 21}, "end_point": {"row": 343, "column": 30}}, {"id": 1040, "type": "parenthesized_expression", "text": "(SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk)", "parent": 1036, "children": [1041], "start_point": {"row": 343, "column": 33}, "end_point": {"row": 343, "column": 89}}, {"id": 1041, "type": "binary_expression", "text": "SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk", "parent": 1040, "children": [1042, 1043], "start_point": {"row": 343, "column": 34}, "end_point": {"row": 343, "column": 88}}, {"id": 1042, "type": "identifier", "text": "SYS_HIRCTISTS_CLKERRIF_Msk", "parent": 1041, "children": [], "start_point": {"row": 343, "column": 34}, "end_point": {"row": 343, "column": 60}}, {"id": 1043, "type": "identifier", "text": "SYS_HIRCTISTS_TFAILIF_Msk", "parent": 1041, "children": [], "start_point": {"row": 343, "column": 63}, "end_point": {"row": 343, "column": 88}}, {"id": 1044, "type": "assignment_expression", "text": "M32(TRIM_INIT) = u32TrimInit", "parent": 1034, "children": [1045, 1049, 1050], "start_point": {"row": 346, "column": 16}, "end_point": {"row": 346, "column": 44}}, {"id": 1045, "type": "call_expression", "text": "M32(TRIM_INIT)", "parent": 1044, "children": [1046, 1047], "start_point": {"row": 346, "column": 16}, "end_point": {"row": 346, "column": 30}}, {"id": 1046, "type": "identifier", "text": "M32", "parent": 1045, "children": [], "start_point": {"row": 346, "column": 16}, "end_point": {"row": 346, "column": 19}}, {"id": 1047, "type": "argument_list", "text": "(TRIM_INIT)", "parent": 1045, "children": [1048], "start_point": {"row": 346, "column": 19}, "end_point": {"row": 346, "column": 30}}, {"id": 1048, "type": "identifier", "text": "TRIM_INIT", "parent": 1047, "children": [], "start_point": {"row": 346, "column": 20}, "end_point": {"row": 346, "column": 29}}, {"id": 1049, "type": "=", "text": "=", "parent": 1044, "children": [], "start_point": {"row": 346, "column": 31}, "end_point": {"row": 346, "column": 32}}, {"id": 1050, "type": "identifier", "text": "u32TrimInit", "parent": 1044, "children": [], "start_point": {"row": 346, "column": 33}, "end_point": {"row": 346, "column": 44}}, {"id": 1051, "type": "assignment_expression", "text": "SYS->HIRCTCTL = 0", "parent": 1034, "children": [1052, 1055, 1056], "start_point": {"row": 349, "column": 16}, "end_point": {"row": 349, "column": 33}}, {"id": 1052, "type": "field_expression", "text": "SYS->HIRCTCTL", "parent": 1051, "children": [1053, 1054], "start_point": {"row": 349, "column": 16}, "end_point": {"row": 349, "column": 29}}, {"id": 1053, "type": "identifier", "text": "SYS", "parent": 1052, "children": [], "start_point": {"row": 349, "column": 16}, "end_point": {"row": 349, "column": 19}}, {"id": 1054, "type": "field_identifier", "text": "HIRCTCTL", "parent": 1052, "children": [], "start_point": {"row": 349, "column": 21}, "end_point": {"row": 349, "column": 29}}, {"id": 1055, "type": "=", "text": "=", "parent": 1051, "children": [], "start_point": {"row": 349, "column": 30}, "end_point": {"row": 349, "column": 31}}, {"id": 1056, "type": "number_literal", "text": "0", "parent": 1051, "children": [], "start_point": {"row": 349, "column": 32}, "end_point": {"row": 349, "column": 33}}, {"id": 1057, "type": "assignment_expression", "text": "SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk", "parent": 1034, "children": [1058, 1061, 1062], "start_point": {"row": 352, "column": 16}, "end_point": {"row": 352, "column": 87}}, {"id": 1058, "type": "field_expression", "text": "SYS->HIRCTISTS", "parent": 1057, "children": [1059, 1060], "start_point": {"row": 352, "column": 16}, "end_point": {"row": 352, "column": 30}}, {"id": 1059, "type": "identifier", "text": "SYS", "parent": 1058, "children": [], "start_point": {"row": 352, "column": 16}, "end_point": {"row": 352, "column": 19}}, {"id": 1060, "type": "field_identifier", "text": "HIRCTISTS", "parent": 1058, "children": [], "start_point": {"row": 352, "column": 21}, "end_point": {"row": 352, "column": 30}}, {"id": 1061, "type": "=", "text": "=", "parent": 1057, "children": [], "start_point": {"row": 352, "column": 31}, "end_point": {"row": 352, "column": 32}}, {"id": 1062, "type": "binary_expression", "text": "SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk", "parent": 1057, "children": [1063, 1064], "start_point": {"row": 352, "column": 33}, "end_point": {"row": 352, "column": 87}}, {"id": 1063, "type": "identifier", "text": "SYS_HIRCTISTS_CLKERRIF_Msk", "parent": 1062, "children": [], "start_point": {"row": 352, "column": 33}, "end_point": {"row": 352, "column": 59}}, {"id": 1064, "type": "identifier", "text": "SYS_HIRCTISTS_TFAILIF_Msk", "parent": 1062, "children": [], "start_point": {"row": 352, "column": 62}, "end_point": {"row": 352, "column": 87}}, {"id": 1065, "type": "assignment_expression", "text": "USBD->INTSTS = USBD_INTSTS_SOFIF_Msk", "parent": 1034, "children": [1066, 1069, 1070], "start_point": {"row": 355, "column": 16}, "end_point": {"row": 355, "column": 52}}, {"id": 1066, "type": "field_expression", "text": "USBD->INTSTS", "parent": 1065, "children": [1067, 1068], "start_point": {"row": 355, "column": 16}, "end_point": {"row": 355, "column": 28}}, {"id": 1067, "type": "identifier", "text": "USBD", "parent": 1066, "children": [], "start_point": {"row": 355, "column": 16}, "end_point": {"row": 355, "column": 20}}, {"id": 1068, "type": "field_identifier", "text": "INTSTS", "parent": 1066, "children": [], "start_point": {"row": 355, "column": 22}, "end_point": {"row": 355, "column": 28}}, {"id": 1069, "type": "=", "text": "=", "parent": 1065, "children": [], "start_point": {"row": 355, "column": 29}, "end_point": {"row": 355, "column": 30}}, {"id": 1070, "type": "identifier", "text": "USBD_INTSTS_SOFIF_Msk", "parent": 1065, "children": [], "start_point": {"row": 355, "column": 31}, "end_point": {"row": 355, "column": 52}}, {"id": 1071, "type": "call_expression", "text": "VCOM_TransferData()", "parent": 979, "children": [1072, 1073], "start_point": {"row": 358, "column": 8}, "end_point": {"row": 358, "column": 27}}, {"id": 1072, "type": "identifier", "text": "VCOM_TransferData", "parent": 1071, "children": [], "start_point": {"row": 358, "column": 8}, "end_point": {"row": 358, "column": 25}}, {"id": 1073, "type": "argument_list", "text": "()", "parent": 1071, "children": [], "start_point": {"row": 358, "column": 25}, "end_point": {"row": 358, "column": 27}}, {"id": 1074, "type": "call_expression", "text": "MSC_ProcessCmd()", "parent": 979, "children": [1075, 1076], "start_point": {"row": 359, "column": 8}, "end_point": {"row": 359, "column": 24}}, {"id": 1075, "type": "identifier", "text": "MSC_ProcessCmd", "parent": 1074, "children": [], "start_point": {"row": 359, "column": 8}, "end_point": {"row": 359, "column": 22}}, {"id": 1076, "type": "argument_list", "text": "()", "parent": 1074, "children": [], "start_point": {"row": 359, "column": 22}, "end_point": {"row": 359, "column": 24}}]}, "node_categories": {"declarations": {"functions": [151, 153, 350, 352, 372, 374, 514, 516, 764, 766], "variables": [20, 30, 52, 59, 67, 75, 83, 90, 98, 106, 114, 123, 131, 137, 143, 156, 355, 377, 379, 382, 385, 519, 521, 769, 771, 774], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [158, 162, 166, 168, 169, 172, 176, 180, 184, 188, 193, 197, 201, 202, 203, 204, 205, 206, 207, 214, 217, 223, 227, 232, 238, 242, 243, 244, 245, 248, 251, 256, 260, 261, 262, 263, 264, 267, 272, 276, 281, 285, 290, 294, 296, 297, 298, 303, 307, 309, 310, 311, 312, 318, 322, 323, 324, 325, 331, 335, 337, 338, 342, 346, 347, 357, 362, 366, 367, 368, 391, 395, 396, 397, 398, 402, 403, 407, 408, 410, 411, 412, 419, 423, 424, 429, 431, 437, 438, 446, 451, 452, 456, 463, 464, 473, 478, 480, 484, 490, 491, 499, 502, 507, 511, 526, 527, 532, 539, 540, 553, 557, 561, 565, 567, 571, 572, 580, 588, 596, 599, 604, 605, 608, 612, 619, 628, 633, 634, 638, 644, 645, 648, 649, 652, 661, 665, 669, 671, 675, 679, 680, 688, 696, 708, 714, 717, 718, 719, 720, 721, 728, 732, 734, 738, 739, 747, 751, 754, 759, 779, 782, 785, 788, 792, 793, 794, 804, 805, 806, 807, 808, 809, 810, 817, 818, 819, 824, 828, 832, 836, 842, 843, 844, 853, 859, 860, 861, 862, 863, 864, 865, 872, 873, 874, 879, 884, 887, 893, 898, 901, 906, 910, 913, 916, 920, 921, 922, 923, 924, 925, 926, 933, 936, 942, 943, 944, 945, 946, 953, 959, 967, 971, 975, 980, 983, 984, 985, 986, 987, 988, 989, 996, 999, 1000, 1001, 1002, 1003, 1010, 1011, 1012, 1017, 1023, 1029, 1035, 1036, 1037, 1040, 1041, 1045, 1052, 1058, 1062, 1066, 1071, 1074], "assignments": [161, 192, 216, 222, 231, 237, 255, 289, 302, 317, 330, 341, 388, 416, 428, 442, 458, 468, 475, 483, 495, 506, 534, 544, 549, 560, 576, 584, 592, 625, 657, 668, 684, 692, 700, 704, 727, 743, 758, 827, 835, 892, 935, 952, 958, 964, 1016, 1022, 1028, 1044, 1051, 1057, 1065], "loops": [406, 472, 548, 656, 941, 979], "conditionals": [14, 18, 21, 23, 33, 38, 42, 46, 50, 53, 57, 58, 60, 64, 68, 72, 76, 80, 84, 88, 89, 91, 95, 99, 103, 107, 111, 118, 128, 134, 140, 144, 148, 154, 159, 163, 164, 170, 171, 173, 175, 177, 179, 181, 183, 185, 189, 191, 194, 195, 198, 199, 200, 208, 209, 210, 215, 218, 219, 221, 224, 225, 229, 233, 234, 236, 239, 240, 246, 247, 250, 252, 257, 258, 265, 266, 269, 270, 271, 273, 275, 277, 279, 280, 282, 286, 288, 291, 292, 299, 300, 301, 304, 305, 313, 314, 315, 316, 319, 320, 326, 327, 328, 329, 332, 333, 339, 340, 343, 344, 348, 349, 353, 358, 360, 363, 365, 369, 370, 371, 375, 381, 384, 387, 389, 392, 393, 394, 399, 400, 404, 405, 413, 414, 415, 417, 420, 421, 422, 425, 427, 430, 432, 435, 436, 439, 441, 443, 447, 450, 453, 454, 455, 457, 459, 461, 462, 465, 467, 469, 471, 474, 476, 479, 481, 485, 486, 488, 489, 492, 494, 496, 500, 503, 508, 509, 513, 517, 523, 524, 525, 528, 531, 533, 535, 537, 538, 541, 543, 545, 547, 550, 554, 556, 558, 562, 563, 566, 568, 570, 573, 575, 577, 581, 585, 587, 589, 593, 595, 597, 606, 609, 611, 617, 618, 620, 622, 623, 626, 629, 631, 632, 635, 637, 639, 641, 643, 646, 650, 653, 655, 658, 662, 664, 666, 670, 672, 676, 677, 678, 681, 683, 685, 689, 693, 695, 697, 701, 705, 709, 711, 712, 713, 715, 716, 722, 723, 724, 729, 730, 733, 735, 737, 740, 742, 744, 748, 752, 755, 760, 761, 763, 767, 773, 777, 780, 783, 786, 789, 791, 795, 797, 803, 811, 820, 823, 825, 829, 837, 840, 841, 845, 847, 854, 856, 858, 866, 875, 878, 880, 885, 888, 894, 895, 897, 899, 902, 903, 907, 909, 911, 914, 917, 919, 927, 928, 929, 934, 937, 938, 940, 947, 948, 949, 954, 955, 960, 961, 963, 965, 968, 970, 972, 974, 976, 978, 982, 990, 991, 992, 997, 998, 1004, 1005, 1006, 1009, 1013, 1014, 1015, 1018, 1019, 1021, 1024, 1025, 1030, 1031, 1033, 1034, 1038, 1039, 1042, 1043, 1046, 1048, 1050, 1053, 1054, 1059, 1060, 1063, 1064, 1067, 1068, 1070, 1072, 1075], "returns": [801, 851, 890], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 26, 27, 28, 29, 35, 66, 74, 82, 97, 105, 113, 119, 122, 130, 136, 142, 150, 187, 212, 254, 284, 361, 445, 498, 530, 552, 579, 583, 591, 642, 660, 687, 691, 699, 703, 707, 726, 746, 750, 757, 778, 798, 800, 802, 812, 813, 815, 821, 830, 834, 838, 848, 850, 852, 857, 867, 868, 870, 876, 882, 891, 931, 951, 957, 981, 994, 1008, 1027, 1056], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 151, "universal_type": "function", "name": "SYS_Init", "text_snippet": "void SYS_Init(void)\n{\n /* Unlock protected registers */\n SYS_UnlockReg();\n\n /* Set XT1_OUT("}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "SYS_Init(void)"}, {"node_id": 350, "universal_type": "function", "name": "UART0_Init", "text_snippet": "void UART0_Init(void)\n{\n /* Configure UART0 and set UART0 Baudrate */\n UART_Open(UART0, 115200"}, {"node_id": 352, "universal_type": "function", "name": "unknown", "text_snippet": "UART0_Init(void)"}, {"node_id": 372, "universal_type": "function", "name": "UART0_IRQHandler", "text_snippet": "void UART0_IRQHandler(void)\n{\n uint8_t bInChar;\n int32_t size;\n uint32_t u32IntStatus;\n\n "}, {"node_id": 374, "universal_type": "function", "name": "unknown", "text_snippet": "UART0_IRQHandler(void)"}, {"node_id": 514, "universal_type": "function", "name": "VCOM_TransferData", "text_snippet": "void VCOM_TransferData(void)\n{\n int32_t i, i32Len;\n\n /* Check whether USB is ready for next pa"}, {"node_id": 516, "universal_type": "function", "name": "unknown", "text_snippet": "VCOM_TransferData(void)"}, {"node_id": 764, "universal_type": "function", "name": "unknown", "text_snippet": "int32_t main (void)\n{\n uint32_t u32TrimInit;\n uint32_t au32Config[2];\n\n SYS_Init();\n UAR"}, {"node_id": 766, "universal_type": "function", "name": "unknown", "text_snippet": "main (void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"NuMicro.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"vcom_serial.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"massstorage.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/***************************************************************************//**\n * @file main.c\n * @brief Demonstrate how to implement a composite device.(Virtual com port and Mass storage device)\n * @version 2.0.0\n *\n * @copyright (C) 2016 Nuvoton Technology Corp. All rights reserved.\n ******************************************************************************/\n#include <stdio.h>\n#include \"NuMicro.h\"\n#include \"vcom_serial.h\"\n#include \"massstorage.h\"\n\n#define CRYSTAL_LESS 1\n#define TRIM_INIT (SYS_BASE+0x10C)\n\n/*--------------------------------------------------------------------------*/\nSTR_VCOM_LINE_CODING gLineCoding = {115200, 0, 0, 8}; /* Baud rate : 115200 */\n/* Stop bit */\n/* parity */\n/* data bits */\nuint16_t gCtrlSignal = 0; /* BIT0: DTR(Data Terminal Ready) , BIT1: RTS(Request To Send) */\n\n/*--------------------------------------------------------------------------*/\n#define RXBUFSIZE 512 /* RX buffer size */\n#define TXBUFSIZE 512 /* RX buffer size */\n\n#define TX_FIFO_SIZE 16 /* TX Hardware FIFO size */\n\n#define DATA_FLASH_BASE 0x40000\n/*---------------------------------------------------------------------------------------------------------*/\n/* Global variables */\n/*---------------------------------------------------------------------------------------------------------*/\n/* UART0 */\nvolatile uint8_t comRbuf[RXBUFSIZE];\nvolatile uint16_t comRbytes = 0;\nvolatile uint16_t comRhead = 0;\nvolatile uint16_t comRtail = 0;\n\nvolatile uint8_t comTbuf[TXBUFSIZE];\nvolatile uint16_t comTbytes = 0;\nvolatile uint16_t comThead = 0;\nvolatile uint16_t comTtail = 0;\n\nuint8_t gRxBuf[64] = {0};\nuint8_t *gpu8RxBuf = 0;\nuint32_t gu32RxSize = 0;\nuint32_t gu32TxSize = 0;\n\nvolatile int8_t gi8BulkOutReady = 0;\n\nvoid SYS_Init(void)\n{\n /* Unlock protected registers */\n SYS_UnlockReg();\n\n /* Set XT1_OUT(PF.2) and XT1_IN(PF.3) to input mode */\n PF->MODE &= ~(GPIO_MODE_MODE2_Msk | GPIO_MODE_MODE3_Msk);\n\n /* Enable External XTAL (4~24 MHz) */\n CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);\n\n /* Waiting for 12MHz clock ready */\n CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);\n\n /* Switch HCLK clock source to HXT */\n CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HXT,CLK_CLKDIV0_HCLK(1));\n\n /* Set core clock as PLL_CLOCK from PLL */\n CLK_SetCoreClock(FREQ_192MHZ);\n\n /* Set both PCLK0 and PCLK1 as HCLK/2 */\n CLK->PCLKDIV = CLK_PCLKDIV_APB0DIV_DIV2 | CLK_PCLKDIV_APB1DIV_DIV2;\n\n /* M480LD support crystal-less */\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n CLK->PWRCTL |= CLK_PWRCTL_HIRC48MEN_Msk;\n /* Select IP clock source */\n CLK->CLKSEL0 &= ~CLK_CLKSEL0_USBSEL_Msk;\n }\n else\n {\n /* Select IP clock source */\n CLK->CLKSEL0 |= CLK_CLKSEL0_USBSEL_Msk;\n CLK->CLKDIV0 = (CLK->CLKDIV0 & ~CLK_CLKDIV0_USBDIV_Msk) | CLK_CLKDIV0_USB(4);\n }\n\n /* Select USBD */\n SYS->USBPHY = (SYS->USBPHY & ~SYS_USBPHY_USBROLE_Msk) | SYS_USBPHY_USBEN_Msk | SYS_USBPHY_SBO_Msk;\n\n /* Enable IP clock */\n CLK_EnableModuleClock(USBD_MODULE);\n\n /* Select IP clock source */\n CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HIRC, CLK_CLKDIV0_UART0(1));\n\n /* Enable IP clock */\n CLK_EnableModuleClock(UART0_MODULE);\n /* Set PA.12 ~ PA.14 to input mode */\n PA->MODE &= ~(GPIO_MODE_MODE12_Msk | GPIO_MODE_MODE13_Msk | GPIO_MODE_MODE14_Msk);\n SYS->GPA_MFPH &= ~(SYS_GPA_MFPH_PA12MFP_Msk|SYS_GPA_MFPH_PA13MFP_Msk|SYS_GPA_MFPH_PA14MFP_Msk|SYS_GPA_MFPH_PA15MFP_Msk);\n SYS->GPA_MFPH |= (SYS_GPA_MFPH_PA12MFP_USB_VBUS|SYS_GPA_MFPH_PA13MFP_USB_D_N|SYS_GPA_MFPH_PA14MFP_USB_D_P|SYS_GPA_MFPH_PA15MFP_USB_OTG_ID);\n\n /* Set GPB multi-function pins for UART0 RXD and TXD */\n SYS->GPB_MFPH &= ~(SYS_GPB_MFPH_PB12MFP_Msk | SYS_GPB_MFPH_PB13MFP_Msk);\n SYS->GPB_MFPH |= (SYS_GPB_MFPH_PB12MFP_UART0_RXD | SYS_GPB_MFPH_PB13MFP_UART0_TXD);\n\n}\n\nvoid UART0_Init(void)\n{\n /* Configure UART0 and set UART0 Baudrate */\n UART_Open(UART0, 115200);\n\n /* Enable Interrupt and install the call back function */\n UART_ENABLE_INT(UART0, (UART_INTEN_RDAIEN_Msk | UART_INTEN_THREIEN_Msk | UART_INTEN_RXTOIEN_Msk));\n}\n\n\nvoid UART0_IRQHandler(void)\n{\n uint8_t bInChar;\n int32_t size;\n uint32_t u32IntStatus;\n\n u32IntStatus = UART0->INTSTS;\n\n if((u32IntStatus & UART_INTSTS_RDAIF_Msk) || (u32IntStatus & UART_INTSTS_RXTOIF_Msk))\n {\n /* Receiver FIFO threshold level is reached or Rx time out */\n\n /* Get all the input characters */\n while (!(UART0->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk))\n {\n /* Get the character from UART Buffer */\n bInChar = UART0->DAT;\n\n /* Check if buffer full */\n if(comRbytes < RXBUFSIZE)\n {\n /* Enqueue the character */\n comRbuf[comRtail++] = bInChar;\n if(comRtail >= RXBUFSIZE)\n comRtail = 0;\n comRbytes++;\n }\n else\n {\n /* FIFO over run */\n }\n }\n }\n\n if(u32IntStatus & UART_INTSTS_THREIF_Msk)\n {\n\n if(comTbytes)\n {\n /* Fill the Tx FIFO */\n size = comTbytes;\n if(size >= TX_FIFO_SIZE)\n {\n size = TX_FIFO_SIZE;\n }\n\n while(size)\n {\n bInChar = comTbuf[comThead++];\n UART0->DAT = bInChar;\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n comTbytes--;\n size--;\n }\n }\n else\n {\n /* No more data, just stop Tx (Stop work) */\n UART0->INTEN &= ~UART_INTEN_THREIEN_Msk;\n }\n }\n}\n\nvoid VCOM_TransferData(void)\n{\n int32_t i, i32Len;\n\n /* Check whether USB is ready for next packet or not*/\n if(gu32TxSize == 0)\n {\n /* Check whether we have new COM Rx data to send to USB or not */\n if(comRbytes)\n {\n i32Len = comRbytes;\n if(i32Len > EP2_MAX_PKT_SIZE)\n i32Len = EP2_MAX_PKT_SIZE;\n\n for(i = 0; i < i32Len; i++)\n {\n gRxBuf[i] = comRbuf[comRhead++];\n if(comRhead >= RXBUFSIZE)\n comRhead = 0;\n }\n\n __set_PRIMASK(1);\n comRbytes -= i32Len;\n __set_PRIMASK(0);\n\n gu32TxSize = i32Len;\n USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), (uint8_t *)gRxBuf, i32Len);\n USBD_SET_PAYLOAD_LEN(EP2, i32Len);\n }\n else\n {\n /* Prepare a zero packet if previous packet size is EP2_MAX_PKT_SIZE and\n no more data to send at this moment to note Host the transfer has been done */\n i32Len = USBD_GET_PAYLOAD_LEN(EP2);\n if(i32Len == EP2_MAX_PKT_SIZE)\n USBD_SET_PAYLOAD_LEN(EP2, 0);\n }\n }\n\n /* Process the Bulk out data when bulk out data is ready. */\n if(gi8BulkOutReady && (gu32RxSize <= TXBUFSIZE - comTbytes))\n {\n for(i = 0; i < gu32RxSize; i++)\n {\n comTbuf[comTtail++] = gpu8RxBuf[i];\n if(comTtail >= TXBUFSIZE)\n comTtail = 0;\n }\n\n __set_PRIMASK(1);\n comTbytes += gu32RxSize;\n __set_PRIMASK(0);\n\n gu32RxSize = 0;\n gi8BulkOutReady = 0; /* Clear bulk out ready flag */\n\n /* Ready to get next BULK out */\n USBD_SET_PAYLOAD_LEN(EP3, EP3_MAX_PKT_SIZE);\n }\n\n /* Process the software Tx FIFO */\n if(comTbytes)\n {\n /* Check if Tx is working */\n if((UART0->INTEN & UART_INTEN_THREIEN_Msk) == 0)\n {\n /* Send one bytes out */\n UART0->DAT = comTbuf[comThead++];\n if(comThead >= TXBUFSIZE)\n comThead = 0;\n\n __set_PRIMASK(1);\n comTbytes--;\n __set_PRIMASK(0);\n\n /* Enable Tx Empty Interrupt. (Trigger first one) */\n UART0->INTEN |= UART_INTEN_THREIEN_Msk;\n }\n }\n}\n\n\nint32_t main (void)\n{\n uint32_t u32TrimInit;\n uint32_t au32Config[2];\n\n SYS_Init();\n UART0_Init();\n\n SYS_UnlockReg();\n\n /* Enable FMC ISP function */\n FMC_Open();\n\n /* Check if Data Flash Size is 64K. If not, to re-define Data Flash size and to enable Data Flash function */\n if (FMC_ReadConfig(au32Config, 2) < 0)\n return -1;\n\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE) )\n {\n FMC_ENABLE_CFG_UPDATE();\n au32Config[0] &= ~0x1;\n au32Config[1] = DATA_FLASH_BASE;\n if (FMC_WriteConfig(au32Config, 2) < 0)\n return -1;\n\n FMC_ReadConfig(au32Config, 2);\n if (((au32Config[0] & 0x01) == 1) || (au32Config[1] != DATA_FLASH_BASE))\n {\n printf(\"Error: Program Config Failed!\\n\");\n /* Disable FMC ISP function */\n FMC_Close();\n SYS_LockReg();\n return -1;\n }\n\n /* Reset Chip to reload new CONFIG value */\n SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;\n }\n\n USBD_Open(&gsInfo, VCOM_ClassRequest, NULL);\n USBD_SetConfigCallback(MSC_SetConfig);\n /* Endpoint configuration */\n VCOM_Init();\n USBD_Start();\n\n SYS_UnlockReg();\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n while((USBD->INTSTS & USBD_INTSTS_SOFIF_Msk) == 0);\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n /* Backup default trim */\n u32TrimInit = M32(TRIM_INIT);\n }\n NVIC_EnableIRQ(UART0_IRQn);\n NVIC_EnableIRQ(USBD_IRQn);\n\n while(1)\n {\n if (((SYS->CSERVER & SYS_CSERVER_VERSION_Msk) == 0x1) && (CRYSTAL_LESS))\n {\n /* Start USB trim if it is not enabled. */\n if ((SYS->HIRCTCTL & SYS_HIRCTCTL_FREQSEL_Msk) != 1)\n {\n if(USBD->INTSTS & USBD_INTSTS_SOFIF_Msk)\n {\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n\n /* Re-enable crystal-less */\n SYS->HIRCTCTL = 0x1;\n SYS->HIRCTCTL |= SYS_HIRCTCTL_REFCKSEL_Msk;\n }\n }\n\n /* Disable USB Trim when error */\n if (SYS->HIRCTISTS & (SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk))\n {\n /* Init TRIM */\n M32(TRIM_INIT) = u32TrimInit;\n\n /* Disable crystal-less */\n SYS->HIRCTCTL = 0;\n\n /* Clear error flags */\n SYS->HIRCTISTS = SYS_HIRCTISTS_CLKERRIF_Msk | SYS_HIRCTISTS_TFAILIF_Msk;\n\n /* Clear SOF */\n USBD->INTSTS = USBD_INTSTS_SOFIF_Msk;\n }\n }\n VCOM_TransferData();\n MSC_ProcessCmd();\n }\n}\n\n\n\n/*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/\n\n"}
232
c
/* * Thursday, September 9th 2021 * * <NAME> - <EMAIL> * <NAME> - <EMAIL> * <NAME> - <EMAIL> * <NAME> - <EMAIL> * <NAME> - <EMAIL> * * Vrije Universiteit Amsterdam - Amsterdam, The Netherlands * */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "targets.h" #include "helper.h" uint64_t cpu_support_ibrs(void); uint64_t cpu_support_eibrs(void); uint64_t rdmsr(uint32_t reg, int cpu); uint64_t cpu_ibrs_enabled(void); int main(int argc, char **argv) { printf("cpu_support_ibrs: %lx\n", cpu_support_ibrs()); printf("cpu_support_eibrs: %lx\n", cpu_support_eibrs()); printf("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled()); return 0; } //CPUID leaf=7, subleaf=0, edx[26] //Enumerates support for indirect branch restricted speculation (IBRS) and the indirect branch pre- //dictor barrier (IBPB). Processors that set this bit support the IA32_SPEC_CTRL MSR and the //IA32_PRED_CMD MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and IA32_PRED_CMD[0] //(IBPB). uint64_t cpu_support_ibrs(void) { uint32_t eax, ebx, ecx, edx; cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0); return (edx>>26)&1; } //CPUID leaf=7, subleaf=0, edx[29] //Enumerates support for the IA32_ARCH_CAPABILITIES MSR. // //MSR 10AH: IA32_ARCH_CAPABILITIES //MSR[10AH][1] = IBRS_ALL: The processor supports enhanced IBRS. uint64_t cpu_support_eibrs(void) { uint32_t eax, ebx, ecx, edx; cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0); if ( ((edx>>29)&1) != 1) return 0; return (rdmsr(0x10A, 0)>>1)&1; } //MSR 48H: IA32_SPEC_CTRL //MSR[48H][0] = Indirect Branch Restricted Speculation (IBRS). // Restricts speculation of indirect branch. uint64_t cpu_ibrs_enabled(void) { if(cpu_support_ibrs()) return (rdmsr(0x48, 0)>>0)&1; return 0; }
28.34
65
(translation_unit) "/*\n * Thursday, September 9th 2021\n *\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n *\n * Vrije Universiteit Amsterdam - Amsterdam, The Netherlands\n *\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <sys/types.h>\n#include <sys/stat.h> \n#include <fcntl.h> \n#include <unistd.h> \n#include "targets.h"\n#include "helper.h"\n\nuint64_t cpu_support_ibrs(void);\nuint64_t cpu_support_eibrs(void);\nuint64_t rdmsr(uint32_t reg, int cpu);\nuint64_t cpu_ibrs_enabled(void);\n\nint main(int argc, char **argv)\n{\n printf("cpu_support_ibrs: %lx\n", cpu_support_ibrs());\n printf("cpu_support_eibrs: %lx\n", cpu_support_eibrs());\n printf("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled());\n return 0;\n}\n\n//CPUID leaf=7, subleaf=0, edx[26]\n//Enumerates support for indirect branch restricted speculation (IBRS) and the indirect branch pre-\n//dictor barrier (IBPB). Processors that set this bit support the IA32_SPEC_CTRL MSR and the\n//IA32_PRED_CMD MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and IA32_PRED_CMD[0]\n//(IBPB).\nuint64_t cpu_support_ibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n return (edx>>26)&1;\n}\n\n//CPUID leaf=7, subleaf=0, edx[29]\n//Enumerates support for the IA32_ARCH_CAPABILITIES MSR.\n//\n//MSR 10AH: IA32_ARCH_CAPABILITIES\n//MSR[10AH][1] = IBRS_ALL: The processor supports enhanced IBRS.\nuint64_t cpu_support_eibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n if ( ((edx>>29)&1) != 1)\n return 0;\n return (rdmsr(0x10A, 0)>>1)&1;\n}\n\n//MSR 48H: IA32_SPEC_CTRL\n//MSR[48H][0] = Indirect Branch Restricted Speculation (IBRS).\n// Restricts speculation of indirect branch.\nuint64_t cpu_ibrs_enabled(void)\n{\n if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;\n return 0;\n}\n" (comment) "/*\n * Thursday, September 9th 2021\n *\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n *\n * Vrije Universiteit Amsterdam - Amsterdam, The Netherlands\n *\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.h>" (preproc_include) "#include <sys/stat.h>" (#include) "#include" (system_lib_string) "<sys/stat.h>" (preproc_include) "#include <fcntl.h>" (#include) "#include" (system_lib_string) "<fcntl.h>" (preproc_include) "#include <unistd.h>" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include "targets.h"\n" (#include) "#include" (string_literal) ""targets.h"" (") """ (string_content) "targets.h" (") """ (preproc_include) "#include "helper.h"\n" (#include) "#include" (string_literal) ""helper.h"" (") """ (string_content) "helper.h" (") """ (declaration) "uint64_t cpu_support_ibrs(void);" (primitive_type) "uint64_t" (function_declarator) "cpu_support_ibrs(void)" (identifier) "cpu_support_ibrs" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "uint64_t cpu_support_eibrs(void);" (primitive_type) "uint64_t" (function_declarator) "cpu_support_eibrs(void)" (identifier) "cpu_support_eibrs" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "uint64_t rdmsr(uint32_t reg, int cpu);" (primitive_type) "uint64_t" (function_declarator) "rdmsr(uint32_t reg, int cpu)" (identifier) "rdmsr" (parameter_list) "(uint32_t reg, int cpu)" (() "(" (parameter_declaration) "uint32_t reg" (primitive_type) "uint32_t" (identifier) "reg" (,) "," (parameter_declaration) "int cpu" (primitive_type) "int" (identifier) "cpu" ()) ")" (;) ";" (declaration) "uint64_t cpu_ibrs_enabled(void);" (primitive_type) "uint64_t" (function_declarator) "cpu_ibrs_enabled(void)" (identifier) "cpu_ibrs_enabled" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (function_definition) "int main(int argc, char **argv)\n{\n printf("cpu_support_ibrs: %lx\n", cpu_support_ibrs());\n printf("cpu_support_eibrs: %lx\n", cpu_support_eibrs());\n printf("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled());\n return 0;\n}" (primitive_type) "int" (function_declarator) "main(int argc, char **argv)" (identifier) "main" (parameter_list) "(int argc, char **argv)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char **argv" (primitive_type) "char" (pointer_declarator) "**argv" (*) "*" (pointer_declarator) "*argv" (*) "*" (identifier) "argv" ()) ")" (compound_statement) "{\n printf("cpu_support_ibrs: %lx\n", cpu_support_ibrs());\n printf("cpu_support_eibrs: %lx\n", cpu_support_eibrs());\n printf("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled());\n return 0;\n}" ({) "{" (expression_statement) "printf("cpu_support_ibrs: %lx\n", cpu_support_ibrs());" (call_expression) "printf("cpu_support_ibrs: %lx\n", cpu_support_ibrs())" (identifier) "printf" (argument_list) "("cpu_support_ibrs: %lx\n", cpu_support_ibrs())" (() "(" (string_literal) ""cpu_support_ibrs: %lx\n"" (") """ (string_content) "cpu_support_ibrs: %lx" (escape_sequence) "\n" (") """ (,) "," (call_expression) "cpu_support_ibrs()" (identifier) "cpu_support_ibrs" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "printf("cpu_support_eibrs: %lx\n", cpu_support_eibrs());" (call_expression) "printf("cpu_support_eibrs: %lx\n", cpu_support_eibrs())" (identifier) "printf" (argument_list) "("cpu_support_eibrs: %lx\n", cpu_support_eibrs())" (() "(" (string_literal) ""cpu_support_eibrs: %lx\n"" (") """ (string_content) "cpu_support_eibrs: %lx" (escape_sequence) "\n" (") """ (,) "," (call_expression) "cpu_support_eibrs()" (identifier) "cpu_support_eibrs" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "printf("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled());" (call_expression) "printf("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled())" (identifier) "printf" (argument_list) "("cpu_(e)ibrs_enabled: %lx\n", cpu_ibrs_enabled())" (() "(" (string_literal) ""cpu_(e)ibrs_enabled: %lx\n"" (") """ (string_content) "cpu_(e)ibrs_enabled: %lx" (escape_sequence) "\n" (") """ (,) "," (call_expression) "cpu_ibrs_enabled()" (identifier) "cpu_ibrs_enabled" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (comment) "//CPUID leaf=7, subleaf=0, edx[26]" (comment) "//Enumerates support for indirect branch restricted speculation (IBRS) and the indirect branch pre-" (comment) "//dictor barrier (IBPB). Processors that set this bit support the IA32_SPEC_CTRL MSR and the" (comment) "//IA32_PRED_CMD MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and IA32_PRED_CMD[0]" (comment) "//(IBPB)." (function_definition) "uint64_t cpu_support_ibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n return (edx>>26)&1;\n}" (primitive_type) "uint64_t" (function_declarator) "cpu_support_ibrs(void)" (identifier) "cpu_support_ibrs" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n return (edx>>26)&1;\n}" ({) "{" (declaration) "uint32_t eax, ebx, ecx, edx;" (primitive_type) "uint32_t" (identifier) "eax" (,) "," (identifier) "ebx" (,) "," (identifier) "ecx" (,) "," (identifier) "edx" (;) ";" (expression_statement) "cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);" (call_expression) "cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0)" (identifier) "cpuid" (argument_list) "(&eax, &ebx, &ecx, &edx, 0x07, 0x0)" (() "(" (pointer_expression) "&eax" (&) "&" (identifier) "eax" (,) "," (pointer_expression) "&ebx" (&) "&" (identifier) "ebx" (,) "," (pointer_expression) "&ecx" (&) "&" (identifier) "ecx" (,) "," (pointer_expression) "&edx" (&) "&" (identifier) "edx" (,) "," (number_literal) "0x07" (,) "," (number_literal) "0x0" ()) ")" (;) ";" (return_statement) "return (edx>>26)&1;" (return) "return" (binary_expression) "(edx>>26)&1" (parenthesized_expression) "(edx>>26)" (() "(" (binary_expression) "edx>>26" (identifier) "edx" (>>) ">>" (number_literal) "26" ()) ")" (&) "&" (number_literal) "1" (;) ";" (}) "}" (comment) "//CPUID leaf=7, subleaf=0, edx[29]" (comment) "//Enumerates support for the IA32_ARCH_CAPABILITIES MSR." (comment) "//" (comment) "//MSR 10AH: IA32_ARCH_CAPABILITIES" (comment) "//MSR[10AH][1] = IBRS_ALL: The processor supports enhanced IBRS." (function_definition) "uint64_t cpu_support_eibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n if ( ((edx>>29)&1) != 1)\n return 0;\n return (rdmsr(0x10A, 0)>>1)&1;\n}" (primitive_type) "uint64_t" (function_declarator) "cpu_support_eibrs(void)" (identifier) "cpu_support_eibrs" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n if ( ((edx>>29)&1) != 1)\n return 0;\n return (rdmsr(0x10A, 0)>>1)&1;\n}" ({) "{" (declaration) "uint32_t eax, ebx, ecx, edx;" (primitive_type) "uint32_t" (identifier) "eax" (,) "," (identifier) "ebx" (,) "," (identifier) "ecx" (,) "," (identifier) "edx" (;) ";" (expression_statement) "cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);" (call_expression) "cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0)" (identifier) "cpuid" (argument_list) "(&eax, &ebx, &ecx, &edx, 0x07, 0x0)" (() "(" (pointer_expression) "&eax" (&) "&" (identifier) "eax" (,) "," (pointer_expression) "&ebx" (&) "&" (identifier) "ebx" (,) "," (pointer_expression) "&ecx" (&) "&" (identifier) "ecx" (,) "," (pointer_expression) "&edx" (&) "&" (identifier) "edx" (,) "," (number_literal) "0x07" (,) "," (number_literal) "0x0" ()) ")" (;) ";" (if_statement) "if ( ((edx>>29)&1) != 1)\n return 0;" (if) "if" (parenthesized_expression) "( ((edx>>29)&1) != 1)" (() "(" (binary_expression) "((edx>>29)&1) != 1" (parenthesized_expression) "((edx>>29)&1)" (() "(" (binary_expression) "(edx>>29)&1" (parenthesized_expression) "(edx>>29)" (() "(" (binary_expression) "edx>>29" (identifier) "edx" (>>) ">>" (number_literal) "29" ()) ")" (&) "&" (number_literal) "1" ()) ")" (!=) "!=" (number_literal) "1" ()) ")" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (return_statement) "return (rdmsr(0x10A, 0)>>1)&1;" (return) "return" (binary_expression) "(rdmsr(0x10A, 0)>>1)&1" (parenthesized_expression) "(rdmsr(0x10A, 0)>>1)" (() "(" (binary_expression) "rdmsr(0x10A, 0)>>1" (call_expression) "rdmsr(0x10A, 0)" (identifier) "rdmsr" (argument_list) "(0x10A, 0)" (() "(" (number_literal) "0x10A" (,) "," (number_literal) "0" ()) ")" (>>) ">>" (number_literal) "1" ()) ")" (&) "&" (number_literal) "1" (;) ";" (}) "}" (comment) "//MSR 48H: IA32_SPEC_CTRL" (comment) "//MSR[48H][0] = Indirect Branch Restricted Speculation (IBRS)." (comment) "// Restricts speculation of indirect branch." (function_definition) "uint64_t cpu_ibrs_enabled(void)\n{\n if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;\n return 0;\n}" (primitive_type) "uint64_t" (function_declarator) "cpu_ibrs_enabled(void)" (identifier) "cpu_ibrs_enabled" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;\n return 0;\n}" ({) "{" (if_statement) "if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;" (if) "if" (parenthesized_expression) "(cpu_support_ibrs())" (() "(" (call_expression) "cpu_support_ibrs()" (identifier) "cpu_support_ibrs" (argument_list) "()" (() "(" ()) ")" ()) ")" (return_statement) "return (rdmsr(0x48, 0)>>0)&1;" (return) "return" (binary_expression) "(rdmsr(0x48, 0)>>0)&1" (parenthesized_expression) "(rdmsr(0x48, 0)>>0)" (() "(" (binary_expression) "rdmsr(0x48, 0)>>0" (call_expression) "rdmsr(0x48, 0)" (identifier) "rdmsr" (argument_list) "(0x48, 0)" (() "(" (number_literal) "0x48" (,) "," (number_literal) "0" ()) ")" (>>) ">>" (number_literal) "0" ()) ")" (&) "&" (number_literal) "1" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
372
0
{"language": "c", "success": true, "metadata": {"lines": 65, "avg_line_length": 28.34, "nodes": 213, "errors": 0, "source_hash": "a732d19fc5038a7f511eda116dc34439728d8547e306ca607a2d8693edc618b0", "categorized_nodes": 162}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.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": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <sys/types.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<sys/types.h>", "parent": 9, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "#include <sys/stat.h>", "parent": null, "children": [13, 14], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 21}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<sys/stat.h>", "parent": 12, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 21}}, {"id": 15, "type": "preproc_include", "text": "#include <fcntl.h>", "parent": null, "children": [16, 17], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 18}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<fcntl.h>", "parent": 15, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include <unistd.h>", "parent": null, "children": [19, 20], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 19}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<unistd.h>", "parent": 18, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 19}}, {"id": 21, "type": "preproc_include", "text": "#include \"targets.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"targets.h\"", "parent": 21, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 20}}, {"id": 24, "type": "preproc_include", "text": "#include \"helper.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"helper.h\"", "parent": 24, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 19}}, {"id": 27, "type": "declaration", "text": "uint64_t cpu_support_ibrs(void);", "parent": null, "children": [28, 29], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 32}}, {"id": 28, "type": "primitive_type", "text": "uint64_t", "parent": 27, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 29, "type": "function_declarator", "text": "cpu_support_ibrs(void)", "parent": 27, "children": [30, 31], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 31}}, {"id": 30, "type": "identifier", "text": "cpu_support_ibrs", "parent": 29, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 25}}, {"id": 31, "type": "parameter_list", "text": "(void)", "parent": 29, "children": [32], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 31}}, {"id": 32, "type": "parameter_declaration", "text": "void", "parent": 31, "children": [33], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 30}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 30}}, {"id": 34, "type": "declaration", "text": "uint64_t cpu_support_eibrs(void);", "parent": null, "children": [35, 36], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 33}}, {"id": 35, "type": "primitive_type", "text": "uint64_t", "parent": 34, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 36, "type": "function_declarator", "text": "cpu_support_eibrs(void)", "parent": 34, "children": [37, 38], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 32}}, {"id": 37, "type": "identifier", "text": "cpu_support_eibrs", "parent": 36, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 26}}, {"id": 38, "type": "parameter_list", "text": "(void)", "parent": 36, "children": [39], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 32}}, {"id": 39, "type": "parameter_declaration", "text": "void", "parent": 38, "children": [40], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 31}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 31}}, {"id": 41, "type": "declaration", "text": "uint64_t rdmsr(uint32_t reg, int cpu);", "parent": null, "children": [42, 43], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 38}}, {"id": 42, "type": "primitive_type", "text": "uint64_t", "parent": 41, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 43, "type": "function_declarator", "text": "rdmsr(uint32_t reg, int cpu)", "parent": 41, "children": [44, 45], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 37}}, {"id": 44, "type": "identifier", "text": "rdmsr", "parent": 43, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 14}}, {"id": 45, "type": "parameter_list", "text": "(uint32_t reg, int cpu)", "parent": 43, "children": [46, 49], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 37}}, {"id": 46, "type": "parameter_declaration", "text": "uint32_t reg", "parent": 45, "children": [47, 48], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 27}}, {"id": 47, "type": "primitive_type", "text": "uint32_t", "parent": 46, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 23}}, {"id": 48, "type": "identifier", "text": "reg", "parent": 46, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 27}}, {"id": 49, "type": "parameter_declaration", "text": "int cpu", "parent": 45, "children": [50, 51], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 25, "column": 36}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 49, "children": [], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 25, "column": 32}}, {"id": 51, "type": "identifier", "text": "cpu", "parent": 49, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 36}}, {"id": 52, "type": "declaration", "text": "uint64_t cpu_ibrs_enabled(void);", "parent": null, "children": [53, 54], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 32}}, {"id": 53, "type": "primitive_type", "text": "uint64_t", "parent": 52, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 54, "type": "function_declarator", "text": "cpu_ibrs_enabled(void)", "parent": 52, "children": [55, 56], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 31}}, {"id": 55, "type": "identifier", "text": "cpu_ibrs_enabled", "parent": 54, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 25}}, {"id": 56, "type": "parameter_list", "text": "(void)", "parent": 54, "children": [57], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 31}}, {"id": 57, "type": "parameter_declaration", "text": "void", "parent": 56, "children": [58], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 30}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 30}}, {"id": 59, "type": "function_definition", "text": "int main(int argc, char **argv)\n{\n printf(\"cpu_support_ibrs: %lx\\n\", cpu_support_ibrs());\n printf(\"cpu_support_eibrs: %lx\\n\", cpu_support_eibrs());\n printf(\"cpu_(e)ibrs_enabled: %lx\\n\", cpu_ibrs_enabled());\n return 0;\n}", "parent": null, "children": [60, 61], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 60, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 3}}, {"id": 61, "type": "function_declarator", "text": "main(int argc, char **argv)", "parent": 59, "children": [62, 63], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 31}}, {"id": 62, "type": "identifier", "text": "main", "parent": 61, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 63, "type": "parameter_list", "text": "(int argc, char **argv)", "parent": 61, "children": [64, 67], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 31}}, {"id": 64, "type": "parameter_declaration", "text": "int argc", "parent": 63, "children": [65, 66], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 17}}, {"id": 65, "type": "primitive_type", "text": "int", "parent": 64, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 12}}, {"id": 66, "type": "identifier", "text": "argc", "parent": 64, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 17}}, {"id": 67, "type": "parameter_declaration", "text": "char **argv", "parent": 63, "children": [68, 69], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 30}}, {"id": 68, "type": "primitive_type", "text": "char", "parent": 67, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 23}}, {"id": 69, "type": "pointer_declarator", "text": "**argv", "parent": 67, "children": [70, 71], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 30}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 25}}, {"id": 71, "type": "pointer_declarator", "text": "*argv", "parent": 69, "children": [72, 73], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 30}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 26}}, {"id": 73, "type": "identifier", "text": "argv", "parent": 71, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 30}}, {"id": 74, "type": "call_expression", "text": "printf(\"cpu_support_ibrs: %lx\\n\", cpu_support_ibrs())", "parent": 59, "children": [75, 76], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 62}}, {"id": 75, "type": "identifier", "text": "printf", "parent": 74, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 10}}, {"id": 76, "type": "argument_list", "text": "(\"cpu_support_ibrs: %lx\\n\", cpu_support_ibrs())", "parent": 74, "children": [77, 79], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 62}}, {"id": 77, "type": "string_literal", "text": "\"cpu_support_ibrs: %lx\\n\"", "parent": 76, "children": [78], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 41}}, {"id": 78, "type": "escape_sequence", "text": "\\n", "parent": 77, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 40}}, {"id": 79, "type": "call_expression", "text": "cpu_support_ibrs()", "parent": 76, "children": [80, 81], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 61}}, {"id": 80, "type": "identifier", "text": "cpu_support_ibrs", "parent": 79, "children": [], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 59}}, {"id": 81, "type": "argument_list", "text": "()", "parent": 79, "children": [], "start_point": {"row": 30, "column": 59}, "end_point": {"row": 30, "column": 61}}, {"id": 82, "type": "call_expression", "text": "printf(\"cpu_support_eibrs: %lx\\n\", cpu_support_eibrs())", "parent": 59, "children": [83, 84], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 63}}, {"id": 83, "type": "identifier", "text": "printf", "parent": 82, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 10}}, {"id": 84, "type": "argument_list", "text": "(\"cpu_support_eibrs: %lx\\n\", cpu_support_eibrs())", "parent": 82, "children": [85, 87], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 63}}, {"id": 85, "type": "string_literal", "text": "\"cpu_support_eibrs: %lx\\n\"", "parent": 84, "children": [86], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 41}}, {"id": 86, "type": "escape_sequence", "text": "\\n", "parent": 85, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 40}}, {"id": 87, "type": "call_expression", "text": "cpu_support_eibrs()", "parent": 84, "children": [88, 89], "start_point": {"row": 31, "column": 43}, "end_point": {"row": 31, "column": 62}}, {"id": 88, "type": "identifier", "text": "cpu_support_eibrs", "parent": 87, "children": [], "start_point": {"row": 31, "column": 43}, "end_point": {"row": 31, "column": 60}}, {"id": 89, "type": "argument_list", "text": "()", "parent": 87, "children": [], "start_point": {"row": 31, "column": 60}, "end_point": {"row": 31, "column": 62}}, {"id": 90, "type": "call_expression", "text": "printf(\"cpu_(e)ibrs_enabled: %lx\\n\", cpu_ibrs_enabled())", "parent": 59, "children": [91, 92], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 62}}, {"id": 91, "type": "identifier", "text": "printf", "parent": 90, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 10}}, {"id": 92, "type": "argument_list", "text": "(\"cpu_(e)ibrs_enabled: %lx\\n\", cpu_ibrs_enabled())", "parent": 90, "children": [93, 95], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 62}}, {"id": 93, "type": "string_literal", "text": "\"cpu_(e)ibrs_enabled: %lx\\n\"", "parent": 92, "children": [94], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 41}}, {"id": 94, "type": "escape_sequence", "text": "\\n", "parent": 93, "children": [], "start_point": {"row": 32, "column": 38}, "end_point": {"row": 32, "column": 40}}, {"id": 95, "type": "call_expression", "text": "cpu_ibrs_enabled()", "parent": 92, "children": [96, 97], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 61}}, {"id": 96, "type": "identifier", "text": "cpu_ibrs_enabled", "parent": 95, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 59}}, {"id": 97, "type": "argument_list", "text": "()", "parent": 95, "children": [], "start_point": {"row": 32, "column": 59}, "end_point": {"row": 32, "column": 61}}, {"id": 98, "type": "return_statement", "text": "return 0;", "parent": 59, "children": [99], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 13}}, {"id": 99, "type": "number_literal", "text": "0", "parent": 98, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}, {"id": 100, "type": "function_definition", "text": "uint64_t cpu_support_ibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n return (edx>>26)&1;\n}", "parent": null, "children": [101, 102], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 101, "type": "primitive_type", "text": "uint64_t", "parent": 100, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 102, "type": "function_declarator", "text": "cpu_support_ibrs(void)", "parent": 100, "children": [103, 104], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 31}}, {"id": 103, "type": "identifier", "text": "cpu_support_ibrs", "parent": 102, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 25}}, {"id": 104, "type": "parameter_list", "text": "(void)", "parent": 102, "children": [105], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 31}}, {"id": 105, "type": "parameter_declaration", "text": "void", "parent": 104, "children": [106], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 30}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 30}}, {"id": 107, "type": "declaration", "text": "uint32_t eax, ebx, ecx, edx;", "parent": 100, "children": [108, 109, 110, 111, 112], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 32}}, {"id": 108, "type": "primitive_type", "text": "uint32_t", "parent": 107, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 12}}, {"id": 109, "type": "identifier", "text": "eax", "parent": 107, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 16}}, {"id": 110, "type": "identifier", "text": "ebx", "parent": 107, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 21}}, {"id": 111, "type": "identifier", "text": "ecx", "parent": 107, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 26}}, {"id": 112, "type": "identifier", "text": "edx", "parent": 107, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 31}}, {"id": 113, "type": "call_expression", "text": "cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0)", "parent": 100, "children": [114, 115], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 44}}, {"id": 114, "type": "identifier", "text": "cpuid", "parent": 113, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 115, "type": "argument_list", "text": "(&eax, &ebx, &ecx, &edx, 0x07, 0x0)", "parent": 113, "children": [116, 118, 120, 122, 124, 125], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 44}}, {"id": 116, "type": "pointer_expression", "text": "&eax", "parent": 115, "children": [117], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 14}}, {"id": 117, "type": "identifier", "text": "eax", "parent": 116, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 14}}, {"id": 118, "type": "pointer_expression", "text": "&ebx", "parent": 115, "children": [119], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 20}}, {"id": 119, "type": "identifier", "text": "ebx", "parent": 118, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 20}}, {"id": 120, "type": "pointer_expression", "text": "&ecx", "parent": 115, "children": [121], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 26}}, {"id": 121, "type": "identifier", "text": "ecx", "parent": 120, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 26}}, {"id": 122, "type": "pointer_expression", "text": "&edx", "parent": 115, "children": [123], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 32}}, {"id": 123, "type": "identifier", "text": "edx", "parent": 122, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 32}}, {"id": 124, "type": "number_literal", "text": "0x07", "parent": 115, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 38}}, {"id": 125, "type": "number_literal", "text": "0x0", "parent": 115, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 43}}, {"id": 126, "type": "return_statement", "text": "return (edx>>26)&1;", "parent": 100, "children": [127], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 23}}, {"id": 127, "type": "binary_expression", "text": "(edx>>26)&1", "parent": 126, "children": [128, 133], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 22}}, {"id": 128, "type": "parenthesized_expression", "text": "(edx>>26)", "parent": 127, "children": [129], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 20}}, {"id": 129, "type": "binary_expression", "text": "edx>>26", "parent": 128, "children": [130, 131, 132], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 19}}, {"id": 130, "type": "identifier", "text": "edx", "parent": 129, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 15}}, {"id": 131, "type": ">>", "text": ">>", "parent": 129, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 17}}, {"id": 132, "type": "number_literal", "text": "26", "parent": 129, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 19}}, {"id": 133, "type": "number_literal", "text": "1", "parent": 127, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 22}}, {"id": 134, "type": "function_definition", "text": "uint64_t cpu_support_eibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n if ( ((edx>>29)&1) != 1)\n return 0;\n return (rdmsr(0x10A, 0)>>1)&1;\n}", "parent": null, "children": [135, 136], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 135, "type": "primitive_type", "text": "uint64_t", "parent": 134, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 8}}, {"id": 136, "type": "function_declarator", "text": "cpu_support_eibrs(void)", "parent": 134, "children": [137, 138], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 32}}, {"id": 137, "type": "identifier", "text": "cpu_support_eibrs", "parent": 136, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 26}}, {"id": 138, "type": "parameter_list", "text": "(void)", "parent": 136, "children": [139], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 32}}, {"id": 139, "type": "parameter_declaration", "text": "void", "parent": 138, "children": [140], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 31}}, {"id": 140, "type": "primitive_type", "text": "void", "parent": 139, "children": [], "start_point": {"row": 53, "column": 27}, "end_point": {"row": 53, "column": 31}}, {"id": 141, "type": "declaration", "text": "uint32_t eax, ebx, ecx, edx;", "parent": 134, "children": [142, 143, 144, 145, 146], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 32}}, {"id": 142, "type": "primitive_type", "text": "uint32_t", "parent": 141, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 12}}, {"id": 143, "type": "identifier", "text": "eax", "parent": 141, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 16}}, {"id": 144, "type": "identifier", "text": "ebx", "parent": 141, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 21}}, {"id": 145, "type": "identifier", "text": "ecx", "parent": 141, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 26}}, {"id": 146, "type": "identifier", "text": "edx", "parent": 141, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 31}}, {"id": 147, "type": "call_expression", "text": "cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0)", "parent": 134, "children": [148, 149], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 44}}, {"id": 148, "type": "identifier", "text": "cpuid", "parent": 147, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 9}}, {"id": 149, "type": "argument_list", "text": "(&eax, &ebx, &ecx, &edx, 0x07, 0x0)", "parent": 147, "children": [150, 152, 154, 156, 158, 159], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 44}}, {"id": 150, "type": "pointer_expression", "text": "&eax", "parent": 149, "children": [151], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 14}}, {"id": 151, "type": "identifier", "text": "eax", "parent": 150, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 14}}, {"id": 152, "type": "pointer_expression", "text": "&ebx", "parent": 149, "children": [153], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 20}}, {"id": 153, "type": "identifier", "text": "ebx", "parent": 152, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 20}}, {"id": 154, "type": "pointer_expression", "text": "&ecx", "parent": 149, "children": [155], "start_point": {"row": 56, "column": 22}, "end_point": {"row": 56, "column": 26}}, {"id": 155, "type": "identifier", "text": "ecx", "parent": 154, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 26}}, {"id": 156, "type": "pointer_expression", "text": "&edx", "parent": 149, "children": [157], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 32}}, {"id": 157, "type": "identifier", "text": "edx", "parent": 156, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 32}}, {"id": 158, "type": "number_literal", "text": "0x07", "parent": 149, "children": [], "start_point": {"row": 56, "column": 34}, "end_point": {"row": 56, "column": 38}}, {"id": 159, "type": "number_literal", "text": "0x0", "parent": 149, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 43}}, {"id": 160, "type": "if_statement", "text": "if ( ((edx>>29)&1) != 1)\n return 0;", "parent": 134, "children": [161, 173], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 58, "column": 17}}, {"id": 161, "type": "parenthesized_expression", "text": "( ((edx>>29)&1) != 1)", "parent": 160, "children": [162], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 28}}, {"id": 162, "type": "binary_expression", "text": "((edx>>29)&1) != 1", "parent": 161, "children": [163, 171, 172], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 27}}, {"id": 163, "type": "parenthesized_expression", "text": "((edx>>29)&1)", "parent": 162, "children": [164], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 22}}, {"id": 164, "type": "binary_expression", "text": "(edx>>29)&1", "parent": 163, "children": [165, 170], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 21}}, {"id": 165, "type": "parenthesized_expression", "text": "(edx>>29)", "parent": 164, "children": [166], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 19}}, {"id": 166, "type": "binary_expression", "text": "edx>>29", "parent": 165, "children": [167, 168, 169], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 18}}, {"id": 167, "type": "identifier", "text": "edx", "parent": 166, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 14}}, {"id": 168, "type": ">>", "text": ">>", "parent": 166, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 16}}, {"id": 169, "type": "number_literal", "text": "29", "parent": 166, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 18}}, {"id": 170, "type": "number_literal", "text": "1", "parent": 164, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 21}}, {"id": 171, "type": "!=", "text": "!=", "parent": 162, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 25}}, {"id": 172, "type": "number_literal", "text": "1", "parent": 162, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 27}}, {"id": 173, "type": "return_statement", "text": "return 0;", "parent": 160, "children": [174], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 17}}, {"id": 174, "type": "number_literal", "text": "0", "parent": 173, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 16}}, {"id": 175, "type": "return_statement", "text": "return (rdmsr(0x10A, 0)>>1)&1;", "parent": 134, "children": [176], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 34}}, {"id": 176, "type": "binary_expression", "text": "(rdmsr(0x10A, 0)>>1)&1", "parent": 175, "children": [177, 186], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 33}}, {"id": 177, "type": "parenthesized_expression", "text": "(rdmsr(0x10A, 0)>>1)", "parent": 176, "children": [178], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 31}}, {"id": 178, "type": "binary_expression", "text": "rdmsr(0x10A, 0)>>1", "parent": 177, "children": [179, 184, 185], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 30}}, {"id": 179, "type": "call_expression", "text": "rdmsr(0x10A, 0)", "parent": 178, "children": [180, 181], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 27}}, {"id": 180, "type": "identifier", "text": "rdmsr", "parent": 179, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 17}}, {"id": 181, "type": "argument_list", "text": "(0x10A, 0)", "parent": 179, "children": [182, 183], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 27}}, {"id": 182, "type": "number_literal", "text": "0x10A", "parent": 181, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 23}}, {"id": 183, "type": "number_literal", "text": "0", "parent": 181, "children": [], "start_point": {"row": 59, "column": 25}, "end_point": {"row": 59, "column": 26}}, {"id": 184, "type": ">>", "text": ">>", "parent": 178, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 29}}, {"id": 185, "type": "number_literal", "text": "1", "parent": 178, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 30}}, {"id": 186, "type": "number_literal", "text": "1", "parent": 176, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 33}}, {"id": 187, "type": "function_definition", "text": "uint64_t cpu_ibrs_enabled(void)\n{\n if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;\n return 0;\n}", "parent": null, "children": [188, 189], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 188, "type": "primitive_type", "text": "uint64_t", "parent": 187, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 8}}, {"id": 189, "type": "function_declarator", "text": "cpu_ibrs_enabled(void)", "parent": 187, "children": [190, 191], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 31}}, {"id": 190, "type": "identifier", "text": "cpu_ibrs_enabled", "parent": 189, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 25}}, {"id": 191, "type": "parameter_list", "text": "(void)", "parent": 189, "children": [192], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 31}}, {"id": 192, "type": "parameter_declaration", "text": "void", "parent": 191, "children": [193], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 30}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 30}}, {"id": 194, "type": "if_statement", "text": "if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;", "parent": 187, "children": [195, 199], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 68, "column": 37}}, {"id": 195, "type": "parenthesized_expression", "text": "(cpu_support_ibrs())", "parent": 194, "children": [196], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 26}}, {"id": 196, "type": "call_expression", "text": "cpu_support_ibrs()", "parent": 195, "children": [197, 198], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 25}}, {"id": 197, "type": "identifier", "text": "cpu_support_ibrs", "parent": 196, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 23}}, {"id": 198, "type": "argument_list", "text": "()", "parent": 196, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 25}}, {"id": 199, "type": "return_statement", "text": "return (rdmsr(0x48, 0)>>0)&1;", "parent": 194, "children": [200], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 37}}, {"id": 200, "type": "binary_expression", "text": "(rdmsr(0x48, 0)>>0)&1", "parent": 199, "children": [201, 210], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 36}}, {"id": 201, "type": "parenthesized_expression", "text": "(rdmsr(0x48, 0)>>0)", "parent": 200, "children": [202], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 34}}, {"id": 202, "type": "binary_expression", "text": "rdmsr(0x48, 0)>>0", "parent": 201, "children": [203, 208, 209], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 33}}, {"id": 203, "type": "call_expression", "text": "rdmsr(0x48, 0)", "parent": 202, "children": [204, 205], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 30}}, {"id": 204, "type": "identifier", "text": "rdmsr", "parent": 203, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 21}}, {"id": 205, "type": "argument_list", "text": "(0x48, 0)", "parent": 203, "children": [206, 207], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 30}}, {"id": 206, "type": "number_literal", "text": "0x48", "parent": 205, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 26}}, {"id": 207, "type": "number_literal", "text": "0", "parent": 205, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 29}}, {"id": 208, "type": ">>", "text": ">>", "parent": 202, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 32}}, {"id": 209, "type": "number_literal", "text": "0", "parent": 202, "children": [], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 33}}, {"id": 210, "type": "number_literal", "text": "1", "parent": 200, "children": [], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 36}}, {"id": 211, "type": "return_statement", "text": "return 0;", "parent": 187, "children": [212], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 13}}, {"id": 212, "type": "number_literal", "text": "0", "parent": 211, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 12}}]}, "node_categories": {"declarations": {"functions": [29, 36, 43, 54, 59, 61, 100, 102, 134, 136, 187, 189], "variables": [27, 32, 34, 39, 41, 46, 49, 52, 57, 64, 67, 105, 107, 139, 141, 192], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [74, 79, 82, 87, 90, 95, 113, 116, 118, 120, 122, 127, 128, 129, 147, 150, 152, 154, 156, 161, 162, 163, 164, 165, 166, 176, 177, 178, 179, 195, 196, 200, 201, 202, 203], "assignments": [], "loops": [], "conditionals": [30, 37, 44, 48, 51, 55, 62, 66, 73, 75, 80, 83, 88, 91, 96, 103, 109, 110, 111, 112, 114, 117, 119, 121, 123, 130, 137, 143, 144, 145, 146, 148, 151, 153, 155, 157, 160, 167, 180, 190, 194, 197, 204], "returns": [98, 126, 173, 175, 199, 211], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 77, 85, 93, 99, 124, 125, 132, 133, 158, 159, 169, 170, 172, 174, 182, 183, 185, 186, 206, 207, 209, 210, 212], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "cpu_support_ibrs(void)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "cpu_support_eibrs(void)"}, {"node_id": 43, "universal_type": "function", "name": "cpu)", "text_snippet": "rdmsr(uint32_t reg, int cpu)"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "cpu_ibrs_enabled(void)"}, {"node_id": 59, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char **argv)\n{\n printf(\"cpu_support_ibrs: %lx\\n\", cpu_support_ibrs());\n "}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char **argv)"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t cpu_support_ibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx,"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "cpu_support_ibrs(void)"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t cpu_support_eibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "cpu_support_eibrs(void)"}, {"node_id": 187, "universal_type": "function", "name": "unknown", "text_snippet": "uint64_t cpu_ibrs_enabled(void)\n{\n if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;\n "}, {"node_id": 189, "universal_type": "function", "name": "unknown", "text_snippet": "cpu_ibrs_enabled(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sys/types.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <sys/stat.h>"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <fcntl.h>"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <unistd.h>"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"targets.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"helper.h\"\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "/*\n * Thursday, September 9th 2021\n *\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n * <NAME> - <EMAIL>\n *\n * Vrije Universiteit Amsterdam - Amsterdam, The Netherlands\n *\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <sys/types.h>\n#include <sys/stat.h> \n#include <fcntl.h> \n#include <unistd.h> \n#include \"targets.h\"\n#include \"helper.h\"\n\nuint64_t cpu_support_ibrs(void);\nuint64_t cpu_support_eibrs(void);\nuint64_t rdmsr(uint32_t reg, int cpu);\nuint64_t cpu_ibrs_enabled(void);\n\nint main(int argc, char **argv)\n{\n printf(\"cpu_support_ibrs: %lx\\n\", cpu_support_ibrs());\n printf(\"cpu_support_eibrs: %lx\\n\", cpu_support_eibrs());\n printf(\"cpu_(e)ibrs_enabled: %lx\\n\", cpu_ibrs_enabled());\n return 0;\n}\n\n//CPUID leaf=7, subleaf=0, edx[26]\n//Enumerates support for indirect branch restricted speculation (IBRS) and the indirect branch pre-\n//dictor barrier (IBPB). Processors that set this bit support the IA32_SPEC_CTRL MSR and the\n//IA32_PRED_CMD MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and IA32_PRED_CMD[0]\n//(IBPB).\nuint64_t cpu_support_ibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n return (edx>>26)&1;\n}\n\n//CPUID leaf=7, subleaf=0, edx[29]\n//Enumerates support for the IA32_ARCH_CAPABILITIES MSR.\n//\n//MSR 10AH: IA32_ARCH_CAPABILITIES\n//MSR[10AH][1] = IBRS_ALL: The processor supports enhanced IBRS.\nuint64_t cpu_support_eibrs(void)\n{\n uint32_t eax, ebx, ecx, edx;\n cpuid(&eax, &ebx, &ecx, &edx, 0x07, 0x0);\n if ( ((edx>>29)&1) != 1)\n return 0;\n return (rdmsr(0x10A, 0)>>1)&1;\n}\n\n//MSR 48H: IA32_SPEC_CTRL\n//MSR[48H][0] = Indirect Branch Restricted Speculation (IBRS).\n// Restricts speculation of indirect branch.\nuint64_t cpu_ibrs_enabled(void)\n{\n if(cpu_support_ibrs())\n return (rdmsr(0x48, 0)>>0)&1;\n return 0;\n}\n"}
233
c
#ifndef TOKEN_H #define TOKEN_H #include "location.h" #include <cassert> #include <string> #include <fstream> #include <cstdint> class Token { public: enum TokenType { // Values of different types Integer, Real, StringLiteral, Char, Boolean, // Type/var/const declarations: Type, Var, Packed, Array, Of, Record, Class, Identifier, Const, File, Set, String, Nil, // Symbols and such LeftParen, RightParen, LeftSquare, RightSquare, Plus, Minus, Multiply, Divide, Comma, Semicolon, Colon, Assign, Period, DotDot, Uparrow, Div, Mod, Xor, Shr, Shl, // Comparison symbols - these return bool in binary ops. LessOrEqual, FirstComparison = LessOrEqual, LessThan, GreaterOrEqual, GreaterThan, Equal, NotEqual, In, LastComparison = In, // Keywords For, To, Downto, Do, If, Then, Else, While, Repeat, Until, Function, Procedure, Begin, End, Program, Unit, Write, Writeln, Read, Readln, Builtin, Forward, Inline, Interface, Implementation, And, Or, Not, Case, Otherwise, With, Virtual, Override, Static, Private, Public, Protected, Constructor, Destructor, Label, Goto, Uses, At, // Specials LineNumber, FileName, SizeOf, // Errors Overflow, UntermString, EndOfFile = -1, Unknown = -1000, }; Token(); Token(TokenType t, const Location& w); Token(TokenType t, const Location& w, const std::string& str); Token(TokenType t, const Location& w, uint64_t v); Token(TokenType t, const Location& w, double v); static TokenType KeyWordToToken(const std::string& str); TokenType GetToken() const { return type; } std::string GetIdentName() const { assert(type == Token::Identifier && "Incorrect type for identname"); assert(strVal.size() != 0 && "String should not be empty!"); return strVal; } uint64_t GetIntVal() const { assert((type == Token::Integer || type == Token::Char) && "Request for integer value from wrong type???"); return intVal; } double GetRealVal() const { assert(type == Token::Real && "Request for real from wrong type???"); return realVal; } std::string GetStrVal() const { assert(type == Token::StringLiteral && "Request for string from wrong type???"); return strVal; } // For debug purposes. void dump(std::ostream& out, const char* file = 0, int line = 0) const; void dump() const; std::string ToString() const; std::string TypeStr() const; void SetWhere(const std::string& file, int line, int col); std::string Where(); const Location& Loc() const { return where; } int Precedence() const; bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; } private: TokenType type; // Store location where token started. Location where; // Values. std::string strVal; uint64_t intVal; double realVal; }; #endif
16.56
169
(translation_unit) "#ifndef TOKEN_H\n#define TOKEN_H\n\n#include "location.h"\n\n#include <cassert>\n#include <string>\n#include <fstream>\n#include <cstdint>\n\n\nclass Token\n{\npublic:\n enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n };\n\n Token();\n \n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n assert(type == Token::Identifier && "Incorrect type for identname");\n assert(strVal.size() != 0 && "String should not be empty!");\n return strVal; \n }\n\n uint64_t GetIntVal() const \n { \n assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???");\n return intVal; \n }\n\n double GetRealVal() const \n { \n assert(type == Token::Real && "Request for real from wrong type???");\n return realVal; \n }\n\n std::string GetStrVal() const \n { \n assert(type == Token::StringLiteral && "Request for string from wrong type???");\n return strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }\n\nprivate:\n TokenType type;\n // Store location where token started.\n Location where;\n \n // Values. \n std::string strVal; \n uint64_t intVal;\n double realVal;\n};\n\n#endif\n" (preproc_ifdef) "#ifndef TOKEN_H\n#define TOKEN_H\n\n#include "location.h"\n\n#include <cassert>\n#include <string>\n#include <fstream>\n#include <cstdint>\n\n\nclass Token\n{\npublic:\n enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n };\n\n Token();\n \n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n assert(type == Token::Identifier && "Incorrect type for identname");\n assert(strVal.size() != 0 && "String should not be empty!");\n return strVal; \n }\n\n uint64_t GetIntVal() const \n { \n assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???");\n return intVal; \n }\n\n double GetRealVal() const \n { \n assert(type == Token::Real && "Request for real from wrong type???");\n return realVal; \n }\n\n std::string GetStrVal() const \n { \n assert(type == Token::StringLiteral && "Request for string from wrong type???");\n return strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }\n\nprivate:\n TokenType type;\n // Store location where token started.\n Location where;\n \n // Values. \n std::string strVal; \n uint64_t intVal;\n double realVal;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "TOKEN_H" (preproc_def) "#define TOKEN_H\n" (#define) "#define" (identifier) "TOKEN_H" (preproc_include) "#include "location.h"\n" (#include) "#include" (string_literal) ""location.h"" (") """ (string_content) "location.h" (") """ (preproc_include) "#include <cassert>\n" (#include) "#include" (system_lib_string) "<cassert>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <fstream>\n" (#include) "#include" (system_lib_string) "<fstream>" (preproc_include) "#include <cstdint>\n" (#include) "#include" (system_lib_string) "<cstdint>" (function_definition) "class Token\n{\npublic:\n enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n };\n\n Token();\n \n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n assert(type == Token::Identifier && "Incorrect type for identname");\n assert(strVal.size() != 0 && "String should not be empty!");\n return strVal; \n }\n\n uint64_t GetIntVal() const \n { \n assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???");\n return intVal; \n }\n\n double GetRealVal() const \n { \n assert(type == Token::Real && "Request for real from wrong type???");\n return realVal; \n }\n\n std::string GetStrVal() const \n { \n assert(type == Token::StringLiteral && "Request for string from wrong type???");\n return strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }" (type_identifier) "class" (identifier) "Token" (compound_statement) "{\npublic:\n enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n };\n\n Token();\n \n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n assert(type == Token::Identifier && "Incorrect type for identname");\n assert(strVal.size() != 0 && "String should not be empty!");\n return strVal; \n }\n\n uint64_t GetIntVal() const \n { \n assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???");\n return intVal; \n }\n\n double GetRealVal() const \n { \n assert(type == Token::Real && "Request for real from wrong type???");\n return realVal; \n }\n\n std::string GetStrVal() const \n { \n assert(type == Token::StringLiteral && "Request for string from wrong type???");\n return strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }" ({) "{" (labeled_statement) "public:\n enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n };\n\n Token();" (statement_identifier) "public" (:) ":" (declaration) "enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n };\n\n Token();" (enum_specifier) "enum TokenType\n {\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n }" (enum) "enum" (type_identifier) "TokenType" (enumerator_list) "{\n // Values of different types\n Integer,\n Real,\n StringLiteral,\n Char,\n Boolean,\n\n // Type/var/const declarations:\n Type,\n Var,\n Packed,\n Array,\n Of,\n Record,\n Class,\n Identifier,\n Const,\n File,\n Set,\n String,\n Nil,\n\n // Symbols and such\n LeftParen,\n RightParen,\n LeftSquare,\n RightSquare,\n Plus,\n Minus,\n Multiply,\n Divide,\n Comma,\n Semicolon,\n Colon,\n Assign,\n Period,\n DotDot,\n Uparrow,\n Div,\n Mod,\n Xor,\n Shr,\n Shl,\n\n // Comparison symbols - these return bool in binary ops.\n LessOrEqual,\n FirstComparison = LessOrEqual,\n LessThan,\n GreaterOrEqual,\n GreaterThan,\n Equal,\n NotEqual,\n In,\n LastComparison = In,\n\n // Keywords\n For,\n To,\n Downto,\n Do, \n If,\n Then,\n Else,\n While,\n Repeat,\n Until,\n Function,\n Procedure,\n Begin,\n End,\n Program,\n Unit,\n Write,\n Writeln,\n Read,\n Readln,\n Builtin,\n Forward,\n Inline,\n Interface,\n Implementation,\n And,\n Or,\n Not,\n Case,\n Otherwise,\n With,\n Virtual,\n Override,\n Static,\n Private,\n Public,\n Protected,\n Constructor,\n Destructor,\n Label,\n Goto,\n Uses,\n At,\n\n // Specials\n LineNumber,\n FileName,\n SizeOf,\n\n // Errors\n Overflow,\n UntermString,\n\n EndOfFile = -1, \n Unknown = -1000,\n }" ({) "{" (comment) "// Values of different types" (enumerator) "Integer" (identifier) "Integer" (,) "," (enumerator) "Real" (identifier) "Real" (,) "," (enumerator) "StringLiteral" (identifier) "StringLiteral" (,) "," (enumerator) "Char" (identifier) "Char" (,) "," (enumerator) "Boolean" (identifier) "Boolean" (,) "," (comment) "// Type/var/const declarations:" (enumerator) "Type" (identifier) "Type" (,) "," (enumerator) "Var" (identifier) "Var" (,) "," (enumerator) "Packed" (identifier) "Packed" (,) "," (enumerator) "Array" (identifier) "Array" (,) "," (enumerator) "Of" (identifier) "Of" (,) "," (enumerator) "Record" (identifier) "Record" (,) "," (enumerator) "Class" (identifier) "Class" (,) "," (enumerator) "Identifier" (identifier) "Identifier" (,) "," (enumerator) "Const" (identifier) "Const" (,) "," (enumerator) "File" (identifier) "File" (,) "," (enumerator) "Set" (identifier) "Set" (,) "," (enumerator) "String" (identifier) "String" (,) "," (enumerator) "Nil" (identifier) "Nil" (,) "," (comment) "// Symbols and such" (enumerator) "LeftParen" (identifier) "LeftParen" (,) "," (enumerator) "RightParen" (identifier) "RightParen" (,) "," (enumerator) "LeftSquare" (identifier) "LeftSquare" (,) "," (enumerator) "RightSquare" (identifier) "RightSquare" (,) "," (enumerator) "Plus" (identifier) "Plus" (,) "," (enumerator) "Minus" (identifier) "Minus" (,) "," (enumerator) "Multiply" (identifier) "Multiply" (,) "," (enumerator) "Divide" (identifier) "Divide" (,) "," (enumerator) "Comma" (identifier) "Comma" (,) "," (enumerator) "Semicolon" (identifier) "Semicolon" (,) "," (enumerator) "Colon" (identifier) "Colon" (,) "," (enumerator) "Assign" (identifier) "Assign" (,) "," (enumerator) "Period" (identifier) "Period" (,) "," (enumerator) "DotDot" (identifier) "DotDot" (,) "," (enumerator) "Uparrow" (identifier) "Uparrow" (,) "," (enumerator) "Div" (identifier) "Div" (,) "," (enumerator) "Mod" (identifier) "Mod" (,) "," (enumerator) "Xor" (identifier) "Xor" (,) "," (enumerator) "Shr" (identifier) "Shr" (,) "," (enumerator) "Shl" (identifier) "Shl" (,) "," (comment) "// Comparison symbols - these return bool in binary ops." (enumerator) "LessOrEqual" (identifier) "LessOrEqual" (,) "," (enumerator) "FirstComparison = LessOrEqual" (identifier) "FirstComparison" (=) "=" (identifier) "LessOrEqual" (,) "," (enumerator) "LessThan" (identifier) "LessThan" (,) "," (enumerator) "GreaterOrEqual" (identifier) "GreaterOrEqual" (,) "," (enumerator) "GreaterThan" (identifier) "GreaterThan" (,) "," (enumerator) "Equal" (identifier) "Equal" (,) "," (enumerator) "NotEqual" (identifier) "NotEqual" (,) "," (enumerator) "In" (identifier) "In" (,) "," (enumerator) "LastComparison = In" (identifier) "LastComparison" (=) "=" (identifier) "In" (,) "," (comment) "// Keywords" (enumerator) "For" (identifier) "For" (,) "," (enumerator) "To" (identifier) "To" (,) "," (enumerator) "Downto" (identifier) "Downto" (,) "," (enumerator) "Do" (identifier) "Do" (,) "," (enumerator) "If" (identifier) "If" (,) "," (enumerator) "Then" (identifier) "Then" (,) "," (enumerator) "Else" (identifier) "Else" (,) "," (enumerator) "While" (identifier) "While" (,) "," (enumerator) "Repeat" (identifier) "Repeat" (,) "," (enumerator) "Until" (identifier) "Until" (,) "," (enumerator) "Function" (identifier) "Function" (,) "," (enumerator) "Procedure" (identifier) "Procedure" (,) "," (enumerator) "Begin" (identifier) "Begin" (,) "," (enumerator) "End" (identifier) "End" (,) "," (enumerator) "Program" (identifier) "Program" (,) "," (enumerator) "Unit" (identifier) "Unit" (,) "," (enumerator) "Write" (identifier) "Write" (,) "," (enumerator) "Writeln" (identifier) "Writeln" (,) "," (enumerator) "Read" (identifier) "Read" (,) "," (enumerator) "Readln" (identifier) "Readln" (,) "," (enumerator) "Builtin" (identifier) "Builtin" (,) "," (enumerator) "Forward" (identifier) "Forward" (,) "," (enumerator) "Inline" (identifier) "Inline" (,) "," (enumerator) "Interface" (identifier) "Interface" (,) "," (enumerator) "Implementation" (identifier) "Implementation" (,) "," (enumerator) "And" (identifier) "And" (,) "," (enumerator) "Or" (identifier) "Or" (,) "," (enumerator) "Not" (identifier) "Not" (,) "," (enumerator) "Case" (identifier) "Case" (,) "," (enumerator) "Otherwise" (identifier) "Otherwise" (,) "," (enumerator) "With" (identifier) "With" (,) "," (enumerator) "Virtual" (identifier) "Virtual" (,) "," (enumerator) "Override" (identifier) "Override" (,) "," (enumerator) "Static" (identifier) "Static" (,) "," (enumerator) "Private" (identifier) "Private" (,) "," (enumerator) "Public" (identifier) "Public" (,) "," (enumerator) "Protected" (identifier) "Protected" (,) "," (enumerator) "Constructor" (identifier) "Constructor" (,) "," (enumerator) "Destructor" (identifier) "Destructor" (,) "," (enumerator) "Label" (identifier) "Label" (,) "," (enumerator) "Goto" (identifier) "Goto" (,) "," (enumerator) "Uses" (identifier) "Uses" (,) "," (enumerator) "At" (identifier) "At" (,) "," (comment) "// Specials" (enumerator) "LineNumber" (identifier) "LineNumber" (,) "," (enumerator) "FileName" (identifier) "FileName" (,) "," (enumerator) "SizeOf" (identifier) "SizeOf" (,) "," (comment) "// Errors" (enumerator) "Overflow" (identifier) "Overflow" (,) "," (enumerator) "UntermString" (identifier) "UntermString" (,) "," (enumerator) "EndOfFile = -1" (identifier) "EndOfFile" (=) "=" (number_literal) "-1" (,) "," (enumerator) "Unknown = -1000" (identifier) "Unknown" (=) "=" (number_literal) "-1000" (,) "," (}) "}" (ERROR) ";" (;) ";" (function_declarator) "Token()" (identifier) "Token" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "Token(TokenType t, const Location& w);" (macro_type_specifier) "Token(TokenType" (identifier) "Token" (() "(" (type_descriptor) "TokenType" (type_identifier) "TokenType" ()) "" (identifier) "t" (,) "," (identifier) "const" (ERROR) "Location& w)" (identifier) "Location" (&) "&" (identifier) "w" ()) ")" (;) ";" (declaration) "Token(TokenType t, const Location& w, const std::string& str);" (macro_type_specifier) "Token(TokenType" (identifier) "Token" (() "(" (type_descriptor) "TokenType" (type_identifier) "TokenType" ()) "" (identifier) "t" (,) "," (identifier) "const" (ERROR) "Location& w" (identifier) "Location" (&) "&" (identifier) "w" (,) "," (identifier) "const" (ERROR) "std::string& str)" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "str" ()) ")" (;) ";" (declaration) "Token(TokenType t, const Location& w, uint64_t v);" (macro_type_specifier) "Token(TokenType" (identifier) "Token" (() "(" (type_descriptor) "TokenType" (type_identifier) "TokenType" ()) "" (identifier) "t" (,) "," (identifier) "const" (ERROR) "Location& w" (identifier) "Location" (&) "&" (identifier) "w" (,) "," (identifier) "uint64_t" (ERROR) "v)" (identifier) "v" ()) ")" (;) ";" (declaration) "Token(TokenType t, const Location& w, double v);" (macro_type_specifier) "Token(TokenType" (identifier) "Token" (() "(" (type_descriptor) "TokenType" (type_identifier) "TokenType" ()) "" (identifier) "t" (,) "," (identifier) "const" (ERROR) "Location& w" (identifier) "Location" (&) "&" (identifier) "w" (,) "," (identifier) "double" (ERROR) "v)" (identifier) "v" ()) ")" (;) ";" (declaration) "static TokenType KeyWordToToken(const std::string& str);" (storage_class_specifier) "static" (static) "static" (type_identifier) "TokenType" (function_declarator) "KeyWordToToken(const std::string& str)" (identifier) "KeyWordToToken" (parameter_list) "(const std::string& str)" (() "(" (parameter_declaration) "const std::string& str" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "str" ()) ")" (;) ";" (ERROR) "TokenType GetToken() const" (type_identifier) "TokenType" (function_declarator) "GetToken()" (identifier) "GetToken" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return type; }" ({) "{" (return_statement) "return type;" (return) "return" (identifier) "type" (;) ";" (}) "}" (labeled_statement) "std::string GetIdentName() const \n { \n assert(type == Token::Identifier && "Incorrect type for identname");\n assert(strVal.size() != 0 && "String should not be empty!");\n return strVal; \n }" (statement_identifier) "std" (:) ":" (ERROR) ":string GetIdentName() const" (:) ":" (type_identifier) "string" (function_declarator) "GetIdentName() const" (identifier) "GetIdentName" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ \n assert(type == Token::Identifier && "Incorrect type for identname");\n assert(strVal.size() != 0 && "String should not be empty!");\n return strVal; \n }" ({) "{" (expression_statement) "assert(type == Token::Identifier && "Incorrect type for identname");" (call_expression) "assert(type == Token::Identifier && "Incorrect type for identname")" (identifier) "assert" (argument_list) "(type == Token::Identifier && "Incorrect type for identname")" (() "(" (binary_expression) "type == Token::Identifier && "Incorrect type for identname"" (binary_expression) "type == Token" (identifier) "type" (==) "==" (identifier) "Token" (ERROR) "::Identifier" (:) ":" (:) ":" (identifier) "Identifier" (&&) "&&" (string_literal) ""Incorrect type for identname"" (") """ (string_content) "Incorrect type for identname" (") """ ()) ")" (;) ";" (expression_statement) "assert(strVal.size() != 0 && "String should not be empty!");" (call_expression) "assert(strVal.size() != 0 && "String should not be empty!")" (identifier) "assert" (argument_list) "(strVal.size() != 0 && "String should not be empty!")" (() "(" (binary_expression) "strVal.size() != 0 && "String should not be empty!"" (binary_expression) "strVal.size() != 0" (call_expression) "strVal.size()" (field_expression) "strVal.size" (identifier) "strVal" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (number_literal) "0" (&&) "&&" (string_literal) ""String should not be empty!"" (") """ (string_content) "String should not be empty!" (") """ ()) ")" (;) ";" (return_statement) "return strVal;" (return) "return" (identifier) "strVal" (;) ";" (}) "}" (ERROR) "uint64_t GetIntVal() const" (primitive_type) "uint64_t" (function_declarator) "GetIntVal()" (identifier) "GetIntVal" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ \n assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???");\n return intVal; \n }" ({) "{" (expression_statement) "assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???");" (call_expression) "assert((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???")" (identifier) "assert" (argument_list) "((type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???")" (() "(" (binary_expression) "(type == Token::Integer || type == Token::Char) &&\n "Request for integer value from wrong type???"" (parenthesized_expression) "(type == Token::Integer || type == Token::Char)" (() "(" (binary_expression) "type == Token::Integer || type == Token" (binary_expression) "type == Token" (identifier) "type" (==) "==" (identifier) "Token" (ERROR) "::Integer" (:) ":" (:) ":" (identifier) "Integer" (||) "||" (binary_expression) "type == Token" (identifier) "type" (==) "==" (identifier) "Token" (ERROR) "::Char" (:) ":" (:) ":" (identifier) "Char" ()) ")" (&&) "&&" (string_literal) ""Request for integer value from wrong type???"" (") """ (string_content) "Request for integer value from wrong type???" (") """ ()) ")" (;) ";" (return_statement) "return intVal;" (return) "return" (identifier) "intVal" (;) ";" (}) "}" (ERROR) "double GetRealVal() const" (primitive_type) "double" (function_declarator) "GetRealVal()" (identifier) "GetRealVal" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ \n assert(type == Token::Real && "Request for real from wrong type???");\n return realVal; \n }" ({) "{" (expression_statement) "assert(type == Token::Real && "Request for real from wrong type???");" (call_expression) "assert(type == Token::Real && "Request for real from wrong type???")" (identifier) "assert" (argument_list) "(type == Token::Real && "Request for real from wrong type???")" (() "(" (binary_expression) "type == Token::Real && "Request for real from wrong type???"" (binary_expression) "type == Token" (identifier) "type" (==) "==" (identifier) "Token" (ERROR) "::Real" (:) ":" (:) ":" (identifier) "Real" (&&) "&&" (string_literal) ""Request for real from wrong type???"" (") """ (string_content) "Request for real from wrong type???" (") """ ()) ")" (;) ";" (return_statement) "return realVal;" (return) "return" (identifier) "realVal" (;) ";" (}) "}" (labeled_statement) "std::string GetStrVal() const \n { \n assert(type == Token::StringLiteral && "Request for string from wrong type???");\n return strVal; \n }" (statement_identifier) "std" (:) ":" (ERROR) ":string GetStrVal() const" (:) ":" (type_identifier) "string" (function_declarator) "GetStrVal() const" (identifier) "GetStrVal" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ \n assert(type == Token::StringLiteral && "Request for string from wrong type???");\n return strVal; \n }" ({) "{" (expression_statement) "assert(type == Token::StringLiteral && "Request for string from wrong type???");" (call_expression) "assert(type == Token::StringLiteral && "Request for string from wrong type???")" (identifier) "assert" (argument_list) "(type == Token::StringLiteral && "Request for string from wrong type???")" (() "(" (ERROR) "type == Token::" (binary_expression) "type == Token" (identifier) "type" (==) "==" (identifier) "Token" (:) ":" (:) ":" (binary_expression) "StringLiteral && "Request for string from wrong type???"" (identifier) "StringLiteral" (&&) "&&" (string_literal) ""Request for string from wrong type???"" (") """ (string_content) "Request for string from wrong type???" (") """ ()) ")" (;) ";" (return_statement) "return strVal;" (return) "return" (identifier) "strVal" (;) ";" (}) "}" (comment) "// For debug purposes." (declaration) "void dump(std::ostream& out, const char* file = 0, int line = 0) const;" (primitive_type) "void" (init_declarator) "dump(std::ostream& out, const char* file = 0" (function_declarator) "dump(std::ostream& out, const char* file" (identifier) "dump" (parameter_list) "(std::ostream& out, const char* file" (() "(" (parameter_declaration) "std::ostream& out" (type_identifier) "std" (ERROR) "::ostream&" (:) ":" (:) ":" (identifier) "ostream" (&) "&" (identifier) "out" (,) "," (parameter_declaration) "const char* file" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* file" (*) "*" (identifier) "file" ()) "" (=) "=" (number_literal) "0" (,) "," (ERROR) "int" (identifier) "int" (init_declarator) "line = 0" (identifier) "line" (=) "=" (number_literal) "0" (ERROR) ") const" ()) ")" (const) "const" (;) ";" (ERROR) "void dump() const" (primitive_type) "void" (function_declarator) "dump()" (identifier) "dump" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (labeled_statement) "std::string ToString() const;" (statement_identifier) "std" (:) ":" (ERROR) ":string ToString() const" (:) ":" (type_identifier) "string" (function_declarator) "ToString() const" (identifier) "ToString" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "std::string TypeStr() const;" (statement_identifier) "std" (:) ":" (ERROR) ":string TypeStr() const" (:) ":" (type_identifier) "string" (function_declarator) "TypeStr() const" (identifier) "TypeStr" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (declaration) "void SetWhere(const std::string& file, int line, int col);" (primitive_type) "void" (function_declarator) "SetWhere(const std::string& file, int line, int col)" (identifier) "SetWhere" (parameter_list) "(const std::string& file, int line, int col)" (() "(" (parameter_declaration) "const std::string& file" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "file" (,) "," (parameter_declaration) "int line" (primitive_type) "int" (identifier) "line" (,) "," (parameter_declaration) "int col" (primitive_type) "int" (identifier) "col" ()) ")" (;) ";" (labeled_statement) "std::string Where();" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string Where();" (type_identifier) "string" (function_declarator) "Where()" (identifier) "Where" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "const Location& Loc() const" (type_qualifier) "const" (const) "const" (type_identifier) "Location" (ERROR) "&" (&) "&" (function_declarator) "Loc()" (identifier) "Loc" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return where; }" ({) "{" (return_statement) "return where;" (return) "return" (identifier) "where" (;) ";" (}) "}" (ERROR) "int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison;" (primitive_type) "int" (function_declarator) "Precedence()" (identifier) "Precedence" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison;" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (primitive_type) "bool" (ERROR) "IsCompare() const { return type >= Token::FirstComparison && type <= Token::" (function_declarator) "IsCompare() const" (identifier) "IsCompare" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" ({) "{" (return) "return" (identifier) "type" (>=) ">=" (identifier) "Token" (:) ":" (:) ":" (identifier) "FirstComparison" (&&) "&&" (identifier) "type" (<=) "<=" (identifier) "Token" (:) ":" (:) ":" (identifier) "LastComparison" (;) ";" (}) "}" (labeled_statement) "private:\n TokenType type;" (statement_identifier) "private" (:) ":" (declaration) "TokenType type;" (type_identifier) "TokenType" (identifier) "type" (;) ";" (comment) "// Store location where token started." (declaration) "Location where;" (type_identifier) "Location" (identifier) "where" (;) ";" (comment) "// Values. " (labeled_statement) "std::string strVal;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string strVal;" (type_identifier) "string" (identifier) "strVal" (;) ";" (declaration) "uint64_t intVal;" (primitive_type) "uint64_t" (identifier) "intVal" (;) ";" (declaration) "double realVal;" (primitive_type) "double" (identifier) "realVal" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
870
34
{"language": "c", "success": true, "metadata": {"lines": 169, "avg_line_length": 16.56, "nodes": 513, "errors": 0, "source_hash": "3feff6e8952aec7f8f6f36b73e33305777b3e8041228aed3605db45598e018f8", "categorized_nodes": 412}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef TOKEN_H\n#define TOKEN_H\n\n#include \"location.h\"\n\n#include <cassert>\n#include <string>\n#include <fstream>\n#include <cstdint>\n\n\nclass Token\n{\npublic:\n enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n };\n\n Token();\n\t\n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n\tassert(type == Token::Identifier && \"Incorrect type for identname\");\n\tassert(strVal.size() != 0 && \"String should not be empty!\");\n\treturn strVal; \n }\n\n uint64_t GetIntVal() const \n { \n\tassert((type == Token::Integer || type == Token::Char) &&\n\t \"Request for integer value from wrong type???\");\n\treturn intVal; \n }\n\n double GetRealVal() const \n { \n\tassert(type == Token::Real && \"Request for real from wrong type???\");\n\treturn realVal; \n }\n\n std::string GetStrVal() const \n { \n\tassert(type == Token::StringLiteral && \"Request for string from wrong type???\");\n\treturn strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }\n\nprivate:\n TokenType type;\n // Store location where token started.\n Location where;\n \n // Values. \n std::string strVal; \n uint64_t intVal;\n double realVal;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 494, 498, 501, 506, 509, 512], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 189, "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": "TOKEN_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 15}}, {"id": 3, "type": "preproc_def", "text": "#define TOKEN_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": "TOKEN_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 15}}, {"id": 6, "type": "preproc_include", "text": "#include \"location.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": "\"location.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include <cassert>\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": "<cassert>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <string>\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": "<string>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include <fstream>\n", "parent": 0, "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": "system_lib_string", "text": "<fstream>", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include <cstdint>\n", "parent": 0, "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": "system_lib_string", "text": "<cstdint>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 18}}, {"id": 21, "type": "function_definition", "text": "class Token\n{\npublic:\n enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n };\n\n Token();\n\t\n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n\tassert(type == Token::Identifier && \"Incorrect type for identname\");\n\tassert(strVal.size() != 0 && \"String should not be empty!\");\n\treturn strVal; \n }\n\n uint64_t GetIntVal() const \n { \n\tassert((type == Token::Integer || type == Token::Char) &&\n\t \"Request for integer value from wrong type???\");\n\treturn intVal; \n }\n\n double GetRealVal() const \n { \n\tassert(type == Token::Real && \"Request for real from wrong type???\");\n\treturn realVal; \n }\n\n std::string GetStrVal() const \n { \n\tassert(type == Token::StringLiteral && \"Request for string from wrong type???\");\n\treturn strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }", "parent": 0, "children": [22], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 176, "column": 102}}, {"id": 22, "type": "identifier", "text": "Token", "parent": 21, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 11}}, {"id": 23, "type": "labeled_statement", "text": "public:\n enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n };\n\n Token();", "parent": 21, "children": [24], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 129, "column": 12}}, {"id": 24, "type": "declaration", "text": "enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n };\n\n Token();", "parent": 23, "children": [25, 231], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 129, "column": 12}}, {"id": 25, "type": "enum_specifier", "text": "enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n }", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 127, "column": 5}}, {"id": 26, "type": "enum", "text": "enum", "parent": 25, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 27, "type": "type_identifier", "text": "TokenType", "parent": 25, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 28, "type": "enumerator_list", "text": "{\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n }", "parent": 25, "children": [29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 111, 113, 115, 117, 119, 121, 123, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 227], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 127, "column": 5}}, {"id": 29, "type": "enumerator", "text": "Integer", "parent": 28, "children": [30], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 8}}, {"id": 30, "type": "identifier", "text": "Integer", "parent": 29, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 8}}, {"id": 31, "type": "enumerator", "text": "Real", "parent": 28, "children": [32], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 32, "type": "identifier", "text": "Real", "parent": 31, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 33, "type": "enumerator", "text": "StringLiteral", "parent": 28, "children": [34], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 14}}, {"id": 34, "type": "identifier", "text": "StringLiteral", "parent": 33, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 14}}, {"id": 35, "type": "enumerator", "text": "Char", "parent": 28, "children": [36], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 5}}, {"id": 36, "type": "identifier", "text": "Char", "parent": 35, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 5}}, {"id": 37, "type": "enumerator", "text": "Boolean", "parent": 28, "children": [38], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 38, "type": "identifier", "text": "Boolean", "parent": 37, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 39, "type": "enumerator", "text": "Type", "parent": 28, "children": [40], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 40, "type": "identifier", "text": "Type", "parent": 39, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 41, "type": "enumerator", "text": "Var", "parent": 28, "children": [42], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}, {"id": 42, "type": "identifier", "text": "Var", "parent": 41, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}, {"id": 43, "type": "enumerator", "text": "Packed", "parent": 28, "children": [44], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 7}}, {"id": 44, "type": "identifier", "text": "Packed", "parent": 43, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 7}}, {"id": 45, "type": "enumerator", "text": "Array", "parent": 28, "children": [46], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 6}}, {"id": 46, "type": "identifier", "text": "Array", "parent": 45, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 6}}, {"id": 47, "type": "enumerator", "text": "Of", "parent": 28, "children": [48], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 3}}, {"id": 48, "type": "identifier", "text": "Of", "parent": 47, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 3}}, {"id": 49, "type": "enumerator", "text": "Record", "parent": 28, "children": [50], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 7}}, {"id": 50, "type": "identifier", "text": "Record", "parent": 49, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 7}}, {"id": 51, "type": "enumerator", "text": "Class", "parent": 28, "children": [52], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 6}}, {"id": 52, "type": "identifier", "text": "Class", "parent": 51, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 6}}, {"id": 53, "type": "enumerator", "text": "Identifier", "parent": 28, "children": [54], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 11}}, {"id": 54, "type": "identifier", "text": "Identifier", "parent": 53, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 11}}, {"id": 55, "type": "enumerator", "text": "Const", "parent": 28, "children": [56], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 6}}, {"id": 56, "type": "identifier", "text": "Const", "parent": 55, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 6}}, {"id": 57, "type": "enumerator", "text": "File", "parent": 28, "children": [58], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 58, "type": "identifier", "text": "File", "parent": 57, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 59, "type": "enumerator", "text": "Set", "parent": 28, "children": [60], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 4}}, {"id": 60, "type": "identifier", "text": "Set", "parent": 59, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 4}}, {"id": 61, "type": "enumerator", "text": "String", "parent": 28, "children": [62], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 62, "type": "identifier", "text": "String", "parent": 61, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 63, "type": "enumerator", "text": "Nil", "parent": 28, "children": [64], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 4}}, {"id": 64, "type": "identifier", "text": "Nil", "parent": 63, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 4}}, {"id": 65, "type": "enumerator", "text": "LeftParen", "parent": 28, "children": [66], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 10}}, {"id": 66, "type": "identifier", "text": "LeftParen", "parent": 65, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 10}}, {"id": 67, "type": "enumerator", "text": "RightParen", "parent": 28, "children": [68], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 68, "type": "identifier", "text": "RightParen", "parent": 67, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 69, "type": "enumerator", "text": "LeftSquare", "parent": 28, "children": [70], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 11}}, {"id": 70, "type": "identifier", "text": "LeftSquare", "parent": 69, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 11}}, {"id": 71, "type": "enumerator", "text": "RightSquare", "parent": 28, "children": [72], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 12}}, {"id": 72, "type": "identifier", "text": "RightSquare", "parent": 71, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 12}}, {"id": 73, "type": "enumerator", "text": "Plus", "parent": 28, "children": [74], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 74, "type": "identifier", "text": "Plus", "parent": 73, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 75, "type": "enumerator", "text": "Minus", "parent": 28, "children": [76], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 6}}, {"id": 76, "type": "identifier", "text": "Minus", "parent": 75, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 6}}, {"id": 77, "type": "enumerator", "text": "Multiply", "parent": 28, "children": [78], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 9}}, {"id": 78, "type": "identifier", "text": "Multiply", "parent": 77, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 9}}, {"id": 79, "type": "enumerator", "text": "Divide", "parent": 28, "children": [80], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 7}}, {"id": 80, "type": "identifier", "text": "Divide", "parent": 79, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 7}}, {"id": 81, "type": "enumerator", "text": "Comma", "parent": 28, "children": [82], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 6}}, {"id": 82, "type": "identifier", "text": "Comma", "parent": 81, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 6}}, {"id": 83, "type": "enumerator", "text": "Semicolon", "parent": 28, "children": [84], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 10}}, {"id": 84, "type": "identifier", "text": "Semicolon", "parent": 83, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 10}}, {"id": 85, "type": "enumerator", "text": "Colon", "parent": 28, "children": [86], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 6}}, {"id": 86, "type": "identifier", "text": "Colon", "parent": 85, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 6}}, {"id": 87, "type": "enumerator", "text": "Assign", "parent": 28, "children": [88], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 7}}, {"id": 88, "type": "identifier", "text": "Assign", "parent": 87, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 7}}, {"id": 89, "type": "enumerator", "text": "Period", "parent": 28, "children": [90], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 7}}, {"id": 90, "type": "identifier", "text": "Period", "parent": 89, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 7}}, {"id": 91, "type": "enumerator", "text": "DotDot", "parent": 28, "children": [92], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 7}}, {"id": 92, "type": "identifier", "text": "DotDot", "parent": 91, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 7}}, {"id": 93, "type": "enumerator", "text": "Uparrow", "parent": 28, "children": [94], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 8}}, {"id": 94, "type": "identifier", "text": "Uparrow", "parent": 93, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 8}}, {"id": 95, "type": "enumerator", "text": "Div", "parent": 28, "children": [96], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 96, "type": "identifier", "text": "Div", "parent": 95, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 97, "type": "enumerator", "text": "Mod", "parent": 28, "children": [98], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 4}}, {"id": 98, "type": "identifier", "text": "Mod", "parent": 97, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 4}}, {"id": 99, "type": "enumerator", "text": "Xor", "parent": 28, "children": [100], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 4}}, {"id": 100, "type": "identifier", "text": "Xor", "parent": 99, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 4}}, {"id": 101, "type": "enumerator", "text": "Shr", "parent": 28, "children": [102], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 4}}, {"id": 102, "type": "identifier", "text": "Shr", "parent": 101, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 4}}, {"id": 103, "type": "enumerator", "text": "Shl", "parent": 28, "children": [104], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 4}}, {"id": 104, "type": "identifier", "text": "Shl", "parent": 103, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 4}}, {"id": 105, "type": "enumerator", "text": "LessOrEqual", "parent": 28, "children": [106], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 12}}, {"id": 106, "type": "identifier", "text": "LessOrEqual", "parent": 105, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 12}}, {"id": 107, "type": "enumerator", "text": "FirstComparison = LessOrEqual", "parent": 28, "children": [108, 109, 110], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 30}}, {"id": 108, "type": "identifier", "text": "FirstComparison", "parent": 107, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 16}}, {"id": 109, "type": "=", "text": "=", "parent": 107, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 18}}, {"id": 110, "type": "identifier", "text": "LessOrEqual", "parent": 107, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 30}}, {"id": 111, "type": "enumerator", "text": "LessThan", "parent": 28, "children": [112], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 9}}, {"id": 112, "type": "identifier", "text": "LessThan", "parent": 111, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 9}}, {"id": 113, "type": "enumerator", "text": "GreaterOrEqual", "parent": 28, "children": [114], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 15}}, {"id": 114, "type": "identifier", "text": "GreaterOrEqual", "parent": 113, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 15}}, {"id": 115, "type": "enumerator", "text": "GreaterThan", "parent": 28, "children": [116], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 12}}, {"id": 116, "type": "identifier", "text": "GreaterThan", "parent": 115, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 12}}, {"id": 117, "type": "enumerator", "text": "Equal", "parent": 28, "children": [118], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 6}}, {"id": 118, "type": "identifier", "text": "Equal", "parent": 117, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 6}}, {"id": 119, "type": "enumerator", "text": "NotEqual", "parent": 28, "children": [120], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 9}}, {"id": 120, "type": "identifier", "text": "NotEqual", "parent": 119, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 9}}, {"id": 121, "type": "enumerator", "text": "In", "parent": 28, "children": [122], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 3}}, {"id": 122, "type": "identifier", "text": "In", "parent": 121, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 3}}, {"id": 123, "type": "enumerator", "text": "LastComparison = In", "parent": 28, "children": [124, 125, 126], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 20}}, {"id": 124, "type": "identifier", "text": "LastComparison", "parent": 123, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 15}}, {"id": 125, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 17}}, {"id": 126, "type": "identifier", "text": "In", "parent": 123, "children": [], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 20}}, {"id": 127, "type": "enumerator", "text": "For", "parent": 28, "children": [128], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 4}}, {"id": 128, "type": "identifier", "text": "For", "parent": 127, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 4}}, {"id": 129, "type": "enumerator", "text": "To", "parent": 28, "children": [130], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 3}}, {"id": 130, "type": "identifier", "text": "To", "parent": 129, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 3}}, {"id": 131, "type": "enumerator", "text": "Downto", "parent": 28, "children": [132], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 7}}, {"id": 132, "type": "identifier", "text": "Downto", "parent": 131, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 7}}, {"id": 133, "type": "enumerator", "text": "Do", "parent": 28, "children": [134], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 3}}, {"id": 134, "type": "identifier", "text": "Do", "parent": 133, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 3}}, {"id": 135, "type": "enumerator", "text": "If", "parent": 28, "children": [136], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 3}}, {"id": 136, "type": "identifier", "text": "If", "parent": 135, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 3}}, {"id": 137, "type": "enumerator", "text": "Then", "parent": 28, "children": [138], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 5}}, {"id": 138, "type": "identifier", "text": "Then", "parent": 137, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 5}}, {"id": 139, "type": "enumerator", "text": "Else", "parent": 28, "children": [140], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 5}}, {"id": 140, "type": "identifier", "text": "Else", "parent": 139, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 5}}, {"id": 141, "type": "enumerator", "text": "While", "parent": 28, "children": [142], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 6}}, {"id": 142, "type": "identifier", "text": "While", "parent": 141, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 6}}, {"id": 143, "type": "enumerator", "text": "Repeat", "parent": 28, "children": [144], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 7}}, {"id": 144, "type": "identifier", "text": "Repeat", "parent": 143, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 7}}, {"id": 145, "type": "enumerator", "text": "Until", "parent": 28, "children": [146], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 6}}, {"id": 146, "type": "identifier", "text": "Until", "parent": 145, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 6}}, {"id": 147, "type": "enumerator", "text": "Function", "parent": 28, "children": [148], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 9}}, {"id": 148, "type": "identifier", "text": "Function", "parent": 147, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 9}}, {"id": 149, "type": "enumerator", "text": "Procedure", "parent": 28, "children": [150], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 10}}, {"id": 150, "type": "identifier", "text": "Procedure", "parent": 149, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 10}}, {"id": 151, "type": "enumerator", "text": "Begin", "parent": 28, "children": [152], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 6}}, {"id": 152, "type": "identifier", "text": "Begin", "parent": 151, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 6}}, {"id": 153, "type": "enumerator", "text": "End", "parent": 28, "children": [154], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 4}}, {"id": 154, "type": "identifier", "text": "End", "parent": 153, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 4}}, {"id": 155, "type": "enumerator", "text": "Program", "parent": 28, "children": [156], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 8}}, {"id": 156, "type": "identifier", "text": "Program", "parent": 155, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 8}}, {"id": 157, "type": "enumerator", "text": "Unit", "parent": 28, "children": [158], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 5}}, {"id": 158, "type": "identifier", "text": "Unit", "parent": 157, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 5}}, {"id": 159, "type": "enumerator", "text": "Write", "parent": 28, "children": [160], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 6}}, {"id": 160, "type": "identifier", "text": "Write", "parent": 159, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 6}}, {"id": 161, "type": "enumerator", "text": "Writeln", "parent": 28, "children": [162], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 8}}, {"id": 162, "type": "identifier", "text": "Writeln", "parent": 161, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 8}}, {"id": 163, "type": "enumerator", "text": "Read", "parent": 28, "children": [164], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 5}}, {"id": 164, "type": "identifier", "text": "Read", "parent": 163, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 5}}, {"id": 165, "type": "enumerator", "text": "Readln", "parent": 28, "children": [166], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 7}}, {"id": 166, "type": "identifier", "text": "Readln", "parent": 165, "children": [], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 7}}, {"id": 167, "type": "enumerator", "text": "Builtin", "parent": 28, "children": [168], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 8}}, {"id": 168, "type": "identifier", "text": "Builtin", "parent": 167, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 8}}, {"id": 169, "type": "enumerator", "text": "Forward", "parent": 28, "children": [170], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 8}}, {"id": 170, "type": "identifier", "text": "Forward", "parent": 169, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 8}}, {"id": 171, "type": "enumerator", "text": "Inline", "parent": 28, "children": [172], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 7}}, {"id": 172, "type": "identifier", "text": "Inline", "parent": 171, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 7}}, {"id": 173, "type": "enumerator", "text": "Interface", "parent": 28, "children": [174], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 10}}, {"id": 174, "type": "identifier", "text": "Interface", "parent": 173, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 10}}, {"id": 175, "type": "enumerator", "text": "Implementation", "parent": 28, "children": [176], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 15}}, {"id": 176, "type": "identifier", "text": "Implementation", "parent": 175, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 15}}, {"id": 177, "type": "enumerator", "text": "And", "parent": 28, "children": [178], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 4}}, {"id": 178, "type": "identifier", "text": "And", "parent": 177, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 4}}, {"id": 179, "type": "enumerator", "text": "Or", "parent": 28, "children": [180], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 3}}, {"id": 180, "type": "identifier", "text": "Or", "parent": 179, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 3}}, {"id": 181, "type": "enumerator", "text": "Not", "parent": 28, "children": [182], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 4}}, {"id": 182, "type": "identifier", "text": "Not", "parent": 181, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 4}}, {"id": 183, "type": "enumerator", "text": "Case", "parent": 28, "children": [184], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 5}}, {"id": 184, "type": "identifier", "text": "Case", "parent": 183, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 5}}, {"id": 185, "type": "enumerator", "text": "Otherwise", "parent": 28, "children": [186], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 10}}, {"id": 186, "type": "identifier", "text": "Otherwise", "parent": 185, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 10}}, {"id": 187, "type": "enumerator", "text": "With", "parent": 28, "children": [188], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 5}}, {"id": 188, "type": "identifier", "text": "With", "parent": 187, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 5}}, {"id": 189, "type": "enumerator", "text": "Virtual", "parent": 28, "children": [190], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 8}}, {"id": 190, "type": "identifier", "text": "Virtual", "parent": 189, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 8}}, {"id": 191, "type": "enumerator", "text": "Override", "parent": 28, "children": [192], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 9}}, {"id": 192, "type": "identifier", "text": "Override", "parent": 191, "children": [], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 9}}, {"id": 193, "type": "enumerator", "text": "Static", "parent": 28, "children": [194], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 7}}, {"id": 194, "type": "identifier", "text": "Static", "parent": 193, "children": [], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 7}}, {"id": 195, "type": "enumerator", "text": "Private", "parent": 28, "children": [196], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 8}}, {"id": 196, "type": "identifier", "text": "Private", "parent": 195, "children": [], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 8}}, {"id": 197, "type": "enumerator", "text": "Public", "parent": 28, "children": [198], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 7}}, {"id": 198, "type": "identifier", "text": "Public", "parent": 197, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 7}}, {"id": 199, "type": "enumerator", "text": "Protected", "parent": 28, "children": [200], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 10}}, {"id": 200, "type": "identifier", "text": "Protected", "parent": 199, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 10}}, {"id": 201, "type": "enumerator", "text": "Constructor", "parent": 28, "children": [202], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 12}}, {"id": 202, "type": "identifier", "text": "Constructor", "parent": 201, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 12}}, {"id": 203, "type": "enumerator", "text": "Destructor", "parent": 28, "children": [204], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 11}}, {"id": 204, "type": "identifier", "text": "Destructor", "parent": 203, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 11}}, {"id": 205, "type": "enumerator", "text": "Label", "parent": 28, "children": [206], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 6}}, {"id": 206, "type": "identifier", "text": "Label", "parent": 205, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 6}}, {"id": 207, "type": "enumerator", "text": "Goto", "parent": 28, "children": [208], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 5}}, {"id": 208, "type": "identifier", "text": "Goto", "parent": 207, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 5}}, {"id": 209, "type": "enumerator", "text": "Uses", "parent": 28, "children": [210], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 5}}, {"id": 210, "type": "identifier", "text": "Uses", "parent": 209, "children": [], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 5}}, {"id": 211, "type": "enumerator", "text": "At", "parent": 28, "children": [212], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 3}}, {"id": 212, "type": "identifier", "text": "At", "parent": 211, "children": [], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 3}}, {"id": 213, "type": "enumerator", "text": "LineNumber", "parent": 28, "children": [214], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 11}}, {"id": 214, "type": "identifier", "text": "LineNumber", "parent": 213, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 11}}, {"id": 215, "type": "enumerator", "text": "FileName", "parent": 28, "children": [216], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 9}}, {"id": 216, "type": "identifier", "text": "FileName", "parent": 215, "children": [], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 9}}, {"id": 217, "type": "enumerator", "text": "SizeOf", "parent": 28, "children": [218], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 7}}, {"id": 218, "type": "identifier", "text": "SizeOf", "parent": 217, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 7}}, {"id": 219, "type": "enumerator", "text": "Overflow", "parent": 28, "children": [220], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 9}}, {"id": 220, "type": "identifier", "text": "Overflow", "parent": 219, "children": [], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 9}}, {"id": 221, "type": "enumerator", "text": "UntermString", "parent": 28, "children": [222], "start_point": {"row": 123, "column": 1}, "end_point": {"row": 123, "column": 13}}, {"id": 222, "type": "identifier", "text": "UntermString", "parent": 221, "children": [], "start_point": {"row": 123, "column": 1}, "end_point": {"row": 123, "column": 13}}, {"id": 223, "type": "enumerator", "text": "EndOfFile = -1", "parent": 28, "children": [224, 225, 226], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 16}}, {"id": 224, "type": "identifier", "text": "EndOfFile", "parent": 223, "children": [], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 10}}, {"id": 225, "type": "=", "text": "=", "parent": 223, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 13}}, {"id": 226, "type": "number_literal", "text": "-1", "parent": 223, "children": [], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 16}}, {"id": 227, "type": "enumerator", "text": "Unknown = -1000", "parent": 28, "children": [228, 229, 230], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 19}}, {"id": 228, "type": "identifier", "text": "Unknown", "parent": 227, "children": [], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 8}}, {"id": 229, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 126, "column": 12}, "end_point": {"row": 126, "column": 13}}, {"id": 230, "type": "number_literal", "text": "-1000", "parent": 227, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 19}}, {"id": 231, "type": "function_declarator", "text": "Token()", "parent": 24, "children": [232, 233], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 11}}, {"id": 232, "type": "identifier", "text": "Token", "parent": 231, "children": [], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 9}}, {"id": 233, "type": "parameter_list", "text": "()", "parent": 231, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 11}}, {"id": 234, "type": "declaration", "text": "Token(TokenType t, const Location& w);", "parent": 21, "children": [235, 239, 240], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 42}}, {"id": 235, "type": "macro_type_specifier", "text": "Token(TokenType", "parent": 234, "children": [236, 237], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 19}}, {"id": 236, "type": "identifier", "text": "Token", "parent": 235, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 9}}, {"id": 237, "type": "type_descriptor", "text": "TokenType", "parent": 235, "children": [238], "start_point": {"row": 131, "column": 10}, "end_point": {"row": 131, "column": 19}}, {"id": 238, "type": "type_identifier", "text": "TokenType", "parent": 237, "children": [], "start_point": {"row": 131, "column": 10}, "end_point": {"row": 131, "column": 19}}, {"id": 239, "type": "identifier", "text": "t", "parent": 234, "children": [], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 21}}, {"id": 240, "type": "ERROR", "text": "Location& w)", "parent": 234, "children": [241, 242], "start_point": {"row": 131, "column": 29}, "end_point": {"row": 131, "column": 41}}, {"id": 241, "type": "identifier", "text": "Location", "parent": 240, "children": [], "start_point": {"row": 131, "column": 29}, "end_point": {"row": 131, "column": 37}}, {"id": 242, "type": "identifier", "text": "w", "parent": 240, "children": [], "start_point": {"row": 131, "column": 39}, "end_point": {"row": 131, "column": 40}}, {"id": 243, "type": "declaration", "text": "Token(TokenType t, const Location& w, const std::string& str);", "parent": 21, "children": [244, 248, 249, 252], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 66}}, {"id": 244, "type": "macro_type_specifier", "text": "Token(TokenType", "parent": 243, "children": [245, 246], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 19}}, {"id": 245, "type": "identifier", "text": "Token", "parent": 244, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 9}}, {"id": 246, "type": "type_descriptor", "text": "TokenType", "parent": 244, "children": [247], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 19}}, {"id": 247, "type": "type_identifier", "text": "TokenType", "parent": 246, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 19}}, {"id": 248, "type": "identifier", "text": "t", "parent": 243, "children": [], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 21}}, {"id": 249, "type": "ERROR", "text": "Location& w", "parent": 243, "children": [250, 251], "start_point": {"row": 132, "column": 29}, "end_point": {"row": 132, "column": 40}}, {"id": 250, "type": "identifier", "text": "Location", "parent": 249, "children": [], "start_point": {"row": 132, "column": 29}, "end_point": {"row": 132, "column": 37}}, {"id": 251, "type": "identifier", "text": "w", "parent": 249, "children": [], "start_point": {"row": 132, "column": 39}, "end_point": {"row": 132, "column": 40}}, {"id": 252, "type": "ERROR", "text": "std::string& str)", "parent": 243, "children": [253, 254, 255], "start_point": {"row": 132, "column": 48}, "end_point": {"row": 132, "column": 65}}, {"id": 253, "type": "identifier", "text": "std", "parent": 252, "children": [], "start_point": {"row": 132, "column": 48}, "end_point": {"row": 132, "column": 51}}, {"id": 254, "type": "identifier", "text": "string", "parent": 252, "children": [], "start_point": {"row": 132, "column": 53}, "end_point": {"row": 132, "column": 59}}, {"id": 255, "type": "identifier", "text": "str", "parent": 252, "children": [], "start_point": {"row": 132, "column": 61}, "end_point": {"row": 132, "column": 64}}, {"id": 256, "type": "declaration", "text": "Token(TokenType t, const Location& w, uint64_t v);", "parent": 21, "children": [257, 261, 262, 265, 266], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 54}}, {"id": 257, "type": "macro_type_specifier", "text": "Token(TokenType", "parent": 256, "children": [258, 259], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 19}}, {"id": 258, "type": "identifier", "text": "Token", "parent": 257, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 9}}, {"id": 259, "type": "type_descriptor", "text": "TokenType", "parent": 257, "children": [260], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 19}}, {"id": 260, "type": "type_identifier", "text": "TokenType", "parent": 259, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 19}}, {"id": 261, "type": "identifier", "text": "t", "parent": 256, "children": [], "start_point": {"row": 133, "column": 20}, "end_point": {"row": 133, "column": 21}}, {"id": 262, "type": "ERROR", "text": "Location& w", "parent": 256, "children": [263, 264], "start_point": {"row": 133, "column": 29}, "end_point": {"row": 133, "column": 40}}, {"id": 263, "type": "identifier", "text": "Location", "parent": 262, "children": [], "start_point": {"row": 133, "column": 29}, "end_point": {"row": 133, "column": 37}}, {"id": 264, "type": "identifier", "text": "w", "parent": 262, "children": [], "start_point": {"row": 133, "column": 39}, "end_point": {"row": 133, "column": 40}}, {"id": 265, "type": "identifier", "text": "uint64_t", "parent": 256, "children": [], "start_point": {"row": 133, "column": 42}, "end_point": {"row": 133, "column": 50}}, {"id": 266, "type": "ERROR", "text": "v)", "parent": 256, "children": [267], "start_point": {"row": 133, "column": 51}, "end_point": {"row": 133, "column": 53}}, {"id": 267, "type": "identifier", "text": "v", "parent": 266, "children": [], "start_point": {"row": 133, "column": 51}, "end_point": {"row": 133, "column": 52}}, {"id": 268, "type": "declaration", "text": "Token(TokenType t, const Location& w, double v);", "parent": 21, "children": [269, 273, 274, 277, 278], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 52}}, {"id": 269, "type": "macro_type_specifier", "text": "Token(TokenType", "parent": 268, "children": [270, 271], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 19}}, {"id": 270, "type": "identifier", "text": "Token", "parent": 269, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 9}}, {"id": 271, "type": "type_descriptor", "text": "TokenType", "parent": 269, "children": [272], "start_point": {"row": 134, "column": 10}, "end_point": {"row": 134, "column": 19}}, {"id": 272, "type": "type_identifier", "text": "TokenType", "parent": 271, "children": [], "start_point": {"row": 134, "column": 10}, "end_point": {"row": 134, "column": 19}}, {"id": 273, "type": "identifier", "text": "t", "parent": 268, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 21}}, {"id": 274, "type": "ERROR", "text": "Location& w", "parent": 268, "children": [275, 276], "start_point": {"row": 134, "column": 29}, "end_point": {"row": 134, "column": 40}}, {"id": 275, "type": "identifier", "text": "Location", "parent": 274, "children": [], "start_point": {"row": 134, "column": 29}, "end_point": {"row": 134, "column": 37}}, {"id": 276, "type": "identifier", "text": "w", "parent": 274, "children": [], "start_point": {"row": 134, "column": 39}, "end_point": {"row": 134, "column": 40}}, {"id": 277, "type": "identifier", "text": "double", "parent": 268, "children": [], "start_point": {"row": 134, "column": 42}, "end_point": {"row": 134, "column": 48}}, {"id": 278, "type": "ERROR", "text": "v)", "parent": 268, "children": [279], "start_point": {"row": 134, "column": 49}, "end_point": {"row": 134, "column": 51}}, {"id": 279, "type": "identifier", "text": "v", "parent": 278, "children": [], "start_point": {"row": 134, "column": 49}, "end_point": {"row": 134, "column": 50}}, {"id": 280, "type": "declaration", "text": "static TokenType KeyWordToToken(const std::string& str);", "parent": 21, "children": [281, 282], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 60}}, {"id": 281, "type": "type_identifier", "text": "TokenType", "parent": 280, "children": [], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 20}}, {"id": 282, "type": "function_declarator", "text": "KeyWordToToken(const std::string& str)", "parent": 280, "children": [283, 284], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 59}}, {"id": 283, "type": "identifier", "text": "KeyWordToToken", "parent": 282, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 35}}, {"id": 284, "type": "parameter_list", "text": "(const std::string& str)", "parent": 282, "children": [285], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 59}}, {"id": 285, "type": "parameter_declaration", "text": "const std::string& str", "parent": 284, "children": [286, 287, 289], "start_point": {"row": 136, "column": 36}, "end_point": {"row": 136, "column": 58}}, {"id": 286, "type": "type_identifier", "text": "std", "parent": 285, "children": [], "start_point": {"row": 136, "column": 42}, "end_point": {"row": 136, "column": 45}}, {"id": 287, "type": "ERROR", "text": "::string&", "parent": 285, "children": [288], "start_point": {"row": 136, "column": 45}, "end_point": {"row": 136, "column": 54}}, {"id": 288, "type": "identifier", "text": "string", "parent": 287, "children": [], "start_point": {"row": 136, "column": 47}, "end_point": {"row": 136, "column": 53}}, {"id": 289, "type": "identifier", "text": "str", "parent": 285, "children": [], "start_point": {"row": 136, "column": 55}, "end_point": {"row": 136, "column": 58}}, {"id": 290, "type": "ERROR", "text": "TokenType GetToken() const", "parent": 21, "children": [291, 292], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 30}}, {"id": 291, "type": "type_identifier", "text": "TokenType", "parent": 290, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 13}}, {"id": 292, "type": "function_declarator", "text": "GetToken()", "parent": 290, "children": [293, 294], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 24}}, {"id": 293, "type": "identifier", "text": "GetToken", "parent": 292, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 22}}, {"id": 294, "type": "parameter_list", "text": "()", "parent": 292, "children": [], "start_point": {"row": 138, "column": 22}, "end_point": {"row": 138, "column": 24}}, {"id": 295, "type": "return_statement", "text": "return type;", "parent": 21, "children": [296], "start_point": {"row": 138, "column": 33}, "end_point": {"row": 138, "column": 45}}, {"id": 296, "type": "identifier", "text": "type", "parent": 295, "children": [], "start_point": {"row": 138, "column": 40}, "end_point": {"row": 138, "column": 44}}, {"id": 297, "type": "labeled_statement", "text": "std::string GetIdentName() const \n { \n\tassert(type == Token::Identifier && \"Incorrect type for identname\");\n\tassert(strVal.size() != 0 && \"String should not be empty!\");\n\treturn strVal; \n }", "parent": 21, "children": [298, 299], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 144, "column": 5}}, {"id": 298, "type": "statement_identifier", "text": "std", "parent": 297, "children": [], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 7}}, {"id": 299, "type": "ERROR", "text": ":string GetIdentName() const", "parent": 297, "children": [300, 301], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 36}}, {"id": 300, "type": "type_identifier", "text": "string", "parent": 299, "children": [], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 15}}, {"id": 301, "type": "function_declarator", "text": "GetIdentName() const", "parent": 299, "children": [302, 303], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 36}}, {"id": 302, "type": "identifier", "text": "GetIdentName", "parent": 301, "children": [], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 28}}, {"id": 303, "type": "parameter_list", "text": "()", "parent": 301, "children": [], "start_point": {"row": 139, "column": 28}, "end_point": {"row": 139, "column": 30}}, {"id": 304, "type": "call_expression", "text": "assert(type == Token::Identifier && \"Incorrect type for identname\")", "parent": 297, "children": [305, 306], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 68}}, {"id": 305, "type": "identifier", "text": "assert", "parent": 304, "children": [], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 7}}, {"id": 306, "type": "argument_list", "text": "(type == Token::Identifier && \"Incorrect type for identname\")", "parent": 304, "children": [307], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 68}}, {"id": 307, "type": "binary_expression", "text": "type == Token::Identifier && \"Incorrect type for identname\"", "parent": 306, "children": [308, 312, 314, 315], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 67}}, {"id": 308, "type": "binary_expression", "text": "type == Token", "parent": 307, "children": [309, 310, 311], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 21}}, {"id": 309, "type": "identifier", "text": "type", "parent": 308, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 12}}, {"id": 310, "type": "==", "text": "==", "parent": 308, "children": [], "start_point": {"row": 141, "column": 13}, "end_point": {"row": 141, "column": 15}}, {"id": 311, "type": "identifier", "text": "Token", "parent": 308, "children": [], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 21}}, {"id": 312, "type": "ERROR", "text": "::Identifier", "parent": 307, "children": [313], "start_point": {"row": 141, "column": 21}, "end_point": {"row": 141, "column": 33}}, {"id": 313, "type": "identifier", "text": "Identifier", "parent": 312, "children": [], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 33}}, {"id": 314, "type": "&&", "text": "&&", "parent": 307, "children": [], "start_point": {"row": 141, "column": 34}, "end_point": {"row": 141, "column": 36}}, {"id": 315, "type": "string_literal", "text": "\"Incorrect type for identname\"", "parent": 307, "children": [], "start_point": {"row": 141, "column": 37}, "end_point": {"row": 141, "column": 67}}, {"id": 316, "type": "call_expression", "text": "assert(strVal.size() != 0 && \"String should not be empty!\")", "parent": 297, "children": [317, 318], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 60}}, {"id": 317, "type": "identifier", "text": "assert", "parent": 316, "children": [], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 7}}, {"id": 318, "type": "argument_list", "text": "(strVal.size() != 0 && \"String should not be empty!\")", "parent": 316, "children": [319], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 60}}, {"id": 319, "type": "binary_expression", "text": "strVal.size() != 0 && \"String should not be empty!\"", "parent": 318, "children": [320, 328, 329], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 59}}, {"id": 320, "type": "binary_expression", "text": "strVal.size() != 0", "parent": 319, "children": [321, 326, 327], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 26}}, {"id": 321, "type": "call_expression", "text": "strVal.size()", "parent": 320, "children": [322, 325], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 21}}, {"id": 322, "type": "field_expression", "text": "strVal.size", "parent": 321, "children": [323, 324], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 19}}, {"id": 323, "type": "identifier", "text": "strVal", "parent": 322, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 14}}, {"id": 324, "type": "field_identifier", "text": "size", "parent": 322, "children": [], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 19}}, {"id": 325, "type": "argument_list", "text": "()", "parent": 321, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 21}}, {"id": 326, "type": "!=", "text": "!=", "parent": 320, "children": [], "start_point": {"row": 142, "column": 22}, "end_point": {"row": 142, "column": 24}}, {"id": 327, "type": "number_literal", "text": "0", "parent": 320, "children": [], "start_point": {"row": 142, "column": 25}, "end_point": {"row": 142, "column": 26}}, {"id": 328, "type": "&&", "text": "&&", "parent": 319, "children": [], "start_point": {"row": 142, "column": 27}, "end_point": {"row": 142, "column": 29}}, {"id": 329, "type": "string_literal", "text": "\"String should not be empty!\"", "parent": 319, "children": [], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 59}}, {"id": 330, "type": "return_statement", "text": "return strVal;", "parent": 297, "children": [331], "start_point": {"row": 143, "column": 1}, "end_point": {"row": 143, "column": 15}}, {"id": 331, "type": "identifier", "text": "strVal", "parent": 330, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 14}}, {"id": 332, "type": "ERROR", "text": "uint64_t GetIntVal() const", "parent": 21, "children": [333, 334], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 30}}, {"id": 333, "type": "primitive_type", "text": "uint64_t", "parent": 332, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 12}}, {"id": 334, "type": "function_declarator", "text": "GetIntVal()", "parent": 332, "children": [335, 336], "start_point": {"row": 146, "column": 13}, "end_point": {"row": 146, "column": 24}}, {"id": 335, "type": "identifier", "text": "GetIntVal", "parent": 334, "children": [], "start_point": {"row": 146, "column": 13}, "end_point": {"row": 146, "column": 22}}, {"id": 336, "type": "parameter_list", "text": "()", "parent": 334, "children": [], "start_point": {"row": 146, "column": 22}, "end_point": {"row": 146, "column": 24}}, {"id": 337, "type": "call_expression", "text": "assert((type == Token::Integer || type == Token::Char) &&\n\t \"Request for integer value from wrong type???\")", "parent": 21, "children": [338, 339], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 149, "column": 55}}, {"id": 338, "type": "identifier", "text": "assert", "parent": 337, "children": [], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 7}}, {"id": 339, "type": "argument_list", "text": "((type == Token::Integer || type == Token::Char) &&\n\t \"Request for integer value from wrong type???\")", "parent": 337, "children": [340], "start_point": {"row": 148, "column": 7}, "end_point": {"row": 149, "column": 55}}, {"id": 340, "type": "binary_expression", "text": "(type == Token::Integer || type == Token::Char) &&\n\t \"Request for integer value from wrong type???\"", "parent": 339, "children": [341, 356, 357], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 149, "column": 54}}, {"id": 341, "type": "parenthesized_expression", "text": "(type == Token::Integer || type == Token::Char)", "parent": 340, "children": [342, 354], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 55}}, {"id": 342, "type": "binary_expression", "text": "type == Token::Integer || type == Token", "parent": 341, "children": [343, 347, 349, 350], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 48}}, {"id": 343, "type": "binary_expression", "text": "type == Token", "parent": 342, "children": [344, 345, 346], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 22}}, {"id": 344, "type": "identifier", "text": "type", "parent": 343, "children": [], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 13}}, {"id": 345, "type": "==", "text": "==", "parent": 343, "children": [], "start_point": {"row": 148, "column": 14}, "end_point": {"row": 148, "column": 16}}, {"id": 346, "type": "identifier", "text": "Token", "parent": 343, "children": [], "start_point": {"row": 148, "column": 17}, "end_point": {"row": 148, "column": 22}}, {"id": 347, "type": "ERROR", "text": "::Integer", "parent": 342, "children": [348], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 31}}, {"id": 348, "type": "identifier", "text": "Integer", "parent": 347, "children": [], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 31}}, {"id": 349, "type": "||", "text": "||", "parent": 342, "children": [], "start_point": {"row": 148, "column": 32}, "end_point": {"row": 148, "column": 34}}, {"id": 350, "type": "binary_expression", "text": "type == Token", "parent": 342, "children": [351, 352, 353], "start_point": {"row": 148, "column": 35}, "end_point": {"row": 148, "column": 48}}, {"id": 351, "type": "identifier", "text": "type", "parent": 350, "children": [], "start_point": {"row": 148, "column": 35}, "end_point": {"row": 148, "column": 39}}, {"id": 352, "type": "==", "text": "==", "parent": 350, "children": [], "start_point": {"row": 148, "column": 40}, "end_point": {"row": 148, "column": 42}}, {"id": 353, "type": "identifier", "text": "Token", "parent": 350, "children": [], "start_point": {"row": 148, "column": 43}, "end_point": {"row": 148, "column": 48}}, {"id": 354, "type": "ERROR", "text": "::Char", "parent": 341, "children": [355], "start_point": {"row": 148, "column": 48}, "end_point": {"row": 148, "column": 54}}, {"id": 355, "type": "identifier", "text": "Char", "parent": 354, "children": [], "start_point": {"row": 148, "column": 50}, "end_point": {"row": 148, "column": 54}}, {"id": 356, "type": "&&", "text": "&&", "parent": 340, "children": [], "start_point": {"row": 148, "column": 56}, "end_point": {"row": 148, "column": 58}}, {"id": 357, "type": "string_literal", "text": "\"Request for integer value from wrong type???\"", "parent": 340, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 54}}, {"id": 358, "type": "return_statement", "text": "return intVal;", "parent": 21, "children": [359], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 15}}, {"id": 359, "type": "identifier", "text": "intVal", "parent": 358, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 14}}, {"id": 360, "type": "ERROR", "text": "double GetRealVal() const", "parent": 21, "children": [361, 362], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 29}}, {"id": 361, "type": "primitive_type", "text": "double", "parent": 360, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 10}}, {"id": 362, "type": "function_declarator", "text": "GetRealVal()", "parent": 360, "children": [363, 364], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 23}}, {"id": 363, "type": "identifier", "text": "GetRealVal", "parent": 362, "children": [], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 21}}, {"id": 364, "type": "parameter_list", "text": "()", "parent": 362, "children": [], "start_point": {"row": 153, "column": 21}, "end_point": {"row": 153, "column": 23}}, {"id": 365, "type": "call_expression", "text": "assert(type == Token::Real && \"Request for real from wrong type???\")", "parent": 21, "children": [366, 367], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 69}}, {"id": 366, "type": "identifier", "text": "assert", "parent": 365, "children": [], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 7}}, {"id": 367, "type": "argument_list", "text": "(type == Token::Real && \"Request for real from wrong type???\")", "parent": 365, "children": [368], "start_point": {"row": 155, "column": 7}, "end_point": {"row": 155, "column": 69}}, {"id": 368, "type": "binary_expression", "text": "type == Token::Real && \"Request for real from wrong type???\"", "parent": 367, "children": [369, 373, 375, 376], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 68}}, {"id": 369, "type": "binary_expression", "text": "type == Token", "parent": 368, "children": [370, 371, 372], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 21}}, {"id": 370, "type": "identifier", "text": "type", "parent": 369, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 12}}, {"id": 371, "type": "==", "text": "==", "parent": 369, "children": [], "start_point": {"row": 155, "column": 13}, "end_point": {"row": 155, "column": 15}}, {"id": 372, "type": "identifier", "text": "Token", "parent": 369, "children": [], "start_point": {"row": 155, "column": 16}, "end_point": {"row": 155, "column": 21}}, {"id": 373, "type": "ERROR", "text": "::Real", "parent": 368, "children": [374], "start_point": {"row": 155, "column": 21}, "end_point": {"row": 155, "column": 27}}, {"id": 374, "type": "identifier", "text": "Real", "parent": 373, "children": [], "start_point": {"row": 155, "column": 23}, "end_point": {"row": 155, "column": 27}}, {"id": 375, "type": "&&", "text": "&&", "parent": 368, "children": [], "start_point": {"row": 155, "column": 28}, "end_point": {"row": 155, "column": 30}}, {"id": 376, "type": "string_literal", "text": "\"Request for real from wrong type???\"", "parent": 368, "children": [], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 68}}, {"id": 377, "type": "return_statement", "text": "return realVal;", "parent": 21, "children": [378], "start_point": {"row": 156, "column": 1}, "end_point": {"row": 156, "column": 16}}, {"id": 378, "type": "identifier", "text": "realVal", "parent": 377, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 15}}, {"id": 379, "type": "labeled_statement", "text": "std::string GetStrVal() const \n { \n\tassert(type == Token::StringLiteral && \"Request for string from wrong type???\");\n\treturn strVal; \n }", "parent": 21, "children": [380, 381], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 163, "column": 5}}, {"id": 380, "type": "statement_identifier", "text": "std", "parent": 379, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 7}}, {"id": 381, "type": "ERROR", "text": ":string GetStrVal() const", "parent": 379, "children": [382, 383], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 33}}, {"id": 382, "type": "type_identifier", "text": "string", "parent": 381, "children": [], "start_point": {"row": 159, "column": 9}, "end_point": {"row": 159, "column": 15}}, {"id": 383, "type": "function_declarator", "text": "GetStrVal() const", "parent": 381, "children": [384, 385], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 33}}, {"id": 384, "type": "identifier", "text": "GetStrVal", "parent": 383, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 25}}, {"id": 385, "type": "parameter_list", "text": "()", "parent": 383, "children": [], "start_point": {"row": 159, "column": 25}, "end_point": {"row": 159, "column": 27}}, {"id": 386, "type": "call_expression", "text": "assert(type == Token::StringLiteral && \"Request for string from wrong type???\")", "parent": 379, "children": [387, 388], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 80}}, {"id": 387, "type": "identifier", "text": "assert", "parent": 386, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 7}}, {"id": 388, "type": "argument_list", "text": "(type == Token::StringLiteral && \"Request for string from wrong type???\")", "parent": 386, "children": [389, 394], "start_point": {"row": 161, "column": 7}, "end_point": {"row": 161, "column": 80}}, {"id": 389, "type": "ERROR", "text": "type == Token::", "parent": 388, "children": [390], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 23}}, {"id": 390, "type": "binary_expression", "text": "type == Token", "parent": 389, "children": [391, 392, 393], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 21}}, {"id": 391, "type": "identifier", "text": "type", "parent": 390, "children": [], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 12}}, {"id": 392, "type": "==", "text": "==", "parent": 390, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 15}}, {"id": 393, "type": "identifier", "text": "Token", "parent": 390, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 21}}, {"id": 394, "type": "binary_expression", "text": "StringLiteral && \"Request for string from wrong type???\"", "parent": 388, "children": [395, 396, 397], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 79}}, {"id": 395, "type": "identifier", "text": "StringLiteral", "parent": 394, "children": [], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 36}}, {"id": 396, "type": "&&", "text": "&&", "parent": 394, "children": [], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 39}}, {"id": 397, "type": "string_literal", "text": "\"Request for string from wrong type???\"", "parent": 394, "children": [], "start_point": {"row": 161, "column": 40}, "end_point": {"row": 161, "column": 79}}, {"id": 398, "type": "return_statement", "text": "return strVal;", "parent": 379, "children": [399], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 15}}, {"id": 399, "type": "identifier", "text": "strVal", "parent": 398, "children": [], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 162, "column": 14}}, {"id": 400, "type": "declaration", "text": "void dump(std::ostream& out, const char* file = 0, int line = 0) const;", "parent": 21, "children": [401, 402, 418, 420, 424], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 75}}, {"id": 401, "type": "primitive_type", "text": "void", "parent": 400, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 8}}, {"id": 402, "type": "init_declarator", "text": "dump(std::ostream& out, const char* file = 0", "parent": 400, "children": [403, 416, 417], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 53}}, {"id": 403, "type": "function_declarator", "text": "dump(std::ostream& out, const char* file", "parent": 402, "children": [404, 405], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 49}}, {"id": 404, "type": "identifier", "text": "dump", "parent": 403, "children": [], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 13}}, {"id": 405, "type": "parameter_list", "text": "(std::ostream& out, const char* file", "parent": 403, "children": [406, 411], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 49}}, {"id": 406, "type": "parameter_declaration", "text": "std::ostream& out", "parent": 405, "children": [407, 408, 410], "start_point": {"row": 166, "column": 14}, "end_point": {"row": 166, "column": 31}}, {"id": 407, "type": "type_identifier", "text": "std", "parent": 406, "children": [], "start_point": {"row": 166, "column": 14}, "end_point": {"row": 166, "column": 17}}, {"id": 408, "type": "ERROR", "text": "::ostream&", "parent": 406, "children": [409], "start_point": {"row": 166, "column": 17}, "end_point": {"row": 166, "column": 27}}, {"id": 409, "type": "identifier", "text": "ostream", "parent": 408, "children": [], "start_point": {"row": 166, "column": 19}, "end_point": {"row": 166, "column": 26}}, {"id": 410, "type": "identifier", "text": "out", "parent": 406, "children": [], "start_point": {"row": 166, "column": 28}, "end_point": {"row": 166, "column": 31}}, {"id": 411, "type": "parameter_declaration", "text": "const char* file", "parent": 405, "children": [412, 413], "start_point": {"row": 166, "column": 33}, "end_point": {"row": 166, "column": 49}}, {"id": 412, "type": "primitive_type", "text": "char", "parent": 411, "children": [], "start_point": {"row": 166, "column": 39}, "end_point": {"row": 166, "column": 43}}, {"id": 413, "type": "pointer_declarator", "text": "* file", "parent": 411, "children": [414, 415], "start_point": {"row": 166, "column": 43}, "end_point": {"row": 166, "column": 49}}, {"id": 414, "type": "*", "text": "*", "parent": 413, "children": [], "start_point": {"row": 166, "column": 43}, "end_point": {"row": 166, "column": 44}}, {"id": 415, "type": "identifier", "text": "file", "parent": 413, "children": [], "start_point": {"row": 166, "column": 45}, "end_point": {"row": 166, "column": 49}}, {"id": 416, "type": "=", "text": "=", "parent": 402, "children": [], "start_point": {"row": 166, "column": 50}, "end_point": {"row": 166, "column": 51}}, {"id": 417, "type": "number_literal", "text": "0", "parent": 402, "children": [], "start_point": {"row": 166, "column": 52}, "end_point": {"row": 166, "column": 53}}, {"id": 418, "type": "ERROR", "text": "int", "parent": 400, "children": [419], "start_point": {"row": 166, "column": 55}, "end_point": {"row": 166, "column": 58}}, {"id": 419, "type": "identifier", "text": "int", "parent": 418, "children": [], "start_point": {"row": 166, "column": 55}, "end_point": {"row": 166, "column": 58}}, {"id": 420, "type": "init_declarator", "text": "line = 0", "parent": 400, "children": [421, 422, 423], "start_point": {"row": 166, "column": 59}, "end_point": {"row": 166, "column": 67}}, {"id": 421, "type": "identifier", "text": "line", "parent": 420, "children": [], "start_point": {"row": 166, "column": 59}, "end_point": {"row": 166, "column": 63}}, {"id": 422, "type": "=", "text": "=", "parent": 420, "children": [], "start_point": {"row": 166, "column": 64}, "end_point": {"row": 166, "column": 65}}, {"id": 423, "type": "number_literal", "text": "0", "parent": 420, "children": [], "start_point": {"row": 166, "column": 66}, "end_point": {"row": 166, "column": 67}}, {"id": 424, "type": "ERROR", "text": ") const", "parent": 400, "children": [], "start_point": {"row": 166, "column": 67}, "end_point": {"row": 166, "column": 74}}, {"id": 425, "type": "ERROR", "text": "void dump() const", "parent": 21, "children": [426, 427], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 21}}, {"id": 426, "type": "primitive_type", "text": "void", "parent": 425, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 8}}, {"id": 427, "type": "function_declarator", "text": "dump()", "parent": 425, "children": [428, 429], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 15}}, {"id": 428, "type": "identifier", "text": "dump", "parent": 427, "children": [], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 13}}, {"id": 429, "type": "parameter_list", "text": "()", "parent": 427, "children": [], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 15}}, {"id": 430, "type": "labeled_statement", "text": "std::string ToString() const;", "parent": 21, "children": [431, 432], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 33}}, {"id": 431, "type": "statement_identifier", "text": "std", "parent": 430, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 7}}, {"id": 432, "type": "ERROR", "text": ":string ToString() const", "parent": 430, "children": [433, 434], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 32}}, {"id": 433, "type": "type_identifier", "text": "string", "parent": 432, "children": [], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 15}}, {"id": 434, "type": "function_declarator", "text": "ToString() const", "parent": 432, "children": [435, 436], "start_point": {"row": 168, "column": 16}, "end_point": {"row": 168, "column": 32}}, {"id": 435, "type": "identifier", "text": "ToString", "parent": 434, "children": [], "start_point": {"row": 168, "column": 16}, "end_point": {"row": 168, "column": 24}}, {"id": 436, "type": "parameter_list", "text": "()", "parent": 434, "children": [], "start_point": {"row": 168, "column": 24}, "end_point": {"row": 168, "column": 26}}, {"id": 437, "type": "labeled_statement", "text": "std::string TypeStr() const;", "parent": 21, "children": [438, 439], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 32}}, {"id": 438, "type": "statement_identifier", "text": "std", "parent": 437, "children": [], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 7}}, {"id": 439, "type": "ERROR", "text": ":string TypeStr() const", "parent": 437, "children": [440, 441], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 31}}, {"id": 440, "type": "type_identifier", "text": "string", "parent": 439, "children": [], "start_point": {"row": 169, "column": 9}, "end_point": {"row": 169, "column": 15}}, {"id": 441, "type": "function_declarator", "text": "TypeStr() const", "parent": 439, "children": [442, 443], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 31}}, {"id": 442, "type": "identifier", "text": "TypeStr", "parent": 441, "children": [], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 23}}, {"id": 443, "type": "parameter_list", "text": "()", "parent": 441, "children": [], "start_point": {"row": 169, "column": 23}, "end_point": {"row": 169, "column": 25}}, {"id": 444, "type": "declaration", "text": "void SetWhere(const std::string& file, int line, int col);", "parent": 21, "children": [445, 446], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 62}}, {"id": 445, "type": "primitive_type", "text": "void", "parent": 444, "children": [], "start_point": {"row": 171, "column": 4}, "end_point": {"row": 171, "column": 8}}, {"id": 446, "type": "function_declarator", "text": "SetWhere(const std::string& file, int line, int col)", "parent": 444, "children": [447, 448], "start_point": {"row": 171, "column": 9}, "end_point": {"row": 171, "column": 61}}, {"id": 447, "type": "identifier", "text": "SetWhere", "parent": 446, "children": [], "start_point": {"row": 171, "column": 9}, "end_point": {"row": 171, "column": 17}}, {"id": 448, "type": "parameter_list", "text": "(const std::string& file, int line, int col)", "parent": 446, "children": [449, 454, 457], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 61}}, {"id": 449, "type": "parameter_declaration", "text": "const std::string& file", "parent": 448, "children": [450, 451, 453], "start_point": {"row": 171, "column": 18}, "end_point": {"row": 171, "column": 41}}, {"id": 450, "type": "type_identifier", "text": "std", "parent": 449, "children": [], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 27}}, {"id": 451, "type": "ERROR", "text": "::string&", "parent": 449, "children": [452], "start_point": {"row": 171, "column": 27}, "end_point": {"row": 171, "column": 36}}, {"id": 452, "type": "identifier", "text": "string", "parent": 451, "children": [], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 35}}, {"id": 453, "type": "identifier", "text": "file", "parent": 449, "children": [], "start_point": {"row": 171, "column": 37}, "end_point": {"row": 171, "column": 41}}, {"id": 454, "type": "parameter_declaration", "text": "int line", "parent": 448, "children": [455, 456], "start_point": {"row": 171, "column": 43}, "end_point": {"row": 171, "column": 51}}, {"id": 455, "type": "primitive_type", "text": "int", "parent": 454, "children": [], "start_point": {"row": 171, "column": 43}, "end_point": {"row": 171, "column": 46}}, {"id": 456, "type": "identifier", "text": "line", "parent": 454, "children": [], "start_point": {"row": 171, "column": 47}, "end_point": {"row": 171, "column": 51}}, {"id": 457, "type": "parameter_declaration", "text": "int col", "parent": 448, "children": [458, 459], "start_point": {"row": 171, "column": 53}, "end_point": {"row": 171, "column": 60}}, {"id": 458, "type": "primitive_type", "text": "int", "parent": 457, "children": [], "start_point": {"row": 171, "column": 53}, "end_point": {"row": 171, "column": 56}}, {"id": 459, "type": "identifier", "text": "col", "parent": 457, "children": [], "start_point": {"row": 171, "column": 57}, "end_point": {"row": 171, "column": 60}}, {"id": 460, "type": "labeled_statement", "text": "std::string Where();", "parent": 21, "children": [461, 462], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 24}}, {"id": 461, "type": "statement_identifier", "text": "std", "parent": 460, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 7}}, {"id": 462, "type": "declaration", "text": "string Where();", "parent": 460, "children": [463, 464], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 24}}, {"id": 463, "type": "type_identifier", "text": "string", "parent": 462, "children": [], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 15}}, {"id": 464, "type": "function_declarator", "text": "Where()", "parent": 462, "children": [465, 466], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 23}}, {"id": 465, "type": "identifier", "text": "Where", "parent": 464, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 21}}, {"id": 466, "type": "parameter_list", "text": "()", "parent": 464, "children": [], "start_point": {"row": 172, "column": 21}, "end_point": {"row": 172, "column": 23}}, {"id": 467, "type": "ERROR", "text": "const Location& Loc() const", "parent": 21, "children": [468, 469], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 31}}, {"id": 468, "type": "type_identifier", "text": "Location", "parent": 467, "children": [], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 18}}, {"id": 469, "type": "function_declarator", "text": "Loc()", "parent": 467, "children": [470, 471], "start_point": {"row": 173, "column": 20}, "end_point": {"row": 173, "column": 25}}, {"id": 470, "type": "identifier", "text": "Loc", "parent": 469, "children": [], "start_point": {"row": 173, "column": 20}, "end_point": {"row": 173, "column": 23}}, {"id": 471, "type": "parameter_list", "text": "()", "parent": 469, "children": [], "start_point": {"row": 173, "column": 23}, "end_point": {"row": 173, "column": 25}}, {"id": 472, "type": "return_statement", "text": "return where;", "parent": 21, "children": [473], "start_point": {"row": 173, "column": 34}, "end_point": {"row": 173, "column": 47}}, {"id": 473, "type": "identifier", "text": "where", "parent": 472, "children": [], "start_point": {"row": 173, "column": 41}, "end_point": {"row": 173, "column": 46}}, {"id": 474, "type": "ERROR", "text": "int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison;", "parent": 21, "children": [475, 476, 479], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 176, "column": 100}}, {"id": 475, "type": "primitive_type", "text": "int", "parent": 474, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 7}}, {"id": 476, "type": "function_declarator", "text": "Precedence()", "parent": 474, "children": [477, 478], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 20}}, {"id": 477, "type": "identifier", "text": "Precedence", "parent": 476, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 18}}, {"id": 478, "type": "parameter_list", "text": "()", "parent": 476, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 20}}, {"id": 479, "type": "declaration", "text": "const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison;", "parent": 474, "children": [480, 481, 493], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 176, "column": 100}}, {"id": 480, "type": "primitive_type", "text": "bool", "parent": 479, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 8}}, {"id": 481, "type": "ERROR", "text": "IsCompare() const { return type >= Token::FirstComparison && type <= Token::", "parent": 479, "children": [482, 485, 486, 487, 488, 489, 490, 491, 492], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 85}}, {"id": 482, "type": "function_declarator", "text": "IsCompare() const", "parent": 481, "children": [483, 484], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 26}}, {"id": 483, "type": "identifier", "text": "IsCompare", "parent": 482, "children": [], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 18}}, {"id": 484, "type": "parameter_list", "text": "()", "parent": 482, "children": [], "start_point": {"row": 176, "column": 18}, "end_point": {"row": 176, "column": 20}}, {"id": 485, "type": "identifier", "text": "type", "parent": 481, "children": [], "start_point": {"row": 176, "column": 36}, "end_point": {"row": 176, "column": 40}}, {"id": 486, "type": ">=", "text": ">=", "parent": 481, "children": [], "start_point": {"row": 176, "column": 41}, "end_point": {"row": 176, "column": 43}}, {"id": 487, "type": "identifier", "text": "Token", "parent": 481, "children": [], "start_point": {"row": 176, "column": 44}, "end_point": {"row": 176, "column": 49}}, {"id": 488, "type": "identifier", "text": "FirstComparison", "parent": 481, "children": [], "start_point": {"row": 176, "column": 51}, "end_point": {"row": 176, "column": 66}}, {"id": 489, "type": "&&", "text": "&&", "parent": 481, "children": [], "start_point": {"row": 176, "column": 67}, "end_point": {"row": 176, "column": 69}}, {"id": 490, "type": "identifier", "text": "type", "parent": 481, "children": [], "start_point": {"row": 176, "column": 70}, "end_point": {"row": 176, "column": 74}}, {"id": 491, "type": "<=", "text": "<=", "parent": 481, "children": [], "start_point": {"row": 176, "column": 75}, "end_point": {"row": 176, "column": 77}}, {"id": 492, "type": "identifier", "text": "Token", "parent": 481, "children": [], "start_point": {"row": 176, "column": 78}, "end_point": {"row": 176, "column": 83}}, {"id": 493, "type": "identifier", "text": "LastComparison", "parent": 479, "children": [], "start_point": {"row": 176, "column": 85}, "end_point": {"row": 176, "column": 99}}, {"id": 494, "type": "labeled_statement", "text": "private:\n TokenType type;", "parent": 0, "children": [495], "start_point": {"row": 178, "column": 0}, "end_point": {"row": 179, "column": 21}}, {"id": 495, "type": "declaration", "text": "TokenType type;", "parent": 494, "children": [496, 497], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 21}}, {"id": 496, "type": "type_identifier", "text": "TokenType", "parent": 495, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 13}}, {"id": 497, "type": "identifier", "text": "type", "parent": 495, "children": [], "start_point": {"row": 179, "column": 16}, "end_point": {"row": 179, "column": 20}}, {"id": 498, "type": "declaration", "text": "Location where;", "parent": 0, "children": [499, 500], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 22}}, {"id": 499, "type": "type_identifier", "text": "Location", "parent": 498, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 12}}, {"id": 500, "type": "identifier", "text": "where", "parent": 498, "children": [], "start_point": {"row": 181, "column": 16}, "end_point": {"row": 181, "column": 21}}, {"id": 501, "type": "labeled_statement", "text": "std::string strVal;", "parent": 0, "children": [502, 503], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 23}}, {"id": 502, "type": "statement_identifier", "text": "std", "parent": 501, "children": [], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 7}}, {"id": 503, "type": "declaration", "text": "string strVal;", "parent": 501, "children": [504, 505], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 23}}, {"id": 504, "type": "type_identifier", "text": "string", "parent": 503, "children": [], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 15}}, {"id": 505, "type": "identifier", "text": "strVal", "parent": 503, "children": [], "start_point": {"row": 184, "column": 16}, "end_point": {"row": 184, "column": 22}}, {"id": 506, "type": "declaration", "text": "uint64_t intVal;", "parent": 0, "children": [507, 508], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 23}}, {"id": 507, "type": "primitive_type", "text": "uint64_t", "parent": 506, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 12}}, {"id": 508, "type": "identifier", "text": "intVal", "parent": 506, "children": [], "start_point": {"row": 185, "column": 16}, "end_point": {"row": 185, "column": 22}}, {"id": 509, "type": "declaration", "text": "double realVal;", "parent": 0, "children": [510, 511], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 24}}, {"id": 510, "type": "primitive_type", "text": "double", "parent": 509, "children": [], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 10}}, {"id": 511, "type": "identifier", "text": "realVal", "parent": 509, "children": [], "start_point": {"row": 186, "column": 16}, "end_point": {"row": 186, "column": 23}}, {"id": 512, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 189, "column": 0}, "end_point": {"row": 189, "column": 6}}]}, "node_categories": {"declarations": {"functions": [21, 231, 282, 292, 301, 334, 362, 383, 403, 427, 434, 441, 446, 464, 469, 476, 482], "variables": [24, 234, 243, 256, 268, 280, 285, 400, 406, 411, 444, 449, 454, 457, 462, 479, 495, 498, 503, 506, 509], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": [25, 26, 28, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 111, 113, 115, 117, 119, 121, 123, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 227]}, "statements": {"expressions": [304, 307, 308, 316, 319, 320, 321, 322, 337, 340, 341, 342, 343, 350, 365, 368, 369, 386, 390, 394], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 22, 27, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 228, 232, 235, 236, 238, 239, 241, 242, 244, 245, 247, 248, 250, 251, 253, 254, 255, 257, 258, 260, 261, 263, 264, 265, 267, 269, 270, 272, 273, 275, 276, 277, 279, 281, 283, 286, 288, 289, 291, 293, 296, 298, 300, 302, 305, 309, 311, 313, 317, 323, 324, 331, 335, 338, 344, 346, 348, 351, 353, 355, 359, 363, 366, 370, 372, 374, 378, 380, 382, 384, 387, 391, 393, 395, 399, 404, 407, 409, 410, 415, 419, 421, 428, 431, 433, 435, 438, 440, 442, 447, 450, 452, 453, 456, 459, 461, 463, 465, 468, 470, 473, 477, 483, 485, 487, 488, 490, 492, 493, 496, 497, 499, 500, 502, 504, 505, 508, 511, 512], "returns": [295, 330, 358, 377, 398, 472], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 226, 230, 315, 327, 329, 357, 376, 397, 417, 423], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "Token", "text_snippet": "class Token\n{\npublic:\n enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStrin"}, {"node_id": 231, "universal_type": "function", "name": "unknown", "text_snippet": "Token()"}, {"node_id": 282, "universal_type": "function", "name": "unknown", "text_snippet": "KeyWordToToken(const std::string& str)"}, {"node_id": 292, "universal_type": "function", "name": "unknown", "text_snippet": "GetToken()"}, {"node_id": 301, "universal_type": "function", "name": "unknown", "text_snippet": "GetIdentName() const"}, {"node_id": 334, "universal_type": "function", "name": "unknown", "text_snippet": "GetIntVal()"}, {"node_id": 362, "universal_type": "function", "name": "unknown", "text_snippet": "GetRealVal()"}, {"node_id": 383, "universal_type": "function", "name": "unknown", "text_snippet": "GetStrVal() const"}, {"node_id": 403, "universal_type": "function", "name": "unknown", "text_snippet": "dump(std::ostream& out, const char* file"}, {"node_id": 427, "universal_type": "function", "name": "unknown", "text_snippet": "dump()"}, {"node_id": 434, "universal_type": "function", "name": "unknown", "text_snippet": "ToString() const"}, {"node_id": 441, "universal_type": "function", "name": "unknown", "text_snippet": "TypeStr() const"}, {"node_id": 446, "universal_type": "function", "name": "line,", "text_snippet": "SetWhere(const std::string& file, int line, int col)"}, {"node_id": 464, "universal_type": "function", "name": "unknown", "text_snippet": "Where()"}, {"node_id": 469, "universal_type": "function", "name": "unknown", "text_snippet": "Loc()"}, {"node_id": 476, "universal_type": "function", "name": "unknown", "text_snippet": "Precedence()"}, {"node_id": 482, "universal_type": "function", "name": "unknown", "text_snippet": "IsCompare() const"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"location.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <cassert>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <string>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <fstream>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <cstdint>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef TOKEN_H\n#define TOKEN_H\n\n#include \"location.h\"\n\n#include <cassert>\n#include <string>\n#include <fstream>\n#include <cstdint>\n\n\nclass Token\n{\npublic:\n enum TokenType\n {\n\t// Values of different types\n\tInteger,\n\tReal,\n\tStringLiteral,\n\tChar,\n\tBoolean,\n\n\t// Type/var/const declarations:\n\tType,\n\tVar,\n\tPacked,\n\tArray,\n\tOf,\n\tRecord,\n\tClass,\n\tIdentifier,\n\tConst,\n\tFile,\n\tSet,\n\tString,\n\tNil,\n\n\t// Symbols and such\n\tLeftParen,\n\tRightParen,\n\tLeftSquare,\n\tRightSquare,\n\tPlus,\n\tMinus,\n\tMultiply,\n\tDivide,\n\tComma,\n\tSemicolon,\n\tColon,\n\tAssign,\n\tPeriod,\n\tDotDot,\n\tUparrow,\n\tDiv,\n\tMod,\n\tXor,\n\tShr,\n\tShl,\n\n\t// Comparison symbols - these return bool in binary ops.\n\tLessOrEqual,\n\tFirstComparison = LessOrEqual,\n\tLessThan,\n\tGreaterOrEqual,\n\tGreaterThan,\n\tEqual,\n\tNotEqual,\n\tIn,\n\tLastComparison = In,\n\n\t// Keywords\n\tFor,\n\tTo,\n\tDownto,\n\tDo, \n\tIf,\n\tThen,\n\tElse,\n\tWhile,\n\tRepeat,\n\tUntil,\n\tFunction,\n\tProcedure,\n\tBegin,\n\tEnd,\n\tProgram,\n\tUnit,\n\tWrite,\n\tWriteln,\n\tRead,\n\tReadln,\n\tBuiltin,\n\tForward,\n\tInline,\n\tInterface,\n\tImplementation,\n\tAnd,\n\tOr,\n\tNot,\n\tCase,\n\tOtherwise,\n\tWith,\n\tVirtual,\n\tOverride,\n\tStatic,\n\tPrivate,\n\tPublic,\n\tProtected,\n\tConstructor,\n\tDestructor,\n\tLabel,\n\tGoto,\n\tUses,\n\tAt,\n\n\t// Specials\n\tLineNumber,\n\tFileName,\n\tSizeOf,\n\n\t// Errors\n\tOverflow,\n\tUntermString,\n\n\tEndOfFile = -1, \n\tUnknown = -1000,\n };\n\n Token();\n\t\n Token(TokenType t, const Location& w);\n Token(TokenType t, const Location& w, const std::string& str);\n Token(TokenType t, const Location& w, uint64_t v);\n Token(TokenType t, const Location& w, double v);\n\n static TokenType KeyWordToToken(const std::string& str);\n\n TokenType GetToken() const { return type; }\n std::string GetIdentName() const \n { \n\tassert(type == Token::Identifier && \"Incorrect type for identname\");\n\tassert(strVal.size() != 0 && \"String should not be empty!\");\n\treturn strVal; \n }\n\n uint64_t GetIntVal() const \n { \n\tassert((type == Token::Integer || type == Token::Char) &&\n\t \"Request for integer value from wrong type???\");\n\treturn intVal; \n }\n\n double GetRealVal() const \n { \n\tassert(type == Token::Real && \"Request for real from wrong type???\");\n\treturn realVal; \n }\n\n std::string GetStrVal() const \n { \n\tassert(type == Token::StringLiteral && \"Request for string from wrong type???\");\n\treturn strVal; \n }\n\n // For debug purposes.\n void dump(std::ostream& out, const char* file = 0, int line = 0) const;\n void dump() const;\n std::string ToString() const;\n std::string TypeStr() const;\n\n void SetWhere(const std::string& file, int line, int col);\n std::string Where();\n const Location& Loc() const { return where; }\n\n int Precedence() const;\n bool IsCompare() const { return type >= Token::FirstComparison && type <= Token::LastComparison; }\n\nprivate:\n TokenType type;\n // Store location where token started.\n Location where;\n \n // Values. \n std::string strVal; \n uint64_t intVal;\n double realVal;\n};\n\n#endif\n"}
234
c
#include "ite/ite_mac.h" static struct mii_ioctl_data phy_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 }; #define phy_set_page(page) do { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0) #define phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0) static uint16_t phy_reg_read(uint16_t reg) { phy_reg.reg_num = reg; phy_reg.val_read = 0; iteMacIoctl(&phy_reg, IOCGMIIREG); return phy_reg.val_read; } static int rtl8211f_reset(void) { int bmcr; // Software Reset PHY bmcr = phy_reg_read(MII_BMCR); if (bmcr < 0) return bmcr; bmcr |= BMCR_RESET; phy_reg_write(MII_BMCR, bmcr); do { bmcr = phy_reg_read(MII_BMCR); if (bmcr < 0) return bmcr; } while (bmcr & BMCR_RESET); return 0; } /* phy interrupt definition */ #define INTR_JABBER 0x0400 #define INTR_ALDPS_STATE_CHANGE 0x0200 #define INTR_PME 0x0080 #define INTR_PHY_REG_ACCESSIBLE 0x0020 #define INTR_LINK_CHG 0x0010 #define INTR_AN_COMPLETE 0x0008 #define INTR_AN_ERROR 0x0001 #define INTR_ENABLE_ALL (INTR_JABBER |\ INTR_ALDPS_STATE_CHANGE |\ INTR_PME |\ INTR_PHY_REG_ACCESSIBLE |\ INTR_LINK_CHG |\ INTR_AN_COMPLETE |\ INTR_AN_ERROR) static void rtl8211f_config_intr(void) { phy_set_page(0xA42); #if defined(CFG_NET_ETHERNET_LINK_INTR) phy_reg_write(0x12, INTR_ENABLE_ALL); #endif phy_set_page(0); } void PhyInit(int ethMode) { int res; uint16_t tmp; uint32_t timeout; if (ethMode == ITE_ETH_MAC_LB) return; /* phy reset */ if (rtl8211f_reset()) printf("rtl8211e reset fail! \n"); printf(" after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read); /* config interrupt */ rtl8211f_config_intr(); if (ethMode == ITE_ETH_PCS_LB_10) { printf(" PHY PCS 10 loopback! \n\n"); //phy_reg_write(0, 0x4100); phy_reg_write(0, 0x4000); usleep(20 * 1000); } else if(ethMode == ITE_ETH_PCS_LB_100) { printf(" PHY PCS 100 loopback! \n\n"); //phy_reg_write(0, 0x6100); phy_reg_write(0, 0x6000); phy_reg_read(0); printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read); usleep(20 * 1000); } else if(ethMode == ITE_ETH_PCS_LB_1000) { printf(" PHY PCS 1000 loopback! \n\n"); phy_reg_write(0, 0x4140); usleep(20 * 1000); } else if (ethMode == ITE_ETH_MDI_LB_10) { printf(" PHY MDI 10 loopback! \n\n"); phy_reg_write(0, 0x0100); usleep(100 * 1000); } else if (ethMode == ITE_ETH_MDI_LB_100) { printf(" PHY MDI 100 loopback! \n\n"); phy_reg_write(0, 0x2100); usleep(100 * 1000); } else if (ethMode == ITE_ETH_MDI_LB_1000) { printf(" PHY MDI 1000 loopback! \n\n"); phy_reg_write(0, 0x0140); usleep(100 * 1000); } } #define INTR_JABBER 0x0400 #define INTR_ALDPS_STATE_CHANGE 0x0200 #define INTR_PME 0x0080 #define INTR_PHY_REG_ACCESSIBLE 0x0020 #define INTR_LINK_CHG 0x0010 #define INTR_AN_COMPLETE 0x0008 #define INTR_AN_ERROR 0x0001 /* in interrupt context */ int rtl8211f_link_change(void) { uint16_t intr; phy_set_page(0xA43); intr = phy_reg_read(0x1D); phy_set_page(0); #if 1 if (intr & INTR_JABBER) ithPrintf("phy: jabber detected! \n"); if (intr & INTR_ALDPS_STATE_CHANGE) ithPrintf("phy: ALDPS state changed! \n"); if (intr & INTR_PME) ithPrintf("phy: WOL event occurred! \n"); if (intr & INTR_PHY_REG_ACCESSIBLE) ithPrintf("phy: Can access PHY register through MDC/MDIO! \n"); if (intr & INTR_AN_COMPLETE) ithPrintf("phy: Auto-Negotiation completed! \n"); if (intr & INTR_AN_ERROR) ithPrintf("phy: auto-negotiation error! \n"); #endif if (intr & INTR_LINK_CHG) { ithPrintf("phy: link change! \n"); return 1; } return 0; } #define PHYSR_FULL_DUPLEX 0x0008 #define PHYSR_LINK_OK 0x0004 /* return 0 means link up */ int rtl8211f_read_mode(int* speed, int* duplex) { uint16_t status = phy_reg_read(0x1A); uint16_t _speed = (status & 0x0030) >> 4; if (!(status & PHYSR_LINK_OK)) { ithPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status); return -1; } if (status & PHYSR_FULL_DUPLEX) (*duplex) = DUPLEX_FULL; else (*duplex) = DUPLEX_HALF; switch (_speed) { default: case 0: (*speed) = SPEED_10; break; case 1: (*speed) = SPEED_100; break; case 2: (*speed) = SPEED_1000; break; } return 0; // 0 means link up } /** * Check interrupt status for link change. * Call from mac driver's internal ISR for phy's interrupt. */ int(*itpPhyLinkChange)(void) = rtl8211f_link_change; /** * Replace mac driver's ISR for phy's interrupt. */ ITHGpioIntrHandler itpPhylinkIsr = NULL; /** * Returns 0 if the device reports link status up/ok */ int(*itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode; /** * Get link status. */ uint32_t(*itpPhyLinkStatus)(void) = NULL;
27.96
181
(translation_unit) "nclude "ite/ite_mac.h"\n\n\n\nstatic struct mii_ioctl_data phy_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n\n#define phy_set_page(page) do { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n#define phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n\nstatic uint16_t phy_reg_read(uint16_t reg)\n{\n phy_reg.reg_num = reg; \n phy_reg.val_read = 0; \n iteMacIoctl(&phy_reg, IOCGMIIREG);\n return phy_reg.val_read;\n}\n\nstatic int rtl8211f_reset(void)\n{\n int bmcr;\n\n // Software Reset PHY\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n bmcr |= BMCR_RESET;\n phy_reg_write(MII_BMCR, bmcr);\n\n do {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n return 0;\n}\n\n/* phy interrupt definition */\n#define INTR_JABBER 0x0400\n#define INTR_ALDPS_STATE_CHANGE 0x0200\n#define INTR_PME 0x0080\n#define INTR_PHY_REG_ACCESSIBLE 0x0020\n#define INTR_LINK_CHG 0x0010\n#define INTR_AN_COMPLETE 0x0008\n#define INTR_AN_ERROR 0x0001\n\n#define INTR_ENABLE_ALL (INTR_JABBER |\\n INTR_ALDPS_STATE_CHANGE |\\n INTR_PME |\\n INTR_PHY_REG_ACCESSIBLE |\\n INTR_LINK_CHG |\\n INTR_AN_COMPLETE |\\n INTR_AN_ERROR)\n \nstatic void rtl8211f_config_intr(void)\n{\n phy_set_page(0xA42);\n \n#if defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n phy_set_page(0);\n}\n\nvoid\nPhyInit(int ethMode)\n{\n int res;\n uint16_t tmp;\n uint32_t timeout;\n\n if (ethMode == ITE_ETH_MAC_LB)\n return;\n\n /* phy reset */\n if (rtl8211f_reset())\n printf("rtl8211e reset fail! \n");\n printf(" after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n\n /* config interrupt */\n rtl8211f_config_intr();\n\n if (ethMode == ITE_ETH_PCS_LB_10) {\n printf(" PHY PCS 10 loopback! \n\n");\n //phy_reg_write(0, 0x4100);\n phy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}\n\n#define INTR_JABBER 0x0400\n#define INTR_ALDPS_STATE_CHANGE 0x0200\n#define INTR_PME 0x0080\n#define INTR_PHY_REG_ACCESSIBLE 0x0020\n#define INTR_LINK_CHG 0x0010\n#define INTR_AN_COMPLETE 0x0008\n#define INTR_AN_ERROR 0x0001\n\n/* in interrupt context */\nint rtl8211f_link_change(void)\n{\n uint16_t intr;\n\n phy_set_page(0xA43);\n\n intr = phy_reg_read(0x1D);\n \n phy_set_page(0);\n\n#if 1\n if (intr & INTR_JABBER)\n ithPrintf("phy: jabber detected! \n");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf("phy: ALDPS state changed! \n");\n if (intr & INTR_PME)\n ithPrintf("phy: WOL event occurred! \n");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf("phy: Auto-Negotiation completed! \n");\n if (intr & INTR_AN_ERROR)\n ithPrintf("phy: auto-negotiation error! \n");\n#endif\n if (intr & INTR_LINK_CHG) {\n ithPrintf("phy: link change! \n");\n return 1;\n }\n\n return 0;\n}\n\n#define PHYSR_FULL_DUPLEX 0x0008\n#define PHYSR_LINK_OK 0x0004\n\n/* return 0 means link up */\nint rtl8211f_read_mode(int* speed, int* duplex)\n{\n uint16_t status = phy_reg_read(0x1A);\n uint16_t _speed = (status & 0x0030) >> 4;\n\n if (!(status & PHYSR_LINK_OK)) {\n ithPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n return -1;\n }\n\n if (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n switch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n return 0; // 0 means link up\n}\n\n\n/**\n* Check interrupt status for link change. \n* Call from mac driver's internal ISR for phy's interrupt.\n*/\nint(*itpPhyLinkChange)(void) = rtl8211f_link_change;\n/**\n* Replace mac driver's ISR for phy's interrupt. \n*/\nITHGpioIntrHandler itpPhylinkIsr = NULL;\n/**\n* Returns 0 if the device reports link status up/ok \n*/\nint(*itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode;\n/**\n* Get link status.\n*/\nuint32_t(*itpPhyLinkStatus)(void) = NULL;\n\n\n" (preproc_include) "nclude "ite/ite_mac.h"\n\n\n" (#include) "nclude "" (string_literal) "te/ite_mac.h"\n\n" (") "t" (string_content) "e/ite_mac.h"\n" (") "\n" (declaration) "atic struct mii_ioctl_data phy_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n\n" (storage_class_specifier) "atic s" (static) "atic s" (struct_specifier) "ruct mii_ioctl_data p" (struct) "ruct m" (type_identifier) "i_ioctl_data p" (init_declarator) "y_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n" (identifier) "y_reg =" (=) "{" (initializer_list) "CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n" ({) "C" (identifier) "G_NET_ETHERNET_PHY_ADDR, " (,) "0" (number_literal) " " (,) "0" (number_literal) " " (,) "0" (number_literal) "}" (}) "\n" (;) "\n" (preproc_function_def) "efine phy_set_page(page) do { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n#d" (#define) "efine p" (identifier) "y_set_page(p" (preproc_params) "age) " (() "a" (identifier) "ge) " ()) " " (preproc_arg) " { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n#" (preproc_function_def) "efine phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n\ns" (#define) "efine p" (identifier) "y_reg_write(r" (preproc_params) "eg,val) " (() "e" (identifier) "g,v" (,) "a" (identifier) "l) " ()) " " (preproc_arg) " { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n\n" (function_definition) "atic uint16_t phy_reg_read(uint16_t reg)\n{\n phy_reg.reg_num = reg; \n phy_reg.val_read = 0; \n iteMacIoctl(&phy_reg, IOCGMIIREG);\n return phy_reg.val_read;\n}\n\n" (storage_class_specifier) "atic u" (static) "atic u" (primitive_type) "nt16_t p" (function_declarator) "y_reg_read(uint16_t reg)\n{" (identifier) "y_reg_read(u" (parameter_list) "int16_t reg)\n{" (() "i" (parameter_declaration) "nt16_t reg)\n" (primitive_type) "nt16_t r" (identifier) "g)\n" ()) "{" (compound_statement) " phy_reg.reg_num = reg; \n phy_reg.val_read = 0; \n iteMacIoctl(&phy_reg, IOCGMIIREG);\n return phy_reg.val_read;\n}\n\n" ({) " " (expression_statement) "y_reg.reg_num = reg; \n" (assignment_expression) "y_reg.reg_num = reg; " (field_expression) "y_reg.reg_num =" (identifier) "y_reg.r" (.) "e" (field_identifier) "g_num =" (=) "r" (identifier) "g; " (;) "\n" (expression_statement) "y_reg.val_read = 0; \n" (assignment_expression) "y_reg.val_read = 0; " (field_expression) "y_reg.val_read =" (identifier) "y_reg.v" (.) "a" (field_identifier) "l_read =" (=) "0" (number_literal) " " (;) "\n" (expression_statement) "eMacIoctl(&phy_reg, IOCGMIIREG);\n " (call_expression) "eMacIoctl(&phy_reg, IOCGMIIREG);\n" (identifier) "eMacIoctl(&" (argument_list) "phy_reg, IOCGMIIREG);\n" (() "p" (pointer_expression) "hy_reg, " (&) "h" (identifier) "y_reg, " (,) "I" (identifier) "CGMIIREG);" ()) "\n" (;) " " (return_statement) "turn phy_reg.val_read;\n}" (return) "turn p" (field_expression) "y_reg.val_read;\n" (identifier) "y_reg.v" (.) "a" (field_identifier) "l_read;\n" (;) "}" (}) "\n" (function_definition) "atic int rtl8211f_reset(void)\n{\n int bmcr;\n\n // Software Reset PHY\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n bmcr |= BMCR_RESET;\n phy_reg_write(MII_BMCR, bmcr);\n\n do {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n return 0;\n}\n\n" (storage_class_specifier) "atic i" (static) "atic i" (primitive_type) "t r" (function_declarator) "l8211f_reset(void)\n{" (identifier) "l8211f_reset(v" (parameter_list) "oid)\n{" (() "o" (parameter_declaration) "id)\n" (primitive_type) "id)\n" ()) "{" (compound_statement) " int bmcr;\n\n // Software Reset PHY\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n bmcr |= BMCR_RESET;\n phy_reg_write(MII_BMCR, bmcr);\n\n do {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n return 0;\n}\n\n" ({) " " (declaration) "t bmcr;\n\n" (primitive_type) "t b" (identifier) "cr;\n" (;) "\n" (comment) " Software Reset PHY\n " (expression_statement) "cr = phy_reg_read(MII_BMCR);\n " (assignment_expression) "cr = phy_reg_read(MII_BMCR);\n" (identifier) "cr =" (=) "p" (call_expression) "y_reg_read(MII_BMCR);\n" (identifier) "y_reg_read(M" (argument_list) "II_BMCR);\n" (() "I" (identifier) "I_BMCR);" ()) "\n" (;) " " (if_statement) " (bmcr < 0)\n return bmcr;\n " (if) " (" (parenthesized_expression) "mcr < 0)\n " (() "m" (binary_expression) "cr < 0)\n" (identifier) "cr <" (<) "0" (number_literal) "\n" ()) " " (return_statement) "turn bmcr;\n " (return) "turn b" (identifier) "cr;\n" (;) " " (expression_statement) "cr |= BMCR_RESET;\n " (assignment_expression) "cr |= BMCR_RESET;\n" (identifier) "cr |" (|=) " B" (identifier) "CR_RESET;\n" (;) " " (expression_statement) "y_reg_write(MII_BMCR, bmcr);\n\n" (call_expression) "y_reg_write(MII_BMCR, bmcr);\n" (identifier) "y_reg_write(M" (argument_list) "II_BMCR, bmcr);\n" (() "I" (identifier) "I_BMCR, " (,) "b" (identifier) "cr);" ()) "\n" (;) "\n" (do_statement) " {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n" (do) " {" (compound_statement) " bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } w" ({) " " (expression_statement) "cr = phy_reg_read(MII_BMCR);\n " (assignment_expression) "cr = phy_reg_read(MII_BMCR);\n" (identifier) "cr =" (=) "p" (call_expression) "y_reg_read(MII_BMCR);\n" (identifier) "y_reg_read(M" (argument_list) "II_BMCR);\n" (() "I" (identifier) "I_BMCR);" ()) "\n" (;) " " (if_statement) " (bmcr < 0)\n return bmcr;\n " (if) " (" (parenthesized_expression) "mcr < 0)\n " (() "m" (binary_expression) "cr < 0)\n" (identifier) "cr <" (<) "0" (number_literal) "\n" ()) " " (return_statement) "turn bmcr;\n " (return) "turn b" (identifier) "cr;\n" (;) " " (}) "w" (while) "ile (" (parenthesized_expression) "mcr & BMCR_RESET);\n" (() "m" (binary_expression) "cr & BMCR_RESET);" (identifier) "cr &" (&) "B" (identifier) "CR_RESET);" ()) "\n" (;) "\n" (return_statement) "turn 0;\n}" (return) "turn 0" (number_literal) "\n" (;) "}" (}) "\n" (comment) " phy interrupt definition */\n#" (preproc_def) "efine INTR_JABBER 0x0400\n#d" (#define) "efine I" (identifier) "TR_JABBER " (preproc_arg) "0400\n#" (preproc_def) "efine INTR_ALDPS_STATE_CHANGE 0x0200\n#d" (#define) "efine I" (identifier) "TR_ALDPS_STATE_CHANGE 0" (preproc_arg) "0200\n#" (preproc_def) "efine INTR_PME 0x0080\n#d" (#define) "efine I" (identifier) "TR_PME " (preproc_arg) "0080\n#" (preproc_def) "efine INTR_PHY_REG_ACCESSIBLE 0x0020\n#d" (#define) "efine I" (identifier) "TR_PHY_REG_ACCESSIBLE 0" (preproc_arg) "0020\n#" (preproc_def) "efine INTR_LINK_CHG 0x0010\n#d" (#define) "efine I" (identifier) "TR_LINK_CHG " (preproc_arg) "0010\n#" (preproc_def) "efine INTR_AN_COMPLETE 0x0008\n#d" (#define) "efine I" (identifier) "TR_AN_COMPLETE " (preproc_arg) "0008\n#" (preproc_def) "efine INTR_AN_ERROR 0x0001\n\n#" (#define) "efine I" (identifier) "TR_AN_ERROR " (preproc_arg) "0001\n\n" (preproc_def) "efine INTR_ENABLE_ALL (INTR_JABBER |\\n INTR_ALDPS_STATE_CHANGE |\\n INTR_PME |\\n INTR_PHY_REG_ACCESSIBLE |\\n INTR_LINK_CHG |\\n INTR_AN_COMPLETE |\\n INTR_AN_ERROR)\n \n" (#define) "efine I" (identifier) "TR_ENABLE_ALL (" (preproc_arg) "NTR_JABBER |\\n INTR_ALDPS_STATE_CHANGE |\\n INTR_PME |\\n INTR_PHY_REG_ACCESSIBLE |\\n INTR_LINK_CHG |\\n INTR_AN_COMPLETE |\\n INTR_AN_ERROR)\n " (function_definition) "atic void rtl8211f_config_intr(void)\n{\n phy_set_page(0xA42);\n \n#if defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n phy_set_page(0);\n}\n\n" (storage_class_specifier) "atic v" (static) "atic v" (primitive_type) "id r" (function_declarator) "l8211f_config_intr(void)\n{" (identifier) "l8211f_config_intr(v" (parameter_list) "oid)\n{" (() "o" (parameter_declaration) "id)\n" (primitive_type) "id)\n" ()) "{" (compound_statement) " phy_set_page(0xA42);\n \n#if defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n phy_set_page(0);\n}\n\n" ({) " " (expression_statement) "y_set_page(0xA42);\n " (call_expression) "y_set_page(0xA42);\n" (identifier) "y_set_page(0" (argument_list) "xA42);\n" (() "x" (number_literal) "A42);" ()) "\n" (;) " " (preproc_if) "f defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n" (#if) "f d" (preproc_defined) "fined(CFG_NET_ETHERNET_LINK_INTR)\n " (defined) "fined(C" (() "F" (identifier) "G_NET_ETHERNET_LINK_INTR)\n" ()) " " ( ) " " (expression_statement) "y_reg_write(0x12, INTR_ENABLE_ALL);\n#" (call_expression) "y_reg_write(0x12, INTR_ENABLE_ALL);\n" (identifier) "y_reg_write(0" (argument_list) "x12, INTR_ENABLE_ALL);\n" (() "x" (number_literal) "12, " (,) "I" (identifier) "TR_ENABLE_ALL);" ()) "\n" (;) "#" (#endif) "ndif\n\n" (expression_statement) "y_set_page(0);\n}" (call_expression) "y_set_page(0);\n" (identifier) "y_set_page(0" (argument_list) ");\n" (() ")" (number_literal) ";" ()) "\n" (;) "}" (}) "\n" (function_definition) "id\nPhyInit(int ethMode)\n{\n int res;\n uint16_t tmp;\n uint32_t timeout;\n\n if (ethMode == ITE_ETH_MAC_LB)\n return;\n\n /* phy reset */\n if (rtl8211f_reset())\n printf("rtl8211e reset fail! \n");\n printf(" after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n\n /* config interrupt */\n rtl8211f_config_intr();\n\n if (ethMode == ITE_ETH_PCS_LB_10) {\n printf(" PHY PCS 10 loopback! \n\n");\n //phy_reg_write(0, 0x4100);\n phy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}\n\n" (primitive_type) "id\nP" (function_declarator) "yInit(int ethMode)\n{" (identifier) "yInit(i" (parameter_list) "nt ethMode)\n{" (() "n" (parameter_declaration) "t ethMode)\n" (primitive_type) "t e" (identifier) "hMode)\n" ()) "{" (compound_statement) " int res;\n uint16_t tmp;\n uint32_t timeout;\n\n if (ethMode == ITE_ETH_MAC_LB)\n return;\n\n /* phy reset */\n if (rtl8211f_reset())\n printf("rtl8211e reset fail! \n");\n printf(" after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n\n /* config interrupt */\n rtl8211f_config_intr();\n\n if (ethMode == ITE_ETH_PCS_LB_10) {\n printf(" PHY PCS 10 loopback! \n\n");\n //phy_reg_write(0, 0x4100);\n phy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}\n\n" ({) " " (declaration) "t res;\n " (primitive_type) "t r" (identifier) "s;\n" (;) " " (declaration) "nt16_t tmp;\n " (primitive_type) "nt16_t t" (identifier) "p;\n" (;) " " (declaration) "nt32_t timeout;\n\n" (primitive_type) "nt32_t t" (identifier) "meout;\n" (;) "\n" (if_statement) " (ethMode == ITE_ETH_MAC_LB)\n return;\n\n" (if) " (" (parenthesized_expression) "thMode == ITE_ETH_MAC_LB)\n " (() "t" (binary_expression) "hMode == ITE_ETH_MAC_LB)\n" (identifier) "hMode =" (==) " I" (identifier) "E_ETH_MAC_LB)\n" ()) " " (return_statement) "turn;\n\n" (return) "turn;\n" (;) "\n" (comment) " phy reset */\n " (if_statement) " (rtl8211f_reset())\n printf("rtl8211e reset fail! \n");\n " (if) " (" (parenthesized_expression) "tl8211f_reset())\n " (() "t" (call_expression) "l8211f_reset())\n" (identifier) "l8211f_reset()" (argument_list) ")\n" (() ")" ()) "\n" ()) " " (expression_statement) "intf("rtl8211e reset fail! \n");\n " (call_expression) "intf("rtl8211e reset fail! \n");\n" (identifier) "intf("" (argument_list) "rtl8211e reset fail! \n");\n" (() "r" (string_literal) "tl8211e reset fail! \n");" (") "t" (string_content) "l8211e reset fail! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (expression_statement) "intf(" after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n\n" (call_expression) "intf(" after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n" (identifier) "intf("" (argument_list) " after reset: phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n" (() " " (string_literal) "after reset: phy reg %d = 0x%04X \n", " (") "a" (string_content) "fter reset: phy reg %d = 0x%04X \n" (escape_sequence) ""," (") " " (,) "p" (field_expression) "y_reg.reg_num, " (identifier) "y_reg.r" (.) "e" (field_identifier) "g_num, " (,) "p" (field_expression) "y_reg.val_read);" (identifier) "y_reg.v" (.) "a" (field_identifier) "l_read);" ()) "\n" (;) "\n" (comment) " config interrupt */\n " (expression_statement) "l8211f_config_intr();\n\n" (call_expression) "l8211f_config_intr();\n" (identifier) "l8211f_config_intr()" (argument_list) ";\n" (() ";" ()) "\n" (;) "\n" (if_statement) " (ethMode == ITE_ETH_PCS_LB_10) {\n printf(" PHY PCS 10 loopback! \n\n");\n //phy_reg_write(0, 0x4100);\n phy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (if) " (" (parenthesized_expression) "thMode == ITE_ETH_PCS_LB_10) {" (() "t" (binary_expression) "hMode == ITE_ETH_PCS_LB_10) " (identifier) "hMode =" (==) " I" (identifier) "E_ETH_PCS_LB_10) " ()) "{" (compound_statement) " printf(" PHY PCS 10 loopback! \n\n");\n //phy_reg_write(0, 0x4100);\n phy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n" ({) " " (expression_statement) "intf(" PHY PCS 10 loopback! \n\n");\n " (call_expression) "intf(" PHY PCS 10 loopback! \n\n");\n" (identifier) "intf("" (argument_list) " PHY PCS 10 loopback! \n\n");\n" (() " " (string_literal) "PHY PCS 10 loopback! \n\n");" (") "P" (string_content) "HY PCS 10 loopback! \n" (escape_sequence) "\n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (comment) "phy_reg_write(0, 0x4100);\n " (expression_statement) "y_reg_write(0, 0x4000);\n " (call_expression) "y_reg_write(0, 0x4000);\n" (identifier) "y_reg_write(0" (argument_list) ", 0x4000);\n" (() "," (number_literal) " " (,) "0" (number_literal) "4000);" ()) "\n" (;) " " (expression_statement) "leep(20 * 1000);\n " (call_expression) "leep(20 * 1000);\n" (identifier) "leep(2" (argument_list) "0 * 1000);\n" (() "0" (binary_expression) " * 1000);" (number_literal) " *" (*) "1" (number_literal) "00);" ()) "\n" (;) " " (}) "\n" (else_clause) "se if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (else) "se i" (if_statement) "(ethMode == ITE_ETH_PCS_LB_100) {\n printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (if) "(e" (parenthesized_expression) "thMode == ITE_ETH_PCS_LB_100) {" (() "t" (binary_expression) "hMode == ITE_ETH_PCS_LB_100) " (identifier) "hMode =" (==) " I" (identifier) "E_ETH_PCS_LB_100) " ()) "{" (compound_statement) " printf(" PHY PCS 100 loopback! \n\n");\n //phy_reg_write(0, 0x6100);\n phy_reg_write(0, 0x6000);\n phy_reg_read(0);\n printf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n " ({) " " (expression_statement) "intf(" PHY PCS 100 loopback! \n\n");\n " (call_expression) "intf(" PHY PCS 100 loopback! \n\n");\n" (identifier) "intf("" (argument_list) " PHY PCS 100 loopback! \n\n");\n" (() " " (string_literal) "PHY PCS 100 loopback! \n\n");" (") "P" (string_content) "HY PCS 100 loopback! \n" (escape_sequence) "\n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (comment) "phy_reg_write(0, 0x6100);\n " (expression_statement) "y_reg_write(0, 0x6000);\n " (call_expression) "y_reg_write(0, 0x6000);\n" (identifier) "y_reg_write(0" (argument_list) ", 0x6000);\n" (() "," (number_literal) " " (,) "0" (number_literal) "6000);" ()) "\n" (;) " " (expression_statement) "y_reg_read(0);\n " (call_expression) "y_reg_read(0);\n" (identifier) "y_reg_read(0" (argument_list) ");\n" (() ")" (number_literal) ";" ()) "\n" (;) " " (expression_statement) "intf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n " (call_expression) "intf(" phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n" (identifier) "intf("" (argument_list) " phy reg %d = 0x%04X \n", phy_reg.reg_num, phy_reg.val_read);\n" (() " " (string_literal) "phy reg %d = 0x%04X \n", " (") "p" (string_content) "hy reg %d = 0x%04X \n" (escape_sequence) ""," (") " " (,) "p" (field_expression) "y_reg.reg_num, " (identifier) "y_reg.r" (.) "e" (field_identifier) "g_num, " (,) "p" (field_expression) "y_reg.val_read);" (identifier) "y_reg.v" (.) "a" (field_identifier) "l_read);" ()) "\n" (;) " " (expression_statement) "leep(20 * 1000);\n " (call_expression) "leep(20 * 1000);\n" (identifier) "leep(2" (argument_list) "0 * 1000);\n" (() "0" (binary_expression) " * 1000);" (number_literal) " *" (*) "1" (number_literal) "00);" ()) "\n" (;) " " (}) " " (else_clause) "se if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (else) "se i" (if_statement) "(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (if) "(e" (parenthesized_expression) "thMode == ITE_ETH_PCS_LB_1000) {" (() "t" (binary_expression) "hMode == ITE_ETH_PCS_LB_1000) " (identifier) "hMode =" (==) " I" (identifier) "E_ETH_PCS_LB_1000) " ()) "{" (compound_statement) " printf(" PHY PCS 1000 loopback! \n\n");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n " ({) " " (expression_statement) "intf(" PHY PCS 1000 loopback! \n\n");\n " (call_expression) "intf(" PHY PCS 1000 loopback! \n\n");\n" (identifier) "intf("" (argument_list) " PHY PCS 1000 loopback! \n\n");\n" (() " " (string_literal) "PHY PCS 1000 loopback! \n\n");" (") "P" (string_content) "HY PCS 1000 loopback! \n" (escape_sequence) "\n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (expression_statement) "y_reg_write(0, 0x4140);\n " (call_expression) "y_reg_write(0, 0x4140);\n" (identifier) "y_reg_write(0" (argument_list) ", 0x4140);\n" (() "," (number_literal) " " (,) "0" (number_literal) "4140);" ()) "\n" (;) " " (expression_statement) "leep(20 * 1000);\n " (call_expression) "leep(20 * 1000);\n" (identifier) "leep(2" (argument_list) "0 * 1000);\n" (() "0" (binary_expression) " * 1000);" (number_literal) " *" (*) "1" (number_literal) "00);" ()) "\n" (;) " " (}) " " (else_clause) "se if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (else) "se i" (if_statement) " (ethMode == ITE_ETH_MDI_LB_10) {\n printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (if) " (" (parenthesized_expression) "thMode == ITE_ETH_MDI_LB_10) {" (() "t" (binary_expression) "hMode == ITE_ETH_MDI_LB_10) " (identifier) "hMode =" (==) " I" (identifier) "E_ETH_MDI_LB_10) " ()) "{" (compound_statement) " printf(" PHY MDI 10 loopback! \n\n");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n " ({) " " (expression_statement) "intf(" PHY MDI 10 loopback! \n\n");\n " (call_expression) "intf(" PHY MDI 10 loopback! \n\n");\n" (identifier) "intf("" (argument_list) " PHY MDI 10 loopback! \n\n");\n" (() " " (string_literal) "PHY MDI 10 loopback! \n\n");" (") "P" (string_content) "HY MDI 10 loopback! \n" (escape_sequence) "\n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (expression_statement) "y_reg_write(0, 0x0100);\n " (call_expression) "y_reg_write(0, 0x0100);\n" (identifier) "y_reg_write(0" (argument_list) ", 0x0100);\n" (() "," (number_literal) " " (,) "0" (number_literal) "0100);" ()) "\n" (;) " " (expression_statement) "leep(100 * 1000);\n " (call_expression) "leep(100 * 1000);\n" (identifier) "leep(1" (argument_list) "00 * 1000);\n" (() "0" (binary_expression) "0 * 1000);" (number_literal) "0 *" (*) "1" (number_literal) "00);" ()) "\n" (;) " " (}) " " (else_clause) "se if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (else) "se i" (if_statement) " (ethMode == ITE_ETH_MDI_LB_100) {\n printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (if) " (" (parenthesized_expression) "thMode == ITE_ETH_MDI_LB_100) {" (() "t" (binary_expression) "hMode == ITE_ETH_MDI_LB_100) " (identifier) "hMode =" (==) " I" (identifier) "E_ETH_MDI_LB_100) " ()) "{" (compound_statement) " printf(" PHY MDI 100 loopback! \n\n");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n " ({) " " (expression_statement) "intf(" PHY MDI 100 loopback! \n\n");\n " (call_expression) "intf(" PHY MDI 100 loopback! \n\n");\n" (identifier) "intf("" (argument_list) " PHY MDI 100 loopback! \n\n");\n" (() " " (string_literal) "PHY MDI 100 loopback! \n\n");" (") "P" (string_content) "HY MDI 100 loopback! \n" (escape_sequence) "\n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (expression_statement) "y_reg_write(0, 0x2100);\n " (call_expression) "y_reg_write(0, 0x2100);\n" (identifier) "y_reg_write(0" (argument_list) ", 0x2100);\n" (() "," (number_literal) " " (,) "0" (number_literal) "2100);" ()) "\n" (;) " " (expression_statement) "leep(100 * 1000);\n " (call_expression) "leep(100 * 1000);\n" (identifier) "leep(1" (argument_list) "00 * 1000);\n" (() "0" (binary_expression) "0 * 1000);" (number_literal) "0 *" (*) "1" (number_literal) "00);" ()) "\n" (;) " " (}) " " (else_clause) "se if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (else) "se i" (if_statement) " (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" (if) " (" (parenthesized_expression) "thMode == ITE_ETH_MDI_LB_1000) {" (() "t" (binary_expression) "hMode == ITE_ETH_MDI_LB_1000) " (identifier) "hMode =" (==) " I" (identifier) "E_ETH_MDI_LB_1000) " ()) "{" (compound_statement) " printf(" PHY MDI 1000 loopback! \n\n");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}" ({) " " (expression_statement) "intf(" PHY MDI 1000 loopback! \n\n");\n " (call_expression) "intf(" PHY MDI 1000 loopback! \n\n");\n" (identifier) "intf("" (argument_list) " PHY MDI 1000 loopback! \n\n");\n" (() " " (string_literal) "PHY MDI 1000 loopback! \n\n");" (") "P" (string_content) "HY MDI 1000 loopback! \n" (escape_sequence) "\n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (expression_statement) "y_reg_write(0, 0x0140);\n " (call_expression) "y_reg_write(0, 0x0140);\n" (identifier) "y_reg_write(0" (argument_list) ", 0x0140);\n" (() "," (number_literal) " " (,) "0" (number_literal) "0140);" ()) "\n" (;) " " (expression_statement) "leep(100 * 1000);\n " (call_expression) "leep(100 * 1000);\n" (identifier) "leep(1" (argument_list) "00 * 1000);\n" (() "0" (binary_expression) "0 * 1000);" (number_literal) "0 *" (*) "1" (number_literal) "00);" ()) "\n" (;) " " (}) "}" (}) "\n" (preproc_def) "efine INTR_JABBER 0x0400\n#d" (#define) "efine I" (identifier) "TR_JABBER " (preproc_arg) "0400\n#" (preproc_def) "efine INTR_ALDPS_STATE_CHANGE 0x0200\n#d" (#define) "efine I" (identifier) "TR_ALDPS_STATE_CHANGE 0" (preproc_arg) "0200\n#" (preproc_def) "efine INTR_PME 0x0080\n#d" (#define) "efine I" (identifier) "TR_PME " (preproc_arg) "0080\n#" (preproc_def) "efine INTR_PHY_REG_ACCESSIBLE 0x0020\n#d" (#define) "efine I" (identifier) "TR_PHY_REG_ACCESSIBLE 0" (preproc_arg) "0020\n#" (preproc_def) "efine INTR_LINK_CHG 0x0010\n#d" (#define) "efine I" (identifier) "TR_LINK_CHG " (preproc_arg) "0010\n#" (preproc_def) "efine INTR_AN_COMPLETE 0x0008\n#d" (#define) "efine I" (identifier) "TR_AN_COMPLETE " (preproc_arg) "0008\n#" (preproc_def) "efine INTR_AN_ERROR 0x0001\n\n/" (#define) "efine I" (identifier) "TR_AN_ERROR " (preproc_arg) "0001\n\n" (comment) " in interrupt context */\ni" (function_definition) "t rtl8211f_link_change(void)\n{\n uint16_t intr;\n\n phy_set_page(0xA43);\n\n intr = phy_reg_read(0x1D);\n \n phy_set_page(0);\n\n#if 1\n if (intr & INTR_JABBER)\n ithPrintf("phy: jabber detected! \n");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf("phy: ALDPS state changed! \n");\n if (intr & INTR_PME)\n ithPrintf("phy: WOL event occurred! \n");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf("phy: Auto-Negotiation completed! \n");\n if (intr & INTR_AN_ERROR)\n ithPrintf("phy: auto-negotiation error! \n");\n#endif\n if (intr & INTR_LINK_CHG) {\n ithPrintf("phy: link change! \n");\n return 1;\n }\n\n return 0;\n}\n\n" (primitive_type) "t r" (function_declarator) "l8211f_link_change(void)\n{" (identifier) "l8211f_link_change(v" (parameter_list) "oid)\n{" (() "o" (parameter_declaration) "id)\n" (primitive_type) "id)\n" ()) "{" (compound_statement) " uint16_t intr;\n\n phy_set_page(0xA43);\n\n intr = phy_reg_read(0x1D);\n \n phy_set_page(0);\n\n#if 1\n if (intr & INTR_JABBER)\n ithPrintf("phy: jabber detected! \n");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf("phy: ALDPS state changed! \n");\n if (intr & INTR_PME)\n ithPrintf("phy: WOL event occurred! \n");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf("phy: Auto-Negotiation completed! \n");\n if (intr & INTR_AN_ERROR)\n ithPrintf("phy: auto-negotiation error! \n");\n#endif\n if (intr & INTR_LINK_CHG) {\n ithPrintf("phy: link change! \n");\n return 1;\n }\n\n return 0;\n}\n\n" ({) " " (declaration) "nt16_t intr;\n\n" (primitive_type) "nt16_t i" (identifier) "tr;\n" (;) "\n" (expression_statement) "y_set_page(0xA43);\n\n" (call_expression) "y_set_page(0xA43);\n" (identifier) "y_set_page(0" (argument_list) "xA43);\n" (() "x" (number_literal) "A43);" ()) "\n" (;) "\n" (expression_statement) "tr = phy_reg_read(0x1D);\n " (assignment_expression) "tr = phy_reg_read(0x1D);\n" (identifier) "tr =" (=) "p" (call_expression) "y_reg_read(0x1D);\n" (identifier) "y_reg_read(0" (argument_list) "x1D);\n" (() "x" (number_literal) "1D);" ()) "\n" (;) " " (expression_statement) "y_set_page(0);\n\n" (call_expression) "y_set_page(0);\n" (identifier) "y_set_page(0" (argument_list) ");\n" (() ")" (number_literal) ";" ()) "\n" (;) "\n" (preproc_if) "f 1\n if (intr & INTR_JABBER)\n ithPrintf("phy: jabber detected! \n");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf("phy: ALDPS state changed! \n");\n if (intr & INTR_PME)\n ithPrintf("phy: WOL event occurred! \n");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf("phy: Auto-Negotiation completed! \n");\n if (intr & INTR_AN_ERROR)\n ithPrintf("phy: auto-negotiation error! \n");\n#endif\n " (#if) "f 1" (number_literal) " " ( ) " " (if_statement) " (intr & INTR_JABBER)\n ithPrintf("phy: jabber detected! \n");\n " (if) " (" (parenthesized_expression) "ntr & INTR_JABBER)\n " (() "n" (binary_expression) "tr & INTR_JABBER)\n" (identifier) "tr &" (&) "I" (identifier) "TR_JABBER)\n" ()) " " (expression_statement) "hPrintf("phy: jabber detected! \n");\n " (call_expression) "hPrintf("phy: jabber detected! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: jabber detected! \n");\n" (() "p" (string_literal) "hy: jabber detected! \n");" (") "h" (string_content) "y: jabber detected! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (if_statement) " (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf("phy: ALDPS state changed! \n");\n " (if) " (" (parenthesized_expression) "ntr & INTR_ALDPS_STATE_CHANGE)\n " (() "n" (binary_expression) "tr & INTR_ALDPS_STATE_CHANGE)\n" (identifier) "tr &" (&) "I" (identifier) "TR_ALDPS_STATE_CHANGE)\n" ()) " " (expression_statement) "hPrintf("phy: ALDPS state changed! \n");\n " (call_expression) "hPrintf("phy: ALDPS state changed! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: ALDPS state changed! \n");\n" (() "p" (string_literal) "hy: ALDPS state changed! \n");" (") "h" (string_content) "y: ALDPS state changed! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (if_statement) " (intr & INTR_PME)\n ithPrintf("phy: WOL event occurred! \n");\n " (if) " (" (parenthesized_expression) "ntr & INTR_PME)\n " (() "n" (binary_expression) "tr & INTR_PME)\n" (identifier) "tr &" (&) "I" (identifier) "TR_PME)\n" ()) " " (expression_statement) "hPrintf("phy: WOL event occurred! \n");\n " (call_expression) "hPrintf("phy: WOL event occurred! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: WOL event occurred! \n");\n" (() "p" (string_literal) "hy: WOL event occurred! \n");" (") "h" (string_content) "y: WOL event occurred! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (if_statement) " (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n " (if) " (" (parenthesized_expression) "ntr & INTR_PHY_REG_ACCESSIBLE)\n " (() "n" (binary_expression) "tr & INTR_PHY_REG_ACCESSIBLE)\n" (identifier) "tr &" (&) "I" (identifier) "TR_PHY_REG_ACCESSIBLE)\n" ()) " " (expression_statement) "hPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n " (call_expression) "hPrintf("phy: Can access PHY register through MDC/MDIO! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: Can access PHY register through MDC/MDIO! \n");\n" (() "p" (string_literal) "hy: Can access PHY register through MDC/MDIO! \n");" (") "h" (string_content) "y: Can access PHY register through MDC/MDIO! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (if_statement) " (intr & INTR_AN_COMPLETE)\n ithPrintf("phy: Auto-Negotiation completed! \n");\n " (if) " (" (parenthesized_expression) "ntr & INTR_AN_COMPLETE)\n " (() "n" (binary_expression) "tr & INTR_AN_COMPLETE)\n" (identifier) "tr &" (&) "I" (identifier) "TR_AN_COMPLETE)\n" ()) " " (expression_statement) "hPrintf("phy: Auto-Negotiation completed! \n");\n " (call_expression) "hPrintf("phy: Auto-Negotiation completed! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: Auto-Negotiation completed! \n");\n" (() "p" (string_literal) "hy: Auto-Negotiation completed! \n");" (") "h" (string_content) "y: Auto-Negotiation completed! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (if_statement) " (intr & INTR_AN_ERROR)\n ithPrintf("phy: auto-negotiation error! \n");\n#" (if) " (" (parenthesized_expression) "ntr & INTR_AN_ERROR)\n " (() "n" (binary_expression) "tr & INTR_AN_ERROR)\n" (identifier) "tr &" (&) "I" (identifier) "TR_AN_ERROR)\n" ()) " " (expression_statement) "hPrintf("phy: auto-negotiation error! \n");\n#" (call_expression) "hPrintf("phy: auto-negotiation error! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: auto-negotiation error! \n");\n" (() "p" (string_literal) "hy: auto-negotiation error! \n");" (") "h" (string_content) "y: auto-negotiation error! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) "#" (#endif) "ndif\n " (if_statement) " (intr & INTR_LINK_CHG) {\n ithPrintf("phy: link change! \n");\n return 1;\n }\n\n" (if) " (" (parenthesized_expression) "ntr & INTR_LINK_CHG) {" (() "n" (binary_expression) "tr & INTR_LINK_CHG) " (identifier) "tr &" (&) "I" (identifier) "TR_LINK_CHG) " ()) "{" (compound_statement) " ithPrintf("phy: link change! \n");\n return 1;\n }\n\n" ({) " " (expression_statement) "hPrintf("phy: link change! \n");\n " (call_expression) "hPrintf("phy: link change! \n");\n" (identifier) "hPrintf("" (argument_list) "phy: link change! \n");\n" (() "p" (string_literal) "hy: link change! \n");" (") "h" (string_content) "y: link change! \n" (escape_sequence) "")" (") ";" ()) "\n" (;) " " (return_statement) "turn 1;\n " (return) "turn 1" (number_literal) "\n" (;) " " (}) "\n" (return_statement) "turn 0;\n}" (return) "turn 0" (number_literal) "\n" (;) "}" (}) "\n" (preproc_def) "efine PHYSR_FULL_DUPLEX 0x0008\n#d" (#define) "efine P" (identifier) "YSR_FULL_DUPLEX " (preproc_arg) "0008\n#" (preproc_def) "efine PHYSR_LINK_OK 0x0004\n\n/" (#define) "efine P" (identifier) "YSR_LINK_OK " (preproc_arg) "0004\n\n" (comment) " return 0 means link up */\ni" (function_definition) "t rtl8211f_read_mode(int* speed, int* duplex)\n{\n uint16_t status = phy_reg_read(0x1A);\n uint16_t _speed = (status & 0x0030) >> 4;\n\n if (!(status & PHYSR_LINK_OK)) {\n ithPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n return -1;\n }\n\n if (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n switch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n return 0; // 0 means link up\n}\n\n" (primitive_type) "t r" (function_declarator) "l8211f_read_mode(int* speed, int* duplex)\n{" (identifier) "l8211f_read_mode(i" (parameter_list) "nt* speed, int* duplex)\n{" (() "n" (parameter_declaration) "t* speed, " (primitive_type) "t* " (pointer_declarator) "speed, " (*) "s" (identifier) "eed, " (,) "i" (parameter_declaration) "t* duplex)\n" (primitive_type) "t* " (pointer_declarator) "duplex)\n" (*) "d" (identifier) "plex)\n" ()) "{" (compound_statement) " uint16_t status = phy_reg_read(0x1A);\n uint16_t _speed = (status & 0x0030) >> 4;\n\n if (!(status & PHYSR_LINK_OK)) {\n ithPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n return -1;\n }\n\n if (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n switch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n return 0; // 0 means link up\n}\n\n" ({) " " (declaration) "nt16_t status = phy_reg_read(0x1A);\n " (primitive_type) "nt16_t s" (init_declarator) "atus = phy_reg_read(0x1A);\n" (identifier) "atus =" (=) "p" (call_expression) "y_reg_read(0x1A);\n" (identifier) "y_reg_read(0" (argument_list) "x1A);\n" (() "x" (number_literal) "1A);" ()) "\n" (;) " " (declaration) "nt16_t _speed = (status & 0x0030) >> 4;\n\n" (primitive_type) "nt16_t _" (init_declarator) "peed = (status & 0x0030) >> 4;\n" (identifier) "peed =" (=) "(" (binary_expression) "tatus & 0x0030) >> 4;\n" (parenthesized_expression) "tatus & 0x0030) >" (() "t" (binary_expression) "atus & 0x0030) " (identifier) "atus &" (&) "0" (number_literal) "0030) " ()) ">" (>>) " 4" (number_literal) "\n" (;) "\n" (if_statement) " (!(status & PHYSR_LINK_OK)) {\n ithPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n return -1;\n }\n\n" (if) " (" (parenthesized_expression) "(status & PHYSR_LINK_OK)) {" (() "(" (unary_expression) "status & PHYSR_LINK_OK)) " (!) "s" (parenthesized_expression) "tatus & PHYSR_LINK_OK)) " (() "t" (binary_expression) "atus & PHYSR_LINK_OK))" (identifier) "atus &" (&) "P" (identifier) "YSR_LINK_OK))" ()) " " ()) "{" (compound_statement) " ithPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n return -1;\n }\n\n" ({) " " (expression_statement) "hPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n " (call_expression) "hPrintf("phy status reg0x1A = 0x%04X - link not ok! \n", status);\n" (identifier) "hPrintf("" (argument_list) "phy status reg0x1A = 0x%04X - link not ok! \n", status);\n" (() "p" (string_literal) "hy status reg0x1A = 0x%04X - link not ok! \n", " (") "h" (string_content) "y status reg0x1A = 0x%04X - link not ok! \n" (escape_sequence) ""," (") " " (,) "s" (identifier) "atus);" ()) "\n" (;) " " (return_statement) "turn -1;\n " (return) "turn -" (number_literal) ";\n" (;) " " (}) "\n" (if_statement) " (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n" (if) " (" (parenthesized_expression) "tatus & PHYSR_FULL_DUPLEX)\n " (() "t" (binary_expression) "atus & PHYSR_FULL_DUPLEX)\n" (identifier) "atus &" (&) "P" (identifier) "YSR_FULL_DUPLEX)\n" ()) " " (expression_statement) "duplex) = DUPLEX_FULL;\n " (assignment_expression) "duplex) = DUPLEX_FULL;\n" (parenthesized_expression) "duplex) =" (() "d" (pointer_expression) "uplex) " (*) "u" (identifier) "plex) " ()) "=" (=) "D" (identifier) "PLEX_FULL;\n" (;) " " (else_clause) "se\n (*duplex) = DUPLEX_HALF;\n\n" (else) "se\n " (expression_statement) "duplex) = DUPLEX_HALF;\n\n" (assignment_expression) "duplex) = DUPLEX_HALF;\n" (parenthesized_expression) "duplex) =" (() "d" (pointer_expression) "uplex) " (*) "u" (identifier) "plex) " ()) "=" (=) "D" (identifier) "PLEX_HALF;\n" (;) "\n" (switch_statement) "itch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n" (switch) "itch (" (parenthesized_expression) "speed) {" (() "s" (identifier) "peed) " ()) "{" (compound_statement) " default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n" ({) " " (case_statement) "fault:\n " (default) "fault:\n" (:) " " (case_statement) "se 0:\n (*speed) = SPEED_10;\n break;\n " (case) "se 0" (number_literal) "\n" (:) " " (expression_statement) "speed) = SPEED_10;\n " (assignment_expression) "speed) = SPEED_10;\n" (parenthesized_expression) "speed) =" (() "s" (pointer_expression) "peed) " (*) "p" (identifier) "eed) " ()) "=" (=) "S" (identifier) "EED_10;\n" (;) " " (break_statement) "eak;\n " (break) "eak;\n" (;) " " (case_statement) "se 1:\n (*speed) = SPEED_100;\n break;\n " (case) "se 1" (number_literal) "\n" (:) " " (expression_statement) "speed) = SPEED_100;\n " (assignment_expression) "speed) = SPEED_100;\n" (parenthesized_expression) "speed) =" (() "s" (pointer_expression) "peed) " (*) "p" (identifier) "eed) " ()) "=" (=) "S" (identifier) "EED_100;\n" (;) " " (break_statement) "eak;\n " (break) "eak;\n" (;) " " (case_statement) "se 2:\n (*speed) = SPEED_1000;\n break;\n " (case) "se 2" (number_literal) "\n" (:) " " (expression_statement) "speed) = SPEED_1000;\n " (assignment_expression) "speed) = SPEED_1000;\n" (parenthesized_expression) "speed) =" (() "s" (pointer_expression) "peed) " (*) "p" (identifier) "eed) " ()) "=" (=) "S" (identifier) "EED_1000;\n" (;) " " (break_statement) "eak;\n " (break) "eak;\n" (;) " " (}) "\n" (return_statement) "turn 0; /" (return) "turn 0" (number_literal) " " (;) "/" (comment) " 0 means link up\n}" (}) "\n" (comment) "*\n* Check interrupt status for link change. \n* Call from mac driver's internal ISR for phy's interrupt.\n*/\ni" (declaration) "t(*itpPhyLinkChange)(void) = rtl8211f_link_change;\n/" (primitive_type) "t(*" (init_declarator) "itpPhyLinkChange)(void) = rtl8211f_link_change;\n" (function_declarator) "itpPhyLinkChange)(void) =" (parenthesized_declarator) "itpPhyLinkChange)(v" (() "i" (pointer_declarator) "tpPhyLinkChange)(" (*) "t" (identifier) "pPhyLinkChange)(" ()) "v" (parameter_list) "oid) =" (() "o" (parameter_declaration) "id) " (primitive_type) "id) " ()) "=" (=) "r" (identifier) "l8211f_link_change;\n" (;) "/" (comment) "*\n* Replace mac driver's ISR for phy's interrupt. \n*/\nI" (declaration) "HGpioIntrHandler itpPhylinkIsr = NULL;\n/" (type_identifier) "HGpioIntrHandler i" (init_declarator) "pPhylinkIsr = NULL;\n" (identifier) "pPhylinkIsr =" (=) "N" (null) "LL;\n" (NULL) "LL;\n" (;) "/" (comment) "*\n* Returns 0 if the device reports link status up/ok \n*/\ni" (declaration) "t(*itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode;\n/" (primitive_type) "t(*" (init_declarator) "itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode;\n" (function_declarator) "itpPhyReadMode)(int* speed, int* duplex) =" (parenthesized_declarator) "itpPhyReadMode)(i" (() "i" (pointer_declarator) "tpPhyReadMode)(" (*) "t" (identifier) "pPhyReadMode)(" ()) "i" (parameter_list) "nt* speed, int* duplex) =" (() "n" (parameter_declaration) "t* speed, " (primitive_type) "t* " (pointer_declarator) "speed, " (*) "s" (identifier) "eed, " (,) "i" (parameter_declaration) "t* duplex) " (primitive_type) "t* " (pointer_declarator) "duplex) " (*) "d" (identifier) "plex) " ()) "=" (=) "r" (identifier) "l8211f_read_mode;\n" (;) "/" (comment) "*\n* Get link status.\n*/\nu" (declaration) "nt32_t(*itpPhyLinkStatus)(void) = NULL;\n\n" (primitive_type) "nt32_t(*" (init_declarator) "itpPhyLinkStatus)(void) = NULL;\n" (function_declarator) "itpPhyLinkStatus)(void) =" (parenthesized_declarator) "itpPhyLinkStatus)(v" (() "i" (pointer_declarator) "tpPhyLinkStatus)(" (*) "t" (identifier) "pPhyLinkStatus)(" ()) "v" (parameter_list) "oid) =" (() "o" (parameter_declaration) "id) " (primitive_type) "id) " ()) "=" (=) "N" (null) "LL;\n" (NULL) "LL;\n" (;) "\n"
1,196
0
{"language": "c", "success": true, "metadata": {"lines": 181, "avg_line_length": 27.96, "nodes": 703, "errors": 0, "source_hash": "cec44b228433ea0ff2155912883009345fa63f2f5d124c30bc724c3008c813c7", "categorized_nodes": 449}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "nclude \"ite/ite_mac.h\"\n\n\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 3}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "nclude \"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 3}, "end_point": {"row": 0, "column": 11}}, {"id": 2, "type": "string_literal", "text": "te/ite_mac.h\"\n\n", "parent": 0, "children": [], "start_point": {"row": 0, "column": 12}, "end_point": {"row": 0, "column": 27}}, {"id": 3, "type": "declaration", "text": "atic struct mii_ioctl_data phy_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n\n", "parent": null, "children": [4, 5, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 78}}, {"id": 4, "type": "storage_class_specifier", "text": "atic s", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 5, "type": "struct_specifier", "text": "ruct mii_ioctl_data p", "parent": 3, "children": [6, 7], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 28}}, {"id": 6, "type": "struct", "text": "ruct m", "parent": 5, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 13}}, {"id": 7, "type": "type_identifier", "text": "i_ioctl_data p", "parent": 5, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 28}}, {"id": 8, "type": "init_declarator", "text": "y_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n", "parent": 3, "children": [9, 10], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 77}}, {"id": 9, "type": "identifier", "text": "y_reg =", "parent": 8, "children": [], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 36}}, {"id": 10, "type": "initializer_list", "text": "CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n", "parent": 8, "children": [11, 12, 13], "start_point": {"row": 4, "column": 39}, "end_point": {"row": 4, "column": 77}}, {"id": 11, "type": "identifier", "text": "G_NET_ETHERNET_PHY_ADDR, ", "parent": 10, "children": [], "start_point": {"row": 4, "column": 41}, "end_point": {"row": 4, "column": 66}}, {"id": 12, "type": "number_literal", "text": " ", "parent": 10, "children": [], "start_point": {"row": 4, "column": 68}, "end_point": {"row": 4, "column": 69}}, {"id": 13, "type": "number_literal", "text": " ", "parent": 10, "children": [], "start_point": {"row": 4, "column": 71}, "end_point": {"row": 4, "column": 72}}, {"id": 14, "type": "preproc_function_def", "text": "efine phy_set_page(page) do { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n#d", "parent": null, "children": [15, 16, 17, 19], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 15, "type": "#define", "text": "efine p", "parent": 14, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 16, "type": "identifier", "text": "y_set_page(p", "parent": 14, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 20}}, {"id": 17, "type": "preproc_params", "text": "age) ", "parent": 14, "children": [18], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 26}}, {"id": 18, "type": "identifier", "text": "ge) ", "parent": 17, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 25}}, {"id": 19, "type": "preproc_arg", "text": " { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n#", "parent": 14, "children": [], "start_point": {"row": 6, "column": 32}, "end_point": {"row": 6, "column": 126}}, {"id": 20, "type": "preproc_function_def", "text": "efine phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n\ns", "parent": null, "children": [21, 22, 23, 26], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 21, "type": "#define", "text": "efine p", "parent": 20, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 22, "type": "identifier", "text": "y_reg_write(r", "parent": 20, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 21}}, {"id": 23, "type": "preproc_params", "text": "eg,val) ", "parent": 20, "children": [24, 25], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 30}}, {"id": 24, "type": "identifier", "text": "g,v", "parent": 23, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 25}}, {"id": 25, "type": "identifier", "text": "l) ", "parent": 23, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 29}}, {"id": 26, "type": "preproc_arg", "text": " { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n\n", "parent": 20, "children": [], "start_point": {"row": 7, "column": 32}, "end_point": {"row": 7, "column": 130}}, {"id": 27, "type": "function_definition", "text": "atic uint16_t phy_reg_read(uint16_t reg)\n{\n phy_reg.reg_num = reg; \n phy_reg.val_read = 0; \n iteMacIoctl(&phy_reg, IOCGMIIREG);\n return phy_reg.val_read;\n}\n\n", "parent": null, "children": [28, 29, 30], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 28, "type": "storage_class_specifier", "text": "atic u", "parent": 27, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 29, "type": "primitive_type", "text": "nt16_t p", "parent": 27, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 15}}, {"id": 30, "type": "function_declarator", "text": "y_reg_read(uint16_t reg)\n{", "parent": 27, "children": [31, 32], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 42}}, {"id": 31, "type": "identifier", "text": "y_reg_read(u", "parent": 30, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 28}}, {"id": 32, "type": "parameter_list", "text": "int16_t reg)\n{", "parent": 30, "children": [33], "start_point": {"row": 9, "column": 28}, "end_point": {"row": 9, "column": 42}}, {"id": 33, "type": "parameter_declaration", "text": "nt16_t reg)\n", "parent": 32, "children": [34, 35], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 41}}, {"id": 34, "type": "primitive_type", "text": "nt16_t r", "parent": 33, "children": [], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 37}}, {"id": 35, "type": "identifier", "text": "g)\n", "parent": 33, "children": [], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 41}}, {"id": 36, "type": "assignment_expression", "text": "y_reg.reg_num = reg; ", "parent": 27, "children": [37, 40, 41], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 25}}, {"id": 37, "type": "field_expression", "text": "y_reg.reg_num =", "parent": 36, "children": [38, 39], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 19}}, {"id": 38, "type": "identifier", "text": "y_reg.r", "parent": 37, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 11}}, {"id": 39, "type": "field_identifier", "text": "g_num =", "parent": 37, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 19}}, {"id": 40, "type": "=", "text": "r", "parent": 36, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 21}}, {"id": 41, "type": "identifier", "text": "g; ", "parent": 36, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 25}}, {"id": 42, "type": "assignment_expression", "text": "y_reg.val_read = 0; ", "parent": 27, "children": [43, 46, 47], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 24}}, {"id": 43, "type": "field_expression", "text": "y_reg.val_read =", "parent": 42, "children": [44, 45], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 20}}, {"id": 44, "type": "identifier", "text": "y_reg.v", "parent": 43, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 11}}, {"id": 45, "type": "field_identifier", "text": "l_read =", "parent": 43, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 20}}, {"id": 46, "type": "=", "text": "0", "parent": 42, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 22}}, {"id": 47, "type": "number_literal", "text": " ", "parent": 42, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 24}}, {"id": 48, "type": "call_expression", "text": "eMacIoctl(&phy_reg, IOCGMIIREG);\n", "parent": 27, "children": [49, 50], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 37}}, {"id": 49, "type": "identifier", "text": "eMacIoctl(&", "parent": 48, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 15}}, {"id": 50, "type": "argument_list", "text": "phy_reg, IOCGMIIREG);\n", "parent": 48, "children": [51, 54], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 37}}, {"id": 51, "type": "pointer_expression", "text": "hy_reg, ", "parent": 50, "children": [52, 53], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 24}}, {"id": 52, "type": "&", "text": "h", "parent": 51, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 17}}, {"id": 53, "type": "identifier", "text": "y_reg, ", "parent": 51, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 24}}, {"id": 54, "type": "identifier", "text": "CGMIIREG);", "parent": 50, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 36}}, {"id": 55, "type": "return_statement", "text": "turn phy_reg.val_read;\n}", "parent": 27, "children": [56], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 28}}, {"id": 56, "type": "field_expression", "text": "y_reg.val_read;\n", "parent": 55, "children": [57, 58], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 27}}, {"id": 57, "type": "identifier", "text": "y_reg.v", "parent": 56, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 18}}, {"id": 58, "type": "field_identifier", "text": "l_read;\n", "parent": 56, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 27}}, {"id": 59, "type": "function_definition", "text": "atic int rtl8211f_reset(void)\n{\n int bmcr;\n\n // Software Reset PHY\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n bmcr |= BMCR_RESET;\n phy_reg_write(MII_BMCR, bmcr);\n\n do {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n return 0;\n}\n\n", "parent": null, "children": [60, 61, 62], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 60, "type": "storage_class_specifier", "text": "atic i", "parent": 59, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 61, "type": "primitive_type", "text": "t r", "parent": 59, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 10}}, {"id": 62, "type": "function_declarator", "text": "l8211f_reset(void)\n{", "parent": 59, "children": [63, 64], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 31}}, {"id": 63, "type": "identifier", "text": "l8211f_reset(v", "parent": 62, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 25}}, {"id": 64, "type": "parameter_list", "text": "oid)\n{", "parent": 62, "children": [65], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 31}}, {"id": 65, "type": "parameter_declaration", "text": "id)\n", "parent": 64, "children": [66], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 30}}, {"id": 66, "type": "primitive_type", "text": "id)\n", "parent": 65, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 30}}, {"id": 67, "type": "declaration", "text": "t bmcr;\n\n", "parent": 59, "children": [68, 69], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 13}}, {"id": 68, "type": "primitive_type", "text": "t b", "parent": 67, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 7}}, {"id": 69, "type": "identifier", "text": "cr;\n", "parent": 67, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 12}}, {"id": 70, "type": "assignment_expression", "text": "cr = phy_reg_read(MII_BMCR);\n", "parent": 59, "children": [71, 72, 73], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 33}}, {"id": 71, "type": "identifier", "text": "cr =", "parent": 70, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 72, "type": "=", "text": "p", "parent": 70, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 10}}, {"id": 73, "type": "call_expression", "text": "y_reg_read(MII_BMCR);\n", "parent": 70, "children": [74, 75], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 33}}, {"id": 74, "type": "identifier", "text": "y_reg_read(M", "parent": 73, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 23}}, {"id": 75, "type": "argument_list", "text": "II_BMCR);\n", "parent": 73, "children": [76], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 33}}, {"id": 76, "type": "identifier", "text": "I_BMCR);", "parent": 75, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 32}}, {"id": 77, "type": "if_statement", "text": " (bmcr < 0)\n return bmcr;\n ", "parent": 59, "children": [78, 83], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 24, "column": 20}}, {"id": 78, "type": "parenthesized_expression", "text": "mcr < 0)\n ", "parent": 77, "children": [79], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 17}}, {"id": 79, "type": "binary_expression", "text": "cr < 0)\n", "parent": 78, "children": [80, 81, 82], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 80, "type": "identifier", "text": "cr <", "parent": 79, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 12}}, {"id": 81, "type": "<", "text": "0", "parent": 79, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 14}}, {"id": 82, "type": "number_literal", "text": "\n", "parent": 79, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 16}}, {"id": 83, "type": "return_statement", "text": "turn bmcr;\n ", "parent": 77, "children": [84], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 20}}, {"id": 84, "type": "identifier", "text": "cr;\n", "parent": 83, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 19}}, {"id": 85, "type": "assignment_expression", "text": "cr |= BMCR_RESET;\n", "parent": 59, "children": [86, 87, 88], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 22}}, {"id": 86, "type": "identifier", "text": "cr |", "parent": 85, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 8}}, {"id": 87, "type": "|=", "text": " B", "parent": 85, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 11}}, {"id": 88, "type": "identifier", "text": "CR_RESET;\n", "parent": 85, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 22}}, {"id": 89, "type": "call_expression", "text": "y_reg_write(MII_BMCR, bmcr);\n", "parent": 59, "children": [90, 91], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 33}}, {"id": 90, "type": "identifier", "text": "y_reg_write(M", "parent": 89, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 17}}, {"id": 91, "type": "argument_list", "text": "II_BMCR, bmcr);\n", "parent": 89, "children": [92, 93], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 33}}, {"id": 92, "type": "identifier", "text": "I_BMCR, ", "parent": 91, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 26}}, {"id": 93, "type": "identifier", "text": "cr);", "parent": 91, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 32}}, {"id": 94, "type": "do_statement", "text": " {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n", "parent": 59, "children": [110], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 32, "column": 32}}, {"id": 95, "type": "assignment_expression", "text": "cr = phy_reg_read(MII_BMCR);\n", "parent": 94, "children": [96, 97, 98], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 37}}, {"id": 96, "type": "identifier", "text": "cr =", "parent": 95, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 12}}, {"id": 97, "type": "=", "text": "p", "parent": 95, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 98, "type": "call_expression", "text": "y_reg_read(MII_BMCR);\n", "parent": 95, "children": [99, 100], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 37}}, {"id": 99, "type": "identifier", "text": "y_reg_read(M", "parent": 98, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 27}}, {"id": 100, "type": "argument_list", "text": "II_BMCR);\n", "parent": 98, "children": [101], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 37}}, {"id": 101, "type": "identifier", "text": "I_BMCR);", "parent": 100, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 36}}, {"id": 102, "type": "if_statement", "text": " (bmcr < 0)\n return bmcr;\n ", "parent": 94, "children": [103, 108], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 31, "column": 24}}, {"id": 103, "type": "parenthesized_expression", "text": "mcr < 0)\n ", "parent": 102, "children": [104], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 21}}, {"id": 104, "type": "binary_expression", "text": "cr < 0)\n", "parent": 103, "children": [105, 106, 107], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 20}}, {"id": 105, "type": "identifier", "text": "cr <", "parent": 104, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 16}}, {"id": 106, "type": "<", "text": "0", "parent": 104, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 18}}, {"id": 107, "type": "number_literal", "text": "\n", "parent": 104, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 108, "type": "return_statement", "text": "turn bmcr;\n ", "parent": 102, "children": [109], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 24}}, {"id": 109, "type": "identifier", "text": "cr;\n", "parent": 108, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 23}}, {"id": 110, "type": "parenthesized_expression", "text": "mcr & BMCR_RESET);\n", "parent": 94, "children": [111], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 31}}, {"id": 111, "type": "binary_expression", "text": "cr & BMCR_RESET);", "parent": 110, "children": [112, 113, 114], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 30}}, {"id": 112, "type": "identifier", "text": "cr &", "parent": 111, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 17}}, {"id": 113, "type": "&", "text": "B", "parent": 111, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 19}}, {"id": 114, "type": "identifier", "text": "CR_RESET);", "parent": 111, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 30}}, {"id": 115, "type": "return_statement", "text": "turn 0;\n}", "parent": 59, "children": [116], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 13}}, {"id": 116, "type": "number_literal", "text": "\n", "parent": 115, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 12}}, {"id": 117, "type": "preproc_def", "text": "efine INTR_JABBER\t\t\t \t0x0400\n#d", "parent": null, "children": [118, 119, 120], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 118, "type": "#define", "text": "efine I", "parent": 117, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 119, "type": "identifier", "text": "TR_JABBER\t\t", "parent": 117, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 19}}, {"id": 120, "type": "preproc_arg", "text": "0400\n#", "parent": 117, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 30}}, {"id": 121, "type": "preproc_def", "text": "efine INTR_ALDPS_STATE_CHANGE\t0x0200\n#d", "parent": null, "children": [122, 123, 124], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 122, "type": "#define", "text": "efine I", "parent": 121, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 123, "type": "identifier", "text": "TR_ALDPS_STATE_CHANGE\t0", "parent": 121, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 31}}, {"id": 124, "type": "preproc_arg", "text": "0200\n#", "parent": 121, "children": [], "start_point": {"row": 39, "column": 32}, "end_point": {"row": 39, "column": 38}}, {"id": 125, "type": "preproc_def", "text": "efine INTR_PME\t\t\t \t0x0080\n#d", "parent": null, "children": [126, 127, 128], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 126, "type": "#define", "text": "efine I", "parent": 125, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 127, "type": "identifier", "text": "TR_PME\t\t", "parent": 125, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 16}}, {"id": 128, "type": "preproc_arg", "text": "0080\n#", "parent": 125, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 27}}, {"id": 129, "type": "preproc_def", "text": "efine INTR_PHY_REG_ACCESSIBLE\t0x0020\n#d", "parent": null, "children": [130, 131, 132], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 130, "type": "#define", "text": "efine I", "parent": 129, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 131, "type": "identifier", "text": "TR_PHY_REG_ACCESSIBLE\t0", "parent": 129, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 31}}, {"id": 132, "type": "preproc_arg", "text": "0020\n#", "parent": 129, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 38}}, {"id": 133, "type": "preproc_def", "text": "efine INTR_LINK_CHG \t 0x0010\n#d", "parent": null, "children": [134, 135, 136], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 134, "type": "#define", "text": "efine I", "parent": 133, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 135, "type": "identifier", "text": "TR_LINK_CHG ", "parent": 133, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 21}}, {"id": 136, "type": "preproc_arg", "text": "0010\n#", "parent": 133, "children": [], "start_point": {"row": 42, "column": 30}, "end_point": {"row": 42, "column": 36}}, {"id": 137, "type": "preproc_def", "text": "efine INTR_AN_COMPLETE\t 0x0008\n#d", "parent": null, "children": [138, 139, 140], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 138, "type": "#define", "text": "efine I", "parent": 137, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 139, "type": "identifier", "text": "TR_AN_COMPLETE\t ", "parent": 137, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 24}}, {"id": 140, "type": "preproc_arg", "text": "0008\n#", "parent": 137, "children": [], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 35}}, {"id": 141, "type": "preproc_def", "text": "efine INTR_AN_ERROR\t\t 0x0001\n\n#", "parent": null, "children": [142, 143, 144], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 142, "type": "#define", "text": "efine I", "parent": 141, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 143, "type": "identifier", "text": "TR_AN_ERROR\t\t", "parent": 141, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 21}}, {"id": 144, "type": "preproc_arg", "text": "0001\n\n", "parent": 141, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 33}}, {"id": 145, "type": "preproc_def", "text": "efine INTR_ENABLE_ALL\t(INTR_JABBER |\\\n\tINTR_ALDPS_STATE_CHANGE |\\\n\tINTR_PME |\\\n\tINTR_PHY_REG_ACCESSIBLE |\\\n\tINTR_LINK_CHG |\\\n\tINTR_AN_COMPLETE |\\\n\tINTR_AN_ERROR)\n\t\n", "parent": null, "children": [146, 147, 148], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 146, "type": "#define", "text": "efine I", "parent": 145, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 147, "type": "identifier", "text": "TR_ENABLE_ALL\t(", "parent": 145, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 23}}, {"id": 148, "type": "preproc_arg", "text": "NTR_JABBER |\\\n\tINTR_ALDPS_STATE_CHANGE |\\\n\tINTR_PME |\\\n\tINTR_PHY_REG_ACCESSIBLE |\\\n\tINTR_LINK_CHG |\\\n\tINTR_AN_COMPLETE |\\\n\tINTR_AN_ERROR)\n\t", "parent": 145, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 52, "column": 15}}, {"id": 149, "type": "function_definition", "text": "atic void rtl8211f_config_intr(void)\n{\n phy_set_page(0xA42);\n\t\n#if defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n\tphy_set_page(0);\n}\n\n", "parent": null, "children": [150, 151, 152], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 150, "type": "storage_class_specifier", "text": "atic v", "parent": 149, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 151, "type": "primitive_type", "text": "id r", "parent": 149, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 11}}, {"id": 152, "type": "function_declarator", "text": "l8211f_config_intr(void)\n{", "parent": 149, "children": [153, 154], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 38}}, {"id": 153, "type": "identifier", "text": "l8211f_config_intr(v", "parent": 152, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 32}}, {"id": 154, "type": "parameter_list", "text": "oid)\n{", "parent": 152, "children": [155], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 38}}, {"id": 155, "type": "parameter_declaration", "text": "id)\n", "parent": 154, "children": [156], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 37}}, {"id": 156, "type": "primitive_type", "text": "id)\n", "parent": 155, "children": [], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 37}}, {"id": 157, "type": "call_expression", "text": "y_set_page(0xA42);\n", "parent": 149, "children": [158, 159], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 23}}, {"id": 158, "type": "identifier", "text": "y_set_page(0", "parent": 157, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 16}}, {"id": 159, "type": "argument_list", "text": "xA42);\n", "parent": 157, "children": [160], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 23}}, {"id": 160, "type": "number_literal", "text": "A42);", "parent": 159, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 22}}, {"id": 161, "type": "preproc_if", "text": "f defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n", "parent": 149, "children": [162, 163, 166, 172], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 162, "type": "#if", "text": "f d", "parent": 161, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 3}}, {"id": 163, "type": "preproc_defined", "text": "fined(CFG_NET_ETHERNET_LINK_INTR)\n ", "parent": 161, "children": [164, 165], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 39}}, {"id": 164, "type": "defined", "text": "fined(C", "parent": 163, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 11}}, {"id": 165, "type": "identifier", "text": "G_NET_ETHERNET_LINK_INTR)\n", "parent": 163, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 38}}, {"id": 166, "type": "\n", "text": " ", "parent": 161, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 59, "column": 0}}, {"id": 167, "type": "call_expression", "text": "y_reg_write(0x12, INTR_ENABLE_ALL);\n", "parent": 161, "children": [168, 169], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 40}}, {"id": 168, "type": "identifier", "text": "y_reg_write(0", "parent": 167, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 17}}, {"id": 169, "type": "argument_list", "text": "x12, INTR_ENABLE_ALL);\n", "parent": 167, "children": [170, 171], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 40}}, {"id": 170, "type": "number_literal", "text": "12, ", "parent": 169, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 22}}, {"id": 171, "type": "identifier", "text": "TR_ENABLE_ALL);", "parent": 169, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 39}}, {"id": 172, "type": "#endif", "text": "ndif\n\n", "parent": 161, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 173, "type": "call_expression", "text": "y_set_page(0);\n", "parent": 149, "children": [174, 175], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 16}}, {"id": 174, "type": "identifier", "text": "y_set_page(0", "parent": 173, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 13}}, {"id": 175, "type": "argument_list", "text": ");\n", "parent": 173, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 16}}, {"id": 176, "type": "function_definition", "text": "id\nPhyInit(int ethMode)\n{\n int res;\n uint16_t tmp;\n uint32_t timeout;\n\n if (ethMode == ITE_ETH_MAC_LB)\n return;\n\n /* phy reset */\n if (rtl8211f_reset())\n printf(\"rtl8211e reset fail! \\n\");\n printf(\" after reset: phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n\n /* config interrupt */\n rtl8211f_config_intr();\n\n if (ethMode == ITE_ETH_PCS_LB_10) {\n printf(\" PHY PCS 10 loopback! \\n\\n\");\n //phy_reg_write(0, 0x4100);\n\t\tphy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(\" PHY PCS 100 loopback! \\n\\n\");\n //phy_reg_write(0, 0x6100);\n\t\tphy_reg_write(0, 0x6000);\n\t\tphy_reg_read(0);\n\t\tprintf(\" phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}\n\n", "parent": null, "children": [177, 178], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 117, "column": 1}}, {"id": 177, "type": "primitive_type", "text": "id\nP", "parent": 176, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 4}}, {"id": 178, "type": "function_declarator", "text": "yInit(int ethMode)\n{", "parent": 176, "children": [179, 180], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 20}}, {"id": 179, "type": "identifier", "text": "yInit(i", "parent": 178, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 7}}, {"id": 180, "type": "parameter_list", "text": "nt ethMode)\n{", "parent": 178, "children": [181], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 20}}, {"id": 181, "type": "parameter_declaration", "text": "t ethMode)\n", "parent": 180, "children": [182, 183], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 19}}, {"id": 182, "type": "primitive_type", "text": "t e", "parent": 181, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 11}}, {"id": 183, "type": "identifier", "text": "hMode)\n", "parent": 181, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 19}}, {"id": 184, "type": "declaration", "text": "t res;\n ", "parent": 176, "children": [185, 186], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 12}}, {"id": 185, "type": "primitive_type", "text": "t r", "parent": 184, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 7}}, {"id": 186, "type": "identifier", "text": "s;\n", "parent": 184, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 11}}, {"id": 187, "type": "declaration", "text": "nt16_t tmp;\n ", "parent": 176, "children": [188, 189], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 17}}, {"id": 188, "type": "primitive_type", "text": "nt16_t t", "parent": 187, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 12}}, {"id": 189, "type": "identifier", "text": "p;\n", "parent": 187, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 16}}, {"id": 190, "type": "declaration", "text": "nt32_t timeout;\n\n", "parent": 176, "children": [191, 192], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 21}}, {"id": 191, "type": "primitive_type", "text": "nt32_t t", "parent": 190, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 12}}, {"id": 192, "type": "identifier", "text": "meout;\n", "parent": 190, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 20}}, {"id": 193, "type": "if_statement", "text": " (ethMode == ITE_ETH_MAC_LB)\n return;\n\n", "parent": 176, "children": [194, 199], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 73, "column": 15}}, {"id": 194, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_MAC_LB)\n ", "parent": 193, "children": [195], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 34}}, {"id": 195, "type": "binary_expression", "text": "hMode == ITE_ETH_MAC_LB)\n", "parent": 194, "children": [196, 197, 198], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 33}}, {"id": 196, "type": "identifier", "text": "hMode =", "parent": 195, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 15}}, {"id": 197, "type": "==", "text": " I", "parent": 195, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 18}}, {"id": 198, "type": "identifier", "text": "E_ETH_MAC_LB)\n", "parent": 195, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 33}}, {"id": 199, "type": "return_statement", "text": "turn;\n\n", "parent": 193, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 15}}, {"id": 200, "type": "if_statement", "text": " (rtl8211f_reset())\n printf(\"rtl8211e reset fail! \\n\");\n ", "parent": 176, "children": [201], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 77, "column": 42}}, {"id": 201, "type": "parenthesized_expression", "text": "tl8211f_reset())\n ", "parent": 200, "children": [202], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 25}}, {"id": 202, "type": "call_expression", "text": "l8211f_reset())\n", "parent": 201, "children": [203], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 24}}, {"id": 203, "type": "identifier", "text": "l8211f_reset()", "parent": 202, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 22}}, {"id": 204, "type": "call_expression", "text": "intf(\"rtl8211e reset fail! \\n\");\n", "parent": 200, "children": [205, 206], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 41}}, {"id": 205, "type": "identifier", "text": "intf(\"", "parent": 204, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 14}}, {"id": 206, "type": "argument_list", "text": "rtl8211e reset fail! \\n\");\n", "parent": 204, "children": [207], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 41}}, {"id": 207, "type": "string_literal", "text": "tl8211e reset fail! \\n\");", "parent": 206, "children": [208], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 40}}, {"id": 208, "type": "escape_sequence", "text": "\")", "parent": 207, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 39}}, {"id": 209, "type": "call_expression", "text": "intf(\" after reset: phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n", "parent": 176, "children": [210, 211], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 85}}, {"id": 210, "type": "identifier", "text": "intf(\"", "parent": 209, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 10}}, {"id": 211, "type": "argument_list", "text": " after reset: phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n", "parent": 209, "children": [212, 214, 217], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 85}}, {"id": 212, "type": "string_literal", "text": "after reset: phy reg %d = 0x%04X \\n\", ", "parent": 211, "children": [213], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 49}}, {"id": 213, "type": "escape_sequence", "text": "\",", "parent": 212, "children": [], "start_point": {"row": 78, "column": 46}, "end_point": {"row": 78, "column": 48}}, {"id": 214, "type": "field_expression", "text": "y_reg.reg_num, ", "parent": 211, "children": [215, 216], "start_point": {"row": 78, "column": 51}, "end_point": {"row": 78, "column": 66}}, {"id": 215, "type": "identifier", "text": "y_reg.r", "parent": 214, "children": [], "start_point": {"row": 78, "column": 51}, "end_point": {"row": 78, "column": 58}}, {"id": 216, "type": "field_identifier", "text": "g_num, ", "parent": 214, "children": [], "start_point": {"row": 78, "column": 59}, "end_point": {"row": 78, "column": 66}}, {"id": 217, "type": "field_expression", "text": "y_reg.val_read);", "parent": 211, "children": [218, 219], "start_point": {"row": 78, "column": 68}, "end_point": {"row": 78, "column": 84}}, {"id": 218, "type": "identifier", "text": "y_reg.v", "parent": 217, "children": [], "start_point": {"row": 78, "column": 68}, "end_point": {"row": 78, "column": 75}}, {"id": 219, "type": "field_identifier", "text": "l_read);", "parent": 217, "children": [], "start_point": {"row": 78, "column": 76}, "end_point": {"row": 78, "column": 84}}, {"id": 220, "type": "call_expression", "text": "l8211f_config_intr();\n", "parent": 176, "children": [221], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 26}}, {"id": 221, "type": "identifier", "text": "l8211f_config_intr()", "parent": 220, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 24}}, {"id": 222, "type": "if_statement", "text": " (ethMode == ITE_ETH_PCS_LB_10) {\n printf(\" PHY PCS 10 loopback! \\n\\n\");\n //phy_reg_write(0, 0x4100);\n\t\tphy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(\" PHY PCS 100 loopback! \\n\\n\");\n //phy_reg_write(0, 0x6100);\n\t\tphy_reg_write(0, 0x6000);\n\t\tphy_reg_read(0);\n\t\tprintf(\" phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 176, "children": [223, 246], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 223, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_PCS_LB_10) {", "parent": 222, "children": [224], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 37}}, {"id": 224, "type": "binary_expression", "text": "hMode == ITE_ETH_PCS_LB_10) ", "parent": 223, "children": [225, 226, 227], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 36}}, {"id": 225, "type": "identifier", "text": "hMode =", "parent": 224, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 15}}, {"id": 226, "type": "==", "text": " I", "parent": 224, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 18}}, {"id": 227, "type": "identifier", "text": "E_ETH_PCS_LB_10) ", "parent": 224, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 36}}, {"id": 228, "type": "call_expression", "text": "intf(\" PHY PCS 10 loopback! \\n\\n\");\n", "parent": 222, "children": [229, 230], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 44}}, {"id": 229, "type": "identifier", "text": "intf(\"", "parent": 228, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 14}}, {"id": 230, "type": "argument_list", "text": " PHY PCS 10 loopback! \\n\\n\");\n", "parent": 228, "children": [231], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 44}}, {"id": 231, "type": "string_literal", "text": "PHY PCS 10 loopback! \\n\\n\");", "parent": 230, "children": [232, 233], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 43}}, {"id": 232, "type": "escape_sequence", "text": "\\n", "parent": 231, "children": [], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 40}}, {"id": 233, "type": "escape_sequence", "text": "\")", "parent": 231, "children": [], "start_point": {"row": 84, "column": 40}, "end_point": {"row": 84, "column": 42}}, {"id": 234, "type": "call_expression", "text": "y_reg_write(0, 0x4000);\n", "parent": 222, "children": [235, 236], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 26}}, {"id": 235, "type": "identifier", "text": "y_reg_write(0", "parent": 234, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 15}}, {"id": 236, "type": "argument_list", "text": ", 0x4000);\n", "parent": 234, "children": [237, 238], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 26}}, {"id": 237, "type": "number_literal", "text": " ", "parent": 236, "children": [], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 17}}, {"id": 238, "type": "number_literal", "text": "4000);", "parent": 236, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 25}}, {"id": 239, "type": "call_expression", "text": "leep(20 * 1000);\n", "parent": 222, "children": [240, 241], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 25}}, {"id": 240, "type": "identifier", "text": "leep(2", "parent": 239, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 14}}, {"id": 241, "type": "argument_list", "text": "0 * 1000);\n", "parent": 239, "children": [242], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 25}}, {"id": 242, "type": "binary_expression", "text": " * 1000);", "parent": 241, "children": [243, 244, 245], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 24}}, {"id": 243, "type": "number_literal", "text": " *", "parent": 242, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 17}}, {"id": 244, "type": "*", "text": "1", "parent": 242, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 19}}, {"id": 245, "type": "number_literal", "text": "00);", "parent": 242, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 24}}, {"id": 246, "type": "else_clause", "text": "se if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(\" PHY PCS 100 loopback! \\n\\n\");\n //phy_reg_write(0, 0x6100);\n\t\tphy_reg_write(0, 0x6000);\n\t\tphy_reg_read(0);\n\t\tprintf(\" phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 222, "children": [247], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 247, "type": "if_statement", "text": "(ethMode == ITE_ETH_PCS_LB_100) {\n printf(\" PHY PCS 100 loopback! \\n\\n\");\n //phy_reg_write(0, 0x6100);\n\t\tphy_reg_write(0, 0x6000);\n\t\tphy_reg_read(0);\n\t\tprintf(\" phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 246, "children": [248, 285], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 116, "column": 5}}, {"id": 248, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_PCS_LB_100) {", "parent": 247, "children": [249], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 42}}, {"id": 249, "type": "binary_expression", "text": "hMode == ITE_ETH_PCS_LB_100) ", "parent": 248, "children": [250, 251, 252], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 41}}, {"id": 250, "type": "identifier", "text": "hMode =", "parent": 249, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 19}}, {"id": 251, "type": "==", "text": " I", "parent": 249, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 22}}, {"id": 252, "type": "identifier", "text": "E_ETH_PCS_LB_100) ", "parent": 249, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 41}}, {"id": 253, "type": "call_expression", "text": "intf(\" PHY PCS 100 loopback! \\n\\n\");\n", "parent": 247, "children": [254, 255], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 45}}, {"id": 254, "type": "identifier", "text": "intf(\"", "parent": 253, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 14}}, {"id": 255, "type": "argument_list", "text": " PHY PCS 100 loopback! \\n\\n\");\n", "parent": 253, "children": [256], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 45}}, {"id": 256, "type": "string_literal", "text": "PHY PCS 100 loopback! \\n\\n\");", "parent": 255, "children": [257, 258], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 44}}, {"id": 257, "type": "escape_sequence", "text": "\\n", "parent": 256, "children": [], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 41}}, {"id": 258, "type": "escape_sequence", "text": "\")", "parent": 256, "children": [], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 43}}, {"id": 259, "type": "call_expression", "text": "y_reg_write(0, 0x6000);\n", "parent": 247, "children": [260, 261], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 26}}, {"id": 260, "type": "identifier", "text": "y_reg_write(0", "parent": 259, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 15}}, {"id": 261, "type": "argument_list", "text": ", 0x6000);\n", "parent": 259, "children": [262, 263], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 26}}, {"id": 262, "type": "number_literal", "text": " ", "parent": 261, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 17}}, {"id": 263, "type": "number_literal", "text": "6000);", "parent": 261, "children": [], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 25}}, {"id": 264, "type": "call_expression", "text": "y_reg_read(0);\n", "parent": 247, "children": [265, 266], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 17}}, {"id": 265, "type": "identifier", "text": "y_reg_read(0", "parent": 264, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 14}}, {"id": 266, "type": "argument_list", "text": ");\n", "parent": 264, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 17}}, {"id": 267, "type": "call_expression", "text": "intf(\" phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n", "parent": 247, "children": [268, 269], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 70}}, {"id": 268, "type": "identifier", "text": "intf(\"", "parent": 267, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 8}}, {"id": 269, "type": "argument_list", "text": " phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n", "parent": 267, "children": [270, 272, 275], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 70}}, {"id": 270, "type": "string_literal", "text": "phy reg %d = 0x%04X \\n\", ", "parent": 269, "children": [271], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 34}}, {"id": 271, "type": "escape_sequence", "text": "\",", "parent": 270, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 33}}, {"id": 272, "type": "field_expression", "text": "y_reg.reg_num, ", "parent": 269, "children": [273, 274], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 51}}, {"id": 273, "type": "identifier", "text": "y_reg.r", "parent": 272, "children": [], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 43}}, {"id": 274, "type": "field_identifier", "text": "g_num, ", "parent": 272, "children": [], "start_point": {"row": 94, "column": 44}, "end_point": {"row": 94, "column": 51}}, {"id": 275, "type": "field_expression", "text": "y_reg.val_read);", "parent": 269, "children": [276, 277], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 69}}, {"id": 276, "type": "identifier", "text": "y_reg.v", "parent": 275, "children": [], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 60}}, {"id": 277, "type": "field_identifier", "text": "l_read);", "parent": 275, "children": [], "start_point": {"row": 94, "column": 61}, "end_point": {"row": 94, "column": 69}}, {"id": 278, "type": "call_expression", "text": "leep(20 * 1000);\n", "parent": 247, "children": [279, 280], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 25}}, {"id": 279, "type": "identifier", "text": "leep(2", "parent": 278, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 14}}, {"id": 280, "type": "argument_list", "text": "0 * 1000);\n", "parent": 278, "children": [281], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 25}}, {"id": 281, "type": "binary_expression", "text": " * 1000);", "parent": 280, "children": [282, 283, 284], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 24}}, {"id": 282, "type": "number_literal", "text": " *", "parent": 281, "children": [], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 17}}, {"id": 283, "type": "*", "text": "1", "parent": 281, "children": [], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 19}}, {"id": 284, "type": "number_literal", "text": "00);", "parent": 281, "children": [], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 24}}, {"id": 285, "type": "else_clause", "text": "se if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 247, "children": [286], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 286, "type": "if_statement", "text": "(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 285, "children": [287, 310], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 116, "column": 5}}, {"id": 287, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_PCS_LB_1000) {", "parent": 286, "children": [288], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 43}}, {"id": 288, "type": "binary_expression", "text": "hMode == ITE_ETH_PCS_LB_1000) ", "parent": 287, "children": [289, 290, 291], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 42}}, {"id": 289, "type": "identifier", "text": "hMode =", "parent": 288, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 19}}, {"id": 290, "type": "==", "text": " I", "parent": 288, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 22}}, {"id": 291, "type": "identifier", "text": "E_ETH_PCS_LB_1000) ", "parent": 288, "children": [], "start_point": {"row": 97, "column": 23}, "end_point": {"row": 97, "column": 42}}, {"id": 292, "type": "call_expression", "text": "intf(\" PHY PCS 1000 loopback! \\n\\n\");\n", "parent": 286, "children": [293, 294], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 46}}, {"id": 293, "type": "identifier", "text": "intf(\"", "parent": 292, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 14}}, {"id": 294, "type": "argument_list", "text": " PHY PCS 1000 loopback! \\n\\n\");\n", "parent": 292, "children": [295], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 46}}, {"id": 295, "type": "string_literal", "text": "PHY PCS 1000 loopback! \\n\\n\");", "parent": 294, "children": [296, 297], "start_point": {"row": 98, "column": 15}, "end_point": {"row": 98, "column": 45}}, {"id": 296, "type": "escape_sequence", "text": "\\n", "parent": 295, "children": [], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 42}}, {"id": 297, "type": "escape_sequence", "text": "\")", "parent": 295, "children": [], "start_point": {"row": 98, "column": 42}, "end_point": {"row": 98, "column": 44}}, {"id": 298, "type": "call_expression", "text": "y_reg_write(0, 0x4140);\n", "parent": 286, "children": [299, 300], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 32}}, {"id": 299, "type": "identifier", "text": "y_reg_write(0", "parent": 298, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 21}}, {"id": 300, "type": "argument_list", "text": ", 0x4140);\n", "parent": 298, "children": [301, 302], "start_point": {"row": 99, "column": 21}, "end_point": {"row": 99, "column": 32}}, {"id": 301, "type": "number_literal", "text": " ", "parent": 300, "children": [], "start_point": {"row": 99, "column": 22}, "end_point": {"row": 99, "column": 23}}, {"id": 302, "type": "number_literal", "text": "4140);", "parent": 300, "children": [], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 31}}, {"id": 303, "type": "call_expression", "text": "leep(20 * 1000);\n", "parent": 286, "children": [304, 305], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 25}}, {"id": 304, "type": "identifier", "text": "leep(2", "parent": 303, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 14}}, {"id": 305, "type": "argument_list", "text": "0 * 1000);\n", "parent": 303, "children": [306], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 25}}, {"id": 306, "type": "binary_expression", "text": " * 1000);", "parent": 305, "children": [307, 308, 309], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 24}}, {"id": 307, "type": "number_literal", "text": " *", "parent": 306, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 17}}, {"id": 308, "type": "*", "text": "1", "parent": 306, "children": [], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 19}}, {"id": 309, "type": "number_literal", "text": "00);", "parent": 306, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 24}}, {"id": 310, "type": "else_clause", "text": "se if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 286, "children": [311], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 311, "type": "if_statement", "text": " (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 310, "children": [312, 335], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 116, "column": 5}}, {"id": 312, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_MDI_LB_10) {", "parent": 311, "children": [313], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 42}}, {"id": 313, "type": "binary_expression", "text": "hMode == ITE_ETH_MDI_LB_10) ", "parent": 312, "children": [314, 315, 316], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 41}}, {"id": 314, "type": "identifier", "text": "hMode =", "parent": 313, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 20}}, {"id": 315, "type": "==", "text": " I", "parent": 313, "children": [], "start_point": {"row": 102, "column": 21}, "end_point": {"row": 102, "column": 23}}, {"id": 316, "type": "identifier", "text": "E_ETH_MDI_LB_10) ", "parent": 313, "children": [], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 41}}, {"id": 317, "type": "call_expression", "text": "intf(\" PHY MDI 10 loopback! \\n\\n\");\n", "parent": 311, "children": [318, 319], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 44}}, {"id": 318, "type": "identifier", "text": "intf(\"", "parent": 317, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 14}}, {"id": 319, "type": "argument_list", "text": " PHY MDI 10 loopback! \\n\\n\");\n", "parent": 317, "children": [320], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 44}}, {"id": 320, "type": "string_literal", "text": "PHY MDI 10 loopback! \\n\\n\");", "parent": 319, "children": [321, 322], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 43}}, {"id": 321, "type": "escape_sequence", "text": "\\n", "parent": 320, "children": [], "start_point": {"row": 103, "column": 38}, "end_point": {"row": 103, "column": 40}}, {"id": 322, "type": "escape_sequence", "text": "\")", "parent": 320, "children": [], "start_point": {"row": 103, "column": 40}, "end_point": {"row": 103, "column": 42}}, {"id": 323, "type": "call_expression", "text": "y_reg_write(0, 0x0100);\n", "parent": 311, "children": [324, 325], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 32}}, {"id": 324, "type": "identifier", "text": "y_reg_write(0", "parent": 323, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 21}}, {"id": 325, "type": "argument_list", "text": ", 0x0100);\n", "parent": 323, "children": [326, 327], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 32}}, {"id": 326, "type": "number_literal", "text": " ", "parent": 325, "children": [], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 23}}, {"id": 327, "type": "number_literal", "text": "0100);", "parent": 325, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 31}}, {"id": 328, "type": "call_expression", "text": "leep(100 * 1000);\n", "parent": 311, "children": [329, 330], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 26}}, {"id": 329, "type": "identifier", "text": "leep(1", "parent": 328, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 14}}, {"id": 330, "type": "argument_list", "text": "00 * 1000);\n", "parent": 328, "children": [331], "start_point": {"row": 105, "column": 14}, "end_point": {"row": 105, "column": 26}}, {"id": 331, "type": "binary_expression", "text": "0 * 1000);", "parent": 330, "children": [332, 333, 334], "start_point": {"row": 105, "column": 15}, "end_point": {"row": 105, "column": 25}}, {"id": 332, "type": "number_literal", "text": "0 *", "parent": 331, "children": [], "start_point": {"row": 105, "column": 15}, "end_point": {"row": 105, "column": 18}}, {"id": 333, "type": "*", "text": "1", "parent": 331, "children": [], "start_point": {"row": 105, "column": 19}, "end_point": {"row": 105, "column": 20}}, {"id": 334, "type": "number_literal", "text": "00);", "parent": 331, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 25}}, {"id": 335, "type": "else_clause", "text": "se if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 311, "children": [336], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 336, "type": "if_statement", "text": " (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 335, "children": [337, 360], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 116, "column": 5}}, {"id": 337, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_MDI_LB_100) {", "parent": 336, "children": [338], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 43}}, {"id": 338, "type": "binary_expression", "text": "hMode == ITE_ETH_MDI_LB_100) ", "parent": 337, "children": [339, 340, 341], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 42}}, {"id": 339, "type": "identifier", "text": "hMode =", "parent": 338, "children": [], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 20}}, {"id": 340, "type": "==", "text": " I", "parent": 338, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 23}}, {"id": 341, "type": "identifier", "text": "E_ETH_MDI_LB_100) ", "parent": 338, "children": [], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 42}}, {"id": 342, "type": "call_expression", "text": "intf(\" PHY MDI 100 loopback! \\n\\n\");\n", "parent": 336, "children": [343, 344], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 45}}, {"id": 343, "type": "identifier", "text": "intf(\"", "parent": 342, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 14}}, {"id": 344, "type": "argument_list", "text": " PHY MDI 100 loopback! \\n\\n\");\n", "parent": 342, "children": [345], "start_point": {"row": 108, "column": 14}, "end_point": {"row": 108, "column": 45}}, {"id": 345, "type": "string_literal", "text": "PHY MDI 100 loopback! \\n\\n\");", "parent": 344, "children": [346, 347], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 44}}, {"id": 346, "type": "escape_sequence", "text": "\\n", "parent": 345, "children": [], "start_point": {"row": 108, "column": 39}, "end_point": {"row": 108, "column": 41}}, {"id": 347, "type": "escape_sequence", "text": "\")", "parent": 345, "children": [], "start_point": {"row": 108, "column": 41}, "end_point": {"row": 108, "column": 43}}, {"id": 348, "type": "call_expression", "text": "y_reg_write(0, 0x2100);\n", "parent": 336, "children": [349, 350], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 32}}, {"id": 349, "type": "identifier", "text": "y_reg_write(0", "parent": 348, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 21}}, {"id": 350, "type": "argument_list", "text": ", 0x2100);\n", "parent": 348, "children": [351, 352], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 32}}, {"id": 351, "type": "number_literal", "text": " ", "parent": 350, "children": [], "start_point": {"row": 109, "column": 22}, "end_point": {"row": 109, "column": 23}}, {"id": 352, "type": "number_literal", "text": "2100);", "parent": 350, "children": [], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 31}}, {"id": 353, "type": "call_expression", "text": "leep(100 * 1000);\n", "parent": 336, "children": [354, 355], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 26}}, {"id": 354, "type": "identifier", "text": "leep(1", "parent": 353, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 14}}, {"id": 355, "type": "argument_list", "text": "00 * 1000);\n", "parent": 353, "children": [356], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 26}}, {"id": 356, "type": "binary_expression", "text": "0 * 1000);", "parent": 355, "children": [357, 358, 359], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 25}}, {"id": 357, "type": "number_literal", "text": "0 *", "parent": 356, "children": [], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 18}}, {"id": 358, "type": "*", "text": "1", "parent": 356, "children": [], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 20}}, {"id": 359, "type": "number_literal", "text": "00);", "parent": 356, "children": [], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 25}}, {"id": 360, "type": "else_clause", "text": "se if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 336, "children": [361], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 361, "type": "if_statement", "text": " (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}", "parent": 360, "children": [362], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 116, "column": 5}}, {"id": 362, "type": "parenthesized_expression", "text": "thMode == ITE_ETH_MDI_LB_1000) {", "parent": 361, "children": [363], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 44}}, {"id": 363, "type": "binary_expression", "text": "hMode == ITE_ETH_MDI_LB_1000) ", "parent": 362, "children": [364, 365, 366], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 43}}, {"id": 364, "type": "identifier", "text": "hMode =", "parent": 363, "children": [], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 20}}, {"id": 365, "type": "==", "text": " I", "parent": 363, "children": [], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 23}}, {"id": 366, "type": "identifier", "text": "E_ETH_MDI_LB_1000) ", "parent": 363, "children": [], "start_point": {"row": 112, "column": 24}, "end_point": {"row": 112, "column": 43}}, {"id": 367, "type": "call_expression", "text": "intf(\" PHY MDI 1000 loopback! \\n\\n\");\n", "parent": 361, "children": [368, 369], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 46}}, {"id": 368, "type": "identifier", "text": "intf(\"", "parent": 367, "children": [], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 14}}, {"id": 369, "type": "argument_list", "text": " PHY MDI 1000 loopback! \\n\\n\");\n", "parent": 367, "children": [370], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 46}}, {"id": 370, "type": "string_literal", "text": "PHY MDI 1000 loopback! \\n\\n\");", "parent": 369, "children": [371, 372], "start_point": {"row": 113, "column": 15}, "end_point": {"row": 113, "column": 45}}, {"id": 371, "type": "escape_sequence", "text": "\\n", "parent": 370, "children": [], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 42}}, {"id": 372, "type": "escape_sequence", "text": "\")", "parent": 370, "children": [], "start_point": {"row": 113, "column": 42}, "end_point": {"row": 113, "column": 44}}, {"id": 373, "type": "call_expression", "text": "y_reg_write(0, 0x0140);\n", "parent": 361, "children": [374, 375], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 32}}, {"id": 374, "type": "identifier", "text": "y_reg_write(0", "parent": 373, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 21}}, {"id": 375, "type": "argument_list", "text": ", 0x0140);\n", "parent": 373, "children": [376, 377], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 32}}, {"id": 376, "type": "number_literal", "text": " ", "parent": 375, "children": [], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 23}}, {"id": 377, "type": "number_literal", "text": "0140);", "parent": 375, "children": [], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 31}}, {"id": 378, "type": "call_expression", "text": "leep(100 * 1000);\n", "parent": 361, "children": [379, 380], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 379, "type": "identifier", "text": "leep(1", "parent": 378, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 14}}, {"id": 380, "type": "argument_list", "text": "00 * 1000);\n", "parent": 378, "children": [381], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 26}}, {"id": 381, "type": "binary_expression", "text": "0 * 1000);", "parent": 380, "children": [382, 383, 384], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 25}}, {"id": 382, "type": "number_literal", "text": "0 *", "parent": 381, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 18}}, {"id": 383, "type": "*", "text": "1", "parent": 381, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 20}}, {"id": 384, "type": "number_literal", "text": "00);", "parent": 381, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 25}}, {"id": 385, "type": "preproc_def", "text": "efine INTR_JABBER\t\t\t \t0x0400\n#d", "parent": null, "children": [386, 387, 388], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 120, "column": 0}}, {"id": 386, "type": "#define", "text": "efine I", "parent": 385, "children": [], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 7}}, {"id": 387, "type": "identifier", "text": "TR_JABBER\t\t", "parent": 385, "children": [], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 19}}, {"id": 388, "type": "preproc_arg", "text": "0400\n#", "parent": 385, "children": [], "start_point": {"row": 119, "column": 24}, "end_point": {"row": 119, "column": 30}}, {"id": 389, "type": "preproc_def", "text": "efine INTR_ALDPS_STATE_CHANGE\t0x0200\n#d", "parent": null, "children": [390, 391, 392], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 121, "column": 0}}, {"id": 390, "type": "#define", "text": "efine I", "parent": 389, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 7}}, {"id": 391, "type": "identifier", "text": "TR_ALDPS_STATE_CHANGE\t0", "parent": 389, "children": [], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 31}}, {"id": 392, "type": "preproc_arg", "text": "0200\n#", "parent": 389, "children": [], "start_point": {"row": 120, "column": 32}, "end_point": {"row": 120, "column": 38}}, {"id": 393, "type": "preproc_def", "text": "efine INTR_PME\t\t\t \t0x0080\n#d", "parent": null, "children": [394, 395, 396], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 122, "column": 0}}, {"id": 394, "type": "#define", "text": "efine I", "parent": 393, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 7}}, {"id": 395, "type": "identifier", "text": "TR_PME\t\t", "parent": 393, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 16}}, {"id": 396, "type": "preproc_arg", "text": "0080\n#", "parent": 393, "children": [], "start_point": {"row": 121, "column": 21}, "end_point": {"row": 121, "column": 27}}, {"id": 397, "type": "preproc_def", "text": "efine INTR_PHY_REG_ACCESSIBLE\t0x0020\n#d", "parent": null, "children": [398, 399, 400], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 123, "column": 0}}, {"id": 398, "type": "#define", "text": "efine I", "parent": 397, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 7}}, {"id": 399, "type": "identifier", "text": "TR_PHY_REG_ACCESSIBLE\t0", "parent": 397, "children": [], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 31}}, {"id": 400, "type": "preproc_arg", "text": "0020\n#", "parent": 397, "children": [], "start_point": {"row": 122, "column": 32}, "end_point": {"row": 122, "column": 38}}, {"id": 401, "type": "preproc_def", "text": "efine INTR_LINK_CHG \t 0x0010\n#d", "parent": null, "children": [402, 403, 404], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 124, "column": 0}}, {"id": 402, "type": "#define", "text": "efine I", "parent": 401, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 7}}, {"id": 403, "type": "identifier", "text": "TR_LINK_CHG ", "parent": 401, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 21}}, {"id": 404, "type": "preproc_arg", "text": "0010\n#", "parent": 401, "children": [], "start_point": {"row": 123, "column": 30}, "end_point": {"row": 123, "column": 36}}, {"id": 405, "type": "preproc_def", "text": "efine INTR_AN_COMPLETE\t 0x0008\n#d", "parent": null, "children": [406, 407, 408], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 125, "column": 0}}, {"id": 406, "type": "#define", "text": "efine I", "parent": 405, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 7}}, {"id": 407, "type": "identifier", "text": "TR_AN_COMPLETE\t ", "parent": 405, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 24}}, {"id": 408, "type": "preproc_arg", "text": "0008\n#", "parent": 405, "children": [], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 35}}, {"id": 409, "type": "preproc_def", "text": "efine INTR_AN_ERROR\t\t 0x0001\n\n/", "parent": null, "children": [410, 411, 412], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 126, "column": 0}}, {"id": 410, "type": "#define", "text": "efine I", "parent": 409, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 7}}, {"id": 411, "type": "identifier", "text": "TR_AN_ERROR\t\t", "parent": 409, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 21}}, {"id": 412, "type": "preproc_arg", "text": "0001\n\n", "parent": 409, "children": [], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 33}}, {"id": 413, "type": "function_definition", "text": "t rtl8211f_link_change(void)\n{\n uint16_t intr;\n\n\tphy_set_page(0xA43);\n\n intr = phy_reg_read(0x1D);\n\t\n\tphy_set_page(0);\n\n#if 1\n if (intr & INTR_JABBER)\n ithPrintf(\"phy: jabber detected! \\n\");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf(\"phy: ALDPS state changed! \\n\");\n if (intr & INTR_PME)\n ithPrintf(\"phy: WOL event occurred! \\n\");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf(\"phy: Can access PHY register through MDC/MDIO! \\n\");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf(\"phy: Auto-Negotiation completed! \\n\");\n if (intr & INTR_AN_ERROR)\n ithPrintf(\"phy: auto-negotiation error! \\n\");\n#endif\n if (intr & INTR_LINK_CHG) {\n ithPrintf(\"phy: link change! \\n\");\n return 1;\n }\n\n return 0;\n}\n\n", "parent": null, "children": [414, 415], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 158, "column": 1}}, {"id": 414, "type": "primitive_type", "text": "t r", "parent": 413, "children": [], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 128, "column": 3}}, {"id": 415, "type": "function_declarator", "text": "l8211f_link_change(void)\n{", "parent": 413, "children": [416, 417], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 30}}, {"id": 416, "type": "identifier", "text": "l8211f_link_change(v", "parent": 415, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 24}}, {"id": 417, "type": "parameter_list", "text": "oid)\n{", "parent": 415, "children": [418], "start_point": {"row": 128, "column": 24}, "end_point": {"row": 128, "column": 30}}, {"id": 418, "type": "parameter_declaration", "text": "id)\n", "parent": 417, "children": [419], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 29}}, {"id": 419, "type": "primitive_type", "text": "id)\n", "parent": 418, "children": [], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 29}}, {"id": 420, "type": "declaration", "text": "nt16_t intr;\n\n", "parent": 413, "children": [421, 422], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 18}}, {"id": 421, "type": "primitive_type", "text": "nt16_t i", "parent": 420, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 12}}, {"id": 422, "type": "identifier", "text": "tr;\n", "parent": 420, "children": [], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 130, "column": 17}}, {"id": 423, "type": "call_expression", "text": "y_set_page(0xA43);\n", "parent": 413, "children": [424, 425], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 20}}, {"id": 424, "type": "identifier", "text": "y_set_page(0", "parent": 423, "children": [], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 13}}, {"id": 425, "type": "argument_list", "text": "xA43);\n", "parent": 423, "children": [426], "start_point": {"row": 132, "column": 13}, "end_point": {"row": 132, "column": 20}}, {"id": 426, "type": "number_literal", "text": "A43);", "parent": 425, "children": [], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 19}}, {"id": 427, "type": "assignment_expression", "text": "tr = phy_reg_read(0x1D);\n", "parent": 413, "children": [428, 429, 430], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 29}}, {"id": 428, "type": "identifier", "text": "tr =", "parent": 427, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 8}}, {"id": 429, "type": "=", "text": "p", "parent": 427, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 10}}, {"id": 430, "type": "call_expression", "text": "y_reg_read(0x1D);\n", "parent": 427, "children": [431, 432], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 29}}, {"id": 431, "type": "identifier", "text": "y_reg_read(0", "parent": 430, "children": [], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 23}}, {"id": 432, "type": "argument_list", "text": "x1D);\n", "parent": 430, "children": [433], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 29}}, {"id": 433, "type": "number_literal", "text": "1D);", "parent": 432, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 28}}, {"id": 434, "type": "call_expression", "text": "y_set_page(0);\n", "parent": 413, "children": [435, 436], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 16}}, {"id": 435, "type": "identifier", "text": "y_set_page(0", "parent": 434, "children": [], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 13}}, {"id": 436, "type": "argument_list", "text": ");\n", "parent": 434, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 16}}, {"id": 437, "type": "preproc_if", "text": "f 1\n if (intr & INTR_JABBER)\n ithPrintf(\"phy: jabber detected! \\n\");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf(\"phy: ALDPS state changed! \\n\");\n if (intr & INTR_PME)\n ithPrintf(\"phy: WOL event occurred! \\n\");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf(\"phy: Can access PHY register through MDC/MDIO! \\n\");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf(\"phy: Auto-Negotiation completed! \\n\");\n if (intr & INTR_AN_ERROR)\n ithPrintf(\"phy: auto-negotiation error! \\n\");\n#endif\n ", "parent": 413, "children": [438, 439, 440, 441, 452, 463, 474, 485, 496, 507], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 151, "column": 6}}, {"id": 438, "type": "#if", "text": "f 1", "parent": 437, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 3}}, {"id": 439, "type": "number_literal", "text": " ", "parent": 437, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 5}}, {"id": 440, "type": "\n", "text": " ", "parent": 437, "children": [], "start_point": {"row": 138, "column": 5}, "end_point": {"row": 139, "column": 0}}, {"id": 441, "type": "if_statement", "text": " (intr & INTR_JABBER)\n ithPrintf(\"phy: jabber detected! \\n\");\n ", "parent": 437, "children": [442], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 140, "column": 46}}, {"id": 442, "type": "parenthesized_expression", "text": "ntr & INTR_JABBER)\n ", "parent": 441, "children": [443], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 27}}, {"id": 443, "type": "binary_expression", "text": "tr & INTR_JABBER)\n", "parent": 442, "children": [444, 445, 446], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 26}}, {"id": 444, "type": "identifier", "text": "tr &", "parent": 443, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 12}}, {"id": 445, "type": "&", "text": "I", "parent": 443, "children": [], "start_point": {"row": 139, "column": 13}, "end_point": {"row": 139, "column": 14}}, {"id": 446, "type": "identifier", "text": "TR_JABBER)\n", "parent": 443, "children": [], "start_point": {"row": 139, "column": 15}, "end_point": {"row": 139, "column": 26}}, {"id": 447, "type": "call_expression", "text": "hPrintf(\"phy: jabber detected! \\n\");\n", "parent": 441, "children": [448, 449], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 45}}, {"id": 448, "type": "identifier", "text": "hPrintf(\"", "parent": 447, "children": [], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 17}}, {"id": 449, "type": "argument_list", "text": "phy: jabber detected! \\n\");\n", "parent": 447, "children": [450], "start_point": {"row": 140, "column": 17}, "end_point": {"row": 140, "column": 45}}, {"id": 450, "type": "string_literal", "text": "hy: jabber detected! \\n\");", "parent": 449, "children": [451], "start_point": {"row": 140, "column": 18}, "end_point": {"row": 140, "column": 44}}, {"id": 451, "type": "escape_sequence", "text": "\")", "parent": 450, "children": [], "start_point": {"row": 140, "column": 41}, "end_point": {"row": 140, "column": 43}}, {"id": 452, "type": "if_statement", "text": " (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf(\"phy: ALDPS state changed! \\n\");\n ", "parent": 437, "children": [453], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 142, "column": 50}}, {"id": 453, "type": "parenthesized_expression", "text": "ntr & INTR_ALDPS_STATE_CHANGE)\n ", "parent": 452, "children": [454], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 39}}, {"id": 454, "type": "binary_expression", "text": "tr & INTR_ALDPS_STATE_CHANGE)\n", "parent": 453, "children": [455, 456, 457], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 38}}, {"id": 455, "type": "identifier", "text": "tr &", "parent": 454, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 12}}, {"id": 456, "type": "&", "text": "I", "parent": 454, "children": [], "start_point": {"row": 141, "column": 13}, "end_point": {"row": 141, "column": 14}}, {"id": 457, "type": "identifier", "text": "TR_ALDPS_STATE_CHANGE)\n", "parent": 454, "children": [], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 38}}, {"id": 458, "type": "call_expression", "text": "hPrintf(\"phy: ALDPS state changed! \\n\");\n", "parent": 452, "children": [459, 460], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 49}}, {"id": 459, "type": "identifier", "text": "hPrintf(\"", "parent": 458, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 17}}, {"id": 460, "type": "argument_list", "text": "phy: ALDPS state changed! \\n\");\n", "parent": 458, "children": [461], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 49}}, {"id": 461, "type": "string_literal", "text": "hy: ALDPS state changed! \\n\");", "parent": 460, "children": [462], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 48}}, {"id": 462, "type": "escape_sequence", "text": "\")", "parent": 461, "children": [], "start_point": {"row": 142, "column": 45}, "end_point": {"row": 142, "column": 47}}, {"id": 463, "type": "if_statement", "text": " (intr & INTR_PME)\n ithPrintf(\"phy: WOL event occurred! \\n\");\n ", "parent": 437, "children": [464], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 144, "column": 49}}, {"id": 464, "type": "parenthesized_expression", "text": "ntr & INTR_PME)\n ", "parent": 463, "children": [465], "start_point": {"row": 143, "column": 7}, "end_point": {"row": 143, "column": 24}}, {"id": 465, "type": "binary_expression", "text": "tr & INTR_PME)\n", "parent": 464, "children": [466, 467, 468], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 23}}, {"id": 466, "type": "identifier", "text": "tr &", "parent": 465, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 12}}, {"id": 467, "type": "&", "text": "I", "parent": 465, "children": [], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 14}}, {"id": 468, "type": "identifier", "text": "TR_PME)\n", "parent": 465, "children": [], "start_point": {"row": 143, "column": 15}, "end_point": {"row": 143, "column": 23}}, {"id": 469, "type": "call_expression", "text": "hPrintf(\"phy: WOL event occurred! \\n\");\n", "parent": 463, "children": [470, 471], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 48}}, {"id": 470, "type": "identifier", "text": "hPrintf(\"", "parent": 469, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 17}}, {"id": 471, "type": "argument_list", "text": "phy: WOL event occurred! \\n\");\n", "parent": 469, "children": [472], "start_point": {"row": 144, "column": 17}, "end_point": {"row": 144, "column": 48}}, {"id": 472, "type": "string_literal", "text": "hy: WOL event occurred! \\n\");", "parent": 471, "children": [473], "start_point": {"row": 144, "column": 18}, "end_point": {"row": 144, "column": 47}}, {"id": 473, "type": "escape_sequence", "text": "\")", "parent": 472, "children": [], "start_point": {"row": 144, "column": 44}, "end_point": {"row": 144, "column": 46}}, {"id": 474, "type": "if_statement", "text": " (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf(\"phy: Can access PHY register through MDC/MDIO! \\n\");\n ", "parent": 437, "children": [475], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 146, "column": 71}}, {"id": 475, "type": "parenthesized_expression", "text": "ntr & INTR_PHY_REG_ACCESSIBLE)\n ", "parent": 474, "children": [476], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 39}}, {"id": 476, "type": "binary_expression", "text": "tr & INTR_PHY_REG_ACCESSIBLE)\n", "parent": 475, "children": [477, 478, 479], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 38}}, {"id": 477, "type": "identifier", "text": "tr &", "parent": 476, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 12}}, {"id": 478, "type": "&", "text": "I", "parent": 476, "children": [], "start_point": {"row": 145, "column": 13}, "end_point": {"row": 145, "column": 14}}, {"id": 479, "type": "identifier", "text": "TR_PHY_REG_ACCESSIBLE)\n", "parent": 476, "children": [], "start_point": {"row": 145, "column": 15}, "end_point": {"row": 145, "column": 38}}, {"id": 480, "type": "call_expression", "text": "hPrintf(\"phy: Can access PHY register through MDC/MDIO! \\n\");\n", "parent": 474, "children": [481, 482], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 70}}, {"id": 481, "type": "identifier", "text": "hPrintf(\"", "parent": 480, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 17}}, {"id": 482, "type": "argument_list", "text": "phy: Can access PHY register through MDC/MDIO! \\n\");\n", "parent": 480, "children": [483], "start_point": {"row": 146, "column": 17}, "end_point": {"row": 146, "column": 70}}, {"id": 483, "type": "string_literal", "text": "hy: Can access PHY register through MDC/MDIO! \\n\");", "parent": 482, "children": [484], "start_point": {"row": 146, "column": 18}, "end_point": {"row": 146, "column": 69}}, {"id": 484, "type": "escape_sequence", "text": "\")", "parent": 483, "children": [], "start_point": {"row": 146, "column": 66}, "end_point": {"row": 146, "column": 68}}, {"id": 485, "type": "if_statement", "text": " (intr & INTR_AN_COMPLETE)\n ithPrintf(\"phy: Auto-Negotiation completed! \\n\");\n ", "parent": 437, "children": [486], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 148, "column": 57}}, {"id": 486, "type": "parenthesized_expression", "text": "ntr & INTR_AN_COMPLETE)\n ", "parent": 485, "children": [487], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 32}}, {"id": 487, "type": "binary_expression", "text": "tr & INTR_AN_COMPLETE)\n", "parent": 486, "children": [488, 489, 490], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 31}}, {"id": 488, "type": "identifier", "text": "tr &", "parent": 487, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 12}}, {"id": 489, "type": "&", "text": "I", "parent": 487, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 14}}, {"id": 490, "type": "identifier", "text": "TR_AN_COMPLETE)\n", "parent": 487, "children": [], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 31}}, {"id": 491, "type": "call_expression", "text": "hPrintf(\"phy: Auto-Negotiation completed! \\n\");\n", "parent": 485, "children": [492, 493], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 56}}, {"id": 492, "type": "identifier", "text": "hPrintf(\"", "parent": 491, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 17}}, {"id": 493, "type": "argument_list", "text": "phy: Auto-Negotiation completed! \\n\");\n", "parent": 491, "children": [494], "start_point": {"row": 148, "column": 17}, "end_point": {"row": 148, "column": 56}}, {"id": 494, "type": "string_literal", "text": "hy: Auto-Negotiation completed! \\n\");", "parent": 493, "children": [495], "start_point": {"row": 148, "column": 18}, "end_point": {"row": 148, "column": 55}}, {"id": 495, "type": "escape_sequence", "text": "\")", "parent": 494, "children": [], "start_point": {"row": 148, "column": 52}, "end_point": {"row": 148, "column": 54}}, {"id": 496, "type": "if_statement", "text": " (intr & INTR_AN_ERROR)\n ithPrintf(\"phy: auto-negotiation error! \\n\");\n#", "parent": 437, "children": [497], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 150, "column": 53}}, {"id": 497, "type": "parenthesized_expression", "text": "ntr & INTR_AN_ERROR)\n ", "parent": 496, "children": [498], "start_point": {"row": 149, "column": 7}, "end_point": {"row": 149, "column": 29}}, {"id": 498, "type": "binary_expression", "text": "tr & INTR_AN_ERROR)\n", "parent": 497, "children": [499, 500, 501], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 28}}, {"id": 499, "type": "identifier", "text": "tr &", "parent": 498, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 12}}, {"id": 500, "type": "&", "text": "I", "parent": 498, "children": [], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 14}}, {"id": 501, "type": "identifier", "text": "TR_AN_ERROR)\n", "parent": 498, "children": [], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 28}}, {"id": 502, "type": "call_expression", "text": "hPrintf(\"phy: auto-negotiation error! \\n\");\n", "parent": 496, "children": [503, 504], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 52}}, {"id": 503, "type": "identifier", "text": "hPrintf(\"", "parent": 502, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 17}}, {"id": 504, "type": "argument_list", "text": "phy: auto-negotiation error! \\n\");\n", "parent": 502, "children": [505], "start_point": {"row": 150, "column": 17}, "end_point": {"row": 150, "column": 52}}, {"id": 505, "type": "string_literal", "text": "hy: auto-negotiation error! \\n\");", "parent": 504, "children": [506], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 51}}, {"id": 506, "type": "escape_sequence", "text": "\")", "parent": 505, "children": [], "start_point": {"row": 150, "column": 48}, "end_point": {"row": 150, "column": 50}}, {"id": 507, "type": "#endif", "text": "ndif\n ", "parent": 437, "children": [], "start_point": {"row": 151, "column": 0}, "end_point": {"row": 151, "column": 6}}, {"id": 508, "type": "if_statement", "text": " (intr & INTR_LINK_CHG) {\n ithPrintf(\"phy: link change! \\n\");\n return 1;\n }\n\n", "parent": 413, "children": [509], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 155, "column": 5}}, {"id": 509, "type": "parenthesized_expression", "text": "ntr & INTR_LINK_CHG) {", "parent": 508, "children": [510], "start_point": {"row": 152, "column": 7}, "end_point": {"row": 152, "column": 29}}, {"id": 510, "type": "binary_expression", "text": "tr & INTR_LINK_CHG) ", "parent": 509, "children": [511, 512, 513], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 28}}, {"id": 511, "type": "identifier", "text": "tr &", "parent": 510, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 12}}, {"id": 512, "type": "&", "text": "I", "parent": 510, "children": [], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 14}}, {"id": 513, "type": "identifier", "text": "TR_LINK_CHG) ", "parent": 510, "children": [], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 28}}, {"id": 514, "type": "call_expression", "text": "hPrintf(\"phy: link change! \\n\");\n", "parent": 508, "children": [515, 516], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 41}}, {"id": 515, "type": "identifier", "text": "hPrintf(\"", "parent": 514, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 17}}, {"id": 516, "type": "argument_list", "text": "phy: link change! \\n\");\n", "parent": 514, "children": [517], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 41}}, {"id": 517, "type": "string_literal", "text": "hy: link change! \\n\");", "parent": 516, "children": [518], "start_point": {"row": 153, "column": 18}, "end_point": {"row": 153, "column": 40}}, {"id": 518, "type": "escape_sequence", "text": "\")", "parent": 517, "children": [], "start_point": {"row": 153, "column": 37}, "end_point": {"row": 153, "column": 39}}, {"id": 519, "type": "return_statement", "text": "turn 1;\n ", "parent": 508, "children": [520], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 17}}, {"id": 520, "type": "number_literal", "text": "\n", "parent": 519, "children": [], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 16}}, {"id": 521, "type": "return_statement", "text": "turn 0;\n}", "parent": 413, "children": [522], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 13}}, {"id": 522, "type": "number_literal", "text": "\n", "parent": 521, "children": [], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 12}}, {"id": 523, "type": "preproc_def", "text": "efine PHYSR_FULL_DUPLEX 0x0008\n#d", "parent": null, "children": [524, 525, 526], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 161, "column": 0}}, {"id": 524, "type": "#define", "text": "efine P", "parent": 523, "children": [], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 160, "column": 7}}, {"id": 525, "type": "identifier", "text": "YSR_FULL_DUPLEX ", "parent": 523, "children": [], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 25}}, {"id": 526, "type": "preproc_arg", "text": "0008\n#", "parent": 523, "children": [], "start_point": {"row": 160, "column": 40}, "end_point": {"row": 160, "column": 46}}, {"id": 527, "type": "preproc_def", "text": "efine PHYSR_LINK_OK 0x0004\n\n/", "parent": null, "children": [528, 529, 530], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 162, "column": 0}}, {"id": 528, "type": "#define", "text": "efine P", "parent": 527, "children": [], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 161, "column": 7}}, {"id": 529, "type": "identifier", "text": "YSR_LINK_OK ", "parent": 527, "children": [], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 21}}, {"id": 530, "type": "preproc_arg", "text": "0004\n\n", "parent": 527, "children": [], "start_point": {"row": 161, "column": 40}, "end_point": {"row": 161, "column": 46}}, {"id": 531, "type": "function_definition", "text": "t rtl8211f_read_mode(int* speed, int* duplex)\n{\n uint16_t status = phy_reg_read(0x1A);\n uint16_t _speed = (status & 0x0030) >> 4;\n\n if (!(status & PHYSR_LINK_OK)) {\n ithPrintf(\"phy status reg0x1A = 0x%04X - link not ok! \\n\", status);\n return -1;\n }\n\n if (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n switch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n return 0; // 0 means link up\n}\n\n", "parent": null, "children": [532, 533], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 193, "column": 1}}, {"id": 532, "type": "primitive_type", "text": "t r", "parent": 531, "children": [], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 3}}, {"id": 533, "type": "function_declarator", "text": "l8211f_read_mode(int* speed, int* duplex)\n{", "parent": 531, "children": [534, 535], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 47}}, {"id": 534, "type": "identifier", "text": "l8211f_read_mode(i", "parent": 533, "children": [], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 22}}, {"id": 535, "type": "parameter_list", "text": "nt* speed, int* duplex)\n{", "parent": 533, "children": [536, 541], "start_point": {"row": 164, "column": 22}, "end_point": {"row": 164, "column": 47}}, {"id": 536, "type": "parameter_declaration", "text": "t* speed, ", "parent": 535, "children": [537, 538], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 33}}, {"id": 537, "type": "primitive_type", "text": "t* ", "parent": 536, "children": [], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 26}}, {"id": 538, "type": "pointer_declarator", "text": "speed, ", "parent": 536, "children": [539, 540], "start_point": {"row": 164, "column": 26}, "end_point": {"row": 164, "column": 33}}, {"id": 539, "type": "*", "text": "s", "parent": 538, "children": [], "start_point": {"row": 164, "column": 26}, "end_point": {"row": 164, "column": 27}}, {"id": 540, "type": "identifier", "text": "eed, ", "parent": 538, "children": [], "start_point": {"row": 164, "column": 28}, "end_point": {"row": 164, "column": 33}}, {"id": 541, "type": "parameter_declaration", "text": "t* duplex)\n", "parent": 535, "children": [542, 543], "start_point": {"row": 164, "column": 35}, "end_point": {"row": 164, "column": 46}}, {"id": 542, "type": "primitive_type", "text": "t* ", "parent": 541, "children": [], "start_point": {"row": 164, "column": 35}, "end_point": {"row": 164, "column": 38}}, {"id": 543, "type": "pointer_declarator", "text": "duplex)\n", "parent": 541, "children": [544, 545], "start_point": {"row": 164, "column": 38}, "end_point": {"row": 164, "column": 46}}, {"id": 544, "type": "*", "text": "d", "parent": 543, "children": [], "start_point": {"row": 164, "column": 38}, "end_point": {"row": 164, "column": 39}}, {"id": 545, "type": "identifier", "text": "plex)\n", "parent": 543, "children": [], "start_point": {"row": 164, "column": 40}, "end_point": {"row": 164, "column": 46}}, {"id": 546, "type": "declaration", "text": "nt16_t status = phy_reg_read(0x1A);\n ", "parent": 531, "children": [547, 548], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 41}}, {"id": 547, "type": "primitive_type", "text": "nt16_t s", "parent": 546, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 12}}, {"id": 548, "type": "init_declarator", "text": "atus = phy_reg_read(0x1A);\n", "parent": 546, "children": [549, 550, 551], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 40}}, {"id": 549, "type": "identifier", "text": "atus =", "parent": 548, "children": [], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 19}}, {"id": 550, "type": "=", "text": "p", "parent": 548, "children": [], "start_point": {"row": 166, "column": 20}, "end_point": {"row": 166, "column": 21}}, {"id": 551, "type": "call_expression", "text": "y_reg_read(0x1A);\n", "parent": 548, "children": [552, 553], "start_point": {"row": 166, "column": 22}, "end_point": {"row": 166, "column": 40}}, {"id": 552, "type": "identifier", "text": "y_reg_read(0", "parent": 551, "children": [], "start_point": {"row": 166, "column": 22}, "end_point": {"row": 166, "column": 34}}, {"id": 553, "type": "argument_list", "text": "x1A);\n", "parent": 551, "children": [554], "start_point": {"row": 166, "column": 34}, "end_point": {"row": 166, "column": 40}}, {"id": 554, "type": "number_literal", "text": "1A);", "parent": 553, "children": [], "start_point": {"row": 166, "column": 35}, "end_point": {"row": 166, "column": 39}}, {"id": 555, "type": "declaration", "text": "nt16_t _speed = (status & 0x0030) >> 4;\n\n", "parent": 531, "children": [556, 557], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 45}}, {"id": 556, "type": "primitive_type", "text": "nt16_t _", "parent": 555, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 12}}, {"id": 557, "type": "init_declarator", "text": "peed = (status & 0x0030) >> 4;\n", "parent": 555, "children": [558, 559], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 44}}, {"id": 558, "type": "identifier", "text": "peed =", "parent": 557, "children": [], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 19}}, {"id": 559, "type": "binary_expression", "text": "tatus & 0x0030) >> 4;\n", "parent": 557, "children": [560, 565, 566], "start_point": {"row": 167, "column": 22}, "end_point": {"row": 167, "column": 44}}, {"id": 560, "type": "parenthesized_expression", "text": "tatus & 0x0030) >", "parent": 559, "children": [561], "start_point": {"row": 167, "column": 22}, "end_point": {"row": 167, "column": 39}}, {"id": 561, "type": "binary_expression", "text": "atus & 0x0030) ", "parent": 560, "children": [562, 563, 564], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 38}}, {"id": 562, "type": "identifier", "text": "atus &", "parent": 561, "children": [], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 29}}, {"id": 563, "type": "&", "text": "0", "parent": 561, "children": [], "start_point": {"row": 167, "column": 30}, "end_point": {"row": 167, "column": 31}}, {"id": 564, "type": "number_literal", "text": "0030) ", "parent": 561, "children": [], "start_point": {"row": 167, "column": 32}, "end_point": {"row": 167, "column": 38}}, {"id": 565, "type": ">>", "text": " 4", "parent": 559, "children": [], "start_point": {"row": 167, "column": 40}, "end_point": {"row": 167, "column": 42}}, {"id": 566, "type": "number_literal", "text": "\n", "parent": 559, "children": [], "start_point": {"row": 167, "column": 43}, "end_point": {"row": 167, "column": 44}}, {"id": 567, "type": "if_statement", "text": " (!(status & PHYSR_LINK_OK)) {\n ithPrintf(\"phy status reg0x1A = 0x%04X - link not ok! \\n\", status);\n return -1;\n }\n\n", "parent": 531, "children": [568], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 172, "column": 5}}, {"id": 568, "type": "parenthesized_expression", "text": "(status & PHYSR_LINK_OK)) {", "parent": 567, "children": [569], "start_point": {"row": 169, "column": 7}, "end_point": {"row": 169, "column": 34}}, {"id": 569, "type": "unary_expression", "text": "status & PHYSR_LINK_OK)) ", "parent": 568, "children": [570, 571], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 33}}, {"id": 570, "type": "!", "text": "s", "parent": 569, "children": [], "start_point": {"row": 169, "column": 8}, "end_point": {"row": 169, "column": 9}}, {"id": 571, "type": "parenthesized_expression", "text": "tatus & PHYSR_LINK_OK)) ", "parent": 569, "children": [572], "start_point": {"row": 169, "column": 9}, "end_point": {"row": 169, "column": 33}}, {"id": 572, "type": "binary_expression", "text": "atus & PHYSR_LINK_OK))", "parent": 571, "children": [573, 574, 575], "start_point": {"row": 169, "column": 10}, "end_point": {"row": 169, "column": 32}}, {"id": 573, "type": "identifier", "text": "atus &", "parent": 572, "children": [], "start_point": {"row": 169, "column": 10}, "end_point": {"row": 169, "column": 16}}, {"id": 574, "type": "&", "text": "P", "parent": 572, "children": [], "start_point": {"row": 169, "column": 17}, "end_point": {"row": 169, "column": 18}}, {"id": 575, "type": "identifier", "text": "YSR_LINK_OK))", "parent": 572, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 32}}, {"id": 576, "type": "call_expression", "text": "hPrintf(\"phy status reg0x1A = 0x%04X - link not ok! \\n\", status);\n", "parent": 567, "children": [577, 578], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 74}}, {"id": 577, "type": "identifier", "text": "hPrintf(\"", "parent": 576, "children": [], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 17}}, {"id": 578, "type": "argument_list", "text": "phy status reg0x1A = 0x%04X - link not ok! \\n\", status);\n", "parent": 576, "children": [579, 581], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 74}}, {"id": 579, "type": "string_literal", "text": "hy status reg0x1A = 0x%04X - link not ok! \\n\", ", "parent": 578, "children": [580], "start_point": {"row": 170, "column": 18}, "end_point": {"row": 170, "column": 65}}, {"id": 580, "type": "escape_sequence", "text": "\",", "parent": 579, "children": [], "start_point": {"row": 170, "column": 62}, "end_point": {"row": 170, "column": 64}}, {"id": 581, "type": "identifier", "text": "atus);", "parent": 578, "children": [], "start_point": {"row": 170, "column": 67}, "end_point": {"row": 170, "column": 73}}, {"id": 582, "type": "return_statement", "text": "turn -1;\n ", "parent": 567, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 18}}, {"id": 583, "type": "if_statement", "text": " (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n", "parent": 531, "children": [584, 596], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 177, "column": 32}}, {"id": 584, "type": "parenthesized_expression", "text": "tatus & PHYSR_FULL_DUPLEX)\n ", "parent": 583, "children": [585], "start_point": {"row": 174, "column": 7}, "end_point": {"row": 174, "column": 35}}, {"id": 585, "type": "binary_expression", "text": "atus & PHYSR_FULL_DUPLEX)\n", "parent": 584, "children": [586, 587, 588], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 34}}, {"id": 586, "type": "identifier", "text": "atus &", "parent": 585, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 14}}, {"id": 587, "type": "&", "text": "P", "parent": 585, "children": [], "start_point": {"row": 174, "column": 15}, "end_point": {"row": 174, "column": 16}}, {"id": 588, "type": "identifier", "text": "YSR_FULL_DUPLEX)\n", "parent": 585, "children": [], "start_point": {"row": 174, "column": 17}, "end_point": {"row": 174, "column": 34}}, {"id": 589, "type": "assignment_expression", "text": "duplex) = DUPLEX_FULL;\n", "parent": 583, "children": [590, 594, 595], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 31}}, {"id": 590, "type": "parenthesized_expression", "text": "duplex) =", "parent": 589, "children": [591], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 17}}, {"id": 591, "type": "pointer_expression", "text": "uplex) ", "parent": 590, "children": [592, 593], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 16}}, {"id": 592, "type": "*", "text": "u", "parent": 591, "children": [], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 10}}, {"id": 593, "type": "identifier", "text": "plex) ", "parent": 591, "children": [], "start_point": {"row": 175, "column": 10}, "end_point": {"row": 175, "column": 16}}, {"id": 594, "type": "=", "text": "D", "parent": 589, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 19}}, {"id": 595, "type": "identifier", "text": "PLEX_FULL;\n", "parent": 589, "children": [], "start_point": {"row": 175, "column": 20}, "end_point": {"row": 175, "column": 31}}, {"id": 596, "type": "else_clause", "text": "se\n (*duplex) = DUPLEX_HALF;\n\n", "parent": 583, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 177, "column": 32}}, {"id": 597, "type": "assignment_expression", "text": "duplex) = DUPLEX_HALF;\n", "parent": 596, "children": [598, 602, 603], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 31}}, {"id": 598, "type": "parenthesized_expression", "text": "duplex) =", "parent": 597, "children": [599], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 17}}, {"id": 599, "type": "pointer_expression", "text": "uplex) ", "parent": 598, "children": [600, 601], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 16}}, {"id": 600, "type": "*", "text": "u", "parent": 599, "children": [], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 10}}, {"id": 601, "type": "identifier", "text": "plex) ", "parent": 599, "children": [], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 16}}, {"id": 602, "type": "=", "text": "D", "parent": 597, "children": [], "start_point": {"row": 177, "column": 18}, "end_point": {"row": 177, "column": 19}}, {"id": 603, "type": "identifier", "text": "PLEX_HALF;\n", "parent": 597, "children": [], "start_point": {"row": 177, "column": 20}, "end_point": {"row": 177, "column": 31}}, {"id": 604, "type": "switch_statement", "text": "itch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n", "parent": 531, "children": [605, 606], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 190, "column": 5}}, {"id": 605, "type": "switch", "text": "itch (", "parent": 604, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 10}}, {"id": 606, "type": "parenthesized_expression", "text": "speed) {", "parent": 604, "children": [607], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 19}}, {"id": 607, "type": "identifier", "text": "peed) ", "parent": 606, "children": [], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 18}}, {"id": 608, "type": "case_statement", "text": "fault:\n ", "parent": 604, "children": [609], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 12}}, {"id": 609, "type": "default", "text": "fault:\n", "parent": 608, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 11}}, {"id": 610, "type": "case_statement", "text": "se 0:\n (*speed) = SPEED_10;\n break;\n ", "parent": 604, "children": [611, 612, 620], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 183, "column": 14}}, {"id": 611, "type": "case", "text": "se 0", "parent": 610, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 8}}, {"id": 612, "type": "number_literal", "text": "\n", "parent": 610, "children": [], "start_point": {"row": 181, "column": 9}, "end_point": {"row": 181, "column": 10}}, {"id": 613, "type": "assignment_expression", "text": "speed) = SPEED_10;\n", "parent": 610, "children": [614, 618, 619], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 27}}, {"id": 614, "type": "parenthesized_expression", "text": "speed) =", "parent": 613, "children": [615], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 16}}, {"id": 615, "type": "pointer_expression", "text": "peed) ", "parent": 614, "children": [616, 617], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 15}}, {"id": 616, "type": "*", "text": "p", "parent": 615, "children": [], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 10}}, {"id": 617, "type": "identifier", "text": "eed) ", "parent": 615, "children": [], "start_point": {"row": 182, "column": 10}, "end_point": {"row": 182, "column": 15}}, {"id": 618, "type": "=", "text": "S", "parent": 613, "children": [], "start_point": {"row": 182, "column": 17}, "end_point": {"row": 182, "column": 18}}, {"id": 619, "type": "identifier", "text": "EED_10;\n", "parent": 613, "children": [], "start_point": {"row": 182, "column": 19}, "end_point": {"row": 182, "column": 27}}, {"id": 620, "type": "break_statement", "text": "eak;\n ", "parent": 610, "children": [621], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 14}}, {"id": 621, "type": "break", "text": "eak;\n", "parent": 620, "children": [], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 13}}, {"id": 622, "type": "case_statement", "text": "se 1:\n (*speed) = SPEED_100;\n break;\n ", "parent": 604, "children": [623, 624, 632], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 186, "column": 14}}, {"id": 623, "type": "case", "text": "se 1", "parent": 622, "children": [], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 8}}, {"id": 624, "type": "number_literal", "text": "\n", "parent": 622, "children": [], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 10}}, {"id": 625, "type": "assignment_expression", "text": "speed) = SPEED_100;\n", "parent": 622, "children": [626, 630, 631], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 28}}, {"id": 626, "type": "parenthesized_expression", "text": "speed) =", "parent": 625, "children": [627], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 16}}, {"id": 627, "type": "pointer_expression", "text": "peed) ", "parent": 626, "children": [628, 629], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 15}}, {"id": 628, "type": "*", "text": "p", "parent": 627, "children": [], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 10}}, {"id": 629, "type": "identifier", "text": "eed) ", "parent": 627, "children": [], "start_point": {"row": 185, "column": 10}, "end_point": {"row": 185, "column": 15}}, {"id": 630, "type": "=", "text": "S", "parent": 625, "children": [], "start_point": {"row": 185, "column": 17}, "end_point": {"row": 185, "column": 18}}, {"id": 631, "type": "identifier", "text": "EED_100;\n", "parent": 625, "children": [], "start_point": {"row": 185, "column": 19}, "end_point": {"row": 185, "column": 28}}, {"id": 632, "type": "break_statement", "text": "eak;\n ", "parent": 622, "children": [633], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 14}}, {"id": 633, "type": "break", "text": "eak;\n", "parent": 632, "children": [], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 13}}, {"id": 634, "type": "case_statement", "text": "se 2:\n (*speed) = SPEED_1000;\n break;\n ", "parent": 604, "children": [635, 636, 644], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 189, "column": 14}}, {"id": 635, "type": "case", "text": "se 2", "parent": 634, "children": [], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 8}}, {"id": 636, "type": "number_literal", "text": "\n", "parent": 634, "children": [], "start_point": {"row": 187, "column": 9}, "end_point": {"row": 187, "column": 10}}, {"id": 637, "type": "assignment_expression", "text": "speed) = SPEED_1000;\n", "parent": 634, "children": [638, 642, 643], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 29}}, {"id": 638, "type": "parenthesized_expression", "text": "speed) =", "parent": 637, "children": [639], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 16}}, {"id": 639, "type": "pointer_expression", "text": "peed) ", "parent": 638, "children": [640, 641], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 15}}, {"id": 640, "type": "*", "text": "p", "parent": 639, "children": [], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 10}}, {"id": 641, "type": "identifier", "text": "eed) ", "parent": 639, "children": [], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 15}}, {"id": 642, "type": "=", "text": "S", "parent": 637, "children": [], "start_point": {"row": 188, "column": 17}, "end_point": {"row": 188, "column": 18}}, {"id": 643, "type": "identifier", "text": "EED_1000;\n", "parent": 637, "children": [], "start_point": {"row": 188, "column": 19}, "end_point": {"row": 188, "column": 29}}, {"id": 644, "type": "break_statement", "text": "eak;\n ", "parent": 634, "children": [645], "start_point": {"row": 189, "column": 8}, "end_point": {"row": 189, "column": 14}}, {"id": 645, "type": "break", "text": "eak;\n", "parent": 644, "children": [], "start_point": {"row": 189, "column": 8}, "end_point": {"row": 189, "column": 13}}, {"id": 646, "type": "return_statement", "text": "turn 0; /", "parent": 531, "children": [647], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 13}}, {"id": 647, "type": "number_literal", "text": " ", "parent": 646, "children": [], "start_point": {"row": 192, "column": 11}, "end_point": {"row": 192, "column": 12}}, {"id": 648, "type": "declaration", "text": "t(*itpPhyLinkChange)(void) = rtl8211f_link_change;\n/", "parent": null, "children": [649, 650], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 200, "column": 52}}, {"id": 649, "type": "primitive_type", "text": "t(*", "parent": 648, "children": [], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 200, "column": 3}}, {"id": 650, "type": "init_declarator", "text": "itpPhyLinkChange)(void) = rtl8211f_link_change;\n", "parent": 648, "children": [651, 659, 660], "start_point": {"row": 200, "column": 3}, "end_point": {"row": 200, "column": 51}}, {"id": 651, "type": "function_declarator", "text": "itpPhyLinkChange)(void) =", "parent": 650, "children": [652, 656], "start_point": {"row": 200, "column": 3}, "end_point": {"row": 200, "column": 28}}, {"id": 652, "type": "parenthesized_declarator", "text": "itpPhyLinkChange)(v", "parent": 651, "children": [653], "start_point": {"row": 200, "column": 3}, "end_point": {"row": 200, "column": 22}}, {"id": 653, "type": "pointer_declarator", "text": "tpPhyLinkChange)(", "parent": 652, "children": [654, 655], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 21}}, {"id": 654, "type": "*", "text": "t", "parent": 653, "children": [], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 5}}, {"id": 655, "type": "identifier", "text": "pPhyLinkChange)(", "parent": 653, "children": [], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 21}}, {"id": 656, "type": "parameter_list", "text": "oid) =", "parent": 651, "children": [657], "start_point": {"row": 200, "column": 22}, "end_point": {"row": 200, "column": 28}}, {"id": 657, "type": "parameter_declaration", "text": "id) ", "parent": 656, "children": [658], "start_point": {"row": 200, "column": 23}, "end_point": {"row": 200, "column": 27}}, {"id": 658, "type": "primitive_type", "text": "id) ", "parent": 657, "children": [], "start_point": {"row": 200, "column": 23}, "end_point": {"row": 200, "column": 27}}, {"id": 659, "type": "=", "text": "r", "parent": 650, "children": [], "start_point": {"row": 200, "column": 29}, "end_point": {"row": 200, "column": 30}}, {"id": 660, "type": "identifier", "text": "l8211f_link_change;\n", "parent": 650, "children": [], "start_point": {"row": 200, "column": 31}, "end_point": {"row": 200, "column": 51}}, {"id": 661, "type": "declaration", "text": "HGpioIntrHandler itpPhylinkIsr = NULL;\n/", "parent": null, "children": [662, 663], "start_point": {"row": 204, "column": 0}, "end_point": {"row": 204, "column": 40}}, {"id": 662, "type": "type_identifier", "text": "HGpioIntrHandler i", "parent": 661, "children": [], "start_point": {"row": 204, "column": 0}, "end_point": {"row": 204, "column": 18}}, {"id": 663, "type": "init_declarator", "text": "pPhylinkIsr = NULL;\n", "parent": 661, "children": [664, 665, 666], "start_point": {"row": 204, "column": 19}, "end_point": {"row": 204, "column": 39}}, {"id": 664, "type": "identifier", "text": "pPhylinkIsr =", "parent": 663, "children": [], "start_point": {"row": 204, "column": 19}, "end_point": {"row": 204, "column": 32}}, {"id": 665, "type": "=", "text": "N", "parent": 663, "children": [], "start_point": {"row": 204, "column": 33}, "end_point": {"row": 204, "column": 34}}, {"id": 666, "type": "null", "text": "LL;\n", "parent": 663, "children": [667], "start_point": {"row": 204, "column": 35}, "end_point": {"row": 204, "column": 39}}, {"id": 667, "type": "NULL", "text": "LL;\n", "parent": 666, "children": [], "start_point": {"row": 204, "column": 35}, "end_point": {"row": 204, "column": 39}}, {"id": 668, "type": "declaration", "text": "t(*itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode;\n/", "parent": null, "children": [669, 670], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 208, "column": 67}}, {"id": 669, "type": "primitive_type", "text": "t(*", "parent": 668, "children": [], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 208, "column": 3}}, {"id": 670, "type": "init_declarator", "text": "itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode;\n", "parent": 668, "children": [671, 687, 688], "start_point": {"row": 208, "column": 3}, "end_point": {"row": 208, "column": 66}}, {"id": 671, "type": "function_declarator", "text": "itpPhyReadMode)(int* speed, int* duplex) =", "parent": 670, "children": [672, 676], "start_point": {"row": 208, "column": 3}, "end_point": {"row": 208, "column": 45}}, {"id": 672, "type": "parenthesized_declarator", "text": "itpPhyReadMode)(i", "parent": 671, "children": [673], "start_point": {"row": 208, "column": 3}, "end_point": {"row": 208, "column": 20}}, {"id": 673, "type": "pointer_declarator", "text": "tpPhyReadMode)(", "parent": 672, "children": [674, 675], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 19}}, {"id": 674, "type": "*", "text": "t", "parent": 673, "children": [], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 5}}, {"id": 675, "type": "identifier", "text": "pPhyReadMode)(", "parent": 673, "children": [], "start_point": {"row": 208, "column": 5}, "end_point": {"row": 208, "column": 19}}, {"id": 676, "type": "parameter_list", "text": "nt* speed, int* duplex) =", "parent": 671, "children": [677, 682], "start_point": {"row": 208, "column": 20}, "end_point": {"row": 208, "column": 45}}, {"id": 677, "type": "parameter_declaration", "text": "t* speed, ", "parent": 676, "children": [678, 679], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 31}}, {"id": 678, "type": "primitive_type", "text": "t* ", "parent": 677, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 24}}, {"id": 679, "type": "pointer_declarator", "text": "speed, ", "parent": 677, "children": [680, 681], "start_point": {"row": 208, "column": 24}, "end_point": {"row": 208, "column": 31}}, {"id": 680, "type": "*", "text": "s", "parent": 679, "children": [], "start_point": {"row": 208, "column": 24}, "end_point": {"row": 208, "column": 25}}, {"id": 681, "type": "identifier", "text": "eed, ", "parent": 679, "children": [], "start_point": {"row": 208, "column": 26}, "end_point": {"row": 208, "column": 31}}, {"id": 682, "type": "parameter_declaration", "text": "t* duplex) ", "parent": 676, "children": [683, 684], "start_point": {"row": 208, "column": 33}, "end_point": {"row": 208, "column": 44}}, {"id": 683, "type": "primitive_type", "text": "t* ", "parent": 682, "children": [], "start_point": {"row": 208, "column": 33}, "end_point": {"row": 208, "column": 36}}, {"id": 684, "type": "pointer_declarator", "text": "duplex) ", "parent": 682, "children": [685, 686], "start_point": {"row": 208, "column": 36}, "end_point": {"row": 208, "column": 44}}, {"id": 685, "type": "*", "text": "d", "parent": 684, "children": [], "start_point": {"row": 208, "column": 36}, "end_point": {"row": 208, "column": 37}}, {"id": 686, "type": "identifier", "text": "plex) ", "parent": 684, "children": [], "start_point": {"row": 208, "column": 38}, "end_point": {"row": 208, "column": 44}}, {"id": 687, "type": "=", "text": "r", "parent": 670, "children": [], "start_point": {"row": 208, "column": 46}, "end_point": {"row": 208, "column": 47}}, {"id": 688, "type": "identifier", "text": "l8211f_read_mode;\n", "parent": 670, "children": [], "start_point": {"row": 208, "column": 48}, "end_point": {"row": 208, "column": 66}}, {"id": 689, "type": "declaration", "text": "nt32_t(*itpPhyLinkStatus)(void) = NULL;\n\n", "parent": null, "children": [690, 691], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 212, "column": 41}}, {"id": 690, "type": "primitive_type", "text": "nt32_t(*", "parent": 689, "children": [], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 212, "column": 8}}, {"id": 691, "type": "init_declarator", "text": "itpPhyLinkStatus)(void) = NULL;\n", "parent": 689, "children": [692, 700, 701], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 40}}, {"id": 692, "type": "function_declarator", "text": "itpPhyLinkStatus)(void) =", "parent": 691, "children": [693, 697], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 33}}, {"id": 693, "type": "parenthesized_declarator", "text": "itpPhyLinkStatus)(v", "parent": 692, "children": [694], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 27}}, {"id": 694, "type": "pointer_declarator", "text": "tpPhyLinkStatus)(", "parent": 693, "children": [695, 696], "start_point": {"row": 212, "column": 9}, "end_point": {"row": 212, "column": 26}}, {"id": 695, "type": "*", "text": "t", "parent": 694, "children": [], "start_point": {"row": 212, "column": 9}, "end_point": {"row": 212, "column": 10}}, {"id": 696, "type": "identifier", "text": "pPhyLinkStatus)(", "parent": 694, "children": [], "start_point": {"row": 212, "column": 10}, "end_point": {"row": 212, "column": 26}}, {"id": 697, "type": "parameter_list", "text": "oid) =", "parent": 692, "children": [698], "start_point": {"row": 212, "column": 27}, "end_point": {"row": 212, "column": 33}}, {"id": 698, "type": "parameter_declaration", "text": "id) ", "parent": 697, "children": [699], "start_point": {"row": 212, "column": 28}, "end_point": {"row": 212, "column": 32}}, {"id": 699, "type": "primitive_type", "text": "id) ", "parent": 698, "children": [], "start_point": {"row": 212, "column": 28}, "end_point": {"row": 212, "column": 32}}, {"id": 700, "type": "=", "text": "N", "parent": 691, "children": [], "start_point": {"row": 212, "column": 34}, "end_point": {"row": 212, "column": 35}}, {"id": 701, "type": "null", "text": "LL;\n", "parent": 691, "children": [702], "start_point": {"row": 212, "column": 36}, "end_point": {"row": 212, "column": 40}}, {"id": 702, "type": "NULL", "text": "LL;\n", "parent": 701, "children": [], "start_point": {"row": 212, "column": 36}, "end_point": {"row": 212, "column": 40}}]}, "node_categories": {"declarations": {"functions": [14, 20, 27, 30, 59, 62, 149, 152, 176, 178, 413, 415, 531, 533, 651, 671, 692], "variables": [3, 33, 65, 67, 155, 181, 184, 187, 190, 418, 420, 536, 541, 546, 555, 648, 657, 661, 668, 677, 682, 689, 698], "classes": [4, 5, 6, 28, 60, 150], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [37, 43, 48, 51, 56, 73, 78, 79, 89, 98, 103, 104, 110, 111, 157, 167, 173, 194, 195, 201, 202, 204, 209, 214, 217, 220, 223, 224, 228, 234, 239, 242, 248, 249, 253, 259, 264, 267, 272, 275, 278, 281, 287, 288, 292, 298, 303, 306, 312, 313, 317, 323, 328, 331, 337, 338, 342, 348, 353, 356, 362, 363, 367, 373, 378, 381, 423, 430, 434, 442, 443, 447, 453, 454, 458, 464, 465, 469, 475, 476, 480, 486, 487, 491, 497, 498, 502, 509, 510, 514, 551, 559, 560, 561, 568, 569, 571, 572, 576, 584, 585, 590, 591, 598, 599, 606, 614, 615, 626, 627, 638, 639], "assignments": [36, 42, 70, 85, 95, 427, 589, 597, 613, 625, 637], "loops": [], "conditionals": [7, 9, 11, 16, 18, 22, 24, 25, 31, 35, 38, 39, 41, 44, 45, 49, 53, 54, 57, 58, 63, 69, 71, 74, 76, 77, 80, 84, 86, 88, 90, 92, 93, 96, 99, 101, 102, 105, 109, 112, 114, 119, 123, 127, 131, 135, 139, 143, 147, 153, 158, 161, 162, 165, 168, 171, 172, 174, 179, 183, 186, 189, 192, 193, 196, 198, 200, 203, 205, 210, 215, 216, 218, 219, 221, 222, 225, 227, 229, 235, 240, 247, 250, 252, 254, 260, 265, 268, 273, 274, 276, 277, 279, 286, 289, 291, 293, 299, 304, 311, 314, 316, 318, 324, 329, 336, 339, 341, 343, 349, 354, 361, 364, 366, 368, 374, 379, 387, 391, 395, 399, 403, 407, 411, 416, 422, 424, 428, 431, 435, 437, 438, 441, 444, 446, 448, 452, 455, 457, 459, 463, 466, 468, 470, 474, 477, 479, 481, 485, 488, 490, 492, 496, 499, 501, 503, 507, 508, 511, 513, 515, 525, 529, 534, 540, 545, 549, 552, 558, 562, 567, 573, 575, 577, 581, 583, 586, 588, 593, 595, 601, 603, 604, 605, 607, 608, 610, 611, 617, 619, 622, 623, 629, 631, 634, 635, 641, 643, 655, 660, 662, 664, 675, 681, 686, 688, 696], "returns": [55, 83, 108, 115, 199, 519, 521, 582, 646], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 12, 13, 47, 82, 107, 116, 160, 170, 207, 212, 231, 237, 238, 243, 245, 256, 262, 263, 270, 282, 284, 295, 301, 302, 307, 309, 320, 326, 327, 332, 334, 345, 351, 352, 357, 359, 370, 376, 377, 382, 384, 426, 433, 439, 450, 461, 472, 483, 494, 505, 517, 520, 522, 554, 564, 566, 579, 612, 624, 636, 647], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "efine phy_set_page(page) do { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg,"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "efine phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "atic uint16_t phy_reg_read(uint16_t reg)\n{\n phy_reg.reg_num = reg; \n phy_reg.val_read = 0; \n "}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "y_reg_read(uint16_t reg)\n{"}, {"node_id": 59, "universal_type": "function", "name": "rtl8211f_reset", "text_snippet": "atic int rtl8211f_reset(void)\n{\n int bmcr;\n\n // Software Reset PHY\n bmcr = phy_reg_read(MII"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "l8211f_reset(void)\n{"}, {"node_id": 149, "universal_type": "function", "name": "rtl8211f_config_intr", "text_snippet": "atic void rtl8211f_config_intr(void)\n{\n phy_set_page(0xA42);\n\t\n#if defined(CFG_NET_ETHERNET_LINK_"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "l8211f_config_intr(void)\n{"}, {"node_id": 176, "universal_type": "function", "name": "res;", "text_snippet": "id\nPhyInit(int ethMode)\n{\n int res;\n uint16_t tmp;\n uint32_t timeout;\n\n if (ethMode == I"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "yInit(int ethMode)\n{"}, {"node_id": 413, "universal_type": "function", "name": "unknown", "text_snippet": "t rtl8211f_link_change(void)\n{\n uint16_t intr;\n\n\tphy_set_page(0xA43);\n\n intr = phy_reg_read(0x"}, {"node_id": 415, "universal_type": "function", "name": "unknown", "text_snippet": "l8211f_link_change(void)\n{"}, {"node_id": 531, "universal_type": "function", "name": "unknown", "text_snippet": "t rtl8211f_read_mode(int* speed, int* duplex)\n{\n uint16_t status = phy_reg_read(0x1A);\n uint16"}, {"node_id": 533, "universal_type": "function", "name": "unknown", "text_snippet": "l8211f_read_mode(int* speed, int* duplex)\n{"}, {"node_id": 651, "universal_type": "function", "name": "unknown", "text_snippet": "itpPhyLinkChange)(void) ="}, {"node_id": 671, "universal_type": "function", "name": "unknown", "text_snippet": "itpPhyReadMode)(int* speed, int* duplex) ="}, {"node_id": 692, "universal_type": "function", "name": "unknown", "text_snippet": "itpPhyLinkStatus)(void) ="}], "class_declarations": [{"node_id": 4, "universal_type": "class", "name": "unknown", "text_snippet": "atic s"}, {"node_id": 5, "universal_type": "class", "name": "unknown", "text_snippet": "ruct mii_ioctl_data p"}, {"node_id": 6, "universal_type": "class", "name": "unknown", "text_snippet": "ruct m"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "atic u"}, {"node_id": 60, "universal_type": "class", "name": "unknown", "text_snippet": "atic i"}, {"node_id": 150, "universal_type": "class", "name": "unknown", "text_snippet": "atic v"}], "import_statements": [{"node_id": 0, "text": "nclude \"ite/ite_mac.h\"\n\n\n"}, {"node_id": 1, "text": "nclude \""}]}, "original_source_code": "\ufeff#include \"ite/ite_mac.h\"\n\n\n\nstatic struct mii_ioctl_data phy_reg = { CFG_NET_ETHERNET_PHY_ADDR, 0, 0, 0 };\n\n#define phy_set_page(page) do { phy_reg.reg_num=31; phy_reg.val_write=page; iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n#define phy_reg_write(reg,val) do { phy_reg.reg_num=(reg); phy_reg.val_write=(val); iteMacIoctl(&phy_reg, IOCSMIIREG); } while(0)\n\nstatic uint16_t phy_reg_read(uint16_t reg)\n{\n phy_reg.reg_num = reg; \n phy_reg.val_read = 0; \n iteMacIoctl(&phy_reg, IOCGMIIREG);\n return phy_reg.val_read;\n}\n\nstatic int rtl8211f_reset(void)\n{\n int bmcr;\n\n // Software Reset PHY\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n bmcr |= BMCR_RESET;\n phy_reg_write(MII_BMCR, bmcr);\n\n do {\n bmcr = phy_reg_read(MII_BMCR);\n if (bmcr < 0)\n return bmcr;\n } while (bmcr & BMCR_RESET);\n\n return 0;\n}\n\n/* phy interrupt definition */\n#define INTR_JABBER\t\t\t \t0x0400\n#define INTR_ALDPS_STATE_CHANGE\t0x0200\n#define INTR_PME\t\t\t \t0x0080\n#define INTR_PHY_REG_ACCESSIBLE\t0x0020\n#define INTR_LINK_CHG \t 0x0010\n#define INTR_AN_COMPLETE\t 0x0008\n#define INTR_AN_ERROR\t\t 0x0001\n\n#define INTR_ENABLE_ALL\t(INTR_JABBER |\\\n\tINTR_ALDPS_STATE_CHANGE |\\\n\tINTR_PME |\\\n\tINTR_PHY_REG_ACCESSIBLE |\\\n\tINTR_LINK_CHG |\\\n\tINTR_AN_COMPLETE |\\\n\tINTR_AN_ERROR)\n\t\nstatic void rtl8211f_config_intr(void)\n{\n phy_set_page(0xA42);\n\t\n#if defined(CFG_NET_ETHERNET_LINK_INTR)\n phy_reg_write(0x12, INTR_ENABLE_ALL);\n#endif\n\n\tphy_set_page(0);\n}\n\nvoid\nPhyInit(int ethMode)\n{\n int res;\n uint16_t tmp;\n uint32_t timeout;\n\n if (ethMode == ITE_ETH_MAC_LB)\n return;\n\n /* phy reset */\n if (rtl8211f_reset())\n printf(\"rtl8211e reset fail! \\n\");\n printf(\" after reset: phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n\n /* config interrupt */\n rtl8211f_config_intr();\n\n if (ethMode == ITE_ETH_PCS_LB_10) {\n printf(\" PHY PCS 10 loopback! \\n\\n\");\n //phy_reg_write(0, 0x4100);\n\t\tphy_reg_write(0, 0x4000);\n usleep(20 * 1000);\n } \n else if(ethMode == ITE_ETH_PCS_LB_100) {\n printf(\" PHY PCS 100 loopback! \\n\\n\");\n //phy_reg_write(0, 0x6100);\n\t\tphy_reg_write(0, 0x6000);\n\t\tphy_reg_read(0);\n\t\tprintf(\" phy reg %d = 0x%04X \\n\", phy_reg.reg_num, phy_reg.val_read);\n usleep(20 * 1000);\n }\n else if(ethMode == ITE_ETH_PCS_LB_1000) {\n printf(\" PHY PCS 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x4140);\n usleep(20 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_10) {\n printf(\" PHY MDI 10 loopback! \\n\\n\");\n phy_reg_write(0, 0x0100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_100) {\n printf(\" PHY MDI 100 loopback! \\n\\n\");\n phy_reg_write(0, 0x2100);\n usleep(100 * 1000);\n }\n else if (ethMode == ITE_ETH_MDI_LB_1000) {\n printf(\" PHY MDI 1000 loopback! \\n\\n\");\n phy_reg_write(0, 0x0140);\n usleep(100 * 1000);\n }\n}\n\n#define INTR_JABBER\t\t\t \t0x0400\n#define INTR_ALDPS_STATE_CHANGE\t0x0200\n#define INTR_PME\t\t\t \t0x0080\n#define INTR_PHY_REG_ACCESSIBLE\t0x0020\n#define INTR_LINK_CHG \t 0x0010\n#define INTR_AN_COMPLETE\t 0x0008\n#define INTR_AN_ERROR\t\t 0x0001\n\n/* in interrupt context */\nint rtl8211f_link_change(void)\n{\n uint16_t intr;\n\n\tphy_set_page(0xA43);\n\n intr = phy_reg_read(0x1D);\n\t\n\tphy_set_page(0);\n\n#if 1\n if (intr & INTR_JABBER)\n ithPrintf(\"phy: jabber detected! \\n\");\n if (intr & INTR_ALDPS_STATE_CHANGE)\n ithPrintf(\"phy: ALDPS state changed! \\n\");\n if (intr & INTR_PME)\n ithPrintf(\"phy: WOL event occurred! \\n\");\n if (intr & INTR_PHY_REG_ACCESSIBLE)\n ithPrintf(\"phy: Can access PHY register through MDC/MDIO! \\n\");\n if (intr & INTR_AN_COMPLETE)\n ithPrintf(\"phy: Auto-Negotiation completed! \\n\");\n if (intr & INTR_AN_ERROR)\n ithPrintf(\"phy: auto-negotiation error! \\n\");\n#endif\n if (intr & INTR_LINK_CHG) {\n ithPrintf(\"phy: link change! \\n\");\n return 1;\n }\n\n return 0;\n}\n\n#define PHYSR_FULL_DUPLEX 0x0008\n#define PHYSR_LINK_OK 0x0004\n\n/* return 0 means link up */\nint rtl8211f_read_mode(int* speed, int* duplex)\n{\n uint16_t status = phy_reg_read(0x1A);\n uint16_t _speed = (status & 0x0030) >> 4;\n\n if (!(status & PHYSR_LINK_OK)) {\n ithPrintf(\"phy status reg0x1A = 0x%04X - link not ok! \\n\", status);\n return -1;\n }\n\n if (status & PHYSR_FULL_DUPLEX)\n (*duplex) = DUPLEX_FULL;\n else\n (*duplex) = DUPLEX_HALF;\n\n switch (_speed) {\n default:\n case 0:\n (*speed) = SPEED_10;\n break;\n case 1:\n (*speed) = SPEED_100;\n break;\n case 2:\n (*speed) = SPEED_1000;\n break;\n }\n\n return 0; // 0 means link up\n}\n\n\n/**\n* Check interrupt status for link change. \n* Call from mac driver's internal ISR for phy's interrupt.\n*/\nint(*itpPhyLinkChange)(void) = rtl8211f_link_change;\n/**\n* Replace mac driver's ISR for phy's interrupt. \n*/\nITHGpioIntrHandler itpPhylinkIsr = NULL;\n/**\n* Returns 0 if the device reports link status up/ok \n*/\nint(*itpPhyReadMode)(int* speed, int* duplex) = rtl8211f_read_mode;\n/**\n* Get link status.\n*/\nuint32_t(*itpPhyLinkStatus)(void) = NULL;\n\n\n"}
235
c
/** * Module date */ // Inclure l'interface Date.h #include "date.h" // Inclure les bibliothèques uniquement nécessaire à Date.c #include <stdio.h> #include <math.h> /** */ void initialiser(Date *date){ date->jour = 1; date->nomJour = JEUDI; date->mois = JAN; date->annee = 1970; } void convertir_vers_date(time_t t, Date* date){ struct tm now; localtime_r(&t, &now);//convertion fuseau horaire date->jour = now.tm_mday;//jour date->nomJour = now.tm_wday;//jour de la semaine date->mois = now.tm_mon;//mois date->annee = now.tm_year+1900;//annee (a partir de 1900) } Date date_aujourd_hui(){ time_t t = time(0); // date systeme avec #include <time.h> Date auj; convertir_vers_date(t, &auj); return auj; } void afficher_date(Date d){ printf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee); }
25.75
32
(translation_unit) "/**\n * Module date\n */\n\n// Inclure l'interface Date.h\n#include "date.h"\n\n// Inclure les bibliothèques uniquement nécessaire à Date.c\n#include <stdio.h>\n#include <math.h>\n\n/** */\nvoid initialiser(Date *date){\n date->jour = 1;\n date->nomJour = JEUDI;\n date->mois = JAN;\n date->annee = 1970;\n}\nvoid convertir_vers_date(time_t t, Date* date){\n struct tm now;\n localtime_r(&t, &now);//convertion fuseau horaire\n date->jour = now.tm_mday;//jour\n date->nomJour = now.tm_wday;//jour de la semaine\n date->mois = now.tm_mon;//mois\n date->annee = now.tm_year+1900;//annee (a partir de 1900)\n}\nDate date_aujourd_hui(){\n time_t t = time(0); // date systeme avec #include <time.h>\n Date auj;\n convertir_vers_date(t, &auj);\n return auj;\n}\nvoid afficher_date(Date d){\n printf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee);\n}\n\n" (comment) "/**\n * Module date\n */" (comment) "// Inclure l'interface Date.h" (preproc_include) "#include "date.h"\n" (#include) "#include" (string_literal) ""date.h"" (") """ (string_content) "date.h" (") """ (comment) "// Inclure les bibliothèques uniquement nécessaire à Date.c\n#i" (preproc_include) "clude <stdio.h>\n#in" (#include) "clude <s" (system_lib_string) "dio.h>\n#i" (preproc_include) "clude <math.h>\n\n/*" (#include) "clude <m" (system_lib_string) "th.h>\n\n/" (comment) " */\nvo" (function_definition) "d initialiser(Date *date){\n date->jour = 1;\n date->nomJour = JEUDI;\n date->mois = JAN;\n date->annee = 1970;\n}\nvo" (primitive_type) "d in" (function_declarator) "tialiser(Date *date){\n " (identifier) "tialiser(Da" (parameter_list) "te *date){\n " (() "t" (parameter_declaration) "e *date){\n" (type_identifier) "e *d" (pointer_declarator) "te){\n" (*) "t" (identifier) "e){\n" ()) " " (compound_statement) " date->jour = 1;\n date->nomJour = JEUDI;\n date->mois = JAN;\n date->annee = 1970;\n}\nvo" ({) " " (expression_statement) "e->jour = 1;\n " (assignment_expression) "e->jour = 1;\n " (field_expression) "e->jour = " (identifier) "e->j" (->) "ou" (field_identifier) "r = " (=) ";" (number_literal) " " (;) " " (expression_statement) "e->nomJour = JEUDI;\n " (assignment_expression) "e->nomJour = JEUDI;\n " (field_expression) "e->nomJour = " (identifier) "e->n" (->) "om" (field_identifier) "Jour = " (=) "E" (identifier) "DI;\n " (;) " " (expression_statement) "e->mois = JAN;\n " (assignment_expression) "e->mois = JAN;\n " (field_expression) "e->mois = " (identifier) "e->m" (->) "oi" (field_identifier) "s = " (=) "A" (identifier) ";\n " (;) " " (expression_statement) "e->annee = 1970;\n}\n" (assignment_expression) "e->annee = 1970;\n}" (field_expression) "e->annee = " (identifier) "e->a" (->) "nn" (field_identifier) "ee = " (=) "9" (number_literal) "0;\n}" (;) "\n" (}) "o" (function_definition) "d convertir_vers_date(time_t t, Date* date){\n struct tm now;\n localtime_r(&t, &now);//convertion fuseau horaire\n date->jour = now.tm_mday;//jour\n date->nomJour = now.tm_wday;//jour de la semaine\n date->mois = now.tm_mon;//mois\n date->annee = now.tm_year+1900;//annee (a partir de 1900)\n}\nDa" (primitive_type) "d co" (function_declarator) "vertir_vers_date(time_t t, Date* date){\n " (identifier) "vertir_vers_date(ti" (parameter_list) "me_t t, Date* date){\n " (() "m" (parameter_declaration) "e_t t, D" (type_identifier) "e_t t," (identifier) "D" (,) "a" (parameter_declaration) "e* date){\n" (type_identifier) "e* d" (pointer_declarator) "ate){\n" (*) "a" (identifier) "e){\n" ()) " " (compound_statement) " struct tm now;\n localtime_r(&t, &now);//convertion fuseau horaire\n date->jour = now.tm_mday;//jour\n date->nomJour = now.tm_wday;//jour de la semaine\n date->mois = now.tm_mon;//mois\n date->annee = now.tm_year+1900;//annee (a partir de 1900)\n}\nDa" ({) " " (declaration) "uct tm now;\n " (struct_specifier) "uct tm no" (struct) "uct tm" (type_identifier) "no" (identifier) ";\n " (;) " " (expression_statement) "altime_r(&t, &now);//c" (call_expression) "altime_r(&t, &now);//" (identifier) "altime_r(&t" (argument_list) ", &now);//" (() "," (pointer_expression) " &" (&) " " (identifier) "&" (,) "n" (pointer_expression) "w);/" (&) "w" (identifier) ");/" ()) "/" (;) "c" (comment) "onvertion fuseau horaire\n " (expression_statement) "e->jour = now.tm_mday;//j" (assignment_expression) "e->jour = now.tm_mday;//" (field_expression) "e->jour = " (identifier) "e->j" (->) "ou" (field_identifier) "r = " (=) "o" (field_expression) ".tm_mday;//" (identifier) ".tm" (.) "_" (field_identifier) "mday;//" (;) "j" (comment) "our\n " (expression_statement) "e->nomJour = now.tm_wday;//j" (assignment_expression) "e->nomJour = now.tm_wday;//" (field_expression) "e->nomJour = " (identifier) "e->n" (->) "om" (field_identifier) "Jour = " (=) "o" (field_expression) ".tm_wday;//" (identifier) ".tm" (.) "_" (field_identifier) "wday;//" (;) "j" (comment) "our de la semaine\n " (expression_statement) "e->mois = now.tm_mon;//m" (assignment_expression) "e->mois = now.tm_mon;//" (field_expression) "e->mois = " (identifier) "e->m" (->) "oi" (field_identifier) "s = " (=) "o" (field_expression) ".tm_mon;//" (identifier) ".tm" (.) "_" (field_identifier) "mon;//" (;) "m" (comment) "ois\n " (expression_statement) "e->annee = now.tm_year+1900;//a" (assignment_expression) "e->annee = now.tm_year+1900;//" (field_expression) "e->annee = " (identifier) "e->a" (->) "nn" (field_identifier) "ee = " (=) "o" (binary_expression) ".tm_year+1900;//" (field_expression) ".tm_year+19" (identifier) ".tm" (.) "_" (field_identifier) "year+19" (+) "0" (number_literal) "0;//" (;) "a" (comment) "nnee (a partir de 1900)\n}\n" (}) "a" (function_definition) "e date_aujourd_hui(){\n time_t t = time(0); // date systeme avec #include <time.h>\n Date auj;\n convertir_vers_date(t, &auj);\n return auj;\n}\nvo" (type_identifier) "e da" (function_declarator) "e_aujourd_hui(){\n " (identifier) "e_aujourd_hui(){" (parameter_list) "\n " (() "\n" ()) " " (compound_statement) " time_t t = time(0); // date systeme avec #include <time.h>\n Date auj;\n convertir_vers_date(t, &auj);\n return auj;\n}\nvo" ({) " " (declaration) "e_t t = time(0); " (type_identifier) "e_t t " (init_declarator) " time(0); " (identifier) " " (=) "i" (call_expression) "e(0); " (identifier) "e(0)" (argument_list) "; " (() ";" (number_literal) " " ()) " " (;) " " (comment) "date systeme avec #include <time.h>\n " (declaration) "e auj;\n " (type_identifier) "e au" (identifier) ";\n " (;) " " (expression_statement) "vertir_vers_date(t, &auj);\n " (call_expression) "vertir_vers_date(t, &auj);\n " (identifier) "vertir_vers_date(t," (argument_list) " &auj);\n " (() " " (identifier) "&" (,) "a" (pointer_expression) "j);\n" (&) "j" (identifier) ");\n" ()) " " (;) " " (return_statement) "urn auj;\n}\n" (return) "urn au" (identifier) ";\n}" (;) "\n" (}) "o" (function_definition) "d afficher_date(Date d){\n printf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee);\n}\n\n" (primitive_type) "d af" (function_declarator) "icher_date(Date d){\n " (identifier) "icher_date(Da" (parameter_list) "te d){\n " (() "t" (parameter_declaration) "e d){\n" (type_identifier) "e d)" (identifier) "\n" ()) " " (compound_statement) " printf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee);\n}\n\n" ({) " " (expression_statement) "ntf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee);\n}\n" (call_expression) "ntf("Date %i/%i/%i \n",d.jour, (d.mois+1), d.annee);\n}" (identifier) "ntf("D" (argument_list) "ate %i/%i/%i \n",d.jour, (d.mois+1), d.annee);\n}" (() "a" (string_literal) "te %i/%i/%i \n",d." (") "t" (string_content) "e %i/%i/%i \n"" (escape_sequence) ",d" (") "." (,) "j" (field_expression) "our, (" (identifier) "o" (.) "u" (field_identifier) "r, (" (,) "d" (parenthesized_expression) "mois+1), d" (() "m" (binary_expression) "ois+1), " (field_expression) "ois+1)" (identifier) "o" (.) "i" (field_identifier) "s+1)" (+) "," (number_literal) " " ()) "d" (,) "." (field_expression) "nnee);\n" (identifier) "n" (.) "n" (field_identifier) "ee);\n" ()) "}" (;) "\n" (}) ""
252
0
{"language": "c", "success": true, "metadata": {"lines": 32, "avg_line_length": 25.75, "nodes": 156, "errors": 0, "source_hash": "f46510694e5f04f5e940611b1fba9d8846825e2c9da31ed2e817302e29908241", "categorized_nodes": 120}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"date.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"date.h\"", "parent": 0, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "clude <stdio.h>\n#in", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#include", "text": "clude <s", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "dio.h>\n#i", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "clude <math.h>\n\n/*", "parent": null, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "clude <m", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "th.h>\n\n/", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 17}}, {"id": 9, "type": "function_definition", "text": "d initialiser(Date *date){\n date->jour = 1;\n date->nomJour = JEUDI;\n date->mois = JAN;\n date->annee = 1970;\n}\nvo", "parent": null, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "d in", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "tialiser(Date *date){\n ", "parent": 9, "children": [12, 13], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 28}}, {"id": 12, "type": "identifier", "text": "tialiser(Da", "parent": 11, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 16}}, {"id": 13, "type": "parameter_list", "text": "te *date){\n ", "parent": 11, "children": [14], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 28}}, {"id": 14, "type": "parameter_declaration", "text": "e *date){\n", "parent": 13, "children": [15, 16], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 27}}, {"id": 15, "type": "type_identifier", "text": "e *d", "parent": 14, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 21}}, {"id": 16, "type": "pointer_declarator", "text": "te){\n", "parent": 14, "children": [17, 18], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 27}}, {"id": 17, "type": "*", "text": "t", "parent": 16, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 23}}, {"id": 18, "type": "identifier", "text": "e){\n", "parent": 16, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 27}}, {"id": 19, "type": "assignment_expression", "text": "e->jour = 1;\n ", "parent": 9, "children": [20, 24], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 18}}, {"id": 20, "type": "field_expression", "text": "e->jour = ", "parent": 19, "children": [21, 22, 23], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 14}}, {"id": 21, "type": "identifier", "text": "e->j", "parent": 20, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 8}}, {"id": 22, "type": "->", "text": "ou", "parent": 20, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 10}}, {"id": 23, "type": "field_identifier", "text": "r = ", "parent": 20, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 14}}, {"id": 24, "type": "number_literal", "text": " ", "parent": 19, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 18}}, {"id": 25, "type": "assignment_expression", "text": "e->nomJour = JEUDI;\n ", "parent": 9, "children": [26, 30, 31], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 25}}, {"id": 26, "type": "field_expression", "text": "e->nomJour = ", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 27, "type": "identifier", "text": "e->n", "parent": 26, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 28, "type": "->", "text": "om", "parent": 26, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 10}}, {"id": 29, "type": "field_identifier", "text": "Jour = ", "parent": 26, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 17}}, {"id": 30, "type": "=", "text": "E", "parent": 25, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 19}}, {"id": 31, "type": "identifier", "text": "DI;\n ", "parent": 25, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 25}}, {"id": 32, "type": "assignment_expression", "text": "e->mois = JAN;\n ", "parent": 9, "children": [33, 37], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 20}}, {"id": 33, "type": "field_expression", "text": "e->mois = ", "parent": 32, "children": [34, 35, 36], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 14}}, {"id": 34, "type": "identifier", "text": "e->m", "parent": 33, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 8}}, {"id": 35, "type": "->", "text": "oi", "parent": 33, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 10}}, {"id": 36, "type": "field_identifier", "text": "s = ", "parent": 33, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 37, "type": "=", "text": "A", "parent": 32, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 38, "type": "assignment_expression", "text": "e->annee = 1970;\n}", "parent": 9, "children": [39, 43, 44], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 22}}, {"id": 39, "type": "field_expression", "text": "e->annee = ", "parent": 38, "children": [40, 41, 42], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 15}}, {"id": 40, "type": "identifier", "text": "e->a", "parent": 39, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 8}}, {"id": 41, "type": "->", "text": "nn", "parent": 39, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 10}}, {"id": 42, "type": "field_identifier", "text": "ee = ", "parent": 39, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 15}}, {"id": 43, "type": "=", "text": "9", "parent": 38, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 17}}, {"id": 44, "type": "number_literal", "text": "0;\n}", "parent": 38, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 22}}, {"id": 45, "type": "function_definition", "text": "d convertir_vers_date(time_t t, Date* date){\n struct tm now;\n localtime_r(&t, &now);//convertion fuseau horaire\n date->jour = now.tm_mday;//jour\n date->nomJour = now.tm_wday;//jour de la semaine\n date->mois = now.tm_mon;//mois\n date->annee = now.tm_year+1900;//annee (a partir de 1900)\n}\nDa", "parent": null, "children": [46, 47], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 46, "type": "primitive_type", "text": "d co", "parent": 45, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 47, "type": "function_declarator", "text": "vertir_vers_date(time_t t, Date* date){\n ", "parent": 45, "children": [48, 49], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 46}}, {"id": 48, "type": "identifier", "text": "vertir_vers_date(ti", "parent": 47, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 24}}, {"id": 49, "type": "parameter_list", "text": "me_t t, Date* date){\n ", "parent": 47, "children": [50, 53], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 46}}, {"id": 50, "type": "parameter_declaration", "text": "e_t t, D", "parent": 49, "children": [51, 52], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 33}}, {"id": 51, "type": "type_identifier", "text": "e_t t,", "parent": 50, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 31}}, {"id": 52, "type": "identifier", "text": "D", "parent": 50, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 33}}, {"id": 53, "type": "parameter_declaration", "text": "e* date){\n", "parent": 49, "children": [54, 55], "start_point": {"row": 18, "column": 35}, "end_point": {"row": 18, "column": 45}}, {"id": 54, "type": "type_identifier", "text": "e* d", "parent": 53, "children": [], "start_point": {"row": 18, "column": 35}, "end_point": {"row": 18, "column": 39}}, {"id": 55, "type": "pointer_declarator", "text": "ate){\n", "parent": 53, "children": [56, 57], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 45}}, {"id": 56, "type": "*", "text": "a", "parent": 55, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 40}}, {"id": 57, "type": "identifier", "text": "e){\n", "parent": 55, "children": [], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 45}}, {"id": 58, "type": "declaration", "text": "uct tm now;\n ", "parent": 45, "children": [59], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 18}}, {"id": 59, "type": "struct_specifier", "text": "uct tm no", "parent": 58, "children": [60, 61], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 13}}, {"id": 60, "type": "struct", "text": "uct tm", "parent": 59, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 61, "type": "type_identifier", "text": "no", "parent": 59, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 13}}, {"id": 62, "type": "call_expression", "text": "altime_r(&t, &now);//", "parent": 45, "children": [63, 64], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 25}}, {"id": 63, "type": "identifier", "text": "altime_r(&t", "parent": 62, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 15}}, {"id": 64, "type": "argument_list", "text": ", &now);//", "parent": 62, "children": [66], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 25}}, {"id": 65, "type": "&", "text": " ", "parent": 64, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 17}}, {"id": 66, "type": "pointer_expression", "text": "w);/", "parent": 64, "children": [67, 68], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 24}}, {"id": 67, "type": "&", "text": "w", "parent": 66, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 21}}, {"id": 68, "type": "identifier", "text": ");/", "parent": 66, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 24}}, {"id": 69, "type": "assignment_expression", "text": "e->jour = now.tm_mday;//", "parent": 45, "children": [70, 74, 75], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 28}}, {"id": 70, "type": "field_expression", "text": "e->jour = ", "parent": 69, "children": [71, 72, 73], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 14}}, {"id": 71, "type": "identifier", "text": "e->j", "parent": 70, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 72, "type": "->", "text": "ou", "parent": 70, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 10}}, {"id": 73, "type": "field_identifier", "text": "r = ", "parent": 70, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 14}}, {"id": 74, "type": "=", "text": "o", "parent": 69, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 75, "type": "field_expression", "text": ".tm_mday;//", "parent": 69, "children": [76, 77], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 28}}, {"id": 76, "type": "identifier", "text": ".tm", "parent": 75, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 20}}, {"id": 77, "type": "field_identifier", "text": "mday;//", "parent": 75, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 28}}, {"id": 78, "type": "assignment_expression", "text": "e->nomJour = now.tm_wday;//", "parent": 45, "children": [79, 83, 84], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 31}}, {"id": 79, "type": "field_expression", "text": "e->nomJour = ", "parent": 78, "children": [80, 81, 82], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 17}}, {"id": 80, "type": "identifier", "text": "e->n", "parent": 79, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 8}}, {"id": 81, "type": "->", "text": "om", "parent": 79, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 10}}, {"id": 82, "type": "field_identifier", "text": "Jour = ", "parent": 79, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 17}}, {"id": 83, "type": "=", "text": "o", "parent": 78, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 19}}, {"id": 84, "type": "field_expression", "text": ".tm_wday;//", "parent": 78, "children": [85, 86], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 31}}, {"id": 85, "type": "identifier", "text": ".tm", "parent": 84, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 23}}, {"id": 86, "type": "field_identifier", "text": "wday;//", "parent": 84, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 31}}, {"id": 87, "type": "assignment_expression", "text": "e->mois = now.tm_mon;//", "parent": 45, "children": [88, 92, 93], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 27}}, {"id": 88, "type": "field_expression", "text": "e->mois = ", "parent": 87, "children": [89, 90, 91], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 14}}, {"id": 89, "type": "identifier", "text": "e->m", "parent": 88, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 90, "type": "->", "text": "oi", "parent": 88, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 10}}, {"id": 91, "type": "field_identifier", "text": "s = ", "parent": 88, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 14}}, {"id": 92, "type": "=", "text": "o", "parent": 87, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 16}}, {"id": 93, "type": "field_expression", "text": ".tm_mon;//", "parent": 87, "children": [94, 95], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 27}}, {"id": 94, "type": "identifier", "text": ".tm", "parent": 93, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 20}}, {"id": 95, "type": "field_identifier", "text": "mon;//", "parent": 93, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 27}}, {"id": 96, "type": "assignment_expression", "text": "e->annee = now.tm_year+1900;//", "parent": 45, "children": [97, 101, 102], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 34}}, {"id": 97, "type": "field_expression", "text": "e->annee = ", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 15}}, {"id": 98, "type": "identifier", "text": "e->a", "parent": 97, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 8}}, {"id": 99, "type": "->", "text": "nn", "parent": 97, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 10}}, {"id": 100, "type": "field_identifier", "text": "ee = ", "parent": 97, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 15}}, {"id": 101, "type": "=", "text": "o", "parent": 96, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 17}}, {"id": 102, "type": "binary_expression", "text": ".tm_year+1900;//", "parent": 96, "children": [103, 106, 107], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 34}}, {"id": 103, "type": "field_expression", "text": ".tm_year+19", "parent": 102, "children": [104, 105], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 29}}, {"id": 104, "type": "identifier", "text": ".tm", "parent": 103, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 21}}, {"id": 105, "type": "field_identifier", "text": "year+19", "parent": 103, "children": [], "start_point": {"row": 24, "column": 22}, "end_point": {"row": 24, "column": 29}}, {"id": 106, "type": "+", "text": "0", "parent": 102, "children": [], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 30}}, {"id": 107, "type": "number_literal", "text": "0;//", "parent": 102, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 34}}, {"id": 108, "type": "function_definition", "text": "e date_aujourd_hui(){\n time_t t = time(0); // date systeme avec #include <time.h>\n Date auj;\n convertir_vers_date(t, &auj);\n return auj;\n}\nvo", "parent": null, "children": [109, 110], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 109, "type": "type_identifier", "text": "e da", "parent": 108, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 4}}, {"id": 110, "type": "function_declarator", "text": "e_aujourd_hui(){\n ", "parent": 108, "children": [111, 112], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 23}}, {"id": 111, "type": "identifier", "text": "e_aujourd_hui(){", "parent": 110, "children": [], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 21}}, {"id": 112, "type": "parameter_list", "text": "\n ", "parent": 110, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 23}}, {"id": 113, "type": "declaration", "text": "e_t t = time(0); ", "parent": 108, "children": [114, 115], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 23}}, {"id": 114, "type": "type_identifier", "text": "e_t t ", "parent": 113, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 115, "type": "init_declarator", "text": " time(0); ", "parent": 113, "children": [116, 117, 118], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 22}}, {"id": 116, "type": "identifier", "text": " ", "parent": 115, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}, {"id": 117, "type": "=", "text": "i", "parent": 115, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 14}}, {"id": 118, "type": "call_expression", "text": "e(0); ", "parent": 115, "children": [119], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 22}}, {"id": 119, "type": "identifier", "text": "e(0)", "parent": 118, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 19}}, {"id": 120, "type": "number_literal", "text": " ", "parent": 118, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 21}}, {"id": 121, "type": "declaration", "text": "e auj;\n ", "parent": 108, "children": [122], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 13}}, {"id": 122, "type": "type_identifier", "text": "e au", "parent": 121, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 123, "type": "call_expression", "text": "vertir_vers_date(t, &auj);\n ", "parent": 108, "children": [124, 125], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 32}}, {"id": 124, "type": "identifier", "text": "vertir_vers_date(t,", "parent": 123, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 23}}, {"id": 125, "type": "argument_list", "text": " &auj);\n ", "parent": 123, "children": [126], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 32}}, {"id": 126, "type": "pointer_expression", "text": "j);\n", "parent": 125, "children": [127, 128], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 31}}, {"id": 127, "type": "&", "text": "j", "parent": 126, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 28}}, {"id": 128, "type": "identifier", "text": ");\n", "parent": 126, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 31}}, {"id": 129, "type": "return_statement", "text": "urn auj;\n}\n", "parent": 108, "children": [130], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 15}}, {"id": 130, "type": "identifier", "text": ";\n}", "parent": 129, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 14}}, {"id": 131, "type": "function_definition", "text": "d afficher_date(Date d){\n printf(\"Date %i/%i/%i \\n\",d.jour, (d.mois+1), d.annee);\n}\n\n", "parent": null, "children": [132, 133], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 132, "type": "primitive_type", "text": "d af", "parent": 131, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 4}}, {"id": 133, "type": "function_declarator", "text": "icher_date(Date d){\n ", "parent": 131, "children": [134, 135], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 26}}, {"id": 134, "type": "identifier", "text": "icher_date(Da", "parent": 133, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 18}}, {"id": 135, "type": "parameter_list", "text": "te d){\n ", "parent": 133, "children": [136], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 26}}, {"id": 136, "type": "parameter_declaration", "text": "e d){\n", "parent": 135, "children": [137, 138], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 25}}, {"id": 137, "type": "type_identifier", "text": "e d)", "parent": 136, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 23}}, {"id": 138, "type": "identifier", "text": "\n", "parent": 136, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 25}}, {"id": 139, "type": "call_expression", "text": "ntf(\"Date %i/%i/%i \\n\",d.jour, (d.mois+1), d.annee);\n}", "parent": 131, "children": [140, 141], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 58}}, {"id": 140, "type": "identifier", "text": "ntf(\"D", "parent": 139, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 141, "type": "argument_list", "text": "ate %i/%i/%i \\n\",d.jour, (d.mois+1), d.annee);\n}", "parent": 139, "children": [142, 144, 147, 153], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 58}}, {"id": 142, "type": "string_literal", "text": "te %i/%i/%i \\n\",d.", "parent": 141, "children": [143], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 29}}, {"id": 143, "type": "escape_sequence", "text": ",d", "parent": 142, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 28}}, {"id": 144, "type": "field_expression", "text": "our, (", "parent": 141, "children": [145, 146], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 36}}, {"id": 145, "type": "identifier", "text": "o", "parent": 144, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 31}}, {"id": 146, "type": "field_identifier", "text": "r, (", "parent": 144, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 36}}, {"id": 147, "type": "parenthesized_expression", "text": "mois+1), d", "parent": 141, "children": [148], "start_point": {"row": 33, "column": 38}, "end_point": {"row": 33, "column": 48}}, {"id": 148, "type": "binary_expression", "text": "ois+1), ", "parent": 147, "children": [149, 152], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 47}}, {"id": 149, "type": "field_expression", "text": "ois+1)", "parent": 148, "children": [150, 151], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 45}}, {"id": 150, "type": "identifier", "text": "o", "parent": 149, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 33, "column": 40}}, {"id": 151, "type": "field_identifier", "text": "s+1)", "parent": 149, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 45}}, {"id": 152, "type": "number_literal", "text": " ", "parent": 148, "children": [], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 47}}, {"id": 153, "type": "field_expression", "text": "nnee);\n", "parent": 141, "children": [154, 155], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 57}}, {"id": 154, "type": "identifier", "text": "n", "parent": 153, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 51}}, {"id": 155, "type": "field_identifier", "text": "ee);\n", "parent": 153, "children": [], "start_point": {"row": 33, "column": 52}, "end_point": {"row": 33, "column": 57}}]}, "node_categories": {"declarations": {"functions": [9, 11, 45, 47, 108, 110, 131, 133], "variables": [14, 50, 53, 58, 113, 121, 136], "classes": [59, 60], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [20, 26, 33, 39, 62, 66, 70, 75, 79, 84, 88, 93, 97, 102, 103, 118, 123, 126, 139, 144, 147, 148, 149, 153], "assignments": [19, 25, 32, 38, 69, 78, 87, 96], "loops": [], "conditionals": [12, 15, 18, 21, 23, 27, 29, 31, 34, 36, 40, 42, 48, 51, 52, 54, 57, 61, 63, 68, 71, 73, 76, 77, 80, 82, 85, 86, 89, 91, 94, 95, 98, 100, 104, 105, 109, 111, 114, 116, 119, 122, 124, 128, 130, 134, 137, 138, 140, 145, 146, 150, 151, 154, 155], "returns": [129], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 24, 44, 107, 120, 142, 152], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "d initialiser(Date *date){\n date->jour = 1;\n date->nomJour = JEUDI;\n date->mois = JAN;\n "}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "tialiser(Date *date){\n "}, {"node_id": 45, "universal_type": "function", "name": "tm", "text_snippet": "d convertir_vers_date(time_t t, Date* date){\n struct tm now;\n localtime_r(&t, &now);//converti"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "vertir_vers_date(time_t t, Date* date){\n "}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "e date_aujourd_hui(){\n time_t t = time(0); // date systeme avec #include <time.h>\n Date auj;"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "e_aujourd_hui(){\n "}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "d afficher_date(Date d){\n printf(\"Date %i/%i/%i \\n\",d.jour, (d.mois+1), d.annee);\n}\n\n"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "icher_date(Date d){\n "}], "class_declarations": [{"node_id": 59, "universal_type": "class", "name": "unknown", "text_snippet": "uct tm no"}, {"node_id": 60, "universal_type": "class", "name": "unknown", "text_snippet": "uct tm"}], "import_statements": [{"node_id": 0, "text": "#include \"date.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "clude <stdio.h>\n#in"}, {"node_id": 4, "text": "clude <s"}, {"node_id": 6, "text": "clude <math.h>\n\n/*"}, {"node_id": 7, "text": "clude <m"}]}, "original_source_code": "/**\n * Module date\n */\n\n// Inclure l'interface Date.h\n#include \"date.h\"\n\n// Inclure les biblioth\u00e8ques uniquement n\u00e9cessaire \u00e0 Date.c\n#include <stdio.h>\n#include <math.h>\n\n/** */\nvoid initialiser(Date *date){\n date->jour = 1;\n date->nomJour = JEUDI;\n date->mois = JAN;\n date->annee = 1970;\n}\nvoid convertir_vers_date(time_t t, Date* date){\n struct tm now;\n localtime_r(&t, &now);//convertion fuseau horaire\n date->jour = now.tm_mday;//jour\n date->nomJour = now.tm_wday;//jour de la semaine\n date->mois = now.tm_mon;//mois\n date->annee = now.tm_year+1900;//annee (a partir de 1900)\n}\nDate date_aujourd_hui(){\n time_t t = time(0); // date systeme avec #include <time.h>\n Date auj;\n convertir_vers_date(t, &auj);\n return auj;\n}\nvoid afficher_date(Date d){\n printf(\"Date %i/%i/%i \\n\",d.jour, (d.mois+1), d.annee);\n}\n\n"}
236
c
/* * Copyright 2008-2019, Marvell International Ltd. * All Rights Reserved. * * Derived from: * http://www.kernel.org/pub/linux/libs/klibc/ */ /* * strcat.c */ #include <string.h> char *strcat(char *dst, const char *src) { strcpy(strchr(dst, '\0'), src); return dst; }
15.56
18
(translation_unit) "/* \n * Copyright 2008-2019, Marvell International Ltd. \n * All Rights Reserved. \n * \n * Derived from: \n * http://www.kernel.org/pub/linux/libs/klibc/ \n */ \n/* \n * strcat.c \n */ \n \n#include <string.h> \n \nchar *strcat(char *dst, const char *src) \n{ \n strcpy(strchr(dst, '\0'), src); \n return dst; \n} \n" (comment) "/* \n * Copyright 2008-2019, Marvell International Ltd. \n * All Rights Reserved. \n * \n * Derived from: \n * http://www.kernel.org/pub/linux/libs/klibc/ \n */" (comment) "/* \n * strcat.c \n */" (preproc_include) "#include <string.h> \n" (#include) "#include" (system_lib_string) "<string.h>" (function_definition) "char *strcat(char *dst, const char *src) \n{ \n strcpy(strchr(dst, '\0'), src); \n return dst; \n}" (primitive_type) "char" (pointer_declarator) "*strcat(char *dst, const char *src)" (*) "*" (function_declarator) "strcat(char *dst, const char *src)" (identifier) "strcat" (parameter_list) "(char *dst, const char *src)" (() "(" (parameter_declaration) "char *dst" (primitive_type) "char" (pointer_declarator) "*dst" (*) "*" (identifier) "dst" (,) "," (parameter_declaration) "const char *src" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*src" (*) "*" (identifier) "src" ()) ")" (compound_statement) "{ \n strcpy(strchr(dst, '\0'), src); \n return dst; \n}" ({) "{" (expression_statement) "strcpy(strchr(dst, '\0'), src);" (call_expression) "strcpy(strchr(dst, '\0'), src)" (identifier) "strcpy" (argument_list) "(strchr(dst, '\0'), src)" (() "(" (call_expression) "strchr(dst, '\0')" (identifier) "strchr" (argument_list) "(dst, '\0')" (() "(" (identifier) "dst" (,) "," (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" ()) ")" (,) "," (identifier) "src" ()) ")" (;) ";" (return_statement) "return dst;" (return) "return" (identifier) "dst" (;) ";" (}) "}"
55
0
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 15.56, "nodes": 34, "errors": 0, "source_hash": "0a686c746e2d5c1fa090fd459d928ba21e15aee2d3c3418cce0d4b6a5c695478", "categorized_nodes": 19}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <string.h>\r\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": "<string.h>", "parent": 0, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 3, "type": "function_definition", "text": "char *strcat(char *dst, const char *src)\r\n{\r\n\tstrcpy(strchr(dst, '\\0'), src);\r\n\treturn dst;\r\n}", "parent": null, "children": [4, 5], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "char", "parent": 3, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 5, "type": "pointer_declarator", "text": "*strcat(char *dst, const char *src)", "parent": 3, "children": [6, 7], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 40}}, {"id": 6, "type": "*", "text": "*", "parent": 5, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 6}}, {"id": 7, "type": "function_declarator", "text": "strcat(char *dst, const char *src)", "parent": 5, "children": [8, 9], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 40}}, {"id": 8, "type": "identifier", "text": "strcat", "parent": 7, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 12}}, {"id": 9, "type": "parameter_list", "text": "(char *dst, const char *src)", "parent": 7, "children": [10, 15], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 40}}, {"id": 10, "type": "parameter_declaration", "text": "char *dst", "parent": 9, "children": [11, 12], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 22}}, {"id": 11, "type": "primitive_type", "text": "char", "parent": 10, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 17}}, {"id": 12, "type": "pointer_declarator", "text": "*dst", "parent": 10, "children": [13, 14], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 22}}, {"id": 13, "type": "*", "text": "*", "parent": 12, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 19}}, {"id": 14, "type": "identifier", "text": "dst", "parent": 12, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 22}}, {"id": 15, "type": "parameter_declaration", "text": "const char *src", "parent": 9, "children": [16, 17], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 39}}, {"id": 16, "type": "primitive_type", "text": "char", "parent": 15, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 34}}, {"id": 17, "type": "pointer_declarator", "text": "*src", "parent": 15, "children": [18, 19], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 39}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 36}}, {"id": 19, "type": "identifier", "text": "src", "parent": 17, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 39}}, {"id": 20, "type": "call_expression", "text": "strcpy(strchr(dst, '\\0'), src)", "parent": 3, "children": [21, 22], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 31}}, {"id": 21, "type": "identifier", "text": "strcpy", "parent": 20, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 7}}, {"id": 22, "type": "argument_list", "text": "(strchr(dst, '\\0'), src)", "parent": 20, "children": [23, 31], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 31}}, {"id": 23, "type": "call_expression", "text": "strchr(dst, '\\0')", "parent": 22, "children": [24, 25], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 25}}, {"id": 24, "type": "identifier", "text": "strchr", "parent": 23, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 14}}, {"id": 25, "type": "argument_list", "text": "(dst, '\\0')", "parent": 23, "children": [26, 27], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 25}}, {"id": 26, "type": "identifier", "text": "dst", "parent": 25, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 18}}, {"id": 27, "type": "char_literal", "text": "'\\0'", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 24}}, {"id": 28, "type": "'", "text": "'", "parent": 27, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 21}}, {"id": 29, "type": "escape_sequence", "text": "\\0", "parent": 27, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 23}}, {"id": 30, "type": "'", "text": "'", "parent": 27, "children": [], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 24}}, {"id": 31, "type": "identifier", "text": "src", "parent": 22, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 30}}, {"id": 32, "type": "return_statement", "text": "return dst;", "parent": 3, "children": [33], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 12}}, {"id": 33, "type": "identifier", "text": "dst", "parent": 32, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 11}}]}, "node_categories": {"declarations": {"functions": [3, 7], "variables": [10, 15], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [20, 23], "assignments": [], "loops": [], "conditionals": [8, 14, 19, 21, 24, 26, 31, 33], "returns": [32], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 27], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "char *strcat(char *dst, const char *src)\r\n{\r\n\tstrcpy(strchr(dst, '\\0'), src);\r\n\treturn dst;\r\n}"}, {"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "strcat(char *dst, const char *src)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <string.h>\r\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\r\n * Copyright 2008-2019, Marvell International Ltd.\r\n * All Rights Reserved.\r\n *\r\n * Derived from:\r\n * http://www.kernel.org/pub/linux/libs/klibc/\r\n */\r\n/*\r\n * strcat.c\r\n */\r\n\r\n#include <string.h>\r\n\r\nchar *strcat(char *dst, const char *src)\r\n{\r\n\tstrcpy(strchr(dst, '\\0'), src);\r\n\treturn dst;\r\n}\r\n"}
237
c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include"CStack.h" #include<ctype.h> int priority(char i){ if(i == '(') return 0; else if(i == '+' || i == '-') return 1; else if(i == '*' || i == '/') return 2; } void infixToPostfix(char arr[]){ char *i,x; Stack *top = NULL; i = arr; while(*i!='\0'){ if(isalnum(*i)) printf("%c",*i); else if(*i == '('){ top = pushC(top, *i); } else if(*i == ')'){ while(top->data != '('){ printf("%c",top->data); top = pop(top); } top = pop(top); } else{ while(top!=NULL && priority(top->data) >= priority(*i)){ printf("%c",top->data); top = pop(top); } top = pushC(top, *i); } i++; } while(top!=NULL){ printf("%c",top->data); top = pop(top); } } void main(){ char arr[100]; printf("Enter function: "); scanf("%[^\n]",arr); infixToPostfix(arr); }
21.2
50
(translation_unit) "#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include"CStack.h"\n#include<ctype.h>\nint priority(char i){\n if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;\n}\nvoid infixToPostfix(char arr[]){\n char *i,x;\n Stack *top = NULL;\n i = arr;\n while(*i!='\0'){\n if(isalnum(*i))\n printf("%c",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }\n while(top!=NULL){\n printf("%c",top->data);\n top = pop(top);\n }\n}\nvoid main(){\n char arr[100];\n printf("Enter function: ");\n scanf("%[^\n]",arr);\n infixToPostfix(arr);\n}\n" (preproc_include) "#include<stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include<stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include<string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include"CStack.h"\n" (#include) "#include" (string_literal) ""CStack.h"" (") """ (string_content) "CStack.h" (") """ (preproc_include) "#include<ctype.h>\n" (#include) "#include" (system_lib_string) "<ctype.h>" (function_definition) "int priority(char i){\n if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;\n}" (primitive_type) "int" (function_declarator) "priority(char i)" (identifier) "priority" (parameter_list) "(char i)" (() "(" (parameter_declaration) "char i" (primitive_type) "char" (identifier) "i" ()) ")" (compound_statement) "{\n if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;\n}" ({) "{" (if_statement) "if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;" (if) "if" (parenthesized_expression) "(i == '(')" (() "(" (binary_expression) "i == '('" (identifier) "i" (==) "==" (char_literal) "'('" (') "'" (character) "(" (') "'" ()) ")" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (else_clause) "else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;" (else) "else" (if_statement) "if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;" (if) "if" (parenthesized_expression) "(i == '+' || i == '-')" (() "(" (binary_expression) "i == '+' || i == '-'" (binary_expression) "i == '+'" (identifier) "i" (==) "==" (char_literal) "'+'" (') "'" (character) "+" (') "'" (||) "||" (binary_expression) "i == '-'" (identifier) "i" (==) "==" (char_literal) "'-'" (') "'" (character) "-" (') "'" ()) ")" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (else_clause) "else if(i == '*' || i == '/')\n return 2;" (else) "else" (if_statement) "if(i == '*' || i == '/')\n return 2;" (if) "if" (parenthesized_expression) "(i == '*' || i == '/')" (() "(" (binary_expression) "i == '*' || i == '/'" (binary_expression) "i == '*'" (identifier) "i" (==) "==" (char_literal) "'*'" (') "'" (character) "*" (') "'" (||) "||" (binary_expression) "i == '/'" (identifier) "i" (==) "==" (char_literal) "'/'" (') "'" (character) "/" (') "'" ()) ")" (return_statement) "return 2;" (return) "return" (number_literal) "2" (;) ";" (}) "}" (function_definition) "void infixToPostfix(char arr[]){\n char *i,x;\n Stack *top = NULL;\n i = arr;\n while(*i!='\0'){\n if(isalnum(*i))\n printf("%c",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }\n while(top!=NULL){\n printf("%c",top->data);\n top = pop(top);\n }\n}" (primitive_type) "void" (function_declarator) "infixToPostfix(char arr[])" (identifier) "infixToPostfix" (parameter_list) "(char arr[])" (() "(" (parameter_declaration) "char arr[]" (primitive_type) "char" (array_declarator) "arr[]" (identifier) "arr" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n char *i,x;\n Stack *top = NULL;\n i = arr;\n while(*i!='\0'){\n if(isalnum(*i))\n printf("%c",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }\n while(top!=NULL){\n printf("%c",top->data);\n top = pop(top);\n }\n}" ({) "{" (declaration) "char *i,x;" (primitive_type) "char" (pointer_declarator) "*i" (*) "*" (identifier) "i" (,) "," (identifier) "x" (;) ";" (declaration) "Stack *top = NULL;" (type_identifier) "Stack" (init_declarator) "*top = NULL" (pointer_declarator) "*top" (*) "*" (identifier) "top" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "i = arr;" (assignment_expression) "i = arr" (identifier) "i" (=) "=" (identifier) "arr" (;) ";" (while_statement) "while(*i!='\0'){\n if(isalnum(*i))\n printf("%c",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }" (while) "while" (parenthesized_expression) "(*i!='\0')" (() "(" (binary_expression) "*i!='\0'" (pointer_expression) "*i" (*) "*" (identifier) "i" (!=) "!=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" ()) ")" (compound_statement) "{\n if(isalnum(*i))\n printf("%c",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }" ({) "{" (if_statement) "if(isalnum(*i))\n printf("%c",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" (if) "if" (parenthesized_expression) "(isalnum(*i))" (() "(" (call_expression) "isalnum(*i)" (identifier) "isalnum" (argument_list) "(*i)" (() "(" (pointer_expression) "*i" (*) "*" (identifier) "i" ()) ")" ()) ")" (expression_statement) "printf("%c",*i);" (call_expression) "printf("%c",*i)" (identifier) "printf" (argument_list) "("%c",*i)" (() "(" (string_literal) ""%c"" (") """ (string_content) "%c" (") """ (,) "," (pointer_expression) "*i" (*) "*" (identifier) "i" ()) ")" (;) ";" (else_clause) "else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" (else) "else" (if_statement) "if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" (if) "if" (parenthesized_expression) "(*i == '(')" (() "(" (binary_expression) "*i == '('" (pointer_expression) "*i" (*) "*" (identifier) "i" (==) "==" (char_literal) "'('" (') "'" (character) "(" (') "'" ()) ")" (compound_statement) "{\n top = pushC(top, *i);\n }" ({) "{" (expression_statement) "top = pushC(top, *i);" (assignment_expression) "top = pushC(top, *i)" (identifier) "top" (=) "=" (call_expression) "pushC(top, *i)" (identifier) "pushC" (argument_list) "(top, *i)" (() "(" (identifier) "top" (,) "," (pointer_expression) "*i" (*) "*" (identifier) "i" ()) ")" (;) ";" (}) "}" (else_clause) "else if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" (else) "else" (if_statement) "if(*i == ')'){ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" (if) "if" (parenthesized_expression) "(*i == ')')" (() "(" (binary_expression) "*i == ')'" (pointer_expression) "*i" (*) "*" (identifier) "i" (==) "==" (char_literal) "')'" (') "'" (character) ")" (') "'" ()) ")" (compound_statement) "{ \n while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pop(top);\n }" ({) "{" (while_statement) "while(top->data != '('){\n printf("%c",top->data);\n top = pop(top);\n }" (while) "while" (parenthesized_expression) "(top->data != '(')" (() "(" (binary_expression) "top->data != '('" (field_expression) "top->data" (identifier) "top" (->) "->" (field_identifier) "data" (!=) "!=" (char_literal) "'('" (') "'" (character) "(" (') "'" ()) ")" (compound_statement) "{\n printf("%c",top->data);\n top = pop(top);\n }" ({) "{" (expression_statement) "printf("%c",top->data);" (call_expression) "printf("%c",top->data)" (identifier) "printf" (argument_list) "("%c",top->data)" (() "(" (string_literal) ""%c"" (") """ (string_content) "%c" (") """ (,) "," (field_expression) "top->data" (identifier) "top" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "top = pop(top);" (assignment_expression) "top = pop(top)" (identifier) "top" (=) "=" (call_expression) "pop(top)" (identifier) "pop" (argument_list) "(top)" (() "(" (identifier) "top" ()) ")" (;) ";" (}) "}" (expression_statement) "top = pop(top);" (assignment_expression) "top = pop(top)" (identifier) "top" (=) "=" (call_expression) "pop(top)" (identifier) "pop" (argument_list) "(top)" (() "(" (identifier) "top" ()) ")" (;) ";" (}) "}" (else_clause) "else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" (else) "else" (compound_statement) "{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }" ({) "{" (while_statement) "while(top!=NULL && priority(top->data) >= priority(*i)){\n printf("%c",top->data);\n top = pop(top);\n }" (while) "while" (parenthesized_expression) "(top!=NULL && priority(top->data) >= priority(*i))" (() "(" (binary_expression) "top!=NULL && priority(top->data) >= priority(*i)" (binary_expression) "top!=NULL" (identifier) "top" (!=) "!=" (null) "NULL" (NULL) "NULL" (&&) "&&" (binary_expression) "priority(top->data) >= priority(*i)" (call_expression) "priority(top->data)" (identifier) "priority" (argument_list) "(top->data)" (() "(" (field_expression) "top->data" (identifier) "top" (->) "->" (field_identifier) "data" ()) ")" (>=) ">=" (call_expression) "priority(*i)" (identifier) "priority" (argument_list) "(*i)" (() "(" (pointer_expression) "*i" (*) "*" (identifier) "i" ()) ")" ()) ")" (compound_statement) "{\n printf("%c",top->data);\n top = pop(top);\n }" ({) "{" (expression_statement) "printf("%c",top->data);" (call_expression) "printf("%c",top->data)" (identifier) "printf" (argument_list) "("%c",top->data)" (() "(" (string_literal) ""%c"" (") """ (string_content) "%c" (") """ (,) "," (field_expression) "top->data" (identifier) "top" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "top = pop(top);" (assignment_expression) "top = pop(top)" (identifier) "top" (=) "=" (call_expression) "pop(top)" (identifier) "pop" (argument_list) "(top)" (() "(" (identifier) "top" ()) ")" (;) ";" (}) "}" (expression_statement) "top = pushC(top, *i);" (assignment_expression) "top = pushC(top, *i)" (identifier) "top" (=) "=" (call_expression) "pushC(top, *i)" (identifier) "pushC" (argument_list) "(top, *i)" (() "(" (identifier) "top" (,) "," (pointer_expression) "*i" (*) "*" (identifier) "i" ()) ")" (;) ";" (}) "}" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (}) "}" (while_statement) "while(top!=NULL){\n printf("%c",top->data);\n top = pop(top);\n }" (while) "while" (parenthesized_expression) "(top!=NULL)" (() "(" (binary_expression) "top!=NULL" (identifier) "top" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n printf("%c",top->data);\n top = pop(top);\n }" ({) "{" (expression_statement) "printf("%c",top->data);" (call_expression) "printf("%c",top->data)" (identifier) "printf" (argument_list) "("%c",top->data)" (() "(" (string_literal) ""%c"" (") """ (string_content) "%c" (") """ (,) "," (field_expression) "top->data" (identifier) "top" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "top = pop(top);" (assignment_expression) "top = pop(top)" (identifier) "top" (=) "=" (call_expression) "pop(top)" (identifier) "pop" (argument_list) "(top)" (() "(" (identifier) "top" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void main(){\n char arr[100];\n printf("Enter function: ");\n scanf("%[^\n]",arr);\n infixToPostfix(arr);\n}" (primitive_type) "void" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n char arr[100];\n printf("Enter function: ");\n scanf("%[^\n]",arr);\n infixToPostfix(arr);\n}" ({) "{" (declaration) "char arr[100];" (primitive_type) "char" (array_declarator) "arr[100]" (identifier) "arr" ([) "[" (number_literal) "100" (]) "]" (;) ";" (expression_statement) "printf("Enter function: ");" (call_expression) "printf("Enter function: ")" (identifier) "printf" (argument_list) "("Enter function: ")" (() "(" (string_literal) ""Enter function: "" (") """ (string_content) "Enter function: " (") """ ()) ")" (;) ";" (expression_statement) "scanf("%[^\n]",arr);" (call_expression) "scanf("%[^\n]",arr)" (identifier) "scanf" (argument_list) "("%[^\n]",arr)" (() "(" (string_literal) ""%[^\n]"" (") """ (string_content) "%[^" (escape_sequence) "\n" (string_content) "]" (") """ (,) "," (identifier) "arr" ()) ")" (;) ";" (expression_statement) "infixToPostfix(arr);" (call_expression) "infixToPostfix(arr)" (identifier) "infixToPostfix" (argument_list) "(arr)" (() "(" (identifier) "arr" ()) ")" (;) ";" (}) "}"
474
0
{"language": "c", "success": true, "metadata": {"lines": 50, "avg_line_length": 21.2, "nodes": 288, "errors": 0, "source_hash": "49de2ce1b3f2741b1f4386e4537ef42c73641dd3b7082ce8ee10a84735e46097", "categorized_nodes": 188}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "#include<stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include<string.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": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include\"CStack.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"CStack.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include<ctype.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<ctype.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 17}}, {"id": 15, "type": "function_definition", "text": "int priority(char i){\n if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;\n}", "parent": null, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 16, "type": "primitive_type", "text": "int", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 3}}, {"id": 17, "type": "function_declarator", "text": "priority(char i)", "parent": 15, "children": [18, 19], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 20}}, {"id": 18, "type": "identifier", "text": "priority", "parent": 17, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 12}}, {"id": 19, "type": "parameter_list", "text": "(char i)", "parent": 17, "children": [20], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 20}}, {"id": 20, "type": "parameter_declaration", "text": "char i", "parent": 19, "children": [21, 22], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 19}}, {"id": 21, "type": "primitive_type", "text": "char", "parent": 20, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 17}}, {"id": 22, "type": "identifier", "text": "i", "parent": 20, "children": [], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 19}}, {"id": 23, "type": "if_statement", "text": "if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;", "parent": 15, "children": [24, 31, 33], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 24, "type": "parenthesized_expression", "text": "(i == '(')", "parent": 23, "children": [25], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 16}}, {"id": 25, "type": "binary_expression", "text": "i == '('", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 15}}, {"id": 26, "type": "identifier", "text": "i", "parent": 25, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 8}}, {"id": 27, "type": "==", "text": "==", "parent": 25, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 11}}, {"id": 28, "type": "char_literal", "text": "'('", "parent": 25, "children": [29, 30], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 15}}, {"id": 29, "type": "'", "text": "'", "parent": 28, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 13}}, {"id": 30, "type": "'", "text": "'", "parent": 28, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 15}}, {"id": 31, "type": "return_statement", "text": "return 0;", "parent": 23, "children": [32], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 17}}, {"id": 32, "type": "number_literal", "text": "0", "parent": 31, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 16}}, {"id": 33, "type": "else_clause", "text": "else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;", "parent": 23, "children": [34], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 34, "type": "if_statement", "text": "if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;", "parent": 33, "children": [35, 52, 54], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 35, "type": "parenthesized_expression", "text": "(i == '+' || i == '-')", "parent": 34, "children": [36], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 33}}, {"id": 36, "type": "binary_expression", "text": "i == '+' || i == '-'", "parent": 35, "children": [37, 44, 45], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 32}}, {"id": 37, "type": "binary_expression", "text": "i == '+'", "parent": 36, "children": [38, 39, 40], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 20}}, {"id": 38, "type": "identifier", "text": "i", "parent": 37, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 13}}, {"id": 39, "type": "==", "text": "==", "parent": 37, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 16}}, {"id": 40, "type": "char_literal", "text": "'+'", "parent": 37, "children": [41, 42, 43], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 20}}, {"id": 41, "type": "'", "text": "'", "parent": 40, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 18}}, {"id": 42, "type": "character", "text": "+", "parent": 40, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 19}}, {"id": 43, "type": "'", "text": "'", "parent": 40, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 20}}, {"id": 44, "type": "||", "text": "||", "parent": 36, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 23}}, {"id": 45, "type": "binary_expression", "text": "i == '-'", "parent": 36, "children": [46, 47, 48], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 32}}, {"id": 46, "type": "identifier", "text": "i", "parent": 45, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 25}}, {"id": 47, "type": "==", "text": "==", "parent": 45, "children": [], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 28}}, {"id": 48, "type": "char_literal", "text": "'-'", "parent": 45, "children": [49, 50, 51], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 32}}, {"id": 49, "type": "'", "text": "'", "parent": 48, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 30}}, {"id": 50, "type": "character", "text": "-", "parent": 48, "children": [], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 31}}, {"id": 51, "type": "'", "text": "'", "parent": 48, "children": [], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 32}}, {"id": 52, "type": "return_statement", "text": "return 1;", "parent": 34, "children": [53], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 17}}, {"id": 53, "type": "number_literal", "text": "1", "parent": 52, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 16}}, {"id": 54, "type": "else_clause", "text": "else if(i == '*' || i == '/')\n return 2;", "parent": 34, "children": [55], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 55, "type": "if_statement", "text": "if(i == '*' || i == '/')\n return 2;", "parent": 54, "children": [56, 73], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 56, "type": "parenthesized_expression", "text": "(i == '*' || i == '/')", "parent": 55, "children": [57], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 33}}, {"id": 57, "type": "binary_expression", "text": "i == '*' || i == '/'", "parent": 56, "children": [58, 65, 66], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 32}}, {"id": 58, "type": "binary_expression", "text": "i == '*'", "parent": 57, "children": [59, 60, 61], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 20}}, {"id": 59, "type": "identifier", "text": "i", "parent": 58, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 13}}, {"id": 60, "type": "==", "text": "==", "parent": 58, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 16}}, {"id": 61, "type": "char_literal", "text": "'*'", "parent": 58, "children": [62, 63, 64], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 20}}, {"id": 62, "type": "'", "text": "'", "parent": 61, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 18}}, {"id": 63, "type": "character", "text": "*", "parent": 61, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 19}}, {"id": 64, "type": "'", "text": "'", "parent": 61, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 20}}, {"id": 65, "type": "||", "text": "||", "parent": 57, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 23}}, {"id": 66, "type": "binary_expression", "text": "i == '/'", "parent": 57, "children": [67, 68, 69], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 32}}, {"id": 67, "type": "identifier", "text": "i", "parent": 66, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 25}}, {"id": 68, "type": "==", "text": "==", "parent": 66, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 28}}, {"id": 69, "type": "char_literal", "text": "'/'", "parent": 66, "children": [70, 71, 72], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 32}}, {"id": 70, "type": "'", "text": "'", "parent": 69, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 30}}, {"id": 71, "type": "character", "text": "/", "parent": 69, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 31}}, {"id": 72, "type": "'", "text": "'", "parent": 69, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 32}}, {"id": 73, "type": "return_statement", "text": "return 2;", "parent": 55, "children": [74], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 17}}, {"id": 74, "type": "number_literal", "text": "2", "parent": 73, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 16}}, {"id": 75, "type": "function_definition", "text": "void infixToPostfix(char arr[]){\n char *i,x;\n Stack *top = NULL;\n i = arr;\n while(*i!='\\0'){\n if(isalnum(*i))\n printf(\"%c\",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }\n while(top!=NULL){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n}", "parent": null, "children": [76, 77], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 77, "type": "function_declarator", "text": "infixToPostfix(char arr[])", "parent": 75, "children": [78, 79], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 31}}, {"id": 78, "type": "identifier", "text": "infixToPostfix", "parent": 77, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 19}}, {"id": 79, "type": "parameter_list", "text": "(char arr[])", "parent": 77, "children": [80], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 31}}, {"id": 80, "type": "parameter_declaration", "text": "char arr[]", "parent": 79, "children": [81, 82], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 30}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 24}}, {"id": 82, "type": "array_declarator", "text": "arr[]", "parent": 80, "children": [83], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 30}}, {"id": 83, "type": "identifier", "text": "arr", "parent": 82, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 28}}, {"id": 84, "type": "declaration", "text": "char *i,x;", "parent": 75, "children": [85, 86, 89], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 14}}, {"id": 85, "type": "primitive_type", "text": "char", "parent": 84, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 86, "type": "pointer_declarator", "text": "*i", "parent": 84, "children": [87, 88], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 11}}, {"id": 87, "type": "*", "text": "*", "parent": 86, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 10}}, {"id": 88, "type": "identifier", "text": "i", "parent": 86, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 11}}, {"id": 89, "type": "identifier", "text": "x", "parent": 84, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 90, "type": "declaration", "text": "Stack *top = NULL;", "parent": 75, "children": [91, 92], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 22}}, {"id": 91, "type": "type_identifier", "text": "Stack", "parent": 90, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 9}}, {"id": 92, "type": "init_declarator", "text": "*top = NULL", "parent": 90, "children": [93, 96, 97], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 21}}, {"id": 93, "type": "pointer_declarator", "text": "*top", "parent": 92, "children": [94, 95], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 11}}, {"id": 95, "type": "identifier", "text": "top", "parent": 93, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 14}}, {"id": 96, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 97, "type": "null", "text": "NULL", "parent": 92, "children": [98], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 21}}, {"id": 98, "type": "NULL", "text": "NULL", "parent": 97, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 21}}, {"id": 99, "type": "assignment_expression", "text": "i = arr", "parent": 75, "children": [100, 101, 102], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 11}}, {"id": 100, "type": "identifier", "text": "i", "parent": 99, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 5}}, {"id": 101, "type": "=", "text": "=", "parent": 99, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 7}}, {"id": 102, "type": "identifier", "text": "arr", "parent": 99, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 11}}, {"id": 103, "type": "while_statement", "text": "while(*i!='\\0'){\n if(isalnum(*i))\n printf(\"%c\",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }", "parent": 75, "children": [104], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 38, "column": 5}}, {"id": 104, "type": "parenthesized_expression", "text": "(*i!='\\0')", "parent": 103, "children": [105], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 19}}, {"id": 105, "type": "binary_expression", "text": "*i!='\\0'", "parent": 104, "children": [106, 109, 110], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 18}}, {"id": 106, "type": "pointer_expression", "text": "*i", "parent": 105, "children": [107, 108], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 12}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 11}}, {"id": 108, "type": "identifier", "text": "i", "parent": 106, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 109, "type": "!=", "text": "!=", "parent": 105, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 14}}, {"id": 110, "type": "char_literal", "text": "'\\0'", "parent": 105, "children": [111, 112, 113], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 18}}, {"id": 111, "type": "'", "text": "'", "parent": 110, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 15}}, {"id": 112, "type": "escape_sequence", "text": "\\0", "parent": 110, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 17}}, {"id": 113, "type": "'", "text": "'", "parent": 110, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 18}}, {"id": 114, "type": "if_statement", "text": "if(isalnum(*i))\n printf(\"%c\",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }", "parent": 103, "children": [115, 129], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 115, "type": "parenthesized_expression", "text": "(isalnum(*i))", "parent": 114, "children": [116], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 23}}, {"id": 116, "type": "call_expression", "text": "isalnum(*i)", "parent": 115, "children": [117, 118], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 22}}, {"id": 117, "type": "identifier", "text": "isalnum", "parent": 116, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 18}}, {"id": 118, "type": "argument_list", "text": "(*i)", "parent": 116, "children": [119], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 22}}, {"id": 119, "type": "pointer_expression", "text": "*i", "parent": 118, "children": [120, 121], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 21}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 20}}, {"id": 121, "type": "identifier", "text": "i", "parent": 119, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 21}}, {"id": 122, "type": "call_expression", "text": "printf(\"%c\",*i)", "parent": 114, "children": [123, 124], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 27}}, {"id": 123, "type": "identifier", "text": "printf", "parent": 122, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 18}}, {"id": 124, "type": "argument_list", "text": "(\"%c\",*i)", "parent": 122, "children": [125, 126], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 27}}, {"id": 125, "type": "string_literal", "text": "\"%c\"", "parent": 124, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 23}}, {"id": 126, "type": "pointer_expression", "text": "*i", "parent": 124, "children": [127, 128], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 26}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 25}}, {"id": 128, "type": "identifier", "text": "i", "parent": 126, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 26}}, {"id": 129, "type": "else_clause", "text": "else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }", "parent": 114, "children": [130], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 130, "type": "if_statement", "text": "if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }", "parent": 129, "children": [131, 150], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 36, "column": 9}}, {"id": 131, "type": "parenthesized_expression", "text": "(*i == '(')", "parent": 130, "children": [132], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 26}}, {"id": 132, "type": "binary_expression", "text": "*i == '('", "parent": 131, "children": [133, 136, 137], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 25}}, {"id": 133, "type": "pointer_expression", "text": "*i", "parent": 132, "children": [134, 135], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 18}}, {"id": 134, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 17}}, {"id": 135, "type": "identifier", "text": "i", "parent": 133, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 18}}, {"id": 136, "type": "==", "text": "==", "parent": 132, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 21}}, {"id": 137, "type": "char_literal", "text": "'('", "parent": 132, "children": [138, 139], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 25}}, {"id": 138, "type": "'", "text": "'", "parent": 137, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 23}}, {"id": 139, "type": "'", "text": "'", "parent": 137, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 25}}, {"id": 140, "type": "assignment_expression", "text": "top = pushC(top, *i)", "parent": 130, "children": [141, 142, 143], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 32}}, {"id": 141, "type": "identifier", "text": "top", "parent": 140, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 15}}, {"id": 142, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 17}}, {"id": 143, "type": "call_expression", "text": "pushC(top, *i)", "parent": 140, "children": [144, 145], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 32}}, {"id": 144, "type": "identifier", "text": "pushC", "parent": 143, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 23}}, {"id": 145, "type": "argument_list", "text": "(top, *i)", "parent": 143, "children": [146, 147], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 32}}, {"id": 146, "type": "identifier", "text": "top", "parent": 145, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 27}}, {"id": 147, "type": "pointer_expression", "text": "*i", "parent": 145, "children": [148, 149], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 31}}, {"id": 148, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 30}}, {"id": 149, "type": "identifier", "text": "i", "parent": 147, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 31}}, {"id": 150, "type": "else_clause", "text": "else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }", "parent": 130, "children": [151], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 151, "type": "if_statement", "text": "if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }", "parent": 150, "children": [152, 192], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 36, "column": 9}}, {"id": 152, "type": "parenthesized_expression", "text": "(*i == ')')", "parent": 151, "children": [153], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 26}}, {"id": 153, "type": "binary_expression", "text": "*i == ')'", "parent": 152, "children": [154, 157, 158], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 25}}, {"id": 154, "type": "pointer_expression", "text": "*i", "parent": 153, "children": [155, 156], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 18}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 17}}, {"id": 156, "type": "identifier", "text": "i", "parent": 154, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 18}}, {"id": 157, "type": "==", "text": "==", "parent": 153, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 21}}, {"id": 158, "type": "char_literal", "text": "')'", "parent": 153, "children": [159, 160], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 25}}, {"id": 159, "type": "'", "text": "'", "parent": 158, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 23}}, {"id": 160, "type": "'", "text": "'", "parent": 158, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 25}}, {"id": 161, "type": "while_statement", "text": "while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }", "parent": 151, "children": [162], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 27, "column": 13}}, {"id": 162, "type": "parenthesized_expression", "text": "(top->data != '(')", "parent": 161, "children": [163], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 35}}, {"id": 163, "type": "binary_expression", "text": "top->data != '('", "parent": 162, "children": [164, 167, 168], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 34}}, {"id": 164, "type": "field_expression", "text": "top->data", "parent": 163, "children": [165, 166], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 27}}, {"id": 165, "type": "identifier", "text": "top", "parent": 164, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 21}}, {"id": 166, "type": "field_identifier", "text": "data", "parent": 164, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 27}}, {"id": 167, "type": "!=", "text": "!=", "parent": 163, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 30}}, {"id": 168, "type": "char_literal", "text": "'('", "parent": 163, "children": [169, 170], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 34}}, {"id": 169, "type": "'", "text": "'", "parent": 168, "children": [], "start_point": {"row": 24, "column": 31}, "end_point": {"row": 24, "column": 32}}, {"id": 170, "type": "'", "text": "'", "parent": 168, "children": [], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 34}}, {"id": 171, "type": "call_expression", "text": "printf(\"%c\",top->data)", "parent": 161, "children": [172, 173], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 38}}, {"id": 172, "type": "identifier", "text": "printf", "parent": 171, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 22}}, {"id": 173, "type": "argument_list", "text": "(\"%c\",top->data)", "parent": 171, "children": [174, 175], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 38}}, {"id": 174, "type": "string_literal", "text": "\"%c\"", "parent": 173, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 27}}, {"id": 175, "type": "field_expression", "text": "top->data", "parent": 173, "children": [176, 177], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 37}}, {"id": 176, "type": "identifier", "text": "top", "parent": 175, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 31}}, {"id": 177, "type": "field_identifier", "text": "data", "parent": 175, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 37}}, {"id": 178, "type": "assignment_expression", "text": "top = pop(top)", "parent": 161, "children": [179, 180, 181], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 30}}, {"id": 179, "type": "identifier", "text": "top", "parent": 178, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 19}}, {"id": 180, "type": "=", "text": "=", "parent": 178, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 181, "type": "call_expression", "text": "pop(top)", "parent": 178, "children": [182, 183], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 30}}, {"id": 182, "type": "identifier", "text": "pop", "parent": 181, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 25}}, {"id": 183, "type": "argument_list", "text": "(top)", "parent": 181, "children": [184], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 30}}, {"id": 184, "type": "identifier", "text": "top", "parent": 183, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 29}}, {"id": 185, "type": "assignment_expression", "text": "top = pop(top)", "parent": 151, "children": [186, 187, 188], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 26}}, {"id": 186, "type": "identifier", "text": "top", "parent": 185, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 15}}, {"id": 187, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 17}}, {"id": 188, "type": "call_expression", "text": "pop(top)", "parent": 185, "children": [189, 190], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 26}}, {"id": 189, "type": "identifier", "text": "pop", "parent": 188, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 21}}, {"id": 190, "type": "argument_list", "text": "(top)", "parent": 188, "children": [191], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 28, "column": 26}}, {"id": 191, "type": "identifier", "text": "top", "parent": 190, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 25}}, {"id": 192, "type": "else_clause", "text": "else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }", "parent": 151, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 193, "type": "while_statement", "text": "while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }", "parent": 192, "children": [194], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 34, "column": 13}}, {"id": 194, "type": "parenthesized_expression", "text": "(top!=NULL && priority(top->data) >= priority(*i))", "parent": 193, "children": [195], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 67}}, {"id": 195, "type": "binary_expression", "text": "top!=NULL && priority(top->data) >= priority(*i)", "parent": 194, "children": [196, 201, 202], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 66}}, {"id": 196, "type": "binary_expression", "text": "top!=NULL", "parent": 195, "children": [197, 198, 199], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 27}}, {"id": 197, "type": "identifier", "text": "top", "parent": 196, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 21}}, {"id": 198, "type": "!=", "text": "!=", "parent": 196, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 23}}, {"id": 199, "type": "null", "text": "NULL", "parent": 196, "children": [200], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 27}}, {"id": 200, "type": "NULL", "text": "NULL", "parent": 199, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 27}}, {"id": 201, "type": "&&", "text": "&&", "parent": 195, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 202, "type": "binary_expression", "text": "priority(top->data) >= priority(*i)", "parent": 195, "children": [203, 209, 210], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 66}}, {"id": 203, "type": "call_expression", "text": "priority(top->data)", "parent": 202, "children": [204, 205], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 50}}, {"id": 204, "type": "identifier", "text": "priority", "parent": 203, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 39}}, {"id": 205, "type": "argument_list", "text": "(top->data)", "parent": 203, "children": [206], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 50}}, {"id": 206, "type": "field_expression", "text": "top->data", "parent": 205, "children": [207, 208], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 49}}, {"id": 207, "type": "identifier", "text": "top", "parent": 206, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 43}}, {"id": 208, "type": "field_identifier", "text": "data", "parent": 206, "children": [], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 49}}, {"id": 209, "type": ">=", "text": ">=", "parent": 202, "children": [], "start_point": {"row": 31, "column": 51}, "end_point": {"row": 31, "column": 53}}, {"id": 210, "type": "call_expression", "text": "priority(*i)", "parent": 202, "children": [211, 212], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 66}}, {"id": 211, "type": "identifier", "text": "priority", "parent": 210, "children": [], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 62}}, {"id": 212, "type": "argument_list", "text": "(*i)", "parent": 210, "children": [213], "start_point": {"row": 31, "column": 62}, "end_point": {"row": 31, "column": 66}}, {"id": 213, "type": "pointer_expression", "text": "*i", "parent": 212, "children": [214, 215], "start_point": {"row": 31, "column": 63}, "end_point": {"row": 31, "column": 65}}, {"id": 214, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 31, "column": 63}, "end_point": {"row": 31, "column": 64}}, {"id": 215, "type": "identifier", "text": "i", "parent": 213, "children": [], "start_point": {"row": 31, "column": 64}, "end_point": {"row": 31, "column": 65}}, {"id": 216, "type": "call_expression", "text": "printf(\"%c\",top->data)", "parent": 193, "children": [217, 218], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 38}}, {"id": 217, "type": "identifier", "text": "printf", "parent": 216, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 22}}, {"id": 218, "type": "argument_list", "text": "(\"%c\",top->data)", "parent": 216, "children": [219, 220], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 38}}, {"id": 219, "type": "string_literal", "text": "\"%c\"", "parent": 218, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 27}}, {"id": 220, "type": "field_expression", "text": "top->data", "parent": 218, "children": [221, 222], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 37}}, {"id": 221, "type": "identifier", "text": "top", "parent": 220, "children": [], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 31}}, {"id": 222, "type": "field_identifier", "text": "data", "parent": 220, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 37}}, {"id": 223, "type": "assignment_expression", "text": "top = pop(top)", "parent": 193, "children": [224, 225, 226], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 30}}, {"id": 224, "type": "identifier", "text": "top", "parent": 223, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 19}}, {"id": 225, "type": "=", "text": "=", "parent": 223, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 21}}, {"id": 226, "type": "call_expression", "text": "pop(top)", "parent": 223, "children": [227, 228], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 30}}, {"id": 227, "type": "identifier", "text": "pop", "parent": 226, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 25}}, {"id": 228, "type": "argument_list", "text": "(top)", "parent": 226, "children": [229], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 30}}, {"id": 229, "type": "identifier", "text": "top", "parent": 228, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 29}}, {"id": 230, "type": "assignment_expression", "text": "top = pushC(top, *i)", "parent": 192, "children": [231, 232, 233], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 32}}, {"id": 231, "type": "identifier", "text": "top", "parent": 230, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 15}}, {"id": 232, "type": "=", "text": "=", "parent": 230, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 17}}, {"id": 233, "type": "call_expression", "text": "pushC(top, *i)", "parent": 230, "children": [234, 235], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 32}}, {"id": 234, "type": "identifier", "text": "pushC", "parent": 233, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 23}}, {"id": 235, "type": "argument_list", "text": "(top, *i)", "parent": 233, "children": [236, 237], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 32}}, {"id": 236, "type": "identifier", "text": "top", "parent": 235, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 27}}, {"id": 237, "type": "pointer_expression", "text": "*i", "parent": 235, "children": [238, 239], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 31}}, {"id": 238, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 30}}, {"id": 239, "type": "identifier", "text": "i", "parent": 237, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 31}}, {"id": 240, "type": "update_expression", "text": "i++", "parent": 103, "children": [241, 242], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 11}}, {"id": 241, "type": "identifier", "text": "i", "parent": 240, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 9}}, {"id": 242, "type": "++", "text": "++", "parent": 240, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 11}}, {"id": 243, "type": "while_statement", "text": "while(top!=NULL){\n printf(\"%c\",top->data);\n top = pop(top);\n }", "parent": 75, "children": [244], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 244, "type": "parenthesized_expression", "text": "(top!=NULL)", "parent": 243, "children": [245], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 20}}, {"id": 245, "type": "binary_expression", "text": "top!=NULL", "parent": 244, "children": [246, 247, 248], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 19}}, {"id": 246, "type": "identifier", "text": "top", "parent": 245, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 13}}, {"id": 247, "type": "!=", "text": "!=", "parent": 245, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 15}}, {"id": 248, "type": "null", "text": "NULL", "parent": 245, "children": [249], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 19}}, {"id": 249, "type": "NULL", "text": "NULL", "parent": 248, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 19}}, {"id": 250, "type": "call_expression", "text": "printf(\"%c\",top->data)", "parent": 243, "children": [251, 252], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 30}}, {"id": 251, "type": "identifier", "text": "printf", "parent": 250, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 14}}, {"id": 252, "type": "argument_list", "text": "(\"%c\",top->data)", "parent": 250, "children": [253, 254], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 30}}, {"id": 253, "type": "string_literal", "text": "\"%c\"", "parent": 252, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 19}}, {"id": 254, "type": "field_expression", "text": "top->data", "parent": 252, "children": [255, 256], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 29}}, {"id": 255, "type": "identifier", "text": "top", "parent": 254, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 23}}, {"id": 256, "type": "field_identifier", "text": "data", "parent": 254, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 29}}, {"id": 257, "type": "assignment_expression", "text": "top = pop(top)", "parent": 243, "children": [258, 259, 260], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 22}}, {"id": 258, "type": "identifier", "text": "top", "parent": 257, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 11}}, {"id": 259, "type": "=", "text": "=", "parent": 257, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 13}}, {"id": 260, "type": "call_expression", "text": "pop(top)", "parent": 257, "children": [261, 262], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 22}}, {"id": 261, "type": "identifier", "text": "pop", "parent": 260, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 17}}, {"id": 262, "type": "argument_list", "text": "(top)", "parent": 260, "children": [263], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 22}}, {"id": 263, "type": "identifier", "text": "top", "parent": 262, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 21}}, {"id": 264, "type": "function_definition", "text": "void main(){\n char arr[100];\n printf(\"Enter function: \");\n scanf(\"%[^\\n]\",arr);\n infixToPostfix(arr);\n}", "parent": null, "children": [265, 266], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 265, "type": "primitive_type", "text": "void", "parent": 264, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 266, "type": "function_declarator", "text": "main()", "parent": 264, "children": [267, 268], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 11}}, {"id": 267, "type": "identifier", "text": "main", "parent": 266, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 9}}, {"id": 268, "type": "parameter_list", "text": "()", "parent": 266, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 11}}, {"id": 269, "type": "declaration", "text": "char arr[100];", "parent": 264, "children": [270, 271], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 18}}, {"id": 270, "type": "primitive_type", "text": "char", "parent": 269, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 8}}, {"id": 271, "type": "array_declarator", "text": "arr[100]", "parent": 269, "children": [272, 273], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 17}}, {"id": 272, "type": "identifier", "text": "arr", "parent": 271, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 12}}, {"id": 273, "type": "number_literal", "text": "100", "parent": 271, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 16}}, {"id": 274, "type": "call_expression", "text": "printf(\"Enter function: \")", "parent": 264, "children": [275, 276], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 30}}, {"id": 275, "type": "identifier", "text": "printf", "parent": 274, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 10}}, {"id": 276, "type": "argument_list", "text": "(\"Enter function: \")", "parent": 274, "children": [277], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 30}}, {"id": 277, "type": "string_literal", "text": "\"Enter function: \"", "parent": 276, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 29}}, {"id": 278, "type": "call_expression", "text": "scanf(\"%[^\\n]\",arr)", "parent": 264, "children": [279, 280], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 23}}, {"id": 279, "type": "identifier", "text": "scanf", "parent": 278, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 9}}, {"id": 280, "type": "argument_list", "text": "(\"%[^\\n]\",arr)", "parent": 278, "children": [281, 283], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 23}}, {"id": 281, "type": "string_literal", "text": "\"%[^\\n]\"", "parent": 280, "children": [282], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 18}}, {"id": 282, "type": "escape_sequence", "text": "\\n", "parent": 281, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 16}}, {"id": 283, "type": "identifier", "text": "arr", "parent": 280, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 22}}, {"id": 284, "type": "call_expression", "text": "infixToPostfix(arr)", "parent": 264, "children": [285, 286], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 23}}, {"id": 285, "type": "identifier", "text": "infixToPostfix", "parent": 284, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 18}}, {"id": 286, "type": "argument_list", "text": "(arr)", "parent": 284, "children": [287], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 23}}, {"id": 287, "type": "identifier", "text": "arr", "parent": 286, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 22}}]}, "node_categories": {"declarations": {"functions": [15, 17, 75, 77, 264, 266], "variables": [20, 80, 84, 90, 269], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [24, 25, 35, 36, 37, 45, 56, 57, 58, 66, 104, 105, 106, 115, 116, 119, 122, 126, 131, 132, 133, 143, 147, 152, 153, 154, 162, 163, 164, 171, 175, 181, 188, 194, 195, 196, 202, 203, 206, 210, 213, 216, 220, 226, 233, 237, 240, 244, 245, 250, 254, 260, 274, 278, 284], "assignments": [99, 140, 178, 185, 223, 230, 257], "loops": [103, 161, 193, 243], "conditionals": [18, 22, 23, 26, 34, 38, 46, 55, 59, 67, 78, 83, 88, 89, 91, 95, 100, 102, 108, 114, 117, 121, 123, 128, 130, 135, 141, 144, 146, 149, 151, 156, 165, 166, 172, 176, 177, 179, 182, 184, 186, 189, 191, 197, 204, 207, 208, 211, 215, 217, 221, 222, 224, 227, 229, 231, 234, 236, 239, 241, 246, 251, 255, 256, 258, 261, 263, 267, 272, 275, 279, 283, 285, 287], "returns": [31, 52, 73], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 28, 32, 40, 48, 53, 61, 69, 74, 110, 125, 137, 158, 168, 174, 219, 253, 273, 277, 281], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "priority", "text_snippet": "int priority(char i){\n if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n r"}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "priority(char i)"}, {"node_id": 75, "universal_type": "function", "name": "infixToPostfix", "text_snippet": "void infixToPostfix(char arr[]){\n char *i,x;\n Stack *top = NULL;\n i = arr;\n while(*i!='\\"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "infixToPostfix(char arr[])"}, {"node_id": 264, "universal_type": "function", "name": "main", "text_snippet": "void main(){\n char arr[100];\n printf(\"Enter function: \");\n scanf(\"%[^\\n]\",arr);\n infixTo"}, {"node_id": 266, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include<stdlib.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include<string.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include\"CStack.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include<ctype.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\n#include<stdlib.h>\n#include<string.h>\n#include\"CStack.h\"\n#include<ctype.h>\nint priority(char i){\n if(i == '(')\n return 0;\n else if(i == '+' || i == '-')\n return 1;\n else if(i == '*' || i == '/')\n return 2;\n}\nvoid infixToPostfix(char arr[]){\n char *i,x;\n Stack *top = NULL;\n i = arr;\n while(*i!='\\0'){\n if(isalnum(*i))\n printf(\"%c\",*i);\n else if(*i == '('){\n top = pushC(top, *i);\n }\n else if(*i == ')'){ \n while(top->data != '('){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pop(top);\n }\n else{\n while(top!=NULL && priority(top->data) >= priority(*i)){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n top = pushC(top, *i);\n }\n i++;\n }\n while(top!=NULL){\n printf(\"%c\",top->data);\n top = pop(top);\n }\n}\nvoid main(){\n char arr[100];\n printf(\"Enter function: \");\n scanf(\"%[^\\n]\",arr);\n infixToPostfix(arr);\n}\n"}
238
c
/* * Copyright (c) 2002, Intel Corporation. All rights reserved. * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. * * Test that if clock_settime() changes the value for CLOCK_REALTIME, * an absolute timer which would now have expired in the past * will expire immediately (with no error). * * Steps: * - get time T0 * - create/enable a timer to expire at T1 = T0 + TIMEROFFSET * - set time forward to T1 + CLOCKOFFSET * - ensure that timer has expired with no error * * signal SIGTOTEST is used. */ #include <stdio.h> #include <time.h> #include <signal.h> #include <unistd.h> #include <stdlib.h> #include "posixtest.h" #include "helpers.h" #define TIMEROFFSET 9 #define CLOCKOFFSET 4 #define SHORTTIME 1 #define SIGTOTEST SIGALRM struct timespec tpreset; void handler(int signo) { printf("Caught signal\n"); printf("Test PASSED\n"); setBackTime(tpreset); exit(PTS_PASS); } int main(int argc, char *argv[]) { struct sigevent ev; struct sigaction act; struct timespec tpT0, tpclock; struct itimerspec its; timer_t tid; int flags = 0; /* * set up sigevent for timer * set up sigaction to catch signal */ ev.sigev_notify = SIGEV_SIGNAL; ev.sigev_signo = SIGTOTEST; act.sa_handler=handler; act.sa_flags=0; if (sigemptyset(&act.sa_mask) != 0) { perror("sigemptyset() was not successful\n"); return PTS_UNRESOLVED; } if (sigaction(SIGTOTEST, &act, 0) != 0) { perror("sigaction() was not successful\n"); return PTS_UNRESOLVED; } if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) { perror("clock_gettime() was not successful\n"); return PTS_UNRESOLVED; } if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) { perror("timer_create() did not return success\n"); return PTS_UNRESOLVED; } flags |= TIMER_ABSTIME; its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0; its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET; its.it_value.tv_nsec = tpT0.tv_nsec; if (timer_settime(tid, flags, &its, NULL) != 0) { perror("timer_settime() did not return success\n"); return PTS_UNRESOLVED; } tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET; tpclock.tv_nsec = its.it_value.tv_nsec; getBeforeTime(&tpreset); if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) { printf("clock_settime() was not successful\n"); return PTS_UNRESOLVED; } sleep(SHORTTIME); printf("timer should have expired _immediately_\n"); tpreset.tv_sec += SHORTTIME; setBackTime(tpreset); return PTS_FAIL; }
27.29
92
(translation_unit) "/* \n * Copyright (c) 2002, Intel Corporation. All rights reserved.\n * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com\n * This file is licensed under the GPL license. For the full content\n * of this license, see the COPYING file at the top level of this \n * source tree.\n *\n * Test that if clock_settime() changes the value for CLOCK_REALTIME,\n * an absolute timer which would now have expired in the past\n * will expire immediately (with no error).\n *\n * Steps:\n * - get time T0\n * - create/enable a timer to expire at T1 = T0 + TIMEROFFSET\n * - set time forward to T1 + CLOCKOFFSET\n * - ensure that timer has expired with no error\n *\n * signal SIGTOTEST is used.\n */\n#include <stdio.h>\n#include <time.h>\n#include <signal.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include "posixtest.h"\n#include "helpers.h"\n\n#define TIMEROFFSET 9\n#define CLOCKOFFSET 4\n\n#define SHORTTIME 1\n\n#define SIGTOTEST SIGALRM\n\nstruct timespec tpreset;\n\nvoid handler(int signo)\n{\n printf("Caught signal\n");\n printf("Test PASSED\n");\n setBackTime(tpreset);\n exit(PTS_PASS);\n}\n\nint main(int argc, char *argv[])\n{\n struct sigevent ev;\n struct sigaction act;\n struct timespec tpT0, tpclock;\n struct itimerspec its;\n timer_t tid;\n int flags = 0;\n\n /*\n * set up sigevent for timer\n * set up sigaction to catch signal\n */\n ev.sigev_notify = SIGEV_SIGNAL;\n ev.sigev_signo = SIGTOTEST;\n\n act.sa_handler=handler;\n act.sa_flags=0;\n\n if (sigemptyset(&act.sa_mask) != 0) {\n perror("sigemptyset() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (sigaction(SIGTOTEST, &act, 0) != 0) {\n perror("sigaction() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n perror("clock_gettime() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n perror("timer_create() did not return success\n");\n return PTS_UNRESOLVED;\n }\n\n flags |= TIMER_ABSTIME;\n its.it_interval.tv_sec = 0;\n its.it_interval.tv_nsec = 0;\n its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET;\n its.it_value.tv_nsec = tpT0.tv_nsec;\n if (timer_settime(tid, flags, &its, NULL) != 0) {\n perror("timer_settime() did not return success\n");\n return PTS_UNRESOLVED;\n }\n\n tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET;\n tpclock.tv_nsec = its.it_value.tv_nsec;\n getBeforeTime(&tpreset);\n if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n printf("clock_settime() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n sleep(SHORTTIME);\n printf("timer should have expired _immediately_\n");\n tpreset.tv_sec += SHORTTIME;\n setBackTime(tpreset);\n return PTS_FAIL;\n}\n" (comment) "/* \n * Copyright (c) 2002, Intel Corporation. All rights reserved.\n * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com\n * This file is licensed under the GPL license. For the full content\n * of this license, see the COPYING file at the top level of this \n * source tree.\n *\n * Test that if clock_settime() changes the value for CLOCK_REALTIME,\n * an absolute timer which would now have expired in the past\n * will expire immediately (with no error).\n *\n * Steps:\n * - get time T0\n * - create/enable a timer to expire at T1 = T0 + TIMEROFFSET\n * - set time forward to T1 + CLOCKOFFSET\n * - ensure that timer has expired with no error\n *\n * signal SIGTOTEST is used.\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <time.h>\n" (#include) "#include" (system_lib_string) "<time.h>" (preproc_include) "#include <signal.h>\n" (#include) "#include" (system_lib_string) "<signal.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include "posixtest.h"\n" (#include) "#include" (string_literal) ""posixtest.h"" (") """ (string_content) "posixtest.h" (") """ (preproc_include) "#include "helpers.h"\n" (#include) "#include" (string_literal) ""helpers.h"" (") """ (string_content) "helpers.h" (") """ (preproc_def) "#define TIMEROFFSET 9\n" (#define) "#define" (identifier) "TIMEROFFSET" (preproc_arg) "9" (preproc_def) "#define CLOCKOFFSET 4\n" (#define) "#define" (identifier) "CLOCKOFFSET" (preproc_arg) "4" (preproc_def) "#define SHORTTIME 1\n" (#define) "#define" (identifier) "SHORTTIME" (preproc_arg) "1" (preproc_def) "#define SIGTOTEST SIGALRM\n" (#define) "#define" (identifier) "SIGTOTEST" (preproc_arg) "SIGALRM" (declaration) "struct timespec tpreset;" (struct_specifier) "struct timespec" (struct) "struct" (type_identifier) "timespec" (identifier) "tpreset" (;) ";" (function_definition) "void handler(int signo)\n{\n printf("Caught signal\n");\n printf("Test PASSED\n");\n setBackTime(tpreset);\n exit(PTS_PASS);\n}" (primitive_type) "void" (function_declarator) "handler(int signo)" (identifier) "handler" (parameter_list) "(int signo)" (() "(" (parameter_declaration) "int signo" (primitive_type) "int" (identifier) "signo" ()) ")" (compound_statement) "{\n printf("Caught signal\n");\n printf("Test PASSED\n");\n setBackTime(tpreset);\n exit(PTS_PASS);\n}" ({) "{" (expression_statement) "printf("Caught signal\n");" (call_expression) "printf("Caught signal\n")" (identifier) "printf" (argument_list) "("Caught signal\n")" (() "(" (string_literal) ""Caught signal\n"" (") """ (string_content) "Caught signal" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("Test PASSED\n");" (call_expression) "printf("Test PASSED\n")" (identifier) "printf" (argument_list) "("Test PASSED\n")" (() "(" (string_literal) ""Test PASSED\n"" (") """ (string_content) "Test PASSED" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "setBackTime(tpreset);" (call_expression) "setBackTime(tpreset)" (identifier) "setBackTime" (argument_list) "(tpreset)" (() "(" (identifier) "tpreset" ()) ")" (;) ";" (expression_statement) "exit(PTS_PASS);" (call_expression) "exit(PTS_PASS)" (identifier) "exit" (argument_list) "(PTS_PASS)" (() "(" (identifier) "PTS_PASS" ()) ")" (;) ";" (}) "}" (function_definition) "int main(int argc, char *argv[])\n{\n struct sigevent ev;\n struct sigaction act;\n struct timespec tpT0, tpclock;\n struct itimerspec its;\n timer_t tid;\n int flags = 0;\n\n /*\n * set up sigevent for timer\n * set up sigaction to catch signal\n */\n ev.sigev_notify = SIGEV_SIGNAL;\n ev.sigev_signo = SIGTOTEST;\n\n act.sa_handler=handler;\n act.sa_flags=0;\n\n if (sigemptyset(&act.sa_mask) != 0) {\n perror("sigemptyset() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (sigaction(SIGTOTEST, &act, 0) != 0) {\n perror("sigaction() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n perror("clock_gettime() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n perror("timer_create() did not return success\n");\n return PTS_UNRESOLVED;\n }\n\n flags |= TIMER_ABSTIME;\n its.it_interval.tv_sec = 0;\n its.it_interval.tv_nsec = 0;\n its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET;\n its.it_value.tv_nsec = tpT0.tv_nsec;\n if (timer_settime(tid, flags, &its, NULL) != 0) {\n perror("timer_settime() did not return success\n");\n return PTS_UNRESOLVED;\n }\n\n tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET;\n tpclock.tv_nsec = its.it_value.tv_nsec;\n getBeforeTime(&tpreset);\n if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n printf("clock_settime() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n sleep(SHORTTIME);\n printf("timer should have expired _immediately_\n");\n tpreset.tv_sec += SHORTTIME;\n setBackTime(tpreset);\n return PTS_FAIL;\n}" (primitive_type) "int" (function_declarator) "main(int argc, char *argv[])" (identifier) "main" (parameter_list) "(int argc, char *argv[])" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char *argv[]" (primitive_type) "char" (pointer_declarator) "*argv[]" (*) "*" (array_declarator) "argv[]" (identifier) "argv" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n struct sigevent ev;\n struct sigaction act;\n struct timespec tpT0, tpclock;\n struct itimerspec its;\n timer_t tid;\n int flags = 0;\n\n /*\n * set up sigevent for timer\n * set up sigaction to catch signal\n */\n ev.sigev_notify = SIGEV_SIGNAL;\n ev.sigev_signo = SIGTOTEST;\n\n act.sa_handler=handler;\n act.sa_flags=0;\n\n if (sigemptyset(&act.sa_mask) != 0) {\n perror("sigemptyset() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (sigaction(SIGTOTEST, &act, 0) != 0) {\n perror("sigaction() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n perror("clock_gettime() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n perror("timer_create() did not return success\n");\n return PTS_UNRESOLVED;\n }\n\n flags |= TIMER_ABSTIME;\n its.it_interval.tv_sec = 0;\n its.it_interval.tv_nsec = 0;\n its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET;\n its.it_value.tv_nsec = tpT0.tv_nsec;\n if (timer_settime(tid, flags, &its, NULL) != 0) {\n perror("timer_settime() did not return success\n");\n return PTS_UNRESOLVED;\n }\n\n tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET;\n tpclock.tv_nsec = its.it_value.tv_nsec;\n getBeforeTime(&tpreset);\n if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n printf("clock_settime() was not successful\n");\n return PTS_UNRESOLVED;\n }\n\n sleep(SHORTTIME);\n printf("timer should have expired _immediately_\n");\n tpreset.tv_sec += SHORTTIME;\n setBackTime(tpreset);\n return PTS_FAIL;\n}" ({) "{" (declaration) "struct sigevent ev;" (struct_specifier) "struct sigevent" (struct) "struct" (type_identifier) "sigevent" (identifier) "ev" (;) ";" (declaration) "struct sigaction act;" (struct_specifier) "struct sigaction" (struct) "struct" (type_identifier) "sigaction" (identifier) "act" (;) ";" (declaration) "struct timespec tpT0, tpclock;" (struct_specifier) "struct timespec" (struct) "struct" (type_identifier) "timespec" (identifier) "tpT0" (,) "," (identifier) "tpclock" (;) ";" (declaration) "struct itimerspec its;" (struct_specifier) "struct itimerspec" (struct) "struct" (type_identifier) "itimerspec" (identifier) "its" (;) ";" (declaration) "timer_t tid;" (type_identifier) "timer_t" (identifier) "tid" (;) ";" (declaration) "int flags = 0;" (primitive_type) "int" (init_declarator) "flags = 0" (identifier) "flags" (=) "=" (number_literal) "0" (;) ";" (comment) "/*\n * set up sigevent for timer\n * set up sigaction to catch signal\n */" (expression_statement) "ev.sigev_notify = SIGEV_SIGNAL;" (assignment_expression) "ev.sigev_notify = SIGEV_SIGNAL" (field_expression) "ev.sigev_notify" (identifier) "ev" (.) "." (field_identifier) "sigev_notify" (=) "=" (identifier) "SIGEV_SIGNAL" (;) ";" (expression_statement) "ev.sigev_signo = SIGTOTEST;" (assignment_expression) "ev.sigev_signo = SIGTOTEST" (field_expression) "ev.sigev_signo" (identifier) "ev" (.) "." (field_identifier) "sigev_signo" (=) "=" (identifier) "SIGTOTEST" (;) ";" (expression_statement) "act.sa_handler=handler;" (assignment_expression) "act.sa_handler=handler" (field_expression) "act.sa_handler" (identifier) "act" (.) "." (field_identifier) "sa_handler" (=) "=" (identifier) "handler" (;) ";" (expression_statement) "act.sa_flags=0;" (assignment_expression) "act.sa_flags=0" (field_expression) "act.sa_flags" (identifier) "act" (.) "." (field_identifier) "sa_flags" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if (sigemptyset(&act.sa_mask) != 0) {\n perror("sigemptyset() was not successful\n");\n return PTS_UNRESOLVED;\n }" (if) "if" (parenthesized_expression) "(sigemptyset(&act.sa_mask) != 0)" (() "(" (binary_expression) "sigemptyset(&act.sa_mask) != 0" (call_expression) "sigemptyset(&act.sa_mask)" (identifier) "sigemptyset" (argument_list) "(&act.sa_mask)" (() "(" (pointer_expression) "&act.sa_mask" (&) "&" (field_expression) "act.sa_mask" (identifier) "act" (.) "." (field_identifier) "sa_mask" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("sigemptyset() was not successful\n");\n return PTS_UNRESOLVED;\n }" ({) "{" (expression_statement) "perror("sigemptyset() was not successful\n");" (call_expression) "perror("sigemptyset() was not successful\n")" (identifier) "perror" (argument_list) "("sigemptyset() was not successful\n")" (() "(" (string_literal) ""sigemptyset() was not successful\n"" (") """ (string_content) "sigemptyset() was not successful" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return PTS_UNRESOLVED;" (return) "return" (identifier) "PTS_UNRESOLVED" (;) ";" (}) "}" (if_statement) "if (sigaction(SIGTOTEST, &act, 0) != 0) {\n perror("sigaction() was not successful\n");\n return PTS_UNRESOLVED;\n }" (if) "if" (parenthesized_expression) "(sigaction(SIGTOTEST, &act, 0) != 0)" (() "(" (binary_expression) "sigaction(SIGTOTEST, &act, 0) != 0" (call_expression) "sigaction(SIGTOTEST, &act, 0)" (identifier) "sigaction" (argument_list) "(SIGTOTEST, &act, 0)" (() "(" (identifier) "SIGTOTEST" (,) "," (pointer_expression) "&act" (&) "&" (identifier) "act" (,) "," (number_literal) "0" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("sigaction() was not successful\n");\n return PTS_UNRESOLVED;\n }" ({) "{" (expression_statement) "perror("sigaction() was not successful\n");" (call_expression) "perror("sigaction() was not successful\n")" (identifier) "perror" (argument_list) "("sigaction() was not successful\n")" (() "(" (string_literal) ""sigaction() was not successful\n"" (") """ (string_content) "sigaction() was not successful" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return PTS_UNRESOLVED;" (return) "return" (identifier) "PTS_UNRESOLVED" (;) ";" (}) "}" (if_statement) "if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n perror("clock_gettime() was not successful\n");\n return PTS_UNRESOLVED;\n }" (if) "if" (parenthesized_expression) "(clock_gettime(CLOCK_REALTIME, &tpT0) != 0)" (() "(" (binary_expression) "clock_gettime(CLOCK_REALTIME, &tpT0) != 0" (call_expression) "clock_gettime(CLOCK_REALTIME, &tpT0)" (identifier) "clock_gettime" (argument_list) "(CLOCK_REALTIME, &tpT0)" (() "(" (identifier) "CLOCK_REALTIME" (,) "," (pointer_expression) "&tpT0" (&) "&" (identifier) "tpT0" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("clock_gettime() was not successful\n");\n return PTS_UNRESOLVED;\n }" ({) "{" (expression_statement) "perror("clock_gettime() was not successful\n");" (call_expression) "perror("clock_gettime() was not successful\n")" (identifier) "perror" (argument_list) "("clock_gettime() was not successful\n")" (() "(" (string_literal) ""clock_gettime() was not successful\n"" (") """ (string_content) "clock_gettime() was not successful" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return PTS_UNRESOLVED;" (return) "return" (identifier) "PTS_UNRESOLVED" (;) ";" (}) "}" (if_statement) "if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n perror("timer_create() did not return success\n");\n return PTS_UNRESOLVED;\n }" (if) "if" (parenthesized_expression) "(timer_create(CLOCK_REALTIME, &ev, &tid) != 0)" (() "(" (binary_expression) "timer_create(CLOCK_REALTIME, &ev, &tid) != 0" (call_expression) "timer_create(CLOCK_REALTIME, &ev, &tid)" (identifier) "timer_create" (argument_list) "(CLOCK_REALTIME, &ev, &tid)" (() "(" (identifier) "CLOCK_REALTIME" (,) "," (pointer_expression) "&ev" (&) "&" (identifier) "ev" (,) "," (pointer_expression) "&tid" (&) "&" (identifier) "tid" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("timer_create() did not return success\n");\n return PTS_UNRESOLVED;\n }" ({) "{" (expression_statement) "perror("timer_create() did not return success\n");" (call_expression) "perror("timer_create() did not return success\n")" (identifier) "perror" (argument_list) "("timer_create() did not return success\n")" (() "(" (string_literal) ""timer_create() did not return success\n"" (") """ (string_content) "timer_create() did not return success" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return PTS_UNRESOLVED;" (return) "return" (identifier) "PTS_UNRESOLVED" (;) ";" (}) "}" (expression_statement) "flags |= TIMER_ABSTIME;" (assignment_expression) "flags |= TIMER_ABSTIME" (identifier) "flags" (|=) "|=" (identifier) "TIMER_ABSTIME" (;) ";" (expression_statement) "its.it_interval.tv_sec = 0;" (assignment_expression) "its.it_interval.tv_sec = 0" (field_expression) "its.it_interval.tv_sec" (field_expression) "its.it_interval" (identifier) "its" (.) "." (field_identifier) "it_interval" (.) "." (field_identifier) "tv_sec" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "its.it_interval.tv_nsec = 0;" (assignment_expression) "its.it_interval.tv_nsec = 0" (field_expression) "its.it_interval.tv_nsec" (field_expression) "its.it_interval" (identifier) "its" (.) "." (field_identifier) "it_interval" (.) "." (field_identifier) "tv_nsec" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET;" (assignment_expression) "its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET" (field_expression) "its.it_value.tv_sec" (field_expression) "its.it_value" (identifier) "its" (.) "." (field_identifier) "it_value" (.) "." (field_identifier) "tv_sec" (=) "=" (binary_expression) "tpT0.tv_sec + TIMEROFFSET" (field_expression) "tpT0.tv_sec" (identifier) "tpT0" (.) "." (field_identifier) "tv_sec" (+) "+" (identifier) "TIMEROFFSET" (;) ";" (expression_statement) "its.it_value.tv_nsec = tpT0.tv_nsec;" (assignment_expression) "its.it_value.tv_nsec = tpT0.tv_nsec" (field_expression) "its.it_value.tv_nsec" (field_expression) "its.it_value" (identifier) "its" (.) "." (field_identifier) "it_value" (.) "." (field_identifier) "tv_nsec" (=) "=" (field_expression) "tpT0.tv_nsec" (identifier) "tpT0" (.) "." (field_identifier) "tv_nsec" (;) ";" (if_statement) "if (timer_settime(tid, flags, &its, NULL) != 0) {\n perror("timer_settime() did not return success\n");\n return PTS_UNRESOLVED;\n }" (if) "if" (parenthesized_expression) "(timer_settime(tid, flags, &its, NULL) != 0)" (() "(" (binary_expression) "timer_settime(tid, flags, &its, NULL) != 0" (call_expression) "timer_settime(tid, flags, &its, NULL)" (identifier) "timer_settime" (argument_list) "(tid, flags, &its, NULL)" (() "(" (identifier) "tid" (,) "," (identifier) "flags" (,) "," (pointer_expression) "&its" (&) "&" (identifier) "its" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("timer_settime() did not return success\n");\n return PTS_UNRESOLVED;\n }" ({) "{" (expression_statement) "perror("timer_settime() did not return success\n");" (call_expression) "perror("timer_settime() did not return success\n")" (identifier) "perror" (argument_list) "("timer_settime() did not return success\n")" (() "(" (string_literal) ""timer_settime() did not return success\n"" (") """ (string_content) "timer_settime() did not return success" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return PTS_UNRESOLVED;" (return) "return" (identifier) "PTS_UNRESOLVED" (;) ";" (}) "}" (expression_statement) "tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET;" (assignment_expression) "tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET" (field_expression) "tpclock.tv_sec" (identifier) "tpclock" (.) "." (field_identifier) "tv_sec" (=) "=" (binary_expression) "its.it_value.tv_sec + CLOCKOFFSET" (field_expression) "its.it_value.tv_sec" (field_expression) "its.it_value" (identifier) "its" (.) "." (field_identifier) "it_value" (.) "." (field_identifier) "tv_sec" (+) "+" (identifier) "CLOCKOFFSET" (;) ";" (expression_statement) "tpclock.tv_nsec = its.it_value.tv_nsec;" (assignment_expression) "tpclock.tv_nsec = its.it_value.tv_nsec" (field_expression) "tpclock.tv_nsec" (identifier) "tpclock" (.) "." (field_identifier) "tv_nsec" (=) "=" (field_expression) "its.it_value.tv_nsec" (field_expression) "its.it_value" (identifier) "its" (.) "." (field_identifier) "it_value" (.) "." (field_identifier) "tv_nsec" (;) ";" (expression_statement) "getBeforeTime(&tpreset);" (call_expression) "getBeforeTime(&tpreset)" (identifier) "getBeforeTime" (argument_list) "(&tpreset)" (() "(" (pointer_expression) "&tpreset" (&) "&" (identifier) "tpreset" ()) ")" (;) ";" (if_statement) "if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n printf("clock_settime() was not successful\n");\n return PTS_UNRESOLVED;\n }" (if) "if" (parenthesized_expression) "(clock_settime(CLOCK_REALTIME, &tpclock) != 0)" (() "(" (binary_expression) "clock_settime(CLOCK_REALTIME, &tpclock) != 0" (call_expression) "clock_settime(CLOCK_REALTIME, &tpclock)" (identifier) "clock_settime" (argument_list) "(CLOCK_REALTIME, &tpclock)" (() "(" (identifier) "CLOCK_REALTIME" (,) "," (pointer_expression) "&tpclock" (&) "&" (identifier) "tpclock" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n printf("clock_settime() was not successful\n");\n return PTS_UNRESOLVED;\n }" ({) "{" (expression_statement) "printf("clock_settime() was not successful\n");" (call_expression) "printf("clock_settime() was not successful\n")" (identifier) "printf" (argument_list) "("clock_settime() was not successful\n")" (() "(" (string_literal) ""clock_settime() was not successful\n"" (") """ (string_content) "clock_settime() was not successful" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return PTS_UNRESOLVED;" (return) "return" (identifier) "PTS_UNRESOLVED" (;) ";" (}) "}" (expression_statement) "sleep(SHORTTIME);" (call_expression) "sleep(SHORTTIME)" (identifier) "sleep" (argument_list) "(SHORTTIME)" (() "(" (identifier) "SHORTTIME" ()) ")" (;) ";" (expression_statement) "printf("timer should have expired _immediately_\n");" (call_expression) "printf("timer should have expired _immediately_\n")" (identifier) "printf" (argument_list) "("timer should have expired _immediately_\n")" (() "(" (string_literal) ""timer should have expired _immediately_\n"" (") """ (string_content) "timer should have expired _immediately_" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "tpreset.tv_sec += SHORTTIME;" (assignment_expression) "tpreset.tv_sec += SHORTTIME" (field_expression) "tpreset.tv_sec" (identifier) "tpreset" (.) "." (field_identifier) "tv_sec" (+=) "+=" (identifier) "SHORTTIME" (;) ";" (expression_statement) "setBackTime(tpreset);" (call_expression) "setBackTime(tpreset)" (identifier) "setBackTime" (argument_list) "(tpreset)" (() "(" (identifier) "tpreset" ()) ")" (;) ";" (return_statement) "return PTS_FAIL;" (return) "return" (identifier) "PTS_FAIL" (;) ";" (}) "}"
581
0
{"language": "c", "success": true, "metadata": {"lines": 92, "avg_line_length": 27.29, "nodes": 343, "errors": 0, "source_hash": "33f959ad8bcc5a25514120300d784f6ee91b092b91449978b19a98e05614005f", "categorized_nodes": 267}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <time.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<time.h>", "parent": 3, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include <signal.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<signal.h>", "parent": 6, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<unistd.h>", "parent": 9, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include \"posixtest.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"posixtest.h\"", "parent": 15, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 22}}, {"id": 18, "type": "preproc_include", "text": "#include \"helpers.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"helpers.h\"", "parent": 18, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 20}}, {"id": 21, "type": "preproc_def", "text": "#define TIMEROFFSET 9\n", "parent": null, "children": [22, 23, 24], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 23, "type": "identifier", "text": "TIMEROFFSET", "parent": 21, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 19}}, {"id": 24, "type": "preproc_arg", "text": "9", "parent": 21, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 21}}, {"id": 25, "type": "preproc_def", "text": "#define CLOCKOFFSET 4\n", "parent": null, "children": [26, 27, 28], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 27, "type": "identifier", "text": "CLOCKOFFSET", "parent": 25, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 19}}, {"id": 28, "type": "preproc_arg", "text": "4", "parent": 25, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 21}}, {"id": 29, "type": "preproc_def", "text": "#define SHORTTIME 1\n", "parent": null, "children": [30, 31, 32], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 31, "type": "identifier", "text": "SHORTTIME", "parent": 29, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 17}}, {"id": 32, "type": "preproc_arg", "text": "1", "parent": 29, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 19}}, {"id": 33, "type": "preproc_def", "text": "#define SIGTOTEST SIGALRM\n", "parent": null, "children": [34, 35, 36], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 34, "type": "#define", "text": "#define", "parent": 33, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 35, "type": "identifier", "text": "SIGTOTEST", "parent": 33, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 17}}, {"id": 36, "type": "preproc_arg", "text": "SIGALRM", "parent": 33, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 25}}, {"id": 37, "type": "declaration", "text": "struct timespec tpreset;", "parent": null, "children": [38, 41], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 24}}, {"id": 38, "type": "struct_specifier", "text": "struct timespec", "parent": 37, "children": [39, 40], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 15}}, {"id": 39, "type": "struct", "text": "struct", "parent": 38, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 40, "type": "type_identifier", "text": "timespec", "parent": 38, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 15}}, {"id": 41, "type": "identifier", "text": "tpreset", "parent": 37, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 23}}, {"id": 42, "type": "function_definition", "text": "void handler(int signo)\n{\n\tprintf(\"Caught signal\\n\");\n\tprintf(\"Test PASSED\\n\");\n\tsetBackTime(tpreset);\n\texit(PTS_PASS);\n}", "parent": null, "children": [43, 44], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 4}}, {"id": 44, "type": "function_declarator", "text": "handler(int signo)", "parent": 42, "children": [45, 46], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 23}}, {"id": 45, "type": "identifier", "text": "handler", "parent": 44, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 12}}, {"id": 46, "type": "parameter_list", "text": "(int signo)", "parent": 44, "children": [47], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 23}}, {"id": 47, "type": "parameter_declaration", "text": "int signo", "parent": 46, "children": [48, 49], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 22}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 16}}, {"id": 49, "type": "identifier", "text": "signo", "parent": 47, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 22}}, {"id": 50, "type": "call_expression", "text": "printf(\"Caught signal\\n\")", "parent": 42, "children": [51, 52], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 26}}, {"id": 51, "type": "identifier", "text": "printf", "parent": 50, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 7}}, {"id": 52, "type": "argument_list", "text": "(\"Caught signal\\n\")", "parent": 50, "children": [53], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 26}}, {"id": 53, "type": "string_literal", "text": "\"Caught signal\\n\"", "parent": 52, "children": [54], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 25}}, {"id": 54, "type": "escape_sequence", "text": "\\n", "parent": 53, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 24}}, {"id": 55, "type": "call_expression", "text": "printf(\"Test PASSED\\n\")", "parent": 42, "children": [56, 57], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 24}}, {"id": 56, "type": "identifier", "text": "printf", "parent": 55, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 7}}, {"id": 57, "type": "argument_list", "text": "(\"Test PASSED\\n\")", "parent": 55, "children": [58], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 24}}, {"id": 58, "type": "string_literal", "text": "\"Test PASSED\\n\"", "parent": 57, "children": [59], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 23}}, {"id": 59, "type": "escape_sequence", "text": "\\n", "parent": 58, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 22}}, {"id": 60, "type": "call_expression", "text": "setBackTime(tpreset)", "parent": 42, "children": [61, 62], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 21}}, {"id": 61, "type": "identifier", "text": "setBackTime", "parent": 60, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 12}}, {"id": 62, "type": "argument_list", "text": "(tpreset)", "parent": 60, "children": [63], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 21}}, {"id": 63, "type": "identifier", "text": "tpreset", "parent": 62, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 20}}, {"id": 64, "type": "call_expression", "text": "exit(PTS_PASS)", "parent": 42, "children": [65, 66], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 15}}, {"id": 65, "type": "identifier", "text": "exit", "parent": 64, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 66, "type": "argument_list", "text": "(PTS_PASS)", "parent": 64, "children": [67], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 15}}, {"id": 67, "type": "identifier", "text": "PTS_PASS", "parent": 66, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 14}}, {"id": 68, "type": "function_definition", "text": "int main(int argc, char *argv[])\n{\n\tstruct sigevent ev;\n\tstruct sigaction act;\n\tstruct timespec tpT0, tpclock;\n\tstruct itimerspec its;\n\ttimer_t tid;\n\tint flags = 0;\n\n\t/*\n\t * set up sigevent for timer\n\t * set up sigaction to catch signal\n\t */\n\tev.sigev_notify = SIGEV_SIGNAL;\n\tev.sigev_signo = SIGTOTEST;\n\n\tact.sa_handler=handler;\n\tact.sa_flags=0;\n\n\tif (sigemptyset(&act.sa_mask) != 0) {\n\t\tperror(\"sigemptyset() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tif (sigaction(SIGTOTEST, &act, 0) != 0) {\n\t\tperror(\"sigaction() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tif (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n\t\tperror(\"clock_gettime() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n \tif (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n\t\tperror(\"timer_create() did not return success\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tflags |= TIMER_ABSTIME;\n\tits.it_interval.tv_sec = 0;\n\tits.it_interval.tv_nsec = 0;\n\tits.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET;\n\tits.it_value.tv_nsec = tpT0.tv_nsec;\n\tif (timer_settime(tid, flags, &its, NULL) != 0) {\n\t\tperror(\"timer_settime() did not return success\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\ttpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET;\n\ttpclock.tv_nsec = its.it_value.tv_nsec;\n\tgetBeforeTime(&tpreset);\n\tif (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n\t\tprintf(\"clock_settime() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tsleep(SHORTTIME);\n\tprintf(\"timer should have expired _immediately_\\n\");\n\ttpreset.tv_sec += SHORTTIME;\n\tsetBackTime(tpreset);\n\treturn PTS_FAIL;\n}", "parent": null, "children": [69, 70], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 106, "column": 1}}, {"id": 69, "type": "primitive_type", "text": "int", "parent": 68, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 3}}, {"id": 70, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 68, "children": [71, 72], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 32}}, {"id": 71, "type": "identifier", "text": "main", "parent": 70, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 8}}, {"id": 72, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 70, "children": [73, 76], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 32}}, {"id": 73, "type": "parameter_declaration", "text": "int argc", "parent": 72, "children": [74, 75], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 17}}, {"id": 74, "type": "primitive_type", "text": "int", "parent": 73, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 12}}, {"id": 75, "type": "identifier", "text": "argc", "parent": 73, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 17}}, {"id": 76, "type": "parameter_declaration", "text": "char *argv[]", "parent": 72, "children": [77, 78], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 31}}, {"id": 77, "type": "primitive_type", "text": "char", "parent": 76, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 23}}, {"id": 78, "type": "pointer_declarator", "text": "*argv[]", "parent": 76, "children": [79, 80], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 31}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 25}}, {"id": 80, "type": "array_declarator", "text": "argv[]", "parent": 78, "children": [81], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 31}}, {"id": 81, "type": "identifier", "text": "argv", "parent": 80, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 29}}, {"id": 82, "type": "declaration", "text": "struct sigevent ev;", "parent": 68, "children": [83, 86], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 20}}, {"id": 83, "type": "struct_specifier", "text": "struct sigevent", "parent": 82, "children": [84, 85], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 16}}, {"id": 84, "type": "struct", "text": "struct", "parent": 83, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 7}}, {"id": 85, "type": "type_identifier", "text": "sigevent", "parent": 83, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 16}}, {"id": 86, "type": "identifier", "text": "ev", "parent": 82, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 19}}, {"id": 87, "type": "declaration", "text": "struct sigaction act;", "parent": 68, "children": [88, 91], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 22}}, {"id": 88, "type": "struct_specifier", "text": "struct sigaction", "parent": 87, "children": [89, 90], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 17}}, {"id": 89, "type": "struct", "text": "struct", "parent": 88, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 7}}, {"id": 90, "type": "type_identifier", "text": "sigaction", "parent": 88, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 17}}, {"id": 91, "type": "identifier", "text": "act", "parent": 87, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 21}}, {"id": 92, "type": "declaration", "text": "struct timespec tpT0, tpclock;", "parent": 68, "children": [93, 96, 97], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 31}}, {"id": 93, "type": "struct_specifier", "text": "struct timespec", "parent": 92, "children": [94, 95], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 16}}, {"id": 94, "type": "struct", "text": "struct", "parent": 93, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 7}}, {"id": 95, "type": "type_identifier", "text": "timespec", "parent": 93, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 16}}, {"id": 96, "type": "identifier", "text": "tpT0", "parent": 92, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 21}}, {"id": 97, "type": "identifier", "text": "tpclock", "parent": 92, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 30}}, {"id": 98, "type": "declaration", "text": "struct itimerspec its;", "parent": 68, "children": [99, 102], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 23}}, {"id": 99, "type": "struct_specifier", "text": "struct itimerspec", "parent": 98, "children": [100, 101], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 18}}, {"id": 100, "type": "struct", "text": "struct", "parent": 99, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 7}}, {"id": 101, "type": "type_identifier", "text": "itimerspec", "parent": 99, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 18}}, {"id": 102, "type": "identifier", "text": "its", "parent": 98, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 22}}, {"id": 103, "type": "declaration", "text": "timer_t tid;", "parent": 68, "children": [104, 105], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 13}}, {"id": 104, "type": "type_identifier", "text": "timer_t", "parent": 103, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 8}}, {"id": 105, "type": "identifier", "text": "tid", "parent": 103, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 12}}, {"id": 106, "type": "declaration", "text": "int flags = 0;", "parent": 68, "children": [107, 108], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 15}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 106, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 4}}, {"id": 108, "type": "init_declarator", "text": "flags = 0", "parent": 106, "children": [109, 110, 111], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 14}}, {"id": 109, "type": "identifier", "text": "flags", "parent": 108, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 10}}, {"id": 110, "type": "=", "text": "=", "parent": 108, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 12}}, {"id": 111, "type": "number_literal", "text": "0", "parent": 108, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 14}}, {"id": 112, "type": "assignment_expression", "text": "ev.sigev_notify = SIGEV_SIGNAL", "parent": 68, "children": [113, 116, 117], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 31}}, {"id": 113, "type": "field_expression", "text": "ev.sigev_notify", "parent": 112, "children": [114, 115], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 16}}, {"id": 114, "type": "identifier", "text": "ev", "parent": 113, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 3}}, {"id": 115, "type": "field_identifier", "text": "sigev_notify", "parent": 113, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 16}}, {"id": 116, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 117, "type": "identifier", "text": "SIGEV_SIGNAL", "parent": 112, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 31}}, {"id": 118, "type": "assignment_expression", "text": "ev.sigev_signo = SIGTOTEST", "parent": 68, "children": [119, 122, 123], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 27}}, {"id": 119, "type": "field_expression", "text": "ev.sigev_signo", "parent": 118, "children": [120, 121], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 15}}, {"id": 120, "type": "identifier", "text": "ev", "parent": 119, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 3}}, {"id": 121, "type": "field_identifier", "text": "sigev_signo", "parent": 119, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 15}}, {"id": 122, "type": "=", "text": "=", "parent": 118, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 17}}, {"id": 123, "type": "identifier", "text": "SIGTOTEST", "parent": 118, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 27}}, {"id": 124, "type": "assignment_expression", "text": "act.sa_handler=handler", "parent": 68, "children": [125, 128, 129], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 23}}, {"id": 125, "type": "field_expression", "text": "act.sa_handler", "parent": 124, "children": [126, 127], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 15}}, {"id": 126, "type": "identifier", "text": "act", "parent": 125, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 4}}, {"id": 127, "type": "field_identifier", "text": "sa_handler", "parent": 125, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 15}}, {"id": 128, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 16}}, {"id": 129, "type": "identifier", "text": "handler", "parent": 124, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 23}}, {"id": 130, "type": "assignment_expression", "text": "act.sa_flags=0", "parent": 68, "children": [131, 134, 135], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 15}}, {"id": 131, "type": "field_expression", "text": "act.sa_flags", "parent": 130, "children": [132, 133], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 13}}, {"id": 132, "type": "identifier", "text": "act", "parent": 131, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 4}}, {"id": 133, "type": "field_identifier", "text": "sa_flags", "parent": 131, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 13}}, {"id": 134, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 14}}, {"id": 135, "type": "number_literal", "text": "0", "parent": 130, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 15}}, {"id": 136, "type": "if_statement", "text": "if (sigemptyset(&act.sa_mask) != 0) {\n\t\tperror(\"sigemptyset() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}", "parent": 68, "children": [137], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 66, "column": 2}}, {"id": 137, "type": "parenthesized_expression", "text": "(sigemptyset(&act.sa_mask) != 0)", "parent": 136, "children": [138], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 36}}, {"id": 138, "type": "binary_expression", "text": "sigemptyset(&act.sa_mask) != 0", "parent": 137, "children": [139, 146, 147], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 35}}, {"id": 139, "type": "call_expression", "text": "sigemptyset(&act.sa_mask)", "parent": 138, "children": [140, 141], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 30}}, {"id": 140, "type": "identifier", "text": "sigemptyset", "parent": 139, "children": [], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 16}}, {"id": 141, "type": "argument_list", "text": "(&act.sa_mask)", "parent": 139, "children": [142], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 30}}, {"id": 142, "type": "pointer_expression", "text": "&act.sa_mask", "parent": 141, "children": [143], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 29}}, {"id": 143, "type": "field_expression", "text": "act.sa_mask", "parent": 142, "children": [144, 145], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 29}}, {"id": 144, "type": "identifier", "text": "act", "parent": 143, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 21}}, {"id": 145, "type": "field_identifier", "text": "sa_mask", "parent": 143, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 29}}, {"id": 146, "type": "!=", "text": "!=", "parent": 138, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 33}}, {"id": 147, "type": "number_literal", "text": "0", "parent": 138, "children": [], "start_point": {"row": 63, "column": 34}, "end_point": {"row": 63, "column": 35}}, {"id": 148, "type": "call_expression", "text": "perror(\"sigemptyset() was not successful\\n\")", "parent": 136, "children": [149, 150], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 46}}, {"id": 149, "type": "identifier", "text": "perror", "parent": 148, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 8}}, {"id": 150, "type": "argument_list", "text": "(\"sigemptyset() was not successful\\n\")", "parent": 148, "children": [151], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 46}}, {"id": 151, "type": "string_literal", "text": "\"sigemptyset() was not successful\\n\"", "parent": 150, "children": [152], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 45}}, {"id": 152, "type": "escape_sequence", "text": "\\n", "parent": 151, "children": [], "start_point": {"row": 64, "column": 42}, "end_point": {"row": 64, "column": 44}}, {"id": 153, "type": "return_statement", "text": "return PTS_UNRESOLVED;", "parent": 136, "children": [154], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 24}}, {"id": 154, "type": "identifier", "text": "PTS_UNRESOLVED", "parent": 153, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 23}}, {"id": 155, "type": "if_statement", "text": "if (sigaction(SIGTOTEST, &act, 0) != 0) {\n\t\tperror(\"sigaction() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}", "parent": 68, "children": [156], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 71, "column": 2}}, {"id": 156, "type": "parenthesized_expression", "text": "(sigaction(SIGTOTEST, &act, 0) != 0)", "parent": 155, "children": [157], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 40}}, {"id": 157, "type": "binary_expression", "text": "sigaction(SIGTOTEST, &act, 0) != 0", "parent": 156, "children": [158, 165, 166], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 39}}, {"id": 158, "type": "call_expression", "text": "sigaction(SIGTOTEST, &act, 0)", "parent": 157, "children": [159, 160], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 34}}, {"id": 159, "type": "identifier", "text": "sigaction", "parent": 158, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 14}}, {"id": 160, "type": "argument_list", "text": "(SIGTOTEST, &act, 0)", "parent": 158, "children": [161, 162, 164], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 34}}, {"id": 161, "type": "identifier", "text": "SIGTOTEST", "parent": 160, "children": [], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 24}}, {"id": 162, "type": "pointer_expression", "text": "&act", "parent": 160, "children": [163], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 30}}, {"id": 163, "type": "identifier", "text": "act", "parent": 162, "children": [], "start_point": {"row": 68, "column": 27}, "end_point": {"row": 68, "column": 30}}, {"id": 164, "type": "number_literal", "text": "0", "parent": 160, "children": [], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 33}}, {"id": 165, "type": "!=", "text": "!=", "parent": 157, "children": [], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 37}}, {"id": 166, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 39}}, {"id": 167, "type": "call_expression", "text": "perror(\"sigaction() was not successful\\n\")", "parent": 155, "children": [168, 169], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 44}}, {"id": 168, "type": "identifier", "text": "perror", "parent": 167, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 8}}, {"id": 169, "type": "argument_list", "text": "(\"sigaction() was not successful\\n\")", "parent": 167, "children": [170], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 44}}, {"id": 170, "type": "string_literal", "text": "\"sigaction() was not successful\\n\"", "parent": 169, "children": [171], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 43}}, {"id": 171, "type": "escape_sequence", "text": "\\n", "parent": 170, "children": [], "start_point": {"row": 69, "column": 40}, "end_point": {"row": 69, "column": 42}}, {"id": 172, "type": "return_statement", "text": "return PTS_UNRESOLVED;", "parent": 155, "children": [173], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 24}}, {"id": 173, "type": "identifier", "text": "PTS_UNRESOLVED", "parent": 172, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 23}}, {"id": 174, "type": "if_statement", "text": "if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n\t\tperror(\"clock_gettime() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}", "parent": 68, "children": [175], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 76, "column": 2}}, {"id": 175, "type": "parenthesized_expression", "text": "(clock_gettime(CLOCK_REALTIME, &tpT0) != 0)", "parent": 174, "children": [176], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 47}}, {"id": 176, "type": "binary_expression", "text": "clock_gettime(CLOCK_REALTIME, &tpT0) != 0", "parent": 175, "children": [177, 183, 184], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 46}}, {"id": 177, "type": "call_expression", "text": "clock_gettime(CLOCK_REALTIME, &tpT0)", "parent": 176, "children": [178, 179], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 41}}, {"id": 178, "type": "identifier", "text": "clock_gettime", "parent": 177, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 18}}, {"id": 179, "type": "argument_list", "text": "(CLOCK_REALTIME, &tpT0)", "parent": 177, "children": [180, 181], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 41}}, {"id": 180, "type": "identifier", "text": "CLOCK_REALTIME", "parent": 179, "children": [], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 33}}, {"id": 181, "type": "pointer_expression", "text": "&tpT0", "parent": 179, "children": [182], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 40}}, {"id": 182, "type": "identifier", "text": "tpT0", "parent": 181, "children": [], "start_point": {"row": 73, "column": 36}, "end_point": {"row": 73, "column": 40}}, {"id": 183, "type": "!=", "text": "!=", "parent": 176, "children": [], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 44}}, {"id": 184, "type": "number_literal", "text": "0", "parent": 176, "children": [], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 46}}, {"id": 185, "type": "call_expression", "text": "perror(\"clock_gettime() was not successful\\n\")", "parent": 174, "children": [186, 187], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 48}}, {"id": 186, "type": "identifier", "text": "perror", "parent": 185, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 8}}, {"id": 187, "type": "argument_list", "text": "(\"clock_gettime() was not successful\\n\")", "parent": 185, "children": [188], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 48}}, {"id": 188, "type": "string_literal", "text": "\"clock_gettime() was not successful\\n\"", "parent": 187, "children": [189], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 47}}, {"id": 189, "type": "escape_sequence", "text": "\\n", "parent": 188, "children": [], "start_point": {"row": 74, "column": 44}, "end_point": {"row": 74, "column": 46}}, {"id": 190, "type": "return_statement", "text": "return PTS_UNRESOLVED;", "parent": 174, "children": [191], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 24}}, {"id": 191, "type": "identifier", "text": "PTS_UNRESOLVED", "parent": 190, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 23}}, {"id": 192, "type": "if_statement", "text": "if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n\t\tperror(\"timer_create() did not return success\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}", "parent": 68, "children": [193], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 81, "column": 2}}, {"id": 193, "type": "parenthesized_expression", "text": "(timer_create(CLOCK_REALTIME, &ev, &tid) != 0)", "parent": 192, "children": [194], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 51}}, {"id": 194, "type": "binary_expression", "text": "timer_create(CLOCK_REALTIME, &ev, &tid) != 0", "parent": 193, "children": [195, 203, 204], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 50}}, {"id": 195, "type": "call_expression", "text": "timer_create(CLOCK_REALTIME, &ev, &tid)", "parent": 194, "children": [196, 197], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 45}}, {"id": 196, "type": "identifier", "text": "timer_create", "parent": 195, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 18}}, {"id": 197, "type": "argument_list", "text": "(CLOCK_REALTIME, &ev, &tid)", "parent": 195, "children": [198, 199, 201], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 45}}, {"id": 198, "type": "identifier", "text": "CLOCK_REALTIME", "parent": 197, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 33}}, {"id": 199, "type": "pointer_expression", "text": "&ev", "parent": 197, "children": [200], "start_point": {"row": 78, "column": 35}, "end_point": {"row": 78, "column": 38}}, {"id": 200, "type": "identifier", "text": "ev", "parent": 199, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 38}}, {"id": 201, "type": "pointer_expression", "text": "&tid", "parent": 197, "children": [202], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 44}}, {"id": 202, "type": "identifier", "text": "tid", "parent": 201, "children": [], "start_point": {"row": 78, "column": 41}, "end_point": {"row": 78, "column": 44}}, {"id": 203, "type": "!=", "text": "!=", "parent": 194, "children": [], "start_point": {"row": 78, "column": 46}, "end_point": {"row": 78, "column": 48}}, {"id": 204, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 78, "column": 49}, "end_point": {"row": 78, "column": 50}}, {"id": 205, "type": "call_expression", "text": "perror(\"timer_create() did not return success\\n\")", "parent": 192, "children": [206, 207], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 51}}, {"id": 206, "type": "identifier", "text": "perror", "parent": 205, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 8}}, {"id": 207, "type": "argument_list", "text": "(\"timer_create() did not return success\\n\")", "parent": 205, "children": [208], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 51}}, {"id": 208, "type": "string_literal", "text": "\"timer_create() did not return success\\n\"", "parent": 207, "children": [209], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 50}}, {"id": 209, "type": "escape_sequence", "text": "\\n", "parent": 208, "children": [], "start_point": {"row": 79, "column": 47}, "end_point": {"row": 79, "column": 49}}, {"id": 210, "type": "return_statement", "text": "return PTS_UNRESOLVED;", "parent": 192, "children": [211], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 24}}, {"id": 211, "type": "identifier", "text": "PTS_UNRESOLVED", "parent": 210, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 23}}, {"id": 212, "type": "assignment_expression", "text": "flags |= TIMER_ABSTIME", "parent": 68, "children": [213, 214, 215], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 23}}, {"id": 213, "type": "identifier", "text": "flags", "parent": 212, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 6}}, {"id": 214, "type": "|=", "text": "|=", "parent": 212, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 9}}, {"id": 215, "type": "identifier", "text": "TIMER_ABSTIME", "parent": 212, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 23}}, {"id": 216, "type": "assignment_expression", "text": "its.it_interval.tv_sec = 0", "parent": 68, "children": [217, 222, 223], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 27}}, {"id": 217, "type": "field_expression", "text": "its.it_interval.tv_sec", "parent": 216, "children": [218, 221], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 23}}, {"id": 218, "type": "field_expression", "text": "its.it_interval", "parent": 217, "children": [219, 220], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 16}}, {"id": 219, "type": "identifier", "text": "its", "parent": 218, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 4}}, {"id": 220, "type": "field_identifier", "text": "it_interval", "parent": 218, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 16}}, {"id": 221, "type": "field_identifier", "text": "tv_sec", "parent": 217, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 23}}, {"id": 222, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 25}}, {"id": 223, "type": "number_literal", "text": "0", "parent": 216, "children": [], "start_point": {"row": 84, "column": 26}, "end_point": {"row": 84, "column": 27}}, {"id": 224, "type": "assignment_expression", "text": "its.it_interval.tv_nsec = 0", "parent": 68, "children": [225, 230, 231], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 28}}, {"id": 225, "type": "field_expression", "text": "its.it_interval.tv_nsec", "parent": 224, "children": [226, 229], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 24}}, {"id": 226, "type": "field_expression", "text": "its.it_interval", "parent": 225, "children": [227, 228], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 16}}, {"id": 227, "type": "identifier", "text": "its", "parent": 226, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 4}}, {"id": 228, "type": "field_identifier", "text": "it_interval", "parent": 226, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 16}}, {"id": 229, "type": "field_identifier", "text": "tv_nsec", "parent": 225, "children": [], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 24}}, {"id": 230, "type": "=", "text": "=", "parent": 224, "children": [], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 26}}, {"id": 231, "type": "number_literal", "text": "0", "parent": 224, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 28}}, {"id": 232, "type": "assignment_expression", "text": "its.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET", "parent": 68, "children": [233, 238, 239], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 48}}, {"id": 233, "type": "field_expression", "text": "its.it_value.tv_sec", "parent": 232, "children": [234, 237], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 20}}, {"id": 234, "type": "field_expression", "text": "its.it_value", "parent": 233, "children": [235, 236], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 13}}, {"id": 235, "type": "identifier", "text": "its", "parent": 234, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 4}}, {"id": 236, "type": "field_identifier", "text": "it_value", "parent": 234, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 13}}, {"id": 237, "type": "field_identifier", "text": "tv_sec", "parent": 233, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 20}}, {"id": 238, "type": "=", "text": "=", "parent": 232, "children": [], "start_point": {"row": 86, "column": 21}, "end_point": {"row": 86, "column": 22}}, {"id": 239, "type": "binary_expression", "text": "tpT0.tv_sec + TIMEROFFSET", "parent": 232, "children": [240, 243, 244], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 48}}, {"id": 240, "type": "field_expression", "text": "tpT0.tv_sec", "parent": 239, "children": [241, 242], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 34}}, {"id": 241, "type": "identifier", "text": "tpT0", "parent": 240, "children": [], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 27}}, {"id": 242, "type": "field_identifier", "text": "tv_sec", "parent": 240, "children": [], "start_point": {"row": 86, "column": 28}, "end_point": {"row": 86, "column": 34}}, {"id": 243, "type": "+", "text": "+", "parent": 239, "children": [], "start_point": {"row": 86, "column": 35}, "end_point": {"row": 86, "column": 36}}, {"id": 244, "type": "identifier", "text": "TIMEROFFSET", "parent": 239, "children": [], "start_point": {"row": 86, "column": 37}, "end_point": {"row": 86, "column": 48}}, {"id": 245, "type": "assignment_expression", "text": "its.it_value.tv_nsec = tpT0.tv_nsec", "parent": 68, "children": [246, 251, 252], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 36}}, {"id": 246, "type": "field_expression", "text": "its.it_value.tv_nsec", "parent": 245, "children": [247, 250], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 21}}, {"id": 247, "type": "field_expression", "text": "its.it_value", "parent": 246, "children": [248, 249], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 13}}, {"id": 248, "type": "identifier", "text": "its", "parent": 247, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 4}}, {"id": 249, "type": "field_identifier", "text": "it_value", "parent": 247, "children": [], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 87, "column": 13}}, {"id": 250, "type": "field_identifier", "text": "tv_nsec", "parent": 246, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 21}}, {"id": 251, "type": "=", "text": "=", "parent": 245, "children": [], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 23}}, {"id": 252, "type": "field_expression", "text": "tpT0.tv_nsec", "parent": 245, "children": [253, 254], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 36}}, {"id": 253, "type": "identifier", "text": "tpT0", "parent": 252, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 28}}, {"id": 254, "type": "field_identifier", "text": "tv_nsec", "parent": 252, "children": [], "start_point": {"row": 87, "column": 29}, "end_point": {"row": 87, "column": 36}}, {"id": 255, "type": "if_statement", "text": "if (timer_settime(tid, flags, &its, NULL) != 0) {\n\t\tperror(\"timer_settime() did not return success\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}", "parent": 68, "children": [256], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 91, "column": 2}}, {"id": 256, "type": "parenthesized_expression", "text": "(timer_settime(tid, flags, &its, NULL) != 0)", "parent": 255, "children": [257], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 48}}, {"id": 257, "type": "binary_expression", "text": "timer_settime(tid, flags, &its, NULL) != 0", "parent": 256, "children": [258, 267, 268], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 47}}, {"id": 258, "type": "call_expression", "text": "timer_settime(tid, flags, &its, NULL)", "parent": 257, "children": [259, 260], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 42}}, {"id": 259, "type": "identifier", "text": "timer_settime", "parent": 258, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 18}}, {"id": 260, "type": "argument_list", "text": "(tid, flags, &its, NULL)", "parent": 258, "children": [261, 262, 263, 265], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 42}}, {"id": 261, "type": "identifier", "text": "tid", "parent": 260, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 22}}, {"id": 262, "type": "identifier", "text": "flags", "parent": 260, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 29}}, {"id": 263, "type": "pointer_expression", "text": "&its", "parent": 260, "children": [264], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 35}}, {"id": 264, "type": "identifier", "text": "its", "parent": 263, "children": [], "start_point": {"row": 88, "column": 32}, "end_point": {"row": 88, "column": 35}}, {"id": 265, "type": "null", "text": "NULL", "parent": 260, "children": [266], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 41}}, {"id": 266, "type": "NULL", "text": "NULL", "parent": 265, "children": [], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 41}}, {"id": 267, "type": "!=", "text": "!=", "parent": 257, "children": [], "start_point": {"row": 88, "column": 43}, "end_point": {"row": 88, "column": 45}}, {"id": 268, "type": "number_literal", "text": "0", "parent": 257, "children": [], "start_point": {"row": 88, "column": 46}, "end_point": {"row": 88, "column": 47}}, {"id": 269, "type": "call_expression", "text": "perror(\"timer_settime() did not return success\\n\")", "parent": 255, "children": [270, 271], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 52}}, {"id": 270, "type": "identifier", "text": "perror", "parent": 269, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 8}}, {"id": 271, "type": "argument_list", "text": "(\"timer_settime() did not return success\\n\")", "parent": 269, "children": [272], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 52}}, {"id": 272, "type": "string_literal", "text": "\"timer_settime() did not return success\\n\"", "parent": 271, "children": [273], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 51}}, {"id": 273, "type": "escape_sequence", "text": "\\n", "parent": 272, "children": [], "start_point": {"row": 89, "column": 48}, "end_point": {"row": 89, "column": 50}}, {"id": 274, "type": "return_statement", "text": "return PTS_UNRESOLVED;", "parent": 255, "children": [275], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 24}}, {"id": 275, "type": "identifier", "text": "PTS_UNRESOLVED", "parent": 274, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 23}}, {"id": 276, "type": "assignment_expression", "text": "tpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET", "parent": 68, "children": [277, 280, 281], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 51}}, {"id": 277, "type": "field_expression", "text": "tpclock.tv_sec", "parent": 276, "children": [278, 279], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 15}}, {"id": 278, "type": "identifier", "text": "tpclock", "parent": 277, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 8}}, {"id": 279, "type": "field_identifier", "text": "tv_sec", "parent": 277, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 15}}, {"id": 280, "type": "=", "text": "=", "parent": 276, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 17}}, {"id": 281, "type": "binary_expression", "text": "its.it_value.tv_sec + CLOCKOFFSET", "parent": 276, "children": [282, 287, 288], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 51}}, {"id": 282, "type": "field_expression", "text": "its.it_value.tv_sec", "parent": 281, "children": [283, 286], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 37}}, {"id": 283, "type": "field_expression", "text": "its.it_value", "parent": 282, "children": [284, 285], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 30}}, {"id": 284, "type": "identifier", "text": "its", "parent": 283, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 21}}, {"id": 285, "type": "field_identifier", "text": "it_value", "parent": 283, "children": [], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 30}}, {"id": 286, "type": "field_identifier", "text": "tv_sec", "parent": 282, "children": [], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 37}}, {"id": 287, "type": "+", "text": "+", "parent": 281, "children": [], "start_point": {"row": 93, "column": 38}, "end_point": {"row": 93, "column": 39}}, {"id": 288, "type": "identifier", "text": "CLOCKOFFSET", "parent": 281, "children": [], "start_point": {"row": 93, "column": 40}, "end_point": {"row": 93, "column": 51}}, {"id": 289, "type": "assignment_expression", "text": "tpclock.tv_nsec = its.it_value.tv_nsec", "parent": 68, "children": [290, 293, 294], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 39}}, {"id": 290, "type": "field_expression", "text": "tpclock.tv_nsec", "parent": 289, "children": [291, 292], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 16}}, {"id": 291, "type": "identifier", "text": "tpclock", "parent": 290, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 8}}, {"id": 292, "type": "field_identifier", "text": "tv_nsec", "parent": 290, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 16}}, {"id": 293, "type": "=", "text": "=", "parent": 289, "children": [], "start_point": {"row": 94, "column": 17}, "end_point": {"row": 94, "column": 18}}, {"id": 294, "type": "field_expression", "text": "its.it_value.tv_nsec", "parent": 289, "children": [295, 298], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 39}}, {"id": 295, "type": "field_expression", "text": "its.it_value", "parent": 294, "children": [296, 297], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 31}}, {"id": 296, "type": "identifier", "text": "its", "parent": 295, "children": [], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 22}}, {"id": 297, "type": "field_identifier", "text": "it_value", "parent": 295, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 31}}, {"id": 298, "type": "field_identifier", "text": "tv_nsec", "parent": 294, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 39}}, {"id": 299, "type": "call_expression", "text": "getBeforeTime(&tpreset)", "parent": 68, "children": [300, 301], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 24}}, {"id": 300, "type": "identifier", "text": "getBeforeTime", "parent": 299, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 14}}, {"id": 301, "type": "argument_list", "text": "(&tpreset)", "parent": 299, "children": [302], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 24}}, {"id": 302, "type": "pointer_expression", "text": "&tpreset", "parent": 301, "children": [303], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 23}}, {"id": 303, "type": "identifier", "text": "tpreset", "parent": 302, "children": [], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 23}}, {"id": 304, "type": "if_statement", "text": "if (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n\t\tprintf(\"clock_settime() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}", "parent": 68, "children": [305], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 99, "column": 2}}, {"id": 305, "type": "parenthesized_expression", "text": "(clock_settime(CLOCK_REALTIME, &tpclock) != 0)", "parent": 304, "children": [306], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 50}}, {"id": 306, "type": "binary_expression", "text": "clock_settime(CLOCK_REALTIME, &tpclock) != 0", "parent": 305, "children": [307, 313, 314], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 49}}, {"id": 307, "type": "call_expression", "text": "clock_settime(CLOCK_REALTIME, &tpclock)", "parent": 306, "children": [308, 309], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 44}}, {"id": 308, "type": "identifier", "text": "clock_settime", "parent": 307, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 18}}, {"id": 309, "type": "argument_list", "text": "(CLOCK_REALTIME, &tpclock)", "parent": 307, "children": [310, 311], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 44}}, {"id": 310, "type": "identifier", "text": "CLOCK_REALTIME", "parent": 309, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 33}}, {"id": 311, "type": "pointer_expression", "text": "&tpclock", "parent": 309, "children": [312], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 43}}, {"id": 312, "type": "identifier", "text": "tpclock", "parent": 311, "children": [], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 43}}, {"id": 313, "type": "!=", "text": "!=", "parent": 306, "children": [], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 47}}, {"id": 314, "type": "number_literal", "text": "0", "parent": 306, "children": [], "start_point": {"row": 96, "column": 48}, "end_point": {"row": 96, "column": 49}}, {"id": 315, "type": "call_expression", "text": "printf(\"clock_settime() was not successful\\n\")", "parent": 304, "children": [316, 317], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 48}}, {"id": 316, "type": "identifier", "text": "printf", "parent": 315, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 8}}, {"id": 317, "type": "argument_list", "text": "(\"clock_settime() was not successful\\n\")", "parent": 315, "children": [318], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 48}}, {"id": 318, "type": "string_literal", "text": "\"clock_settime() was not successful\\n\"", "parent": 317, "children": [319], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 47}}, {"id": 319, "type": "escape_sequence", "text": "\\n", "parent": 318, "children": [], "start_point": {"row": 97, "column": 44}, "end_point": {"row": 97, "column": 46}}, {"id": 320, "type": "return_statement", "text": "return PTS_UNRESOLVED;", "parent": 304, "children": [321], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 24}}, {"id": 321, "type": "identifier", "text": "PTS_UNRESOLVED", "parent": 320, "children": [], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 98, "column": 23}}, {"id": 322, "type": "call_expression", "text": "sleep(SHORTTIME)", "parent": 68, "children": [323, 324], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 17}}, {"id": 323, "type": "identifier", "text": "sleep", "parent": 322, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 6}}, {"id": 324, "type": "argument_list", "text": "(SHORTTIME)", "parent": 322, "children": [325], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 17}}, {"id": 325, "type": "identifier", "text": "SHORTTIME", "parent": 324, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 16}}, {"id": 326, "type": "call_expression", "text": "printf(\"timer should have expired _immediately_\\n\")", "parent": 68, "children": [327, 328], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 52}}, {"id": 327, "type": "identifier", "text": "printf", "parent": 326, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 7}}, {"id": 328, "type": "argument_list", "text": "(\"timer should have expired _immediately_\\n\")", "parent": 326, "children": [329], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 52}}, {"id": 329, "type": "string_literal", "text": "\"timer should have expired _immediately_\\n\"", "parent": 328, "children": [330], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 51}}, {"id": 330, "type": "escape_sequence", "text": "\\n", "parent": 329, "children": [], "start_point": {"row": 102, "column": 48}, "end_point": {"row": 102, "column": 50}}, {"id": 331, "type": "assignment_expression", "text": "tpreset.tv_sec += SHORTTIME", "parent": 68, "children": [332, 335, 336], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 28}}, {"id": 332, "type": "field_expression", "text": "tpreset.tv_sec", "parent": 331, "children": [333, 334], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 15}}, {"id": 333, "type": "identifier", "text": "tpreset", "parent": 332, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 8}}, {"id": 334, "type": "field_identifier", "text": "tv_sec", "parent": 332, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 15}}, {"id": 335, "type": "+=", "text": "+=", "parent": 331, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 18}}, {"id": 336, "type": "identifier", "text": "SHORTTIME", "parent": 331, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 28}}, {"id": 337, "type": "call_expression", "text": "setBackTime(tpreset)", "parent": 68, "children": [338, 339], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 21}}, {"id": 338, "type": "identifier", "text": "setBackTime", "parent": 337, "children": [], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 12}}, {"id": 339, "type": "argument_list", "text": "(tpreset)", "parent": 337, "children": [340], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 21}}, {"id": 340, "type": "identifier", "text": "tpreset", "parent": 339, "children": [], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 20}}, {"id": 341, "type": "return_statement", "text": "return PTS_FAIL;", "parent": 68, "children": [342], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 17}}, {"id": 342, "type": "identifier", "text": "PTS_FAIL", "parent": 341, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 16}}]}, "node_categories": {"declarations": {"functions": [42, 44, 68, 70], "variables": [37, 47, 73, 76, 82, 87, 92, 98, 103, 106], "classes": [38, 39, 83, 84, 88, 89, 93, 94, 99, 100], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [50, 55, 60, 64, 113, 119, 125, 131, 137, 138, 139, 142, 143, 148, 156, 157, 158, 162, 167, 175, 176, 177, 181, 185, 193, 194, 195, 199, 201, 205, 217, 218, 225, 226, 233, 234, 239, 240, 246, 247, 252, 256, 257, 258, 263, 269, 277, 281, 282, 283, 290, 294, 295, 299, 302, 305, 306, 307, 311, 315, 322, 326, 332, 337], "assignments": [112, 118, 124, 130, 212, 216, 224, 232, 245, 276, 289, 331], "loops": [], "conditionals": [23, 27, 31, 35, 40, 41, 45, 49, 51, 56, 61, 63, 65, 67, 71, 75, 81, 85, 86, 90, 91, 95, 96, 97, 101, 102, 104, 105, 109, 114, 115, 117, 120, 121, 123, 126, 127, 129, 132, 133, 136, 140, 144, 145, 149, 154, 155, 159, 161, 163, 168, 173, 174, 178, 180, 182, 186, 191, 192, 196, 198, 200, 202, 206, 211, 213, 215, 219, 220, 221, 227, 228, 229, 235, 236, 237, 241, 242, 244, 248, 249, 250, 253, 254, 255, 259, 261, 262, 264, 270, 275, 278, 279, 284, 285, 286, 288, 291, 292, 296, 297, 298, 300, 303, 304, 308, 310, 312, 316, 321, 323, 325, 327, 333, 334, 336, 338, 340, 342], "returns": [153, 172, 190, 210, 274, 320, 341], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 53, 58, 111, 135, 147, 151, 164, 166, 170, 184, 188, 204, 208, 223, 231, 268, 272, 314, 318, 329], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 42, "universal_type": "function", "name": "handler", "text_snippet": "void handler(int signo)\n{\n\tprintf(\"Caught signal\\n\");\n\tprintf(\"Test PASSED\\n\");\n\tsetBackTime(tpreset"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "handler(int signo)"}, {"node_id": 68, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[])\n{\n\tstruct sigevent ev;\n\tstruct sigaction act;\n\tstruct timespec tpT0"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}], "class_declarations": [{"node_id": 38, "universal_type": "class", "name": "timespec", "text_snippet": "struct timespec"}, {"node_id": 39, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 83, "universal_type": "class", "name": "sigevent", "text_snippet": "struct sigevent"}, {"node_id": 84, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 88, "universal_type": "class", "name": "sigaction", "text_snippet": "struct sigaction"}, {"node_id": 89, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 93, "universal_type": "class", "name": "timespec", "text_snippet": "struct timespec"}, {"node_id": 94, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 99, "universal_type": "class", "name": "itimerspec", "text_snippet": "struct itimerspec"}, {"node_id": 100, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <time.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <signal.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 <stdlib.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"posixtest.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"helpers.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/* \n * Copyright (c) 2002, Intel Corporation. All rights reserved.\n * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com\n * This file is licensed under the GPL license. For the full content\n * of this license, see the COPYING file at the top level of this \n * source tree.\n *\n * Test that if clock_settime() changes the value for CLOCK_REALTIME,\n * an absolute timer which would now have expired in the past\n * will expire immediately (with no error).\n *\n * Steps:\n * - get time T0\n * - create/enable a timer to expire at T1 = T0 + TIMEROFFSET\n * - set time forward to T1 + CLOCKOFFSET\n * - ensure that timer has expired with no error\n *\n * signal SIGTOTEST is used.\n */\n#include <stdio.h>\n#include <time.h>\n#include <signal.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include \"posixtest.h\"\n#include \"helpers.h\"\n\n#define TIMEROFFSET 9\n#define CLOCKOFFSET 4\n\n#define SHORTTIME 1\n\n#define SIGTOTEST SIGALRM\n\nstruct timespec tpreset;\n\nvoid handler(int signo)\n{\n\tprintf(\"Caught signal\\n\");\n\tprintf(\"Test PASSED\\n\");\n\tsetBackTime(tpreset);\n\texit(PTS_PASS);\n}\n\nint main(int argc, char *argv[])\n{\n\tstruct sigevent ev;\n\tstruct sigaction act;\n\tstruct timespec tpT0, tpclock;\n\tstruct itimerspec its;\n\ttimer_t tid;\n\tint flags = 0;\n\n\t/*\n\t * set up sigevent for timer\n\t * set up sigaction to catch signal\n\t */\n\tev.sigev_notify = SIGEV_SIGNAL;\n\tev.sigev_signo = SIGTOTEST;\n\n\tact.sa_handler=handler;\n\tact.sa_flags=0;\n\n\tif (sigemptyset(&act.sa_mask) != 0) {\n\t\tperror(\"sigemptyset() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tif (sigaction(SIGTOTEST, &act, 0) != 0) {\n\t\tperror(\"sigaction() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tif (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) {\n\t\tperror(\"clock_gettime() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n \tif (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) {\n\t\tperror(\"timer_create() did not return success\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tflags |= TIMER_ABSTIME;\n\tits.it_interval.tv_sec = 0;\n\tits.it_interval.tv_nsec = 0;\n\tits.it_value.tv_sec = tpT0.tv_sec + TIMEROFFSET;\n\tits.it_value.tv_nsec = tpT0.tv_nsec;\n\tif (timer_settime(tid, flags, &its, NULL) != 0) {\n\t\tperror(\"timer_settime() did not return success\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\ttpclock.tv_sec = its.it_value.tv_sec + CLOCKOFFSET;\n\ttpclock.tv_nsec = its.it_value.tv_nsec;\n\tgetBeforeTime(&tpreset);\n\tif (clock_settime(CLOCK_REALTIME, &tpclock) != 0) {\n\t\tprintf(\"clock_settime() was not successful\\n\");\n\t\treturn PTS_UNRESOLVED;\n\t}\n\n\tsleep(SHORTTIME);\n\tprintf(\"timer should have expired _immediately_\\n\");\n\ttpreset.tv_sec += SHORTTIME;\n\tsetBackTime(tpreset);\n\treturn PTS_FAIL;\n}\n"}
239
c
/* * coverage_stubs.c * * These stubs are needed to generate coverage from an embedded target. */ #include <stdio.h> #include <stddef.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <errno.h> #include "mgcov_stubs.h" // ============================================================================================ /* prototype */ void __gcov_flush(void); // ============================================================================================ void mgcov_static_init(void) /* call the coverage initializers if not done by startup code */ { void (**p)(void); extern uint32_t __init_array_start, __init_array_end; /* linker defined symbols, array of function pointers */ uint32_t beg = (uint32_t)&__init_array_start; uint32_t end = (uint32_t)&__init_array_end-sizeof(p); while(beg<end) { p = (void(**)(void))beg; /* get function pointer */ (*p)(); /* call constructor */ beg += sizeof(p); /* next pointer */ } } // ============================================================================================ void mgcov_report(void) { __gcov_flush(); } // ============================================================================================
34.65
34
(translation_unit) "/*\n * coverage_stubs.c\n *\n * These stubs are needed to generate coverage from an embedded target.\n */\n#include <stdio.h>\n#include <stddef.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n#include <errno.h>\n#include "mgcov_stubs.h"\n// ============================================================================================\n/* prototype */\nvoid __gcov_flush(void);\n// ============================================================================================\nvoid mgcov_static_init(void)\n\n/* call the coverage initializers if not done by startup code */\n\n{\n void (**p)(void);\n extern uint32_t __init_array_start, __init_array_end; /* linker defined symbols, array of function pointers */\n uint32_t beg = (uint32_t)&__init_array_start;\n uint32_t end = (uint32_t)&__init_array_end-sizeof(p);\n\n while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }\n}\n// ============================================================================================\nvoid mgcov_report(void) {\n __gcov_flush();\n}\n// ============================================================================================\n" (comment) "/*\n * coverage_stubs.c\n *\n * These stubs are needed to generate coverage from an embedded target.\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stddef.h>\n" (#include) "#include" (system_lib_string) "<stddef.h>" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.h>" (preproc_include) "#include <sys/stat.h>\n" (#include) "#include" (system_lib_string) "<sys/stat.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include "mgcov_stubs.h"\n" (#include) "#include" (string_literal) ""mgcov_stubs.h"" (") """ (string_content) "mgcov_stubs.h" (") """ (comment) "// ============================================================================================" (comment) "/* prototype */" (declaration) "void __gcov_flush(void);" (primitive_type) "void" (function_declarator) "__gcov_flush(void)" (identifier) "__gcov_flush" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "// ============================================================================================" (function_definition) "void mgcov_static_init(void)\n\n/* call the coverage initializers if not done by startup code */\n\n{\n void (**p)(void);\n extern uint32_t __init_array_start, __init_array_end; /* linker defined symbols, array of function pointers */\n uint32_t beg = (uint32_t)&__init_array_start;\n uint32_t end = (uint32_t)&__init_array_end-sizeof(p);\n\n while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }\n}" (primitive_type) "void" (function_declarator) "mgcov_static_init(void)" (identifier) "mgcov_static_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (comment) "/* call the coverage initializers if not done by startup code */" (compound_statement) "{\n void (**p)(void);\n extern uint32_t __init_array_start, __init_array_end; /* linker defined symbols, array of function pointers */\n uint32_t beg = (uint32_t)&__init_array_start;\n uint32_t end = (uint32_t)&__init_array_end-sizeof(p);\n\n while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }\n}" ({) "{" (declaration) "void (**p)(void);" (primitive_type) "void" (function_declarator) "(**p)(void)" (parenthesized_declarator) "(**p)" (() "(" (pointer_declarator) "**p" (*) "*" (pointer_declarator) "*p" (*) "*" (identifier) "p" ()) ")" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "extern uint32_t __init_array_start, __init_array_end;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint32_t" (identifier) "__init_array_start" (,) "," (identifier) "__init_array_end" (;) ";" (comment) "/* linker defined symbols, array of function pointers */" (declaration) "uint32_t beg = (uint32_t)&__init_array_start;" (primitive_type) "uint32_t" (init_declarator) "beg = (uint32_t)&__init_array_start" (identifier) "beg" (=) "=" (cast_expression) "(uint32_t)&__init_array_start" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (pointer_expression) "&__init_array_start" (&) "&" (identifier) "__init_array_start" (;) ";" (declaration) "uint32_t end = (uint32_t)&__init_array_end-sizeof(p);" (primitive_type) "uint32_t" (init_declarator) "end = (uint32_t)&__init_array_end-sizeof(p)" (identifier) "end" (=) "=" (binary_expression) "(uint32_t)&__init_array_end-sizeof(p)" (cast_expression) "(uint32_t)&__init_array_end" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (pointer_expression) "&__init_array_end" (&) "&" (identifier) "__init_array_end" (-) "-" (sizeof_expression) "sizeof(p)" (sizeof) "sizeof" (parenthesized_expression) "(p)" (() "(" (identifier) "p" ()) ")" (;) ";" (while_statement) "while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }" (while) "while" (parenthesized_expression) "(beg<end)" (() "(" (binary_expression) "beg<end" (identifier) "beg" (<) "<" (identifier) "end" ()) ")" (compound_statement) "{\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }" ({) "{" (expression_statement) "p = (void(**)(void))beg;" (assignment_expression) "p = (void(**)(void))beg" (identifier) "p" (=) "=" (cast_expression) "(void(**)(void))beg" (() "(" (type_descriptor) "void(**)(void)" (primitive_type) "void" (abstract_function_declarator) "(**)(void)" (abstract_parenthesized_declarator) "(**)" (() "(" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" ()) ")" (identifier) "beg" (;) ";" (comment) "/* get function pointer */" (expression_statement) "(*p)();" (call_expression) "(*p)()" (parenthesized_expression) "(*p)" (() "(" (pointer_expression) "*p" (*) "*" (identifier) "p" ()) ")" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/* call constructor */" (expression_statement) "beg += sizeof(p);" (assignment_expression) "beg += sizeof(p)" (identifier) "beg" (+=) "+=" (sizeof_expression) "sizeof(p)" (sizeof) "sizeof" (parenthesized_expression) "(p)" (() "(" (identifier) "p" ()) ")" (;) ";" (comment) "/* next pointer */" (}) "}" (}) "}" (comment) "// ============================================================================================" (function_definition) "void mgcov_report(void) {\n __gcov_flush();\n}" (primitive_type) "void" (function_declarator) "mgcov_report(void)" (identifier) "mgcov_report" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n __gcov_flush();\n}" ({) "{" (expression_statement) "__gcov_flush();" (call_expression) "__gcov_flush()" (identifier) "__gcov_flush" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "// ============================================================================================"
197
0
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 34.65, "nodes": 120, "errors": 0, "source_hash": "66c3ba166a4fe1d92048c9ca2dabb4a22b59d83f65d3e8583bd64e25f7b4052f", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stddef.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stddef.h>", "parent": 3, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <sys/types.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<sys/types.h>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 22}}, {"id": 9, "type": "preproc_include", "text": "#include <sys/stat.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<sys/stat.h>", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 21}}, {"id": 12, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<unistd.h>", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <errno.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<errno.h>", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include \"mgcov_stubs.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"mgcov_stubs.h\"", "parent": 18, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 24}}, {"id": 21, "type": "declaration", "text": "void __gcov_flush(void);", "parent": null, "children": [22, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 24}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 4}}, {"id": 23, "type": "function_declarator", "text": "__gcov_flush(void)", "parent": 21, "children": [24, 25], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 23}}, {"id": 24, "type": "identifier", "text": "__gcov_flush", "parent": 23, "children": [], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 17}}, {"id": 25, "type": "parameter_list", "text": "(void)", "parent": 23, "children": [26], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 23}}, {"id": 26, "type": "parameter_declaration", "text": "void", "parent": 25, "children": [27], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 22}}, {"id": 27, "type": "primitive_type", "text": "void", "parent": 26, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 22}}, {"id": 28, "type": "function_definition", "text": "void mgcov_static_init(void)\n\n/* call the coverage initializers if not done by startup code */\n\n{\n void (**p)(void);\n extern uint32_t __init_array_start, __init_array_end; /* linker defined symbols, array of function pointers */\n uint32_t beg = (uint32_t)&__init_array_start;\n uint32_t end = (uint32_t)&__init_array_end-sizeof(p);\n\n while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }\n}", "parent": null, "children": [29, 30], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 29, "type": "primitive_type", "text": "void", "parent": 28, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 30, "type": "function_declarator", "text": "mgcov_static_init(void)", "parent": 28, "children": [31, 32], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 28}}, {"id": 31, "type": "identifier", "text": "mgcov_static_init", "parent": 30, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 22}}, {"id": 32, "type": "parameter_list", "text": "(void)", "parent": 30, "children": [33], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 28}}, {"id": 33, "type": "parameter_declaration", "text": "void", "parent": 32, "children": [34], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 27}}, {"id": 34, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 27}}, {"id": 35, "type": "declaration", "text": "void (**p)(void);", "parent": 28, "children": [36, 37], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 19}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 35, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 37, "type": "function_declarator", "text": "(**p)(void)", "parent": 35, "children": [38, 44], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 18}}, {"id": 38, "type": "parenthesized_declarator", "text": "(**p)", "parent": 37, "children": [39], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 12}}, {"id": 39, "type": "pointer_declarator", "text": "**p", "parent": 38, "children": [40, 41], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 11}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 9}}, {"id": 41, "type": "pointer_declarator", "text": "*p", "parent": 39, "children": [42, 43], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 11}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 10}}, {"id": 43, "type": "identifier", "text": "p", "parent": 41, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 11}}, {"id": 44, "type": "parameter_list", "text": "(void)", "parent": 37, "children": [45], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 18}}, {"id": 45, "type": "parameter_declaration", "text": "void", "parent": 44, "children": [46], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 17}}, {"id": 46, "type": "primitive_type", "text": "void", "parent": 45, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 17}}, {"id": 47, "type": "declaration", "text": "extern uint32_t __init_array_start, __init_array_end;", "parent": 28, "children": [48, 50, 51, 52], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 55}}, {"id": 48, "type": "storage_class_specifier", "text": "extern", "parent": 47, "children": [49], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 8}}, {"id": 49, "type": "extern", "text": "extern", "parent": 48, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 8}}, {"id": 50, "type": "primitive_type", "text": "uint32_t", "parent": 47, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 17}}, {"id": 51, "type": "identifier", "text": "__init_array_start", "parent": 47, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 36}}, {"id": 52, "type": "identifier", "text": "__init_array_end", "parent": 47, "children": [], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 54}}, {"id": 53, "type": "declaration", "text": "uint32_t beg = (uint32_t)&__init_array_start;", "parent": 28, "children": [54, 55], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 47}}, {"id": 54, "type": "primitive_type", "text": "uint32_t", "parent": 53, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 10}}, {"id": 55, "type": "init_declarator", "text": "beg = (uint32_t)&__init_array_start", "parent": 53, "children": [56, 57, 58], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 46}}, {"id": 56, "type": "identifier", "text": "beg", "parent": 55, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 14}}, {"id": 57, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 16}}, {"id": 58, "type": "cast_expression", "text": "(uint32_t)&__init_array_start", "parent": 55, "children": [59, 61], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 46}}, {"id": 59, "type": "type_descriptor", "text": "uint32_t", "parent": 58, "children": [60], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 26}}, {"id": 60, "type": "primitive_type", "text": "uint32_t", "parent": 59, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 26}}, {"id": 61, "type": "pointer_expression", "text": "&__init_array_start", "parent": 58, "children": [62], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 46}}, {"id": 62, "type": "identifier", "text": "__init_array_start", "parent": 61, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 46}}, {"id": 63, "type": "declaration", "text": "uint32_t end = (uint32_t)&__init_array_end-sizeof(p);", "parent": 28, "children": [64, 65], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 55}}, {"id": 64, "type": "primitive_type", "text": "uint32_t", "parent": 63, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 10}}, {"id": 65, "type": "init_declarator", "text": "end = (uint32_t)&__init_array_end-sizeof(p)", "parent": 63, "children": [66, 67], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 54}}, {"id": 66, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 16}}, {"id": 67, "type": "binary_expression", "text": "(uint32_t)&__init_array_end-sizeof(p)", "parent": 65, "children": [68, 73, 74], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 54}}, {"id": 68, "type": "cast_expression", "text": "(uint32_t)&__init_array_end", "parent": 67, "children": [69, 71], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 44}}, {"id": 69, "type": "type_descriptor", "text": "uint32_t", "parent": 68, "children": [70], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 26}}, {"id": 70, "type": "primitive_type", "text": "uint32_t", "parent": 69, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 26}}, {"id": 71, "type": "pointer_expression", "text": "&__init_array_end", "parent": 68, "children": [72], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 44}}, {"id": 72, "type": "identifier", "text": "__init_array_end", "parent": 71, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 44}}, {"id": 73, "type": "-", "text": "-", "parent": 67, "children": [], "start_point": {"row": 24, "column": 44}, "end_point": {"row": 24, "column": 45}}, {"id": 74, "type": "sizeof_expression", "text": "sizeof(p)", "parent": 67, "children": [75], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 54}}, {"id": 75, "type": "parenthesized_expression", "text": "(p)", "parent": 74, "children": [76], "start_point": {"row": 24, "column": 51}, "end_point": {"row": 24, "column": 54}}, {"id": 76, "type": "identifier", "text": "p", "parent": 75, "children": [], "start_point": {"row": 24, "column": 52}, "end_point": {"row": 24, "column": 53}}, {"id": 77, "type": "while_statement", "text": "while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }", "parent": 28, "children": [78], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 30, "column": 3}}, {"id": 78, "type": "parenthesized_expression", "text": "(beg<end)", "parent": 77, "children": [79], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 16}}, {"id": 79, "type": "binary_expression", "text": "beg<end", "parent": 78, "children": [80, 81], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 15}}, {"id": 80, "type": "identifier", "text": "beg", "parent": 79, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 11}}, {"id": 81, "type": "<", "text": "<", "parent": 79, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 12}}, {"id": 82, "type": "assignment_expression", "text": "p = (void(**)(void))beg", "parent": 77, "children": [83, 84, 85], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 27}}, {"id": 83, "type": "identifier", "text": "p", "parent": 82, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 84, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 7}}, {"id": 85, "type": "cast_expression", "text": "(void(**)(void))beg", "parent": 82, "children": [86, 97], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 27}}, {"id": 86, "type": "type_descriptor", "text": "void(**)(void)", "parent": 85, "children": [87, 88], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 23}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 13}}, {"id": 88, "type": "abstract_function_declarator", "text": "(**)(void)", "parent": 86, "children": [89, 94], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 23}}, {"id": 89, "type": "abstract_parenthesized_declarator", "text": "(**)", "parent": 88, "children": [90], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 17}}, {"id": 90, "type": "abstract_pointer_declarator", "text": "**", "parent": 89, "children": [91, 92], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 16}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 15}}, {"id": 92, "type": "abstract_pointer_declarator", "text": "*", "parent": 90, "children": [93], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 16}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 16}}, {"id": 94, "type": "parameter_list", "text": "(void)", "parent": 88, "children": [95], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 23}}, {"id": 95, "type": "parameter_declaration", "text": "void", "parent": 94, "children": [96], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 22}}, {"id": 96, "type": "primitive_type", "text": "void", "parent": 95, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 22}}, {"id": 97, "type": "identifier", "text": "beg", "parent": 85, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 27}}, {"id": 98, "type": "call_expression", "text": "(*p)()", "parent": 77, "children": [99, 103], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 10}}, {"id": 99, "type": "parenthesized_expression", "text": "(*p)", "parent": 98, "children": [100], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 100, "type": "pointer_expression", "text": "*p", "parent": 99, "children": [101, 102], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 7}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 6}}, {"id": 102, "type": "identifier", "text": "p", "parent": 100, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 7}}, {"id": 103, "type": "argument_list", "text": "()", "parent": 98, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 10}}, {"id": 104, "type": "assignment_expression", "text": "beg += sizeof(p)", "parent": 77, "children": [105, 106, 107], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 20}}, {"id": 105, "type": "identifier", "text": "beg", "parent": 104, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 7}}, {"id": 106, "type": "+=", "text": "+=", "parent": 104, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 10}}, {"id": 107, "type": "sizeof_expression", "text": "sizeof(p)", "parent": 104, "children": [108], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 20}}, {"id": 108, "type": "parenthesized_expression", "text": "(p)", "parent": 107, "children": [109], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 20}}, {"id": 109, "type": "identifier", "text": "p", "parent": 108, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 19}}, {"id": 110, "type": "function_definition", "text": "void mgcov_report(void) {\n __gcov_flush();\n}", "parent": null, "children": [111, 112], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 4}}, {"id": 112, "type": "function_declarator", "text": "mgcov_report(void)", "parent": 110, "children": [113, 114], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 23}}, {"id": 113, "type": "identifier", "text": "mgcov_report", "parent": 112, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 17}}, {"id": 114, "type": "parameter_list", "text": "(void)", "parent": 112, "children": [115], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 23}}, {"id": 115, "type": "parameter_declaration", "text": "void", "parent": 114, "children": [116], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 22}}, {"id": 116, "type": "primitive_type", "text": "void", "parent": 115, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 22}}, {"id": 117, "type": "call_expression", "text": "__gcov_flush()", "parent": 110, "children": [118, 119], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 16}}, {"id": 118, "type": "identifier", "text": "__gcov_flush", "parent": 117, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 14}}, {"id": 119, "type": "argument_list", "text": "()", "parent": 117, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 16}}]}, "node_categories": {"declarations": {"functions": [23, 28, 30, 37, 88, 110, 112], "variables": [21, 26, 33, 35, 45, 47, 53, 63, 95, 115], "classes": [48], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [58, 61, 67, 68, 71, 74, 75, 78, 79, 85, 98, 99, 100, 107, 108, 117], "assignments": [82, 104], "loops": [77], "conditionals": [24, 31, 43, 51, 52, 56, 62, 72, 76, 80, 83, 97, 102, 105, 109, 113, 118], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "__gcov_flush(void)"}, {"node_id": 28, "universal_type": "function", "name": "mgcov_static_init", "text_snippet": "void mgcov_static_init(void)\n\n/* call the coverage initializers if not done by startup code */\n\n{\n "}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "mgcov_static_init(void)"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "(**p)(void)"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "(**)(void)"}, {"node_id": 110, "universal_type": "function", "name": "mgcov_report", "text_snippet": "void mgcov_report(void) {\n __gcov_flush();\n}"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "mgcov_report(void)"}], "class_declarations": [{"node_id": 48, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stddef.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <sys/types.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sys/stat.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <unistd.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <errno.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"mgcov_stubs.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/*\n * coverage_stubs.c\n *\n * These stubs are needed to generate coverage from an embedded target.\n */\n#include <stdio.h>\n#include <stddef.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <unistd.h>\n#include <errno.h>\n#include \"mgcov_stubs.h\"\n// ============================================================================================\n/* prototype */\nvoid __gcov_flush(void);\n// ============================================================================================\nvoid mgcov_static_init(void)\n\n/* call the coverage initializers if not done by startup code */\n\n{\n void (**p)(void);\n extern uint32_t __init_array_start, __init_array_end; /* linker defined symbols, array of function pointers */\n uint32_t beg = (uint32_t)&__init_array_start;\n uint32_t end = (uint32_t)&__init_array_end-sizeof(p);\n\n while(beg<end) {\n p = (void(**)(void))beg; /* get function pointer */\n (*p)(); /* call constructor */\n beg += sizeof(p); /* next pointer */\n }\n}\n// ============================================================================================\nvoid mgcov_report(void) {\n __gcov_flush();\n}\n// ============================================================================================\n"}
240
c
/* SPDX-License-Identifier: GPL-2.0-only */ /* * MTD splitter for ELF loader firmware partitions * * Copyright (C) 2020 <NAME> <<EMAIL>> * * This program 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; version 2. * * To parse the ELF kernel loader, a small ELF parser is used that can * handle both ELF32 or ELF64 class loaders. The splitter assumes that the * kernel is always located before the rootfs, whether it is embedded in the * loader or not. * * The kernel image is preferably embedded inside the ELF loader, so the end * of the loader equals the end of the kernel partition. This is due to the * way mtd_find_rootfs_from searches for the the rootfs: * - if the kernel image is embedded in the loader, the appended rootfs may * follow the loader immediately, within the same erase block. * - if the kernel image is not embedded in the loader, but placed at some * offset behind the loader (OKLI-style loader), the rootfs must be * aligned to an erase-block after the loader and kernel image. */ #include <linux/module.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/slab.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/of.h> #include <linux/byteorder/generic.h> #include "mtdsplit.h" #define ELF_NR_PARTS 2 #define ELF_MAGIC 0x7f454c46 /* 0x7f E L F */ #define ELF_CLASS_32 1 #define ELF_CLASS_64 2 struct elf_header_ident { uint32_t magic; uint8_t class; uint8_t data; uint8_t version; uint8_t osabi; uint8_t abiversion; uint8_t pad[7]; }; struct elf_header_32 { uint16_t type; uint16_t machine; uint32_t version; uint32_t entry; uint32_t phoff; uint32_t shoff; uint32_t flags; uint16_t ehsize; uint16_t phentsize; uint16_t phnum; uint16_t shentsize; uint16_t shnum; uint16_t shstrndx; }; struct elf_header_64 { uint16_t type; uint16_t machine; uint32_t version; uint64_t entry; uint64_t phoff; uint64_t shoff; uint32_t flags; uint16_t ehsize; uint16_t phentsize; uint16_t phnum; uint16_t shentsize; uint16_t shnum; uint16_t shstrndx; }; struct elf_header { struct elf_header_ident ident; union { struct elf_header_32 elf32; struct elf_header_64 elf64; }; }; struct elf_program_header_32 { uint32_t type; uint32_t offset; uint32_t vaddr; uint32_t paddr; uint32_t filesize; uint32_t memsize; uint32_t flags; }; struct elf_program_header_64 { uint32_t type; uint32_t flags; uint64_t offset; uint64_t vaddr; uint64_t paddr; uint64_t filesize; uint64_t memsize; }; static int mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset, uint8_t *dst, size_t len) { size_t retlen; int ret; ret = mtd_read(mtd, offset, len, &retlen, dst); if (ret) { pr_debug("read error in \"%s\"\n", mtd->name); return ret; } if (retlen != len) { pr_debug("short read in \"%s\"\n", mtd->name); return -EIO; } return 0; } static int elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr, size_t *size) { struct elf_header_32 *hdr32 = &(hdr->elf32); int err; size_t section_end, ph_table_end, ph_entry; struct elf_program_header_32 ph; *size = 0; if (hdr32->shoff > 0) { *size = hdr32->shoff + hdr32->shentsize * hdr32->shnum; return 0; } ph_entry = hdr32->phoff; ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum; while (ph_entry < ph_table_end) { err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph), sizeof(ph)); if (err) return err; section_end = ph.offset + ph.filesize; if (section_end > *size) *size = section_end; ph_entry += hdr32->phentsize; } return 0; } static int elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr, size_t *size) { struct elf_header_64 *hdr64 = &(hdr->elf64); int err; size_t section_end, ph_table_end, ph_entry; struct elf_program_header_64 ph; *size = 0; if (hdr64->shoff > 0) { *size = hdr64->shoff + hdr64->shentsize * hdr64->shnum; return 0; } ph_entry = hdr64->phoff; ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum; while (ph_entry < ph_table_end) { err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph), sizeof(ph)); if (err) return err; section_end = ph.offset + ph.filesize; if (section_end > *size) *size = section_end; ph_entry += hdr64->phentsize; } return 0; } static int mtdsplit_parse_elf(struct mtd_info *mtd, const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { struct elf_header hdr; size_t loader_size, rootfs_offset; enum mtdsplit_part_type type; struct mtd_partition *parts; int err; err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr)); if (err) return err; if (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) { pr_debug("invalid ELF magic %08x\n", be32_to_cpu(hdr.ident.magic)); return -EINVAL; } switch (hdr.ident.class) { case ELF_CLASS_32: err = elf32_determine_size(mtd, &hdr, &loader_size); break; case ELF_CLASS_64: err = elf64_determine_size(mtd, &hdr, &loader_size); break; default: pr_debug("invalid ELF class %i\n", hdr.ident.class); err = -EINVAL; } if (err) return err; err = mtd_find_rootfs_from(mtd, loader_size, mtd->size, &rootfs_offset, &type); if (err) return err; if (rootfs_offset == mtd->size) { pr_debug("no rootfs found in \"%s\"\n", mtd->name); return -ENODEV; } parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL); if (!parts) return -ENOMEM; parts[0].name = KERNEL_PART_NAME; parts[0].offset = 0; parts[0].size = rootfs_offset; if (type == MTDSPLIT_PART_TYPE_UBI) parts[1].name = UBI_PART_NAME; else parts[1].name = ROOTFS_PART_NAME; parts[1].offset = rootfs_offset; parts[1].size = mtd->size - rootfs_offset; *pparts = parts; return ELF_NR_PARTS; } static const struct of_device_id mtdsplit_elf_of_match_table[] = { { .compatible = "openwrt,elf" }, {}, }; MODULE_DEVICE_TABLE(of, mtdsplit_elf_of_match_table); static struct mtd_part_parser mtdsplit_elf_parser = { .owner = THIS_MODULE, .name = "elf-loader-fw", .of_match_table = mtdsplit_elf_of_match_table, .parse_fn = mtdsplit_parse_elf, .type = MTD_PARSER_TYPE_FIRMWARE, }; static int __init mtdsplit_elf_init(void) { register_mtd_parser(&mtdsplit_elf_parser); return 0; } subsys_initcall(mtdsplit_elf_init);
25.58
241
(translation_unit) "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * MTD splitter for ELF loader firmware partitions\n *\n * Copyright (C) 2020 <NAME> <<EMAIL>>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * To parse the ELF kernel loader, a small ELF parser is used that can\n * handle both ELF32 or ELF64 class loaders. The splitter assumes that the\n * kernel is always located before the rootfs, whether it is embedded in the\n * loader or not.\n *\n * The kernel image is preferably embedded inside the ELF loader, so the end\n * of the loader equals the end of the kernel partition. This is due to the\n * way mtd_find_rootfs_from searches for the the rootfs:\n * - if the kernel image is embedded in the loader, the appended rootfs may\n * follow the loader immediately, within the same erase block.\n * - if the kernel image is not embedded in the loader, but placed at some\n * offset behind the loader (OKLI-style loader), the rootfs must be\n * aligned to an erase-block after the loader and kernel image.\n */\n\n#include <linux/module.h>\n#include <linux/init.h>\n#include <linux/kernel.h>\n#include <linux/slab.h>\n#include <linux/mtd/mtd.h>\n#include <linux/mtd/partitions.h>\n#include <linux/of.h>\n#include <linux/byteorder/generic.h>\n\n#include "mtdsplit.h"\n\n#define ELF_NR_PARTS 2\n\n#define ELF_MAGIC 0x7f454c46 /* 0x7f E L F */\n#define ELF_CLASS_32 1\n#define ELF_CLASS_64 2\n\nstruct elf_header_ident {\n uint32_t magic;\n uint8_t class;\n uint8_t data;\n uint8_t version;\n uint8_t osabi;\n uint8_t abiversion;\n uint8_t pad[7];\n};\n\nstruct elf_header_32 {\n uint16_t type;\n uint16_t machine;\n uint32_t version;\n uint32_t entry;\n uint32_t phoff;\n uint32_t shoff;\n uint32_t flags;\n uint16_t ehsize;\n uint16_t phentsize;\n uint16_t phnum;\n uint16_t shentsize;\n uint16_t shnum;\n uint16_t shstrndx;\n};\n\nstruct elf_header_64 {\n uint16_t type;\n uint16_t machine;\n uint32_t version;\n uint64_t entry;\n uint64_t phoff;\n uint64_t shoff;\n uint32_t flags;\n uint16_t ehsize;\n uint16_t phentsize;\n uint16_t phnum;\n uint16_t shentsize;\n uint16_t shnum;\n uint16_t shstrndx;\n};\n\nstruct elf_header {\n struct elf_header_ident ident;\n union {\n struct elf_header_32 elf32;\n struct elf_header_64 elf64;\n };\n};\n\nstruct elf_program_header_32 {\n uint32_t type;\n uint32_t offset;\n uint32_t vaddr;\n uint32_t paddr;\n uint32_t filesize;\n uint32_t memsize;\n uint32_t flags;\n};\n\nstruct elf_program_header_64 {\n uint32_t type;\n uint32_t flags;\n uint64_t offset;\n uint64_t vaddr;\n uint64_t paddr;\n uint64_t filesize;\n uint64_t memsize;\n};\n\n\nstatic int mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n uint8_t *dst, size_t len)\n{\n size_t retlen;\n int ret;\n\n ret = mtd_read(mtd, offset, len, &retlen, dst);\n if (ret) {\n pr_debug("read error in \"%s\"\n", mtd->name);\n return ret;\n }\n\n if (retlen != len) {\n pr_debug("short read in \"%s\"\n", mtd->name);\n return -EIO;\n }\n\n return 0;\n}\n\nstatic int elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)\n{\n struct elf_header_32 *hdr32 = &(hdr->elf32);\n int err;\n size_t section_end, ph_table_end, ph_entry;\n struct elf_program_header_32 ph;\n\n *size = 0;\n\n if (hdr32->shoff > 0) {\n *size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n return 0;\n }\n\n ph_entry = hdr32->phoff;\n ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum;\n\n while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr32->phentsize;\n }\n\n return 0;\n}\n\nstatic int elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)\n{\n struct elf_header_64 *hdr64 = &(hdr->elf64);\n int err;\n size_t section_end, ph_table_end, ph_entry;\n struct elf_program_header_64 ph;\n\n *size = 0;\n\n if (hdr64->shoff > 0) {\n *size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n return 0;\n }\n\n ph_entry = hdr64->phoff;\n ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum;\n\n while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr64->phentsize;\n }\n\n return 0;\n}\n\nstatic int mtdsplit_parse_elf(struct mtd_info *mtd,\n const struct mtd_partition **pparts,\n struct mtd_part_parser_data *data)\n{\n struct elf_header hdr;\n size_t loader_size, rootfs_offset;\n enum mtdsplit_part_type type;\n struct mtd_partition *parts;\n int err;\n\n err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr));\n if (err)\n return err;\n\n if (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic));\n return -EINVAL;\n }\n\n switch (hdr.ident.class) {\n case ELF_CLASS_32:\n err = elf32_determine_size(mtd, &hdr, &loader_size);\n break;\n case ELF_CLASS_64:\n err = elf64_determine_size(mtd, &hdr, &loader_size);\n break;\n default:\n pr_debug("invalid ELF class %i\n", hdr.ident.class);\n err = -EINVAL;\n }\n\n if (err)\n return err;\n\n err = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n &rootfs_offset, &type);\n if (err)\n return err;\n\n if (rootfs_offset == mtd->size) {\n pr_debug("no rootfs found in \"%s\"\n", mtd->name);\n return -ENODEV;\n }\n\n parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL);\n if (!parts)\n return -ENOMEM;\n\n parts[0].name = KERNEL_PART_NAME;\n parts[0].offset = 0;\n parts[0].size = rootfs_offset;\n\n if (type == MTDSPLIT_PART_TYPE_UBI)\n parts[1].name = UBI_PART_NAME;\n else\n parts[1].name = ROOTFS_PART_NAME;\n parts[1].offset = rootfs_offset;\n parts[1].size = mtd->size - rootfs_offset;\n\n *pparts = parts;\n return ELF_NR_PARTS;\n}\n\nstatic const struct of_device_id mtdsplit_elf_of_match_table[] = {\n { .compatible = "openwrt,elf" },\n {},\n};\nMODULE_DEVICE_TABLE(of, mtdsplit_elf_of_match_table);\n\nstatic struct mtd_part_parser mtdsplit_elf_parser = {\n .owner = THIS_MODULE,\n .name = "elf-loader-fw",\n .of_match_table = mtdsplit_elf_of_match_table,\n .parse_fn = mtdsplit_parse_elf,\n .type = MTD_PARSER_TYPE_FIRMWARE,\n};\n\nstatic int __init mtdsplit_elf_init(void)\n{\n register_mtd_parser(&mtdsplit_elf_parser);\n\n return 0;\n}\n\nsubsys_initcall(mtdsplit_elf_init);\n" (comment) "/* SPDX-License-Identifier: GPL-2.0-only */" (comment) "/*\n * MTD splitter for ELF loader firmware partitions\n *\n * Copyright (C) 2020 <NAME> <<EMAIL>>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * To parse the ELF kernel loader, a small ELF parser is used that can\n * handle both ELF32 or ELF64 class loaders. The splitter assumes that the\n * kernel is always located before the rootfs, whether it is embedded in the\n * loader or not.\n *\n * The kernel image is preferably embedded inside the ELF loader, so the end\n * of the loader equals the end of the kernel partition. This is due to the\n * way mtd_find_rootfs_from searches for the the rootfs:\n * - if the kernel image is embedded in the loader, the appended rootfs may\n * follow the loader immediately, within the same erase block.\n * - if the kernel image is not embedded in the loader, but placed at some\n * offset behind the loader (OKLI-style loader), the rootfs must be\n * aligned to an erase-block after the loader and kernel image.\n */" (preproc_include) "#include <linux/module.h>\n" (#include) "#include" (system_lib_string) "<linux/module.h>" (preproc_include) "#include <linux/init.h>\n" (#include) "#include" (system_lib_string) "<linux/init.h>" (preproc_include) "#include <linux/kernel.h>\n" (#include) "#include" (system_lib_string) "<linux/kernel.h>" (preproc_include) "#include <linux/slab.h>\n" (#include) "#include" (system_lib_string) "<linux/slab.h>" (preproc_include) "#include <linux/mtd/mtd.h>\n" (#include) "#include" (system_lib_string) "<linux/mtd/mtd.h>" (preproc_include) "#include <linux/mtd/partitions.h>\n" (#include) "#include" (system_lib_string) "<linux/mtd/partitions.h>" (preproc_include) "#include <linux/of.h>\n" (#include) "#include" (system_lib_string) "<linux/of.h>" (preproc_include) "#include <linux/byteorder/generic.h>\n" (#include) "#include" (system_lib_string) "<linux/byteorder/generic.h>" (preproc_include) "#include "mtdsplit.h"\n" (#include) "#include" (string_literal) ""mtdsplit.h"" (") """ (string_content) "mtdsplit.h" (") """ (preproc_def) "#define ELF_NR_PARTS 2\n" (#define) "#define" (identifier) "ELF_NR_PARTS" (preproc_arg) "2" (preproc_def) "#define ELF_MAGIC 0x7f454c46 /* 0x7f E L F */\n" (#define) "#define" (identifier) "ELF_MAGIC" (preproc_arg) "0x7f454c46 " (comment) "/* 0x7f E L F */" (preproc_def) "#define ELF_CLASS_32 1\n" (#define) "#define" (identifier) "ELF_CLASS_32" (preproc_arg) "1" (preproc_def) "#define ELF_CLASS_64 2\n" (#define) "#define" (identifier) "ELF_CLASS_64" (preproc_arg) "2" (struct_specifier) "struct elf_header_ident {\n uint32_t magic;\n uint8_t class;\n uint8_t data;\n uint8_t version;\n uint8_t osabi;\n uint8_t abiversion;\n uint8_t pad[7];\n}" (struct) "struct" (type_identifier) "elf_header_ident" (field_declaration_list) "{\n uint32_t magic;\n uint8_t class;\n uint8_t data;\n uint8_t version;\n uint8_t osabi;\n uint8_t abiversion;\n uint8_t pad[7];\n}" ({) "{" (field_declaration) "uint32_t magic;" (primitive_type) "uint32_t" (field_identifier) "magic" (;) ";" (field_declaration) "uint8_t class;" (primitive_type) "uint8_t" (field_identifier) "class" (;) ";" (field_declaration) "uint8_t data;" (primitive_type) "uint8_t" (field_identifier) "data" (;) ";" (field_declaration) "uint8_t version;" (primitive_type) "uint8_t" (field_identifier) "version" (;) ";" (field_declaration) "uint8_t osabi;" (primitive_type) "uint8_t" (field_identifier) "osabi" (;) ";" (field_declaration) "uint8_t abiversion;" (primitive_type) "uint8_t" (field_identifier) "abiversion" (;) ";" (field_declaration) "uint8_t pad[7];" (primitive_type) "uint8_t" (array_declarator) "pad[7]" (field_identifier) "pad" ([) "[" (number_literal) "7" (]) "]" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct elf_header_32 {\n uint16_t type;\n uint16_t machine;\n uint32_t version;\n uint32_t entry;\n uint32_t phoff;\n uint32_t shoff;\n uint32_t flags;\n uint16_t ehsize;\n uint16_t phentsize;\n uint16_t phnum;\n uint16_t shentsize;\n uint16_t shnum;\n uint16_t shstrndx;\n}" (struct) "struct" (type_identifier) "elf_header_32" (field_declaration_list) "{\n uint16_t type;\n uint16_t machine;\n uint32_t version;\n uint32_t entry;\n uint32_t phoff;\n uint32_t shoff;\n uint32_t flags;\n uint16_t ehsize;\n uint16_t phentsize;\n uint16_t phnum;\n uint16_t shentsize;\n uint16_t shnum;\n uint16_t shstrndx;\n}" ({) "{" (field_declaration) "uint16_t type;" (primitive_type) "uint16_t" (field_identifier) "type" (;) ";" (field_declaration) "uint16_t machine;" (primitive_type) "uint16_t" (field_identifier) "machine" (;) ";" (field_declaration) "uint32_t version;" (primitive_type) "uint32_t" (field_identifier) "version" (;) ";" (field_declaration) "uint32_t entry;" (primitive_type) "uint32_t" (field_identifier) "entry" (;) ";" (field_declaration) "uint32_t phoff;" (primitive_type) "uint32_t" (field_identifier) "phoff" (;) ";" (field_declaration) "uint32_t shoff;" (primitive_type) "uint32_t" (field_identifier) "shoff" (;) ";" (field_declaration) "uint32_t flags;" (primitive_type) "uint32_t" (field_identifier) "flags" (;) ";" (field_declaration) "uint16_t ehsize;" (primitive_type) "uint16_t" (field_identifier) "ehsize" (;) ";" (field_declaration) "uint16_t phentsize;" (primitive_type) "uint16_t" (field_identifier) "phentsize" (;) ";" (field_declaration) "uint16_t phnum;" (primitive_type) "uint16_t" (field_identifier) "phnum" (;) ";" (field_declaration) "uint16_t shentsize;" (primitive_type) "uint16_t" (field_identifier) "shentsize" (;) ";" (field_declaration) "uint16_t shnum;" (primitive_type) "uint16_t" (field_identifier) "shnum" (;) ";" (field_declaration) "uint16_t shstrndx;" (primitive_type) "uint16_t" (field_identifier) "shstrndx" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct elf_header_64 {\n uint16_t type;\n uint16_t machine;\n uint32_t version;\n uint64_t entry;\n uint64_t phoff;\n uint64_t shoff;\n uint32_t flags;\n uint16_t ehsize;\n uint16_t phentsize;\n uint16_t phnum;\n uint16_t shentsize;\n uint16_t shnum;\n uint16_t shstrndx;\n}" (struct) "struct" (type_identifier) "elf_header_64" (field_declaration_list) "{\n uint16_t type;\n uint16_t machine;\n uint32_t version;\n uint64_t entry;\n uint64_t phoff;\n uint64_t shoff;\n uint32_t flags;\n uint16_t ehsize;\n uint16_t phentsize;\n uint16_t phnum;\n uint16_t shentsize;\n uint16_t shnum;\n uint16_t shstrndx;\n}" ({) "{" (field_declaration) "uint16_t type;" (primitive_type) "uint16_t" (field_identifier) "type" (;) ";" (field_declaration) "uint16_t machine;" (primitive_type) "uint16_t" (field_identifier) "machine" (;) ";" (field_declaration) "uint32_t version;" (primitive_type) "uint32_t" (field_identifier) "version" (;) ";" (field_declaration) "uint64_t entry;" (primitive_type) "uint64_t" (field_identifier) "entry" (;) ";" (field_declaration) "uint64_t phoff;" (primitive_type) "uint64_t" (field_identifier) "phoff" (;) ";" (field_declaration) "uint64_t shoff;" (primitive_type) "uint64_t" (field_identifier) "shoff" (;) ";" (field_declaration) "uint32_t flags;" (primitive_type) "uint32_t" (field_identifier) "flags" (;) ";" (field_declaration) "uint16_t ehsize;" (primitive_type) "uint16_t" (field_identifier) "ehsize" (;) ";" (field_declaration) "uint16_t phentsize;" (primitive_type) "uint16_t" (field_identifier) "phentsize" (;) ";" (field_declaration) "uint16_t phnum;" (primitive_type) "uint16_t" (field_identifier) "phnum" (;) ";" (field_declaration) "uint16_t shentsize;" (primitive_type) "uint16_t" (field_identifier) "shentsize" (;) ";" (field_declaration) "uint16_t shnum;" (primitive_type) "uint16_t" (field_identifier) "shnum" (;) ";" (field_declaration) "uint16_t shstrndx;" (primitive_type) "uint16_t" (field_identifier) "shstrndx" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct elf_header {\n struct elf_header_ident ident;\n union {\n struct elf_header_32 elf32;\n struct elf_header_64 elf64;\n };\n}" (struct) "struct" (type_identifier) "elf_header" (field_declaration_list) "{\n struct elf_header_ident ident;\n union {\n struct elf_header_32 elf32;\n struct elf_header_64 elf64;\n };\n}" ({) "{" (field_declaration) "struct elf_header_ident ident;" (struct_specifier) "struct elf_header_ident" (struct) "struct" (type_identifier) "elf_header_ident" (field_identifier) "ident" (;) ";" (field_declaration) "union {\n struct elf_header_32 elf32;\n struct elf_header_64 elf64;\n };" (union_specifier) "union {\n struct elf_header_32 elf32;\n struct elf_header_64 elf64;\n }" (union) "union" (field_declaration_list) "{\n struct elf_header_32 elf32;\n struct elf_header_64 elf64;\n }" ({) "{" (field_declaration) "struct elf_header_32 elf32;" (struct_specifier) "struct elf_header_32" (struct) "struct" (type_identifier) "elf_header_32" (field_identifier) "elf32" (;) ";" (field_declaration) "struct elf_header_64 elf64;" (struct_specifier) "struct elf_header_64" (struct) "struct" (type_identifier) "elf_header_64" (field_identifier) "elf64" (;) ";" (}) "}" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct elf_program_header_32 {\n uint32_t type;\n uint32_t offset;\n uint32_t vaddr;\n uint32_t paddr;\n uint32_t filesize;\n uint32_t memsize;\n uint32_t flags;\n}" (struct) "struct" (type_identifier) "elf_program_header_32" (field_declaration_list) "{\n uint32_t type;\n uint32_t offset;\n uint32_t vaddr;\n uint32_t paddr;\n uint32_t filesize;\n uint32_t memsize;\n uint32_t flags;\n}" ({) "{" (field_declaration) "uint32_t type;" (primitive_type) "uint32_t" (field_identifier) "type" (;) ";" (field_declaration) "uint32_t offset;" (primitive_type) "uint32_t" (field_identifier) "offset" (;) ";" (field_declaration) "uint32_t vaddr;" (primitive_type) "uint32_t" (field_identifier) "vaddr" (;) ";" (field_declaration) "uint32_t paddr;" (primitive_type) "uint32_t" (field_identifier) "paddr" (;) ";" (field_declaration) "uint32_t filesize;" (primitive_type) "uint32_t" (field_identifier) "filesize" (;) ";" (field_declaration) "uint32_t memsize;" (primitive_type) "uint32_t" (field_identifier) "memsize" (;) ";" (field_declaration) "uint32_t flags;" (primitive_type) "uint32_t" (field_identifier) "flags" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct elf_program_header_64 {\n uint32_t type;\n uint32_t flags;\n uint64_t offset;\n uint64_t vaddr;\n uint64_t paddr;\n uint64_t filesize;\n uint64_t memsize;\n}" (struct) "struct" (type_identifier) "elf_program_header_64" (field_declaration_list) "{\n uint32_t type;\n uint32_t flags;\n uint64_t offset;\n uint64_t vaddr;\n uint64_t paddr;\n uint64_t filesize;\n uint64_t memsize;\n}" ({) "{" (field_declaration) "uint32_t type;" (primitive_type) "uint32_t" (field_identifier) "type" (;) ";" (field_declaration) "uint32_t flags;" (primitive_type) "uint32_t" (field_identifier) "flags" (;) ";" (field_declaration) "uint64_t offset;" (primitive_type) "uint64_t" (field_identifier) "offset" (;) ";" (field_declaration) "uint64_t vaddr;" (primitive_type) "uint64_t" (field_identifier) "vaddr" (;) ";" (field_declaration) "uint64_t paddr;" (primitive_type) "uint64_t" (field_identifier) "paddr" (;) ";" (field_declaration) "uint64_t filesize;" (primitive_type) "uint64_t" (field_identifier) "filesize" (;) ";" (field_declaration) "uint64_t memsize;" (primitive_type) "uint64_t" (field_identifier) "memsize" (;) ";" (}) "}" (;) ";" (function_definition) "static int mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n uint8_t *dst, size_t len)\n{\n size_t retlen;\n int ret;\n\n ret = mtd_read(mtd, offset, len, &retlen, dst);\n if (ret) {\n pr_debug("read error in \"%s\"\n", mtd->name);\n return ret;\n }\n\n if (retlen != len) {\n pr_debug("short read in \"%s\"\n", mtd->name);\n return -EIO;\n }\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n uint8_t *dst, size_t len)" (identifier) "mtdsplit_elf_read_mtd" (parameter_list) "(struct mtd_info *mtd, size_t offset,\n uint8_t *dst, size_t len)" (() "(" (parameter_declaration) "struct mtd_info *mtd" (struct_specifier) "struct mtd_info" (struct) "struct" (type_identifier) "mtd_info" (pointer_declarator) "*mtd" (*) "*" (identifier) "mtd" (,) "," (parameter_declaration) "size_t offset" (primitive_type) "size_t" (identifier) "offset" (,) "," (parameter_declaration) "uint8_t *dst" (primitive_type) "uint8_t" (pointer_declarator) "*dst" (*) "*" (identifier) "dst" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" ()) ")" (compound_statement) "{\n size_t retlen;\n int ret;\n\n ret = mtd_read(mtd, offset, len, &retlen, dst);\n if (ret) {\n pr_debug("read error in \"%s\"\n", mtd->name);\n return ret;\n }\n\n if (retlen != len) {\n pr_debug("short read in \"%s\"\n", mtd->name);\n return -EIO;\n }\n\n return 0;\n}" ({) "{" (declaration) "size_t retlen;" (primitive_type) "size_t" (identifier) "retlen" (;) ";" (declaration) "int ret;" (primitive_type) "int" (identifier) "ret" (;) ";" (expression_statement) "ret = mtd_read(mtd, offset, len, &retlen, dst);" (assignment_expression) "ret = mtd_read(mtd, offset, len, &retlen, dst)" (identifier) "ret" (=) "=" (call_expression) "mtd_read(mtd, offset, len, &retlen, dst)" (identifier) "mtd_read" (argument_list) "(mtd, offset, len, &retlen, dst)" (() "(" (identifier) "mtd" (,) "," (identifier) "offset" (,) "," (identifier) "len" (,) "," (pointer_expression) "&retlen" (&) "&" (identifier) "retlen" (,) "," (identifier) "dst" ()) ")" (;) ";" (if_statement) "if (ret) {\n pr_debug("read error in \"%s\"\n", mtd->name);\n return ret;\n }" (if) "if" (parenthesized_expression) "(ret)" (() "(" (identifier) "ret" ()) ")" (compound_statement) "{\n pr_debug("read error in \"%s\"\n", mtd->name);\n return ret;\n }" ({) "{" (expression_statement) "pr_debug("read error in \"%s\"\n", mtd->name);" (call_expression) "pr_debug("read error in \"%s\"\n", mtd->name)" (identifier) "pr_debug" (argument_list) "("read error in \"%s\"\n", mtd->name)" (() "(" (string_literal) ""read error in \"%s\"\n"" (") """ (string_content) "read error in " (escape_sequence) "\"" (string_content) "%s" (escape_sequence) "\"" (escape_sequence) "\n" (") """ (,) "," (field_expression) "mtd->name" (identifier) "mtd" (->) "->" (field_identifier) "name" ()) ")" (;) ";" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}" (if_statement) "if (retlen != len) {\n pr_debug("short read in \"%s\"\n", mtd->name);\n return -EIO;\n }" (if) "if" (parenthesized_expression) "(retlen != len)" (() "(" (binary_expression) "retlen != len" (identifier) "retlen" (!=) "!=" (identifier) "len" ()) ")" (compound_statement) "{\n pr_debug("short read in \"%s\"\n", mtd->name);\n return -EIO;\n }" ({) "{" (expression_statement) "pr_debug("short read in \"%s\"\n", mtd->name);" (call_expression) "pr_debug("short read in \"%s\"\n", mtd->name)" (identifier) "pr_debug" (argument_list) "("short read in \"%s\"\n", mtd->name)" (() "(" (string_literal) ""short read in \"%s\"\n"" (") """ (string_content) "short read in " (escape_sequence) "\"" (string_content) "%s" (escape_sequence) "\"" (escape_sequence) "\n" (") """ (,) "," (field_expression) "mtd->name" (identifier) "mtd" (->) "->" (field_identifier) "name" ()) ")" (;) ";" (return_statement) "return -EIO;" (return) "return" (unary_expression) "-EIO" (-) "-" (identifier) "EIO" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)\n{\n struct elf_header_32 *hdr32 = &(hdr->elf32);\n int err;\n size_t section_end, ph_table_end, ph_entry;\n struct elf_program_header_32 ph;\n\n *size = 0;\n\n if (hdr32->shoff > 0) {\n *size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n return 0;\n }\n\n ph_entry = hdr32->phoff;\n ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum;\n\n while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr32->phentsize;\n }\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)" (identifier) "elf32_determine_size" (parameter_list) "(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)" (() "(" (parameter_declaration) "struct mtd_info *mtd" (struct_specifier) "struct mtd_info" (struct) "struct" (type_identifier) "mtd_info" (pointer_declarator) "*mtd" (*) "*" (identifier) "mtd" (,) "," (parameter_declaration) "struct elf_header *hdr" (struct_specifier) "struct elf_header" (struct) "struct" (type_identifier) "elf_header" (pointer_declarator) "*hdr" (*) "*" (identifier) "hdr" (,) "," (parameter_declaration) "size_t *size" (primitive_type) "size_t" (pointer_declarator) "*size" (*) "*" (identifier) "size" ()) ")" (compound_statement) "{\n struct elf_header_32 *hdr32 = &(hdr->elf32);\n int err;\n size_t section_end, ph_table_end, ph_entry;\n struct elf_program_header_32 ph;\n\n *size = 0;\n\n if (hdr32->shoff > 0) {\n *size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n return 0;\n }\n\n ph_entry = hdr32->phoff;\n ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum;\n\n while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr32->phentsize;\n }\n\n return 0;\n}" ({) "{" (declaration) "struct elf_header_32 *hdr32 = &(hdr->elf32);" (struct_specifier) "struct elf_header_32" (struct) "struct" (type_identifier) "elf_header_32" (init_declarator) "*hdr32 = &(hdr->elf32)" (pointer_declarator) "*hdr32" (*) "*" (identifier) "hdr32" (=) "=" (pointer_expression) "&(hdr->elf32)" (&) "&" (parenthesized_expression) "(hdr->elf32)" (() "(" (field_expression) "hdr->elf32" (identifier) "hdr" (->) "->" (field_identifier) "elf32" ()) ")" (;) ";" (declaration) "int err;" (primitive_type) "int" (identifier) "err" (;) ";" (declaration) "size_t section_end, ph_table_end, ph_entry;" (primitive_type) "size_t" (identifier) "section_end" (,) "," (identifier) "ph_table_end" (,) "," (identifier) "ph_entry" (;) ";" (declaration) "struct elf_program_header_32 ph;" (struct_specifier) "struct elf_program_header_32" (struct) "struct" (type_identifier) "elf_program_header_32" (identifier) "ph" (;) ";" (expression_statement) "*size = 0;" (assignment_expression) "*size = 0" (pointer_expression) "*size" (*) "*" (identifier) "size" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if (hdr32->shoff > 0) {\n *size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n return 0;\n }" (if) "if" (parenthesized_expression) "(hdr32->shoff > 0)" (() "(" (binary_expression) "hdr32->shoff > 0" (field_expression) "hdr32->shoff" (identifier) "hdr32" (->) "->" (field_identifier) "shoff" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n *size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n return 0;\n }" ({) "{" (expression_statement) "*size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;" (assignment_expression) "*size = hdr32->shoff + hdr32->shentsize * hdr32->shnum" (pointer_expression) "*size" (*) "*" (identifier) "size" (=) "=" (binary_expression) "hdr32->shoff + hdr32->shentsize * hdr32->shnum" (field_expression) "hdr32->shoff" (identifier) "hdr32" (->) "->" (field_identifier) "shoff" (+) "+" (binary_expression) "hdr32->shentsize * hdr32->shnum" (field_expression) "hdr32->shentsize" (identifier) "hdr32" (->) "->" (field_identifier) "shentsize" (*) "*" (field_expression) "hdr32->shnum" (identifier) "hdr32" (->) "->" (field_identifier) "shnum" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (expression_statement) "ph_entry = hdr32->phoff;" (assignment_expression) "ph_entry = hdr32->phoff" (identifier) "ph_entry" (=) "=" (field_expression) "hdr32->phoff" (identifier) "hdr32" (->) "->" (field_identifier) "phoff" (;) ";" (expression_statement) "ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum;" (assignment_expression) "ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum" (identifier) "ph_table_end" (=) "=" (binary_expression) "hdr32->phoff + hdr32->phentsize * hdr32->phnum" (field_expression) "hdr32->phoff" (identifier) "hdr32" (->) "->" (field_identifier) "phoff" (+) "+" (binary_expression) "hdr32->phentsize * hdr32->phnum" (field_expression) "hdr32->phentsize" (identifier) "hdr32" (->) "->" (field_identifier) "phentsize" (*) "*" (field_expression) "hdr32->phnum" (identifier) "hdr32" (->) "->" (field_identifier) "phnum" (;) ";" (while_statement) "while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr32->phentsize;\n }" (while) "while" (parenthesized_expression) "(ph_entry < ph_table_end)" (() "(" (binary_expression) "ph_entry < ph_table_end" (identifier) "ph_entry" (<) "<" (identifier) "ph_table_end" ()) ")" (compound_statement) "{\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr32->phentsize;\n }" ({) "{" (expression_statement) "err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));" (assignment_expression) "err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph))" (identifier) "err" (=) "=" (call_expression) "mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph))" (identifier) "mtdsplit_elf_read_mtd" (argument_list) "(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph))" (() "(" (identifier) "mtd" (,) "," (identifier) "ph_entry" (,) "," (cast_expression) "(uint8_t *)(&ph)" (() "(" (type_descriptor) "uint8_t *" (primitive_type) "uint8_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(&ph)" (() "(" (pointer_expression) "&ph" (&) "&" (identifier) "ph" ()) ")" (,) "," (sizeof_expression) "sizeof(ph)" (sizeof) "sizeof" (parenthesized_expression) "(ph)" (() "(" (identifier) "ph" ()) ")" ()) ")" (;) ";" (if_statement) "if (err)\n return err;" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (expression_statement) "section_end = ph.offset + ph.filesize;" (assignment_expression) "section_end = ph.offset + ph.filesize" (identifier) "section_end" (=) "=" (binary_expression) "ph.offset + ph.filesize" (field_expression) "ph.offset" (identifier) "ph" (.) "." (field_identifier) "offset" (+) "+" (field_expression) "ph.filesize" (identifier) "ph" (.) "." (field_identifier) "filesize" (;) ";" (if_statement) "if (section_end > *size)\n *size = section_end;" (if) "if" (parenthesized_expression) "(section_end > *size)" (() "(" (binary_expression) "section_end > *size" (identifier) "section_end" (>) ">" (pointer_expression) "*size" (*) "*" (identifier) "size" ()) ")" (expression_statement) "*size = section_end;" (assignment_expression) "*size = section_end" (pointer_expression) "*size" (*) "*" (identifier) "size" (=) "=" (identifier) "section_end" (;) ";" (expression_statement) "ph_entry += hdr32->phentsize;" (assignment_expression) "ph_entry += hdr32->phentsize" (identifier) "ph_entry" (+=) "+=" (field_expression) "hdr32->phentsize" (identifier) "hdr32" (->) "->" (field_identifier) "phentsize" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)\n{\n struct elf_header_64 *hdr64 = &(hdr->elf64);\n int err;\n size_t section_end, ph_table_end, ph_entry;\n struct elf_program_header_64 ph;\n\n *size = 0;\n\n if (hdr64->shoff > 0) {\n *size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n return 0;\n }\n\n ph_entry = hdr64->phoff;\n ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum;\n\n while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr64->phentsize;\n }\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)" (identifier) "elf64_determine_size" (parameter_list) "(struct mtd_info *mtd, struct elf_header *hdr,\n size_t *size)" (() "(" (parameter_declaration) "struct mtd_info *mtd" (struct_specifier) "struct mtd_info" (struct) "struct" (type_identifier) "mtd_info" (pointer_declarator) "*mtd" (*) "*" (identifier) "mtd" (,) "," (parameter_declaration) "struct elf_header *hdr" (struct_specifier) "struct elf_header" (struct) "struct" (type_identifier) "elf_header" (pointer_declarator) "*hdr" (*) "*" (identifier) "hdr" (,) "," (parameter_declaration) "size_t *size" (primitive_type) "size_t" (pointer_declarator) "*size" (*) "*" (identifier) "size" ()) ")" (compound_statement) "{\n struct elf_header_64 *hdr64 = &(hdr->elf64);\n int err;\n size_t section_end, ph_table_end, ph_entry;\n struct elf_program_header_64 ph;\n\n *size = 0;\n\n if (hdr64->shoff > 0) {\n *size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n return 0;\n }\n\n ph_entry = hdr64->phoff;\n ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum;\n\n while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr64->phentsize;\n }\n\n return 0;\n}" ({) "{" (declaration) "struct elf_header_64 *hdr64 = &(hdr->elf64);" (struct_specifier) "struct elf_header_64" (struct) "struct" (type_identifier) "elf_header_64" (init_declarator) "*hdr64 = &(hdr->elf64)" (pointer_declarator) "*hdr64" (*) "*" (identifier) "hdr64" (=) "=" (pointer_expression) "&(hdr->elf64)" (&) "&" (parenthesized_expression) "(hdr->elf64)" (() "(" (field_expression) "hdr->elf64" (identifier) "hdr" (->) "->" (field_identifier) "elf64" ()) ")" (;) ";" (declaration) "int err;" (primitive_type) "int" (identifier) "err" (;) ";" (declaration) "size_t section_end, ph_table_end, ph_entry;" (primitive_type) "size_t" (identifier) "section_end" (,) "," (identifier) "ph_table_end" (,) "," (identifier) "ph_entry" (;) ";" (declaration) "struct elf_program_header_64 ph;" (struct_specifier) "struct elf_program_header_64" (struct) "struct" (type_identifier) "elf_program_header_64" (identifier) "ph" (;) ";" (expression_statement) "*size = 0;" (assignment_expression) "*size = 0" (pointer_expression) "*size" (*) "*" (identifier) "size" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if (hdr64->shoff > 0) {\n *size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n return 0;\n }" (if) "if" (parenthesized_expression) "(hdr64->shoff > 0)" (() "(" (binary_expression) "hdr64->shoff > 0" (field_expression) "hdr64->shoff" (identifier) "hdr64" (->) "->" (field_identifier) "shoff" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n *size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n return 0;\n }" ({) "{" (expression_statement) "*size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;" (assignment_expression) "*size = hdr64->shoff + hdr64->shentsize * hdr64->shnum" (pointer_expression) "*size" (*) "*" (identifier) "size" (=) "=" (binary_expression) "hdr64->shoff + hdr64->shentsize * hdr64->shnum" (field_expression) "hdr64->shoff" (identifier) "hdr64" (->) "->" (field_identifier) "shoff" (+) "+" (binary_expression) "hdr64->shentsize * hdr64->shnum" (field_expression) "hdr64->shentsize" (identifier) "hdr64" (->) "->" (field_identifier) "shentsize" (*) "*" (field_expression) "hdr64->shnum" (identifier) "hdr64" (->) "->" (field_identifier) "shnum" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (expression_statement) "ph_entry = hdr64->phoff;" (assignment_expression) "ph_entry = hdr64->phoff" (identifier) "ph_entry" (=) "=" (field_expression) "hdr64->phoff" (identifier) "hdr64" (->) "->" (field_identifier) "phoff" (;) ";" (expression_statement) "ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum;" (assignment_expression) "ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum" (identifier) "ph_table_end" (=) "=" (binary_expression) "hdr64->phoff + hdr64->phentsize * hdr64->phnum" (field_expression) "hdr64->phoff" (identifier) "hdr64" (->) "->" (field_identifier) "phoff" (+) "+" (binary_expression) "hdr64->phentsize * hdr64->phnum" (field_expression) "hdr64->phentsize" (identifier) "hdr64" (->) "->" (field_identifier) "phentsize" (*) "*" (field_expression) "hdr64->phnum" (identifier) "hdr64" (->) "->" (field_identifier) "phnum" (;) ";" (while_statement) "while (ph_entry < ph_table_end) {\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr64->phentsize;\n }" (while) "while" (parenthesized_expression) "(ph_entry < ph_table_end)" (() "(" (binary_expression) "ph_entry < ph_table_end" (identifier) "ph_entry" (<) "<" (identifier) "ph_table_end" ()) ")" (compound_statement) "{\n err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));\n if (err)\n return err;\n\n section_end = ph.offset + ph.filesize;\n if (section_end > *size)\n *size = section_end;\n\n ph_entry += hdr64->phentsize;\n }" ({) "{" (expression_statement) "err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph));" (assignment_expression) "err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph))" (identifier) "err" (=) "=" (call_expression) "mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph))" (identifier) "mtdsplit_elf_read_mtd" (argument_list) "(mtd, ph_entry, (uint8_t *)(&ph),\n sizeof(ph))" (() "(" (identifier) "mtd" (,) "," (identifier) "ph_entry" (,) "," (cast_expression) "(uint8_t *)(&ph)" (() "(" (type_descriptor) "uint8_t *" (primitive_type) "uint8_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(&ph)" (() "(" (pointer_expression) "&ph" (&) "&" (identifier) "ph" ()) ")" (,) "," (sizeof_expression) "sizeof(ph)" (sizeof) "sizeof" (parenthesized_expression) "(ph)" (() "(" (identifier) "ph" ()) ")" ()) ")" (;) ";" (if_statement) "if (err)\n return err;" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (expression_statement) "section_end = ph.offset + ph.filesize;" (assignment_expression) "section_end = ph.offset + ph.filesize" (identifier) "section_end" (=) "=" (binary_expression) "ph.offset + ph.filesize" (field_expression) "ph.offset" (identifier) "ph" (.) "." (field_identifier) "offset" (+) "+" (field_expression) "ph.filesize" (identifier) "ph" (.) "." (field_identifier) "filesize" (;) ";" (if_statement) "if (section_end > *size)\n *size = section_end;" (if) "if" (parenthesized_expression) "(section_end > *size)" (() "(" (binary_expression) "section_end > *size" (identifier) "section_end" (>) ">" (pointer_expression) "*size" (*) "*" (identifier) "size" ()) ")" (expression_statement) "*size = section_end;" (assignment_expression) "*size = section_end" (pointer_expression) "*size" (*) "*" (identifier) "size" (=) "=" (identifier) "section_end" (;) ";" (expression_statement) "ph_entry += hdr64->phentsize;" (assignment_expression) "ph_entry += hdr64->phentsize" (identifier) "ph_entry" (+=) "+=" (field_expression) "hdr64->phentsize" (identifier) "hdr64" (->) "->" (field_identifier) "phentsize" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int mtdsplit_parse_elf(struct mtd_info *mtd,\n const struct mtd_partition **pparts,\n struct mtd_part_parser_data *data)\n{\n struct elf_header hdr;\n size_t loader_size, rootfs_offset;\n enum mtdsplit_part_type type;\n struct mtd_partition *parts;\n int err;\n\n err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr));\n if (err)\n return err;\n\n if (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic));\n return -EINVAL;\n }\n\n switch (hdr.ident.class) {\n case ELF_CLASS_32:\n err = elf32_determine_size(mtd, &hdr, &loader_size);\n break;\n case ELF_CLASS_64:\n err = elf64_determine_size(mtd, &hdr, &loader_size);\n break;\n default:\n pr_debug("invalid ELF class %i\n", hdr.ident.class);\n err = -EINVAL;\n }\n\n if (err)\n return err;\n\n err = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n &rootfs_offset, &type);\n if (err)\n return err;\n\n if (rootfs_offset == mtd->size) {\n pr_debug("no rootfs found in \"%s\"\n", mtd->name);\n return -ENODEV;\n }\n\n parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL);\n if (!parts)\n return -ENOMEM;\n\n parts[0].name = KERNEL_PART_NAME;\n parts[0].offset = 0;\n parts[0].size = rootfs_offset;\n\n if (type == MTDSPLIT_PART_TYPE_UBI)\n parts[1].name = UBI_PART_NAME;\n else\n parts[1].name = ROOTFS_PART_NAME;\n parts[1].offset = rootfs_offset;\n parts[1].size = mtd->size - rootfs_offset;\n\n *pparts = parts;\n return ELF_NR_PARTS;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "mtdsplit_parse_elf(struct mtd_info *mtd,\n const struct mtd_partition **pparts,\n struct mtd_part_parser_data *data)" (identifier) "mtdsplit_parse_elf" (parameter_list) "(struct mtd_info *mtd,\n const struct mtd_partition **pparts,\n struct mtd_part_parser_data *data)" (() "(" (parameter_declaration) "struct mtd_info *mtd" (struct_specifier) "struct mtd_info" (struct) "struct" (type_identifier) "mtd_info" (pointer_declarator) "*mtd" (*) "*" (identifier) "mtd" (,) "," (parameter_declaration) "const struct mtd_partition **pparts" (type_qualifier) "const" (const) "const" (struct_specifier) "struct mtd_partition" (struct) "struct" (type_identifier) "mtd_partition" (pointer_declarator) "**pparts" (*) "*" (pointer_declarator) "*pparts" (*) "*" (identifier) "pparts" (,) "," (parameter_declaration) "struct mtd_part_parser_data *data" (struct_specifier) "struct mtd_part_parser_data" (struct) "struct" (type_identifier) "mtd_part_parser_data" (pointer_declarator) "*data" (*) "*" (identifier) "data" ()) ")" (compound_statement) "{\n struct elf_header hdr;\n size_t loader_size, rootfs_offset;\n enum mtdsplit_part_type type;\n struct mtd_partition *parts;\n int err;\n\n err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr));\n if (err)\n return err;\n\n if (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic));\n return -EINVAL;\n }\n\n switch (hdr.ident.class) {\n case ELF_CLASS_32:\n err = elf32_determine_size(mtd, &hdr, &loader_size);\n break;\n case ELF_CLASS_64:\n err = elf64_determine_size(mtd, &hdr, &loader_size);\n break;\n default:\n pr_debug("invalid ELF class %i\n", hdr.ident.class);\n err = -EINVAL;\n }\n\n if (err)\n return err;\n\n err = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n &rootfs_offset, &type);\n if (err)\n return err;\n\n if (rootfs_offset == mtd->size) {\n pr_debug("no rootfs found in \"%s\"\n", mtd->name);\n return -ENODEV;\n }\n\n parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL);\n if (!parts)\n return -ENOMEM;\n\n parts[0].name = KERNEL_PART_NAME;\n parts[0].offset = 0;\n parts[0].size = rootfs_offset;\n\n if (type == MTDSPLIT_PART_TYPE_UBI)\n parts[1].name = UBI_PART_NAME;\n else\n parts[1].name = ROOTFS_PART_NAME;\n parts[1].offset = rootfs_offset;\n parts[1].size = mtd->size - rootfs_offset;\n\n *pparts = parts;\n return ELF_NR_PARTS;\n}" ({) "{" (declaration) "struct elf_header hdr;" (struct_specifier) "struct elf_header" (struct) "struct" (type_identifier) "elf_header" (identifier) "hdr" (;) ";" (declaration) "size_t loader_size, rootfs_offset;" (primitive_type) "size_t" (identifier) "loader_size" (,) "," (identifier) "rootfs_offset" (;) ";" (declaration) "enum mtdsplit_part_type type;" (enum_specifier) "enum mtdsplit_part_type" (enum) "enum" (type_identifier) "mtdsplit_part_type" (identifier) "type" (;) ";" (declaration) "struct mtd_partition *parts;" (struct_specifier) "struct mtd_partition" (struct) "struct" (type_identifier) "mtd_partition" (pointer_declarator) "*parts" (*) "*" (identifier) "parts" (;) ";" (declaration) "int err;" (primitive_type) "int" (identifier) "err" (;) ";" (expression_statement) "err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr));" (assignment_expression) "err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr))" (identifier) "err" (=) "=" (call_expression) "mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr))" (identifier) "mtdsplit_elf_read_mtd" (argument_list) "(mtd, 0, (uint8_t *)&hdr, sizeof(hdr))" (() "(" (identifier) "mtd" (,) "," (number_literal) "0" (,) "," (cast_expression) "(uint8_t *)&hdr" (() "(" (type_descriptor) "uint8_t *" (primitive_type) "uint8_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&hdr" (&) "&" (identifier) "hdr" (,) "," (sizeof_expression) "sizeof(hdr)" (sizeof) "sizeof" (parenthesized_expression) "(hdr)" (() "(" (identifier) "hdr" ()) ")" ()) ")" (;) ";" (if_statement) "if (err)\n return err;" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (if_statement) "if (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic));\n return -EINVAL;\n }" (if) "if" (parenthesized_expression) "(be32_to_cpu(hdr.ident.magic) != ELF_MAGIC)" (() "(" (binary_expression) "be32_to_cpu(hdr.ident.magic) != ELF_MAGIC" (call_expression) "be32_to_cpu(hdr.ident.magic)" (identifier) "be32_to_cpu" (argument_list) "(hdr.ident.magic)" (() "(" (field_expression) "hdr.ident.magic" (field_expression) "hdr.ident" (identifier) "hdr" (.) "." (field_identifier) "ident" (.) "." (field_identifier) "magic" ()) ")" (!=) "!=" (identifier) "ELF_MAGIC" ()) ")" (compound_statement) "{\n pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic));\n return -EINVAL;\n }" ({) "{" (expression_statement) "pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic));" (call_expression) "pr_debug("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic))" (identifier) "pr_debug" (argument_list) "("invalid ELF magic %08x\n",\n be32_to_cpu(hdr.ident.magic))" (() "(" (string_literal) ""invalid ELF magic %08x\n"" (") """ (string_content) "invalid ELF magic %08x" (escape_sequence) "\n" (") """ (,) "," (call_expression) "be32_to_cpu(hdr.ident.magic)" (identifier) "be32_to_cpu" (argument_list) "(hdr.ident.magic)" (() "(" (field_expression) "hdr.ident.magic" (field_expression) "hdr.ident" (identifier) "hdr" (.) "." (field_identifier) "ident" (.) "." (field_identifier) "magic" ()) ")" ()) ")" (;) ";" (return_statement) "return -EINVAL;" (return) "return" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (}) "}" (switch_statement) "switch (hdr.ident.class) {\n case ELF_CLASS_32:\n err = elf32_determine_size(mtd, &hdr, &loader_size);\n break;\n case ELF_CLASS_64:\n err = elf64_determine_size(mtd, &hdr, &loader_size);\n break;\n default:\n pr_debug("invalid ELF class %i\n", hdr.ident.class);\n err = -EINVAL;\n }" (switch) "switch" (parenthesized_expression) "(hdr.ident.class)" (() "(" (field_expression) "hdr.ident.class" (field_expression) "hdr.ident" (identifier) "hdr" (.) "." (field_identifier) "ident" (.) "." (field_identifier) "class" ()) ")" (compound_statement) "{\n case ELF_CLASS_32:\n err = elf32_determine_size(mtd, &hdr, &loader_size);\n break;\n case ELF_CLASS_64:\n err = elf64_determine_size(mtd, &hdr, &loader_size);\n break;\n default:\n pr_debug("invalid ELF class %i\n", hdr.ident.class);\n err = -EINVAL;\n }" ({) "{" (case_statement) "case ELF_CLASS_32:\n err = elf32_determine_size(mtd, &hdr, &loader_size);\n break;" (case) "case" (identifier) "ELF_CLASS_32" (:) ":" (expression_statement) "err = elf32_determine_size(mtd, &hdr, &loader_size);" (assignment_expression) "err = elf32_determine_size(mtd, &hdr, &loader_size)" (identifier) "err" (=) "=" (call_expression) "elf32_determine_size(mtd, &hdr, &loader_size)" (identifier) "elf32_determine_size" (argument_list) "(mtd, &hdr, &loader_size)" (() "(" (identifier) "mtd" (,) "," (pointer_expression) "&hdr" (&) "&" (identifier) "hdr" (,) "," (pointer_expression) "&loader_size" (&) "&" (identifier) "loader_size" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case ELF_CLASS_64:\n err = elf64_determine_size(mtd, &hdr, &loader_size);\n break;" (case) "case" (identifier) "ELF_CLASS_64" (:) ":" (expression_statement) "err = elf64_determine_size(mtd, &hdr, &loader_size);" (assignment_expression) "err = elf64_determine_size(mtd, &hdr, &loader_size)" (identifier) "err" (=) "=" (call_expression) "elf64_determine_size(mtd, &hdr, &loader_size)" (identifier) "elf64_determine_size" (argument_list) "(mtd, &hdr, &loader_size)" (() "(" (identifier) "mtd" (,) "," (pointer_expression) "&hdr" (&) "&" (identifier) "hdr" (,) "," (pointer_expression) "&loader_size" (&) "&" (identifier) "loader_size" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n pr_debug("invalid ELF class %i\n", hdr.ident.class);\n err = -EINVAL;" (default) "default" (:) ":" (expression_statement) "pr_debug("invalid ELF class %i\n", hdr.ident.class);" (call_expression) "pr_debug("invalid ELF class %i\n", hdr.ident.class)" (identifier) "pr_debug" (argument_list) "("invalid ELF class %i\n", hdr.ident.class)" (() "(" (string_literal) ""invalid ELF class %i\n"" (") """ (string_content) "invalid ELF class %i" (escape_sequence) "\n" (") """ (,) "," (field_expression) "hdr.ident.class" (field_expression) "hdr.ident" (identifier) "hdr" (.) "." (field_identifier) "ident" (.) "." (field_identifier) "class" ()) ")" (;) ";" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (}) "}" (if_statement) "if (err)\n return err;" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (expression_statement) "err = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n &rootfs_offset, &type);" (assignment_expression) "err = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n &rootfs_offset, &type)" (identifier) "err" (=) "=" (call_expression) "mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n &rootfs_offset, &type)" (identifier) "mtd_find_rootfs_from" (argument_list) "(mtd, loader_size, mtd->size,\n &rootfs_offset, &type)" (() "(" (identifier) "mtd" (,) "," (identifier) "loader_size" (,) "," (field_expression) "mtd->size" (identifier) "mtd" (->) "->" (field_identifier) "size" (,) "," (pointer_expression) "&rootfs_offset" (&) "&" (identifier) "rootfs_offset" (,) "," (pointer_expression) "&type" (&) "&" (identifier) "type" ()) ")" (;) ";" (if_statement) "if (err)\n return err;" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (if_statement) "if (rootfs_offset == mtd->size) {\n pr_debug("no rootfs found in \"%s\"\n", mtd->name);\n return -ENODEV;\n }" (if) "if" (parenthesized_expression) "(rootfs_offset == mtd->size)" (() "(" (binary_expression) "rootfs_offset == mtd->size" (identifier) "rootfs_offset" (==) "==" (field_expression) "mtd->size" (identifier) "mtd" (->) "->" (field_identifier) "size" ()) ")" (compound_statement) "{\n pr_debug("no rootfs found in \"%s\"\n", mtd->name);\n return -ENODEV;\n }" ({) "{" (expression_statement) "pr_debug("no rootfs found in \"%s\"\n", mtd->name);" (call_expression) "pr_debug("no rootfs found in \"%s\"\n", mtd->name)" (identifier) "pr_debug" (argument_list) "("no rootfs found in \"%s\"\n", mtd->name)" (() "(" (string_literal) ""no rootfs found in \"%s\"\n"" (") """ (string_content) "no rootfs found in " (escape_sequence) "\"" (string_content) "%s" (escape_sequence) "\"" (escape_sequence) "\n" (") """ (,) "," (field_expression) "mtd->name" (identifier) "mtd" (->) "->" (field_identifier) "name" ()) ")" (;) ";" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (}) "}" (expression_statement) "parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL);" (assignment_expression) "parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL)" (identifier) "parts" (=) "=" (call_expression) "kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL)" (identifier) "kzalloc" (argument_list) "(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL)" (() "(" (binary_expression) "ELF_NR_PARTS * sizeof(*parts)" (identifier) "ELF_NR_PARTS" (*) "*" (sizeof_expression) "sizeof(*parts)" (sizeof) "sizeof" (parenthesized_expression) "(*parts)" (() "(" (pointer_expression) "*parts" (*) "*" (identifier) "parts" ()) ")" (,) "," (identifier) "GFP_KERNEL" ()) ")" (;) ";" (if_statement) "if (!parts)\n return -ENOMEM;" (if) "if" (parenthesized_expression) "(!parts)" (() "(" (unary_expression) "!parts" (!) "!" (identifier) "parts" ()) ")" (return_statement) "return -ENOMEM;" (return) "return" (unary_expression) "-ENOMEM" (-) "-" (identifier) "ENOMEM" (;) ";" (expression_statement) "parts[0].name = KERNEL_PART_NAME;" (assignment_expression) "parts[0].name = KERNEL_PART_NAME" (field_expression) "parts[0].name" (subscript_expression) "parts[0]" (identifier) "parts" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "name" (=) "=" (identifier) "KERNEL_PART_NAME" (;) ";" (expression_statement) "parts[0].offset = 0;" (assignment_expression) "parts[0].offset = 0" (field_expression) "parts[0].offset" (subscript_expression) "parts[0]" (identifier) "parts" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "offset" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "parts[0].size = rootfs_offset;" (assignment_expression) "parts[0].size = rootfs_offset" (field_expression) "parts[0].size" (subscript_expression) "parts[0]" (identifier) "parts" ([) "[" (number_literal) "0" (]) "]" (.) "." (field_identifier) "size" (=) "=" (identifier) "rootfs_offset" (;) ";" (if_statement) "if (type == MTDSPLIT_PART_TYPE_UBI)\n parts[1].name = UBI_PART_NAME;\n else\n parts[1].name = ROOTFS_PART_NAME;" (if) "if" (parenthesized_expression) "(type == MTDSPLIT_PART_TYPE_UBI)" (() "(" (binary_expression) "type == MTDSPLIT_PART_TYPE_UBI" (identifier) "type" (==) "==" (identifier) "MTDSPLIT_PART_TYPE_UBI" ()) ")" (expression_statement) "parts[1].name = UBI_PART_NAME;" (assignment_expression) "parts[1].name = UBI_PART_NAME" (field_expression) "parts[1].name" (subscript_expression) "parts[1]" (identifier) "parts" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "name" (=) "=" (identifier) "UBI_PART_NAME" (;) ";" (else_clause) "else\n parts[1].name = ROOTFS_PART_NAME;" (else) "else" (expression_statement) "parts[1].name = ROOTFS_PART_NAME;" (assignment_expression) "parts[1].name = ROOTFS_PART_NAME" (field_expression) "parts[1].name" (subscript_expression) "parts[1]" (identifier) "parts" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "name" (=) "=" (identifier) "ROOTFS_PART_NAME" (;) ";" (expression_statement) "parts[1].offset = rootfs_offset;" (assignment_expression) "parts[1].offset = rootfs_offset" (field_expression) "parts[1].offset" (subscript_expression) "parts[1]" (identifier) "parts" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "offset" (=) "=" (identifier) "rootfs_offset" (;) ";" (expression_statement) "parts[1].size = mtd->size - rootfs_offset;" (assignment_expression) "parts[1].size = mtd->size - rootfs_offset" (field_expression) "parts[1].size" (subscript_expression) "parts[1]" (identifier) "parts" ([) "[" (number_literal) "1" (]) "]" (.) "." (field_identifier) "size" (=) "=" (binary_expression) "mtd->size - rootfs_offset" (field_expression) "mtd->size" (identifier) "mtd" (->) "->" (field_identifier) "size" (-) "-" (identifier) "rootfs_offset" (;) ";" (expression_statement) "*pparts = parts;" (assignment_expression) "*pparts = parts" (pointer_expression) "*pparts" (*) "*" (identifier) "pparts" (=) "=" (identifier) "parts" (;) ";" (return_statement) "return ELF_NR_PARTS;" (return) "return" (identifier) "ELF_NR_PARTS" (;) ";" (}) "}" (declaration) "static const struct of_device_id mtdsplit_elf_of_match_table[] = {\n { .compatible = "openwrt,elf" },\n {},\n};" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (struct_specifier) "struct of_device_id" (struct) "struct" (type_identifier) "of_device_id" (init_declarator) "mtdsplit_elf_of_match_table[] = {\n { .compatible = "openwrt,elf" },\n {},\n}" (array_declarator) "mtdsplit_elf_of_match_table[]" (identifier) "mtdsplit_elf_of_match_table" ([) "[" (]) "]" (=) "=" (initializer_list) "{\n { .compatible = "openwrt,elf" },\n {},\n}" ({) "{" (initializer_list) "{ .compatible = "openwrt,elf" }" ({) "{" (initializer_pair) ".compatible = "openwrt,elf"" (field_designator) ".compatible" (.) "." (field_identifier) "compatible" (=) "=" (string_literal) ""openwrt,elf"" (") """ (string_content) "openwrt,elf" (") """ (}) "}" (,) "," (initializer_list) "{}" ({) "{" (}) "}" (,) "," (}) "}" (;) ";" (expression_statement) "MODULE_DEVICE_TABLE(of, mtdsplit_elf_of_match_table);" (call_expression) "MODULE_DEVICE_TABLE(of, mtdsplit_elf_of_match_table)" (identifier) "MODULE_DEVICE_TABLE" (argument_list) "(of, mtdsplit_elf_of_match_table)" (() "(" (identifier) "of" (,) "," (identifier) "mtdsplit_elf_of_match_table" ()) ")" (;) ";" (declaration) "static struct mtd_part_parser mtdsplit_elf_parser = {\n .owner = THIS_MODULE,\n .name = "elf-loader-fw",\n .of_match_table = mtdsplit_elf_of_match_table,\n .parse_fn = mtdsplit_parse_elf,\n .type = MTD_PARSER_TYPE_FIRMWARE,\n};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct mtd_part_parser" (struct) "struct" (type_identifier) "mtd_part_parser" (init_declarator) "mtdsplit_elf_parser = {\n .owner = THIS_MODULE,\n .name = "elf-loader-fw",\n .of_match_table = mtdsplit_elf_of_match_table,\n .parse_fn = mtdsplit_parse_elf,\n .type = MTD_PARSER_TYPE_FIRMWARE,\n}" (identifier) "mtdsplit_elf_parser" (=) "=" (initializer_list) "{\n .owner = THIS_MODULE,\n .name = "elf-loader-fw",\n .of_match_table = mtdsplit_elf_of_match_table,\n .parse_fn = mtdsplit_parse_elf,\n .type = MTD_PARSER_TYPE_FIRMWARE,\n}" ({) "{" (initializer_pair) ".owner = THIS_MODULE" (field_designator) ".owner" (.) "." (field_identifier) "owner" (=) "=" (identifier) "THIS_MODULE" (,) "," (initializer_pair) ".name = "elf-loader-fw"" (field_designator) ".name" (.) "." (field_identifier) "name" (=) "=" (string_literal) ""elf-loader-fw"" (") """ (string_content) "elf-loader-fw" (") """ (,) "," (initializer_pair) ".of_match_table = mtdsplit_elf_of_match_table" (field_designator) ".of_match_table" (.) "." (field_identifier) "of_match_table" (=) "=" (identifier) "mtdsplit_elf_of_match_table" (,) "," (initializer_pair) ".parse_fn = mtdsplit_parse_elf" (field_designator) ".parse_fn" (.) "." (field_identifier) "parse_fn" (=) "=" (identifier) "mtdsplit_parse_elf" (,) "," (initializer_pair) ".type = MTD_PARSER_TYPE_FIRMWARE" (field_designator) ".type" (.) "." (field_identifier) "type" (=) "=" (identifier) "MTD_PARSER_TYPE_FIRMWARE" (,) "," (}) "}" (;) ";" (function_definition) "static int __init mtdsplit_elf_init(void)\n{\n register_mtd_parser(&mtdsplit_elf_parser);\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (ERROR) "__init" (identifier) "__init" (function_declarator) "mtdsplit_elf_init(void)" (identifier) "mtdsplit_elf_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n register_mtd_parser(&mtdsplit_elf_parser);\n\n return 0;\n}" ({) "{" (expression_statement) "register_mtd_parser(&mtdsplit_elf_parser);" (call_expression) "register_mtd_parser(&mtdsplit_elf_parser)" (identifier) "register_mtd_parser" (argument_list) "(&mtdsplit_elf_parser)" (() "(" (pointer_expression) "&mtdsplit_elf_parser" (&) "&" (identifier) "mtdsplit_elf_parser" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (expression_statement) "subsys_initcall(mtdsplit_elf_init);" (call_expression) "subsys_initcall(mtdsplit_elf_init)" (identifier) "subsys_initcall" (argument_list) "(mtdsplit_elf_init)" (() "(" (identifier) "mtdsplit_elf_init" ()) ")" (;) ";"
1,592
1
{"language": "c", "success": true, "metadata": {"lines": 241, "avg_line_length": 25.58, "nodes": 1021, "errors": 0, "source_hash": "7c1702fb6330c9ad5a2a500d75843d0c6f89d8681daebda65a40b50826fa7d3b", "categorized_nodes": 765}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <linux/module.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<linux/module.h>", "parent": 0, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 25}}, {"id": 3, "type": "preproc_include", "text": "#include <linux/init.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<linux/init.h>", "parent": 3, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <linux/kernel.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<linux/kernel.h>", "parent": 6, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include <linux/slab.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<linux/slab.h>", "parent": 9, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <linux/mtd/mtd.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<linux/mtd/mtd.h>", "parent": 12, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 26}}, {"id": 15, "type": "preproc_include", "text": "#include <linux/mtd/partitions.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<linux/mtd/partitions.h>", "parent": 15, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 33}}, {"id": 18, "type": "preproc_include", "text": "#include <linux/of.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<linux/of.h>", "parent": 18, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 21}}, {"id": 21, "type": "preproc_include", "text": "#include <linux/byteorder/generic.h>\n", "parent": null, "children": [22, 23], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<linux/byteorder/generic.h>", "parent": 21, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 36}}, {"id": 24, "type": "preproc_include", "text": "#include \"mtdsplit.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"mtdsplit.h\"", "parent": 24, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 21}}, {"id": 27, "type": "preproc_def", "text": "#define ELF_NR_PARTS\t2\n", "parent": null, "children": [28, 29, 30], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 29, "type": "identifier", "text": "ELF_NR_PARTS", "parent": 27, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 20}}, {"id": 30, "type": "preproc_arg", "text": "2", "parent": 27, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 22}}, {"id": 31, "type": "preproc_def", "text": "#define ELF_MAGIC\t0x7f454c46 /* 0x7f E L F */\n", "parent": null, "children": [32, 33, 34], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 32, "type": "#define", "text": "#define", "parent": 31, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 33, "type": "identifier", "text": "ELF_MAGIC", "parent": 31, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 17}}, {"id": 34, "type": "preproc_arg", "text": "0x7f454c46 ", "parent": 31, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 29}}, {"id": 35, "type": "preproc_def", "text": "#define ELF_CLASS_32\t1\n", "parent": null, "children": [36, 37, 38], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 36, "type": "#define", "text": "#define", "parent": 35, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 37, "type": "identifier", "text": "ELF_CLASS_32", "parent": 35, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 20}}, {"id": 38, "type": "preproc_arg", "text": "1", "parent": 35, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 22}}, {"id": 39, "type": "preproc_def", "text": "#define ELF_CLASS_64\t2\n", "parent": null, "children": [40, 41, 42], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 41, "type": "identifier", "text": "ELF_CLASS_64", "parent": 39, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 20}}, {"id": 42, "type": "preproc_arg", "text": "2", "parent": 39, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 22}}, {"id": 43, "type": "struct_specifier", "text": "struct elf_header_ident {\n\tuint32_t magic;\n\tuint8_t class;\n\tuint8_t data;\n\tuint8_t version;\n\tuint8_t osabi;\n\tuint8_t abiversion;\n\tuint8_t pad[7];\n}", "parent": null, "children": [44, 45], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 44, "type": "struct", "text": "struct", "parent": 43, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 6}}, {"id": 45, "type": "type_identifier", "text": "elf_header_ident", "parent": 43, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 23}}, {"id": 46, "type": "field_declaration", "text": "uint32_t magic;", "parent": 43, "children": [47, 48], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 16}}, {"id": 47, "type": "primitive_type", "text": "uint32_t", "parent": 46, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 9}}, {"id": 48, "type": "field_identifier", "text": "magic", "parent": 46, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 15}}, {"id": 49, "type": "field_declaration", "text": "uint8_t class;", "parent": 43, "children": [50], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 15}}, {"id": 50, "type": "primitive_type", "text": "uint8_t", "parent": 49, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 8}}, {"id": 51, "type": "field_declaration", "text": "uint8_t data;", "parent": 43, "children": [52, 53], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 14}}, {"id": 52, "type": "primitive_type", "text": "uint8_t", "parent": 51, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 8}}, {"id": 53, "type": "field_identifier", "text": "data", "parent": 51, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 13}}, {"id": 54, "type": "field_declaration", "text": "uint8_t version;", "parent": 43, "children": [55, 56], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 17}}, {"id": 55, "type": "primitive_type", "text": "uint8_t", "parent": 54, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 8}}, {"id": 56, "type": "field_identifier", "text": "version", "parent": 54, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 16}}, {"id": 57, "type": "field_declaration", "text": "uint8_t osabi;", "parent": 43, "children": [58, 59], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 15}}, {"id": 58, "type": "primitive_type", "text": "uint8_t", "parent": 57, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 8}}, {"id": 59, "type": "field_identifier", "text": "osabi", "parent": 57, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 14}}, {"id": 60, "type": "field_declaration", "text": "uint8_t abiversion;", "parent": 43, "children": [61, 62], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 20}}, {"id": 61, "type": "primitive_type", "text": "uint8_t", "parent": 60, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 8}}, {"id": 62, "type": "field_identifier", "text": "abiversion", "parent": 60, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 19}}, {"id": 63, "type": "field_declaration", "text": "uint8_t pad[7];", "parent": 43, "children": [64, 65], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 16}}, {"id": 64, "type": "primitive_type", "text": "uint8_t", "parent": 63, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 8}}, {"id": 65, "type": "array_declarator", "text": "pad[7]", "parent": 63, "children": [66, 67], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 15}}, {"id": 66, "type": "field_identifier", "text": "pad", "parent": 65, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 12}}, {"id": 67, "type": "number_literal", "text": "7", "parent": 65, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 68, "type": "struct_specifier", "text": "struct elf_header_32 {\n\tuint16_t type;\n\tuint16_t machine;\n\tuint32_t version;\n\tuint32_t entry;\n\tuint32_t phoff;\n\tuint32_t shoff;\n\tuint32_t flags;\n\tuint16_t ehsize;\n\tuint16_t phentsize;\n\tuint16_t phnum;\n\tuint16_t shentsize;\n\tuint16_t shnum;\n\tuint16_t shstrndx;\n}", "parent": null, "children": [69, 70], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 66, "column": 1}}, {"id": 69, "type": "struct", "text": "struct", "parent": 68, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 70, "type": "type_identifier", "text": "elf_header_32", "parent": 68, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 20}}, {"id": 71, "type": "field_declaration", "text": "uint16_t type;", "parent": 68, "children": [72, 73], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 15}}, {"id": 72, "type": "primitive_type", "text": "uint16_t", "parent": 71, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 9}}, {"id": 73, "type": "field_identifier", "text": "type", "parent": 71, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 14}}, {"id": 74, "type": "field_declaration", "text": "uint16_t machine;", "parent": 68, "children": [75, 76], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 18}}, {"id": 75, "type": "primitive_type", "text": "uint16_t", "parent": 74, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 9}}, {"id": 76, "type": "field_identifier", "text": "machine", "parent": 74, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 17}}, {"id": 77, "type": "field_declaration", "text": "uint32_t version;", "parent": 68, "children": [78, 79], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 18}}, {"id": 78, "type": "primitive_type", "text": "uint32_t", "parent": 77, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 9}}, {"id": 79, "type": "field_identifier", "text": "version", "parent": 77, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 17}}, {"id": 80, "type": "field_declaration", "text": "uint32_t entry;", "parent": 68, "children": [81, 82], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 16}}, {"id": 81, "type": "primitive_type", "text": "uint32_t", "parent": 80, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 9}}, {"id": 82, "type": "field_identifier", "text": "entry", "parent": 80, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 15}}, {"id": 83, "type": "field_declaration", "text": "uint32_t phoff;", "parent": 68, "children": [84, 85], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 16}}, {"id": 84, "type": "primitive_type", "text": "uint32_t", "parent": 83, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 9}}, {"id": 85, "type": "field_identifier", "text": "phoff", "parent": 83, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 15}}, {"id": 86, "type": "field_declaration", "text": "uint32_t shoff;", "parent": 68, "children": [87, 88], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 16}}, {"id": 87, "type": "primitive_type", "text": "uint32_t", "parent": 86, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 9}}, {"id": 88, "type": "field_identifier", "text": "shoff", "parent": 86, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 15}}, {"id": 89, "type": "field_declaration", "text": "uint32_t flags;", "parent": 68, "children": [90, 91], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 16}}, {"id": 90, "type": "primitive_type", "text": "uint32_t", "parent": 89, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 9}}, {"id": 91, "type": "field_identifier", "text": "flags", "parent": 89, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 15}}, {"id": 92, "type": "field_declaration", "text": "uint16_t ehsize;", "parent": 68, "children": [93, 94], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 17}}, {"id": 93, "type": "primitive_type", "text": "uint16_t", "parent": 92, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 9}}, {"id": 94, "type": "field_identifier", "text": "ehsize", "parent": 92, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 16}}, {"id": 95, "type": "field_declaration", "text": "uint16_t phentsize;", "parent": 68, "children": [96, 97], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 20}}, {"id": 96, "type": "primitive_type", "text": "uint16_t", "parent": 95, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 9}}, {"id": 97, "type": "field_identifier", "text": "phentsize", "parent": 95, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 19}}, {"id": 98, "type": "field_declaration", "text": "uint16_t phnum;", "parent": 68, "children": [99, 100], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 16}}, {"id": 99, "type": "primitive_type", "text": "uint16_t", "parent": 98, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 9}}, {"id": 100, "type": "field_identifier", "text": "phnum", "parent": 98, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 15}}, {"id": 101, "type": "field_declaration", "text": "uint16_t shentsize;", "parent": 68, "children": [102, 103], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 20}}, {"id": 102, "type": "primitive_type", "text": "uint16_t", "parent": 101, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 9}}, {"id": 103, "type": "field_identifier", "text": "shentsize", "parent": 101, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 19}}, {"id": 104, "type": "field_declaration", "text": "uint16_t shnum;", "parent": 68, "children": [105, 106], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 16}}, {"id": 105, "type": "primitive_type", "text": "uint16_t", "parent": 104, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 9}}, {"id": 106, "type": "field_identifier", "text": "shnum", "parent": 104, "children": [], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 15}}, {"id": 107, "type": "field_declaration", "text": "uint16_t shstrndx;", "parent": 68, "children": [108, 109], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 19}}, {"id": 108, "type": "primitive_type", "text": "uint16_t", "parent": 107, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 9}}, {"id": 109, "type": "field_identifier", "text": "shstrndx", "parent": 107, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 18}}, {"id": 110, "type": "struct_specifier", "text": "struct elf_header_64 {\n\tuint16_t type;\n\tuint16_t machine;\n\tuint32_t version;\n\tuint64_t entry;\n\tuint64_t phoff;\n\tuint64_t shoff;\n\tuint32_t flags;\n\tuint16_t ehsize;\n\tuint16_t phentsize;\n\tuint16_t phnum;\n\tuint16_t shentsize;\n\tuint16_t shnum;\n\tuint16_t shstrndx;\n}", "parent": null, "children": [111, 112], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 82, "column": 1}}, {"id": 111, "type": "struct", "text": "struct", "parent": 110, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 112, "type": "type_identifier", "text": "elf_header_64", "parent": 110, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 20}}, {"id": 113, "type": "field_declaration", "text": "uint16_t type;", "parent": 110, "children": [114, 115], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 15}}, {"id": 114, "type": "primitive_type", "text": "uint16_t", "parent": 113, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 9}}, {"id": 115, "type": "field_identifier", "text": "type", "parent": 113, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 14}}, {"id": 116, "type": "field_declaration", "text": "uint16_t machine;", "parent": 110, "children": [117, 118], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 18}}, {"id": 117, "type": "primitive_type", "text": "uint16_t", "parent": 116, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 9}}, {"id": 118, "type": "field_identifier", "text": "machine", "parent": 116, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 17}}, {"id": 119, "type": "field_declaration", "text": "uint32_t version;", "parent": 110, "children": [120, 121], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 18}}, {"id": 120, "type": "primitive_type", "text": "uint32_t", "parent": 119, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 9}}, {"id": 121, "type": "field_identifier", "text": "version", "parent": 119, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 17}}, {"id": 122, "type": "field_declaration", "text": "uint64_t entry;", "parent": 110, "children": [123, 124], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 16}}, {"id": 123, "type": "primitive_type", "text": "uint64_t", "parent": 122, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 9}}, {"id": 124, "type": "field_identifier", "text": "entry", "parent": 122, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 15}}, {"id": 125, "type": "field_declaration", "text": "uint64_t phoff;", "parent": 110, "children": [126, 127], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 16}}, {"id": 126, "type": "primitive_type", "text": "uint64_t", "parent": 125, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 9}}, {"id": 127, "type": "field_identifier", "text": "phoff", "parent": 125, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 15}}, {"id": 128, "type": "field_declaration", "text": "uint64_t shoff;", "parent": 110, "children": [129, 130], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 16}}, {"id": 129, "type": "primitive_type", "text": "uint64_t", "parent": 128, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 9}}, {"id": 130, "type": "field_identifier", "text": "shoff", "parent": 128, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 15}}, {"id": 131, "type": "field_declaration", "text": "uint32_t flags;", "parent": 110, "children": [132, 133], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 16}}, {"id": 132, "type": "primitive_type", "text": "uint32_t", "parent": 131, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 9}}, {"id": 133, "type": "field_identifier", "text": "flags", "parent": 131, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 15}}, {"id": 134, "type": "field_declaration", "text": "uint16_t ehsize;", "parent": 110, "children": [135, 136], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 17}}, {"id": 135, "type": "primitive_type", "text": "uint16_t", "parent": 134, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 9}}, {"id": 136, "type": "field_identifier", "text": "ehsize", "parent": 134, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 16}}, {"id": 137, "type": "field_declaration", "text": "uint16_t phentsize;", "parent": 110, "children": [138, 139], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 20}}, {"id": 138, "type": "primitive_type", "text": "uint16_t", "parent": 137, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 9}}, {"id": 139, "type": "field_identifier", "text": "phentsize", "parent": 137, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 19}}, {"id": 140, "type": "field_declaration", "text": "uint16_t phnum;", "parent": 110, "children": [141, 142], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 16}}, {"id": 141, "type": "primitive_type", "text": "uint16_t", "parent": 140, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 9}}, {"id": 142, "type": "field_identifier", "text": "phnum", "parent": 140, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 15}}, {"id": 143, "type": "field_declaration", "text": "uint16_t shentsize;", "parent": 110, "children": [144, 145], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 20}}, {"id": 144, "type": "primitive_type", "text": "uint16_t", "parent": 143, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 9}}, {"id": 145, "type": "field_identifier", "text": "shentsize", "parent": 143, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 19}}, {"id": 146, "type": "field_declaration", "text": "uint16_t shnum;", "parent": 110, "children": [147, 148], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 16}}, {"id": 147, "type": "primitive_type", "text": "uint16_t", "parent": 146, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 9}}, {"id": 148, "type": "field_identifier", "text": "shnum", "parent": 146, "children": [], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 15}}, {"id": 149, "type": "field_declaration", "text": "uint16_t shstrndx;", "parent": 110, "children": [150, 151], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 19}}, {"id": 150, "type": "primitive_type", "text": "uint16_t", "parent": 149, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 9}}, {"id": 151, "type": "field_identifier", "text": "shstrndx", "parent": 149, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 18}}, {"id": 152, "type": "struct_specifier", "text": "struct elf_header {\n\tstruct elf_header_ident ident;\n\tunion {\n\t\tstruct elf_header_32 elf32;\n\t\tstruct elf_header_64 elf64;\n\t};\n}", "parent": null, "children": [153, 154], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 153, "type": "struct", "text": "struct", "parent": 152, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 6}}, {"id": 154, "type": "type_identifier", "text": "elf_header", "parent": 152, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 17}}, {"id": 155, "type": "field_declaration", "text": "struct elf_header_ident ident;", "parent": 152, "children": [156, 159], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 31}}, {"id": 156, "type": "struct_specifier", "text": "struct elf_header_ident", "parent": 155, "children": [157, 158], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 24}}, {"id": 157, "type": "struct", "text": "struct", "parent": 156, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 7}}, {"id": 158, "type": "type_identifier", "text": "elf_header_ident", "parent": 156, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 24}}, {"id": 159, "type": "field_identifier", "text": "ident", "parent": 155, "children": [], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 30}}, {"id": 160, "type": "field_declaration", "text": "union {\n\t\tstruct elf_header_32 elf32;\n\t\tstruct elf_header_64 elf64;\n\t};", "parent": 152, "children": [161], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 89, "column": 3}}, {"id": 161, "type": "union_specifier", "text": "union {\n\t\tstruct elf_header_32 elf32;\n\t\tstruct elf_header_64 elf64;\n\t}", "parent": 160, "children": [162], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 89, "column": 2}}, {"id": 162, "type": "union", "text": "union", "parent": 161, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 6}}, {"id": 163, "type": "field_declaration", "text": "struct elf_header_32 elf32;", "parent": 161, "children": [164, 167], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 29}}, {"id": 164, "type": "struct_specifier", "text": "struct elf_header_32", "parent": 163, "children": [165, 166], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 22}}, {"id": 165, "type": "struct", "text": "struct", "parent": 164, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 8}}, {"id": 166, "type": "type_identifier", "text": "elf_header_32", "parent": 164, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 22}}, {"id": 167, "type": "field_identifier", "text": "elf32", "parent": 163, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 28}}, {"id": 168, "type": "field_declaration", "text": "struct elf_header_64 elf64;", "parent": 161, "children": [169, 172], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 29}}, {"id": 169, "type": "struct_specifier", "text": "struct elf_header_64", "parent": 168, "children": [170, 171], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 22}}, {"id": 170, "type": "struct", "text": "struct", "parent": 169, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 8}}, {"id": 171, "type": "type_identifier", "text": "elf_header_64", "parent": 169, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 22}}, {"id": 172, "type": "field_identifier", "text": "elf64", "parent": 168, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 28}}, {"id": 173, "type": "struct_specifier", "text": "struct elf_program_header_32 {\n\tuint32_t type;\n\tuint32_t offset;\n\tuint32_t vaddr;\n\tuint32_t paddr;\n\tuint32_t filesize;\n\tuint32_t memsize;\n\tuint32_t flags;\n}", "parent": null, "children": [174, 175], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 100, "column": 1}}, {"id": 174, "type": "struct", "text": "struct", "parent": 173, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 175, "type": "type_identifier", "text": "elf_program_header_32", "parent": 173, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 28}}, {"id": 176, "type": "field_declaration", "text": "uint32_t type;", "parent": 173, "children": [177, 178], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 15}}, {"id": 177, "type": "primitive_type", "text": "uint32_t", "parent": 176, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 9}}, {"id": 178, "type": "field_identifier", "text": "type", "parent": 176, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 14}}, {"id": 179, "type": "field_declaration", "text": "uint32_t offset;", "parent": 173, "children": [180, 181], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 17}}, {"id": 180, "type": "primitive_type", "text": "uint32_t", "parent": 179, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 9}}, {"id": 181, "type": "field_identifier", "text": "offset", "parent": 179, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 16}}, {"id": 182, "type": "field_declaration", "text": "uint32_t vaddr;", "parent": 173, "children": [183, 184], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 16}}, {"id": 183, "type": "primitive_type", "text": "uint32_t", "parent": 182, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 9}}, {"id": 184, "type": "field_identifier", "text": "vaddr", "parent": 182, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 15}}, {"id": 185, "type": "field_declaration", "text": "uint32_t paddr;", "parent": 173, "children": [186, 187], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 16}}, {"id": 186, "type": "primitive_type", "text": "uint32_t", "parent": 185, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 9}}, {"id": 187, "type": "field_identifier", "text": "paddr", "parent": 185, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 15}}, {"id": 188, "type": "field_declaration", "text": "uint32_t filesize;", "parent": 173, "children": [189, 190], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 19}}, {"id": 189, "type": "primitive_type", "text": "uint32_t", "parent": 188, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 9}}, {"id": 190, "type": "field_identifier", "text": "filesize", "parent": 188, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 18}}, {"id": 191, "type": "field_declaration", "text": "uint32_t memsize;", "parent": 173, "children": [192, 193], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 18}}, {"id": 192, "type": "primitive_type", "text": "uint32_t", "parent": 191, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 9}}, {"id": 193, "type": "field_identifier", "text": "memsize", "parent": 191, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 17}}, {"id": 194, "type": "field_declaration", "text": "uint32_t flags;", "parent": 173, "children": [195, 196], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 16}}, {"id": 195, "type": "primitive_type", "text": "uint32_t", "parent": 194, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 9}}, {"id": 196, "type": "field_identifier", "text": "flags", "parent": 194, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 15}}, {"id": 197, "type": "struct_specifier", "text": "struct elf_program_header_64 {\n\tuint32_t type;\n\tuint32_t flags;\n\tuint64_t offset;\n\tuint64_t vaddr;\n\tuint64_t paddr;\n\tuint64_t filesize;\n\tuint64_t memsize;\n}", "parent": null, "children": [198, 199], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 110, "column": 1}}, {"id": 198, "type": "struct", "text": "struct", "parent": 197, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 6}}, {"id": 199, "type": "type_identifier", "text": "elf_program_header_64", "parent": 197, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 28}}, {"id": 200, "type": "field_declaration", "text": "uint32_t type;", "parent": 197, "children": [201, 202], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 15}}, {"id": 201, "type": "primitive_type", "text": "uint32_t", "parent": 200, "children": [], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 9}}, {"id": 202, "type": "field_identifier", "text": "type", "parent": 200, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 14}}, {"id": 203, "type": "field_declaration", "text": "uint32_t flags;", "parent": 197, "children": [204, 205], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 16}}, {"id": 204, "type": "primitive_type", "text": "uint32_t", "parent": 203, "children": [], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 9}}, {"id": 205, "type": "field_identifier", "text": "flags", "parent": 203, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 15}}, {"id": 206, "type": "field_declaration", "text": "uint64_t offset;", "parent": 197, "children": [207, 208], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 17}}, {"id": 207, "type": "primitive_type", "text": "uint64_t", "parent": 206, "children": [], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 9}}, {"id": 208, "type": "field_identifier", "text": "offset", "parent": 206, "children": [], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 16}}, {"id": 209, "type": "field_declaration", "text": "uint64_t vaddr;", "parent": 197, "children": [210, 211], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 16}}, {"id": 210, "type": "primitive_type", "text": "uint64_t", "parent": 209, "children": [], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 9}}, {"id": 211, "type": "field_identifier", "text": "vaddr", "parent": 209, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 15}}, {"id": 212, "type": "field_declaration", "text": "uint64_t paddr;", "parent": 197, "children": [213, 214], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 16}}, {"id": 213, "type": "primitive_type", "text": "uint64_t", "parent": 212, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 9}}, {"id": 214, "type": "field_identifier", "text": "paddr", "parent": 212, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 15}}, {"id": 215, "type": "field_declaration", "text": "uint64_t filesize;", "parent": 197, "children": [216, 217], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 19}}, {"id": 216, "type": "primitive_type", "text": "uint64_t", "parent": 215, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 9}}, {"id": 217, "type": "field_identifier", "text": "filesize", "parent": 215, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 18}}, {"id": 218, "type": "field_declaration", "text": "uint64_t memsize;", "parent": 197, "children": [219, 220], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 18}}, {"id": 219, "type": "primitive_type", "text": "uint64_t", "parent": 218, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 9}}, {"id": 220, "type": "field_identifier", "text": "memsize", "parent": 218, "children": [], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 17}}, {"id": 221, "type": "function_definition", "text": "static int mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n\t\t\t\t uint8_t *dst, size_t len)\n{\n\tsize_t retlen;\n\tint ret;\n\n\tret = mtd_read(mtd, offset, len, &retlen, dst);\n\tif (ret) {\n\t\tpr_debug(\"read error in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn ret;\n\t}\n\n\tif (retlen != len) {\n\t\tpr_debug(\"short read in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn -EIO;\n\t}\n\n\treturn 0;\n}", "parent": null, "children": [222, 223], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 131, "column": 1}}, {"id": 222, "type": "primitive_type", "text": "int", "parent": 221, "children": [], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 10}}, {"id": 223, "type": "function_declarator", "text": "mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n\t\t\t\t uint8_t *dst, size_t len)", "parent": 221, "children": [224, 225], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 114, "column": 30}}, {"id": 224, "type": "identifier", "text": "mtdsplit_elf_read_mtd", "parent": 223, "children": [], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 32}}, {"id": 225, "type": "parameter_list", "text": "(struct mtd_info *mtd, size_t offset,\n\t\t\t\t uint8_t *dst, size_t len)", "parent": 223, "children": [226, 233, 236, 241], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 114, "column": 30}}, {"id": 226, "type": "parameter_declaration", "text": "struct mtd_info *mtd", "parent": 225, "children": [227, 230], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 53}}, {"id": 227, "type": "struct_specifier", "text": "struct mtd_info", "parent": 226, "children": [228, 229], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 48}}, {"id": 228, "type": "struct", "text": "struct", "parent": 227, "children": [], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 39}}, {"id": 229, "type": "type_identifier", "text": "mtd_info", "parent": 227, "children": [], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 48}}, {"id": 230, "type": "pointer_declarator", "text": "*mtd", "parent": 226, "children": [231, 232], "start_point": {"row": 113, "column": 49}, "end_point": {"row": 113, "column": 53}}, {"id": 231, "type": "*", "text": "*", "parent": 230, "children": [], "start_point": {"row": 113, "column": 49}, "end_point": {"row": 113, "column": 50}}, {"id": 232, "type": "identifier", "text": "mtd", "parent": 230, "children": [], "start_point": {"row": 113, "column": 50}, "end_point": {"row": 113, "column": 53}}, {"id": 233, "type": "parameter_declaration", "text": "size_t offset", "parent": 225, "children": [234, 235], "start_point": {"row": 113, "column": 55}, "end_point": {"row": 113, "column": 68}}, {"id": 234, "type": "primitive_type", "text": "size_t", "parent": 233, "children": [], "start_point": {"row": 113, "column": 55}, "end_point": {"row": 113, "column": 61}}, {"id": 235, "type": "identifier", "text": "offset", "parent": 233, "children": [], "start_point": {"row": 113, "column": 62}, "end_point": {"row": 113, "column": 68}}, {"id": 236, "type": "parameter_declaration", "text": "uint8_t *dst", "parent": 225, "children": [237, 238], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 17}}, {"id": 237, "type": "primitive_type", "text": "uint8_t", "parent": 236, "children": [], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 12}}, {"id": 238, "type": "pointer_declarator", "text": "*dst", "parent": 236, "children": [239, 240], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 17}}, {"id": 239, "type": "*", "text": "*", "parent": 238, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 14}}, {"id": 240, "type": "identifier", "text": "dst", "parent": 238, "children": [], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 17}}, {"id": 241, "type": "parameter_declaration", "text": "size_t len", "parent": 225, "children": [242, 243], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 29}}, {"id": 242, "type": "primitive_type", "text": "size_t", "parent": 241, "children": [], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 25}}, {"id": 243, "type": "identifier", "text": "len", "parent": 241, "children": [], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 29}}, {"id": 244, "type": "declaration", "text": "size_t retlen;", "parent": 221, "children": [245, 246], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 15}}, {"id": 245, "type": "primitive_type", "text": "size_t", "parent": 244, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 7}}, {"id": 246, "type": "identifier", "text": "retlen", "parent": 244, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 14}}, {"id": 247, "type": "declaration", "text": "int ret;", "parent": 221, "children": [248, 249], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 9}}, {"id": 248, "type": "primitive_type", "text": "int", "parent": 247, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 4}}, {"id": 249, "type": "identifier", "text": "ret", "parent": 247, "children": [], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 8}}, {"id": 250, "type": "assignment_expression", "text": "ret = mtd_read(mtd, offset, len, &retlen, dst)", "parent": 221, "children": [251, 252, 253], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 47}}, {"id": 251, "type": "identifier", "text": "ret", "parent": 250, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 4}}, {"id": 252, "type": "=", "text": "=", "parent": 250, "children": [], "start_point": {"row": 119, "column": 5}, "end_point": {"row": 119, "column": 6}}, {"id": 253, "type": "call_expression", "text": "mtd_read(mtd, offset, len, &retlen, dst)", "parent": 250, "children": [254, 255], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 47}}, {"id": 254, "type": "identifier", "text": "mtd_read", "parent": 253, "children": [], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 15}}, {"id": 255, "type": "argument_list", "text": "(mtd, offset, len, &retlen, dst)", "parent": 253, "children": [256, 257, 258, 259, 261], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 47}}, {"id": 256, "type": "identifier", "text": "mtd", "parent": 255, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 19}}, {"id": 257, "type": "identifier", "text": "offset", "parent": 255, "children": [], "start_point": {"row": 119, "column": 21}, "end_point": {"row": 119, "column": 27}}, {"id": 258, "type": "identifier", "text": "len", "parent": 255, "children": [], "start_point": {"row": 119, "column": 29}, "end_point": {"row": 119, "column": 32}}, {"id": 259, "type": "pointer_expression", "text": "&retlen", "parent": 255, "children": [260], "start_point": {"row": 119, "column": 34}, "end_point": {"row": 119, "column": 41}}, {"id": 260, "type": "identifier", "text": "retlen", "parent": 259, "children": [], "start_point": {"row": 119, "column": 35}, "end_point": {"row": 119, "column": 41}}, {"id": 261, "type": "identifier", "text": "dst", "parent": 255, "children": [], "start_point": {"row": 119, "column": 43}, "end_point": {"row": 119, "column": 46}}, {"id": 262, "type": "if_statement", "text": "if (ret) {\n\t\tpr_debug(\"read error in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn ret;\n\t}", "parent": 221, "children": [263], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 123, "column": 2}}, {"id": 263, "type": "parenthesized_expression", "text": "(ret)", "parent": 262, "children": [264], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 9}}, {"id": 264, "type": "identifier", "text": "ret", "parent": 263, "children": [], "start_point": {"row": 120, "column": 5}, "end_point": {"row": 120, "column": 8}}, {"id": 265, "type": "call_expression", "text": "pr_debug(\"read error in \\\"%s\\\"\\n\", mtd->name)", "parent": 262, "children": [266, 267], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 47}}, {"id": 266, "type": "identifier", "text": "pr_debug", "parent": 265, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 10}}, {"id": 267, "type": "argument_list", "text": "(\"read error in \\\"%s\\\"\\n\", mtd->name)", "parent": 265, "children": [268, 272], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 121, "column": 47}}, {"id": 268, "type": "string_literal", "text": "\"read error in \\\"%s\\\"\\n\"", "parent": 267, "children": [269, 270, 271], "start_point": {"row": 121, "column": 11}, "end_point": {"row": 121, "column": 35}}, {"id": 269, "type": "escape_sequence", "text": "\\\"", "parent": 268, "children": [], "start_point": {"row": 121, "column": 26}, "end_point": {"row": 121, "column": 28}}, {"id": 270, "type": "escape_sequence", "text": "\\\"", "parent": 268, "children": [], "start_point": {"row": 121, "column": 30}, "end_point": {"row": 121, "column": 32}}, {"id": 271, "type": "escape_sequence", "text": "\\n", "parent": 268, "children": [], "start_point": {"row": 121, "column": 32}, "end_point": {"row": 121, "column": 34}}, {"id": 272, "type": "field_expression", "text": "mtd->name", "parent": 267, "children": [273, 274], "start_point": {"row": 121, "column": 37}, "end_point": {"row": 121, "column": 46}}, {"id": 273, "type": "identifier", "text": "mtd", "parent": 272, "children": [], "start_point": {"row": 121, "column": 37}, "end_point": {"row": 121, "column": 40}}, {"id": 274, "type": "field_identifier", "text": "name", "parent": 272, "children": [], "start_point": {"row": 121, "column": 42}, "end_point": {"row": 121, "column": 46}}, {"id": 275, "type": "return_statement", "text": "return ret;", "parent": 262, "children": [276], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 13}}, {"id": 276, "type": "identifier", "text": "ret", "parent": 275, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 12}}, {"id": 277, "type": "if_statement", "text": "if (retlen != len) {\n\t\tpr_debug(\"short read in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn -EIO;\n\t}", "parent": 221, "children": [278], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 128, "column": 2}}, {"id": 278, "type": "parenthesized_expression", "text": "(retlen != len)", "parent": 277, "children": [279], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 19}}, {"id": 279, "type": "binary_expression", "text": "retlen != len", "parent": 278, "children": [280, 281, 282], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 18}}, {"id": 280, "type": "identifier", "text": "retlen", "parent": 279, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 11}}, {"id": 281, "type": "!=", "text": "!=", "parent": 279, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 14}}, {"id": 282, "type": "identifier", "text": "len", "parent": 279, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 18}}, {"id": 283, "type": "call_expression", "text": "pr_debug(\"short read in \\\"%s\\\"\\n\", mtd->name)", "parent": 277, "children": [284, 285], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 47}}, {"id": 284, "type": "identifier", "text": "pr_debug", "parent": 283, "children": [], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 10}}, {"id": 285, "type": "argument_list", "text": "(\"short read in \\\"%s\\\"\\n\", mtd->name)", "parent": 283, "children": [286, 290], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 47}}, {"id": 286, "type": "string_literal", "text": "\"short read in \\\"%s\\\"\\n\"", "parent": 285, "children": [287, 288, 289], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 35}}, {"id": 287, "type": "escape_sequence", "text": "\\\"", "parent": 286, "children": [], "start_point": {"row": 126, "column": 26}, "end_point": {"row": 126, "column": 28}}, {"id": 288, "type": "escape_sequence", "text": "\\\"", "parent": 286, "children": [], "start_point": {"row": 126, "column": 30}, "end_point": {"row": 126, "column": 32}}, {"id": 289, "type": "escape_sequence", "text": "\\n", "parent": 286, "children": [], "start_point": {"row": 126, "column": 32}, "end_point": {"row": 126, "column": 34}}, {"id": 290, "type": "field_expression", "text": "mtd->name", "parent": 285, "children": [291, 292], "start_point": {"row": 126, "column": 37}, "end_point": {"row": 126, "column": 46}}, {"id": 291, "type": "identifier", "text": "mtd", "parent": 290, "children": [], "start_point": {"row": 126, "column": 37}, "end_point": {"row": 126, "column": 40}}, {"id": 292, "type": "field_identifier", "text": "name", "parent": 290, "children": [], "start_point": {"row": 126, "column": 42}, "end_point": {"row": 126, "column": 46}}, {"id": 293, "type": "return_statement", "text": "return -EIO;", "parent": 277, "children": [294], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 14}}, {"id": 294, "type": "unary_expression", "text": "-EIO", "parent": 293, "children": [295, 296], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 13}}, {"id": 295, "type": "-", "text": "-", "parent": 294, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 10}}, {"id": 296, "type": "identifier", "text": "EIO", "parent": 294, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 13}}, {"id": 297, "type": "return_statement", "text": "return 0;", "parent": 221, "children": [298], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 10}}, {"id": 298, "type": "number_literal", "text": "0", "parent": 297, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 9}}, {"id": 299, "type": "function_definition", "text": "static int elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)\n{\n\tstruct elf_header_32 *hdr32 = &(hdr->elf32);\n\tint err;\n\tsize_t section_end, ph_table_end, ph_entry;\n\tstruct elf_program_header_32 ph;\n\n\t*size = 0;\n\n\tif (hdr32->shoff > 0) {\n\t\t*size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n\t\treturn 0;\n\t}\n\n\tph_entry = hdr32->phoff;\n\tph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum;\n\n\twhile (ph_entry < ph_table_end) {\n\t\terr = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph));\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tsection_end = ph.offset + ph.filesize;\n\t\tif (section_end > *size)\n\t\t\t*size = section_end;\n\n\t\tph_entry += hdr32->phentsize;\n\t}\n\n\treturn 0;\n}", "parent": null, "children": [300, 301], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 165, "column": 1}}, {"id": 300, "type": "primitive_type", "text": "int", "parent": 299, "children": [], "start_point": {"row": 133, "column": 7}, "end_point": {"row": 133, "column": 10}}, {"id": 301, "type": "function_declarator", "text": "elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)", "parent": 299, "children": [302, 303], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 134, "column": 17}}, {"id": 302, "type": "identifier", "text": "elf32_determine_size", "parent": 301, "children": [], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 133, "column": 31}}, {"id": 303, "type": "parameter_list", "text": "(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)", "parent": 301, "children": [304, 311, 318], "start_point": {"row": 133, "column": 31}, "end_point": {"row": 134, "column": 17}}, {"id": 304, "type": "parameter_declaration", "text": "struct mtd_info *mtd", "parent": 303, "children": [305, 308], "start_point": {"row": 133, "column": 32}, "end_point": {"row": 133, "column": 52}}, {"id": 305, "type": "struct_specifier", "text": "struct mtd_info", "parent": 304, "children": [306, 307], "start_point": {"row": 133, "column": 32}, "end_point": {"row": 133, "column": 47}}, {"id": 306, "type": "struct", "text": "struct", "parent": 305, "children": [], "start_point": {"row": 133, "column": 32}, "end_point": {"row": 133, "column": 38}}, {"id": 307, "type": "type_identifier", "text": "mtd_info", "parent": 305, "children": [], "start_point": {"row": 133, "column": 39}, "end_point": {"row": 133, "column": 47}}, {"id": 308, "type": "pointer_declarator", "text": "*mtd", "parent": 304, "children": [309, 310], "start_point": {"row": 133, "column": 48}, "end_point": {"row": 133, "column": 52}}, {"id": 309, "type": "*", "text": "*", "parent": 308, "children": [], "start_point": {"row": 133, "column": 48}, "end_point": {"row": 133, "column": 49}}, {"id": 310, "type": "identifier", "text": "mtd", "parent": 308, "children": [], "start_point": {"row": 133, "column": 49}, "end_point": {"row": 133, "column": 52}}, {"id": 311, "type": "parameter_declaration", "text": "struct elf_header *hdr", "parent": 303, "children": [312, 315], "start_point": {"row": 133, "column": 54}, "end_point": {"row": 133, "column": 76}}, {"id": 312, "type": "struct_specifier", "text": "struct elf_header", "parent": 311, "children": [313, 314], "start_point": {"row": 133, "column": 54}, "end_point": {"row": 133, "column": 71}}, {"id": 313, "type": "struct", "text": "struct", "parent": 312, "children": [], "start_point": {"row": 133, "column": 54}, "end_point": {"row": 133, "column": 60}}, {"id": 314, "type": "type_identifier", "text": "elf_header", "parent": 312, "children": [], "start_point": {"row": 133, "column": 61}, "end_point": {"row": 133, "column": 71}}, {"id": 315, "type": "pointer_declarator", "text": "*hdr", "parent": 311, "children": [316, 317], "start_point": {"row": 133, "column": 72}, "end_point": {"row": 133, "column": 76}}, {"id": 316, "type": "*", "text": "*", "parent": 315, "children": [], "start_point": {"row": 133, "column": 72}, "end_point": {"row": 133, "column": 73}}, {"id": 317, "type": "identifier", "text": "hdr", "parent": 315, "children": [], "start_point": {"row": 133, "column": 73}, "end_point": {"row": 133, "column": 76}}, {"id": 318, "type": "parameter_declaration", "text": "size_t *size", "parent": 303, "children": [319, 320], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 16}}, {"id": 319, "type": "primitive_type", "text": "size_t", "parent": 318, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 10}}, {"id": 320, "type": "pointer_declarator", "text": "*size", "parent": 318, "children": [321, 322], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 16}}, {"id": 321, "type": "*", "text": "*", "parent": 320, "children": [], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 12}}, {"id": 322, "type": "identifier", "text": "size", "parent": 320, "children": [], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 16}}, {"id": 323, "type": "declaration", "text": "struct elf_header_32 *hdr32 = &(hdr->elf32);", "parent": 299, "children": [324, 327], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 45}}, {"id": 324, "type": "struct_specifier", "text": "struct elf_header_32", "parent": 323, "children": [325, 326], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 21}}, {"id": 325, "type": "struct", "text": "struct", "parent": 324, "children": [], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 7}}, {"id": 326, "type": "type_identifier", "text": "elf_header_32", "parent": 324, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 21}}, {"id": 327, "type": "init_declarator", "text": "*hdr32 = &(hdr->elf32)", "parent": 323, "children": [328, 331, 332], "start_point": {"row": 136, "column": 22}, "end_point": {"row": 136, "column": 44}}, {"id": 328, "type": "pointer_declarator", "text": "*hdr32", "parent": 327, "children": [329, 330], "start_point": {"row": 136, "column": 22}, "end_point": {"row": 136, "column": 28}}, {"id": 329, "type": "*", "text": "*", "parent": 328, "children": [], "start_point": {"row": 136, "column": 22}, "end_point": {"row": 136, "column": 23}}, {"id": 330, "type": "identifier", "text": "hdr32", "parent": 328, "children": [], "start_point": {"row": 136, "column": 23}, "end_point": {"row": 136, "column": 28}}, {"id": 331, "type": "=", "text": "=", "parent": 327, "children": [], "start_point": {"row": 136, "column": 29}, "end_point": {"row": 136, "column": 30}}, {"id": 332, "type": "pointer_expression", "text": "&(hdr->elf32)", "parent": 327, "children": [333], "start_point": {"row": 136, "column": 31}, "end_point": {"row": 136, "column": 44}}, {"id": 333, "type": "parenthesized_expression", "text": "(hdr->elf32)", "parent": 332, "children": [334], "start_point": {"row": 136, "column": 32}, "end_point": {"row": 136, "column": 44}}, {"id": 334, "type": "field_expression", "text": "hdr->elf32", "parent": 333, "children": [335, 336], "start_point": {"row": 136, "column": 33}, "end_point": {"row": 136, "column": 43}}, {"id": 335, "type": "identifier", "text": "hdr", "parent": 334, "children": [], "start_point": {"row": 136, "column": 33}, "end_point": {"row": 136, "column": 36}}, {"id": 336, "type": "field_identifier", "text": "elf32", "parent": 334, "children": [], "start_point": {"row": 136, "column": 38}, "end_point": {"row": 136, "column": 43}}, {"id": 337, "type": "declaration", "text": "int err;", "parent": 299, "children": [338, 339], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 9}}, {"id": 338, "type": "primitive_type", "text": "int", "parent": 337, "children": [], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 4}}, {"id": 339, "type": "identifier", "text": "err", "parent": 337, "children": [], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 8}}, {"id": 340, "type": "declaration", "text": "size_t section_end, ph_table_end, ph_entry;", "parent": 299, "children": [341, 342, 343, 344], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 44}}, {"id": 341, "type": "primitive_type", "text": "size_t", "parent": 340, "children": [], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 7}}, {"id": 342, "type": "identifier", "text": "section_end", "parent": 340, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 19}}, {"id": 343, "type": "identifier", "text": "ph_table_end", "parent": 340, "children": [], "start_point": {"row": 138, "column": 21}, "end_point": {"row": 138, "column": 33}}, {"id": 344, "type": "identifier", "text": "ph_entry", "parent": 340, "children": [], "start_point": {"row": 138, "column": 35}, "end_point": {"row": 138, "column": 43}}, {"id": 345, "type": "declaration", "text": "struct elf_program_header_32 ph;", "parent": 299, "children": [346, 349], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 33}}, {"id": 346, "type": "struct_specifier", "text": "struct elf_program_header_32", "parent": 345, "children": [347, 348], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 29}}, {"id": 347, "type": "struct", "text": "struct", "parent": 346, "children": [], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 7}}, {"id": 348, "type": "type_identifier", "text": "elf_program_header_32", "parent": 346, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 29}}, {"id": 349, "type": "identifier", "text": "ph", "parent": 345, "children": [], "start_point": {"row": 139, "column": 30}, "end_point": {"row": 139, "column": 32}}, {"id": 350, "type": "assignment_expression", "text": "*size = 0", "parent": 299, "children": [351, 354, 355], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 10}}, {"id": 351, "type": "pointer_expression", "text": "*size", "parent": 350, "children": [352, 353], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 6}}, {"id": 352, "type": "*", "text": "*", "parent": 351, "children": [], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 2}}, {"id": 353, "type": "identifier", "text": "size", "parent": 351, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 6}}, {"id": 354, "type": "=", "text": "=", "parent": 350, "children": [], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 8}}, {"id": 355, "type": "number_literal", "text": "0", "parent": 350, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 10}}, {"id": 356, "type": "if_statement", "text": "if (hdr32->shoff > 0) {\n\t\t*size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n\t\treturn 0;\n\t}", "parent": 299, "children": [357], "start_point": {"row": 143, "column": 1}, "end_point": {"row": 146, "column": 2}}, {"id": 357, "type": "parenthesized_expression", "text": "(hdr32->shoff > 0)", "parent": 356, "children": [358], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 22}}, {"id": 358, "type": "binary_expression", "text": "hdr32->shoff > 0", "parent": 357, "children": [359, 362, 363], "start_point": {"row": 143, "column": 5}, "end_point": {"row": 143, "column": 21}}, {"id": 359, "type": "field_expression", "text": "hdr32->shoff", "parent": 358, "children": [360, 361], "start_point": {"row": 143, "column": 5}, "end_point": {"row": 143, "column": 17}}, {"id": 360, "type": "identifier", "text": "hdr32", "parent": 359, "children": [], "start_point": {"row": 143, "column": 5}, "end_point": {"row": 143, "column": 10}}, {"id": 361, "type": "field_identifier", "text": "shoff", "parent": 359, "children": [], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 17}}, {"id": 362, "type": ">", "text": ">", "parent": 358, "children": [], "start_point": {"row": 143, "column": 18}, "end_point": {"row": 143, "column": 19}}, {"id": 363, "type": "number_literal", "text": "0", "parent": 358, "children": [], "start_point": {"row": 143, "column": 20}, "end_point": {"row": 143, "column": 21}}, {"id": 364, "type": "assignment_expression", "text": "*size = hdr32->shoff + hdr32->shentsize * hdr32->shnum", "parent": 356, "children": [365, 368, 369], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 56}}, {"id": 365, "type": "pointer_expression", "text": "*size", "parent": 364, "children": [366, 367], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 7}}, {"id": 366, "type": "*", "text": "*", "parent": 365, "children": [], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 3}}, {"id": 367, "type": "identifier", "text": "size", "parent": 365, "children": [], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 7}}, {"id": 368, "type": "=", "text": "=", "parent": 364, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 9}}, {"id": 369, "type": "binary_expression", "text": "hdr32->shoff + hdr32->shentsize * hdr32->shnum", "parent": 364, "children": [370, 373, 374], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 56}}, {"id": 370, "type": "field_expression", "text": "hdr32->shoff", "parent": 369, "children": [371, 372], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 22}}, {"id": 371, "type": "identifier", "text": "hdr32", "parent": 370, "children": [], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 15}}, {"id": 372, "type": "field_identifier", "text": "shoff", "parent": 370, "children": [], "start_point": {"row": 144, "column": 17}, "end_point": {"row": 144, "column": 22}}, {"id": 373, "type": "+", "text": "+", "parent": 369, "children": [], "start_point": {"row": 144, "column": 23}, "end_point": {"row": 144, "column": 24}}, {"id": 374, "type": "binary_expression", "text": "hdr32->shentsize * hdr32->shnum", "parent": 369, "children": [375, 378, 379], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 56}}, {"id": 375, "type": "field_expression", "text": "hdr32->shentsize", "parent": 374, "children": [376, 377], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 41}}, {"id": 376, "type": "identifier", "text": "hdr32", "parent": 375, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 30}}, {"id": 377, "type": "field_identifier", "text": "shentsize", "parent": 375, "children": [], "start_point": {"row": 144, "column": 32}, "end_point": {"row": 144, "column": 41}}, {"id": 378, "type": "*", "text": "*", "parent": 374, "children": [], "start_point": {"row": 144, "column": 42}, "end_point": {"row": 144, "column": 43}}, {"id": 379, "type": "field_expression", "text": "hdr32->shnum", "parent": 374, "children": [380, 381], "start_point": {"row": 144, "column": 44}, "end_point": {"row": 144, "column": 56}}, {"id": 380, "type": "identifier", "text": "hdr32", "parent": 379, "children": [], "start_point": {"row": 144, "column": 44}, "end_point": {"row": 144, "column": 49}}, {"id": 381, "type": "field_identifier", "text": "shnum", "parent": 379, "children": [], "start_point": {"row": 144, "column": 51}, "end_point": {"row": 144, "column": 56}}, {"id": 382, "type": "return_statement", "text": "return 0;", "parent": 356, "children": [383], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 11}}, {"id": 383, "type": "number_literal", "text": "0", "parent": 382, "children": [], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 10}}, {"id": 384, "type": "assignment_expression", "text": "ph_entry = hdr32->phoff", "parent": 299, "children": [385, 386, 387], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 24}}, {"id": 385, "type": "identifier", "text": "ph_entry", "parent": 384, "children": [], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 9}}, {"id": 386, "type": "=", "text": "=", "parent": 384, "children": [], "start_point": {"row": 148, "column": 10}, "end_point": {"row": 148, "column": 11}}, {"id": 387, "type": "field_expression", "text": "hdr32->phoff", "parent": 384, "children": [388, 389], "start_point": {"row": 148, "column": 12}, "end_point": {"row": 148, "column": 24}}, {"id": 388, "type": "identifier", "text": "hdr32", "parent": 387, "children": [], "start_point": {"row": 148, "column": 12}, "end_point": {"row": 148, "column": 17}}, {"id": 389, "type": "field_identifier", "text": "phoff", "parent": 387, "children": [], "start_point": {"row": 148, "column": 19}, "end_point": {"row": 148, "column": 24}}, {"id": 390, "type": "assignment_expression", "text": "ph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum", "parent": 299, "children": [391, 392, 393], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 62}}, {"id": 391, "type": "identifier", "text": "ph_table_end", "parent": 390, "children": [], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 13}}, {"id": 392, "type": "=", "text": "=", "parent": 390, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 15}}, {"id": 393, "type": "binary_expression", "text": "hdr32->phoff + hdr32->phentsize * hdr32->phnum", "parent": 390, "children": [394, 397, 398], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 62}}, {"id": 394, "type": "field_expression", "text": "hdr32->phoff", "parent": 393, "children": [395, 396], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 28}}, {"id": 395, "type": "identifier", "text": "hdr32", "parent": 394, "children": [], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 21}}, {"id": 396, "type": "field_identifier", "text": "phoff", "parent": 394, "children": [], "start_point": {"row": 149, "column": 23}, "end_point": {"row": 149, "column": 28}}, {"id": 397, "type": "+", "text": "+", "parent": 393, "children": [], "start_point": {"row": 149, "column": 29}, "end_point": {"row": 149, "column": 30}}, {"id": 398, "type": "binary_expression", "text": "hdr32->phentsize * hdr32->phnum", "parent": 393, "children": [399, 402, 403], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 62}}, {"id": 399, "type": "field_expression", "text": "hdr32->phentsize", "parent": 398, "children": [400, 401], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 47}}, {"id": 400, "type": "identifier", "text": "hdr32", "parent": 399, "children": [], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 36}}, {"id": 401, "type": "field_identifier", "text": "phentsize", "parent": 399, "children": [], "start_point": {"row": 149, "column": 38}, "end_point": {"row": 149, "column": 47}}, {"id": 402, "type": "*", "text": "*", "parent": 398, "children": [], "start_point": {"row": 149, "column": 48}, "end_point": {"row": 149, "column": 49}}, {"id": 403, "type": "field_expression", "text": "hdr32->phnum", "parent": 398, "children": [404, 405], "start_point": {"row": 149, "column": 50}, "end_point": {"row": 149, "column": 62}}, {"id": 404, "type": "identifier", "text": "hdr32", "parent": 403, "children": [], "start_point": {"row": 149, "column": 50}, "end_point": {"row": 149, "column": 55}}, {"id": 405, "type": "field_identifier", "text": "phnum", "parent": 403, "children": [], "start_point": {"row": 149, "column": 57}, "end_point": {"row": 149, "column": 62}}, {"id": 406, "type": "while_statement", "text": "while (ph_entry < ph_table_end) {\n\t\terr = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph));\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tsection_end = ph.offset + ph.filesize;\n\t\tif (section_end > *size)\n\t\t\t*size = section_end;\n\n\t\tph_entry += hdr32->phentsize;\n\t}", "parent": 299, "children": [407], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 162, "column": 2}}, {"id": 407, "type": "parenthesized_expression", "text": "(ph_entry < ph_table_end)", "parent": 406, "children": [408], "start_point": {"row": 151, "column": 7}, "end_point": {"row": 151, "column": 32}}, {"id": 408, "type": "binary_expression", "text": "ph_entry < ph_table_end", "parent": 407, "children": [409, 410, 411], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 31}}, {"id": 409, "type": "identifier", "text": "ph_entry", "parent": 408, "children": [], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 16}}, {"id": 410, "type": "<", "text": "<", "parent": 408, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 18}}, {"id": 411, "type": "identifier", "text": "ph_table_end", "parent": 408, "children": [], "start_point": {"row": 151, "column": 19}, "end_point": {"row": 151, "column": 31}}, {"id": 412, "type": "assignment_expression", "text": "err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph))", "parent": 406, "children": [413, 414, 415], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 153, "column": 20}}, {"id": 413, "type": "identifier", "text": "err", "parent": 412, "children": [], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 5}}, {"id": 414, "type": "=", "text": "=", "parent": 412, "children": [], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 7}}, {"id": 415, "type": "call_expression", "text": "mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph))", "parent": 412, "children": [416, 417], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 153, "column": 20}}, {"id": 416, "type": "identifier", "text": "mtdsplit_elf_read_mtd", "parent": 415, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 29}}, {"id": 417, "type": "argument_list", "text": "(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph))", "parent": 415, "children": [418, 419, 420, 428], "start_point": {"row": 152, "column": 29}, "end_point": {"row": 153, "column": 20}}, {"id": 418, "type": "identifier", "text": "mtd", "parent": 417, "children": [], "start_point": {"row": 152, "column": 30}, "end_point": {"row": 152, "column": 33}}, {"id": 419, "type": "identifier", "text": "ph_entry", "parent": 417, "children": [], "start_point": {"row": 152, "column": 35}, "end_point": {"row": 152, "column": 43}}, {"id": 420, "type": "cast_expression", "text": "(uint8_t *)(&ph)", "parent": 417, "children": [421, 425], "start_point": {"row": 152, "column": 45}, "end_point": {"row": 152, "column": 61}}, {"id": 421, "type": "type_descriptor", "text": "uint8_t *", "parent": 420, "children": [422, 423], "start_point": {"row": 152, "column": 46}, "end_point": {"row": 152, "column": 55}}, {"id": 422, "type": "primitive_type", "text": "uint8_t", "parent": 421, "children": [], "start_point": {"row": 152, "column": 46}, "end_point": {"row": 152, "column": 53}}, {"id": 423, "type": "abstract_pointer_declarator", "text": "*", "parent": 421, "children": [424], "start_point": {"row": 152, "column": 54}, "end_point": {"row": 152, "column": 55}}, {"id": 424, "type": "*", "text": "*", "parent": 423, "children": [], "start_point": {"row": 152, "column": 54}, "end_point": {"row": 152, "column": 55}}, {"id": 425, "type": "parenthesized_expression", "text": "(&ph)", "parent": 420, "children": [426], "start_point": {"row": 152, "column": 56}, "end_point": {"row": 152, "column": 61}}, {"id": 426, "type": "pointer_expression", "text": "&ph", "parent": 425, "children": [427], "start_point": {"row": 152, "column": 57}, "end_point": {"row": 152, "column": 60}}, {"id": 427, "type": "identifier", "text": "ph", "parent": 426, "children": [], "start_point": {"row": 152, "column": 58}, "end_point": {"row": 152, "column": 60}}, {"id": 428, "type": "sizeof_expression", "text": "sizeof(ph)", "parent": 417, "children": [429], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 153, "column": 19}}, {"id": 429, "type": "parenthesized_expression", "text": "(ph)", "parent": 428, "children": [430], "start_point": {"row": 153, "column": 15}, "end_point": {"row": 153, "column": 19}}, {"id": 430, "type": "identifier", "text": "ph", "parent": 429, "children": [], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 18}}, {"id": 431, "type": "if_statement", "text": "if (err)\n\t\t\treturn err;", "parent": 406, "children": [432, 434], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 155, "column": 14}}, {"id": 432, "type": "parenthesized_expression", "text": "(err)", "parent": 431, "children": [433], "start_point": {"row": 154, "column": 5}, "end_point": {"row": 154, "column": 10}}, {"id": 433, "type": "identifier", "text": "err", "parent": 432, "children": [], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 9}}, {"id": 434, "type": "return_statement", "text": "return err;", "parent": 431, "children": [435], "start_point": {"row": 155, "column": 3}, "end_point": {"row": 155, "column": 14}}, {"id": 435, "type": "identifier", "text": "err", "parent": 434, "children": [], "start_point": {"row": 155, "column": 10}, "end_point": {"row": 155, "column": 13}}, {"id": 436, "type": "assignment_expression", "text": "section_end = ph.offset + ph.filesize", "parent": 406, "children": [437, 438, 439], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 39}}, {"id": 437, "type": "identifier", "text": "section_end", "parent": 436, "children": [], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 13}}, {"id": 438, "type": "=", "text": "=", "parent": 436, "children": [], "start_point": {"row": 157, "column": 14}, "end_point": {"row": 157, "column": 15}}, {"id": 439, "type": "binary_expression", "text": "ph.offset + ph.filesize", "parent": 436, "children": [440, 443, 444], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 39}}, {"id": 440, "type": "field_expression", "text": "ph.offset", "parent": 439, "children": [441, 442], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 25}}, {"id": 441, "type": "identifier", "text": "ph", "parent": 440, "children": [], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 18}}, {"id": 442, "type": "field_identifier", "text": "offset", "parent": 440, "children": [], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 25}}, {"id": 443, "type": "+", "text": "+", "parent": 439, "children": [], "start_point": {"row": 157, "column": 26}, "end_point": {"row": 157, "column": 27}}, {"id": 444, "type": "field_expression", "text": "ph.filesize", "parent": 439, "children": [445, 446], "start_point": {"row": 157, "column": 28}, "end_point": {"row": 157, "column": 39}}, {"id": 445, "type": "identifier", "text": "ph", "parent": 444, "children": [], "start_point": {"row": 157, "column": 28}, "end_point": {"row": 157, "column": 30}}, {"id": 446, "type": "field_identifier", "text": "filesize", "parent": 444, "children": [], "start_point": {"row": 157, "column": 31}, "end_point": {"row": 157, "column": 39}}, {"id": 447, "type": "if_statement", "text": "if (section_end > *size)\n\t\t\t*size = section_end;", "parent": 406, "children": [448], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 159, "column": 23}}, {"id": 448, "type": "parenthesized_expression", "text": "(section_end > *size)", "parent": 447, "children": [449], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 26}}, {"id": 449, "type": "binary_expression", "text": "section_end > *size", "parent": 448, "children": [450, 451, 452], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 25}}, {"id": 450, "type": "identifier", "text": "section_end", "parent": 449, "children": [], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 17}}, {"id": 451, "type": ">", "text": ">", "parent": 449, "children": [], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 19}}, {"id": 452, "type": "pointer_expression", "text": "*size", "parent": 449, "children": [453, 454], "start_point": {"row": 158, "column": 20}, "end_point": {"row": 158, "column": 25}}, {"id": 453, "type": "*", "text": "*", "parent": 452, "children": [], "start_point": {"row": 158, "column": 20}, "end_point": {"row": 158, "column": 21}}, {"id": 454, "type": "identifier", "text": "size", "parent": 452, "children": [], "start_point": {"row": 158, "column": 21}, "end_point": {"row": 158, "column": 25}}, {"id": 455, "type": "assignment_expression", "text": "*size = section_end", "parent": 447, "children": [456, 459, 460], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 159, "column": 22}}, {"id": 456, "type": "pointer_expression", "text": "*size", "parent": 455, "children": [457, 458], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 159, "column": 8}}, {"id": 457, "type": "*", "text": "*", "parent": 456, "children": [], "start_point": {"row": 159, "column": 3}, "end_point": {"row": 159, "column": 4}}, {"id": 458, "type": "identifier", "text": "size", "parent": 456, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 8}}, {"id": 459, "type": "=", "text": "=", "parent": 455, "children": [], "start_point": {"row": 159, "column": 9}, "end_point": {"row": 159, "column": 10}}, {"id": 460, "type": "identifier", "text": "section_end", "parent": 455, "children": [], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 22}}, {"id": 461, "type": "assignment_expression", "text": "ph_entry += hdr32->phentsize", "parent": 406, "children": [462, 463, 464], "start_point": {"row": 161, "column": 2}, "end_point": {"row": 161, "column": 30}}, {"id": 462, "type": "identifier", "text": "ph_entry", "parent": 461, "children": [], "start_point": {"row": 161, "column": 2}, "end_point": {"row": 161, "column": 10}}, {"id": 463, "type": "+=", "text": "+=", "parent": 461, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 13}}, {"id": 464, "type": "field_expression", "text": "hdr32->phentsize", "parent": 461, "children": [465, 466], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 30}}, {"id": 465, "type": "identifier", "text": "hdr32", "parent": 464, "children": [], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 19}}, {"id": 466, "type": "field_identifier", "text": "phentsize", "parent": 464, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 30}}, {"id": 467, "type": "return_statement", "text": "return 0;", "parent": 299, "children": [468], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 10}}, {"id": 468, "type": "number_literal", "text": "0", "parent": 467, "children": [], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 9}}, {"id": 469, "type": "function_definition", "text": "static int elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)\n{\n\tstruct elf_header_64 *hdr64 = &(hdr->elf64);\n\tint err;\n\tsize_t section_end, ph_table_end, ph_entry;\n\tstruct elf_program_header_64 ph;\n\n\t*size = 0;\n\n\tif (hdr64->shoff > 0) {\n\t\t*size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n\t\treturn 0;\n\t}\n\n\tph_entry = hdr64->phoff;\n\tph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum;\n\n\twhile (ph_entry < ph_table_end) {\n\t\terr = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph));\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tsection_end = ph.offset + ph.filesize;\n\t\tif (section_end > *size)\n\t\t\t*size = section_end;\n\n\t\tph_entry += hdr64->phentsize;\n\t}\n\n\treturn 0;\n}", "parent": null, "children": [470, 471], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 199, "column": 1}}, {"id": 470, "type": "primitive_type", "text": "int", "parent": 469, "children": [], "start_point": {"row": 167, "column": 7}, "end_point": {"row": 167, "column": 10}}, {"id": 471, "type": "function_declarator", "text": "elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)", "parent": 469, "children": [472, 473], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 168, "column": 17}}, {"id": 472, "type": "identifier", "text": "elf64_determine_size", "parent": 471, "children": [], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 31}}, {"id": 473, "type": "parameter_list", "text": "(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)", "parent": 471, "children": [474, 481, 488], "start_point": {"row": 167, "column": 31}, "end_point": {"row": 168, "column": 17}}, {"id": 474, "type": "parameter_declaration", "text": "struct mtd_info *mtd", "parent": 473, "children": [475, 478], "start_point": {"row": 167, "column": 32}, "end_point": {"row": 167, "column": 52}}, {"id": 475, "type": "struct_specifier", "text": "struct mtd_info", "parent": 474, "children": [476, 477], "start_point": {"row": 167, "column": 32}, "end_point": {"row": 167, "column": 47}}, {"id": 476, "type": "struct", "text": "struct", "parent": 475, "children": [], "start_point": {"row": 167, "column": 32}, "end_point": {"row": 167, "column": 38}}, {"id": 477, "type": "type_identifier", "text": "mtd_info", "parent": 475, "children": [], "start_point": {"row": 167, "column": 39}, "end_point": {"row": 167, "column": 47}}, {"id": 478, "type": "pointer_declarator", "text": "*mtd", "parent": 474, "children": [479, 480], "start_point": {"row": 167, "column": 48}, "end_point": {"row": 167, "column": 52}}, {"id": 479, "type": "*", "text": "*", "parent": 478, "children": [], "start_point": {"row": 167, "column": 48}, "end_point": {"row": 167, "column": 49}}, {"id": 480, "type": "identifier", "text": "mtd", "parent": 478, "children": [], "start_point": {"row": 167, "column": 49}, "end_point": {"row": 167, "column": 52}}, {"id": 481, "type": "parameter_declaration", "text": "struct elf_header *hdr", "parent": 473, "children": [482, 485], "start_point": {"row": 167, "column": 54}, "end_point": {"row": 167, "column": 76}}, {"id": 482, "type": "struct_specifier", "text": "struct elf_header", "parent": 481, "children": [483, 484], "start_point": {"row": 167, "column": 54}, "end_point": {"row": 167, "column": 71}}, {"id": 483, "type": "struct", "text": "struct", "parent": 482, "children": [], "start_point": {"row": 167, "column": 54}, "end_point": {"row": 167, "column": 60}}, {"id": 484, "type": "type_identifier", "text": "elf_header", "parent": 482, "children": [], "start_point": {"row": 167, "column": 61}, "end_point": {"row": 167, "column": 71}}, {"id": 485, "type": "pointer_declarator", "text": "*hdr", "parent": 481, "children": [486, 487], "start_point": {"row": 167, "column": 72}, "end_point": {"row": 167, "column": 76}}, {"id": 486, "type": "*", "text": "*", "parent": 485, "children": [], "start_point": {"row": 167, "column": 72}, "end_point": {"row": 167, "column": 73}}, {"id": 487, "type": "identifier", "text": "hdr", "parent": 485, "children": [], "start_point": {"row": 167, "column": 73}, "end_point": {"row": 167, "column": 76}}, {"id": 488, "type": "parameter_declaration", "text": "size_t *size", "parent": 473, "children": [489, 490], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 16}}, {"id": 489, "type": "primitive_type", "text": "size_t", "parent": 488, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 10}}, {"id": 490, "type": "pointer_declarator", "text": "*size", "parent": 488, "children": [491, 492], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 16}}, {"id": 491, "type": "*", "text": "*", "parent": 490, "children": [], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 12}}, {"id": 492, "type": "identifier", "text": "size", "parent": 490, "children": [], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 16}}, {"id": 493, "type": "declaration", "text": "struct elf_header_64 *hdr64 = &(hdr->elf64);", "parent": 469, "children": [494, 497], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 45}}, {"id": 494, "type": "struct_specifier", "text": "struct elf_header_64", "parent": 493, "children": [495, 496], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 21}}, {"id": 495, "type": "struct", "text": "struct", "parent": 494, "children": [], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 7}}, {"id": 496, "type": "type_identifier", "text": "elf_header_64", "parent": 494, "children": [], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 21}}, {"id": 497, "type": "init_declarator", "text": "*hdr64 = &(hdr->elf64)", "parent": 493, "children": [498, 501, 502], "start_point": {"row": 170, "column": 22}, "end_point": {"row": 170, "column": 44}}, {"id": 498, "type": "pointer_declarator", "text": "*hdr64", "parent": 497, "children": [499, 500], "start_point": {"row": 170, "column": 22}, "end_point": {"row": 170, "column": 28}}, {"id": 499, "type": "*", "text": "*", "parent": 498, "children": [], "start_point": {"row": 170, "column": 22}, "end_point": {"row": 170, "column": 23}}, {"id": 500, "type": "identifier", "text": "hdr64", "parent": 498, "children": [], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 28}}, {"id": 501, "type": "=", "text": "=", "parent": 497, "children": [], "start_point": {"row": 170, "column": 29}, "end_point": {"row": 170, "column": 30}}, {"id": 502, "type": "pointer_expression", "text": "&(hdr->elf64)", "parent": 497, "children": [503], "start_point": {"row": 170, "column": 31}, "end_point": {"row": 170, "column": 44}}, {"id": 503, "type": "parenthesized_expression", "text": "(hdr->elf64)", "parent": 502, "children": [504], "start_point": {"row": 170, "column": 32}, "end_point": {"row": 170, "column": 44}}, {"id": 504, "type": "field_expression", "text": "hdr->elf64", "parent": 503, "children": [505, 506], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 43}}, {"id": 505, "type": "identifier", "text": "hdr", "parent": 504, "children": [], "start_point": {"row": 170, "column": 33}, "end_point": {"row": 170, "column": 36}}, {"id": 506, "type": "field_identifier", "text": "elf64", "parent": 504, "children": [], "start_point": {"row": 170, "column": 38}, "end_point": {"row": 170, "column": 43}}, {"id": 507, "type": "declaration", "text": "int err;", "parent": 469, "children": [508, 509], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 9}}, {"id": 508, "type": "primitive_type", "text": "int", "parent": 507, "children": [], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 4}}, {"id": 509, "type": "identifier", "text": "err", "parent": 507, "children": [], "start_point": {"row": 171, "column": 5}, "end_point": {"row": 171, "column": 8}}, {"id": 510, "type": "declaration", "text": "size_t section_end, ph_table_end, ph_entry;", "parent": 469, "children": [511, 512, 513, 514], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 44}}, {"id": 511, "type": "primitive_type", "text": "size_t", "parent": 510, "children": [], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 7}}, {"id": 512, "type": "identifier", "text": "section_end", "parent": 510, "children": [], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 19}}, {"id": 513, "type": "identifier", "text": "ph_table_end", "parent": 510, "children": [], "start_point": {"row": 172, "column": 21}, "end_point": {"row": 172, "column": 33}}, {"id": 514, "type": "identifier", "text": "ph_entry", "parent": 510, "children": [], "start_point": {"row": 172, "column": 35}, "end_point": {"row": 172, "column": 43}}, {"id": 515, "type": "declaration", "text": "struct elf_program_header_64 ph;", "parent": 469, "children": [516, 519], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 33}}, {"id": 516, "type": "struct_specifier", "text": "struct elf_program_header_64", "parent": 515, "children": [517, 518], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 29}}, {"id": 517, "type": "struct", "text": "struct", "parent": 516, "children": [], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 7}}, {"id": 518, "type": "type_identifier", "text": "elf_program_header_64", "parent": 516, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 29}}, {"id": 519, "type": "identifier", "text": "ph", "parent": 515, "children": [], "start_point": {"row": 173, "column": 30}, "end_point": {"row": 173, "column": 32}}, {"id": 520, "type": "assignment_expression", "text": "*size = 0", "parent": 469, "children": [521, 524, 525], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 10}}, {"id": 521, "type": "pointer_expression", "text": "*size", "parent": 520, "children": [522, 523], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 6}}, {"id": 522, "type": "*", "text": "*", "parent": 521, "children": [], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 2}}, {"id": 523, "type": "identifier", "text": "size", "parent": 521, "children": [], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 175, "column": 6}}, {"id": 524, "type": "=", "text": "=", "parent": 520, "children": [], "start_point": {"row": 175, "column": 7}, "end_point": {"row": 175, "column": 8}}, {"id": 525, "type": "number_literal", "text": "0", "parent": 520, "children": [], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 10}}, {"id": 526, "type": "if_statement", "text": "if (hdr64->shoff > 0) {\n\t\t*size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n\t\treturn 0;\n\t}", "parent": 469, "children": [527], "start_point": {"row": 177, "column": 1}, "end_point": {"row": 180, "column": 2}}, {"id": 527, "type": "parenthesized_expression", "text": "(hdr64->shoff > 0)", "parent": 526, "children": [528], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 22}}, {"id": 528, "type": "binary_expression", "text": "hdr64->shoff > 0", "parent": 527, "children": [529, 532, 533], "start_point": {"row": 177, "column": 5}, "end_point": {"row": 177, "column": 21}}, {"id": 529, "type": "field_expression", "text": "hdr64->shoff", "parent": 528, "children": [530, 531], "start_point": {"row": 177, "column": 5}, "end_point": {"row": 177, "column": 17}}, {"id": 530, "type": "identifier", "text": "hdr64", "parent": 529, "children": [], "start_point": {"row": 177, "column": 5}, "end_point": {"row": 177, "column": 10}}, {"id": 531, "type": "field_identifier", "text": "shoff", "parent": 529, "children": [], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 17}}, {"id": 532, "type": ">", "text": ">", "parent": 528, "children": [], "start_point": {"row": 177, "column": 18}, "end_point": {"row": 177, "column": 19}}, {"id": 533, "type": "number_literal", "text": "0", "parent": 528, "children": [], "start_point": {"row": 177, "column": 20}, "end_point": {"row": 177, "column": 21}}, {"id": 534, "type": "assignment_expression", "text": "*size = hdr64->shoff + hdr64->shentsize * hdr64->shnum", "parent": 526, "children": [535, 538, 539], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 56}}, {"id": 535, "type": "pointer_expression", "text": "*size", "parent": 534, "children": [536, 537], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 7}}, {"id": 536, "type": "*", "text": "*", "parent": 535, "children": [], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 3}}, {"id": 537, "type": "identifier", "text": "size", "parent": 535, "children": [], "start_point": {"row": 178, "column": 3}, "end_point": {"row": 178, "column": 7}}, {"id": 538, "type": "=", "text": "=", "parent": 534, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 9}}, {"id": 539, "type": "binary_expression", "text": "hdr64->shoff + hdr64->shentsize * hdr64->shnum", "parent": 534, "children": [540, 543, 544], "start_point": {"row": 178, "column": 10}, "end_point": {"row": 178, "column": 56}}, {"id": 540, "type": "field_expression", "text": "hdr64->shoff", "parent": 539, "children": [541, 542], "start_point": {"row": 178, "column": 10}, "end_point": {"row": 178, "column": 22}}, {"id": 541, "type": "identifier", "text": "hdr64", "parent": 540, "children": [], "start_point": {"row": 178, "column": 10}, "end_point": {"row": 178, "column": 15}}, {"id": 542, "type": "field_identifier", "text": "shoff", "parent": 540, "children": [], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 22}}, {"id": 543, "type": "+", "text": "+", "parent": 539, "children": [], "start_point": {"row": 178, "column": 23}, "end_point": {"row": 178, "column": 24}}, {"id": 544, "type": "binary_expression", "text": "hdr64->shentsize * hdr64->shnum", "parent": 539, "children": [545, 548, 549], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 56}}, {"id": 545, "type": "field_expression", "text": "hdr64->shentsize", "parent": 544, "children": [546, 547], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 41}}, {"id": 546, "type": "identifier", "text": "hdr64", "parent": 545, "children": [], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 30}}, {"id": 547, "type": "field_identifier", "text": "shentsize", "parent": 545, "children": [], "start_point": {"row": 178, "column": 32}, "end_point": {"row": 178, "column": 41}}, {"id": 548, "type": "*", "text": "*", "parent": 544, "children": [], "start_point": {"row": 178, "column": 42}, "end_point": {"row": 178, "column": 43}}, {"id": 549, "type": "field_expression", "text": "hdr64->shnum", "parent": 544, "children": [550, 551], "start_point": {"row": 178, "column": 44}, "end_point": {"row": 178, "column": 56}}, {"id": 550, "type": "identifier", "text": "hdr64", "parent": 549, "children": [], "start_point": {"row": 178, "column": 44}, "end_point": {"row": 178, "column": 49}}, {"id": 551, "type": "field_identifier", "text": "shnum", "parent": 549, "children": [], "start_point": {"row": 178, "column": 51}, "end_point": {"row": 178, "column": 56}}, {"id": 552, "type": "return_statement", "text": "return 0;", "parent": 526, "children": [553], "start_point": {"row": 179, "column": 2}, "end_point": {"row": 179, "column": 11}}, {"id": 553, "type": "number_literal", "text": "0", "parent": 552, "children": [], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 10}}, {"id": 554, "type": "assignment_expression", "text": "ph_entry = hdr64->phoff", "parent": 469, "children": [555, 556, 557], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 24}}, {"id": 555, "type": "identifier", "text": "ph_entry", "parent": 554, "children": [], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 9}}, {"id": 556, "type": "=", "text": "=", "parent": 554, "children": [], "start_point": {"row": 182, "column": 10}, "end_point": {"row": 182, "column": 11}}, {"id": 557, "type": "field_expression", "text": "hdr64->phoff", "parent": 554, "children": [558, 559], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 24}}, {"id": 558, "type": "identifier", "text": "hdr64", "parent": 557, "children": [], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 17}}, {"id": 559, "type": "field_identifier", "text": "phoff", "parent": 557, "children": [], "start_point": {"row": 182, "column": 19}, "end_point": {"row": 182, "column": 24}}, {"id": 560, "type": "assignment_expression", "text": "ph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum", "parent": 469, "children": [561, 562, 563], "start_point": {"row": 183, "column": 1}, "end_point": {"row": 183, "column": 62}}, {"id": 561, "type": "identifier", "text": "ph_table_end", "parent": 560, "children": [], "start_point": {"row": 183, "column": 1}, "end_point": {"row": 183, "column": 13}}, {"id": 562, "type": "=", "text": "=", "parent": 560, "children": [], "start_point": {"row": 183, "column": 14}, "end_point": {"row": 183, "column": 15}}, {"id": 563, "type": "binary_expression", "text": "hdr64->phoff + hdr64->phentsize * hdr64->phnum", "parent": 560, "children": [564, 567, 568], "start_point": {"row": 183, "column": 16}, "end_point": {"row": 183, "column": 62}}, {"id": 564, "type": "field_expression", "text": "hdr64->phoff", "parent": 563, "children": [565, 566], "start_point": {"row": 183, "column": 16}, "end_point": {"row": 183, "column": 28}}, {"id": 565, "type": "identifier", "text": "hdr64", "parent": 564, "children": [], "start_point": {"row": 183, "column": 16}, "end_point": {"row": 183, "column": 21}}, {"id": 566, "type": "field_identifier", "text": "phoff", "parent": 564, "children": [], "start_point": {"row": 183, "column": 23}, "end_point": {"row": 183, "column": 28}}, {"id": 567, "type": "+", "text": "+", "parent": 563, "children": [], "start_point": {"row": 183, "column": 29}, "end_point": {"row": 183, "column": 30}}, {"id": 568, "type": "binary_expression", "text": "hdr64->phentsize * hdr64->phnum", "parent": 563, "children": [569, 572, 573], "start_point": {"row": 183, "column": 31}, "end_point": {"row": 183, "column": 62}}, {"id": 569, "type": "field_expression", "text": "hdr64->phentsize", "parent": 568, "children": [570, 571], "start_point": {"row": 183, "column": 31}, "end_point": {"row": 183, "column": 47}}, {"id": 570, "type": "identifier", "text": "hdr64", "parent": 569, "children": [], "start_point": {"row": 183, "column": 31}, "end_point": {"row": 183, "column": 36}}, {"id": 571, "type": "field_identifier", "text": "phentsize", "parent": 569, "children": [], "start_point": {"row": 183, "column": 38}, "end_point": {"row": 183, "column": 47}}, {"id": 572, "type": "*", "text": "*", "parent": 568, "children": [], "start_point": {"row": 183, "column": 48}, "end_point": {"row": 183, "column": 49}}, {"id": 573, "type": "field_expression", "text": "hdr64->phnum", "parent": 568, "children": [574, 575], "start_point": {"row": 183, "column": 50}, "end_point": {"row": 183, "column": 62}}, {"id": 574, "type": "identifier", "text": "hdr64", "parent": 573, "children": [], "start_point": {"row": 183, "column": 50}, "end_point": {"row": 183, "column": 55}}, {"id": 575, "type": "field_identifier", "text": "phnum", "parent": 573, "children": [], "start_point": {"row": 183, "column": 57}, "end_point": {"row": 183, "column": 62}}, {"id": 576, "type": "while_statement", "text": "while (ph_entry < ph_table_end) {\n\t\terr = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph));\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tsection_end = ph.offset + ph.filesize;\n\t\tif (section_end > *size)\n\t\t\t*size = section_end;\n\n\t\tph_entry += hdr64->phentsize;\n\t}", "parent": 469, "children": [577], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 196, "column": 2}}, {"id": 577, "type": "parenthesized_expression", "text": "(ph_entry < ph_table_end)", "parent": 576, "children": [578], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 32}}, {"id": 578, "type": "binary_expression", "text": "ph_entry < ph_table_end", "parent": 577, "children": [579, 580, 581], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 31}}, {"id": 579, "type": "identifier", "text": "ph_entry", "parent": 578, "children": [], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 16}}, {"id": 580, "type": "<", "text": "<", "parent": 578, "children": [], "start_point": {"row": 185, "column": 17}, "end_point": {"row": 185, "column": 18}}, {"id": 581, "type": "identifier", "text": "ph_table_end", "parent": 578, "children": [], "start_point": {"row": 185, "column": 19}, "end_point": {"row": 185, "column": 31}}, {"id": 582, "type": "assignment_expression", "text": "err = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph))", "parent": 576, "children": [583, 584, 585], "start_point": {"row": 186, "column": 2}, "end_point": {"row": 187, "column": 20}}, {"id": 583, "type": "identifier", "text": "err", "parent": 582, "children": [], "start_point": {"row": 186, "column": 2}, "end_point": {"row": 186, "column": 5}}, {"id": 584, "type": "=", "text": "=", "parent": 582, "children": [], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 186, "column": 7}}, {"id": 585, "type": "call_expression", "text": "mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph))", "parent": 582, "children": [586, 587], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 187, "column": 20}}, {"id": 586, "type": "identifier", "text": "mtdsplit_elf_read_mtd", "parent": 585, "children": [], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 29}}, {"id": 587, "type": "argument_list", "text": "(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph))", "parent": 585, "children": [588, 589, 590, 598], "start_point": {"row": 186, "column": 29}, "end_point": {"row": 187, "column": 20}}, {"id": 588, "type": "identifier", "text": "mtd", "parent": 587, "children": [], "start_point": {"row": 186, "column": 30}, "end_point": {"row": 186, "column": 33}}, {"id": 589, "type": "identifier", "text": "ph_entry", "parent": 587, "children": [], "start_point": {"row": 186, "column": 35}, "end_point": {"row": 186, "column": 43}}, {"id": 590, "type": "cast_expression", "text": "(uint8_t *)(&ph)", "parent": 587, "children": [591, 595], "start_point": {"row": 186, "column": 45}, "end_point": {"row": 186, "column": 61}}, {"id": 591, "type": "type_descriptor", "text": "uint8_t *", "parent": 590, "children": [592, 593], "start_point": {"row": 186, "column": 46}, "end_point": {"row": 186, "column": 55}}, {"id": 592, "type": "primitive_type", "text": "uint8_t", "parent": 591, "children": [], "start_point": {"row": 186, "column": 46}, "end_point": {"row": 186, "column": 53}}, {"id": 593, "type": "abstract_pointer_declarator", "text": "*", "parent": 591, "children": [594], "start_point": {"row": 186, "column": 54}, "end_point": {"row": 186, "column": 55}}, {"id": 594, "type": "*", "text": "*", "parent": 593, "children": [], "start_point": {"row": 186, "column": 54}, "end_point": {"row": 186, "column": 55}}, {"id": 595, "type": "parenthesized_expression", "text": "(&ph)", "parent": 590, "children": [596], "start_point": {"row": 186, "column": 56}, "end_point": {"row": 186, "column": 61}}, {"id": 596, "type": "pointer_expression", "text": "&ph", "parent": 595, "children": [597], "start_point": {"row": 186, "column": 57}, "end_point": {"row": 186, "column": 60}}, {"id": 597, "type": "identifier", "text": "ph", "parent": 596, "children": [], "start_point": {"row": 186, "column": 58}, "end_point": {"row": 186, "column": 60}}, {"id": 598, "type": "sizeof_expression", "text": "sizeof(ph)", "parent": 587, "children": [599], "start_point": {"row": 187, "column": 9}, "end_point": {"row": 187, "column": 19}}, {"id": 599, "type": "parenthesized_expression", "text": "(ph)", "parent": 598, "children": [600], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 19}}, {"id": 600, "type": "identifier", "text": "ph", "parent": 599, "children": [], "start_point": {"row": 187, "column": 16}, "end_point": {"row": 187, "column": 18}}, {"id": 601, "type": "if_statement", "text": "if (err)\n\t\t\treturn err;", "parent": 576, "children": [602, 604], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 189, "column": 14}}, {"id": 602, "type": "parenthesized_expression", "text": "(err)", "parent": 601, "children": [603], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 10}}, {"id": 603, "type": "identifier", "text": "err", "parent": 602, "children": [], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 9}}, {"id": 604, "type": "return_statement", "text": "return err;", "parent": 601, "children": [605], "start_point": {"row": 189, "column": 3}, "end_point": {"row": 189, "column": 14}}, {"id": 605, "type": "identifier", "text": "err", "parent": 604, "children": [], "start_point": {"row": 189, "column": 10}, "end_point": {"row": 189, "column": 13}}, {"id": 606, "type": "assignment_expression", "text": "section_end = ph.offset + ph.filesize", "parent": 576, "children": [607, 608, 609], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 39}}, {"id": 607, "type": "identifier", "text": "section_end", "parent": 606, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 13}}, {"id": 608, "type": "=", "text": "=", "parent": 606, "children": [], "start_point": {"row": 191, "column": 14}, "end_point": {"row": 191, "column": 15}}, {"id": 609, "type": "binary_expression", "text": "ph.offset + ph.filesize", "parent": 606, "children": [610, 613, 614], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 39}}, {"id": 610, "type": "field_expression", "text": "ph.offset", "parent": 609, "children": [611, 612], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 25}}, {"id": 611, "type": "identifier", "text": "ph", "parent": 610, "children": [], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 18}}, {"id": 612, "type": "field_identifier", "text": "offset", "parent": 610, "children": [], "start_point": {"row": 191, "column": 19}, "end_point": {"row": 191, "column": 25}}, {"id": 613, "type": "+", "text": "+", "parent": 609, "children": [], "start_point": {"row": 191, "column": 26}, "end_point": {"row": 191, "column": 27}}, {"id": 614, "type": "field_expression", "text": "ph.filesize", "parent": 609, "children": [615, 616], "start_point": {"row": 191, "column": 28}, "end_point": {"row": 191, "column": 39}}, {"id": 615, "type": "identifier", "text": "ph", "parent": 614, "children": [], "start_point": {"row": 191, "column": 28}, "end_point": {"row": 191, "column": 30}}, {"id": 616, "type": "field_identifier", "text": "filesize", "parent": 614, "children": [], "start_point": {"row": 191, "column": 31}, "end_point": {"row": 191, "column": 39}}, {"id": 617, "type": "if_statement", "text": "if (section_end > *size)\n\t\t\t*size = section_end;", "parent": 576, "children": [618], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 193, "column": 23}}, {"id": 618, "type": "parenthesized_expression", "text": "(section_end > *size)", "parent": 617, "children": [619], "start_point": {"row": 192, "column": 5}, "end_point": {"row": 192, "column": 26}}, {"id": 619, "type": "binary_expression", "text": "section_end > *size", "parent": 618, "children": [620, 621, 622], "start_point": {"row": 192, "column": 6}, "end_point": {"row": 192, "column": 25}}, {"id": 620, "type": "identifier", "text": "section_end", "parent": 619, "children": [], "start_point": {"row": 192, "column": 6}, "end_point": {"row": 192, "column": 17}}, {"id": 621, "type": ">", "text": ">", "parent": 619, "children": [], "start_point": {"row": 192, "column": 18}, "end_point": {"row": 192, "column": 19}}, {"id": 622, "type": "pointer_expression", "text": "*size", "parent": 619, "children": [623, 624], "start_point": {"row": 192, "column": 20}, "end_point": {"row": 192, "column": 25}}, {"id": 623, "type": "*", "text": "*", "parent": 622, "children": [], "start_point": {"row": 192, "column": 20}, "end_point": {"row": 192, "column": 21}}, {"id": 624, "type": "identifier", "text": "size", "parent": 622, "children": [], "start_point": {"row": 192, "column": 21}, "end_point": {"row": 192, "column": 25}}, {"id": 625, "type": "assignment_expression", "text": "*size = section_end", "parent": 617, "children": [626, 629, 630], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 22}}, {"id": 626, "type": "pointer_expression", "text": "*size", "parent": 625, "children": [627, 628], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 8}}, {"id": 627, "type": "*", "text": "*", "parent": 626, "children": [], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 4}}, {"id": 628, "type": "identifier", "text": "size", "parent": 626, "children": [], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 8}}, {"id": 629, "type": "=", "text": "=", "parent": 625, "children": [], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 10}}, {"id": 630, "type": "identifier", "text": "section_end", "parent": 625, "children": [], "start_point": {"row": 193, "column": 11}, "end_point": {"row": 193, "column": 22}}, {"id": 631, "type": "assignment_expression", "text": "ph_entry += hdr64->phentsize", "parent": 576, "children": [632, 633, 634], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 195, "column": 30}}, {"id": 632, "type": "identifier", "text": "ph_entry", "parent": 631, "children": [], "start_point": {"row": 195, "column": 2}, "end_point": {"row": 195, "column": 10}}, {"id": 633, "type": "+=", "text": "+=", "parent": 631, "children": [], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 13}}, {"id": 634, "type": "field_expression", "text": "hdr64->phentsize", "parent": 631, "children": [635, 636], "start_point": {"row": 195, "column": 14}, "end_point": {"row": 195, "column": 30}}, {"id": 635, "type": "identifier", "text": "hdr64", "parent": 634, "children": [], "start_point": {"row": 195, "column": 14}, "end_point": {"row": 195, "column": 19}}, {"id": 636, "type": "field_identifier", "text": "phentsize", "parent": 634, "children": [], "start_point": {"row": 195, "column": 21}, "end_point": {"row": 195, "column": 30}}, {"id": 637, "type": "return_statement", "text": "return 0;", "parent": 469, "children": [638], "start_point": {"row": 198, "column": 1}, "end_point": {"row": 198, "column": 10}}, {"id": 638, "type": "number_literal", "text": "0", "parent": 637, "children": [], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 9}}, {"id": 639, "type": "function_definition", "text": "static int mtdsplit_parse_elf(struct mtd_info *mtd,\n\t\t\t const struct mtd_partition **pparts,\n\t\t\t struct mtd_part_parser_data *data)\n{\n\tstruct elf_header hdr;\n\tsize_t loader_size, rootfs_offset;\n\tenum mtdsplit_part_type type;\n\tstruct mtd_partition *parts;\n\tint err;\n\n\terr = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr));\n\tif (err)\n\t\treturn err;\n\n\tif (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n\t\tpr_debug(\"invalid ELF magic %08x\\n\",\n\t\t\t be32_to_cpu(hdr.ident.magic));\n\t\treturn -EINVAL;\n\t}\n\n\tswitch (hdr.ident.class) {\n\tcase ELF_CLASS_32:\n\t\terr = elf32_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;\n\tcase ELF_CLASS_64:\n\t\terr = elf64_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;\n\tdefault:\n\t\tpr_debug(\"invalid ELF class %i\\n\", hdr.ident.class);\n\t\terr = -EINVAL;\n\t}\n\n\tif (err)\n\t\treturn err;\n\n\terr = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n\t\t\t\t &rootfs_offset, &type);\n\tif (err)\n\t\treturn err;\n\n\tif (rootfs_offset == mtd->size) {\n\t\tpr_debug(\"no rootfs found in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn -ENODEV;\n\t}\n\n\tparts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL);\n\tif (!parts)\n\t\treturn -ENOMEM;\n\n\tparts[0].name = KERNEL_PART_NAME;\n\tparts[0].offset = 0;\n\tparts[0].size = rootfs_offset;\n\n\tif (type == MTDSPLIT_PART_TYPE_UBI)\n\t\tparts[1].name = UBI_PART_NAME;\n\telse\n\t\tparts[1].name = ROOTFS_PART_NAME;\n\tparts[1].offset = rootfs_offset;\n\tparts[1].size = mtd->size - rootfs_offset;\n\n\t*pparts = parts;\n\treturn ELF_NR_PARTS;\n}", "parent": null, "children": [640, 641], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 263, "column": 1}}, {"id": 640, "type": "primitive_type", "text": "int", "parent": 639, "children": [], "start_point": {"row": 201, "column": 7}, "end_point": {"row": 201, "column": 10}}, {"id": 641, "type": "function_declarator", "text": "mtdsplit_parse_elf(struct mtd_info *mtd,\n\t\t\t const struct mtd_partition **pparts,\n\t\t\t struct mtd_part_parser_data *data)", "parent": 639, "children": [642, 643], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 203, "column": 43}}, {"id": 642, "type": "identifier", "text": "mtdsplit_parse_elf", "parent": 641, "children": [], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 29}}, {"id": 643, "type": "parameter_list", "text": "(struct mtd_info *mtd,\n\t\t\t const struct mtd_partition **pparts,\n\t\t\t struct mtd_part_parser_data *data)", "parent": 641, "children": [644, 651, 660], "start_point": {"row": 201, "column": 29}, "end_point": {"row": 203, "column": 43}}, {"id": 644, "type": "parameter_declaration", "text": "struct mtd_info *mtd", "parent": 643, "children": [645, 648], "start_point": {"row": 201, "column": 30}, "end_point": {"row": 201, "column": 50}}, {"id": 645, "type": "struct_specifier", "text": "struct mtd_info", "parent": 644, "children": [646, 647], "start_point": {"row": 201, "column": 30}, "end_point": {"row": 201, "column": 45}}, {"id": 646, "type": "struct", "text": "struct", "parent": 645, "children": [], "start_point": {"row": 201, "column": 30}, "end_point": {"row": 201, "column": 36}}, {"id": 647, "type": "type_identifier", "text": "mtd_info", "parent": 645, "children": [], "start_point": {"row": 201, "column": 37}, "end_point": {"row": 201, "column": 45}}, {"id": 648, "type": "pointer_declarator", "text": "*mtd", "parent": 644, "children": [649, 650], "start_point": {"row": 201, "column": 46}, "end_point": {"row": 201, "column": 50}}, {"id": 649, "type": "*", "text": "*", "parent": 648, "children": [], "start_point": {"row": 201, "column": 46}, "end_point": {"row": 201, "column": 47}}, {"id": 650, "type": "identifier", "text": "mtd", "parent": 648, "children": [], "start_point": {"row": 201, "column": 47}, "end_point": {"row": 201, "column": 50}}, {"id": 651, "type": "parameter_declaration", "text": "const struct mtd_partition **pparts", "parent": 643, "children": [652, 655], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 44}}, {"id": 652, "type": "struct_specifier", "text": "struct mtd_partition", "parent": 651, "children": [653, 654], "start_point": {"row": 202, "column": 15}, "end_point": {"row": 202, "column": 35}}, {"id": 653, "type": "struct", "text": "struct", "parent": 652, "children": [], "start_point": {"row": 202, "column": 15}, "end_point": {"row": 202, "column": 21}}, {"id": 654, "type": "type_identifier", "text": "mtd_partition", "parent": 652, "children": [], "start_point": {"row": 202, "column": 22}, "end_point": {"row": 202, "column": 35}}, {"id": 655, "type": "pointer_declarator", "text": "**pparts", "parent": 651, "children": [656, 657], "start_point": {"row": 202, "column": 36}, "end_point": {"row": 202, "column": 44}}, {"id": 656, "type": "*", "text": "*", "parent": 655, "children": [], "start_point": {"row": 202, "column": 36}, "end_point": {"row": 202, "column": 37}}, {"id": 657, "type": "pointer_declarator", "text": "*pparts", "parent": 655, "children": [658, 659], "start_point": {"row": 202, "column": 37}, "end_point": {"row": 202, "column": 44}}, {"id": 658, "type": "*", "text": "*", "parent": 657, "children": [], "start_point": {"row": 202, "column": 37}, "end_point": {"row": 202, "column": 38}}, {"id": 659, "type": "identifier", "text": "pparts", "parent": 657, "children": [], "start_point": {"row": 202, "column": 38}, "end_point": {"row": 202, "column": 44}}, {"id": 660, "type": "parameter_declaration", "text": "struct mtd_part_parser_data *data", "parent": 643, "children": [661, 664], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 42}}, {"id": 661, "type": "struct_specifier", "text": "struct mtd_part_parser_data", "parent": 660, "children": [662, 663], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 36}}, {"id": 662, "type": "struct", "text": "struct", "parent": 661, "children": [], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 15}}, {"id": 663, "type": "type_identifier", "text": "mtd_part_parser_data", "parent": 661, "children": [], "start_point": {"row": 203, "column": 16}, "end_point": {"row": 203, "column": 36}}, {"id": 664, "type": "pointer_declarator", "text": "*data", "parent": 660, "children": [665, 666], "start_point": {"row": 203, "column": 37}, "end_point": {"row": 203, "column": 42}}, {"id": 665, "type": "*", "text": "*", "parent": 664, "children": [], "start_point": {"row": 203, "column": 37}, "end_point": {"row": 203, "column": 38}}, {"id": 666, "type": "identifier", "text": "data", "parent": 664, "children": [], "start_point": {"row": 203, "column": 38}, "end_point": {"row": 203, "column": 42}}, {"id": 667, "type": "declaration", "text": "struct elf_header hdr;", "parent": 639, "children": [668, 671], "start_point": {"row": 205, "column": 1}, "end_point": {"row": 205, "column": 23}}, {"id": 668, "type": "struct_specifier", "text": "struct elf_header", "parent": 667, "children": [669, 670], "start_point": {"row": 205, "column": 1}, "end_point": {"row": 205, "column": 18}}, {"id": 669, "type": "struct", "text": "struct", "parent": 668, "children": [], "start_point": {"row": 205, "column": 1}, "end_point": {"row": 205, "column": 7}}, {"id": 670, "type": "type_identifier", "text": "elf_header", "parent": 668, "children": [], "start_point": {"row": 205, "column": 8}, "end_point": {"row": 205, "column": 18}}, {"id": 671, "type": "identifier", "text": "hdr", "parent": 667, "children": [], "start_point": {"row": 205, "column": 19}, "end_point": {"row": 205, "column": 22}}, {"id": 672, "type": "declaration", "text": "size_t loader_size, rootfs_offset;", "parent": 639, "children": [673, 674, 675], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 35}}, {"id": 673, "type": "primitive_type", "text": "size_t", "parent": 672, "children": [], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 7}}, {"id": 674, "type": "identifier", "text": "loader_size", "parent": 672, "children": [], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 19}}, {"id": 675, "type": "identifier", "text": "rootfs_offset", "parent": 672, "children": [], "start_point": {"row": 206, "column": 21}, "end_point": {"row": 206, "column": 34}}, {"id": 676, "type": "declaration", "text": "enum mtdsplit_part_type type;", "parent": 639, "children": [677, 680], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 30}}, {"id": 677, "type": "enum_specifier", "text": "enum mtdsplit_part_type", "parent": 676, "children": [678, 679], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 24}}, {"id": 678, "type": "enum", "text": "enum", "parent": 677, "children": [], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 5}}, {"id": 679, "type": "type_identifier", "text": "mtdsplit_part_type", "parent": 677, "children": [], "start_point": {"row": 207, "column": 6}, "end_point": {"row": 207, "column": 24}}, {"id": 680, "type": "identifier", "text": "type", "parent": 676, "children": [], "start_point": {"row": 207, "column": 25}, "end_point": {"row": 207, "column": 29}}, {"id": 681, "type": "declaration", "text": "struct mtd_partition *parts;", "parent": 639, "children": [682, 685], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 29}}, {"id": 682, "type": "struct_specifier", "text": "struct mtd_partition", "parent": 681, "children": [683, 684], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 21}}, {"id": 683, "type": "struct", "text": "struct", "parent": 682, "children": [], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 7}}, {"id": 684, "type": "type_identifier", "text": "mtd_partition", "parent": 682, "children": [], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 21}}, {"id": 685, "type": "pointer_declarator", "text": "*parts", "parent": 681, "children": [686, 687], "start_point": {"row": 208, "column": 22}, "end_point": {"row": 208, "column": 28}}, {"id": 686, "type": "*", "text": "*", "parent": 685, "children": [], "start_point": {"row": 208, "column": 22}, "end_point": {"row": 208, "column": 23}}, {"id": 687, "type": "identifier", "text": "parts", "parent": 685, "children": [], "start_point": {"row": 208, "column": 23}, "end_point": {"row": 208, "column": 28}}, {"id": 688, "type": "declaration", "text": "int err;", "parent": 639, "children": [689, 690], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 209, "column": 9}}, {"id": 689, "type": "primitive_type", "text": "int", "parent": 688, "children": [], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 209, "column": 4}}, {"id": 690, "type": "identifier", "text": "err", "parent": 688, "children": [], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 8}}, {"id": 691, "type": "assignment_expression", "text": "err = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr))", "parent": 639, "children": [692, 693, 694], "start_point": {"row": 211, "column": 1}, "end_point": {"row": 211, "column": 66}}, {"id": 692, "type": "identifier", "text": "err", "parent": 691, "children": [], "start_point": {"row": 211, "column": 1}, "end_point": {"row": 211, "column": 4}}, {"id": 693, "type": "=", "text": "=", "parent": 691, "children": [], "start_point": {"row": 211, "column": 5}, "end_point": {"row": 211, "column": 6}}, {"id": 694, "type": "call_expression", "text": "mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr))", "parent": 691, "children": [695, 696], "start_point": {"row": 211, "column": 7}, "end_point": {"row": 211, "column": 66}}, {"id": 695, "type": "identifier", "text": "mtdsplit_elf_read_mtd", "parent": 694, "children": [], "start_point": {"row": 211, "column": 7}, "end_point": {"row": 211, "column": 28}}, {"id": 696, "type": "argument_list", "text": "(mtd, 0, (uint8_t *)&hdr, sizeof(hdr))", "parent": 694, "children": [697, 698, 699, 706], "start_point": {"row": 211, "column": 28}, "end_point": {"row": 211, "column": 66}}, {"id": 697, "type": "identifier", "text": "mtd", "parent": 696, "children": [], "start_point": {"row": 211, "column": 29}, "end_point": {"row": 211, "column": 32}}, {"id": 698, "type": "number_literal", "text": "0", "parent": 696, "children": [], "start_point": {"row": 211, "column": 34}, "end_point": {"row": 211, "column": 35}}, {"id": 699, "type": "cast_expression", "text": "(uint8_t *)&hdr", "parent": 696, "children": [700, 704], "start_point": {"row": 211, "column": 37}, "end_point": {"row": 211, "column": 52}}, {"id": 700, "type": "type_descriptor", "text": "uint8_t *", "parent": 699, "children": [701, 702], "start_point": {"row": 211, "column": 38}, "end_point": {"row": 211, "column": 47}}, {"id": 701, "type": "primitive_type", "text": "uint8_t", "parent": 700, "children": [], "start_point": {"row": 211, "column": 38}, "end_point": {"row": 211, "column": 45}}, {"id": 702, "type": "abstract_pointer_declarator", "text": "*", "parent": 700, "children": [703], "start_point": {"row": 211, "column": 46}, "end_point": {"row": 211, "column": 47}}, {"id": 703, "type": "*", "text": "*", "parent": 702, "children": [], "start_point": {"row": 211, "column": 46}, "end_point": {"row": 211, "column": 47}}, {"id": 704, "type": "pointer_expression", "text": "&hdr", "parent": 699, "children": [705], "start_point": {"row": 211, "column": 48}, "end_point": {"row": 211, "column": 52}}, {"id": 705, "type": "identifier", "text": "hdr", "parent": 704, "children": [], "start_point": {"row": 211, "column": 49}, "end_point": {"row": 211, "column": 52}}, {"id": 706, "type": "sizeof_expression", "text": "sizeof(hdr)", "parent": 696, "children": [707], "start_point": {"row": 211, "column": 54}, "end_point": {"row": 211, "column": 65}}, {"id": 707, "type": "parenthesized_expression", "text": "(hdr)", "parent": 706, "children": [708], "start_point": {"row": 211, "column": 60}, "end_point": {"row": 211, "column": 65}}, {"id": 708, "type": "identifier", "text": "hdr", "parent": 707, "children": [], "start_point": {"row": 211, "column": 61}, "end_point": {"row": 211, "column": 64}}, {"id": 709, "type": "if_statement", "text": "if (err)\n\t\treturn err;", "parent": 639, "children": [710, 712], "start_point": {"row": 212, "column": 1}, "end_point": {"row": 213, "column": 13}}, {"id": 710, "type": "parenthesized_expression", "text": "(err)", "parent": 709, "children": [711], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 9}}, {"id": 711, "type": "identifier", "text": "err", "parent": 710, "children": [], "start_point": {"row": 212, "column": 5}, "end_point": {"row": 212, "column": 8}}, {"id": 712, "type": "return_statement", "text": "return err;", "parent": 709, "children": [713], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 213, "column": 13}}, {"id": 713, "type": "identifier", "text": "err", "parent": 712, "children": [], "start_point": {"row": 213, "column": 9}, "end_point": {"row": 213, "column": 12}}, {"id": 714, "type": "if_statement", "text": "if (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n\t\tpr_debug(\"invalid ELF magic %08x\\n\",\n\t\t\t be32_to_cpu(hdr.ident.magic));\n\t\treturn -EINVAL;\n\t}", "parent": 639, "children": [715], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 219, "column": 2}}, {"id": 715, "type": "parenthesized_expression", "text": "(be32_to_cpu(hdr.ident.magic) != ELF_MAGIC)", "parent": 714, "children": [716], "start_point": {"row": 215, "column": 4}, "end_point": {"row": 215, "column": 47}}, {"id": 716, "type": "binary_expression", "text": "be32_to_cpu(hdr.ident.magic) != ELF_MAGIC", "parent": 715, "children": [717, 725, 726], "start_point": {"row": 215, "column": 5}, "end_point": {"row": 215, "column": 46}}, {"id": 717, "type": "call_expression", "text": "be32_to_cpu(hdr.ident.magic)", "parent": 716, "children": [718, 719], "start_point": {"row": 215, "column": 5}, "end_point": {"row": 215, "column": 33}}, {"id": 718, "type": "identifier", "text": "be32_to_cpu", "parent": 717, "children": [], "start_point": {"row": 215, "column": 5}, "end_point": {"row": 215, "column": 16}}, {"id": 719, "type": "argument_list", "text": "(hdr.ident.magic)", "parent": 717, "children": [720], "start_point": {"row": 215, "column": 16}, "end_point": {"row": 215, "column": 33}}, {"id": 720, "type": "field_expression", "text": "hdr.ident.magic", "parent": 719, "children": [721, 724], "start_point": {"row": 215, "column": 17}, "end_point": {"row": 215, "column": 32}}, {"id": 721, "type": "field_expression", "text": "hdr.ident", "parent": 720, "children": [722, 723], "start_point": {"row": 215, "column": 17}, "end_point": {"row": 215, "column": 26}}, {"id": 722, "type": "identifier", "text": "hdr", "parent": 721, "children": [], "start_point": {"row": 215, "column": 17}, "end_point": {"row": 215, "column": 20}}, {"id": 723, "type": "field_identifier", "text": "ident", "parent": 721, "children": [], "start_point": {"row": 215, "column": 21}, "end_point": {"row": 215, "column": 26}}, {"id": 724, "type": "field_identifier", "text": "magic", "parent": 720, "children": [], "start_point": {"row": 215, "column": 27}, "end_point": {"row": 215, "column": 32}}, {"id": 725, "type": "!=", "text": "!=", "parent": 716, "children": [], "start_point": {"row": 215, "column": 34}, "end_point": {"row": 215, "column": 36}}, {"id": 726, "type": "identifier", "text": "ELF_MAGIC", "parent": 716, "children": [], "start_point": {"row": 215, "column": 37}, "end_point": {"row": 215, "column": 46}}, {"id": 727, "type": "call_expression", "text": "pr_debug(\"invalid ELF magic %08x\\n\",\n\t\t\t be32_to_cpu(hdr.ident.magic))", "parent": 714, "children": [728, 729], "start_point": {"row": 216, "column": 2}, "end_point": {"row": 217, "column": 33}}, {"id": 728, "type": "identifier", "text": "pr_debug", "parent": 727, "children": [], "start_point": {"row": 216, "column": 2}, "end_point": {"row": 216, "column": 10}}, {"id": 729, "type": "argument_list", "text": "(\"invalid ELF magic %08x\\n\",\n\t\t\t be32_to_cpu(hdr.ident.magic))", "parent": 727, "children": [730, 732], "start_point": {"row": 216, "column": 10}, "end_point": {"row": 217, "column": 33}}, {"id": 730, "type": "string_literal", "text": "\"invalid ELF magic %08x\\n\"", "parent": 729, "children": [731], "start_point": {"row": 216, "column": 11}, "end_point": {"row": 216, "column": 37}}, {"id": 731, "type": "escape_sequence", "text": "\\n", "parent": 730, "children": [], "start_point": {"row": 216, "column": 34}, "end_point": {"row": 216, "column": 36}}, {"id": 732, "type": "call_expression", "text": "be32_to_cpu(hdr.ident.magic)", "parent": 729, "children": [733, 734], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 32}}, {"id": 733, "type": "identifier", "text": "be32_to_cpu", "parent": 732, "children": [], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 15}}, {"id": 734, "type": "argument_list", "text": "(hdr.ident.magic)", "parent": 732, "children": [735], "start_point": {"row": 217, "column": 15}, "end_point": {"row": 217, "column": 32}}, {"id": 735, "type": "field_expression", "text": "hdr.ident.magic", "parent": 734, "children": [736, 739], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 31}}, {"id": 736, "type": "field_expression", "text": "hdr.ident", "parent": 735, "children": [737, 738], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 25}}, {"id": 737, "type": "identifier", "text": "hdr", "parent": 736, "children": [], "start_point": {"row": 217, "column": 16}, "end_point": {"row": 217, "column": 19}}, {"id": 738, "type": "field_identifier", "text": "ident", "parent": 736, "children": [], "start_point": {"row": 217, "column": 20}, "end_point": {"row": 217, "column": 25}}, {"id": 739, "type": "field_identifier", "text": "magic", "parent": 735, "children": [], "start_point": {"row": 217, "column": 26}, "end_point": {"row": 217, "column": 31}}, {"id": 740, "type": "return_statement", "text": "return -EINVAL;", "parent": 714, "children": [741], "start_point": {"row": 218, "column": 2}, "end_point": {"row": 218, "column": 17}}, {"id": 741, "type": "unary_expression", "text": "-EINVAL", "parent": 740, "children": [742, 743], "start_point": {"row": 218, "column": 9}, "end_point": {"row": 218, "column": 16}}, {"id": 742, "type": "-", "text": "-", "parent": 741, "children": [], "start_point": {"row": 218, "column": 9}, "end_point": {"row": 218, "column": 10}}, {"id": 743, "type": "identifier", "text": "EINVAL", "parent": 741, "children": [], "start_point": {"row": 218, "column": 10}, "end_point": {"row": 218, "column": 16}}, {"id": 744, "type": "switch_statement", "text": "switch (hdr.ident.class) {\n\tcase ELF_CLASS_32:\n\t\terr = elf32_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;\n\tcase ELF_CLASS_64:\n\t\terr = elf64_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;\n\tdefault:\n\t\tpr_debug(\"invalid ELF class %i\\n\", hdr.ident.class);\n\t\terr = -EINVAL;\n\t}", "parent": 639, "children": [745, 746], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 231, "column": 2}}, {"id": 745, "type": "switch", "text": "switch", "parent": 744, "children": [], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 221, "column": 7}}, {"id": 746, "type": "parenthesized_expression", "text": "(hdr.ident.class)", "parent": 744, "children": [747], "start_point": {"row": 221, "column": 8}, "end_point": {"row": 221, "column": 25}}, {"id": 747, "type": "field_expression", "text": "hdr.ident.class", "parent": 746, "children": [748], "start_point": {"row": 221, "column": 9}, "end_point": {"row": 221, "column": 24}}, {"id": 748, "type": "field_expression", "text": "hdr.ident", "parent": 747, "children": [749, 750], "start_point": {"row": 221, "column": 9}, "end_point": {"row": 221, "column": 18}}, {"id": 749, "type": "identifier", "text": "hdr", "parent": 748, "children": [], "start_point": {"row": 221, "column": 9}, "end_point": {"row": 221, "column": 12}}, {"id": 750, "type": "field_identifier", "text": "ident", "parent": 748, "children": [], "start_point": {"row": 221, "column": 13}, "end_point": {"row": 221, "column": 18}}, {"id": 751, "type": "case_statement", "text": "case ELF_CLASS_32:\n\t\terr = elf32_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;", "parent": 744, "children": [752, 753, 765], "start_point": {"row": 222, "column": 1}, "end_point": {"row": 224, "column": 8}}, {"id": 752, "type": "case", "text": "case", "parent": 751, "children": [], "start_point": {"row": 222, "column": 1}, "end_point": {"row": 222, "column": 5}}, {"id": 753, "type": "identifier", "text": "ELF_CLASS_32", "parent": 751, "children": [], "start_point": {"row": 222, "column": 6}, "end_point": {"row": 222, "column": 18}}, {"id": 754, "type": "assignment_expression", "text": "err = elf32_determine_size(mtd, &hdr, &loader_size)", "parent": 751, "children": [755, 756, 757], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 53}}, {"id": 755, "type": "identifier", "text": "err", "parent": 754, "children": [], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 5}}, {"id": 756, "type": "=", "text": "=", "parent": 754, "children": [], "start_point": {"row": 223, "column": 6}, "end_point": {"row": 223, "column": 7}}, {"id": 757, "type": "call_expression", "text": "elf32_determine_size(mtd, &hdr, &loader_size)", "parent": 754, "children": [758, 759], "start_point": {"row": 223, "column": 8}, "end_point": {"row": 223, "column": 53}}, {"id": 758, "type": "identifier", "text": "elf32_determine_size", "parent": 757, "children": [], "start_point": {"row": 223, "column": 8}, "end_point": {"row": 223, "column": 28}}, {"id": 759, "type": "argument_list", "text": "(mtd, &hdr, &loader_size)", "parent": 757, "children": [760, 761, 763], "start_point": {"row": 223, "column": 28}, "end_point": {"row": 223, "column": 53}}, {"id": 760, "type": "identifier", "text": "mtd", "parent": 759, "children": [], "start_point": {"row": 223, "column": 29}, "end_point": {"row": 223, "column": 32}}, {"id": 761, "type": "pointer_expression", "text": "&hdr", "parent": 759, "children": [762], "start_point": {"row": 223, "column": 34}, "end_point": {"row": 223, "column": 38}}, {"id": 762, "type": "identifier", "text": "hdr", "parent": 761, "children": [], "start_point": {"row": 223, "column": 35}, "end_point": {"row": 223, "column": 38}}, {"id": 763, "type": "pointer_expression", "text": "&loader_size", "parent": 759, "children": [764], "start_point": {"row": 223, "column": 40}, "end_point": {"row": 223, "column": 52}}, {"id": 764, "type": "identifier", "text": "loader_size", "parent": 763, "children": [], "start_point": {"row": 223, "column": 41}, "end_point": {"row": 223, "column": 52}}, {"id": 765, "type": "break_statement", "text": "break;", "parent": 751, "children": [766], "start_point": {"row": 224, "column": 2}, "end_point": {"row": 224, "column": 8}}, {"id": 766, "type": "break", "text": "break", "parent": 765, "children": [], "start_point": {"row": 224, "column": 2}, "end_point": {"row": 224, "column": 7}}, {"id": 767, "type": "case_statement", "text": "case ELF_CLASS_64:\n\t\terr = elf64_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;", "parent": 744, "children": [768, 769, 781], "start_point": {"row": 225, "column": 1}, "end_point": {"row": 227, "column": 8}}, {"id": 768, "type": "case", "text": "case", "parent": 767, "children": [], "start_point": {"row": 225, "column": 1}, "end_point": {"row": 225, "column": 5}}, {"id": 769, "type": "identifier", "text": "ELF_CLASS_64", "parent": 767, "children": [], "start_point": {"row": 225, "column": 6}, "end_point": {"row": 225, "column": 18}}, {"id": 770, "type": "assignment_expression", "text": "err = elf64_determine_size(mtd, &hdr, &loader_size)", "parent": 767, "children": [771, 772, 773], "start_point": {"row": 226, "column": 2}, "end_point": {"row": 226, "column": 53}}, {"id": 771, "type": "identifier", "text": "err", "parent": 770, "children": [], "start_point": {"row": 226, "column": 2}, "end_point": {"row": 226, "column": 5}}, {"id": 772, "type": "=", "text": "=", "parent": 770, "children": [], "start_point": {"row": 226, "column": 6}, "end_point": {"row": 226, "column": 7}}, {"id": 773, "type": "call_expression", "text": "elf64_determine_size(mtd, &hdr, &loader_size)", "parent": 770, "children": [774, 775], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 53}}, {"id": 774, "type": "identifier", "text": "elf64_determine_size", "parent": 773, "children": [], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 28}}, {"id": 775, "type": "argument_list", "text": "(mtd, &hdr, &loader_size)", "parent": 773, "children": [776, 777, 779], "start_point": {"row": 226, "column": 28}, "end_point": {"row": 226, "column": 53}}, {"id": 776, "type": "identifier", "text": "mtd", "parent": 775, "children": [], "start_point": {"row": 226, "column": 29}, "end_point": {"row": 226, "column": 32}}, {"id": 777, "type": "pointer_expression", "text": "&hdr", "parent": 775, "children": [778], "start_point": {"row": 226, "column": 34}, "end_point": {"row": 226, "column": 38}}, {"id": 778, "type": "identifier", "text": "hdr", "parent": 777, "children": [], "start_point": {"row": 226, "column": 35}, "end_point": {"row": 226, "column": 38}}, {"id": 779, "type": "pointer_expression", "text": "&loader_size", "parent": 775, "children": [780], "start_point": {"row": 226, "column": 40}, "end_point": {"row": 226, "column": 52}}, {"id": 780, "type": "identifier", "text": "loader_size", "parent": 779, "children": [], "start_point": {"row": 226, "column": 41}, "end_point": {"row": 226, "column": 52}}, {"id": 781, "type": "break_statement", "text": "break;", "parent": 767, "children": [782], "start_point": {"row": 227, "column": 2}, "end_point": {"row": 227, "column": 8}}, {"id": 782, "type": "break", "text": "break", "parent": 781, "children": [], "start_point": {"row": 227, "column": 2}, "end_point": {"row": 227, "column": 7}}, {"id": 783, "type": "case_statement", "text": "default:\n\t\tpr_debug(\"invalid ELF class %i\\n\", hdr.ident.class);\n\t\terr = -EINVAL;", "parent": 744, "children": [784], "start_point": {"row": 228, "column": 1}, "end_point": {"row": 230, "column": 16}}, {"id": 784, "type": "default", "text": "default", "parent": 783, "children": [], "start_point": {"row": 228, "column": 1}, "end_point": {"row": 228, "column": 8}}, {"id": 785, "type": "call_expression", "text": "pr_debug(\"invalid ELF class %i\\n\", hdr.ident.class)", "parent": 783, "children": [786, 787], "start_point": {"row": 229, "column": 2}, "end_point": {"row": 229, "column": 53}}, {"id": 786, "type": "identifier", "text": "pr_debug", "parent": 785, "children": [], "start_point": {"row": 229, "column": 2}, "end_point": {"row": 229, "column": 10}}, {"id": 787, "type": "argument_list", "text": "(\"invalid ELF class %i\\n\", hdr.ident.class)", "parent": 785, "children": [788, 790], "start_point": {"row": 229, "column": 10}, "end_point": {"row": 229, "column": 53}}, {"id": 788, "type": "string_literal", "text": "\"invalid ELF class %i\\n\"", "parent": 787, "children": [789], "start_point": {"row": 229, "column": 11}, "end_point": {"row": 229, "column": 35}}, {"id": 789, "type": "escape_sequence", "text": "\\n", "parent": 788, "children": [], "start_point": {"row": 229, "column": 32}, "end_point": {"row": 229, "column": 34}}, {"id": 790, "type": "field_expression", "text": "hdr.ident.class", "parent": 787, "children": [791], "start_point": {"row": 229, "column": 37}, "end_point": {"row": 229, "column": 52}}, {"id": 791, "type": "field_expression", "text": "hdr.ident", "parent": 790, "children": [792, 793], "start_point": {"row": 229, "column": 37}, "end_point": {"row": 229, "column": 46}}, {"id": 792, "type": "identifier", "text": "hdr", "parent": 791, "children": [], "start_point": {"row": 229, "column": 37}, "end_point": {"row": 229, "column": 40}}, {"id": 793, "type": "field_identifier", "text": "ident", "parent": 791, "children": [], "start_point": {"row": 229, "column": 41}, "end_point": {"row": 229, "column": 46}}, {"id": 794, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 783, "children": [795, 796, 797], "start_point": {"row": 230, "column": 2}, "end_point": {"row": 230, "column": 15}}, {"id": 795, "type": "identifier", "text": "err", "parent": 794, "children": [], "start_point": {"row": 230, "column": 2}, "end_point": {"row": 230, "column": 5}}, {"id": 796, "type": "=", "text": "=", "parent": 794, "children": [], "start_point": {"row": 230, "column": 6}, "end_point": {"row": 230, "column": 7}}, {"id": 797, "type": "unary_expression", "text": "-EINVAL", "parent": 794, "children": [798, 799], "start_point": {"row": 230, "column": 8}, "end_point": {"row": 230, "column": 15}}, {"id": 798, "type": "-", "text": "-", "parent": 797, "children": [], "start_point": {"row": 230, "column": 8}, "end_point": {"row": 230, "column": 9}}, {"id": 799, "type": "identifier", "text": "EINVAL", "parent": 797, "children": [], "start_point": {"row": 230, "column": 9}, "end_point": {"row": 230, "column": 15}}, {"id": 800, "type": "if_statement", "text": "if (err)\n\t\treturn err;", "parent": 639, "children": [801, 803], "start_point": {"row": 233, "column": 1}, "end_point": {"row": 234, "column": 13}}, {"id": 801, "type": "parenthesized_expression", "text": "(err)", "parent": 800, "children": [802], "start_point": {"row": 233, "column": 4}, "end_point": {"row": 233, "column": 9}}, {"id": 802, "type": "identifier", "text": "err", "parent": 801, "children": [], "start_point": {"row": 233, "column": 5}, "end_point": {"row": 233, "column": 8}}, {"id": 803, "type": "return_statement", "text": "return err;", "parent": 800, "children": [804], "start_point": {"row": 234, "column": 2}, "end_point": {"row": 234, "column": 13}}, {"id": 804, "type": "identifier", "text": "err", "parent": 803, "children": [], "start_point": {"row": 234, "column": 9}, "end_point": {"row": 234, "column": 12}}, {"id": 805, "type": "assignment_expression", "text": "err = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n\t\t\t\t &rootfs_offset, &type)", "parent": 639, "children": [806, 807, 808], "start_point": {"row": 236, "column": 1}, "end_point": {"row": 237, "column": 29}}, {"id": 806, "type": "identifier", "text": "err", "parent": 805, "children": [], "start_point": {"row": 236, "column": 1}, "end_point": {"row": 236, "column": 4}}, {"id": 807, "type": "=", "text": "=", "parent": 805, "children": [], "start_point": {"row": 236, "column": 5}, "end_point": {"row": 236, "column": 6}}, {"id": 808, "type": "call_expression", "text": "mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n\t\t\t\t &rootfs_offset, &type)", "parent": 805, "children": [809, 810], "start_point": {"row": 236, "column": 7}, "end_point": {"row": 237, "column": 29}}, {"id": 809, "type": "identifier", "text": "mtd_find_rootfs_from", "parent": 808, "children": [], "start_point": {"row": 236, "column": 7}, "end_point": {"row": 236, "column": 27}}, {"id": 810, "type": "argument_list", "text": "(mtd, loader_size, mtd->size,\n\t\t\t\t &rootfs_offset, &type)", "parent": 808, "children": [811, 812, 813, 816, 818], "start_point": {"row": 236, "column": 27}, "end_point": {"row": 237, "column": 29}}, {"id": 811, "type": "identifier", "text": "mtd", "parent": 810, "children": [], "start_point": {"row": 236, "column": 28}, "end_point": {"row": 236, "column": 31}}, {"id": 812, "type": "identifier", "text": "loader_size", "parent": 810, "children": [], "start_point": {"row": 236, "column": 33}, "end_point": {"row": 236, "column": 44}}, {"id": 813, "type": "field_expression", "text": "mtd->size", "parent": 810, "children": [814, 815], "start_point": {"row": 236, "column": 46}, "end_point": {"row": 236, "column": 55}}, {"id": 814, "type": "identifier", "text": "mtd", "parent": 813, "children": [], "start_point": {"row": 236, "column": 46}, "end_point": {"row": 236, "column": 49}}, {"id": 815, "type": "field_identifier", "text": "size", "parent": 813, "children": [], "start_point": {"row": 236, "column": 51}, "end_point": {"row": 236, "column": 55}}, {"id": 816, "type": "pointer_expression", "text": "&rootfs_offset", "parent": 810, "children": [817], "start_point": {"row": 237, "column": 7}, "end_point": {"row": 237, "column": 21}}, {"id": 817, "type": "identifier", "text": "rootfs_offset", "parent": 816, "children": [], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 21}}, {"id": 818, "type": "pointer_expression", "text": "&type", "parent": 810, "children": [819], "start_point": {"row": 237, "column": 23}, "end_point": {"row": 237, "column": 28}}, {"id": 819, "type": "identifier", "text": "type", "parent": 818, "children": [], "start_point": {"row": 237, "column": 24}, "end_point": {"row": 237, "column": 28}}, {"id": 820, "type": "if_statement", "text": "if (err)\n\t\treturn err;", "parent": 639, "children": [821, 823], "start_point": {"row": 238, "column": 1}, "end_point": {"row": 239, "column": 13}}, {"id": 821, "type": "parenthesized_expression", "text": "(err)", "parent": 820, "children": [822], "start_point": {"row": 238, "column": 4}, "end_point": {"row": 238, "column": 9}}, {"id": 822, "type": "identifier", "text": "err", "parent": 821, "children": [], "start_point": {"row": 238, "column": 5}, "end_point": {"row": 238, "column": 8}}, {"id": 823, "type": "return_statement", "text": "return err;", "parent": 820, "children": [824], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 13}}, {"id": 824, "type": "identifier", "text": "err", "parent": 823, "children": [], "start_point": {"row": 239, "column": 9}, "end_point": {"row": 239, "column": 12}}, {"id": 825, "type": "if_statement", "text": "if (rootfs_offset == mtd->size) {\n\t\tpr_debug(\"no rootfs found in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn -ENODEV;\n\t}", "parent": 639, "children": [826], "start_point": {"row": 241, "column": 1}, "end_point": {"row": 244, "column": 2}}, {"id": 826, "type": "parenthesized_expression", "text": "(rootfs_offset == mtd->size)", "parent": 825, "children": [827], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 32}}, {"id": 827, "type": "binary_expression", "text": "rootfs_offset == mtd->size", "parent": 826, "children": [828, 829, 830], "start_point": {"row": 241, "column": 5}, "end_point": {"row": 241, "column": 31}}, {"id": 828, "type": "identifier", "text": "rootfs_offset", "parent": 827, "children": [], "start_point": {"row": 241, "column": 5}, "end_point": {"row": 241, "column": 18}}, {"id": 829, "type": "==", "text": "==", "parent": 827, "children": [], "start_point": {"row": 241, "column": 19}, "end_point": {"row": 241, "column": 21}}, {"id": 830, "type": "field_expression", "text": "mtd->size", "parent": 827, "children": [831, 832], "start_point": {"row": 241, "column": 22}, "end_point": {"row": 241, "column": 31}}, {"id": 831, "type": "identifier", "text": "mtd", "parent": 830, "children": [], "start_point": {"row": 241, "column": 22}, "end_point": {"row": 241, "column": 25}}, {"id": 832, "type": "field_identifier", "text": "size", "parent": 830, "children": [], "start_point": {"row": 241, "column": 27}, "end_point": {"row": 241, "column": 31}}, {"id": 833, "type": "call_expression", "text": "pr_debug(\"no rootfs found in \\\"%s\\\"\\n\", mtd->name)", "parent": 825, "children": [834, 835], "start_point": {"row": 242, "column": 2}, "end_point": {"row": 242, "column": 52}}, {"id": 834, "type": "identifier", "text": "pr_debug", "parent": 833, "children": [], "start_point": {"row": 242, "column": 2}, "end_point": {"row": 242, "column": 10}}, {"id": 835, "type": "argument_list", "text": "(\"no rootfs found in \\\"%s\\\"\\n\", mtd->name)", "parent": 833, "children": [836, 840], "start_point": {"row": 242, "column": 10}, "end_point": {"row": 242, "column": 52}}, {"id": 836, "type": "string_literal", "text": "\"no rootfs found in \\\"%s\\\"\\n\"", "parent": 835, "children": [837, 838, 839], "start_point": {"row": 242, "column": 11}, "end_point": {"row": 242, "column": 40}}, {"id": 837, "type": "escape_sequence", "text": "\\\"", "parent": 836, "children": [], "start_point": {"row": 242, "column": 31}, "end_point": {"row": 242, "column": 33}}, {"id": 838, "type": "escape_sequence", "text": "\\\"", "parent": 836, "children": [], "start_point": {"row": 242, "column": 35}, "end_point": {"row": 242, "column": 37}}, {"id": 839, "type": "escape_sequence", "text": "\\n", "parent": 836, "children": [], "start_point": {"row": 242, "column": 37}, "end_point": {"row": 242, "column": 39}}, {"id": 840, "type": "field_expression", "text": "mtd->name", "parent": 835, "children": [841, 842], "start_point": {"row": 242, "column": 42}, "end_point": {"row": 242, "column": 51}}, {"id": 841, "type": "identifier", "text": "mtd", "parent": 840, "children": [], "start_point": {"row": 242, "column": 42}, "end_point": {"row": 242, "column": 45}}, {"id": 842, "type": "field_identifier", "text": "name", "parent": 840, "children": [], "start_point": {"row": 242, "column": 47}, "end_point": {"row": 242, "column": 51}}, {"id": 843, "type": "return_statement", "text": "return -ENODEV;", "parent": 825, "children": [844], "start_point": {"row": 243, "column": 2}, "end_point": {"row": 243, "column": 17}}, {"id": 844, "type": "unary_expression", "text": "-ENODEV", "parent": 843, "children": [845, 846], "start_point": {"row": 243, "column": 9}, "end_point": {"row": 243, "column": 16}}, {"id": 845, "type": "-", "text": "-", "parent": 844, "children": [], "start_point": {"row": 243, "column": 9}, "end_point": {"row": 243, "column": 10}}, {"id": 846, "type": "identifier", "text": "ENODEV", "parent": 844, "children": [], "start_point": {"row": 243, "column": 10}, "end_point": {"row": 243, "column": 16}}, {"id": 847, "type": "assignment_expression", "text": "parts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL)", "parent": 639, "children": [848, 849, 850], "start_point": {"row": 246, "column": 1}, "end_point": {"row": 246, "column": 59}}, {"id": 848, "type": "identifier", "text": "parts", "parent": 847, "children": [], "start_point": {"row": 246, "column": 1}, "end_point": {"row": 246, "column": 6}}, {"id": 849, "type": "=", "text": "=", "parent": 847, "children": [], "start_point": {"row": 246, "column": 7}, "end_point": {"row": 246, "column": 8}}, {"id": 850, "type": "call_expression", "text": "kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL)", "parent": 847, "children": [851, 852], "start_point": {"row": 246, "column": 9}, "end_point": {"row": 246, "column": 59}}, {"id": 851, "type": "identifier", "text": "kzalloc", "parent": 850, "children": [], "start_point": {"row": 246, "column": 9}, "end_point": {"row": 246, "column": 16}}, {"id": 852, "type": "argument_list", "text": "(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL)", "parent": 850, "children": [853, 861], "start_point": {"row": 246, "column": 16}, "end_point": {"row": 246, "column": 59}}, {"id": 853, "type": "binary_expression", "text": "ELF_NR_PARTS * sizeof(*parts)", "parent": 852, "children": [854, 855, 856], "start_point": {"row": 246, "column": 17}, "end_point": {"row": 246, "column": 46}}, {"id": 854, "type": "identifier", "text": "ELF_NR_PARTS", "parent": 853, "children": [], "start_point": {"row": 246, "column": 17}, "end_point": {"row": 246, "column": 29}}, {"id": 855, "type": "*", "text": "*", "parent": 853, "children": [], "start_point": {"row": 246, "column": 30}, "end_point": {"row": 246, "column": 31}}, {"id": 856, "type": "sizeof_expression", "text": "sizeof(*parts)", "parent": 853, "children": [857], "start_point": {"row": 246, "column": 32}, "end_point": {"row": 246, "column": 46}}, {"id": 857, "type": "parenthesized_expression", "text": "(*parts)", "parent": 856, "children": [858], "start_point": {"row": 246, "column": 38}, "end_point": {"row": 246, "column": 46}}, {"id": 858, "type": "pointer_expression", "text": "*parts", "parent": 857, "children": [859, 860], "start_point": {"row": 246, "column": 39}, "end_point": {"row": 246, "column": 45}}, {"id": 859, "type": "*", "text": "*", "parent": 858, "children": [], "start_point": {"row": 246, "column": 39}, "end_point": {"row": 246, "column": 40}}, {"id": 860, "type": "identifier", "text": "parts", "parent": 858, "children": [], "start_point": {"row": 246, "column": 40}, "end_point": {"row": 246, "column": 45}}, {"id": 861, "type": "identifier", "text": "GFP_KERNEL", "parent": 852, "children": [], "start_point": {"row": 246, "column": 48}, "end_point": {"row": 246, "column": 58}}, {"id": 862, "type": "if_statement", "text": "if (!parts)\n\t\treturn -ENOMEM;", "parent": 639, "children": [863, 867], "start_point": {"row": 247, "column": 1}, "end_point": {"row": 248, "column": 17}}, {"id": 863, "type": "parenthesized_expression", "text": "(!parts)", "parent": 862, "children": [864], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 12}}, {"id": 864, "type": "unary_expression", "text": "!parts", "parent": 863, "children": [865, 866], "start_point": {"row": 247, "column": 5}, "end_point": {"row": 247, "column": 11}}, {"id": 865, "type": "!", "text": "!", "parent": 864, "children": [], "start_point": {"row": 247, "column": 5}, "end_point": {"row": 247, "column": 6}}, {"id": 866, "type": "identifier", "text": "parts", "parent": 864, "children": [], "start_point": {"row": 247, "column": 6}, "end_point": {"row": 247, "column": 11}}, {"id": 867, "type": "return_statement", "text": "return -ENOMEM;", "parent": 862, "children": [868], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 17}}, {"id": 868, "type": "unary_expression", "text": "-ENOMEM", "parent": 867, "children": [869, 870], "start_point": {"row": 248, "column": 9}, "end_point": {"row": 248, "column": 16}}, {"id": 869, "type": "-", "text": "-", "parent": 868, "children": [], "start_point": {"row": 248, "column": 9}, "end_point": {"row": 248, "column": 10}}, {"id": 870, "type": "identifier", "text": "ENOMEM", "parent": 868, "children": [], "start_point": {"row": 248, "column": 10}, "end_point": {"row": 248, "column": 16}}, {"id": 871, "type": "assignment_expression", "text": "parts[0].name = KERNEL_PART_NAME", "parent": 639, "children": [872, 877, 878], "start_point": {"row": 250, "column": 1}, "end_point": {"row": 250, "column": 33}}, {"id": 872, "type": "field_expression", "text": "parts[0].name", "parent": 871, "children": [873, 876], "start_point": {"row": 250, "column": 1}, "end_point": {"row": 250, "column": 14}}, {"id": 873, "type": "subscript_expression", "text": "parts[0]", "parent": 872, "children": [874, 875], "start_point": {"row": 250, "column": 1}, "end_point": {"row": 250, "column": 9}}, {"id": 874, "type": "identifier", "text": "parts", "parent": 873, "children": [], "start_point": {"row": 250, "column": 1}, "end_point": {"row": 250, "column": 6}}, {"id": 875, "type": "number_literal", "text": "0", "parent": 873, "children": [], "start_point": {"row": 250, "column": 7}, "end_point": {"row": 250, "column": 8}}, {"id": 876, "type": "field_identifier", "text": "name", "parent": 872, "children": [], "start_point": {"row": 250, "column": 10}, "end_point": {"row": 250, "column": 14}}, {"id": 877, "type": "=", "text": "=", "parent": 871, "children": [], "start_point": {"row": 250, "column": 15}, "end_point": {"row": 250, "column": 16}}, {"id": 878, "type": "identifier", "text": "KERNEL_PART_NAME", "parent": 871, "children": [], "start_point": {"row": 250, "column": 17}, "end_point": {"row": 250, "column": 33}}, {"id": 879, "type": "assignment_expression", "text": "parts[0].offset = 0", "parent": 639, "children": [880, 885, 886], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 20}}, {"id": 880, "type": "field_expression", "text": "parts[0].offset", "parent": 879, "children": [881, 884], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 16}}, {"id": 881, "type": "subscript_expression", "text": "parts[0]", "parent": 880, "children": [882, 883], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 9}}, {"id": 882, "type": "identifier", "text": "parts", "parent": 881, "children": [], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 6}}, {"id": 883, "type": "number_literal", "text": "0", "parent": 881, "children": [], "start_point": {"row": 251, "column": 7}, "end_point": {"row": 251, "column": 8}}, {"id": 884, "type": "field_identifier", "text": "offset", "parent": 880, "children": [], "start_point": {"row": 251, "column": 10}, "end_point": {"row": 251, "column": 16}}, {"id": 885, "type": "=", "text": "=", "parent": 879, "children": [], "start_point": {"row": 251, "column": 17}, "end_point": {"row": 251, "column": 18}}, {"id": 886, "type": "number_literal", "text": "0", "parent": 879, "children": [], "start_point": {"row": 251, "column": 19}, "end_point": {"row": 251, "column": 20}}, {"id": 887, "type": "assignment_expression", "text": "parts[0].size = rootfs_offset", "parent": 639, "children": [888, 893, 894], "start_point": {"row": 252, "column": 1}, "end_point": {"row": 252, "column": 30}}, {"id": 888, "type": "field_expression", "text": "parts[0].size", "parent": 887, "children": [889, 892], "start_point": {"row": 252, "column": 1}, "end_point": {"row": 252, "column": 14}}, {"id": 889, "type": "subscript_expression", "text": "parts[0]", "parent": 888, "children": [890, 891], "start_point": {"row": 252, "column": 1}, "end_point": {"row": 252, "column": 9}}, {"id": 890, "type": "identifier", "text": "parts", "parent": 889, "children": [], "start_point": {"row": 252, "column": 1}, "end_point": {"row": 252, "column": 6}}, {"id": 891, "type": "number_literal", "text": "0", "parent": 889, "children": [], "start_point": {"row": 252, "column": 7}, "end_point": {"row": 252, "column": 8}}, {"id": 892, "type": "field_identifier", "text": "size", "parent": 888, "children": [], "start_point": {"row": 252, "column": 10}, "end_point": {"row": 252, "column": 14}}, {"id": 893, "type": "=", "text": "=", "parent": 887, "children": [], "start_point": {"row": 252, "column": 15}, "end_point": {"row": 252, "column": 16}}, {"id": 894, "type": "identifier", "text": "rootfs_offset", "parent": 887, "children": [], "start_point": {"row": 252, "column": 17}, "end_point": {"row": 252, "column": 30}}, {"id": 895, "type": "if_statement", "text": "if (type == MTDSPLIT_PART_TYPE_UBI)\n\t\tparts[1].name = UBI_PART_NAME;\n\telse\n\t\tparts[1].name = ROOTFS_PART_NAME;", "parent": 639, "children": [896, 909], "start_point": {"row": 254, "column": 1}, "end_point": {"row": 257, "column": 35}}, {"id": 896, "type": "parenthesized_expression", "text": "(type == MTDSPLIT_PART_TYPE_UBI)", "parent": 895, "children": [897], "start_point": {"row": 254, "column": 4}, "end_point": {"row": 254, "column": 36}}, {"id": 897, "type": "binary_expression", "text": "type == MTDSPLIT_PART_TYPE_UBI", "parent": 896, "children": [898, 899, 900], "start_point": {"row": 254, "column": 5}, "end_point": {"row": 254, "column": 35}}, {"id": 898, "type": "identifier", "text": "type", "parent": 897, "children": [], "start_point": {"row": 254, "column": 5}, "end_point": {"row": 254, "column": 9}}, {"id": 899, "type": "==", "text": "==", "parent": 897, "children": [], "start_point": {"row": 254, "column": 10}, "end_point": {"row": 254, "column": 12}}, {"id": 900, "type": "identifier", "text": "MTDSPLIT_PART_TYPE_UBI", "parent": 897, "children": [], "start_point": {"row": 254, "column": 13}, "end_point": {"row": 254, "column": 35}}, {"id": 901, "type": "assignment_expression", "text": "parts[1].name = UBI_PART_NAME", "parent": 895, "children": [902, 907, 908], "start_point": {"row": 255, "column": 2}, "end_point": {"row": 255, "column": 31}}, {"id": 902, "type": "field_expression", "text": "parts[1].name", "parent": 901, "children": [903, 906], "start_point": {"row": 255, "column": 2}, "end_point": {"row": 255, "column": 15}}, {"id": 903, "type": "subscript_expression", "text": "parts[1]", "parent": 902, "children": [904, 905], "start_point": {"row": 255, "column": 2}, "end_point": {"row": 255, "column": 10}}, {"id": 904, "type": "identifier", "text": "parts", "parent": 903, "children": [], "start_point": {"row": 255, "column": 2}, "end_point": {"row": 255, "column": 7}}, {"id": 905, "type": "number_literal", "text": "1", "parent": 903, "children": [], "start_point": {"row": 255, "column": 8}, "end_point": {"row": 255, "column": 9}}, {"id": 906, "type": "field_identifier", "text": "name", "parent": 902, "children": [], "start_point": {"row": 255, "column": 11}, "end_point": {"row": 255, "column": 15}}, {"id": 907, "type": "=", "text": "=", "parent": 901, "children": [], "start_point": {"row": 255, "column": 16}, "end_point": {"row": 255, "column": 17}}, {"id": 908, "type": "identifier", "text": "UBI_PART_NAME", "parent": 901, "children": [], "start_point": {"row": 255, "column": 18}, "end_point": {"row": 255, "column": 31}}, {"id": 909, "type": "else_clause", "text": "else\n\t\tparts[1].name = ROOTFS_PART_NAME;", "parent": 895, "children": [], "start_point": {"row": 256, "column": 1}, "end_point": {"row": 257, "column": 35}}, {"id": 910, "type": "assignment_expression", "text": "parts[1].name = ROOTFS_PART_NAME", "parent": 909, "children": [911, 916, 917], "start_point": {"row": 257, "column": 2}, "end_point": {"row": 257, "column": 34}}, {"id": 911, "type": "field_expression", "text": "parts[1].name", "parent": 910, "children": [912, 915], "start_point": {"row": 257, "column": 2}, "end_point": {"row": 257, "column": 15}}, {"id": 912, "type": "subscript_expression", "text": "parts[1]", "parent": 911, "children": [913, 914], "start_point": {"row": 257, "column": 2}, "end_point": {"row": 257, "column": 10}}, {"id": 913, "type": "identifier", "text": "parts", "parent": 912, "children": [], "start_point": {"row": 257, "column": 2}, "end_point": {"row": 257, "column": 7}}, {"id": 914, "type": "number_literal", "text": "1", "parent": 912, "children": [], "start_point": {"row": 257, "column": 8}, "end_point": {"row": 257, "column": 9}}, {"id": 915, "type": "field_identifier", "text": "name", "parent": 911, "children": [], "start_point": {"row": 257, "column": 11}, "end_point": {"row": 257, "column": 15}}, {"id": 916, "type": "=", "text": "=", "parent": 910, "children": [], "start_point": {"row": 257, "column": 16}, "end_point": {"row": 257, "column": 17}}, {"id": 917, "type": "identifier", "text": "ROOTFS_PART_NAME", "parent": 910, "children": [], "start_point": {"row": 257, "column": 18}, "end_point": {"row": 257, "column": 34}}, {"id": 918, "type": "assignment_expression", "text": "parts[1].offset = rootfs_offset", "parent": 639, "children": [919, 924, 925], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 32}}, {"id": 919, "type": "field_expression", "text": "parts[1].offset", "parent": 918, "children": [920, 923], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 16}}, {"id": 920, "type": "subscript_expression", "text": "parts[1]", "parent": 919, "children": [921, 922], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 9}}, {"id": 921, "type": "identifier", "text": "parts", "parent": 920, "children": [], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 6}}, {"id": 922, "type": "number_literal", "text": "1", "parent": 920, "children": [], "start_point": {"row": 258, "column": 7}, "end_point": {"row": 258, "column": 8}}, {"id": 923, "type": "field_identifier", "text": "offset", "parent": 919, "children": [], "start_point": {"row": 258, "column": 10}, "end_point": {"row": 258, "column": 16}}, {"id": 924, "type": "=", "text": "=", "parent": 918, "children": [], "start_point": {"row": 258, "column": 17}, "end_point": {"row": 258, "column": 18}}, {"id": 925, "type": "identifier", "text": "rootfs_offset", "parent": 918, "children": [], "start_point": {"row": 258, "column": 19}, "end_point": {"row": 258, "column": 32}}, {"id": 926, "type": "assignment_expression", "text": "parts[1].size = mtd->size - rootfs_offset", "parent": 639, "children": [927, 932, 933], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 42}}, {"id": 927, "type": "field_expression", "text": "parts[1].size", "parent": 926, "children": [928, 931], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 14}}, {"id": 928, "type": "subscript_expression", "text": "parts[1]", "parent": 927, "children": [929, 930], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 9}}, {"id": 929, "type": "identifier", "text": "parts", "parent": 928, "children": [], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 6}}, {"id": 930, "type": "number_literal", "text": "1", "parent": 928, "children": [], "start_point": {"row": 259, "column": 7}, "end_point": {"row": 259, "column": 8}}, {"id": 931, "type": "field_identifier", "text": "size", "parent": 927, "children": [], "start_point": {"row": 259, "column": 10}, "end_point": {"row": 259, "column": 14}}, {"id": 932, "type": "=", "text": "=", "parent": 926, "children": [], "start_point": {"row": 259, "column": 15}, "end_point": {"row": 259, "column": 16}}, {"id": 933, "type": "binary_expression", "text": "mtd->size - rootfs_offset", "parent": 926, "children": [934, 937, 938], "start_point": {"row": 259, "column": 17}, "end_point": {"row": 259, "column": 42}}, {"id": 934, "type": "field_expression", "text": "mtd->size", "parent": 933, "children": [935, 936], "start_point": {"row": 259, "column": 17}, "end_point": {"row": 259, "column": 26}}, {"id": 935, "type": "identifier", "text": "mtd", "parent": 934, "children": [], "start_point": {"row": 259, "column": 17}, "end_point": {"row": 259, "column": 20}}, {"id": 936, "type": "field_identifier", "text": "size", "parent": 934, "children": [], "start_point": {"row": 259, "column": 22}, "end_point": {"row": 259, "column": 26}}, {"id": 937, "type": "-", "text": "-", "parent": 933, "children": [], "start_point": {"row": 259, "column": 27}, "end_point": {"row": 259, "column": 28}}, {"id": 938, "type": "identifier", "text": "rootfs_offset", "parent": 933, "children": [], "start_point": {"row": 259, "column": 29}, "end_point": {"row": 259, "column": 42}}, {"id": 939, "type": "assignment_expression", "text": "*pparts = parts", "parent": 639, "children": [940, 943, 944], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 16}}, {"id": 940, "type": "pointer_expression", "text": "*pparts", "parent": 939, "children": [941, 942], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 8}}, {"id": 941, "type": "*", "text": "*", "parent": 940, "children": [], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 2}}, {"id": 942, "type": "identifier", "text": "pparts", "parent": 940, "children": [], "start_point": {"row": 261, "column": 2}, "end_point": {"row": 261, "column": 8}}, {"id": 943, "type": "=", "text": "=", "parent": 939, "children": [], "start_point": {"row": 261, "column": 9}, "end_point": {"row": 261, "column": 10}}, {"id": 944, "type": "identifier", "text": "parts", "parent": 939, "children": [], "start_point": {"row": 261, "column": 11}, "end_point": {"row": 261, "column": 16}}, {"id": 945, "type": "return_statement", "text": "return ELF_NR_PARTS;", "parent": 639, "children": [946], "start_point": {"row": 262, "column": 1}, "end_point": {"row": 262, "column": 21}}, {"id": 946, "type": "identifier", "text": "ELF_NR_PARTS", "parent": 945, "children": [], "start_point": {"row": 262, "column": 8}, "end_point": {"row": 262, "column": 20}}, {"id": 947, "type": "declaration", "text": "static const struct of_device_id mtdsplit_elf_of_match_table[] = {\n\t{ .compatible = \"openwrt,elf\" },\n\t{},\n};", "parent": null, "children": [948, 951], "start_point": {"row": 265, "column": 0}, "end_point": {"row": 268, "column": 2}}, {"id": 948, "type": "struct_specifier", "text": "struct of_device_id", "parent": 947, "children": [949, 950], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 32}}, {"id": 949, "type": "struct", "text": "struct", "parent": 948, "children": [], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 19}}, {"id": 950, "type": "type_identifier", "text": "of_device_id", "parent": 948, "children": [], "start_point": {"row": 265, "column": 20}, "end_point": {"row": 265, "column": 32}}, {"id": 951, "type": "init_declarator", "text": "mtdsplit_elf_of_match_table[] = {\n\t{ .compatible = \"openwrt,elf\" },\n\t{},\n}", "parent": 947, "children": [952, 954, 955], "start_point": {"row": 265, "column": 33}, "end_point": {"row": 268, "column": 1}}, {"id": 952, "type": "array_declarator", "text": "mtdsplit_elf_of_match_table[]", "parent": 951, "children": [953], "start_point": {"row": 265, "column": 33}, "end_point": {"row": 265, "column": 62}}, {"id": 953, "type": "identifier", "text": "mtdsplit_elf_of_match_table", "parent": 952, "children": [], "start_point": {"row": 265, "column": 33}, "end_point": {"row": 265, "column": 60}}, {"id": 954, "type": "=", "text": "=", "parent": 951, "children": [], "start_point": {"row": 265, "column": 63}, "end_point": {"row": 265, "column": 64}}, {"id": 955, "type": "initializer_list", "text": "{\n\t{ .compatible = \"openwrt,elf\" },\n\t{},\n}", "parent": 951, "children": [956, 962], "start_point": {"row": 265, "column": 65}, "end_point": {"row": 268, "column": 1}}, {"id": 956, "type": "initializer_list", "text": "{ .compatible = \"openwrt,elf\" }", "parent": 955, "children": [957], "start_point": {"row": 266, "column": 1}, "end_point": {"row": 266, "column": 32}}, {"id": 957, "type": "initializer_pair", "text": ".compatible = \"openwrt,elf\"", "parent": 956, "children": [958, 960, 961], "start_point": {"row": 266, "column": 3}, "end_point": {"row": 266, "column": 30}}, {"id": 958, "type": "field_designator", "text": ".compatible", "parent": 957, "children": [959], "start_point": {"row": 266, "column": 3}, "end_point": {"row": 266, "column": 14}}, {"id": 959, "type": "field_identifier", "text": "compatible", "parent": 958, "children": [], "start_point": {"row": 266, "column": 4}, "end_point": {"row": 266, "column": 14}}, {"id": 960, "type": "=", "text": "=", "parent": 957, "children": [], "start_point": {"row": 266, "column": 15}, "end_point": {"row": 266, "column": 16}}, {"id": 961, "type": "string_literal", "text": "\"openwrt,elf\"", "parent": 957, "children": [], "start_point": {"row": 266, "column": 17}, "end_point": {"row": 266, "column": 30}}, {"id": 962, "type": "initializer_list", "text": "{}", "parent": 955, "children": [], "start_point": {"row": 267, "column": 1}, "end_point": {"row": 267, "column": 3}}, {"id": 963, "type": "call_expression", "text": "MODULE_DEVICE_TABLE(of, mtdsplit_elf_of_match_table)", "parent": null, "children": [964, 965], "start_point": {"row": 269, "column": 0}, "end_point": {"row": 269, "column": 52}}, {"id": 964, "type": "identifier", "text": "MODULE_DEVICE_TABLE", "parent": 963, "children": [], "start_point": {"row": 269, "column": 0}, "end_point": {"row": 269, "column": 19}}, {"id": 965, "type": "argument_list", "text": "(of, mtdsplit_elf_of_match_table)", "parent": 963, "children": [966, 967], "start_point": {"row": 269, "column": 19}, "end_point": {"row": 269, "column": 52}}, {"id": 966, "type": "identifier", "text": "of", "parent": 965, "children": [], "start_point": {"row": 269, "column": 20}, "end_point": {"row": 269, "column": 22}}, {"id": 967, "type": "identifier", "text": "mtdsplit_elf_of_match_table", "parent": 965, "children": [], "start_point": {"row": 269, "column": 24}, "end_point": {"row": 269, "column": 51}}, {"id": 968, "type": "declaration", "text": "static struct mtd_part_parser mtdsplit_elf_parser = {\n\t.owner = THIS_MODULE,\n\t.name = \"elf-loader-fw\",\n\t.of_match_table = mtdsplit_elf_of_match_table,\n\t.parse_fn = mtdsplit_parse_elf,\n\t.type = MTD_PARSER_TYPE_FIRMWARE,\n};", "parent": null, "children": [969, 972], "start_point": {"row": 271, "column": 0}, "end_point": {"row": 277, "column": 2}}, {"id": 969, "type": "struct_specifier", "text": "struct mtd_part_parser", "parent": 968, "children": [970, 971], "start_point": {"row": 271, "column": 7}, "end_point": {"row": 271, "column": 29}}, {"id": 970, "type": "struct", "text": "struct", "parent": 969, "children": [], "start_point": {"row": 271, "column": 7}, "end_point": {"row": 271, "column": 13}}, {"id": 971, "type": "type_identifier", "text": "mtd_part_parser", "parent": 969, "children": [], "start_point": {"row": 271, "column": 14}, "end_point": {"row": 271, "column": 29}}, {"id": 972, "type": "init_declarator", "text": "mtdsplit_elf_parser = {\n\t.owner = THIS_MODULE,\n\t.name = \"elf-loader-fw\",\n\t.of_match_table = mtdsplit_elf_of_match_table,\n\t.parse_fn = mtdsplit_parse_elf,\n\t.type = MTD_PARSER_TYPE_FIRMWARE,\n}", "parent": 968, "children": [973, 974, 975], "start_point": {"row": 271, "column": 30}, "end_point": {"row": 277, "column": 1}}, {"id": 973, "type": "identifier", "text": "mtdsplit_elf_parser", "parent": 972, "children": [], "start_point": {"row": 271, "column": 30}, "end_point": {"row": 271, "column": 49}}, {"id": 974, "type": "=", "text": "=", "parent": 972, "children": [], "start_point": {"row": 271, "column": 50}, "end_point": {"row": 271, "column": 51}}, {"id": 975, "type": "initializer_list", "text": "{\n\t.owner = THIS_MODULE,\n\t.name = \"elf-loader-fw\",\n\t.of_match_table = mtdsplit_elf_of_match_table,\n\t.parse_fn = mtdsplit_parse_elf,\n\t.type = MTD_PARSER_TYPE_FIRMWARE,\n}", "parent": 972, "children": [976, 981, 986, 991, 996], "start_point": {"row": 271, "column": 52}, "end_point": {"row": 277, "column": 1}}, {"id": 976, "type": "initializer_pair", "text": ".owner = THIS_MODULE", "parent": 975, "children": [977, 979, 980], "start_point": {"row": 272, "column": 1}, "end_point": {"row": 272, "column": 21}}, {"id": 977, "type": "field_designator", "text": ".owner", "parent": 976, "children": [978], "start_point": {"row": 272, "column": 1}, "end_point": {"row": 272, "column": 7}}, {"id": 978, "type": "field_identifier", "text": "owner", "parent": 977, "children": [], "start_point": {"row": 272, "column": 2}, "end_point": {"row": 272, "column": 7}}, {"id": 979, "type": "=", "text": "=", "parent": 976, "children": [], "start_point": {"row": 272, "column": 8}, "end_point": {"row": 272, "column": 9}}, {"id": 980, "type": "identifier", "text": "THIS_MODULE", "parent": 976, "children": [], "start_point": {"row": 272, "column": 10}, "end_point": {"row": 272, "column": 21}}, {"id": 981, "type": "initializer_pair", "text": ".name = \"elf-loader-fw\"", "parent": 975, "children": [982, 984, 985], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 273, "column": 24}}, {"id": 982, "type": "field_designator", "text": ".name", "parent": 981, "children": [983], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 273, "column": 6}}, {"id": 983, "type": "field_identifier", "text": "name", "parent": 982, "children": [], "start_point": {"row": 273, "column": 2}, "end_point": {"row": 273, "column": 6}}, {"id": 984, "type": "=", "text": "=", "parent": 981, "children": [], "start_point": {"row": 273, "column": 7}, "end_point": {"row": 273, "column": 8}}, {"id": 985, "type": "string_literal", "text": "\"elf-loader-fw\"", "parent": 981, "children": [], "start_point": {"row": 273, "column": 9}, "end_point": {"row": 273, "column": 24}}, {"id": 986, "type": "initializer_pair", "text": ".of_match_table = mtdsplit_elf_of_match_table", "parent": 975, "children": [987, 989, 990], "start_point": {"row": 274, "column": 1}, "end_point": {"row": 274, "column": 46}}, {"id": 987, "type": "field_designator", "text": ".of_match_table", "parent": 986, "children": [988], "start_point": {"row": 274, "column": 1}, "end_point": {"row": 274, "column": 16}}, {"id": 988, "type": "field_identifier", "text": "of_match_table", "parent": 987, "children": [], "start_point": {"row": 274, "column": 2}, "end_point": {"row": 274, "column": 16}}, {"id": 989, "type": "=", "text": "=", "parent": 986, "children": [], "start_point": {"row": 274, "column": 17}, "end_point": {"row": 274, "column": 18}}, {"id": 990, "type": "identifier", "text": "mtdsplit_elf_of_match_table", "parent": 986, "children": [], "start_point": {"row": 274, "column": 19}, "end_point": {"row": 274, "column": 46}}, {"id": 991, "type": "initializer_pair", "text": ".parse_fn = mtdsplit_parse_elf", "parent": 975, "children": [992, 994, 995], "start_point": {"row": 275, "column": 1}, "end_point": {"row": 275, "column": 31}}, {"id": 992, "type": "field_designator", "text": ".parse_fn", "parent": 991, "children": [993], "start_point": {"row": 275, "column": 1}, "end_point": {"row": 275, "column": 10}}, {"id": 993, "type": "field_identifier", "text": "parse_fn", "parent": 992, "children": [], "start_point": {"row": 275, "column": 2}, "end_point": {"row": 275, "column": 10}}, {"id": 994, "type": "=", "text": "=", "parent": 991, "children": [], "start_point": {"row": 275, "column": 11}, "end_point": {"row": 275, "column": 12}}, {"id": 995, "type": "identifier", "text": "mtdsplit_parse_elf", "parent": 991, "children": [], "start_point": {"row": 275, "column": 13}, "end_point": {"row": 275, "column": 31}}, {"id": 996, "type": "initializer_pair", "text": ".type = MTD_PARSER_TYPE_FIRMWARE", "parent": 975, "children": [997, 999, 1000], "start_point": {"row": 276, "column": 1}, "end_point": {"row": 276, "column": 33}}, {"id": 997, "type": "field_designator", "text": ".type", "parent": 996, "children": [998], "start_point": {"row": 276, "column": 1}, "end_point": {"row": 276, "column": 6}}, {"id": 998, "type": "field_identifier", "text": "type", "parent": 997, "children": [], "start_point": {"row": 276, "column": 2}, "end_point": {"row": 276, "column": 6}}, {"id": 999, "type": "=", "text": "=", "parent": 996, "children": [], "start_point": {"row": 276, "column": 7}, "end_point": {"row": 276, "column": 8}}, {"id": 1000, "type": "identifier", "text": "MTD_PARSER_TYPE_FIRMWARE", "parent": 996, "children": [], "start_point": {"row": 276, "column": 9}, "end_point": {"row": 276, "column": 33}}, {"id": 1001, "type": "function_definition", "text": "static int __init mtdsplit_elf_init(void)\n{\n\tregister_mtd_parser(&mtdsplit_elf_parser);\n\n\treturn 0;\n}", "parent": null, "children": [1002, 1003, 1005], "start_point": {"row": 279, "column": 0}, "end_point": {"row": 284, "column": 1}}, {"id": 1002, "type": "primitive_type", "text": "int", "parent": 1001, "children": [], "start_point": {"row": 279, "column": 7}, "end_point": {"row": 279, "column": 10}}, {"id": 1003, "type": "ERROR", "text": "__init", "parent": 1001, "children": [1004], "start_point": {"row": 279, "column": 11}, "end_point": {"row": 279, "column": 17}}, {"id": 1004, "type": "identifier", "text": "__init", "parent": 1003, "children": [], "start_point": {"row": 279, "column": 11}, "end_point": {"row": 279, "column": 17}}, {"id": 1005, "type": "function_declarator", "text": "mtdsplit_elf_init(void)", "parent": 1001, "children": [1006, 1007], "start_point": {"row": 279, "column": 18}, "end_point": {"row": 279, "column": 41}}, {"id": 1006, "type": "identifier", "text": "mtdsplit_elf_init", "parent": 1005, "children": [], "start_point": {"row": 279, "column": 18}, "end_point": {"row": 279, "column": 35}}, {"id": 1007, "type": "parameter_list", "text": "(void)", "parent": 1005, "children": [1008], "start_point": {"row": 279, "column": 35}, "end_point": {"row": 279, "column": 41}}, {"id": 1008, "type": "parameter_declaration", "text": "void", "parent": 1007, "children": [1009], "start_point": {"row": 279, "column": 36}, "end_point": {"row": 279, "column": 40}}, {"id": 1009, "type": "primitive_type", "text": "void", "parent": 1008, "children": [], "start_point": {"row": 279, "column": 36}, "end_point": {"row": 279, "column": 40}}, {"id": 1010, "type": "call_expression", "text": "register_mtd_parser(&mtdsplit_elf_parser)", "parent": 1001, "children": [1011, 1012], "start_point": {"row": 281, "column": 1}, "end_point": {"row": 281, "column": 42}}, {"id": 1011, "type": "identifier", "text": "register_mtd_parser", "parent": 1010, "children": [], "start_point": {"row": 281, "column": 1}, "end_point": {"row": 281, "column": 20}}, {"id": 1012, "type": "argument_list", "text": "(&mtdsplit_elf_parser)", "parent": 1010, "children": [1013], "start_point": {"row": 281, "column": 20}, "end_point": {"row": 281, "column": 42}}, {"id": 1013, "type": "pointer_expression", "text": "&mtdsplit_elf_parser", "parent": 1012, "children": [1014], "start_point": {"row": 281, "column": 21}, "end_point": {"row": 281, "column": 41}}, {"id": 1014, "type": "identifier", "text": "mtdsplit_elf_parser", "parent": 1013, "children": [], "start_point": {"row": 281, "column": 22}, "end_point": {"row": 281, "column": 41}}, {"id": 1015, "type": "return_statement", "text": "return 0;", "parent": 1001, "children": [1016], "start_point": {"row": 283, "column": 1}, "end_point": {"row": 283, "column": 10}}, {"id": 1016, "type": "number_literal", "text": "0", "parent": 1015, "children": [], "start_point": {"row": 283, "column": 8}, "end_point": {"row": 283, "column": 9}}, {"id": 1017, "type": "call_expression", "text": "subsys_initcall(mtdsplit_elf_init)", "parent": null, "children": [1018, 1019], "start_point": {"row": 286, "column": 0}, "end_point": {"row": 286, "column": 34}}, {"id": 1018, "type": "identifier", "text": "subsys_initcall", "parent": 1017, "children": [], "start_point": {"row": 286, "column": 0}, "end_point": {"row": 286, "column": 15}}, {"id": 1019, "type": "argument_list", "text": "(mtdsplit_elf_init)", "parent": 1017, "children": [1020], "start_point": {"row": 286, "column": 15}, "end_point": {"row": 286, "column": 34}}, {"id": 1020, "type": "identifier", "text": "mtdsplit_elf_init", "parent": 1019, "children": [], "start_point": {"row": 286, "column": 16}, "end_point": {"row": 286, "column": 33}}]}, "node_categories": {"declarations": {"functions": [221, 223, 299, 301, 469, 471, 639, 641, 1001, 1005], "variables": [46, 49, 51, 54, 57, 60, 63, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 113, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 155, 160, 163, 168, 176, 179, 182, 185, 188, 191, 194, 200, 203, 206, 209, 212, 215, 218, 226, 233, 236, 241, 244, 247, 304, 311, 318, 323, 337, 340, 345, 474, 481, 488, 493, 507, 510, 515, 644, 651, 660, 667, 672, 676, 681, 688, 947, 968, 1008], "classes": [43, 44, 68, 69, 110, 111, 152, 153, 156, 157, 161, 162, 164, 165, 169, 170, 173, 174, 197, 198, 227, 228, 305, 306, 312, 313, 324, 325, 346, 347, 475, 476, 482, 483, 494, 495, 516, 517, 645, 646, 652, 653, 661, 662, 668, 669, 682, 683, 948, 949, 969, 970], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": [677, 678]}, "statements": {"expressions": [253, 259, 263, 265, 272, 278, 279, 283, 290, 294, 332, 333, 334, 351, 357, 358, 359, 365, 369, 370, 374, 375, 379, 387, 393, 394, 398, 399, 403, 407, 408, 415, 420, 425, 426, 428, 429, 432, 439, 440, 444, 448, 449, 452, 456, 464, 502, 503, 504, 521, 527, 528, 529, 535, 539, 540, 544, 545, 549, 557, 563, 564, 568, 569, 573, 577, 578, 585, 590, 595, 596, 598, 599, 602, 609, 610, 614, 618, 619, 622, 626, 634, 694, 699, 704, 706, 707, 710, 715, 716, 717, 720, 721, 727, 732, 735, 736, 741, 746, 747, 748, 757, 761, 763, 773, 777, 779, 785, 790, 791, 797, 801, 808, 813, 816, 818, 821, 826, 827, 830, 833, 840, 844, 850, 853, 856, 857, 858, 863, 864, 868, 872, 873, 880, 881, 888, 889, 896, 897, 902, 903, 911, 912, 919, 920, 927, 928, 933, 934, 940, 963, 1010, 1013, 1017], "assignments": [250, 350, 364, 384, 390, 412, 436, 455, 461, 520, 534, 554, 560, 582, 606, 625, 631, 691, 754, 770, 794, 805, 847, 871, 879, 887, 901, 910, 918, 926, 939], "loops": [406, 576], "conditionals": [29, 33, 37, 41, 45, 48, 53, 56, 59, 62, 66, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 158, 159, 166, 167, 171, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 214, 217, 220, 224, 229, 232, 235, 240, 243, 246, 249, 251, 254, 256, 257, 258, 260, 261, 262, 264, 266, 273, 274, 276, 277, 280, 282, 284, 291, 292, 296, 302, 307, 310, 314, 317, 322, 326, 330, 335, 336, 339, 342, 343, 344, 348, 349, 353, 356, 360, 361, 367, 371, 372, 376, 377, 380, 381, 385, 388, 389, 391, 395, 396, 400, 401, 404, 405, 409, 411, 413, 416, 418, 419, 427, 430, 431, 433, 435, 437, 441, 442, 445, 446, 447, 450, 454, 458, 460, 462, 465, 466, 472, 477, 480, 484, 487, 492, 496, 500, 505, 506, 509, 512, 513, 514, 518, 519, 523, 526, 530, 531, 537, 541, 542, 546, 547, 550, 551, 555, 558, 559, 561, 565, 566, 570, 571, 574, 575, 579, 581, 583, 586, 588, 589, 597, 600, 601, 603, 605, 607, 611, 612, 615, 616, 617, 620, 624, 628, 630, 632, 635, 636, 642, 647, 650, 654, 659, 663, 666, 670, 671, 674, 675, 679, 680, 684, 687, 690, 692, 695, 697, 705, 708, 709, 711, 713, 714, 718, 722, 723, 724, 726, 728, 733, 737, 738, 739, 743, 744, 745, 749, 750, 751, 752, 753, 755, 758, 760, 762, 764, 767, 768, 769, 771, 774, 776, 778, 780, 783, 786, 792, 793, 795, 799, 800, 802, 804, 806, 809, 811, 812, 814, 815, 817, 819, 820, 822, 824, 825, 828, 831, 832, 834, 841, 842, 846, 848, 851, 854, 860, 861, 862, 866, 870, 874, 876, 878, 882, 884, 890, 892, 894, 895, 898, 900, 904, 906, 908, 913, 915, 917, 921, 923, 925, 929, 931, 935, 936, 938, 942, 944, 946, 950, 953, 959, 964, 966, 967, 971, 973, 978, 980, 983, 988, 990, 993, 995, 998, 1000, 1004, 1006, 1011, 1014, 1018, 1020], "returns": [275, 293, 297, 382, 434, 467, 552, 604, 637, 712, 740, 803, 823, 843, 867, 945, 1015], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 67, 268, 286, 298, 355, 363, 383, 468, 525, 533, 553, 638, 698, 730, 788, 836, 875, 883, 886, 891, 905, 914, 922, 930, 961, 985, 1016], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [958, 977, 982, 987, 992, 997]}}, "cross_language_map": {"function_declarations": [{"node_id": 221, "universal_type": "function", "name": "mtdsplit_elf_read_mtd", "text_snippet": "static int mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n\t\t\t\t uint8_t *dst, size_t len)"}, {"node_id": 223, "universal_type": "function", "name": "unknown", "text_snippet": "mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n\t\t\t\t uint8_t *dst, size_t len)"}, {"node_id": 299, "universal_type": "function", "name": "elf32_determine_size", "text_snippet": "static int elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)\n{\n\ts"}, {"node_id": 301, "universal_type": "function", "name": "elf_header", "text_snippet": "elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)"}, {"node_id": 469, "universal_type": "function", "name": "elf64_determine_size", "text_snippet": "static int elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)\n{\n\ts"}, {"node_id": 471, "universal_type": "function", "name": "elf_header", "text_snippet": "elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)"}, {"node_id": 639, "universal_type": "function", "name": "mtdsplit_parse_elf", "text_snippet": "static int mtdsplit_parse_elf(struct mtd_info *mtd,\n\t\t\t const struct mtd_partition **pparts,\n\t\t"}, {"node_id": 641, "universal_type": "function", "name": "mtd_partition", "text_snippet": "mtdsplit_parse_elf(struct mtd_info *mtd,\n\t\t\t const struct mtd_partition **pparts,\n\t\t\t stru"}, {"node_id": 1001, "universal_type": "function", "name": "__init", "text_snippet": "static int __init mtdsplit_elf_init(void)\n{\n\tregister_mtd_parser(&mtdsplit_elf_parser);\n\n\treturn 0;\n"}, {"node_id": 1005, "universal_type": "function", "name": "unknown", "text_snippet": "mtdsplit_elf_init(void)"}], "class_declarations": [{"node_id": 43, "universal_type": "class", "name": "elf_header_ident", "text_snippet": "struct elf_header_ident {\n\tuint32_t magic;\n\tuint8_t class;\n\tuint8_t data;\n\tuint8_t version;\n\tuint8_t"}, {"node_id": 44, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 68, "universal_type": "class", "name": "elf_header_32", "text_snippet": "struct elf_header_32 {\n\tuint16_t type;\n\tuint16_t machine;\n\tuint32_t version;\n\tuint32_t entry;\n\tuint3"}, {"node_id": 69, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 110, "universal_type": "class", "name": "elf_header_64", "text_snippet": "struct elf_header_64 {\n\tuint16_t type;\n\tuint16_t machine;\n\tuint32_t version;\n\tuint64_t entry;\n\tuint6"}, {"node_id": 111, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 152, "universal_type": "class", "name": "elf_header", "text_snippet": "struct elf_header {\n\tstruct elf_header_ident ident;\n\tunion {\n\t\tstruct elf_header_32 elf32;\n\t\tstruct "}, {"node_id": 153, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 156, "universal_type": "class", "name": "elf_header_ident", "text_snippet": "struct elf_header_ident"}, {"node_id": 157, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 161, "universal_type": "class", "name": "{", "text_snippet": "union {\n\t\tstruct elf_header_32 elf32;\n\t\tstruct elf_header_64 elf64;\n\t}"}, {"node_id": 162, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 164, "universal_type": "class", "name": "elf_header_32", "text_snippet": "struct elf_header_32"}, {"node_id": 165, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 169, "universal_type": "class", "name": "elf_header_64", "text_snippet": "struct elf_header_64"}, {"node_id": 170, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 173, "universal_type": "class", "name": "elf_program_header_32", "text_snippet": "struct elf_program_header_32 {\n\tuint32_t type;\n\tuint32_t offset;\n\tuint32_t vaddr;\n\tuint32_t paddr;\n\t"}, {"node_id": 174, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 197, "universal_type": "class", "name": "elf_program_header_64", "text_snippet": "struct elf_program_header_64 {\n\tuint32_t type;\n\tuint32_t flags;\n\tuint64_t offset;\n\tuint64_t vaddr;\n\t"}, {"node_id": 198, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 227, "universal_type": "class", "name": "mtd_info", "text_snippet": "struct mtd_info"}, {"node_id": 228, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 305, "universal_type": "class", "name": "mtd_info", "text_snippet": "struct mtd_info"}, {"node_id": 306, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 312, "universal_type": "class", "name": "elf_header", "text_snippet": "struct elf_header"}, {"node_id": 313, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 324, "universal_type": "class", "name": "elf_header_32", "text_snippet": "struct elf_header_32"}, {"node_id": 325, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 346, "universal_type": "class", "name": "elf_program_header_32", "text_snippet": "struct elf_program_header_32"}, {"node_id": 347, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 475, "universal_type": "class", "name": "mtd_info", "text_snippet": "struct mtd_info"}, {"node_id": 476, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 482, "universal_type": "class", "name": "elf_header", "text_snippet": "struct elf_header"}, {"node_id": 483, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 494, "universal_type": "class", "name": "elf_header_64", "text_snippet": "struct elf_header_64"}, {"node_id": 495, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 516, "universal_type": "class", "name": "elf_program_header_64", "text_snippet": "struct elf_program_header_64"}, {"node_id": 517, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 645, "universal_type": "class", "name": "mtd_info", "text_snippet": "struct mtd_info"}, {"node_id": 646, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 652, "universal_type": "class", "name": "mtd_partition", "text_snippet": "struct mtd_partition"}, {"node_id": 653, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 661, "universal_type": "class", "name": "mtd_part_parser_data", "text_snippet": "struct mtd_part_parser_data"}, {"node_id": 662, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 668, "universal_type": "class", "name": "elf_header", "text_snippet": "struct elf_header"}, {"node_id": 669, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 682, "universal_type": "class", "name": "mtd_partition", "text_snippet": "struct mtd_partition"}, {"node_id": 683, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 948, "universal_type": "class", "name": "of_device_id", "text_snippet": "struct of_device_id"}, {"node_id": 949, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 969, "universal_type": "class", "name": "mtd_part_parser", "text_snippet": "struct mtd_part_parser"}, {"node_id": 970, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <linux/module.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <linux/init.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <linux/kernel.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <linux/slab.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <linux/mtd/mtd.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <linux/mtd/partitions.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <linux/of.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <linux/byteorder/generic.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"mtdsplit.h\"\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * MTD splitter for ELF loader firmware partitions\n *\n * Copyright (C) 2020 <NAME> <<EMAIL>>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * To parse the ELF kernel loader, a small ELF parser is used that can\n * handle both ELF32 or ELF64 class loaders. The splitter assumes that the\n * kernel is always located before the rootfs, whether it is embedded in the\n * loader or not.\n *\n * The kernel image is preferably embedded inside the ELF loader, so the end\n * of the loader equals the end of the kernel partition. This is due to the\n * way mtd_find_rootfs_from searches for the the rootfs:\n * - if the kernel image is embedded in the loader, the appended rootfs may\n * follow the loader immediately, within the same erase block.\n * - if the kernel image is not embedded in the loader, but placed at some\n * offset behind the loader (OKLI-style loader), the rootfs must be\n * aligned to an erase-block after the loader and kernel image.\n */\n\n#include <linux/module.h>\n#include <linux/init.h>\n#include <linux/kernel.h>\n#include <linux/slab.h>\n#include <linux/mtd/mtd.h>\n#include <linux/mtd/partitions.h>\n#include <linux/of.h>\n#include <linux/byteorder/generic.h>\n\n#include \"mtdsplit.h\"\n\n#define ELF_NR_PARTS\t2\n\n#define ELF_MAGIC\t0x7f454c46 /* 0x7f E L F */\n#define ELF_CLASS_32\t1\n#define ELF_CLASS_64\t2\n\nstruct elf_header_ident {\n\tuint32_t magic;\n\tuint8_t class;\n\tuint8_t data;\n\tuint8_t version;\n\tuint8_t osabi;\n\tuint8_t abiversion;\n\tuint8_t pad[7];\n};\n\nstruct elf_header_32 {\n\tuint16_t type;\n\tuint16_t machine;\n\tuint32_t version;\n\tuint32_t entry;\n\tuint32_t phoff;\n\tuint32_t shoff;\n\tuint32_t flags;\n\tuint16_t ehsize;\n\tuint16_t phentsize;\n\tuint16_t phnum;\n\tuint16_t shentsize;\n\tuint16_t shnum;\n\tuint16_t shstrndx;\n};\n\nstruct elf_header_64 {\n\tuint16_t type;\n\tuint16_t machine;\n\tuint32_t version;\n\tuint64_t entry;\n\tuint64_t phoff;\n\tuint64_t shoff;\n\tuint32_t flags;\n\tuint16_t ehsize;\n\tuint16_t phentsize;\n\tuint16_t phnum;\n\tuint16_t shentsize;\n\tuint16_t shnum;\n\tuint16_t shstrndx;\n};\n\nstruct elf_header {\n\tstruct elf_header_ident ident;\n\tunion {\n\t\tstruct elf_header_32 elf32;\n\t\tstruct elf_header_64 elf64;\n\t};\n};\n\nstruct elf_program_header_32 {\n\tuint32_t type;\n\tuint32_t offset;\n\tuint32_t vaddr;\n\tuint32_t paddr;\n\tuint32_t filesize;\n\tuint32_t memsize;\n\tuint32_t flags;\n};\n\nstruct elf_program_header_64 {\n\tuint32_t type;\n\tuint32_t flags;\n\tuint64_t offset;\n\tuint64_t vaddr;\n\tuint64_t paddr;\n\tuint64_t filesize;\n\tuint64_t memsize;\n};\n\n\nstatic int mtdsplit_elf_read_mtd(struct mtd_info *mtd, size_t offset,\n\t\t\t\t uint8_t *dst, size_t len)\n{\n\tsize_t retlen;\n\tint ret;\n\n\tret = mtd_read(mtd, offset, len, &retlen, dst);\n\tif (ret) {\n\t\tpr_debug(\"read error in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn ret;\n\t}\n\n\tif (retlen != len) {\n\t\tpr_debug(\"short read in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn -EIO;\n\t}\n\n\treturn 0;\n}\n\nstatic int elf32_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)\n{\n\tstruct elf_header_32 *hdr32 = &(hdr->elf32);\n\tint err;\n\tsize_t section_end, ph_table_end, ph_entry;\n\tstruct elf_program_header_32 ph;\n\n\t*size = 0;\n\n\tif (hdr32->shoff > 0) {\n\t\t*size = hdr32->shoff + hdr32->shentsize * hdr32->shnum;\n\t\treturn 0;\n\t}\n\n\tph_entry = hdr32->phoff;\n\tph_table_end = hdr32->phoff + hdr32->phentsize * hdr32->phnum;\n\n\twhile (ph_entry < ph_table_end) {\n\t\terr = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph));\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tsection_end = ph.offset + ph.filesize;\n\t\tif (section_end > *size)\n\t\t\t*size = section_end;\n\n\t\tph_entry += hdr32->phentsize;\n\t}\n\n\treturn 0;\n}\n\nstatic int elf64_determine_size(struct mtd_info *mtd, struct elf_header *hdr,\n\t\t\t\tsize_t *size)\n{\n\tstruct elf_header_64 *hdr64 = &(hdr->elf64);\n\tint err;\n\tsize_t section_end, ph_table_end, ph_entry;\n\tstruct elf_program_header_64 ph;\n\n\t*size = 0;\n\n\tif (hdr64->shoff > 0) {\n\t\t*size = hdr64->shoff + hdr64->shentsize * hdr64->shnum;\n\t\treturn 0;\n\t}\n\n\tph_entry = hdr64->phoff;\n\tph_table_end = hdr64->phoff + hdr64->phentsize * hdr64->phnum;\n\n\twhile (ph_entry < ph_table_end) {\n\t\terr = mtdsplit_elf_read_mtd(mtd, ph_entry, (uint8_t *)(&ph),\n\t\t\t\t\t sizeof(ph));\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tsection_end = ph.offset + ph.filesize;\n\t\tif (section_end > *size)\n\t\t\t*size = section_end;\n\n\t\tph_entry += hdr64->phentsize;\n\t}\n\n\treturn 0;\n}\n\nstatic int mtdsplit_parse_elf(struct mtd_info *mtd,\n\t\t\t const struct mtd_partition **pparts,\n\t\t\t struct mtd_part_parser_data *data)\n{\n\tstruct elf_header hdr;\n\tsize_t loader_size, rootfs_offset;\n\tenum mtdsplit_part_type type;\n\tstruct mtd_partition *parts;\n\tint err;\n\n\terr = mtdsplit_elf_read_mtd(mtd, 0, (uint8_t *)&hdr, sizeof(hdr));\n\tif (err)\n\t\treturn err;\n\n\tif (be32_to_cpu(hdr.ident.magic) != ELF_MAGIC) {\n\t\tpr_debug(\"invalid ELF magic %08x\\n\",\n\t\t\t be32_to_cpu(hdr.ident.magic));\n\t\treturn -EINVAL;\n\t}\n\n\tswitch (hdr.ident.class) {\n\tcase ELF_CLASS_32:\n\t\terr = elf32_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;\n\tcase ELF_CLASS_64:\n\t\terr = elf64_determine_size(mtd, &hdr, &loader_size);\n\t\tbreak;\n\tdefault:\n\t\tpr_debug(\"invalid ELF class %i\\n\", hdr.ident.class);\n\t\terr = -EINVAL;\n\t}\n\n\tif (err)\n\t\treturn err;\n\n\terr = mtd_find_rootfs_from(mtd, loader_size, mtd->size,\n\t\t\t\t &rootfs_offset, &type);\n\tif (err)\n\t\treturn err;\n\n\tif (rootfs_offset == mtd->size) {\n\t\tpr_debug(\"no rootfs found in \\\"%s\\\"\\n\", mtd->name);\n\t\treturn -ENODEV;\n\t}\n\n\tparts = kzalloc(ELF_NR_PARTS * sizeof(*parts), GFP_KERNEL);\n\tif (!parts)\n\t\treturn -ENOMEM;\n\n\tparts[0].name = KERNEL_PART_NAME;\n\tparts[0].offset = 0;\n\tparts[0].size = rootfs_offset;\n\n\tif (type == MTDSPLIT_PART_TYPE_UBI)\n\t\tparts[1].name = UBI_PART_NAME;\n\telse\n\t\tparts[1].name = ROOTFS_PART_NAME;\n\tparts[1].offset = rootfs_offset;\n\tparts[1].size = mtd->size - rootfs_offset;\n\n\t*pparts = parts;\n\treturn ELF_NR_PARTS;\n}\n\nstatic const struct of_device_id mtdsplit_elf_of_match_table[] = {\n\t{ .compatible = \"openwrt,elf\" },\n\t{},\n};\nMODULE_DEVICE_TABLE(of, mtdsplit_elf_of_match_table);\n\nstatic struct mtd_part_parser mtdsplit_elf_parser = {\n\t.owner = THIS_MODULE,\n\t.name = \"elf-loader-fw\",\n\t.of_match_table = mtdsplit_elf_of_match_table,\n\t.parse_fn = mtdsplit_parse_elf,\n\t.type = MTD_PARSER_TYPE_FIRMWARE,\n};\n\nstatic int __init mtdsplit_elf_init(void)\n{\n\tregister_mtd_parser(&mtdsplit_elf_parser);\n\n\treturn 0;\n}\n\nsubsys_initcall(mtdsplit_elf_init);\n"}
241
c
#pragma once #include <LaunchCommandAbstractAssistant.h> class LaunchCommandFakeAssistant : public LaunchCommandAbstractAssistant { public: void setTarget(const QString& appImagePath, const QStringList& args) override { } void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override { } void show() override { showRequested = true; } bool isShowRequested() const { return showRequested; } void reset() { showRequested = false; } void setInstaller(std::shared_ptr<AbstractInstaller> installer) override { } void setInspector(std::shared_ptr<AbstractInspector> inspector) override { } private: bool showRequested = false; };
28.83
24
(translation_unit) "#pragma once\n\n#include <LaunchCommandAbstractAssistant.h>\n\nclass LaunchCommandFakeAssistant : public LaunchCommandAbstractAssistant {\npublic:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }\n\n void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }\n\n void show() override {\n showRequested = true;\n }\n\n bool isShowRequested() const {\n return showRequested;\n }\n\n void reset() {\n showRequested = false;\n }\n\n void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }\n\n void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }\n\nprivate:\n bool showRequested = false;\n};\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <LaunchCommandAbstractAssistant.h>\n" (#include) "#include" (system_lib_string) "<LaunchCommandAbstractAssistant.h>" (function_definition) "class LaunchCommandFakeAssistant : public LaunchCommandAbstractAssistant {\npublic:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }\n\n void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }\n\n void show() override {\n showRequested = true;\n }\n\n bool isShowRequested() const {\n return showRequested;\n }\n\n void reset() {\n showRequested = false;\n }\n\n void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }\n\n void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }\n\nprivate:\n bool showRequested = false;\n}" (type_identifier) "class" (ERROR) "LaunchCommandFakeAssistant : public" (identifier) "LaunchCommandFakeAssistant" (:) ":" (identifier) "public" (identifier) "LaunchCommandAbstractAssistant" (compound_statement) "{\npublic:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }\n\n void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }\n\n void show() override {\n showRequested = true;\n }\n\n bool isShowRequested() const {\n return showRequested;\n }\n\n void reset() {\n showRequested = false;\n }\n\n void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }\n\n void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }\n\nprivate:\n bool showRequested = false;\n}" ({) "{" (labeled_statement) "public:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }" (statement_identifier) "public" (:) ":" (ERROR) "void setTarget(const QString& appImagePath, const QStringList& args) override" (primitive_type) "void" (function_declarator) "setTarget(const QString& appImagePath, const QStringList& args) override" (identifier) "setTarget" (parameter_list) "(const QString& appImagePath, const QStringList& args)" (() "(" (parameter_declaration) "const QString& appImagePath" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "appImagePath" (,) "," (parameter_declaration) "const QStringList& args" (type_qualifier) "const" (const) "const" (type_identifier) "QStringList" (ERROR) "&" (&) "&" (identifier) "args" ()) ")" (identifier) "override" (compound_statement) "{\n\n }" ({) "{" (}) "}" (function_definition) "void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }" (primitive_type) "void" (function_declarator) "setLauncher(std::shared_ptr<AbstractLauncher> launcher) override" (identifier) "setLauncher" (parameter_list) "(std::shared_ptr<AbstractLauncher> launcher)" (() "(" (parameter_declaration) "std::shared_ptr<AbstractLauncher> launcher" (type_identifier) "std" (ERROR) "::shared_ptr<AbstractLauncher>" (:) ":" (:) ":" (identifier) "shared_ptr" (<) "<" (identifier) "AbstractLauncher" (>) ">" (identifier) "launcher" ()) ")" (identifier) "override" (compound_statement) "{\n\n }" ({) "{" (}) "}" (function_definition) "void show() override {\n showRequested = true;\n }" (primitive_type) "void" (function_declarator) "show() override" (identifier) "show" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (compound_statement) "{\n showRequested = true;\n }" ({) "{" (expression_statement) "showRequested = true;" (assignment_expression) "showRequested = true" (identifier) "showRequested" (=) "=" (true) "true" (;) ";" (}) "}" (ERROR) "bool isShowRequested() const" (primitive_type) "bool" (function_declarator) "isShowRequested()" (identifier) "isShowRequested" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return showRequested;\n }" ({) "{" (return_statement) "return showRequested;" (return) "return" (identifier) "showRequested" (;) ";" (}) "}" (function_definition) "void reset() {\n showRequested = false;\n }" (primitive_type) "void" (function_declarator) "reset()" (identifier) "reset" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n showRequested = false;\n }" ({) "{" (expression_statement) "showRequested = false;" (assignment_expression) "showRequested = false" (identifier) "showRequested" (=) "=" (false) "false" (;) ";" (}) "}" (function_definition) "void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }" (primitive_type) "void" (function_declarator) "setInstaller(std::shared_ptr<AbstractInstaller> installer) override" (identifier) "setInstaller" (parameter_list) "(std::shared_ptr<AbstractInstaller> installer)" (() "(" (parameter_declaration) "std::shared_ptr<AbstractInstaller> installer" (type_identifier) "std" (ERROR) "::shared_ptr<AbstractInstaller>" (:) ":" (:) ":" (identifier) "shared_ptr" (<) "<" (identifier) "AbstractInstaller" (>) ">" (identifier) "installer" ()) ")" (identifier) "override" (compound_statement) "{\n\n }" ({) "{" (}) "}" (function_definition) "void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }" (primitive_type) "void" (function_declarator) "setInspector(std::shared_ptr<AbstractInspector> inspector) override" (identifier) "setInspector" (parameter_list) "(std::shared_ptr<AbstractInspector> inspector)" (() "(" (parameter_declaration) "std::shared_ptr<AbstractInspector> inspector" (type_identifier) "std" (ERROR) "::shared_ptr<AbstractInspector>" (:) ":" (:) ":" (identifier) "shared_ptr" (<) "<" (identifier) "AbstractInspector" (>) ">" (identifier) "inspector" ()) ")" (identifier) "override" (compound_statement) "{\n\n }" ({) "{" (}) "}" (labeled_statement) "private:\n bool showRequested = false;" (statement_identifier) "private" (:) ":" (declaration) "bool showRequested = false;" (primitive_type) "bool" (init_declarator) "showRequested = false" (identifier) "showRequested" (=) "=" (false) "false" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
170
8
{"language": "c", "success": true, "metadata": {"lines": 24, "avg_line_length": 28.83, "nodes": 98, "errors": 0, "source_hash": "248742c793b2f29c269d6060be4db81b86e41fb00e670a15672032c4124ae494", "categorized_nodes": 60}, "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 <LaunchCommandAbstractAssistant.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": "<LaunchCommandAbstractAssistant.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 43}}, {"id": 6, "type": "function_definition", "text": "class LaunchCommandFakeAssistant : public LaunchCommandAbstractAssistant {\npublic:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }\n\n void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }\n\n void show() override {\n showRequested = true;\n }\n\n bool isShowRequested() const {\n return showRequested;\n }\n\n void reset() {\n showRequested = false;\n }\n\n void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }\n\n void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }\n\nprivate:\n bool showRequested = false;\n}", "parent": null, "children": [7, 9], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 7, "type": "ERROR", "text": "LaunchCommandFakeAssistant : public", "parent": 6, "children": [8], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 41}}, {"id": 8, "type": "identifier", "text": "LaunchCommandFakeAssistant", "parent": 7, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 32}}, {"id": 9, "type": "identifier", "text": "LaunchCommandAbstractAssistant", "parent": 6, "children": [], "start_point": {"row": 4, "column": 42}, "end_point": {"row": 4, "column": 72}}, {"id": 10, "type": "labeled_statement", "text": "public:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }", "parent": 6, "children": [11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 9, "column": 5}}, {"id": 11, "type": "ERROR", "text": "void setTarget(const QString& appImagePath, const QStringList& args) override", "parent": 10, "children": [12, 13], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 81}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 8}}, {"id": 13, "type": "function_declarator", "text": "setTarget(const QString& appImagePath, const QStringList& args) override", "parent": 11, "children": [14, 15, 22], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 81}}, {"id": 14, "type": "identifier", "text": "setTarget", "parent": 13, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 15, "type": "parameter_list", "text": "(const QString& appImagePath, const QStringList& args)", "parent": 13, "children": [16, 19], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 72}}, {"id": 16, "type": "parameter_declaration", "text": "const QString& appImagePath", "parent": 15, "children": [17, 18], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 46}}, {"id": 17, "type": "type_identifier", "text": "QString", "parent": 16, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 32}}, {"id": 18, "type": "identifier", "text": "appImagePath", "parent": 16, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 46}}, {"id": 19, "type": "parameter_declaration", "text": "const QStringList& args", "parent": 15, "children": [20, 21], "start_point": {"row": 7, "column": 48}, "end_point": {"row": 7, "column": 71}}, {"id": 20, "type": "type_identifier", "text": "QStringList", "parent": 19, "children": [], "start_point": {"row": 7, "column": 54}, "end_point": {"row": 7, "column": 65}}, {"id": 21, "type": "identifier", "text": "args", "parent": 19, "children": [], "start_point": {"row": 7, "column": 67}, "end_point": {"row": 7, "column": 71}}, {"id": 22, "type": "identifier", "text": "override", "parent": 13, "children": [], "start_point": {"row": 7, "column": 73}, "end_point": {"row": 7, "column": 81}}, {"id": 23, "type": "function_definition", "text": "void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }", "parent": 6, "children": [24, 25], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 24, "type": "primitive_type", "text": "void", "parent": 23, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 25, "type": "function_declarator", "text": "setLauncher(std::shared_ptr<AbstractLauncher> launcher) override", "parent": 23, "children": [26, 27, 36], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 73}}, {"id": 26, "type": "identifier", "text": "setLauncher", "parent": 25, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 20}}, {"id": 27, "type": "parameter_list", "text": "(std::shared_ptr<AbstractLauncher> launcher)", "parent": 25, "children": [28], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 64}}, {"id": 28, "type": "parameter_declaration", "text": "std::shared_ptr<AbstractLauncher> launcher", "parent": 27, "children": [29, 30, 35], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 63}}, {"id": 29, "type": "type_identifier", "text": "std", "parent": 28, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 24}}, {"id": 30, "type": "ERROR", "text": "::shared_ptr<AbstractLauncher>", "parent": 28, "children": [31, 32, 33, 34], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 54}}, {"id": 31, "type": "identifier", "text": "shared_ptr", "parent": 30, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 36}}, {"id": 32, "type": "<", "text": "<", "parent": 30, "children": [], "start_point": {"row": 11, "column": 36}, "end_point": {"row": 11, "column": 37}}, {"id": 33, "type": "identifier", "text": "AbstractLauncher", "parent": 30, "children": [], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 53}}, {"id": 34, "type": ">", "text": ">", "parent": 30, "children": [], "start_point": {"row": 11, "column": 53}, "end_point": {"row": 11, "column": 54}}, {"id": 35, "type": "identifier", "text": "launcher", "parent": 28, "children": [], "start_point": {"row": 11, "column": 55}, "end_point": {"row": 11, "column": 63}}, {"id": 36, "type": "identifier", "text": "override", "parent": 25, "children": [], "start_point": {"row": 11, "column": 65}, "end_point": {"row": 11, "column": 73}}, {"id": 37, "type": "function_definition", "text": "void show() override {\n showRequested = true;\n }", "parent": 6, "children": [38, 39], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 17, "column": 5}}, {"id": 38, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 8}}, {"id": 39, "type": "function_declarator", "text": "show() override", "parent": 37, "children": [40, 41, 42], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 24}}, {"id": 40, "type": "identifier", "text": "show", "parent": 39, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 13}}, {"id": 41, "type": "parameter_list", "text": "()", "parent": 39, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 15}}, {"id": 42, "type": "identifier", "text": "override", "parent": 39, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 24}}, {"id": 43, "type": "assignment_expression", "text": "showRequested = true", "parent": 37, "children": [44, 45, 46], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 28}}, {"id": 44, "type": "identifier", "text": "showRequested", "parent": 43, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 21}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 23}}, {"id": 46, "type": "true", "text": "true", "parent": 43, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 28}}, {"id": 47, "type": "ERROR", "text": "bool isShowRequested() const", "parent": 6, "children": [48, 49], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 32}}, {"id": 48, "type": "primitive_type", "text": "bool", "parent": 47, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 8}}, {"id": 49, "type": "function_declarator", "text": "isShowRequested()", "parent": 47, "children": [50, 51], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 26}}, {"id": 50, "type": "identifier", "text": "isShowRequested", "parent": 49, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 24}}, {"id": 51, "type": "parameter_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 26}}, {"id": 52, "type": "return_statement", "text": "return showRequested;", "parent": 6, "children": [53], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 29}}, {"id": 53, "type": "identifier", "text": "showRequested", "parent": 52, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 28}}, {"id": 54, "type": "function_definition", "text": "void reset() {\n showRequested = false;\n }", "parent": 6, "children": [55, 56], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 25, "column": 5}}, {"id": 55, "type": "primitive_type", "text": "void", "parent": 54, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 56, "type": "function_declarator", "text": "reset()", "parent": 54, "children": [57, 58], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 16}}, {"id": 57, "type": "identifier", "text": "reset", "parent": 56, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 14}}, {"id": 58, "type": "parameter_list", "text": "()", "parent": 56, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 16}}, {"id": 59, "type": "assignment_expression", "text": "showRequested = false", "parent": 54, "children": [60, 61, 62], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 29}}, {"id": 60, "type": "identifier", "text": "showRequested", "parent": 59, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 21}}, {"id": 61, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 24, "column": 22}, "end_point": {"row": 24, "column": 23}}, {"id": 62, "type": "false", "text": "false", "parent": 59, "children": [], "start_point": {"row": 24, "column": 24}, "end_point": {"row": 24, "column": 29}}, {"id": 63, "type": "function_definition", "text": "void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }", "parent": 6, "children": [64, 65], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 29, "column": 5}}, {"id": 64, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 65, "type": "function_declarator", "text": "setInstaller(std::shared_ptr<AbstractInstaller> installer) override", "parent": 63, "children": [66, 67, 76], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 76}}, {"id": 66, "type": "identifier", "text": "setInstaller", "parent": 65, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 21}}, {"id": 67, "type": "parameter_list", "text": "(std::shared_ptr<AbstractInstaller> installer)", "parent": 65, "children": [68], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 67}}, {"id": 68, "type": "parameter_declaration", "text": "std::shared_ptr<AbstractInstaller> installer", "parent": 67, "children": [69, 70, 75], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 66}}, {"id": 69, "type": "type_identifier", "text": "std", "parent": 68, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 25}}, {"id": 70, "type": "ERROR", "text": "::shared_ptr<AbstractInstaller>", "parent": 68, "children": [71, 72, 73, 74], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 56}}, {"id": 71, "type": "identifier", "text": "shared_ptr", "parent": 70, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 37}}, {"id": 72, "type": "<", "text": "<", "parent": 70, "children": [], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 38}}, {"id": 73, "type": "identifier", "text": "AbstractInstaller", "parent": 70, "children": [], "start_point": {"row": 27, "column": 38}, "end_point": {"row": 27, "column": 55}}, {"id": 74, "type": ">", "text": ">", "parent": 70, "children": [], "start_point": {"row": 27, "column": 55}, "end_point": {"row": 27, "column": 56}}, {"id": 75, "type": "identifier", "text": "installer", "parent": 68, "children": [], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 66}}, {"id": 76, "type": "identifier", "text": "override", "parent": 65, "children": [], "start_point": {"row": 27, "column": 68}, "end_point": {"row": 27, "column": 76}}, {"id": 77, "type": "function_definition", "text": "void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }", "parent": 6, "children": [78, 79], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 33, "column": 5}}, {"id": 78, "type": "primitive_type", "text": "void", "parent": 77, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 79, "type": "function_declarator", "text": "setInspector(std::shared_ptr<AbstractInspector> inspector) override", "parent": 77, "children": [80, 81, 90], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 76}}, {"id": 80, "type": "identifier", "text": "setInspector", "parent": 79, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 21}}, {"id": 81, "type": "parameter_list", "text": "(std::shared_ptr<AbstractInspector> inspector)", "parent": 79, "children": [82], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 67}}, {"id": 82, "type": "parameter_declaration", "text": "std::shared_ptr<AbstractInspector> inspector", "parent": 81, "children": [83, 84, 89], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 66}}, {"id": 83, "type": "type_identifier", "text": "std", "parent": 82, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 25}}, {"id": 84, "type": "ERROR", "text": "::shared_ptr<AbstractInspector>", "parent": 82, "children": [85, 86, 87, 88], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 56}}, {"id": 85, "type": "identifier", "text": "shared_ptr", "parent": 84, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 37}}, {"id": 86, "type": "<", "text": "<", "parent": 84, "children": [], "start_point": {"row": 31, "column": 37}, "end_point": {"row": 31, "column": 38}}, {"id": 87, "type": "identifier", "text": "AbstractInspector", "parent": 84, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 55}}, {"id": 88, "type": ">", "text": ">", "parent": 84, "children": [], "start_point": {"row": 31, "column": 55}, "end_point": {"row": 31, "column": 56}}, {"id": 89, "type": "identifier", "text": "inspector", "parent": 82, "children": [], "start_point": {"row": 31, "column": 57}, "end_point": {"row": 31, "column": 66}}, {"id": 90, "type": "identifier", "text": "override", "parent": 79, "children": [], "start_point": {"row": 31, "column": 68}, "end_point": {"row": 31, "column": 76}}, {"id": 91, "type": "labeled_statement", "text": "private:\n bool showRequested = false;", "parent": 6, "children": [92], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 31}}, {"id": 92, "type": "declaration", "text": "bool showRequested = false;", "parent": 91, "children": [93, 94], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 31}}, {"id": 93, "type": "primitive_type", "text": "bool", "parent": 92, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 94, "type": "init_declarator", "text": "showRequested = false", "parent": 92, "children": [95, 96, 97], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 30}}, {"id": 95, "type": "identifier", "text": "showRequested", "parent": 94, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 22}}, {"id": 96, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 24}}, {"id": 97, "type": "false", "text": "false", "parent": 94, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 30}}]}, "node_categories": {"declarations": {"functions": [6, 13, 23, 25, 37, 39, 49, 54, 56, 63, 65, 77, 79], "variables": [16, 19, 28, 68, 82, 92], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [43, 59], "loops": [], "conditionals": [8, 9, 14, 17, 18, 20, 21, 22, 26, 29, 31, 33, 35, 36, 40, 42, 44, 50, 53, 57, 60, 66, 69, 71, 73, 75, 76, 80, 83, 85, 87, 89, 90, 95], "returns": [52], "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": "LaunchCommandFakeAssistant", "text_snippet": "class LaunchCommandFakeAssistant : public LaunchCommandAbstractAssistant {\npublic:\n\n void setTarg"}, {"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "setTarget(const QString& appImagePath, const QStringList& args) override"}, {"node_id": 23, "universal_type": "function", "name": "setLauncher", "text_snippet": "void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "setLauncher(std::shared_ptr<AbstractLauncher> launcher) override"}, {"node_id": 37, "universal_type": "function", "name": "show", "text_snippet": "void show() override {\n showRequested = true;\n }"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "show() override"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "isShowRequested()"}, {"node_id": 54, "universal_type": "function", "name": "reset", "text_snippet": "void reset() {\n showRequested = false;\n }"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "reset()"}, {"node_id": 63, "universal_type": "function", "name": "setInstaller", "text_snippet": "void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "setInstaller(std::shared_ptr<AbstractInstaller> installer) override"}, {"node_id": 77, "universal_type": "function", "name": "setInspector", "text_snippet": "void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }"}, {"node_id": 79, "universal_type": "function", "name": "unknown", "text_snippet": "setInspector(std::shared_ptr<AbstractInspector> inspector) override"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <LaunchCommandAbstractAssistant.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <LaunchCommandAbstractAssistant.h>\n\nclass LaunchCommandFakeAssistant : public LaunchCommandAbstractAssistant {\npublic:\n\n void setTarget(const QString& appImagePath, const QStringList& args) override {\n\n }\n\n void setLauncher(std::shared_ptr<AbstractLauncher> launcher) override {\n\n }\n\n void show() override {\n showRequested = true;\n }\n\n bool isShowRequested() const {\n return showRequested;\n }\n\n void reset() {\n showRequested = false;\n }\n\n void setInstaller(std::shared_ptr<AbstractInstaller> installer) override {\n\n }\n\n void setInspector(std::shared_ptr<AbstractInspector> inspector) override {\n\n }\n\nprivate:\n bool showRequested = false;\n};\n\n"}
242
c
#ifndef __DATAFORMAT_H__ #define __DATAFORMAT_H__ #include <string.h> #include <stdio.h> #include <stdarg.h> unsigned char *data_format(const char *__restrict__ format, ...); #endif
25
7
(translation_unit) "#ifndef __DATAFORMAT_H__\n#define __DATAFORMAT_H__\n\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n\nunsigned char *data_format(const char *__restrict__ format, ...);\n\n#endif\n" (preproc_ifdef) "#ifndef __DATAFORMAT_H__\n#define __DATAFORMAT_H__\n\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n\nunsigned char *data_format(const char *__restrict__ format, ...);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__DATAFORMAT_H__" (preproc_def) "#define __DATAFORMAT_H__\n" (#define) "#define" (identifier) "__DATAFORMAT_H__" (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 <stdarg.h>\n" (#include) "#include" (system_lib_string) "<stdarg.h>" (declaration) "unsigned char *data_format(const char *__restrict__ format, ...);" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*data_format(const char *__restrict__ format, ...)" (*) "*" (function_declarator) "data_format(const char *__restrict__ format, ...)" (identifier) "data_format" (parameter_list) "(const char *__restrict__ format, ...)" (() "(" (parameter_declaration) "const char *__restrict__ format" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*__restrict__ format" (*) "*" (type_qualifier) "__restrict__" (__restrict__) "__restrict__" (identifier) "format" (,) "," (variadic_parameter) "..." (...) "..." ()) ")" (;) ";" (#endif) "#endif"
41
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 25.0, "nodes": 32, "errors": 0, "source_hash": "e91bb8418603921d63a06eb13fa8b82ea846d38924098c413bb269d259098a53", "categorized_nodes": 21}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __DATAFORMAT_H__\n#define __DATAFORMAT_H__\n\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n\nunsigned char *data_format(const char *__restrict__ format, ...);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 31], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 10, "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": "__DATAFORMAT_H__", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define __DATAFORMAT_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": "__DATAFORMAT_H__", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include <string.h>\n", "parent": 0, "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": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <stdarg.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": "<stdarg.h>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 15, "type": "declaration", "text": "unsigned char *data_format(const char *__restrict__ format, ...);", "parent": 0, "children": [16, 19], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 65}}, {"id": 16, "type": "sized_type_specifier", "text": "unsigned char", "parent": 15, "children": [17, 18], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 13}}, {"id": 17, "type": "unsigned", "text": "unsigned", "parent": 16, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 18, "type": "primitive_type", "text": "char", "parent": 16, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 13}}, {"id": 19, "type": "pointer_declarator", "text": "*data_format(const char *__restrict__ format, ...)", "parent": 15, "children": [20, 21], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 64}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 15}}, {"id": 21, "type": "function_declarator", "text": "data_format(const char *__restrict__ format, ...)", "parent": 19, "children": [22, 23], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 64}}, {"id": 22, "type": "identifier", "text": "data_format", "parent": 21, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 26}}, {"id": 23, "type": "parameter_list", "text": "(const char *__restrict__ format, ...)", "parent": 21, "children": [24], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 64}}, {"id": 24, "type": "parameter_declaration", "text": "const char *__restrict__ format", "parent": 23, "children": [25, 26], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 58}}, {"id": 25, "type": "primitive_type", "text": "char", "parent": 24, "children": [], "start_point": {"row": 8, "column": 33}, "end_point": {"row": 8, "column": 37}}, {"id": 26, "type": "pointer_declarator", "text": "*__restrict__ format", "parent": 24, "children": [27, 28, 30], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 58}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 39}}, {"id": 28, "type": "type_qualifier", "text": "__restrict__", "parent": 26, "children": [29], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 51}}, {"id": 29, "type": "__restrict__", "text": "__restrict__", "parent": 28, "children": [], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 51}}, {"id": 30, "type": "identifier", "text": "format", "parent": 26, "children": [], "start_point": {"row": 8, "column": 52}, "end_point": {"row": 8, "column": 58}}, {"id": 31, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}]}, "node_categories": {"declarations": {"functions": [21], "variables": [15, 24], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 22, 28, 30, 31], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "data_format(const char *__restrict__ format, ...)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <string.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdio.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdarg.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "\n#ifndef __DATAFORMAT_H__\n#define __DATAFORMAT_H__\n\n#include <string.h>\n#include <stdio.h>\n#include <stdarg.h>\n\nunsigned char *data_format(const char *__restrict__ format, ...);\n\n#endif\n"}
243
c
int removeDuplicates(int* nums, int numsSize){ if(numsSize == 0) return 0; int i = 0; //outer loop counter int j = 0; //medium loop counter for(j = 1; j<numsSize; j++){ if(nums[j] != nums[i]){ i++; nums[i] = nums[j]; } } return i+1; return cnt; }
18.71
17
(translation_unit) "int removeDuplicates(int* nums, int numsSize){\n if(numsSize == 0) return 0;\n \n int i = 0; //outer loop counter\n int j = 0; //medium loop counter\n \n \n for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }\n return i+1;\n \n return cnt;\n}\n" (function_definition) "int removeDuplicates(int* nums, int numsSize){\n if(numsSize == 0) return 0;\n \n int i = 0; //outer loop counter\n int j = 0; //medium loop counter\n \n \n for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }\n return i+1;\n \n return cnt;\n}" (primitive_type) "int" (function_declarator) "removeDuplicates(int* nums, int numsSize)" (identifier) "removeDuplicates" (parameter_list) "(int* nums, int numsSize)" (() "(" (parameter_declaration) "int* nums" (primitive_type) "int" (pointer_declarator) "* nums" (*) "*" (identifier) "nums" (,) "," (parameter_declaration) "int numsSize" (primitive_type) "int" (identifier) "numsSize" ()) ")" (compound_statement) "{\n if(numsSize == 0) return 0;\n \n int i = 0; //outer loop counter\n int j = 0; //medium loop counter\n \n \n for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }\n return i+1;\n \n return cnt;\n}" ({) "{" (if_statement) "if(numsSize == 0) return 0;" (if) "if" (parenthesized_expression) "(numsSize == 0)" (() "(" (binary_expression) "numsSize == 0" (identifier) "numsSize" (==) "==" (number_literal) "0" ()) ")" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (comment) "//outer loop counter" (declaration) "int j = 0;" (primitive_type) "int" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (comment) "//medium loop counter" (for_statement) "for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }" (for) "for" (() "(" (assignment_expression) "j = 1" (identifier) "j" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "j<numsSize" (identifier) "j" (<) "<" (identifier) "numsSize" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }" ({) "{" (if_statement) "if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }" (if) "if" (parenthesized_expression) "(nums[j] != nums[i])" (() "(" (binary_expression) "nums[j] != nums[i]" (subscript_expression) "nums[j]" (identifier) "nums" ([) "[" (identifier) "j" (]) "]" (!=) "!=" (subscript_expression) "nums[i]" (identifier) "nums" ([) "[" (identifier) "i" (]) "]" ()) ")" (compound_statement) "{\n i++;\n nums[i] = nums[j];\n }" ({) "{" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (expression_statement) "nums[i] = nums[j];" (assignment_expression) "nums[i] = nums[j]" (subscript_expression) "nums[i]" (identifier) "nums" ([) "[" (identifier) "i" (]) "]" (=) "=" (subscript_expression) "nums[j]" (identifier) "nums" ([) "[" (identifier) "j" (]) "]" (;) ";" (}) "}" (}) "}" (return_statement) "return i+1;" (return) "return" (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (;) ";" (return_statement) "return cnt;" (return) "return" (identifier) "cnt" (;) ";" (}) "}"
119
0
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 18.71, "nodes": 73, "errors": 0, "source_hash": "71e9401f05956e525748a0a52ad95f61cb6d52dcf1ef7463adddf5cea9444484", "categorized_nodes": 53}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "int removeDuplicates(int* nums, int numsSize){\n if(numsSize == 0) return 0;\n \n int i = 0; //outer loop counter\n int j = 0; //medium loop counter\n \n \n for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }\n return i+1;\n \n return cnt;\n}", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 1, "type": "primitive_type", "text": "int", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 3}}, {"id": 2, "type": "function_declarator", "text": "removeDuplicates(int* nums, int numsSize)", "parent": 0, "children": [3, 4], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 45}}, {"id": 3, "type": "identifier", "text": "removeDuplicates", "parent": 2, "children": [], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 20}}, {"id": 4, "type": "parameter_list", "text": "(int* nums, int numsSize)", "parent": 2, "children": [5, 10], "start_point": {"row": 0, "column": 20}, "end_point": {"row": 0, "column": 45}}, {"id": 5, "type": "parameter_declaration", "text": "int* nums", "parent": 4, "children": [6, 7], "start_point": {"row": 0, "column": 21}, "end_point": {"row": 0, "column": 30}}, {"id": 6, "type": "primitive_type", "text": "int", "parent": 5, "children": [], "start_point": {"row": 0, "column": 21}, "end_point": {"row": 0, "column": 24}}, {"id": 7, "type": "pointer_declarator", "text": "* nums", "parent": 5, "children": [8, 9], "start_point": {"row": 0, "column": 24}, "end_point": {"row": 0, "column": 30}}, {"id": 8, "type": "*", "text": "*", "parent": 7, "children": [], "start_point": {"row": 0, "column": 24}, "end_point": {"row": 0, "column": 25}}, {"id": 9, "type": "identifier", "text": "nums", "parent": 7, "children": [], "start_point": {"row": 0, "column": 26}, "end_point": {"row": 0, "column": 30}}, {"id": 10, "type": "parameter_declaration", "text": "int numsSize", "parent": 4, "children": [11, 12], "start_point": {"row": 0, "column": 32}, "end_point": {"row": 0, "column": 44}}, {"id": 11, "type": "primitive_type", "text": "int", "parent": 10, "children": [], "start_point": {"row": 0, "column": 32}, "end_point": {"row": 0, "column": 35}}, {"id": 12, "type": "identifier", "text": "numsSize", "parent": 10, "children": [], "start_point": {"row": 0, "column": 36}, "end_point": {"row": 0, "column": 44}}, {"id": 13, "type": "if_statement", "text": "if(numsSize == 0) return 0;", "parent": 0, "children": [14, 19], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 31}}, {"id": 14, "type": "parenthesized_expression", "text": "(numsSize == 0)", "parent": 13, "children": [15], "start_point": {"row": 1, "column": 6}, "end_point": {"row": 1, "column": 21}}, {"id": 15, "type": "binary_expression", "text": "numsSize == 0", "parent": 14, "children": [16, 17, 18], "start_point": {"row": 1, "column": 7}, "end_point": {"row": 1, "column": 20}}, {"id": 16, "type": "identifier", "text": "numsSize", "parent": 15, "children": [], "start_point": {"row": 1, "column": 7}, "end_point": {"row": 1, "column": 15}}, {"id": 17, "type": "==", "text": "==", "parent": 15, "children": [], "start_point": {"row": 1, "column": 16}, "end_point": {"row": 1, "column": 18}}, {"id": 18, "type": "number_literal", "text": "0", "parent": 15, "children": [], "start_point": {"row": 1, "column": 19}, "end_point": {"row": 1, "column": 20}}, {"id": 19, "type": "return_statement", "text": "return 0;", "parent": 13, "children": [20], "start_point": {"row": 1, "column": 22}, "end_point": {"row": 1, "column": 31}}, {"id": 20, "type": "number_literal", "text": "0", "parent": 19, "children": [], "start_point": {"row": 1, "column": 29}, "end_point": {"row": 1, "column": 30}}, {"id": 21, "type": "declaration", "text": "int i = 0;", "parent": 0, "children": [22, 23], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 14}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 7}}, {"id": 23, "type": "init_declarator", "text": "i = 0", "parent": 21, "children": [24, 25, 26], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 13}}, {"id": 24, "type": "identifier", "text": "i", "parent": 23, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 9}}, {"id": 25, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 11}}, {"id": 26, "type": "number_literal", "text": "0", "parent": 23, "children": [], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 13}}, {"id": 27, "type": "declaration", "text": "int j = 0;", "parent": 0, "children": [28, 29], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 14}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 7}}, {"id": 29, "type": "init_declarator", "text": "j = 0", "parent": 27, "children": [30, 31, 32], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 13}}, {"id": 30, "type": "identifier", "text": "j", "parent": 29, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 9}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 11}}, {"id": 32, "type": "number_literal", "text": "0", "parent": 29, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 33, "type": "for_statement", "text": "for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }", "parent": 0, "children": [34, 38, 42], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 12, "column": 5}}, {"id": 34, "type": "assignment_expression", "text": "j = 1", "parent": 33, "children": [35, 36, 37], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 13}}, {"id": 35, "type": "identifier", "text": "j", "parent": 34, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 9}}, {"id": 36, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 11}}, {"id": 37, "type": "number_literal", "text": "1", "parent": 34, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 13}}, {"id": 38, "type": "binary_expression", "text": "j<numsSize", "parent": 33, "children": [39, 40, 41], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 25}}, {"id": 39, "type": "identifier", "text": "j", "parent": 38, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 16}}, {"id": 40, "type": "<", "text": "<", "parent": 38, "children": [], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 17}}, {"id": 41, "type": "identifier", "text": "numsSize", "parent": 38, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 25}}, {"id": 42, "type": "update_expression", "text": "j++", "parent": 33, "children": [43, 44], "start_point": {"row": 7, "column": 27}, "end_point": {"row": 7, "column": 30}}, {"id": 43, "type": "identifier", "text": "j", "parent": 42, "children": [], "start_point": {"row": 7, "column": 27}, "end_point": {"row": 7, "column": 28}}, {"id": 44, "type": "++", "text": "++", "parent": 42, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 30}}, {"id": 45, "type": "if_statement", "text": "if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }", "parent": 33, "children": [46], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 46, "type": "parenthesized_expression", "text": "(nums[j] != nums[i])", "parent": 45, "children": [47], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 30}}, {"id": 47, "type": "binary_expression", "text": "nums[j] != nums[i]", "parent": 46, "children": [48, 51, 52], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 29}}, {"id": 48, "type": "subscript_expression", "text": "nums[j]", "parent": 47, "children": [49, 50], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 18}}, {"id": 49, "type": "identifier", "text": "nums", "parent": 48, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 15}}, {"id": 50, "type": "identifier", "text": "j", "parent": 48, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 17}}, {"id": 51, "type": "!=", "text": "!=", "parent": 47, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 21}}, {"id": 52, "type": "subscript_expression", "text": "nums[i]", "parent": 47, "children": [53, 54], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 29}}, {"id": 53, "type": "identifier", "text": "nums", "parent": 52, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 26}}, {"id": 54, "type": "identifier", "text": "i", "parent": 52, "children": [], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 28}}, {"id": 55, "type": "update_expression", "text": "i++", "parent": 45, "children": [56, 57], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 15}}, {"id": 56, "type": "identifier", "text": "i", "parent": 55, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 13}}, {"id": 57, "type": "++", "text": "++", "parent": 55, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 15}}, {"id": 58, "type": "assignment_expression", "text": "nums[i] = nums[j]", "parent": 45, "children": [59, 62, 63], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 29}}, {"id": 59, "type": "subscript_expression", "text": "nums[i]", "parent": 58, "children": [60, 61], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 19}}, {"id": 60, "type": "identifier", "text": "nums", "parent": 59, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 16}}, {"id": 61, "type": "identifier", "text": "i", "parent": 59, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 18}}, {"id": 62, "type": "=", "text": "=", "parent": 58, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 21}}, {"id": 63, "type": "subscript_expression", "text": "nums[j]", "parent": 58, "children": [64, 65], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 29}}, {"id": 64, "type": "identifier", "text": "nums", "parent": 63, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 26}}, {"id": 65, "type": "identifier", "text": "j", "parent": 63, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 28}}, {"id": 66, "type": "return_statement", "text": "return i+1;", "parent": 0, "children": [67], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 15}}, {"id": 67, "type": "binary_expression", "text": "i+1", "parent": 66, "children": [68, 69, 70], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 14}}, {"id": 68, "type": "identifier", "text": "i", "parent": 67, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 69, "type": "+", "text": "+", "parent": 67, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 13}}, {"id": 70, "type": "number_literal", "text": "1", "parent": 67, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 14}}, {"id": 71, "type": "return_statement", "text": "return cnt;", "parent": 0, "children": [72], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 15}}, {"id": 72, "type": "identifier", "text": "cnt", "parent": 71, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 14}}]}, "node_categories": {"declarations": {"functions": [0, 2], "variables": [5, 10, 21, 27], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [14, 15, 38, 42, 46, 47, 48, 52, 55, 59, 63, 67], "assignments": [34, 58], "loops": [33], "conditionals": [3, 9, 12, 13, 16, 24, 30, 35, 39, 41, 43, 45, 49, 50, 53, 54, 56, 60, 61, 64, 65, 68, 72], "returns": [19, 66, 71], "exceptions": []}, "expressions": {"calls": [], "literals": [18, 20, 26, 32, 37, 70], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "removeDuplicates", "text_snippet": "int removeDuplicates(int* nums, int numsSize){\n if(numsSize == 0) return 0;\n \n int i = 0; /"}, {"node_id": 2, "universal_type": "function", "name": "numsSize)", "text_snippet": "removeDuplicates(int* nums, int numsSize)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "int removeDuplicates(int* nums, int numsSize){\n if(numsSize == 0) return 0;\n \n int i = 0; //outer loop counter\n int j = 0; //medium loop counter\n \n \n for(j = 1; j<numsSize; j++){\n if(nums[j] != nums[i]){\n i++;\n nums[i] = nums[j];\n }\n }\n return i+1;\n \n return cnt;\n}\n"}
244
c
/* ********************************************************************** * File : MachineState.h * Author : peach * Date : 19 Dec 2017 ********************************************************************** */ /* * Machine states always have three basic functions: Initialize, enterState and iterateState. * Initialization should happen once when the arduino powers on. enterState() gets called whenever * the specified mode is entered. iterateState() gets called in the main loop each time the arduino * still in the same mode. */ #ifndef MACHINESTATE_MACHINESTATE_H_ #define MACHINESTATE_MACHINESTATE_H_ class MachineState { public: virtual ~MachineState() { } virtual void enterState() = 0; virtual void iterateState() = 0; }; #endif /* MACHINESTATE_MACHINESTATE_H_ */
34.04
23
(translation_unit) "/*\n **********************************************************************\n * File : MachineState.h\n * Author : peach\n * Date : 19 Dec 2017\n **********************************************************************\n */\n\n/*\n * Machine states always have three basic functions: Initialize, enterState and iterateState.\n * Initialization should happen once when the arduino powers on. enterState() gets called whenever\n * the specified mode is entered. iterateState() gets called in the main loop each time the arduino\n * still in the same mode.\n */\n\n#ifndef MACHINESTATE_MACHINESTATE_H_\n#define MACHINESTATE_MACHINESTATE_H_\n\nclass MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n};\n\n#endif /* MACHINESTATE_MACHINESTATE_H_ */\n" (comment) "/*\n **********************************************************************\n * File : MachineState.h\n * Author : peach\n * Date : 19 Dec 2017\n **********************************************************************\n */" (comment) "/*\n * Machine states always have three basic functions: Initialize, enterState and iterateState.\n * Initialization should happen once when the arduino powers on. enterState() gets called whenever\n * the specified mode is entered. iterateState() gets called in the main loop each time the arduino\n * still in the same mode.\n */" (preproc_ifdef) "#ifndef MACHINESTATE_MACHINESTATE_H_\n#define MACHINESTATE_MACHINESTATE_H_\n\nclass MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "MACHINESTATE_MACHINESTATE_H_" (preproc_def) "#define MACHINESTATE_MACHINESTATE_H_\n" (#define) "#define" (identifier) "MACHINESTATE_MACHINESTATE_H_" (function_definition) "class MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n}" (type_identifier) "class" (identifier) "MachineState" (compound_statement) "{\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n}" ({) "{" (labeled_statement) "public:\n virtual ~MachineState() {\n }" (statement_identifier) "public" (:) ":" (ERROR) "virtual ~MachineState()" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "MachineState()" (identifier) "MachineState" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (declaration) "virtual void enterState() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "enterState() = 0" (function_declarator) "enterState()" (identifier) "enterState" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void iterateState() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "iterateState() = 0" (function_declarator) "iterateState()" (identifier) "iterateState" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "/* MACHINESTATE_MACHINESTATE_H_ */"
60
4
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 34.04, "nodes": 37, "errors": 0, "source_hash": "2f95726ace18db8977f21fd9e1dda4bfdd553dcdcc815ba0e9452d433495eb20", "categorized_nodes": 22}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef MACHINESTATE_MACHINESTATE_H_\n#define MACHINESTATE_MACHINESTATE_H_\n\nclass MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 36], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 27, "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": "MACHINESTATE_MACHINESTATE_H_", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 36}}, {"id": 3, "type": "preproc_def", "text": "#define MACHINESTATE_MACHINESTATE_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": "MACHINESTATE_MACHINESTATE_H_", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 36}}, {"id": 6, "type": "function_definition", "text": "class MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n}", "parent": 0, "children": [7], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 7, "type": "identifier", "text": "MachineState", "parent": 6, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 18}}, {"id": 8, "type": "labeled_statement", "text": "public:\n virtual ~MachineState() {\n }", "parent": 6, "children": [9], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 21, "column": 5}}, {"id": 9, "type": "ERROR", "text": "virtual ~MachineState()", "parent": 8, "children": [10, 11, 13], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 27}}, {"id": 10, "type": "type_identifier", "text": "virtual", "parent": 9, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 11}}, {"id": 11, "type": "ERROR", "text": "~", "parent": 9, "children": [12], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 12, "type": "~", "text": "~", "parent": 11, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 13, "type": "function_declarator", "text": "MachineState()", "parent": 9, "children": [14, 15], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 27}}, {"id": 14, "type": "identifier", "text": "MachineState", "parent": 13, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 25}}, {"id": 15, "type": "parameter_list", "text": "()", "parent": 13, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 27}}, {"id": 16, "type": "declaration", "text": "virtual void enterState() = 0;", "parent": 6, "children": [17, 18, 20], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 34}}, {"id": 17, "type": "type_identifier", "text": "virtual", "parent": 16, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 11}}, {"id": 18, "type": "ERROR", "text": "void", "parent": 16, "children": [19], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 16}}, {"id": 19, "type": "identifier", "text": "void", "parent": 18, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 16}}, {"id": 20, "type": "init_declarator", "text": "enterState() = 0", "parent": 16, "children": [21, 24, 25], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 33}}, {"id": 21, "type": "function_declarator", "text": "enterState()", "parent": 20, "children": [22, 23], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 29}}, {"id": 22, "type": "identifier", "text": "enterState", "parent": 21, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 27}}, {"id": 23, "type": "parameter_list", "text": "()", "parent": 21, "children": [], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 29}}, {"id": 24, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 31}}, {"id": 25, "type": "number_literal", "text": "0", "parent": 20, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 33}}, {"id": 26, "type": "declaration", "text": "virtual void iterateState() = 0;", "parent": 6, "children": [27, 28, 30], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 36}}, {"id": 27, "type": "type_identifier", "text": "virtual", "parent": 26, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 11}}, {"id": 28, "type": "ERROR", "text": "void", "parent": 26, "children": [29], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 16}}, {"id": 29, "type": "identifier", "text": "void", "parent": 28, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 16}}, {"id": 30, "type": "init_declarator", "text": "iterateState() = 0", "parent": 26, "children": [31, 34, 35], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 35}}, {"id": 31, "type": "function_declarator", "text": "iterateState()", "parent": 30, "children": [32, 33], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 31}}, {"id": 32, "type": "identifier", "text": "iterateState", "parent": 31, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 29}}, {"id": 33, "type": "parameter_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 31}}, {"id": 34, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 33}}, {"id": 35, "type": "number_literal", "text": "0", "parent": 30, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 35}}, {"id": 36, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 13, 21, 31], "variables": [16, 26], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 7, 10, 14, 17, 19, 22, 27, 29, 32, 36], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [25, 35], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "MachineState", "text_snippet": "class MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;"}, {"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "MachineState()"}, {"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "enterState()"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "iterateState()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*\n **********************************************************************\n * File : MachineState.h\n * Author : peach\n * Date : 19 Dec 2017\n **********************************************************************\n */\n\n/*\n * Machine states always have three basic functions: Initialize, enterState and iterateState.\n * Initialization should happen once when the arduino powers on. enterState() gets called whenever\n * the specified mode is entered. iterateState() gets called in the main loop each time the arduino\n * still in the same mode.\n */\n\n#ifndef MACHINESTATE_MACHINESTATE_H_\n#define MACHINESTATE_MACHINESTATE_H_\n\nclass MachineState {\npublic:\n virtual ~MachineState() {\n }\n\n virtual void enterState() = 0;\n virtual void iterateState() = 0;\n};\n\n#endif /* MACHINESTATE_MACHINESTATE_H_ */\n"}
245
c
#pragma once #include "stdafx.h" #include "opencv2/imgproc/imgproc_c.h" class ImageIO { public: ImageIO(void); ~ImageIO(void); static IplImage* loadImage(char* path); };
14.91
11
(translation_unit) "#pragma once\n\n#include "stdafx.h"\n\n#include "opencv2/imgproc/imgproc_c.h"\n\nclass ImageIO\n{\npublic:\n ImageIO(void);\n ~ImageIO(void);\n\n static IplImage* loadImage(char* path);\n \n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "stdafx.h"\n" (#include) "#include" (string_literal) ""stdafx.h"" (") """ (string_content) "stdafx.h" (") """ (preproc_include) "#include "opencv2/imgproc/imgproc_c.h"\n" (#include) "#include" (string_literal) ""opencv2/imgproc/imgproc_c.h"" (") """ (string_content) "opencv2/imgproc/imgproc_c.h" (") """ (function_definition) "class ImageIO\n{\npublic:\n ImageIO(void);\n ~ImageIO(void);\n\n static IplImage* loadImage(char* path);\n \n}" (type_identifier) "class" (identifier) "ImageIO" (compound_statement) "{\npublic:\n ImageIO(void);\n ~ImageIO(void);\n\n static IplImage* loadImage(char* path);\n \n}" ({) "{" (labeled_statement) "public:\n ImageIO(void);" (statement_identifier) "public" (:) ":" (expression_statement) "ImageIO(void);" (call_expression) "ImageIO(void)" (identifier) "ImageIO" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (expression_statement) "~ImageIO(void);" (unary_expression) "~ImageIO(void)" (~) "~" (call_expression) "ImageIO(void)" (identifier) "ImageIO" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (declaration) "static IplImage* loadImage(char* path);" (storage_class_specifier) "static" (static) "static" (type_identifier) "IplImage" (pointer_declarator) "* loadImage(char* path)" (*) "*" (function_declarator) "loadImage(char* path)" (identifier) "loadImage" (parameter_list) "(char* path)" (() "(" (parameter_declaration) "char* path" (primitive_type) "char" (pointer_declarator) "* path" (*) "*" (identifier) "path" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
62
0
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 14.91, "nodes": 34, "errors": 0, "source_hash": "5365f945a41470d36b29cd3e043fe75a14de165373f909a4cf50f605b128cdff", "categorized_nodes": 22}, "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 \"stdafx.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": "\"stdafx.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"opencv2/imgproc/imgproc_c.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": "\"opencv2/imgproc/imgproc_c.h\"", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 38}}, {"id": 9, "type": "function_definition", "text": "class ImageIO\n{\npublic:\n\tImageIO(void);\n\t~ImageIO(void);\n\n\tstatic IplImage* loadImage(char* path);\n\t\n}", "parent": null, "children": [10], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 10, "type": "identifier", "text": "ImageIO", "parent": 9, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 13}}, {"id": 11, "type": "labeled_statement", "text": "public:\n\tImageIO(void);", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 15}}, {"id": 12, "type": "call_expression", "text": "ImageIO(void)", "parent": 11, "children": [13, 14], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 14}}, {"id": 13, "type": "identifier", "text": "ImageIO", "parent": 12, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 8}}, {"id": 14, "type": "argument_list", "text": "(void)", "parent": 12, "children": [15], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 14}}, {"id": 15, "type": "identifier", "text": "void", "parent": 14, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 13}}, {"id": 16, "type": "unary_expression", "text": "~ImageIO(void)", "parent": 9, "children": [17, 18], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 15}}, {"id": 17, "type": "~", "text": "~", "parent": 16, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 2}}, {"id": 18, "type": "call_expression", "text": "ImageIO(void)", "parent": 16, "children": [19, 20], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 15}}, {"id": 19, "type": "identifier", "text": "ImageIO", "parent": 18, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 9}}, {"id": 20, "type": "argument_list", "text": "(void)", "parent": 18, "children": [21], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 15}}, {"id": 21, "type": "identifier", "text": "void", "parent": 20, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 14}}, {"id": 22, "type": "declaration", "text": "static IplImage* loadImage(char* path);", "parent": 9, "children": [23, 24], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 40}}, {"id": 23, "type": "type_identifier", "text": "IplImage", "parent": 22, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 16}}, {"id": 24, "type": "pointer_declarator", "text": "* loadImage(char* path)", "parent": 22, "children": [25, 26], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 39}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 17}}, {"id": 26, "type": "function_declarator", "text": "loadImage(char* path)", "parent": 24, "children": [27, 28], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 39}}, {"id": 27, "type": "identifier", "text": "loadImage", "parent": 26, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 27}}, {"id": 28, "type": "parameter_list", "text": "(char* path)", "parent": 26, "children": [29], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 39}}, {"id": 29, "type": "parameter_declaration", "text": "char* path", "parent": 28, "children": [30, 31], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 38}}, {"id": 30, "type": "primitive_type", "text": "char", "parent": 29, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 32}}, {"id": 31, "type": "pointer_declarator", "text": "* path", "parent": 29, "children": [32, 33], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 38}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 33}}, {"id": 33, "type": "identifier", "text": "path", "parent": 31, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 38}}]}, "node_categories": {"declarations": {"functions": [9, 26], "variables": [22, 29], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [12, 16, 18], "assignments": [], "loops": [], "conditionals": [10, 13, 15, 19, 21, 23, 27, 33], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "ImageIO", "text_snippet": "class ImageIO\n{\npublic:\n\tImageIO(void);\n\t~ImageIO(void);\n\n\tstatic IplImage* loadImage(char* path);\n\t"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "loadImage(char* path)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"stdafx.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"opencv2/imgproc/imgproc_c.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"stdafx.h\"\n\n#include \"opencv2/imgproc/imgproc_c.h\"\n\nclass ImageIO\n{\npublic:\n\tImageIO(void);\n\t~ImageIO(void);\n\n\tstatic IplImage* loadImage(char* path);\n\t\n};\n"}
246
c
/* * Copyright 2013, <NAME> <<EMAIL>>. * Copyright 2021, <NAME> <<EMAIL>>. * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef PARAGRAPH_LAYOUT_H #define PARAGRAPH_LAYOUT_H #include <vector> #include <Font.h> #include <Referenceable.h> #include <String.h> #include "CharacterStyle.h" #include "List.h" #include "Paragraph.h" class BView; class GlyphInfo { public: GlyphInfo() : charCode(0), x(0.0f), width(0.0f), lineIndex(0) { } GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex) : charCode(charCode), x(x), width(width), lineIndex(lineIndex) { } GlyphInfo(const GlyphInfo& other) : charCode(other.charCode), x(other.x), width(other.width), lineIndex(other.lineIndex) { } GlyphInfo& operator=(const GlyphInfo& other) { charCode = other.charCode; x = other.x; width = other.width; lineIndex = other.lineIndex; return *this; } bool operator==(const GlyphInfo& other) const { return charCode == other.charCode && x == other.x && width == other.width && lineIndex == other.lineIndex; } bool operator!=(const GlyphInfo& other) const { return !(*this == other); } public: uint32 charCode; float x; float width; int32 lineIndex; }; class LineInfo { public: LineInfo() : textOffset(0), y(0.0f), height(0.0f), maxAscent(0.0f), maxDescent(0.0f), extraGlyphSpacing(0.0f), extraWhiteSpacing(0.0f), layoutedSpans() { } LineInfo(int32 textOffset, float y, float height, float maxAscent, float maxDescent) : textOffset(textOffset), y(y), height(height), maxAscent(maxAscent), maxDescent(maxDescent), extraGlyphSpacing(0.0f), extraWhiteSpacing(0.0f), layoutedSpans() { } LineInfo(const LineInfo& other) : textOffset(other.textOffset), y(other.y), height(other.height), maxAscent(other.maxAscent), maxDescent(other.maxDescent), extraGlyphSpacing(other.extraGlyphSpacing), extraWhiteSpacing(other.extraWhiteSpacing), layoutedSpans(other.layoutedSpans) { } LineInfo& operator=(const LineInfo& other) { textOffset = other.textOffset; y = other.y; height = other.height; maxAscent = other.maxAscent; maxDescent = other.maxDescent; extraGlyphSpacing = other.extraGlyphSpacing; extraWhiteSpacing = other.extraWhiteSpacing; layoutedSpans = other.layoutedSpans; return *this; } bool operator==(const LineInfo& other) const { return textOffset == other.textOffset && y == other.y && height == other.height && maxAscent == other.maxAscent && maxDescent == other.maxDescent && extraGlyphSpacing == other.extraGlyphSpacing && extraWhiteSpacing == other.extraWhiteSpacing && layoutedSpans == other.layoutedSpans; } bool operator!=(const LineInfo& other) const { return !(*this == other); } public: int32 textOffset; float y; float height; float maxAscent; float maxDescent; float extraGlyphSpacing; float extraWhiteSpacing; std::vector<TextSpan> layoutedSpans; }; class ParagraphLayout : public BReferenceable { public: ParagraphLayout(); ParagraphLayout(const Paragraph& paragraph); ParagraphLayout(const ParagraphLayout& other); virtual ~ParagraphLayout(); void SetParagraph(const Paragraph& paragraph); const ParagraphStyle& Style() const { return fParagraphStyle; } void SetWidth(float width); float Width() const { return fWidth; } float Height(); void Draw(BView* view, const BPoint& offset); int32 CountGlyphs() const; int32 CountLines(); int32 LineIndexForOffset(int32 textOffset); int32 FirstOffsetOnLine(int32 lineIndex); int32 LastOffsetOnLine(int32 lineIndex); void GetLineBounds(int32 lineIndex, float& x1, float& y1, float& x2, float& y2); void GetTextBounds(int32 textOffset, float& x1, float& y1, float& x2, float& y2); int32 TextOffsetAt(float x, float y, bool& rightOfCenter); private: void _Init(); void _ValidateLayout(); void _Layout(); void _ApplyAlignment(); bool _AppendGlyphInfos(const TextSpan& span); bool _AppendGlyphInfo(uint32 charCode, float advanceX, const CharacterStyle& style); bool _FinalizeLine(int lineStart, int lineEnd, int lineIndex, float y, float& lineHeight); void _IncludeStyleInLine(LineInfo& line, const CharacterStyle& style); void _DrawLine(BView* view, const BPoint& offset, const LineInfo& line) const; void _DrawSpan(BView* view, BPoint offset, const TextSpan& span, int32 textOffset) const; void _GetEmptyLayoutBounds(float& x1, float& y1, float& x2, float& y2) const; void _AppendTextSpans(const Paragraph& paragraph); private: std::vector<TextSpan> fTextSpans; ParagraphStyle fParagraphStyle; float fWidth; bool fLayoutValid; std::vector<GlyphInfo> fGlyphInfos; std::vector<LineInfo> fLineInfos; }; typedef BReference<ParagraphLayout> ParagraphLayoutRef; #endif // PARAGRAPH_LAYOUT_H
23.6
210
(translation_unit) "/*\n * Copyright 2013, <NAME> <<EMAIL>>.\n * Copyright 2021, <NAME> <<EMAIL>>.\n * All rights reserved. Distributed under the terms of the MIT License.\n */\n#ifndef PARAGRAPH_LAYOUT_H\n#define PARAGRAPH_LAYOUT_H\n\n#include <vector>\n\n#include <Font.h>\n#include <Referenceable.h>\n#include <String.h>\n\n#include "CharacterStyle.h"\n#include "List.h"\n#include "Paragraph.h"\n\n\nclass BView;\n\n\nclass GlyphInfo {\npublic:\n GlyphInfo()\n :\n charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)\n {\n }\n\n GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n :\n charCode(charCode),\n x(x),\n width(width),\n lineIndex(lineIndex)\n {\n }\n\n GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode),\n x(other.x),\n width(other.width),\n lineIndex(other.lineIndex)\n {\n }\n\n GlyphInfo& operator=(const GlyphInfo& other)\n {\n charCode = other.charCode;\n x = other.x;\n width = other.width;\n lineIndex = other.lineIndex;\n return *this;\n }\n\n bool operator==(const GlyphInfo& other) const\n {\n return charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex;\n }\n\n bool operator!=(const GlyphInfo& other) const\n {\n return !(*this == other);\n }\n\npublic:\n uint32 charCode;\n\n float x;\n float width;\n\n int32 lineIndex;\n};\n\n\nclass LineInfo {\npublic:\n LineInfo()\n :\n textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)\n :\n textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)\n :\n textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset;\n y = other.y;\n height = other.height;\n maxAscent = other.maxAscent;\n maxDescent = other.maxDescent;\n extraGlyphSpacing = other.extraGlyphSpacing;\n extraWhiteSpacing = other.extraWhiteSpacing;\n layoutedSpans = other.layoutedSpans;\n return *this;\n }\n\n bool operator==(const LineInfo& other) const\n {\n return textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing\n && extraWhiteSpacing == other.extraWhiteSpacing\n && layoutedSpans == other.layoutedSpans;\n }\n\n bool operator!=(const LineInfo& other) const\n {\n return !(*this == other);\n }\n\npublic:\n int32 textOffset;\n\n float y;\n float height;\n\n float maxAscent;\n float maxDescent;\n\n float extraGlyphSpacing;\n float extraWhiteSpacing;\n\n std::vector<TextSpan>\n layoutedSpans;\n};\n\n\nclass ParagraphLayout : public BReferenceable {\npublic:\n ParagraphLayout();\n ParagraphLayout(const Paragraph& paragraph);\n ParagraphLayout(const ParagraphLayout& other);\n virtual ~ParagraphLayout();\n\n void SetParagraph(const Paragraph& paragraph);\n const ParagraphStyle& Style() const\n { return fParagraphStyle; }\n\n void SetWidth(float width);\n float Width() const\n { return fWidth; }\n\n float Height();\n void Draw(BView* view, const BPoint& offset);\n\n int32 CountGlyphs() const;\n int32 CountLines();\n\n int32 LineIndexForOffset(int32 textOffset);\n int32 FirstOffsetOnLine(int32 lineIndex);\n int32 LastOffsetOnLine(int32 lineIndex);\n\n void GetLineBounds(int32 lineIndex,\n float& x1, float& y1,\n float& x2, float& y2);\n\n void GetTextBounds(int32 textOffset,\n float& x1, float& y1,\n float& x2, float& y2);\n\n int32 TextOffsetAt(float x, float y,\n bool& rightOfCenter);\n\nprivate:\n void _Init();\n\n void _ValidateLayout();\n void _Layout();\n void _ApplyAlignment();\n\n bool _AppendGlyphInfos(const TextSpan& span);\n bool _AppendGlyphInfo(uint32 charCode,\n float advanceX,\n const CharacterStyle& style);\n\n bool _FinalizeLine(int lineStart, int lineEnd,\n int lineIndex, float y, float& lineHeight);\n\n void _IncludeStyleInLine(LineInfo& line,\n const CharacterStyle& style);\n\n void _DrawLine(BView* view, const BPoint& offset,\n const LineInfo& line) const;\n void _DrawSpan(BView* view, BPoint offset,\n const TextSpan& span,\n int32 textOffset) const;\n\n void _GetEmptyLayoutBounds(float& x1, float& y1,\n float& x2, float& y2) const;\n\n void _AppendTextSpans(const Paragraph& paragraph);\n\nprivate:\n std::vector<TextSpan>\n fTextSpans;\n ParagraphStyle fParagraphStyle;\n\n float fWidth;\n bool fLayoutValid;\n\n std::vector<GlyphInfo>\n fGlyphInfos;\n std::vector<LineInfo>\n fLineInfos;\n};\n\n\ntypedef BReference<ParagraphLayout> ParagraphLayoutRef;\n\n\n#endif // PARAGRAPH_LAYOUT_H\n" (comment) "/*\n * Copyright 2013, <NAME> <<EMAIL>>.\n * Copyright 2021, <NAME> <<EMAIL>>.\n * All rights reserved. Distributed under the terms of the MIT License.\n */" (preproc_ifdef) "#ifndef PARAGRAPH_LAYOUT_H\n#define PARAGRAPH_LAYOUT_H\n\n#include <vector>\n\n#include <Font.h>\n#include <Referenceable.h>\n#include <String.h>\n\n#include "CharacterStyle.h"\n#include "List.h"\n#include "Paragraph.h"\n\n\nclass BView;\n\n\nclass GlyphInfo {\npublic:\n GlyphInfo()\n :\n charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)\n {\n }\n\n GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n :\n charCode(charCode),\n x(x),\n width(width),\n lineIndex(lineIndex)\n {\n }\n\n GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode),\n x(other.x),\n width(other.width),\n lineIndex(other.lineIndex)\n {\n }\n\n GlyphInfo& operator=(const GlyphInfo& other)\n {\n charCode = other.charCode;\n x = other.x;\n width = other.width;\n lineIndex = other.lineIndex;\n return *this;\n }\n\n bool operator==(const GlyphInfo& other) const\n {\n return charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex;\n }\n\n bool operator!=(const GlyphInfo& other) const\n {\n return !(*this == other);\n }\n\npublic:\n uint32 charCode;\n\n float x;\n float width;\n\n int32 lineIndex;\n};\n\n\nclass LineInfo {\npublic:\n LineInfo()\n :\n textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)\n :\n textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)\n :\n textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset;\n y = other.y;\n height = other.height;\n maxAscent = other.maxAscent;\n maxDescent = other.maxDescent;\n extraGlyphSpacing = other.extraGlyphSpacing;\n extraWhiteSpacing = other.extraWhiteSpacing;\n layoutedSpans = other.layoutedSpans;\n return *this;\n }\n\n bool operator==(const LineInfo& other) const\n {\n return textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing\n && extraWhiteSpacing == other.extraWhiteSpacing\n && layoutedSpans == other.layoutedSpans;\n }\n\n bool operator!=(const LineInfo& other) const\n {\n return !(*this == other);\n }\n\npublic:\n int32 textOffset;\n\n float y;\n float height;\n\n float maxAscent;\n float maxDescent;\n\n float extraGlyphSpacing;\n float extraWhiteSpacing;\n\n std::vector<TextSpan>\n layoutedSpans;\n};\n\n\nclass ParagraphLayout : public BReferenceable {\npublic:\n ParagraphLayout();\n ParagraphLayout(const Paragraph& paragraph);\n ParagraphLayout(const ParagraphLayout& other);\n virtual ~ParagraphLayout();\n\n void SetParagraph(const Paragraph& paragraph);\n const ParagraphStyle& Style() const\n { return fParagraphStyle; }\n\n void SetWidth(float width);\n float Width() const\n { return fWidth; }\n\n float Height();\n void Draw(BView* view, const BPoint& offset);\n\n int32 CountGlyphs() const;\n int32 CountLines();\n\n int32 LineIndexForOffset(int32 textOffset);\n int32 FirstOffsetOnLine(int32 lineIndex);\n int32 LastOffsetOnLine(int32 lineIndex);\n\n void GetLineBounds(int32 lineIndex,\n float& x1, float& y1,\n float& x2, float& y2);\n\n void GetTextBounds(int32 textOffset,\n float& x1, float& y1,\n float& x2, float& y2);\n\n int32 TextOffsetAt(float x, float y,\n bool& rightOfCenter);\n\nprivate:\n void _Init();\n\n void _ValidateLayout();\n void _Layout();\n void _ApplyAlignment();\n\n bool _AppendGlyphInfos(const TextSpan& span);\n bool _AppendGlyphInfo(uint32 charCode,\n float advanceX,\n const CharacterStyle& style);\n\n bool _FinalizeLine(int lineStart, int lineEnd,\n int lineIndex, float y, float& lineHeight);\n\n void _IncludeStyleInLine(LineInfo& line,\n const CharacterStyle& style);\n\n void _DrawLine(BView* view, const BPoint& offset,\n const LineInfo& line) const;\n void _DrawSpan(BView* view, BPoint offset,\n const TextSpan& span,\n int32 textOffset) const;\n\n void _GetEmptyLayoutBounds(float& x1, float& y1,\n float& x2, float& y2) const;\n\n void _AppendTextSpans(const Paragraph& paragraph);\n\nprivate:\n std::vector<TextSpan>\n fTextSpans;\n ParagraphStyle fParagraphStyle;\n\n float fWidth;\n bool fLayoutValid;\n\n std::vector<GlyphInfo>\n fGlyphInfos;\n std::vector<LineInfo>\n fLineInfos;\n};\n\n\ntypedef BReference<ParagraphLayout> ParagraphLayoutRef;\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "PARAGRAPH_LAYOUT_H" (preproc_def) "#define PARAGRAPH_LAYOUT_H\n" (#define) "#define" (identifier) "PARAGRAPH_LAYOUT_H" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include <Font.h>\n" (#include) "#include" (system_lib_string) "<Font.h>" (preproc_include) "#include <Referenceable.h>\n" (#include) "#include" (system_lib_string) "<Referenceable.h>" (preproc_include) "#include <String.h>\n" (#include) "#include" (system_lib_string) "<String.h>" (preproc_include) "#include "CharacterStyle.h"\n" (#include) "#include" (string_literal) ""CharacterStyle.h"" (") """ (string_content) "CharacterStyle.h" (") """ (preproc_include) "#include "List.h"\n" (#include) "#include" (string_literal) ""List.h"" (") """ (string_content) "List.h" (") """ (preproc_include) "#include "Paragraph.h"\n" (#include) "#include" (string_literal) ""Paragraph.h"" (") """ (string_content) "Paragraph.h" (") """ (declaration) "class BView;" (type_identifier) "class" (identifier) "BView" (;) ";" (function_definition) "class GlyphInfo {\npublic:\n GlyphInfo()\n :\n charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)\n {\n }\n\n GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n :\n charCode(charCode),\n x(x),\n width(width),\n lineIndex(lineIndex)\n {\n }\n\n GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode),\n x(other.x),\n width(other.width),\n lineIndex(other.lineIndex)\n {\n }\n\n GlyphInfo& operator=(const GlyphInfo& other)\n {\n charCode = other.charCode;\n x = other.x;\n width = other.width;\n lineIndex = other.lineIndex;\n return *this;\n }\n\n bool operator==(const GlyphInfo& other) const\n {\n return charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex;\n }\n\n bool operator!=(const GlyphInfo& other) const\n {\n return !(*this == other);\n }\n\npublic:\n uint32 charCode;\n\n float x;\n float width;\n\n int32 lineIndex;\n}" (type_identifier) "class" (identifier) "GlyphInfo" (compound_statement) "{\npublic:\n GlyphInfo()\n :\n charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)\n {\n }\n\n GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n :\n charCode(charCode),\n x(x),\n width(width),\n lineIndex(lineIndex)\n {\n }\n\n GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode),\n x(other.x),\n width(other.width),\n lineIndex(other.lineIndex)\n {\n }\n\n GlyphInfo& operator=(const GlyphInfo& other)\n {\n charCode = other.charCode;\n x = other.x;\n width = other.width;\n lineIndex = other.lineIndex;\n return *this;\n }\n\n bool operator==(const GlyphInfo& other) const\n {\n return charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex;\n }\n\n bool operator!=(const GlyphInfo& other) const\n {\n return !(*this == other);\n }\n\npublic:\n uint32 charCode;\n\n float x;\n float width;\n\n int32 lineIndex;\n}" ({) "{" (labeled_statement) "public:\n GlyphInfo()\n :\n charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)" (statement_identifier) "public" (ERROR) ":\n GlyphInfo()" (:) ":" (call_expression) "GlyphInfo()" (identifier) "GlyphInfo" (argument_list) "()" (() "(" ()) ")" (:) ":" (expression_statement) "charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)" (comma_expression) "charCode(0),\n x(0.0f),\n width(0.0f),\n lineIndex(0)" (call_expression) "charCode(0)" (identifier) "charCode" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "x(0.0f),\n width(0.0f),\n lineIndex(0)" (call_expression) "x(0.0f)" (identifier) "x" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "width(0.0f),\n lineIndex(0)" (call_expression) "width(0.0f)" (identifier) "width" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (call_expression) "lineIndex(0)" (identifier) "lineIndex" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (declaration) "GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n :\n charCode(charCode),\n x(x),\n width(width),\n lineIndex(lineIndex)\n {\n }\n\n GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode),\n x(other.x),\n width(other.width),\n lineIndex(other.lineIndex)\n {\n }\n\n GlyphInfo& operator=(const GlyphInfo& other)" (macro_type_specifier) "GlyphInfo(uint32" (identifier) "GlyphInfo" (() "(" (type_descriptor) "uint32" (type_identifier) "uint32" ()) "" (identifier) "charCode" (,) "," (identifier) "float" (ERROR) "x" (identifier) "x" (,) "," (identifier) "float" (ERROR) "width" (identifier) "width" (,) "," (ERROR) "int32 lineIndex)\n :" (identifier) "int32" (identifier) "lineIndex" ()) ")" (:) ":" (function_declarator) "charCode(charCode)" (identifier) "charCode" (parameter_list) "(charCode)" (() "(" (parameter_declaration) "charCode" (type_identifier) "charCode" ()) ")" (,) "," (function_declarator) "x(x)" (identifier) "x" (parameter_list) "(x)" (() "(" (parameter_declaration) "x" (type_identifier) "x" ()) ")" (,) "," (function_declarator) "width(width)" (identifier) "width" (parameter_list) "(width)" (() "(" (parameter_declaration) "width" (type_identifier) "width" ()) ")" (,) "," (ERROR) "lineIndex(lineIndex)\n {\n }\n\n GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode)," (function_declarator) "lineIndex(lineIndex)" (identifier) "lineIndex" (parameter_list) "(lineIndex)" (() "(" (parameter_declaration) "lineIndex" (type_identifier) "lineIndex" ()) ")" ({) "{" (}) "}" (function_declarator) "GlyphInfo(const GlyphInfo& other)\n :\n charCode(other.charCode)" (identifier) "GlyphInfo" (parameter_list) "(const GlyphInfo& other)" (() "(" (parameter_declaration) "const GlyphInfo& other" (type_qualifier) "const" (const) "const" (type_identifier) "GlyphInfo" (ERROR) "&" (&) "&" (identifier) "other" ()) ")" (ERROR) ":" (:) ":" (call_expression) "charCode(other.charCode)" (identifier) "charCode" (argument_list) "(other.charCode)" (() "(" (ERROR) "other." (identifier) "other" (.) "." (identifier) "charCode" ()) ")" (,) "," (function_declarator) "x(other.x)" (identifier) "x" (parameter_list) "(other.x)" (() "(" (parameter_declaration) "other.x" (type_identifier) "other" (ERROR) "." (.) "." (identifier) "x" ()) ")" (,) "," (function_declarator) "width(other.width)" (identifier) "width" (parameter_list) "(other.width)" (() "(" (parameter_declaration) "other.width" (type_identifier) "other" (ERROR) "." (.) "." (identifier) "width" ()) ")" (,) "," (ERROR) "lineIndex(other.lineIndex)\n {\n }\n\n GlyphInfo&" (function_declarator) "lineIndex(other.lineIndex)" (identifier) "lineIndex" (parameter_list) "(other.lineIndex)" (() "(" (parameter_declaration) "other.lineIndex" (type_identifier) "other" (ERROR) "." (.) "." (identifier) "lineIndex" ()) ")" ({) "{" (}) "}" (identifier) "GlyphInfo" (&) "&" (init_declarator) "operator=(const GlyphInfo& other)" (identifier) "operator" (=) "=" (parenthesized_expression) "(const GlyphInfo& other)" (() "(" (ERROR) "const GlyphInfo" (type_descriptor) "const GlyphInfo" (type_qualifier) "const" (const) "const" (type_identifier) "GlyphInfo" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (;) "" (compound_statement) "{\n charCode = other.charCode;\n x = other.x;\n width = other.width;\n lineIndex = other.lineIndex;\n return *this;\n }" ({) "{" (expression_statement) "charCode = other.charCode;" (assignment_expression) "charCode = other.charCode" (identifier) "charCode" (=) "=" (field_expression) "other.charCode" (identifier) "other" (.) "." (field_identifier) "charCode" (;) ";" (expression_statement) "x = other.x;" (assignment_expression) "x = other.x" (identifier) "x" (=) "=" (field_expression) "other.x" (identifier) "other" (.) "." (field_identifier) "x" (;) ";" (expression_statement) "width = other.width;" (assignment_expression) "width = other.width" (identifier) "width" (=) "=" (field_expression) "other.width" (identifier) "other" (.) "." (field_identifier) "width" (;) ";" (expression_statement) "lineIndex = other.lineIndex;" (assignment_expression) "lineIndex = other.lineIndex" (identifier) "lineIndex" (=) "=" (field_expression) "other.lineIndex" (identifier) "other" (.) "." (field_identifier) "lineIndex" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (ERROR) "bool operator==(const GlyphInfo& other) const" (primitive_type) "bool" (identifier) "operator" (==) "==" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "GlyphInfo" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex;\n }" ({) "{" (return_statement) "return charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex;" (return) "return" (binary_expression) "charCode == other.charCode\n && x == other.x\n && width == other.width\n && lineIndex == other.lineIndex" (binary_expression) "charCode == other.charCode\n && x == other.x\n && width == other.width" (binary_expression) "charCode == other.charCode\n && x == other.x" (binary_expression) "charCode == other.charCode" (identifier) "charCode" (==) "==" (field_expression) "other.charCode" (identifier) "other" (.) "." (field_identifier) "charCode" (&&) "&&" (binary_expression) "x == other.x" (identifier) "x" (==) "==" (field_expression) "other.x" (identifier) "other" (.) "." (field_identifier) "x" (&&) "&&" (binary_expression) "width == other.width" (identifier) "width" (==) "==" (field_expression) "other.width" (identifier) "other" (.) "." (field_identifier) "width" (&&) "&&" (binary_expression) "lineIndex == other.lineIndex" (identifier) "lineIndex" (==) "==" (field_expression) "other.lineIndex" (identifier) "other" (.) "." (field_identifier) "lineIndex" (;) ";" (}) "}" (ERROR) "bool operator!=(const GlyphInfo& other) const" (primitive_type) "bool" (identifier) "operator" (!=) "!=" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "GlyphInfo" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return !(*this == other);\n }" ({) "{" (return_statement) "return !(*this == other);" (return) "return" (unary_expression) "!(*this == other)" (!) "!" (parenthesized_expression) "(*this == other)" (() "(" (binary_expression) "*this == other" (pointer_expression) "*this" (*) "*" (identifier) "this" (==) "==" (identifier) "other" ()) ")" (;) ";" (}) "}" (labeled_statement) "public:\n uint32 charCode;" (statement_identifier) "public" (:) ":" (declaration) "uint32 charCode;" (type_identifier) "uint32" (identifier) "charCode" (;) ";" (declaration) "float x;" (primitive_type) "float" (identifier) "x" (;) ";" (declaration) "float width;" (primitive_type) "float" (identifier) "width" (;) ";" (declaration) "int32 lineIndex;" (type_identifier) "int32" (identifier) "lineIndex" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class LineInfo {\npublic:\n LineInfo()\n :\n textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)\n :\n textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)\n :\n textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset;\n y = other.y;\n height = other.height;\n maxAscent = other.maxAscent;\n maxDescent = other.maxDescent;\n extraGlyphSpacing = other.extraGlyphSpacing;\n extraWhiteSpacing = other.extraWhiteSpacing;\n layoutedSpans = other.layoutedSpans;\n return *this;\n }" (type_identifier) "class" (identifier) "LineInfo" (compound_statement) "{\npublic:\n LineInfo()\n :\n textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)\n :\n textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)\n :\n textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset;\n y = other.y;\n height = other.height;\n maxAscent = other.maxAscent;\n maxDescent = other.maxDescent;\n extraGlyphSpacing = other.extraGlyphSpacing;\n extraWhiteSpacing = other.extraWhiteSpacing;\n layoutedSpans = other.layoutedSpans;\n return *this;\n }" ({) "{" (labeled_statement) "public:\n LineInfo()\n :\n textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)\n :\n textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)\n :\n textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset;" (statement_identifier) "public" (ERROR) ":\n LineInfo()\n :\n textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)\n :\n textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (:) ":" (call_expression) "LineInfo()" (identifier) "LineInfo" (argument_list) "()" (() "(" ()) ")" (:) ":" (comma_expression) "textOffset(0),\n y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "textOffset(0)" (identifier) "textOffset" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "y(0.0f),\n height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "y(0.0f)" (identifier) "y" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "height(0.0f),\n maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "height(0.0f)" (identifier) "height" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "maxAscent(0.0f),\n maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "maxAscent(0.0f)" (identifier) "maxAscent" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "maxDescent(0.0f),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "maxDescent(0.0f)" (identifier) "maxDescent" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "extraGlyphSpacing(0.0f)" (identifier) "extraGlyphSpacing" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (call_expression) "extraWhiteSpacing(0.0f)" (identifier) "extraWhiteSpacing" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (ERROR) "layoutedSpans()\n {\n }" (call_expression) "layoutedSpans()" (identifier) "layoutedSpans" (argument_list) "()" (() "(" ()) ")" ({) "{" (}) "}" (call_expression) "LineInfo(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (identifier) "LineInfo" (argument_list) "(int32 textOffset, float y, float height, float maxAscent,\n float maxDescent)" (() "(" (ERROR) "int32" (identifier) "int32" (identifier) "textOffset" (,) "," (identifier) "float" (ERROR) "y" (identifier) "y" (,) "," (ERROR) "float" (identifier) "float" (identifier) "height" (,) "," (ERROR) "float" (identifier) "float" (identifier) "maxAscent" (,) "," (ERROR) "float" (identifier) "float" (identifier) "maxDescent" ()) ")" (:) ":" (comma_expression) "textOffset(textOffset),\n y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "textOffset(textOffset)" (identifier) "textOffset" (argument_list) "(textOffset)" (() "(" (identifier) "textOffset" ()) ")" (,) "," (comma_expression) "y(y),\n height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "y(y)" (identifier) "y" (argument_list) "(y)" (() "(" (identifier) "y" ()) ")" (,) "," (comma_expression) "height(height),\n maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "height(height)" (identifier) "height" (argument_list) "(height)" (() "(" (identifier) "height" ()) ")" (,) "," (comma_expression) "maxAscent(maxAscent),\n maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "maxAscent(maxAscent)" (identifier) "maxAscent" (argument_list) "(maxAscent)" (() "(" (identifier) "maxAscent" ()) ")" (,) "," (comma_expression) "maxDescent(maxDescent),\n extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "maxDescent(maxDescent)" (identifier) "maxDescent" (argument_list) "(maxDescent)" (() "(" (identifier) "maxDescent" ()) ")" (,) "," (comma_expression) "extraGlyphSpacing(0.0f),\n extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "extraGlyphSpacing(0.0f)" (identifier) "extraGlyphSpacing" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (comma_expression) "extraWhiteSpacing(0.0f),\n layoutedSpans()\n {\n }\n\n LineInfo(const LineInfo& other)" (call_expression) "extraWhiteSpacing(0.0f)" (identifier) "extraWhiteSpacing" (argument_list) "(0.0f)" (() "(" (number_literal) "0.0f" ()) ")" (,) "," (ERROR) "layoutedSpans()\n {\n }" (call_expression) "layoutedSpans()" (identifier) "layoutedSpans" (argument_list) "()" (() "(" ()) ")" ({) "{" (}) "}" (call_expression) "LineInfo(const LineInfo& other)" (identifier) "LineInfo" (argument_list) "(const LineInfo& other)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "LineInfo& other" (identifier) "LineInfo" (&) "&" (identifier) "other" ()) ")" (:) ":" (expression_statement) "textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset;" (comma_expression) "textOffset(other.textOffset),\n y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "textOffset(other.textOffset)" (identifier) "textOffset" (argument_list) "(other.textOffset)" (() "(" (field_expression) "other.textOffset" (identifier) "other" (.) "." (field_identifier) "textOffset" ()) ")" (,) "," (comma_expression) "y(other.y),\n height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "y(other.y)" (identifier) "y" (argument_list) "(other.y)" (() "(" (field_expression) "other.y" (identifier) "other" (.) "." (field_identifier) "y" ()) ")" (,) "," (comma_expression) "height(other.height),\n maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "height(other.height)" (identifier) "height" (argument_list) "(other.height)" (() "(" (field_expression) "other.height" (identifier) "other" (.) "." (field_identifier) "height" ()) ")" (,) "," (comma_expression) "maxAscent(other.maxAscent),\n maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "maxAscent(other.maxAscent)" (identifier) "maxAscent" (argument_list) "(other.maxAscent)" (() "(" (field_expression) "other.maxAscent" (identifier) "other" (.) "." (field_identifier) "maxAscent" ()) ")" (,) "," (comma_expression) "maxDescent(other.maxDescent),\n extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "maxDescent(other.maxDescent)" (identifier) "maxDescent" (argument_list) "(other.maxDescent)" (() "(" (field_expression) "other.maxDescent" (identifier) "other" (.) "." (field_identifier) "maxDescent" ()) ")" (,) "," (comma_expression) "extraGlyphSpacing(other.extraGlyphSpacing),\n extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "extraGlyphSpacing(other.extraGlyphSpacing)" (identifier) "extraGlyphSpacing" (argument_list) "(other.extraGlyphSpacing)" (() "(" (field_expression) "other.extraGlyphSpacing" (identifier) "other" (.) "." (field_identifier) "extraGlyphSpacing" ()) ")" (,) "," (comma_expression) "extraWhiteSpacing(other.extraWhiteSpacing),\n layoutedSpans(other.layoutedSpans)\n {\n }\n\n LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (call_expression) "extraWhiteSpacing(other.extraWhiteSpacing)" (identifier) "extraWhiteSpacing" (argument_list) "(other.extraWhiteSpacing)" (() "(" (field_expression) "other.extraWhiteSpacing" (identifier) "other" (.) "." (field_identifier) "extraWhiteSpacing" ()) ")" (,) "," (ERROR) "layoutedSpans(other.layoutedSpans)\n {\n }" (call_expression) "layoutedSpans(other.layoutedSpans)" (identifier) "layoutedSpans" (argument_list) "(other.layoutedSpans)" (() "(" (field_expression) "other.layoutedSpans" (identifier) "other" (.) "." (field_identifier) "layoutedSpans" ()) ")" ({) "{" (}) "}" (binary_expression) "LineInfo& operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (identifier) "LineInfo" (&) "&" (assignment_expression) "operator=(const LineInfo& other)\n {\n textOffset = other.textOffset" (identifier) "operator" (=) "=" (assignment_expression) "(const LineInfo& other)\n {\n textOffset = other.textOffset" (parenthesized_expression) "(const LineInfo& other)" (() "(" (ERROR) "const LineInfo" (type_descriptor) "const LineInfo" (type_qualifier) "const" (const) "const" (type_identifier) "LineInfo" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (ERROR) "{\n textOffset" ({) "{" (identifier) "textOffset" (=) "=" (field_expression) "other.textOffset" (identifier) "other" (.) "." (field_identifier) "textOffset" (;) ";" (expression_statement) "y = other.y;" (assignment_expression) "y = other.y" (identifier) "y" (=) "=" (field_expression) "other.y" (identifier) "other" (.) "." (field_identifier) "y" (;) ";" (expression_statement) "height = other.height;" (assignment_expression) "height = other.height" (identifier) "height" (=) "=" (field_expression) "other.height" (identifier) "other" (.) "." (field_identifier) "height" (;) ";" (expression_statement) "maxAscent = other.maxAscent;" (assignment_expression) "maxAscent = other.maxAscent" (identifier) "maxAscent" (=) "=" (field_expression) "other.maxAscent" (identifier) "other" (.) "." (field_identifier) "maxAscent" (;) ";" (expression_statement) "maxDescent = other.maxDescent;" (assignment_expression) "maxDescent = other.maxDescent" (identifier) "maxDescent" (=) "=" (field_expression) "other.maxDescent" (identifier) "other" (.) "." (field_identifier) "maxDescent" (;) ";" (expression_statement) "extraGlyphSpacing = other.extraGlyphSpacing;" (assignment_expression) "extraGlyphSpacing = other.extraGlyphSpacing" (identifier) "extraGlyphSpacing" (=) "=" (field_expression) "other.extraGlyphSpacing" (identifier) "other" (.) "." (field_identifier) "extraGlyphSpacing" (;) ";" (expression_statement) "extraWhiteSpacing = other.extraWhiteSpacing;" (assignment_expression) "extraWhiteSpacing = other.extraWhiteSpacing" (identifier) "extraWhiteSpacing" (=) "=" (field_expression) "other.extraWhiteSpacing" (identifier) "other" (.) "." (field_identifier) "extraWhiteSpacing" (;) ";" (expression_statement) "layoutedSpans = other.layoutedSpans;" (assignment_expression) "layoutedSpans = other.layoutedSpans" (identifier) "layoutedSpans" (=) "=" (field_expression) "other.layoutedSpans" (identifier) "other" (.) "." (field_identifier) "layoutedSpans" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (ERROR) "bool operator==(const LineInfo& other) const" (primitive_type) "bool" (identifier) "operator" (==) "==" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "LineInfo" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing\n && extraWhiteSpacing == other.extraWhiteSpacing\n && layoutedSpans == other.layoutedSpans;\n }" ({) "{" (return_statement) "return textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing\n && extraWhiteSpacing == other.extraWhiteSpacing\n && layoutedSpans == other.layoutedSpans;" (return) "return" (binary_expression) "textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing\n && extraWhiteSpacing == other.extraWhiteSpacing\n && layoutedSpans == other.layoutedSpans" (binary_expression) "textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing\n && extraWhiteSpacing == other.extraWhiteSpacing" (binary_expression) "textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent\n && extraGlyphSpacing == other.extraGlyphSpacing" (binary_expression) "textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent\n && maxDescent == other.maxDescent" (binary_expression) "textOffset == other.textOffset\n && y == other.y\n && height == other.height\n && maxAscent == other.maxAscent" (binary_expression) "textOffset == other.textOffset\n && y == other.y\n && height == other.height" (binary_expression) "textOffset == other.textOffset\n && y == other.y" (binary_expression) "textOffset == other.textOffset" (identifier) "textOffset" (==) "==" (field_expression) "other.textOffset" (identifier) "other" (.) "." (field_identifier) "textOffset" (&&) "&&" (binary_expression) "y == other.y" (identifier) "y" (==) "==" (field_expression) "other.y" (identifier) "other" (.) "." (field_identifier) "y" (&&) "&&" (binary_expression) "height == other.height" (identifier) "height" (==) "==" (field_expression) "other.height" (identifier) "other" (.) "." (field_identifier) "height" (&&) "&&" (binary_expression) "maxAscent == other.maxAscent" (identifier) "maxAscent" (==) "==" (field_expression) "other.maxAscent" (identifier) "other" (.) "." (field_identifier) "maxAscent" (&&) "&&" (binary_expression) "maxDescent == other.maxDescent" (identifier) "maxDescent" (==) "==" (field_expression) "other.maxDescent" (identifier) "other" (.) "." (field_identifier) "maxDescent" (&&) "&&" (binary_expression) "extraGlyphSpacing == other.extraGlyphSpacing" (identifier) "extraGlyphSpacing" (==) "==" (field_expression) "other.extraGlyphSpacing" (identifier) "other" (.) "." (field_identifier) "extraGlyphSpacing" (&&) "&&" (binary_expression) "extraWhiteSpacing == other.extraWhiteSpacing" (identifier) "extraWhiteSpacing" (==) "==" (field_expression) "other.extraWhiteSpacing" (identifier) "other" (.) "." (field_identifier) "extraWhiteSpacing" (&&) "&&" (binary_expression) "layoutedSpans == other.layoutedSpans" (identifier) "layoutedSpans" (==) "==" (field_expression) "other.layoutedSpans" (identifier) "other" (.) "." (field_identifier) "layoutedSpans" (;) ";" (}) "}" (ERROR) "bool operator!=(const LineInfo& other) const" (primitive_type) "bool" (identifier) "operator" (!=) "!=" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "LineInfo" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return !(*this == other);\n }" ({) "{" (return_statement) "return !(*this == other);" (return) "return" (unary_expression) "!(*this == other)" (!) "!" (parenthesized_expression) "(*this == other)" (() "(" (binary_expression) "*this == other" (pointer_expression) "*this" (*) "*" (identifier) "this" (==) "==" (identifier) "other" ()) ")" (;) ";" (}) "}" (labeled_statement) "public:\n int32 textOffset;" (statement_identifier) "public" (:) ":" (declaration) "int32 textOffset;" (type_identifier) "int32" (identifier) "textOffset" (;) ";" (declaration) "float y;" (primitive_type) "float" (identifier) "y" (;) ";" (declaration) "float height;" (primitive_type) "float" (identifier) "height" (;) ";" (declaration) "float maxAscent;" (primitive_type) "float" (identifier) "maxAscent" (;) ";" (declaration) "float maxDescent;" (primitive_type) "float" (identifier) "maxDescent" (;) ";" (declaration) "float extraGlyphSpacing;" (primitive_type) "float" (identifier) "extraGlyphSpacing" (;) ";" (declaration) "float extraWhiteSpacing;" (primitive_type) "float" (identifier) "extraWhiteSpacing" (;) ";" (labeled_statement) "std::vector<TextSpan>\n layoutedSpans;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<TextSpan>\n layoutedSpans;" (binary_expression) "vector<TextSpan>\n layoutedSpans" (binary_expression) "vector<TextSpan" (identifier) "vector" (<) "<" (identifier) "TextSpan" (>) ">" (identifier) "layoutedSpans" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "class ParagraphLayout : public BReferenceable {\npublic:\n ParagraphLayout();\n ParagraphLayout(const Paragraph& paragraph);\n ParagraphLayout(const ParagraphLayout& other);\n virtual ~ParagraphLayout();\n\n void SetParagraph(const Paragraph& paragraph);\n const ParagraphStyle& Style() const\n { return fParagraphStyle; }\n\n void SetWidth(float width);\n float Width() const\n { return fWidth; }\n\n float Height();\n void Draw(BView* view, const BPoint& offset);\n\n int32 CountGlyphs() const;\n int32 CountLines();\n\n int32 LineIndexForOffset(int32 textOffset);\n int32 FirstOffsetOnLine(int32 lineIndex);\n int32 LastOffsetOnLine(int32 lineIndex);\n\n void GetLineBounds(int32 lineIndex,\n float& x1, float& y1,\n float& x2, float& y2);\n\n void GetTextBounds(int32 textOffset,\n float& x1, float& y1,\n float& x2, float& y2);\n\n int32 TextOffsetAt(float x, float y,\n bool& rightOfCenter);\n\nprivate:\n void _Init();\n\n void _ValidateLayout();\n void _Layout();\n void _ApplyAlignment();\n\n bool _AppendGlyphInfos(const TextSpan& span);\n bool _AppendGlyphInfo(uint32 charCode,\n float advanceX,\n const CharacterStyle& style);\n\n bool _FinalizeLine(int lineStart, int lineEnd,\n int lineIndex, float y, float& lineHeight);\n\n void _IncludeStyleInLine(LineInfo& line,\n const CharacterStyle& style);\n\n void _DrawLine(BView* view, const BPoint& offset,\n const LineInfo& line) const;\n void _DrawSpan(BView* view, BPoint offset,\n const TextSpan& span,\n int32 textOffset) const;\n\n void _GetEmptyLayoutBounds(float& x1, float& y1,\n float& x2, float& y2) const;\n\n void _AppendTextSpans(const Paragraph& paragraph);\n\nprivate:\n std::vector<TextSpan>\n fTextSpans;\n ParagraphStyle fParagraphStyle;\n\n float fWidth;\n bool fLayoutValid;\n\n std::vector<GlyphInfo>\n fGlyphInfos;\n std::vector<LineInfo>\n fLineInfos;\n};\n\n\ntypedef BReference<ParagraphLayout> ParagraphLayoutRef;" (type_identifier) "class" (identifier) "ParagraphLayout" (ERROR) ": public BReferenceable" (:) ":" (identifier) "public" (identifier) "BReferenceable" ({) "{" (labeled_statement) "public:\n ParagraphLayout();" (statement_identifier) "public" (:) ":" (expression_statement) "ParagraphLayout();" (call_expression) "ParagraphLayout()" (identifier) "ParagraphLayout" (argument_list) "()" (() "(" ()) ")" (;) ";" (macro_type_specifier) "ParagraphLayout(const Paragraph& paragraph)" (identifier) "ParagraphLayout" (() "(" (type_descriptor) "const Paragraph" (type_qualifier) "const" (const) "const" (type_identifier) "Paragraph" (ERROR) "& paragraph" (&) "&" (identifier) "paragraph" ()) ")" (;) ";" (macro_type_specifier) "ParagraphLayout(const ParagraphLayout& other)" (identifier) "ParagraphLayout" (() "(" (type_descriptor) "const ParagraphLayout" (type_qualifier) "const" (const) "const" (type_identifier) "ParagraphLayout" (ERROR) "& other" (&) "&" (identifier) "other" ()) ")" (;) ";" (declaration) "virtual ~ParagraphLayout();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "ParagraphLayout()" (identifier) "ParagraphLayout" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void SetParagraph(const Paragraph& paragraph);" (primitive_type) "void" (function_declarator) "SetParagraph(const Paragraph& paragraph)" (identifier) "SetParagraph" (parameter_list) "(const Paragraph& paragraph)" (() "(" (parameter_declaration) "const Paragraph& paragraph" (type_qualifier) "const" (const) "const" (type_identifier) "Paragraph" (ERROR) "&" (&) "&" (identifier) "paragraph" ()) ")" (;) ";" (ERROR) "const ParagraphStyle& Style() const" (type_qualifier) "const" (const) "const" (type_identifier) "ParagraphStyle" (ERROR) "&" (&) "&" (function_declarator) "Style()" (identifier) "Style" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return fParagraphStyle; }" ({) "{" (return_statement) "return fParagraphStyle;" (return) "return" (identifier) "fParagraphStyle" (;) ";" (}) "}" (declaration) "void SetWidth(float width);" (primitive_type) "void" (function_declarator) "SetWidth(float width)" (identifier) "SetWidth" (parameter_list) "(float width)" (() "(" (parameter_declaration) "float width" (primitive_type) "float" (identifier) "width" ()) ")" (;) ";" (ERROR) "float Width() const" (primitive_type) "float" (function_declarator) "Width()" (identifier) "Width" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return fWidth; }" ({) "{" (return_statement) "return fWidth;" (return) "return" (identifier) "fWidth" (;) ";" (}) "}" (declaration) "float Height();" (primitive_type) "float" (function_declarator) "Height()" (identifier) "Height" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void Draw(BView* view, const BPoint& offset);" (primitive_type) "void" (function_declarator) "Draw(BView* view, const BPoint& offset)" (identifier) "Draw" (parameter_list) "(BView* view, const BPoint& offset)" (() "(" (parameter_declaration) "BView* view" (type_identifier) "BView" (pointer_declarator) "* view" (*) "*" (identifier) "view" (,) "," (parameter_declaration) "const BPoint& offset" (type_qualifier) "const" (const) "const" (type_identifier) "BPoint" (ERROR) "&" (&) "&" (identifier) "offset" ()) ")" (;) ";" (type_identifier) "int32" (function_declarator) "CountGlyphs()" (identifier) "CountGlyphs" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n int32 CountLines();" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (type_identifier) "int32" (function_declarator) "CountLines()" (identifier) "CountLines" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int32 LineIndexForOffset(int32 textOffset);" (type_identifier) "int32" (function_declarator) "LineIndexForOffset(int32 textOffset)" (identifier) "LineIndexForOffset" (parameter_list) "(int32 textOffset)" (() "(" (parameter_declaration) "int32 textOffset" (type_identifier) "int32" (identifier) "textOffset" ()) ")" (;) ";" (declaration) "int32 FirstOffsetOnLine(int32 lineIndex);" (type_identifier) "int32" (function_declarator) "FirstOffsetOnLine(int32 lineIndex)" (identifier) "FirstOffsetOnLine" (parameter_list) "(int32 lineIndex)" (() "(" (parameter_declaration) "int32 lineIndex" (type_identifier) "int32" (identifier) "lineIndex" ()) ")" (;) ";" (declaration) "int32 LastOffsetOnLine(int32 lineIndex);" (type_identifier) "int32" (function_declarator) "LastOffsetOnLine(int32 lineIndex)" (identifier) "LastOffsetOnLine" (parameter_list) "(int32 lineIndex)" (() "(" (parameter_declaration) "int32 lineIndex" (type_identifier) "int32" (identifier) "lineIndex" ()) ")" (;) ";" (declaration) "void GetLineBounds(int32 lineIndex,\n float& x1, float& y1,\n float& x2, float& y2);" (primitive_type) "void" (function_declarator) "GetLineBounds(int32 lineIndex,\n float& x1, float& y1,\n float& x2, float& y2)" (identifier) "GetLineBounds" (parameter_list) "(int32 lineIndex,\n float& x1, float& y1,\n float& x2, float& y2)" (() "(" (parameter_declaration) "int32 lineIndex" (type_identifier) "int32" (identifier) "lineIndex" (,) "," (parameter_declaration) "float& x1" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "x1" (,) "," (parameter_declaration) "float& y1" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "y1" (,) "," (parameter_declaration) "float& x2" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "x2" (,) "," (parameter_declaration) "float& y2" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "y2" ()) ")" (;) ";" (declaration) "void GetTextBounds(int32 textOffset,\n float& x1, float& y1,\n float& x2, float& y2);" (primitive_type) "void" (function_declarator) "GetTextBounds(int32 textOffset,\n float& x1, float& y1,\n float& x2, float& y2)" (identifier) "GetTextBounds" (parameter_list) "(int32 textOffset,\n float& x1, float& y1,\n float& x2, float& y2)" (() "(" (parameter_declaration) "int32 textOffset" (type_identifier) "int32" (identifier) "textOffset" (,) "," (parameter_declaration) "float& x1" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "x1" (,) "," (parameter_declaration) "float& y1" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "y1" (,) "," (parameter_declaration) "float& x2" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "x2" (,) "," (parameter_declaration) "float& y2" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "y2" ()) ")" (;) ";" (declaration) "int32 TextOffsetAt(float x, float y,\n bool& rightOfCenter);" (type_identifier) "int32" (function_declarator) "TextOffsetAt(float x, float y,\n bool& rightOfCenter)" (identifier) "TextOffsetAt" (parameter_list) "(float x, float y,\n bool& rightOfCenter)" (() "(" (parameter_declaration) "float x" (primitive_type) "float" (identifier) "x" (,) "," (parameter_declaration) "float y" (primitive_type) "float" (identifier) "y" (,) "," (parameter_declaration) "bool& rightOfCenter" (primitive_type) "bool" (ERROR) "&" (&) "&" (identifier) "rightOfCenter" ()) ")" (;) ";" (ERROR) "private:" (type_identifier) "private" (:) ":" (declaration) "void _Init();" (primitive_type) "void" (function_declarator) "_Init()" (identifier) "_Init" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void _ValidateLayout();" (primitive_type) "void" (function_declarator) "_ValidateLayout()" (identifier) "_ValidateLayout" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void _Layout();" (primitive_type) "void" (function_declarator) "_Layout()" (identifier) "_Layout" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void _ApplyAlignment();" (primitive_type) "void" (function_declarator) "_ApplyAlignment()" (identifier) "_ApplyAlignment" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool _AppendGlyphInfos(const TextSpan& span);" (primitive_type) "bool" (function_declarator) "_AppendGlyphInfos(const TextSpan& span)" (identifier) "_AppendGlyphInfos" (parameter_list) "(const TextSpan& span)" (() "(" (parameter_declaration) "const TextSpan& span" (type_qualifier) "const" (const) "const" (type_identifier) "TextSpan" (ERROR) "&" (&) "&" (identifier) "span" ()) ")" (;) ";" (declaration) "bool _AppendGlyphInfo(uint32 charCode,\n float advanceX,\n const CharacterStyle& style);" (primitive_type) "bool" (function_declarator) "_AppendGlyphInfo(uint32 charCode,\n float advanceX,\n const CharacterStyle& style)" (identifier) "_AppendGlyphInfo" (parameter_list) "(uint32 charCode,\n float advanceX,\n const CharacterStyle& style)" (() "(" (parameter_declaration) "uint32 charCode" (type_identifier) "uint32" (identifier) "charCode" (,) "," (parameter_declaration) "float advanceX" (primitive_type) "float" (identifier) "advanceX" (,) "," (parameter_declaration) "const CharacterStyle& style" (type_qualifier) "const" (const) "const" (type_identifier) "CharacterStyle" (ERROR) "&" (&) "&" (identifier) "style" ()) ")" (;) ";" (declaration) "bool _FinalizeLine(int lineStart, int lineEnd,\n int lineIndex, float y, float& lineHeight);" (primitive_type) "bool" (function_declarator) "_FinalizeLine(int lineStart, int lineEnd,\n int lineIndex, float y, float& lineHeight)" (identifier) "_FinalizeLine" (parameter_list) "(int lineStart, int lineEnd,\n int lineIndex, float y, float& lineHeight)" (() "(" (parameter_declaration) "int lineStart" (primitive_type) "int" (identifier) "lineStart" (,) "," (parameter_declaration) "int lineEnd" (primitive_type) "int" (identifier) "lineEnd" (,) "," (parameter_declaration) "int lineIndex" (primitive_type) "int" (identifier) "lineIndex" (,) "," (parameter_declaration) "float y" (primitive_type) "float" (identifier) "y" (,) "," (parameter_declaration) "float& lineHeight" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "lineHeight" ()) ")" (;) ";" (declaration) "void _IncludeStyleInLine(LineInfo& line,\n const CharacterStyle& style);" (primitive_type) "void" (function_declarator) "_IncludeStyleInLine(LineInfo& line,\n const CharacterStyle& style)" (identifier) "_IncludeStyleInLine" (parameter_list) "(LineInfo& line,\n const CharacterStyle& style)" (() "(" (parameter_declaration) "LineInfo& line" (type_identifier) "LineInfo" (ERROR) "&" (&) "&" (identifier) "line" (,) "," (parameter_declaration) "const CharacterStyle& style" (type_qualifier) "const" (const) "const" (type_identifier) "CharacterStyle" (ERROR) "&" (&) "&" (identifier) "style" ()) ")" (;) ";" (ERROR) "void _DrawLine(BView* view, const BPoint& offset,\n const LineInfo& line) const;\n void _DrawSpan(BView* view, BPoint offset,\n const TextSpan& span,\n int32 textOffset) const;\n\n void _GetEmptyLayoutBounds(float& x1, float& y1,\n float& x2, float& y2) const;" (primitive_type) "void" (function_declarator) "_DrawLine(BView* view, const BPoint& offset,\n const LineInfo& line) const" (identifier) "_DrawLine" (parameter_list) "(BView* view, const BPoint& offset,\n const LineInfo& line)" (() "(" (parameter_declaration) "BView* view" (type_identifier) "BView" (pointer_declarator) "* view" (*) "*" (identifier) "view" (,) "," (parameter_declaration) "const BPoint& offset" (type_qualifier) "const" (const) "const" (type_identifier) "BPoint" (ERROR) "&" (&) "&" (identifier) "offset" (,) "," (parameter_declaration) "const LineInfo& line" (type_qualifier) "const" (const) "const" (type_identifier) "LineInfo" (ERROR) "&" (&) "&" (identifier) "line" ()) ")" (identifier) "const" (;) ";" (primitive_type) "void" (function_declarator) "_DrawSpan(BView* view, BPoint offset,\n const TextSpan& span,\n int32 textOffset) const" (identifier) "_DrawSpan" (parameter_list) "(BView* view, BPoint offset,\n const TextSpan& span,\n int32 textOffset)" (() "(" (parameter_declaration) "BView* view" (type_identifier) "BView" (pointer_declarator) "* view" (*) "*" (identifier) "view" (,) "," (parameter_declaration) "BPoint offset" (type_identifier) "BPoint" (identifier) "offset" (,) "," (parameter_declaration) "const TextSpan& span" (type_qualifier) "const" (const) "const" (type_identifier) "TextSpan" (ERROR) "&" (&) "&" (identifier) "span" (,) "," (parameter_declaration) "int32 textOffset" (type_identifier) "int32" (identifier) "textOffset" ()) ")" (identifier) "const" (;) ";" (primitive_type) "void" (function_declarator) "_GetEmptyLayoutBounds(float& x1, float& y1,\n float& x2, float& y2) const" (identifier) "_GetEmptyLayoutBounds" (parameter_list) "(float& x1, float& y1,\n float& x2, float& y2)" (() "(" (parameter_declaration) "float& x1" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "x1" (,) "," (parameter_declaration) "float& y1" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "y1" (,) "," (parameter_declaration) "float& x2" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "x2" (,) "," (parameter_declaration) "float& y2" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "y2" ()) ")" (identifier) "const" (;) ";" (declaration) "void _AppendTextSpans(const Paragraph& paragraph);" (primitive_type) "void" (function_declarator) "_AppendTextSpans(const Paragraph& paragraph)" (identifier) "_AppendTextSpans" (parameter_list) "(const Paragraph& paragraph)" (() "(" (parameter_declaration) "const Paragraph& paragraph" (type_qualifier) "const" (const) "const" (type_identifier) "Paragraph" (ERROR) "&" (&) "&" (identifier) "paragraph" ()) ")" (;) ";" (declaration) "private:\n std::vector<TextSpan>\n fTextSpans;" (type_identifier) "private" (ERROR) ":\n std::vector<TextSpan>" (:) ":" (identifier) "std" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "TextSpan" (>) ">" (identifier) "fTextSpans" (;) ";" (declaration) "ParagraphStyle fParagraphStyle;" (type_identifier) "ParagraphStyle" (identifier) "fParagraphStyle" (;) ";" (declaration) "float fWidth;" (primitive_type) "float" (identifier) "fWidth" (;) ";" (declaration) "bool fLayoutValid;" (primitive_type) "bool" (identifier) "fLayoutValid" (;) ";" (declaration) "std::vector<GlyphInfo>\n fGlyphInfos;" (type_identifier) "std" (ERROR) "::vector<GlyphInfo>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "GlyphInfo" (>) ">" (identifier) "fGlyphInfos" (;) ";" (declaration) "std::vector<LineInfo>\n fLineInfos;" (type_identifier) "std" (ERROR) "::vector<LineInfo>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "LineInfo" (>) ">" (identifier) "fLineInfos" (;) ";" (ERROR) "};\n\n\ntypedef" (}) "}" (;) ";" (typedef) "typedef" (declaration) "BReference<ParagraphLayout> ParagraphLayoutRef;" (type_identifier) "BReference" (ERROR) "<ParagraphLayout>" (<) "<" (identifier) "ParagraphLayout" (>) ">" (identifier) "ParagraphLayoutRef" (;) ";" (#endif) "#endif" (comment) "// PARAGRAPH_LAYOUT_H"
1,487
71
{"language": "c", "success": true, "metadata": {"lines": 210, "avg_line_length": 23.6, "nodes": 912, "errors": 0, "source_hash": "d12da5adf905b56a29651dd6162503e85e5f858e4983b96896944328492e08ae", "categorized_nodes": 671}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PARAGRAPH_LAYOUT_H\n#define PARAGRAPH_LAYOUT_H\n\n#include <vector>\n\n#include <Font.h>\n#include <Referenceable.h>\n#include <String.h>\n\n#include \"CharacterStyle.h\"\n#include \"List.h\"\n#include \"Paragraph.h\"\n\n\nclass BView;\n\n\nclass GlyphInfo {\npublic:\n\tGlyphInfo()\n\t\t:\n\t\tcharCode(0),\n\t\tx(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)\n\t{\n\t}\n\n\tGlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n\t\t:\n\t\tcharCode(charCode),\n\t\tx(x),\n\t\twidth(width),\n\t\tlineIndex(lineIndex)\n\t{\n\t}\n\n\tGlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode),\n\t\tx(other.x),\n\t\twidth(other.width),\n\t\tlineIndex(other.lineIndex)\n\t{\n\t}\n\n\tGlyphInfo& operator=(const GlyphInfo& other)\n\t{\n\t\tcharCode = other.charCode;\n\t\tx = other.x;\n\t\twidth = other.width;\n\t\tlineIndex = other.lineIndex;\n\t\treturn *this;\n\t}\n\n\tbool operator==(const GlyphInfo& other) const\n\t{\n\t\treturn charCode == other.charCode\n\t\t\t&& x == other.x\n\t\t\t&& width == other.width\n\t\t\t&& lineIndex == other.lineIndex;\n\t}\n\n\tbool operator!=(const GlyphInfo& other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\npublic:\n\tuint32\t\t\t\t\tcharCode;\n\n\tfloat\t\t\t\t\tx;\n\tfloat\t\t\t\t\twidth;\n\n\tint32\t\t\t\t\tlineIndex;\n};\n\n\nclass LineInfo {\npublic:\n\tLineInfo()\n\t\t:\n\t\ttextOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)\n\t\t:\n\t\ttextOffset(textOffset),\n\t\ty(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)\n\t\t:\n\t\ttextOffset(other.textOffset),\n\t\ty(other.y),\n\t\theight(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset;\n\t\ty = other.y;\n\t\theight = other.height;\n\t\tmaxAscent = other.maxAscent;\n\t\tmaxDescent = other.maxDescent;\n\t\textraGlyphSpacing = other.extraGlyphSpacing;\n\t\textraWhiteSpacing = other.extraWhiteSpacing;\n\t\tlayoutedSpans = other.layoutedSpans;\n\t\treturn *this;\n\t}\n\n\tbool operator==(const LineInfo& other) const\n\t{\n\t\treturn textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent\n\t\t\t&& extraGlyphSpacing == other.extraGlyphSpacing\n\t\t\t&& extraWhiteSpacing == other.extraWhiteSpacing\n\t\t\t&& layoutedSpans == other.layoutedSpans;\n\t}\n\n\tbool operator!=(const LineInfo& other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\npublic:\n\tint32\t\t\ttextOffset;\n\n\tfloat\t\t\ty;\n\tfloat\t\t\theight;\n\n\tfloat\t\t\tmaxAscent;\n\tfloat\t\t\tmaxDescent;\n\n\tfloat\t\t\textraGlyphSpacing;\n\tfloat\t\t\textraWhiteSpacing;\n\n\tstd::vector<TextSpan>\n\t\t\t\t\tlayoutedSpans;\n};\n\n\nclass ParagraphLayout : public BReferenceable {\npublic:\n\t\t\t\t\t\t\t\tParagraphLayout();\n\t\t\t\t\t\t\t\tParagraphLayout(const Paragraph& paragraph);\n\t\t\t\t\t\t\t\tParagraphLayout(const ParagraphLayout& other);\n\tvirtual\t\t\t\t\t\t~ParagraphLayout();\n\n\t\t\tvoid\t\t\t\tSetParagraph(const Paragraph& paragraph);\n\t\t\tconst ParagraphStyle& Style() const\n\t\t\t\t\t\t\t\t\t{ return fParagraphStyle; }\n\n\t\t\tvoid\t\t\t\tSetWidth(float width);\n\t\t\tfloat\t\t\t\tWidth() const\n\t\t\t\t\t\t\t\t\t{ return fWidth; }\n\n\t\t\tfloat\t\t\t\tHeight();\n\t\t\tvoid\t\t\t\tDraw(BView* view, const BPoint& offset);\n\n\t\t\tint32\t\t\t\tCountGlyphs() const;\n\t\t\tint32\t\t\t\tCountLines();\n\n\t\t\tint32\t\t\t\tLineIndexForOffset(int32 textOffset);\n\t\t\tint32\t\t\t\tFirstOffsetOnLine(int32 lineIndex);\n\t\t\tint32\t\t\t\tLastOffsetOnLine(int32 lineIndex);\n\n\t\t\tvoid\t\t\t\tGetLineBounds(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);\n\n\t\t\tvoid\t\t\t\tGetTextBounds(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);\n\n\t\t\tint32\t\t\t\tTextOffsetAt(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter);\n\nprivate:\n\t\t\tvoid\t\t\t\t_Init();\n\n\t\t\tvoid\t\t\t\t_ValidateLayout();\n\t\t\tvoid\t\t\t\t_Layout();\n\t\t\tvoid\t\t\t\t_ApplyAlignment();\n\n\t\t\tbool\t\t\t\t_AppendGlyphInfos(const TextSpan& span);\n\t\t\tbool\t\t\t\t_AppendGlyphInfo(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);\n\n\t\t\tbool\t\t\t\t_FinalizeLine(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight);\n\n\t\t\tvoid\t\t\t\t_IncludeStyleInLine(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);\n\n\t\t\tvoid\t\t\t\t_DrawLine(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line) const;\n\t\t\tvoid\t\t\t\t_DrawSpan(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset) const;\n\n\t\t\tvoid\t\t\t\t_GetEmptyLayoutBounds(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2) const;\n\n\t\t\tvoid\t\t\t\t_AppendTextSpans(const Paragraph& paragraph);\n\nprivate:\n\t\t\tstd::vector<TextSpan>\n\t\t\t\t\t\t\t\tfTextSpans;\n\t\t\tParagraphStyle\t\tfParagraphStyle;\n\n\t\t\tfloat\t\t\t\tfWidth;\n\t\t\tbool\t\t\t\tfLayoutValid;\n\n\t\t\tstd::vector<GlyphInfo>\n\t\t\t\t\t\t\t\tfGlyphInfos;\n\t\t\tstd::vector<LineInfo>\n\t\t\t\t\t\t\t\tfLineInfos;\n};\n\n\ntypedef BReference<ParagraphLayout> ParagraphLayoutRef;\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 29, 228, 457, 527, 544, 548, 551, 554, 557, 560, 563, 566, 575, 911], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 255, "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": "PARAGRAPH_LAYOUT_H", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define PARAGRAPH_LAYOUT_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": "PARAGRAPH_LAYOUT_H", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <vector>\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": "<vector>", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <Font.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": "<Font.h>", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <Referenceable.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": "<Referenceable.h>", "parent": 12, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 26}}, {"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 \"CharacterStyle.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"CharacterStyle.h\"", "parent": 18, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 27}}, {"id": 21, "type": "preproc_include", "text": "#include \"List.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": "\"List.h\"", "parent": 21, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 17}}, {"id": 24, "type": "preproc_include", "text": "#include \"Paragraph.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"Paragraph.h\"", "parent": 24, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 22}}, {"id": 27, "type": "declaration", "text": "class BView;", "parent": 0, "children": [28], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 12}}, {"id": 28, "type": "identifier", "text": "BView", "parent": 27, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 11}}, {"id": 29, "type": "function_definition", "text": "class GlyphInfo {\npublic:\n\tGlyphInfo()\n\t\t:\n\t\tcharCode(0),\n\t\tx(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)\n\t{\n\t}\n\n\tGlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n\t\t:\n\t\tcharCode(charCode),\n\t\tx(x),\n\t\twidth(width),\n\t\tlineIndex(lineIndex)\n\t{\n\t}\n\n\tGlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode),\n\t\tx(other.x),\n\t\twidth(other.width),\n\t\tlineIndex(other.lineIndex)\n\t{\n\t}\n\n\tGlyphInfo& operator=(const GlyphInfo& other)\n\t{\n\t\tcharCode = other.charCode;\n\t\tx = other.x;\n\t\twidth = other.width;\n\t\tlineIndex = other.lineIndex;\n\t\treturn *this;\n\t}\n\n\tbool operator==(const GlyphInfo& other) const\n\t{\n\t\treturn charCode == other.charCode\n\t\t\t&& x == other.x\n\t\t\t&& width == other.width\n\t\t\t&& lineIndex == other.lineIndex;\n\t}\n\n\tbool operator!=(const GlyphInfo& other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\npublic:\n\tuint32\t\t\t\t\tcharCode;\n\n\tfloat\t\t\t\t\tx;\n\tfloat\t\t\t\t\twidth;\n\n\tint32\t\t\t\t\tlineIndex;\n}", "parent": 0, "children": [30], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 30, "type": "identifier", "text": "GlyphInfo", "parent": 29, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 15}}, {"id": 31, "type": "labeled_statement", "text": "public:\n\tGlyphInfo()\n\t\t:\n\t\tcharCode(0),\n\t\tx(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)", "parent": 29, "children": [32], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 29, "column": 14}}, {"id": 32, "type": "ERROR", "text": ":\n\tGlyphInfo()", "parent": 31, "children": [33], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 24, "column": 12}}, {"id": 33, "type": "call_expression", "text": "GlyphInfo()", "parent": 32, "children": [34, 35], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 12}}, {"id": 34, "type": "identifier", "text": "GlyphInfo", "parent": 33, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 10}}, {"id": 35, "type": "argument_list", "text": "()", "parent": 33, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 12}}, {"id": 36, "type": "comma_expression", "text": "charCode(0),\n\t\tx(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)", "parent": 31, "children": [37, 41], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 29, "column": 14}}, {"id": 37, "type": "call_expression", "text": "charCode(0)", "parent": 36, "children": [38, 39], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 13}}, {"id": 38, "type": "identifier", "text": "charCode", "parent": 37, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 10}}, {"id": 39, "type": "argument_list", "text": "(0)", "parent": 37, "children": [40], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 13}}, {"id": 40, "type": "number_literal", "text": "0", "parent": 39, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 12}}, {"id": 41, "type": "comma_expression", "text": "x(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)", "parent": 36, "children": [42, 46], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 29, "column": 14}}, {"id": 42, "type": "call_expression", "text": "x(0.0f)", "parent": 41, "children": [43, 44], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 9}}, {"id": 43, "type": "identifier", "text": "x", "parent": 42, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 3}}, {"id": 44, "type": "argument_list", "text": "(0.0f)", "parent": 42, "children": [45], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 9}}, {"id": 45, "type": "number_literal", "text": "0.0f", "parent": 44, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 46, "type": "comma_expression", "text": "width(0.0f),\n\t\tlineIndex(0)", "parent": 41, "children": [47, 51], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 29, "column": 14}}, {"id": 47, "type": "call_expression", "text": "width(0.0f)", "parent": 46, "children": [48, 49], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 13}}, {"id": 48, "type": "identifier", "text": "width", "parent": 47, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 7}}, {"id": 49, "type": "argument_list", "text": "(0.0f)", "parent": 47, "children": [50], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 13}}, {"id": 50, "type": "number_literal", "text": "0.0f", "parent": 49, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 12}}, {"id": 51, "type": "call_expression", "text": "lineIndex(0)", "parent": 46, "children": [52, 53], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 14}}, {"id": 52, "type": "identifier", "text": "lineIndex", "parent": 51, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 11}}, {"id": 53, "type": "argument_list", "text": "(0)", "parent": 51, "children": [54], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 14}}, {"id": 54, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 13}}, {"id": 55, "type": "declaration", "text": "GlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n\t\t:\n\t\tcharCode(charCode),\n\t\tx(x),\n\t\twidth(width),\n\t\tlineIndex(lineIndex)\n\t{\n\t}\n\n\tGlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode),\n\t\tx(other.x),\n\t\twidth(other.width),\n\t\tlineIndex(other.lineIndex)\n\t{\n\t}\n\n\tGlyphInfo& operator=(const GlyphInfo& other)", "parent": 29, "children": [56, 60, 61, 62, 64, 65, 67, 70, 75, 80, 85, 103, 109, 115, 123], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 51, "column": 45}}, {"id": 56, "type": "macro_type_specifier", "text": "GlyphInfo(uint32", "parent": 55, "children": [57, 58], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 17}}, {"id": 57, "type": "identifier", "text": "GlyphInfo", "parent": 56, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 10}}, {"id": 58, "type": "type_descriptor", "text": "uint32", "parent": 56, "children": [59], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 17}}, {"id": 59, "type": "type_identifier", "text": "uint32", "parent": 58, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 17}}, {"id": 60, "type": "identifier", "text": "charCode", "parent": 55, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 26}}, {"id": 61, "type": "identifier", "text": "float", "parent": 55, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 33}}, {"id": 62, "type": "ERROR", "text": "x", "parent": 55, "children": [63], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 35}}, {"id": 63, "type": "identifier", "text": "x", "parent": 62, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 35}}, {"id": 64, "type": "identifier", "text": "float", "parent": 55, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 42}}, {"id": 65, "type": "ERROR", "text": "width", "parent": 55, "children": [66], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 48}}, {"id": 66, "type": "identifier", "text": "width", "parent": 65, "children": [], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 48}}, {"id": 67, "type": "ERROR", "text": "int32 lineIndex)\n\t\t:", "parent": 55, "children": [68, 69], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 34, "column": 3}}, {"id": 68, "type": "identifier", "text": "int32", "parent": 67, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 55}}, {"id": 69, "type": "identifier", "text": "lineIndex", "parent": 67, "children": [], "start_point": {"row": 33, "column": 56}, "end_point": {"row": 33, "column": 65}}, {"id": 70, "type": "function_declarator", "text": "charCode(charCode)", "parent": 55, "children": [71, 72], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 71, "type": "identifier", "text": "charCode", "parent": 70, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 10}}, {"id": 72, "type": "parameter_list", "text": "(charCode)", "parent": 70, "children": [73], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 20}}, {"id": 73, "type": "parameter_declaration", "text": "charCode", "parent": 72, "children": [74], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 19}}, {"id": 74, "type": "type_identifier", "text": "charCode", "parent": 73, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 19}}, {"id": 75, "type": "function_declarator", "text": "x(x)", "parent": 55, "children": [76, 77], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 6}}, {"id": 76, "type": "identifier", "text": "x", "parent": 75, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 3}}, {"id": 77, "type": "parameter_list", "text": "(x)", "parent": 75, "children": [78], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 6}}, {"id": 78, "type": "parameter_declaration", "text": "x", "parent": 77, "children": [79], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 79, "type": "type_identifier", "text": "x", "parent": 78, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 80, "type": "function_declarator", "text": "width(width)", "parent": 55, "children": [81, 82], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 14}}, {"id": 81, "type": "identifier", "text": "width", "parent": 80, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 7}}, {"id": 82, "type": "parameter_list", "text": "(width)", "parent": 80, "children": [83], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 14}}, {"id": 83, "type": "parameter_declaration", "text": "width", "parent": 82, "children": [84], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 13}}, {"id": 84, "type": "type_identifier", "text": "width", "parent": 83, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 13}}, {"id": 85, "type": "ERROR", "text": "lineIndex(lineIndex)\n\t{\n\t}\n\n\tGlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode),", "parent": 55, "children": [86, 91], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 44, "column": 27}}, {"id": 86, "type": "function_declarator", "text": "lineIndex(lineIndex)", "parent": 85, "children": [87, 88], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 22}}, {"id": 87, "type": "identifier", "text": "lineIndex", "parent": 86, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 11}}, {"id": 88, "type": "parameter_list", "text": "(lineIndex)", "parent": 86, "children": [89], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 22}}, {"id": 89, "type": "parameter_declaration", "text": "lineIndex", "parent": 88, "children": [90], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 21}}, {"id": 90, "type": "type_identifier", "text": "lineIndex", "parent": 89, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 21}}, {"id": 91, "type": "function_declarator", "text": "GlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode)", "parent": 85, "children": [92, 93, 97], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 44, "column": 26}}, {"id": 92, "type": "identifier", "text": "GlyphInfo", "parent": 91, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 10}}, {"id": 93, "type": "parameter_list", "text": "(const GlyphInfo& other)", "parent": 91, "children": [94], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 34}}, {"id": 94, "type": "parameter_declaration", "text": "const GlyphInfo& other", "parent": 93, "children": [95, 96], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 33}}, {"id": 95, "type": "type_identifier", "text": "GlyphInfo", "parent": 94, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 26}}, {"id": 96, "type": "identifier", "text": "other", "parent": 94, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 33}}, {"id": 97, "type": "call_expression", "text": "charCode(other.charCode)", "parent": 91, "children": [98, 99], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 26}}, {"id": 98, "type": "identifier", "text": "charCode", "parent": 97, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 10}}, {"id": 99, "type": "argument_list", "text": "(other.charCode)", "parent": 97, "children": [100, 102], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 26}}, {"id": 100, "type": "ERROR", "text": "other.", "parent": 99, "children": [101], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 17}}, {"id": 101, "type": "identifier", "text": "other", "parent": 100, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 16}}, {"id": 102, "type": "identifier", "text": "charCode", "parent": 99, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 25}}, {"id": 103, "type": "function_declarator", "text": "x(other.x)", "parent": 55, "children": [104, 105], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 12}}, {"id": 104, "type": "identifier", "text": "x", "parent": 103, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 3}}, {"id": 105, "type": "parameter_list", "text": "(other.x)", "parent": 103, "children": [106], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 12}}, {"id": 106, "type": "parameter_declaration", "text": "other.x", "parent": 105, "children": [107, 108], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 107, "type": "type_identifier", "text": "other", "parent": 106, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 9}}, {"id": 108, "type": "identifier", "text": "x", "parent": 106, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 11}}, {"id": 109, "type": "function_declarator", "text": "width(other.width)", "parent": 55, "children": [110, 111], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 20}}, {"id": 110, "type": "identifier", "text": "width", "parent": 109, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 7}}, {"id": 111, "type": "parameter_list", "text": "(other.width)", "parent": 109, "children": [112], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 20}}, {"id": 112, "type": "parameter_declaration", "text": "other.width", "parent": 111, "children": [113, 114], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 19}}, {"id": 113, "type": "type_identifier", "text": "other", "parent": 112, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 13}}, {"id": 114, "type": "identifier", "text": "width", "parent": 112, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 19}}, {"id": 115, "type": "ERROR", "text": "lineIndex(other.lineIndex)\n\t{\n\t}\n\n\tGlyphInfo&", "parent": 55, "children": [116, 122], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 51, "column": 11}}, {"id": 116, "type": "function_declarator", "text": "lineIndex(other.lineIndex)", "parent": 115, "children": [117, 118], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 28}}, {"id": 117, "type": "identifier", "text": "lineIndex", "parent": 116, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 11}}, {"id": 118, "type": "parameter_list", "text": "(other.lineIndex)", "parent": 116, "children": [119], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 28}}, {"id": 119, "type": "parameter_declaration", "text": "other.lineIndex", "parent": 118, "children": [120, 121], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 27}}, {"id": 120, "type": "type_identifier", "text": "other", "parent": 119, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 17}}, {"id": 121, "type": "identifier", "text": "lineIndex", "parent": 119, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 27}}, {"id": 122, "type": "identifier", "text": "GlyphInfo", "parent": 115, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 10}}, {"id": 123, "type": "init_declarator", "text": "operator=(const GlyphInfo& other)", "parent": 55, "children": [124, 125, 126], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 45}}, {"id": 124, "type": "identifier", "text": "operator", "parent": 123, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 20}}, {"id": 125, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 21}}, {"id": 126, "type": "parenthesized_expression", "text": "(const GlyphInfo& other)", "parent": 123, "children": [127, 130], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 45}}, {"id": 127, "type": "ERROR", "text": "const GlyphInfo", "parent": 126, "children": [128], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 37}}, {"id": 128, "type": "type_descriptor", "text": "const GlyphInfo", "parent": 127, "children": [129], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 37}}, {"id": 129, "type": "type_identifier", "text": "GlyphInfo", "parent": 128, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 37}}, {"id": 130, "type": "pointer_expression", "text": "& other", "parent": 126, "children": [131], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 44}}, {"id": 131, "type": "identifier", "text": "other", "parent": 130, "children": [], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 44}}, {"id": 132, "type": "assignment_expression", "text": "charCode = other.charCode", "parent": 29, "children": [133, 134, 135], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 27}}, {"id": 133, "type": "identifier", "text": "charCode", "parent": 132, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 10}}, {"id": 134, "type": "=", "text": "=", "parent": 132, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 12}}, {"id": 135, "type": "field_expression", "text": "other.charCode", "parent": 132, "children": [136, 137], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 27}}, {"id": 136, "type": "identifier", "text": "other", "parent": 135, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 18}}, {"id": 137, "type": "field_identifier", "text": "charCode", "parent": 135, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 27}}, {"id": 138, "type": "assignment_expression", "text": "x = other.x", "parent": 29, "children": [139, 140, 141], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 13}}, {"id": 139, "type": "identifier", "text": "x", "parent": 138, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 3}}, {"id": 140, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 5}}, {"id": 141, "type": "field_expression", "text": "other.x", "parent": 138, "children": [142, 143], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 13}}, {"id": 142, "type": "identifier", "text": "other", "parent": 141, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 11}}, {"id": 143, "type": "field_identifier", "text": "x", "parent": 141, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 13}}, {"id": 144, "type": "assignment_expression", "text": "width = other.width", "parent": 29, "children": [145, 146, 147], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 21}}, {"id": 145, "type": "identifier", "text": "width", "parent": 144, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 7}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 9}}, {"id": 147, "type": "field_expression", "text": "other.width", "parent": 144, "children": [148, 149], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 21}}, {"id": 148, "type": "identifier", "text": "other", "parent": 147, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 15}}, {"id": 149, "type": "field_identifier", "text": "width", "parent": 147, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 21}}, {"id": 150, "type": "assignment_expression", "text": "lineIndex = other.lineIndex", "parent": 29, "children": [151, 152, 153], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 29}}, {"id": 151, "type": "identifier", "text": "lineIndex", "parent": 150, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 11}}, {"id": 152, "type": "=", "text": "=", "parent": 150, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 13}}, {"id": 153, "type": "field_expression", "text": "other.lineIndex", "parent": 150, "children": [154, 155], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 29}}, {"id": 154, "type": "identifier", "text": "other", "parent": 153, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 19}}, {"id": 155, "type": "field_identifier", "text": "lineIndex", "parent": 153, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 29}}, {"id": 156, "type": "return_statement", "text": "return *this;", "parent": 29, "children": [157], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 15}}, {"id": 157, "type": "pointer_expression", "text": "*this", "parent": 156, "children": [158, 159], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 14}}, {"id": 158, "type": "*", "text": "*", "parent": 157, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 10}}, {"id": 159, "type": "identifier", "text": "this", "parent": 157, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 14}}, {"id": 160, "type": "ERROR", "text": "bool operator==(const GlyphInfo& other) const", "parent": 29, "children": [161, 162, 163, 164, 165], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 46}}, {"id": 161, "type": "primitive_type", "text": "bool", "parent": 160, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 5}}, {"id": 162, "type": "identifier", "text": "operator", "parent": 160, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 14}}, {"id": 163, "type": "==", "text": "==", "parent": 160, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 16}}, {"id": 164, "type": "type_identifier", "text": "GlyphInfo", "parent": 160, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 32}}, {"id": 165, "type": "pointer_expression", "text": "& other", "parent": 160, "children": [166], "start_point": {"row": 60, "column": 32}, "end_point": {"row": 60, "column": 39}}, {"id": 166, "type": "identifier", "text": "other", "parent": 165, "children": [], "start_point": {"row": 60, "column": 34}, "end_point": {"row": 60, "column": 39}}, {"id": 167, "type": "return_statement", "text": "return charCode == other.charCode\n\t\t\t&& x == other.x\n\t\t\t&& width == other.width\n\t\t\t&& lineIndex == other.lineIndex;", "parent": 29, "children": [168], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 65, "column": 35}}, {"id": 168, "type": "binary_expression", "text": "charCode == other.charCode\n\t\t\t&& x == other.x\n\t\t\t&& width == other.width\n\t\t\t&& lineIndex == other.lineIndex", "parent": 167, "children": [169, 191, 192], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 65, "column": 34}}, {"id": 169, "type": "binary_expression", "text": "charCode == other.charCode\n\t\t\t&& x == other.x\n\t\t\t&& width == other.width", "parent": 168, "children": [170, 184, 185], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 64, "column": 26}}, {"id": 170, "type": "binary_expression", "text": "charCode == other.charCode\n\t\t\t&& x == other.x", "parent": 169, "children": [171, 177, 178], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 63, "column": 18}}, {"id": 171, "type": "binary_expression", "text": "charCode == other.charCode", "parent": 170, "children": [172, 173, 174], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 35}}, {"id": 172, "type": "identifier", "text": "charCode", "parent": 171, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 17}}, {"id": 173, "type": "==", "text": "==", "parent": 171, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 20}}, {"id": 174, "type": "field_expression", "text": "other.charCode", "parent": 171, "children": [175, 176], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 35}}, {"id": 175, "type": "identifier", "text": "other", "parent": 174, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 26}}, {"id": 176, "type": "field_identifier", "text": "charCode", "parent": 174, "children": [], "start_point": {"row": 62, "column": 27}, "end_point": {"row": 62, "column": 35}}, {"id": 177, "type": "&&", "text": "&&", "parent": 170, "children": [], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 5}}, {"id": 178, "type": "binary_expression", "text": "x == other.x", "parent": 170, "children": [179, 180, 181], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 18}}, {"id": 179, "type": "identifier", "text": "x", "parent": 178, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 7}}, {"id": 180, "type": "==", "text": "==", "parent": 178, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 10}}, {"id": 181, "type": "field_expression", "text": "other.x", "parent": 178, "children": [182, 183], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 18}}, {"id": 182, "type": "identifier", "text": "other", "parent": 181, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 16}}, {"id": 183, "type": "field_identifier", "text": "x", "parent": 181, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 18}}, {"id": 184, "type": "&&", "text": "&&", "parent": 169, "children": [], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 5}}, {"id": 185, "type": "binary_expression", "text": "width == other.width", "parent": 169, "children": [186, 187, 188], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 26}}, {"id": 186, "type": "identifier", "text": "width", "parent": 185, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 11}}, {"id": 187, "type": "==", "text": "==", "parent": 185, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 14}}, {"id": 188, "type": "field_expression", "text": "other.width", "parent": 185, "children": [189, 190], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 26}}, {"id": 189, "type": "identifier", "text": "other", "parent": 188, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 20}}, {"id": 190, "type": "field_identifier", "text": "width", "parent": 188, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 26}}, {"id": 191, "type": "&&", "text": "&&", "parent": 168, "children": [], "start_point": {"row": 65, "column": 3}, "end_point": {"row": 65, "column": 5}}, {"id": 192, "type": "binary_expression", "text": "lineIndex == other.lineIndex", "parent": 168, "children": [193, 194, 195], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 34}}, {"id": 193, "type": "identifier", "text": "lineIndex", "parent": 192, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 15}}, {"id": 194, "type": "==", "text": "==", "parent": 192, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 18}}, {"id": 195, "type": "field_expression", "text": "other.lineIndex", "parent": 192, "children": [196, 197], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 34}}, {"id": 196, "type": "identifier", "text": "other", "parent": 195, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 24}}, {"id": 197, "type": "field_identifier", "text": "lineIndex", "parent": 195, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 34}}, {"id": 198, "type": "ERROR", "text": "bool operator!=(const GlyphInfo& other) const", "parent": 29, "children": [199, 200, 201, 202, 203], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 46}}, {"id": 199, "type": "primitive_type", "text": "bool", "parent": 198, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 5}}, {"id": 200, "type": "identifier", "text": "operator", "parent": 198, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 14}}, {"id": 201, "type": "!=", "text": "!=", "parent": 198, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 16}}, {"id": 202, "type": "type_identifier", "text": "GlyphInfo", "parent": 198, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 32}}, {"id": 203, "type": "pointer_expression", "text": "& other", "parent": 198, "children": [204], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 39}}, {"id": 204, "type": "identifier", "text": "other", "parent": 203, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 39}}, {"id": 205, "type": "return_statement", "text": "return !(*this == other);", "parent": 29, "children": [206], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 27}}, {"id": 206, "type": "unary_expression", "text": "!(*this == other)", "parent": 205, "children": [207, 208], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 26}}, {"id": 207, "type": "!", "text": "!", "parent": 206, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 10}}, {"id": 208, "type": "parenthesized_expression", "text": "(*this == other)", "parent": 206, "children": [209], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 26}}, {"id": 209, "type": "binary_expression", "text": "*this == other", "parent": 208, "children": [210, 213, 214], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 25}}, {"id": 210, "type": "pointer_expression", "text": "*this", "parent": 209, "children": [211, 212], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 16}}, {"id": 211, "type": "*", "text": "*", "parent": 210, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 12}}, {"id": 212, "type": "identifier", "text": "this", "parent": 210, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 16}}, {"id": 213, "type": "==", "text": "==", "parent": 209, "children": [], "start_point": {"row": 70, "column": 17}, "end_point": {"row": 70, "column": 19}}, {"id": 214, "type": "identifier", "text": "other", "parent": 209, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 25}}, {"id": 215, "type": "labeled_statement", "text": "public:\n\tuint32\t\t\t\t\tcharCode;", "parent": 29, "children": [216], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 74, "column": 21}}, {"id": 216, "type": "declaration", "text": "uint32\t\t\t\t\tcharCode;", "parent": 215, "children": [217, 218], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 21}}, {"id": 217, "type": "type_identifier", "text": "uint32", "parent": 216, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 7}}, {"id": 218, "type": "identifier", "text": "charCode", "parent": 216, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 20}}, {"id": 219, "type": "declaration", "text": "float\t\t\t\t\tx;", "parent": 29, "children": [220, 221], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 13}}, {"id": 220, "type": "primitive_type", "text": "float", "parent": 219, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 6}}, {"id": 221, "type": "identifier", "text": "x", "parent": 219, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 12}}, {"id": 222, "type": "declaration", "text": "float\t\t\t\t\twidth;", "parent": 29, "children": [223, 224], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 17}}, {"id": 223, "type": "primitive_type", "text": "float", "parent": 222, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 6}}, {"id": 224, "type": "identifier", "text": "width", "parent": 222, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 16}}, {"id": 225, "type": "declaration", "text": "int32\t\t\t\t\tlineIndex;", "parent": 29, "children": [226, 227], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 21}}, {"id": 226, "type": "type_identifier", "text": "int32", "parent": 225, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 6}}, {"id": 227, "type": "identifier", "text": "lineIndex", "parent": 225, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 20}}, {"id": 228, "type": "function_definition", "text": "class LineInfo {\npublic:\n\tLineInfo()\n\t\t:\n\t\ttextOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)\n\t\t:\n\t\ttextOffset(textOffset),\n\t\ty(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)\n\t\t:\n\t\ttextOffset(other.textOffset),\n\t\ty(other.y),\n\t\theight(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset;\n\t\ty = other.y;\n\t\theight = other.height;\n\t\tmaxAscent = other.maxAscent;\n\t\tmaxDescent = other.maxDescent;\n\t\textraGlyphSpacing = other.extraGlyphSpacing;\n\t\textraWhiteSpacing = other.extraWhiteSpacing;\n\t\tlayoutedSpans = other.layoutedSpans;\n\t\treturn *this;\n\t}", "parent": 0, "children": [229], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 136, "column": 2}}, {"id": 229, "type": "identifier", "text": "LineInfo", "parent": 228, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 14}}, {"id": 230, "type": "labeled_statement", "text": "public:\n\tLineInfo()\n\t\t:\n\t\ttextOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)\n\t\t:\n\t\ttextOffset(textOffset),\n\t\ty(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)\n\t\t:\n\t\ttextOffset(other.textOffset),\n\t\ty(other.y),\n\t\theight(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset;", "parent": 228, "children": [231], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 127, "column": 32}}, {"id": 231, "type": "ERROR", "text": ":\n\tLineInfo()\n\t\t:\n\t\ttextOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)\n\t\t:\n\t\ttextOffset(textOffset),\n\t\ty(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 230, "children": [232, 235, 292], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 112, "column": 32}}, {"id": 232, "type": "call_expression", "text": "LineInfo()", "parent": 231, "children": [233, 234], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 11}}, {"id": 233, "type": "identifier", "text": "LineInfo", "parent": 232, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 9}}, {"id": 234, "type": "argument_list", "text": "()", "parent": 232, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 11}}, {"id": 235, "type": "comma_expression", "text": "textOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 231, "children": [236, 240], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 236, "type": "call_expression", "text": "textOffset(0)", "parent": 235, "children": [237, 238], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 15}}, {"id": 237, "type": "identifier", "text": "textOffset", "parent": 236, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 12}}, {"id": 238, "type": "argument_list", "text": "(0)", "parent": 236, "children": [239], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 15}}, {"id": 239, "type": "number_literal", "text": "0", "parent": 238, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 14}}, {"id": 240, "type": "comma_expression", "text": "y(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 235, "children": [241, 245], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 241, "type": "call_expression", "text": "y(0.0f)", "parent": 240, "children": [242, 243], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 9}}, {"id": 242, "type": "identifier", "text": "y", "parent": 241, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 3}}, {"id": 243, "type": "argument_list", "text": "(0.0f)", "parent": 241, "children": [244], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 9}}, {"id": 244, "type": "number_literal", "text": "0.0f", "parent": 243, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 8}}, {"id": 245, "type": "comma_expression", "text": "height(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 240, "children": [246, 250], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 246, "type": "call_expression", "text": "height(0.0f)", "parent": 245, "children": [247, 248], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 14}}, {"id": 247, "type": "identifier", "text": "height", "parent": 246, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 8}}, {"id": 248, "type": "argument_list", "text": "(0.0f)", "parent": 246, "children": [249], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 14}}, {"id": 249, "type": "number_literal", "text": "0.0f", "parent": 248, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 13}}, {"id": 250, "type": "comma_expression", "text": "maxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 245, "children": [251, 255], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 251, "type": "call_expression", "text": "maxAscent(0.0f)", "parent": 250, "children": [252, 253], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 17}}, {"id": 252, "type": "identifier", "text": "maxAscent", "parent": 251, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 11}}, {"id": 253, "type": "argument_list", "text": "(0.0f)", "parent": 251, "children": [254], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 17}}, {"id": 254, "type": "number_literal", "text": "0.0f", "parent": 253, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 16}}, {"id": 255, "type": "comma_expression", "text": "maxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 250, "children": [256, 260], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 256, "type": "call_expression", "text": "maxDescent(0.0f)", "parent": 255, "children": [257, 258], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 18}}, {"id": 257, "type": "identifier", "text": "maxDescent", "parent": 256, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 12}}, {"id": 258, "type": "argument_list", "text": "(0.0f)", "parent": 256, "children": [259], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 18}}, {"id": 259, "type": "number_literal", "text": "0.0f", "parent": 258, "children": [], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 17}}, {"id": 260, "type": "comma_expression", "text": "extraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 255, "children": [261, 265], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 261, "type": "call_expression", "text": "extraGlyphSpacing(0.0f)", "parent": 260, "children": [262, 263], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 25}}, {"id": 262, "type": "identifier", "text": "extraGlyphSpacing", "parent": 261, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 19}}, {"id": 263, "type": "argument_list", "text": "(0.0f)", "parent": 261, "children": [264], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 25}}, {"id": 264, "type": "number_literal", "text": "0.0f", "parent": 263, "children": [], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 24}}, {"id": 265, "type": "comma_expression", "text": "extraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 260, "children": [266, 270, 274], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 99, "column": 19}}, {"id": 266, "type": "call_expression", "text": "extraWhiteSpacing(0.0f)", "parent": 265, "children": [267, 268], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 25}}, {"id": 267, "type": "identifier", "text": "extraWhiteSpacing", "parent": 266, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 19}}, {"id": 268, "type": "argument_list", "text": "(0.0f)", "parent": 266, "children": [269], "start_point": {"row": 93, "column": 19}, "end_point": {"row": 93, "column": 25}}, {"id": 269, "type": "number_literal", "text": "0.0f", "parent": 268, "children": [], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 24}}, {"id": 270, "type": "ERROR", "text": "layoutedSpans()\n\t{\n\t}", "parent": 265, "children": [271], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 96, "column": 2}}, {"id": 271, "type": "call_expression", "text": "layoutedSpans()", "parent": 270, "children": [272, 273], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 17}}, {"id": 272, "type": "identifier", "text": "layoutedSpans", "parent": 271, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 15}}, {"id": 273, "type": "argument_list", "text": "()", "parent": 271, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 17}}, {"id": 274, "type": "call_expression", "text": "LineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 265, "children": [275, 276], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 99, "column": 19}}, {"id": 275, "type": "identifier", "text": "LineInfo", "parent": 274, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 9}}, {"id": 276, "type": "argument_list", "text": "(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)", "parent": 274, "children": [277, 279, 280, 281, 283, 285, 286, 288, 289, 291], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 99, "column": 19}}, {"id": 277, "type": "ERROR", "text": "int32", "parent": 276, "children": [278], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 15}}, {"id": 278, "type": "identifier", "text": "int32", "parent": 277, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 15}}, {"id": 279, "type": "identifier", "text": "textOffset", "parent": 276, "children": [], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 26}}, {"id": 280, "type": "identifier", "text": "float", "parent": 276, "children": [], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 33}}, {"id": 281, "type": "ERROR", "text": "y", "parent": 276, "children": [282], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 35}}, {"id": 282, "type": "identifier", "text": "y", "parent": 281, "children": [], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 35}}, {"id": 283, "type": "ERROR", "text": "float", "parent": 276, "children": [284], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 42}}, {"id": 284, "type": "identifier", "text": "float", "parent": 283, "children": [], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 42}}, {"id": 285, "type": "identifier", "text": "height", "parent": 276, "children": [], "start_point": {"row": 98, "column": 43}, "end_point": {"row": 98, "column": 49}}, {"id": 286, "type": "ERROR", "text": "float", "parent": 276, "children": [287], "start_point": {"row": 98, "column": 51}, "end_point": {"row": 98, "column": 56}}, {"id": 287, "type": "identifier", "text": "float", "parent": 286, "children": [], "start_point": {"row": 98, "column": 51}, "end_point": {"row": 98, "column": 56}}, {"id": 288, "type": "identifier", "text": "maxAscent", "parent": 276, "children": [], "start_point": {"row": 98, "column": 57}, "end_point": {"row": 98, "column": 66}}, {"id": 289, "type": "ERROR", "text": "float", "parent": 276, "children": [290], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 7}}, {"id": 290, "type": "identifier", "text": "float", "parent": 289, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 7}}, {"id": 291, "type": "identifier", "text": "maxDescent", "parent": 276, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 18}}, {"id": 292, "type": "comma_expression", "text": "textOffset(textOffset),\n\t\ty(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 231, "children": [293, 297], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 293, "type": "call_expression", "text": "textOffset(textOffset)", "parent": 292, "children": [294, 295], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 24}}, {"id": 294, "type": "identifier", "text": "textOffset", "parent": 293, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 12}}, {"id": 295, "type": "argument_list", "text": "(textOffset)", "parent": 293, "children": [296], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 24}}, {"id": 296, "type": "identifier", "text": "textOffset", "parent": 295, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 23}}, {"id": 297, "type": "comma_expression", "text": "y(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 292, "children": [298, 302], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 298, "type": "call_expression", "text": "y(y)", "parent": 297, "children": [299, 300], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 6}}, {"id": 299, "type": "identifier", "text": "y", "parent": 298, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 3}}, {"id": 300, "type": "argument_list", "text": "(y)", "parent": 298, "children": [301], "start_point": {"row": 102, "column": 3}, "end_point": {"row": 102, "column": 6}}, {"id": 301, "type": "identifier", "text": "y", "parent": 300, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 5}}, {"id": 302, "type": "comma_expression", "text": "height(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 297, "children": [303, 307], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 303, "type": "call_expression", "text": "height(height)", "parent": 302, "children": [304, 305], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 16}}, {"id": 304, "type": "identifier", "text": "height", "parent": 303, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 8}}, {"id": 305, "type": "argument_list", "text": "(height)", "parent": 303, "children": [306], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 16}}, {"id": 306, "type": "identifier", "text": "height", "parent": 305, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 15}}, {"id": 307, "type": "comma_expression", "text": "maxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 302, "children": [308, 312], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 308, "type": "call_expression", "text": "maxAscent(maxAscent)", "parent": 307, "children": [309, 310], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 22}}, {"id": 309, "type": "identifier", "text": "maxAscent", "parent": 308, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 11}}, {"id": 310, "type": "argument_list", "text": "(maxAscent)", "parent": 308, "children": [311], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 22}}, {"id": 311, "type": "identifier", "text": "maxAscent", "parent": 310, "children": [], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 21}}, {"id": 312, "type": "comma_expression", "text": "maxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 307, "children": [313, 317], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 313, "type": "call_expression", "text": "maxDescent(maxDescent)", "parent": 312, "children": [314, 315], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 24}}, {"id": 314, "type": "identifier", "text": "maxDescent", "parent": 313, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 12}}, {"id": 315, "type": "argument_list", "text": "(maxDescent)", "parent": 313, "children": [316], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 24}}, {"id": 316, "type": "identifier", "text": "maxDescent", "parent": 315, "children": [], "start_point": {"row": 105, "column": 13}, "end_point": {"row": 105, "column": 23}}, {"id": 317, "type": "comma_expression", "text": "extraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 312, "children": [318, 322], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 318, "type": "call_expression", "text": "extraGlyphSpacing(0.0f)", "parent": 317, "children": [319, 320], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 25}}, {"id": 319, "type": "identifier", "text": "extraGlyphSpacing", "parent": 318, "children": [], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 19}}, {"id": 320, "type": "argument_list", "text": "(0.0f)", "parent": 318, "children": [321], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 25}}, {"id": 321, "type": "number_literal", "text": "0.0f", "parent": 320, "children": [], "start_point": {"row": 106, "column": 20}, "end_point": {"row": 106, "column": 24}}, {"id": 322, "type": "comma_expression", "text": "extraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)", "parent": 317, "children": [323, 327, 331], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 112, "column": 32}}, {"id": 323, "type": "call_expression", "text": "extraWhiteSpacing(0.0f)", "parent": 322, "children": [324, 325], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 25}}, {"id": 324, "type": "identifier", "text": "extraWhiteSpacing", "parent": 323, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 19}}, {"id": 325, "type": "argument_list", "text": "(0.0f)", "parent": 323, "children": [326], "start_point": {"row": 107, "column": 19}, "end_point": {"row": 107, "column": 25}}, {"id": 326, "type": "number_literal", "text": "0.0f", "parent": 325, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 24}}, {"id": 327, "type": "ERROR", "text": "layoutedSpans()\n\t{\n\t}", "parent": 322, "children": [328], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 110, "column": 2}}, {"id": 328, "type": "call_expression", "text": "layoutedSpans()", "parent": 327, "children": [329, 330], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 17}}, {"id": 329, "type": "identifier", "text": "layoutedSpans", "parent": 328, "children": [], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 15}}, {"id": 330, "type": "argument_list", "text": "()", "parent": 328, "children": [], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 17}}, {"id": 331, "type": "call_expression", "text": "LineInfo(const LineInfo& other)", "parent": 322, "children": [332, 333], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 32}}, {"id": 332, "type": "identifier", "text": "LineInfo", "parent": 331, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 9}}, {"id": 333, "type": "argument_list", "text": "(const LineInfo& other)", "parent": 331, "children": [334], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 32}}, {"id": 334, "type": "binary_expression", "text": "LineInfo& other", "parent": 333, "children": [335, 336], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 31}}, {"id": 335, "type": "identifier", "text": "LineInfo", "parent": 334, "children": [], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 24}}, {"id": 336, "type": "identifier", "text": "other", "parent": 334, "children": [], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 31}}, {"id": 337, "type": "comma_expression", "text": "textOffset(other.textOffset),\n\t\ty(other.y),\n\t\theight(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 230, "children": [338, 344], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 338, "type": "call_expression", "text": "textOffset(other.textOffset)", "parent": 337, "children": [339, 340], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 30}}, {"id": 339, "type": "identifier", "text": "textOffset", "parent": 338, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 12}}, {"id": 340, "type": "argument_list", "text": "(other.textOffset)", "parent": 338, "children": [341], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 30}}, {"id": 341, "type": "field_expression", "text": "other.textOffset", "parent": 340, "children": [342, 343], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 29}}, {"id": 342, "type": "identifier", "text": "other", "parent": 341, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 18}}, {"id": 343, "type": "field_identifier", "text": "textOffset", "parent": 341, "children": [], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 29}}, {"id": 344, "type": "comma_expression", "text": "y(other.y),\n\t\theight(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 337, "children": [345, 351], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 345, "type": "call_expression", "text": "y(other.y)", "parent": 344, "children": [346, 347], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 12}}, {"id": 346, "type": "identifier", "text": "y", "parent": 345, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 3}}, {"id": 347, "type": "argument_list", "text": "(other.y)", "parent": 345, "children": [348], "start_point": {"row": 115, "column": 3}, "end_point": {"row": 115, "column": 12}}, {"id": 348, "type": "field_expression", "text": "other.y", "parent": 347, "children": [349, 350], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 11}}, {"id": 349, "type": "identifier", "text": "other", "parent": 348, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 9}}, {"id": 350, "type": "field_identifier", "text": "y", "parent": 348, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 11}}, {"id": 351, "type": "comma_expression", "text": "height(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 344, "children": [352, 358], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 352, "type": "call_expression", "text": "height(other.height)", "parent": 351, "children": [353, 354], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 22}}, {"id": 353, "type": "identifier", "text": "height", "parent": 352, "children": [], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 8}}, {"id": 354, "type": "argument_list", "text": "(other.height)", "parent": 352, "children": [355], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 22}}, {"id": 355, "type": "field_expression", "text": "other.height", "parent": 354, "children": [356, 357], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 21}}, {"id": 356, "type": "identifier", "text": "other", "parent": 355, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 14}}, {"id": 357, "type": "field_identifier", "text": "height", "parent": 355, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 21}}, {"id": 358, "type": "comma_expression", "text": "maxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 351, "children": [359, 365], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 359, "type": "call_expression", "text": "maxAscent(other.maxAscent)", "parent": 358, "children": [360, 361], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 28}}, {"id": 360, "type": "identifier", "text": "maxAscent", "parent": 359, "children": [], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 11}}, {"id": 361, "type": "argument_list", "text": "(other.maxAscent)", "parent": 359, "children": [362], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 28}}, {"id": 362, "type": "field_expression", "text": "other.maxAscent", "parent": 361, "children": [363, 364], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 27}}, {"id": 363, "type": "identifier", "text": "other", "parent": 362, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 17}}, {"id": 364, "type": "field_identifier", "text": "maxAscent", "parent": 362, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 27}}, {"id": 365, "type": "comma_expression", "text": "maxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 358, "children": [366, 372], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 366, "type": "call_expression", "text": "maxDescent(other.maxDescent)", "parent": 365, "children": [367, 368], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 30}}, {"id": 367, "type": "identifier", "text": "maxDescent", "parent": 366, "children": [], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 12}}, {"id": 368, "type": "argument_list", "text": "(other.maxDescent)", "parent": 366, "children": [369], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 30}}, {"id": 369, "type": "field_expression", "text": "other.maxDescent", "parent": 368, "children": [370, 371], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 118, "column": 29}}, {"id": 370, "type": "identifier", "text": "other", "parent": 369, "children": [], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 118, "column": 18}}, {"id": 371, "type": "field_identifier", "text": "maxDescent", "parent": 369, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 29}}, {"id": 372, "type": "comma_expression", "text": "extraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 365, "children": [373, 379], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 373, "type": "call_expression", "text": "extraGlyphSpacing(other.extraGlyphSpacing)", "parent": 372, "children": [374, 375], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 44}}, {"id": 374, "type": "identifier", "text": "extraGlyphSpacing", "parent": 373, "children": [], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 19}}, {"id": 375, "type": "argument_list", "text": "(other.extraGlyphSpacing)", "parent": 373, "children": [376], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 44}}, {"id": 376, "type": "field_expression", "text": "other.extraGlyphSpacing", "parent": 375, "children": [377, 378], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 43}}, {"id": 377, "type": "identifier", "text": "other", "parent": 376, "children": [], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 25}}, {"id": 378, "type": "field_identifier", "text": "extraGlyphSpacing", "parent": 376, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 43}}, {"id": 379, "type": "comma_expression", "text": "extraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 372, "children": [380, 386, 393], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 127, "column": 31}}, {"id": 380, "type": "call_expression", "text": "extraWhiteSpacing(other.extraWhiteSpacing)", "parent": 379, "children": [381, 382], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 44}}, {"id": 381, "type": "identifier", "text": "extraWhiteSpacing", "parent": 380, "children": [], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 19}}, {"id": 382, "type": "argument_list", "text": "(other.extraWhiteSpacing)", "parent": 380, "children": [383], "start_point": {"row": 120, "column": 19}, "end_point": {"row": 120, "column": 44}}, {"id": 383, "type": "field_expression", "text": "other.extraWhiteSpacing", "parent": 382, "children": [384, 385], "start_point": {"row": 120, "column": 20}, "end_point": {"row": 120, "column": 43}}, {"id": 384, "type": "identifier", "text": "other", "parent": 383, "children": [], "start_point": {"row": 120, "column": 20}, "end_point": {"row": 120, "column": 25}}, {"id": 385, "type": "field_identifier", "text": "extraWhiteSpacing", "parent": 383, "children": [], "start_point": {"row": 120, "column": 26}, "end_point": {"row": 120, "column": 43}}, {"id": 386, "type": "ERROR", "text": "layoutedSpans(other.layoutedSpans)\n\t{\n\t}", "parent": 379, "children": [387], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 123, "column": 2}}, {"id": 387, "type": "call_expression", "text": "layoutedSpans(other.layoutedSpans)", "parent": 386, "children": [388, 389], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 36}}, {"id": 388, "type": "identifier", "text": "layoutedSpans", "parent": 387, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 15}}, {"id": 389, "type": "argument_list", "text": "(other.layoutedSpans)", "parent": 387, "children": [390], "start_point": {"row": 121, "column": 15}, "end_point": {"row": 121, "column": 36}}, {"id": 390, "type": "field_expression", "text": "other.layoutedSpans", "parent": 389, "children": [391, 392], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 35}}, {"id": 391, "type": "identifier", "text": "other", "parent": 390, "children": [], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 21}}, {"id": 392, "type": "field_identifier", "text": "layoutedSpans", "parent": 390, "children": [], "start_point": {"row": 121, "column": 22}, "end_point": {"row": 121, "column": 35}}, {"id": 393, "type": "binary_expression", "text": "LineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 379, "children": [394, 395], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 127, "column": 31}}, {"id": 394, "type": "identifier", "text": "LineInfo", "parent": 393, "children": [], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 9}}, {"id": 395, "type": "assignment_expression", "text": "operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 393, "children": [396, 397, 398], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 127, "column": 31}}, {"id": 396, "type": "identifier", "text": "operator", "parent": 395, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 19}}, {"id": 397, "type": "=", "text": "=", "parent": 395, "children": [], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 20}}, {"id": 398, "type": "assignment_expression", "text": "(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset", "parent": 395, "children": [399, 405, 407, 408], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 127, "column": 31}}, {"id": 399, "type": "parenthesized_expression", "text": "(const LineInfo& other)", "parent": 398, "children": [400, 403], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 125, "column": 43}}, {"id": 400, "type": "ERROR", "text": "const LineInfo", "parent": 399, "children": [401], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 35}}, {"id": 401, "type": "type_descriptor", "text": "const LineInfo", "parent": 400, "children": [402], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 35}}, {"id": 402, "type": "type_identifier", "text": "LineInfo", "parent": 401, "children": [], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 35}}, {"id": 403, "type": "pointer_expression", "text": "& other", "parent": 399, "children": [404], "start_point": {"row": 125, "column": 35}, "end_point": {"row": 125, "column": 42}}, {"id": 404, "type": "identifier", "text": "other", "parent": 403, "children": [], "start_point": {"row": 125, "column": 37}, "end_point": {"row": 125, "column": 42}}, {"id": 405, "type": "ERROR", "text": "{\n\t\ttextOffset", "parent": 398, "children": [406], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 127, "column": 12}}, {"id": 406, "type": "identifier", "text": "textOffset", "parent": 405, "children": [], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 12}}, {"id": 407, "type": "=", "text": "=", "parent": 398, "children": [], "start_point": {"row": 127, "column": 13}, "end_point": {"row": 127, "column": 14}}, {"id": 408, "type": "field_expression", "text": "other.textOffset", "parent": 398, "children": [409, 410], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 31}}, {"id": 409, "type": "identifier", "text": "other", "parent": 408, "children": [], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 20}}, {"id": 410, "type": "field_identifier", "text": "textOffset", "parent": 408, "children": [], "start_point": {"row": 127, "column": 21}, "end_point": {"row": 127, "column": 31}}, {"id": 411, "type": "assignment_expression", "text": "y = other.y", "parent": 228, "children": [412, 413, 414], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 128, "column": 13}}, {"id": 412, "type": "identifier", "text": "y", "parent": 411, "children": [], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 128, "column": 3}}, {"id": 413, "type": "=", "text": "=", "parent": 411, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 5}}, {"id": 414, "type": "field_expression", "text": "other.y", "parent": 411, "children": [415, 416], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 13}}, {"id": 415, "type": "identifier", "text": "other", "parent": 414, "children": [], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 11}}, {"id": 416, "type": "field_identifier", "text": "y", "parent": 414, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 13}}, {"id": 417, "type": "assignment_expression", "text": "height = other.height", "parent": 228, "children": [418, 419, 420], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 23}}, {"id": 418, "type": "identifier", "text": "height", "parent": 417, "children": [], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 8}}, {"id": 419, "type": "=", "text": "=", "parent": 417, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 10}}, {"id": 420, "type": "field_expression", "text": "other.height", "parent": 417, "children": [421, 422], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 23}}, {"id": 421, "type": "identifier", "text": "other", "parent": 420, "children": [], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 16}}, {"id": 422, "type": "field_identifier", "text": "height", "parent": 420, "children": [], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 23}}, {"id": 423, "type": "assignment_expression", "text": "maxAscent = other.maxAscent", "parent": 228, "children": [424, 425, 426], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 29}}, {"id": 424, "type": "identifier", "text": "maxAscent", "parent": 423, "children": [], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 11}}, {"id": 425, "type": "=", "text": "=", "parent": 423, "children": [], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 13}}, {"id": 426, "type": "field_expression", "text": "other.maxAscent", "parent": 423, "children": [427, 428], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 29}}, {"id": 427, "type": "identifier", "text": "other", "parent": 426, "children": [], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 19}}, {"id": 428, "type": "field_identifier", "text": "maxAscent", "parent": 426, "children": [], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 29}}, {"id": 429, "type": "assignment_expression", "text": "maxDescent = other.maxDescent", "parent": 228, "children": [430, 431, 432], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 31}}, {"id": 430, "type": "identifier", "text": "maxDescent", "parent": 429, "children": [], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 12}}, {"id": 431, "type": "=", "text": "=", "parent": 429, "children": [], "start_point": {"row": 131, "column": 13}, "end_point": {"row": 131, "column": 14}}, {"id": 432, "type": "field_expression", "text": "other.maxDescent", "parent": 429, "children": [433, 434], "start_point": {"row": 131, "column": 15}, "end_point": {"row": 131, "column": 31}}, {"id": 433, "type": "identifier", "text": "other", "parent": 432, "children": [], "start_point": {"row": 131, "column": 15}, "end_point": {"row": 131, "column": 20}}, {"id": 434, "type": "field_identifier", "text": "maxDescent", "parent": 432, "children": [], "start_point": {"row": 131, "column": 21}, "end_point": {"row": 131, "column": 31}}, {"id": 435, "type": "assignment_expression", "text": "extraGlyphSpacing = other.extraGlyphSpacing", "parent": 228, "children": [436, 437, 438], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 45}}, {"id": 436, "type": "identifier", "text": "extraGlyphSpacing", "parent": 435, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 19}}, {"id": 437, "type": "=", "text": "=", "parent": 435, "children": [], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 21}}, {"id": 438, "type": "field_expression", "text": "other.extraGlyphSpacing", "parent": 435, "children": [439, 440], "start_point": {"row": 132, "column": 22}, "end_point": {"row": 132, "column": 45}}, {"id": 439, "type": "identifier", "text": "other", "parent": 438, "children": [], "start_point": {"row": 132, "column": 22}, "end_point": {"row": 132, "column": 27}}, {"id": 440, "type": "field_identifier", "text": "extraGlyphSpacing", "parent": 438, "children": [], "start_point": {"row": 132, "column": 28}, "end_point": {"row": 132, "column": 45}}, {"id": 441, "type": "assignment_expression", "text": "extraWhiteSpacing = other.extraWhiteSpacing", "parent": 228, "children": [442, 443, 444], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 45}}, {"id": 442, "type": "identifier", "text": "extraWhiteSpacing", "parent": 441, "children": [], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 19}}, {"id": 443, "type": "=", "text": "=", "parent": 441, "children": [], "start_point": {"row": 133, "column": 20}, "end_point": {"row": 133, "column": 21}}, {"id": 444, "type": "field_expression", "text": "other.extraWhiteSpacing", "parent": 441, "children": [445, 446], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 45}}, {"id": 445, "type": "identifier", "text": "other", "parent": 444, "children": [], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 27}}, {"id": 446, "type": "field_identifier", "text": "extraWhiteSpacing", "parent": 444, "children": [], "start_point": {"row": 133, "column": 28}, "end_point": {"row": 133, "column": 45}}, {"id": 447, "type": "assignment_expression", "text": "layoutedSpans = other.layoutedSpans", "parent": 228, "children": [448, 449, 450], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 37}}, {"id": 448, "type": "identifier", "text": "layoutedSpans", "parent": 447, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 15}}, {"id": 449, "type": "=", "text": "=", "parent": 447, "children": [], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 17}}, {"id": 450, "type": "field_expression", "text": "other.layoutedSpans", "parent": 447, "children": [451, 452], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 37}}, {"id": 451, "type": "identifier", "text": "other", "parent": 450, "children": [], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 23}}, {"id": 452, "type": "field_identifier", "text": "layoutedSpans", "parent": 450, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 37}}, {"id": 453, "type": "return_statement", "text": "return *this;", "parent": 228, "children": [454], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 15}}, {"id": 454, "type": "pointer_expression", "text": "*this", "parent": 453, "children": [455, 456], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 14}}, {"id": 455, "type": "*", "text": "*", "parent": 454, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 10}}, {"id": 456, "type": "identifier", "text": "this", "parent": 454, "children": [], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 14}}, {"id": 457, "type": "ERROR", "text": "bool operator==(const LineInfo& other) const", "parent": 0, "children": [458, 459, 460, 461, 462], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 45}}, {"id": 458, "type": "primitive_type", "text": "bool", "parent": 457, "children": [], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 5}}, {"id": 459, "type": "identifier", "text": "operator", "parent": 457, "children": [], "start_point": {"row": 138, "column": 6}, "end_point": {"row": 138, "column": 14}}, {"id": 460, "type": "==", "text": "==", "parent": 457, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 16}}, {"id": 461, "type": "type_identifier", "text": "LineInfo", "parent": 457, "children": [], "start_point": {"row": 138, "column": 23}, "end_point": {"row": 138, "column": 31}}, {"id": 462, "type": "pointer_expression", "text": "& other", "parent": 457, "children": [463], "start_point": {"row": 138, "column": 31}, "end_point": {"row": 138, "column": 38}}, {"id": 463, "type": "identifier", "text": "other", "parent": 462, "children": [], "start_point": {"row": 138, "column": 33}, "end_point": {"row": 138, "column": 38}}, {"id": 464, "type": "return_statement", "text": "return textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent\n\t\t\t&& extraGlyphSpacing == other.extraGlyphSpacing\n\t\t\t&& extraWhiteSpacing == other.extraWhiteSpacing\n\t\t\t&& layoutedSpans == other.layoutedSpans;", "parent": 0, "children": [465], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 147, "column": 43}}, {"id": 465, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent\n\t\t\t&& extraGlyphSpacing == other.extraGlyphSpacing\n\t\t\t&& extraWhiteSpacing == other.extraWhiteSpacing\n\t\t\t&& layoutedSpans == other.layoutedSpans", "parent": 464, "children": [466, 520, 521], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 147, "column": 42}}, {"id": 466, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent\n\t\t\t&& extraGlyphSpacing == other.extraGlyphSpacing\n\t\t\t&& extraWhiteSpacing == other.extraWhiteSpacing", "parent": 465, "children": [467, 513, 514], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 146, "column": 50}}, {"id": 467, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent\n\t\t\t&& extraGlyphSpacing == other.extraGlyphSpacing", "parent": 466, "children": [468, 506, 507], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 145, "column": 50}}, {"id": 468, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent", "parent": 467, "children": [469, 499, 500], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 144, "column": 36}}, {"id": 469, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent", "parent": 468, "children": [470, 492, 493], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 143, "column": 34}}, {"id": 470, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height", "parent": 469, "children": [471, 485, 486], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 142, "column": 28}}, {"id": 471, "type": "binary_expression", "text": "textOffset == other.textOffset\n\t\t\t&& y == other.y", "parent": 470, "children": [472, 478, 479], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 141, "column": 18}}, {"id": 472, "type": "binary_expression", "text": "textOffset == other.textOffset", "parent": 471, "children": [473, 474, 475], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 39}}, {"id": 473, "type": "identifier", "text": "textOffset", "parent": 472, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 19}}, {"id": 474, "type": "==", "text": "==", "parent": 472, "children": [], "start_point": {"row": 140, "column": 20}, "end_point": {"row": 140, "column": 22}}, {"id": 475, "type": "field_expression", "text": "other.textOffset", "parent": 472, "children": [476, 477], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 39}}, {"id": 476, "type": "identifier", "text": "other", "parent": 475, "children": [], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 28}}, {"id": 477, "type": "field_identifier", "text": "textOffset", "parent": 475, "children": [], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 39}}, {"id": 478, "type": "&&", "text": "&&", "parent": 471, "children": [], "start_point": {"row": 141, "column": 3}, "end_point": {"row": 141, "column": 5}}, {"id": 479, "type": "binary_expression", "text": "y == other.y", "parent": 471, "children": [480, 481, 482], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 18}}, {"id": 480, "type": "identifier", "text": "y", "parent": 479, "children": [], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 7}}, {"id": 481, "type": "==", "text": "==", "parent": 479, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 10}}, {"id": 482, "type": "field_expression", "text": "other.y", "parent": 479, "children": [483, 484], "start_point": {"row": 141, "column": 11}, "end_point": {"row": 141, "column": 18}}, {"id": 483, "type": "identifier", "text": "other", "parent": 482, "children": [], "start_point": {"row": 141, "column": 11}, "end_point": {"row": 141, "column": 16}}, {"id": 484, "type": "field_identifier", "text": "y", "parent": 482, "children": [], "start_point": {"row": 141, "column": 17}, "end_point": {"row": 141, "column": 18}}, {"id": 485, "type": "&&", "text": "&&", "parent": 470, "children": [], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 5}}, {"id": 486, "type": "binary_expression", "text": "height == other.height", "parent": 470, "children": [487, 488, 489], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 28}}, {"id": 487, "type": "identifier", "text": "height", "parent": 486, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 12}}, {"id": 488, "type": "==", "text": "==", "parent": 486, "children": [], "start_point": {"row": 142, "column": 13}, "end_point": {"row": 142, "column": 15}}, {"id": 489, "type": "field_expression", "text": "other.height", "parent": 486, "children": [490, 491], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 28}}, {"id": 490, "type": "identifier", "text": "other", "parent": 489, "children": [], "start_point": {"row": 142, "column": 16}, "end_point": {"row": 142, "column": 21}}, {"id": 491, "type": "field_identifier", "text": "height", "parent": 489, "children": [], "start_point": {"row": 142, "column": 22}, "end_point": {"row": 142, "column": 28}}, {"id": 492, "type": "&&", "text": "&&", "parent": 469, "children": [], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 5}}, {"id": 493, "type": "binary_expression", "text": "maxAscent == other.maxAscent", "parent": 469, "children": [494, 495, 496], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 34}}, {"id": 494, "type": "identifier", "text": "maxAscent", "parent": 493, "children": [], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 15}}, {"id": 495, "type": "==", "text": "==", "parent": 493, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 18}}, {"id": 496, "type": "field_expression", "text": "other.maxAscent", "parent": 493, "children": [497, 498], "start_point": {"row": 143, "column": 19}, "end_point": {"row": 143, "column": 34}}, {"id": 497, "type": "identifier", "text": "other", "parent": 496, "children": [], "start_point": {"row": 143, "column": 19}, "end_point": {"row": 143, "column": 24}}, {"id": 498, "type": "field_identifier", "text": "maxAscent", "parent": 496, "children": [], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 34}}, {"id": 499, "type": "&&", "text": "&&", "parent": 468, "children": [], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 5}}, {"id": 500, "type": "binary_expression", "text": "maxDescent == other.maxDescent", "parent": 468, "children": [501, 502, 503], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 36}}, {"id": 501, "type": "identifier", "text": "maxDescent", "parent": 500, "children": [], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 16}}, {"id": 502, "type": "==", "text": "==", "parent": 500, "children": [], "start_point": {"row": 144, "column": 17}, "end_point": {"row": 144, "column": 19}}, {"id": 503, "type": "field_expression", "text": "other.maxDescent", "parent": 500, "children": [504, 505], "start_point": {"row": 144, "column": 20}, "end_point": {"row": 144, "column": 36}}, {"id": 504, "type": "identifier", "text": "other", "parent": 503, "children": [], "start_point": {"row": 144, "column": 20}, "end_point": {"row": 144, "column": 25}}, {"id": 505, "type": "field_identifier", "text": "maxDescent", "parent": 503, "children": [], "start_point": {"row": 144, "column": 26}, "end_point": {"row": 144, "column": 36}}, {"id": 506, "type": "&&", "text": "&&", "parent": 467, "children": [], "start_point": {"row": 145, "column": 3}, "end_point": {"row": 145, "column": 5}}, {"id": 507, "type": "binary_expression", "text": "extraGlyphSpacing == other.extraGlyphSpacing", "parent": 467, "children": [508, 509, 510], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 50}}, {"id": 508, "type": "identifier", "text": "extraGlyphSpacing", "parent": 507, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 23}}, {"id": 509, "type": "==", "text": "==", "parent": 507, "children": [], "start_point": {"row": 145, "column": 24}, "end_point": {"row": 145, "column": 26}}, {"id": 510, "type": "field_expression", "text": "other.extraGlyphSpacing", "parent": 507, "children": [511, 512], "start_point": {"row": 145, "column": 27}, "end_point": {"row": 145, "column": 50}}, {"id": 511, "type": "identifier", "text": "other", "parent": 510, "children": [], "start_point": {"row": 145, "column": 27}, "end_point": {"row": 145, "column": 32}}, {"id": 512, "type": "field_identifier", "text": "extraGlyphSpacing", "parent": 510, "children": [], "start_point": {"row": 145, "column": 33}, "end_point": {"row": 145, "column": 50}}, {"id": 513, "type": "&&", "text": "&&", "parent": 466, "children": [], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 5}}, {"id": 514, "type": "binary_expression", "text": "extraWhiteSpacing == other.extraWhiteSpacing", "parent": 466, "children": [515, 516, 517], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 50}}, {"id": 515, "type": "identifier", "text": "extraWhiteSpacing", "parent": 514, "children": [], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 23}}, {"id": 516, "type": "==", "text": "==", "parent": 514, "children": [], "start_point": {"row": 146, "column": 24}, "end_point": {"row": 146, "column": 26}}, {"id": 517, "type": "field_expression", "text": "other.extraWhiteSpacing", "parent": 514, "children": [518, 519], "start_point": {"row": 146, "column": 27}, "end_point": {"row": 146, "column": 50}}, {"id": 518, "type": "identifier", "text": "other", "parent": 517, "children": [], "start_point": {"row": 146, "column": 27}, "end_point": {"row": 146, "column": 32}}, {"id": 519, "type": "field_identifier", "text": "extraWhiteSpacing", "parent": 517, "children": [], "start_point": {"row": 146, "column": 33}, "end_point": {"row": 146, "column": 50}}, {"id": 520, "type": "&&", "text": "&&", "parent": 465, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 5}}, {"id": 521, "type": "binary_expression", "text": "layoutedSpans == other.layoutedSpans", "parent": 465, "children": [522, 523, 524], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 42}}, {"id": 522, "type": "identifier", "text": "layoutedSpans", "parent": 521, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 19}}, {"id": 523, "type": "==", "text": "==", "parent": 521, "children": [], "start_point": {"row": 147, "column": 20}, "end_point": {"row": 147, "column": 22}}, {"id": 524, "type": "field_expression", "text": "other.layoutedSpans", "parent": 521, "children": [525, 526], "start_point": {"row": 147, "column": 23}, "end_point": {"row": 147, "column": 42}}, {"id": 525, "type": "identifier", "text": "other", "parent": 524, "children": [], "start_point": {"row": 147, "column": 23}, "end_point": {"row": 147, "column": 28}}, {"id": 526, "type": "field_identifier", "text": "layoutedSpans", "parent": 524, "children": [], "start_point": {"row": 147, "column": 29}, "end_point": {"row": 147, "column": 42}}, {"id": 527, "type": "ERROR", "text": "bool operator!=(const LineInfo& other) const", "parent": 0, "children": [528, 529, 530, 531, 532], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 45}}, {"id": 528, "type": "primitive_type", "text": "bool", "parent": 527, "children": [], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 5}}, {"id": 529, "type": "identifier", "text": "operator", "parent": 527, "children": [], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 14}}, {"id": 530, "type": "!=", "text": "!=", "parent": 527, "children": [], "start_point": {"row": 150, "column": 14}, "end_point": {"row": 150, "column": 16}}, {"id": 531, "type": "type_identifier", "text": "LineInfo", "parent": 527, "children": [], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 31}}, {"id": 532, "type": "pointer_expression", "text": "& other", "parent": 527, "children": [533], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 38}}, {"id": 533, "type": "identifier", "text": "other", "parent": 532, "children": [], "start_point": {"row": 150, "column": 33}, "end_point": {"row": 150, "column": 38}}, {"id": 534, "type": "return_statement", "text": "return !(*this == other);", "parent": 0, "children": [535], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 27}}, {"id": 535, "type": "unary_expression", "text": "!(*this == other)", "parent": 534, "children": [536, 537], "start_point": {"row": 152, "column": 9}, "end_point": {"row": 152, "column": 26}}, {"id": 536, "type": "!", "text": "!", "parent": 535, "children": [], "start_point": {"row": 152, "column": 9}, "end_point": {"row": 152, "column": 10}}, {"id": 537, "type": "parenthesized_expression", "text": "(*this == other)", "parent": 535, "children": [538], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 26}}, {"id": 538, "type": "binary_expression", "text": "*this == other", "parent": 537, "children": [539, 542, 543], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 25}}, {"id": 539, "type": "pointer_expression", "text": "*this", "parent": 538, "children": [540, 541], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 16}}, {"id": 540, "type": "*", "text": "*", "parent": 539, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 12}}, {"id": 541, "type": "identifier", "text": "this", "parent": 539, "children": [], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 16}}, {"id": 542, "type": "==", "text": "==", "parent": 538, "children": [], "start_point": {"row": 152, "column": 17}, "end_point": {"row": 152, "column": 19}}, {"id": 543, "type": "identifier", "text": "other", "parent": 538, "children": [], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 25}}, {"id": 544, "type": "labeled_statement", "text": "public:\n\tint32\t\t\ttextOffset;", "parent": 0, "children": [545], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 156, "column": 20}}, {"id": 545, "type": "declaration", "text": "int32\t\t\ttextOffset;", "parent": 544, "children": [546, 547], "start_point": {"row": 156, "column": 1}, "end_point": {"row": 156, "column": 20}}, {"id": 546, "type": "type_identifier", "text": "int32", "parent": 545, "children": [], "start_point": {"row": 156, "column": 1}, "end_point": {"row": 156, "column": 6}}, {"id": 547, "type": "identifier", "text": "textOffset", "parent": 545, "children": [], "start_point": {"row": 156, "column": 9}, "end_point": {"row": 156, "column": 19}}, {"id": 548, "type": "declaration", "text": "float\t\t\ty;", "parent": 0, "children": [549, 550], "start_point": {"row": 158, "column": 1}, "end_point": {"row": 158, "column": 11}}, {"id": 549, "type": "primitive_type", "text": "float", "parent": 548, "children": [], "start_point": {"row": 158, "column": 1}, "end_point": {"row": 158, "column": 6}}, {"id": 550, "type": "identifier", "text": "y", "parent": 548, "children": [], "start_point": {"row": 158, "column": 9}, "end_point": {"row": 158, "column": 10}}, {"id": 551, "type": "declaration", "text": "float\t\t\theight;", "parent": 0, "children": [552, 553], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 16}}, {"id": 552, "type": "primitive_type", "text": "float", "parent": 551, "children": [], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 6}}, {"id": 553, "type": "identifier", "text": "height", "parent": 551, "children": [], "start_point": {"row": 159, "column": 9}, "end_point": {"row": 159, "column": 15}}, {"id": 554, "type": "declaration", "text": "float\t\t\tmaxAscent;", "parent": 0, "children": [555, 556], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 19}}, {"id": 555, "type": "primitive_type", "text": "float", "parent": 554, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 6}}, {"id": 556, "type": "identifier", "text": "maxAscent", "parent": 554, "children": [], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 18}}, {"id": 557, "type": "declaration", "text": "float\t\t\tmaxDescent;", "parent": 0, "children": [558, 559], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 20}}, {"id": 558, "type": "primitive_type", "text": "float", "parent": 557, "children": [], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 6}}, {"id": 559, "type": "identifier", "text": "maxDescent", "parent": 557, "children": [], "start_point": {"row": 162, "column": 9}, "end_point": {"row": 162, "column": 19}}, {"id": 560, "type": "declaration", "text": "float\t\t\textraGlyphSpacing;", "parent": 0, "children": [561, 562], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 27}}, {"id": 561, "type": "primitive_type", "text": "float", "parent": 560, "children": [], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 6}}, {"id": 562, "type": "identifier", "text": "extraGlyphSpacing", "parent": 560, "children": [], "start_point": {"row": 164, "column": 9}, "end_point": {"row": 164, "column": 26}}, {"id": 563, "type": "declaration", "text": "float\t\t\textraWhiteSpacing;", "parent": 0, "children": [564, 565], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 27}}, {"id": 564, "type": "primitive_type", "text": "float", "parent": 563, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 6}}, {"id": 565, "type": "identifier", "text": "extraWhiteSpacing", "parent": 563, "children": [], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 26}}, {"id": 566, "type": "labeled_statement", "text": "std::vector<TextSpan>\n\t\t\t\t\tlayoutedSpans;", "parent": 0, "children": [567], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 168, "column": 19}}, {"id": 567, "type": "statement_identifier", "text": "std", "parent": 566, "children": [], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 167, "column": 4}}, {"id": 568, "type": "binary_expression", "text": "vector<TextSpan>\n\t\t\t\t\tlayoutedSpans", "parent": 566, "children": [569, 573, 574], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 168, "column": 18}}, {"id": 569, "type": "binary_expression", "text": "vector<TextSpan", "parent": 568, "children": [570, 571, 572], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 21}}, {"id": 570, "type": "identifier", "text": "vector", "parent": 569, "children": [], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 12}}, {"id": 571, "type": "<", "text": "<", "parent": 569, "children": [], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 13}}, {"id": 572, "type": "identifier", "text": "TextSpan", "parent": 569, "children": [], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 21}}, {"id": 573, "type": ">", "text": ">", "parent": 568, "children": [], "start_point": {"row": 167, "column": 21}, "end_point": {"row": 167, "column": 22}}, {"id": 574, "type": "identifier", "text": "layoutedSpans", "parent": 568, "children": [], "start_point": {"row": 168, "column": 5}, "end_point": {"row": 168, "column": 18}}, {"id": 575, "type": "ERROR", "text": "class ParagraphLayout : public BReferenceable {\npublic:\n\t\t\t\t\t\t\t\tParagraphLayout();\n\t\t\t\t\t\t\t\tParagraphLayout(const Paragraph& paragraph);\n\t\t\t\t\t\t\t\tParagraphLayout(const ParagraphLayout& other);\n\tvirtual\t\t\t\t\t\t~ParagraphLayout();\n\n\t\t\tvoid\t\t\t\tSetParagraph(const Paragraph& paragraph);\n\t\t\tconst ParagraphStyle& Style() const\n\t\t\t\t\t\t\t\t\t{ return fParagraphStyle; }\n\n\t\t\tvoid\t\t\t\tSetWidth(float width);\n\t\t\tfloat\t\t\t\tWidth() const\n\t\t\t\t\t\t\t\t\t{ return fWidth; }\n\n\t\t\tfloat\t\t\t\tHeight();\n\t\t\tvoid\t\t\t\tDraw(BView* view, const BPoint& offset);\n\n\t\t\tint32\t\t\t\tCountGlyphs() const;\n\t\t\tint32\t\t\t\tCountLines();\n\n\t\t\tint32\t\t\t\tLineIndexForOffset(int32 textOffset);\n\t\t\tint32\t\t\t\tFirstOffsetOnLine(int32 lineIndex);\n\t\t\tint32\t\t\t\tLastOffsetOnLine(int32 lineIndex);\n\n\t\t\tvoid\t\t\t\tGetLineBounds(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);\n\n\t\t\tvoid\t\t\t\tGetTextBounds(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);\n\n\t\t\tint32\t\t\t\tTextOffsetAt(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter);\n\nprivate:\n\t\t\tvoid\t\t\t\t_Init();\n\n\t\t\tvoid\t\t\t\t_ValidateLayout();\n\t\t\tvoid\t\t\t\t_Layout();\n\t\t\tvoid\t\t\t\t_ApplyAlignment();\n\n\t\t\tbool\t\t\t\t_AppendGlyphInfos(const TextSpan& span);\n\t\t\tbool\t\t\t\t_AppendGlyphInfo(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);\n\n\t\t\tbool\t\t\t\t_FinalizeLine(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight);\n\n\t\t\tvoid\t\t\t\t_IncludeStyleInLine(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);\n\n\t\t\tvoid\t\t\t\t_DrawLine(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line) const;\n\t\t\tvoid\t\t\t\t_DrawSpan(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset) const;\n\n\t\t\tvoid\t\t\t\t_GetEmptyLayoutBounds(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2) const;\n\n\t\t\tvoid\t\t\t\t_AppendTextSpans(const Paragraph& paragraph);\n\nprivate:\n\t\t\tstd::vector<TextSpan>\n\t\t\t\t\t\t\t\tfTextSpans;\n\t\t\tParagraphStyle\t\tfParagraphStyle;\n\n\t\t\tfloat\t\t\t\tfWidth;\n\t\t\tbool\t\t\t\tfLayoutValid;\n\n\t\t\tstd::vector<GlyphInfo>\n\t\t\t\t\t\t\t\tfGlyphInfos;\n\t\t\tstd::vector<LineInfo>\n\t\t\t\t\t\t\t\tfLineInfos;\n};\n\n\ntypedef BReference<ParagraphLayout> ParagraphLayoutRef;", "parent": 0, "children": [576, 577, 579, 583, 589, 595, 602, 610, 617, 625, 632, 637, 650, 651, 654, 659, 667, 675, 683, 703, 723, 737, 738, 743, 748, 753, 758, 766, 780, 800, 811, 861, 869, 877, 880, 883, 886, 894, 902, 904], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 252, "column": 55}}, {"id": 576, "type": "identifier", "text": "ParagraphLayout", "parent": 575, "children": [], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 21}}, {"id": 577, "type": "ERROR", "text": ": public BReferenceable", "parent": 575, "children": [578], "start_point": {"row": 172, "column": 22}, "end_point": {"row": 172, "column": 45}}, {"id": 578, "type": "identifier", "text": "BReferenceable", "parent": 577, "children": [], "start_point": {"row": 172, "column": 31}, "end_point": {"row": 172, "column": 45}}, {"id": 579, "type": "labeled_statement", "text": "public:\n\t\t\t\t\t\t\t\tParagraphLayout();", "parent": 575, "children": [], "start_point": {"row": 173, "column": 0}, "end_point": {"row": 174, "column": 26}}, {"id": 580, "type": "call_expression", "text": "ParagraphLayout()", "parent": 579, "children": [581, 582], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 25}}, {"id": 581, "type": "identifier", "text": "ParagraphLayout", "parent": 580, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 23}}, {"id": 582, "type": "argument_list", "text": "()", "parent": 580, "children": [], "start_point": {"row": 174, "column": 23}, "end_point": {"row": 174, "column": 25}}, {"id": 583, "type": "macro_type_specifier", "text": "ParagraphLayout(const Paragraph& paragraph)", "parent": 575, "children": [584, 585, 587], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 51}}, {"id": 584, "type": "identifier", "text": "ParagraphLayout", "parent": 583, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 23}}, {"id": 585, "type": "type_descriptor", "text": "const Paragraph", "parent": 583, "children": [586], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 39}}, {"id": 586, "type": "type_identifier", "text": "Paragraph", "parent": 585, "children": [], "start_point": {"row": 175, "column": 30}, "end_point": {"row": 175, "column": 39}}, {"id": 587, "type": "ERROR", "text": "& paragraph", "parent": 583, "children": [588], "start_point": {"row": 175, "column": 39}, "end_point": {"row": 175, "column": 50}}, {"id": 588, "type": "identifier", "text": "paragraph", "parent": 587, "children": [], "start_point": {"row": 175, "column": 41}, "end_point": {"row": 175, "column": 50}}, {"id": 589, "type": "macro_type_specifier", "text": "ParagraphLayout(const ParagraphLayout& other)", "parent": 575, "children": [590, 591, 593], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 53}}, {"id": 590, "type": "identifier", "text": "ParagraphLayout", "parent": 589, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 23}}, {"id": 591, "type": "type_descriptor", "text": "const ParagraphLayout", "parent": 589, "children": [592], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 45}}, {"id": 592, "type": "type_identifier", "text": "ParagraphLayout", "parent": 591, "children": [], "start_point": {"row": 176, "column": 30}, "end_point": {"row": 176, "column": 45}}, {"id": 593, "type": "ERROR", "text": "& other", "parent": 589, "children": [594], "start_point": {"row": 176, "column": 45}, "end_point": {"row": 176, "column": 52}}, {"id": 594, "type": "identifier", "text": "other", "parent": 593, "children": [], "start_point": {"row": 176, "column": 47}, "end_point": {"row": 176, "column": 52}}, {"id": 595, "type": "declaration", "text": "virtual\t\t\t\t\t\t~ParagraphLayout();", "parent": 575, "children": [596, 597, 599], "start_point": {"row": 177, "column": 1}, "end_point": {"row": 177, "column": 33}}, {"id": 596, "type": "type_identifier", "text": "virtual", "parent": 595, "children": [], "start_point": {"row": 177, "column": 1}, "end_point": {"row": 177, "column": 8}}, {"id": 597, "type": "ERROR", "text": "~", "parent": 595, "children": [598], "start_point": {"row": 177, "column": 14}, "end_point": {"row": 177, "column": 15}}, {"id": 598, "type": "~", "text": "~", "parent": 597, "children": [], "start_point": {"row": 177, "column": 14}, "end_point": {"row": 177, "column": 15}}, {"id": 599, "type": "function_declarator", "text": "ParagraphLayout()", "parent": 595, "children": [600, 601], "start_point": {"row": 177, "column": 15}, "end_point": {"row": 177, "column": 32}}, {"id": 600, "type": "identifier", "text": "ParagraphLayout", "parent": 599, "children": [], "start_point": {"row": 177, "column": 15}, "end_point": {"row": 177, "column": 30}}, {"id": 601, "type": "parameter_list", "text": "()", "parent": 599, "children": [], "start_point": {"row": 177, "column": 30}, "end_point": {"row": 177, "column": 32}}, {"id": 602, "type": "declaration", "text": "void\t\t\t\tSetParagraph(const Paragraph& paragraph);", "parent": 575, "children": [603, 604], "start_point": {"row": 179, "column": 3}, "end_point": {"row": 179, "column": 52}}, {"id": 603, "type": "primitive_type", "text": "void", "parent": 602, "children": [], "start_point": {"row": 179, "column": 3}, "end_point": {"row": 179, "column": 7}}, {"id": 604, "type": "function_declarator", "text": "SetParagraph(const Paragraph& paragraph)", "parent": 602, "children": [605, 606], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 51}}, {"id": 605, "type": "identifier", "text": "SetParagraph", "parent": 604, "children": [], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 23}}, {"id": 606, "type": "parameter_list", "text": "(const Paragraph& paragraph)", "parent": 604, "children": [607], "start_point": {"row": 179, "column": 23}, "end_point": {"row": 179, "column": 51}}, {"id": 607, "type": "parameter_declaration", "text": "const Paragraph& paragraph", "parent": 606, "children": [608, 609], "start_point": {"row": 179, "column": 24}, "end_point": {"row": 179, "column": 50}}, {"id": 608, "type": "type_identifier", "text": "Paragraph", "parent": 607, "children": [], "start_point": {"row": 179, "column": 30}, "end_point": {"row": 179, "column": 39}}, {"id": 609, "type": "identifier", "text": "paragraph", "parent": 607, "children": [], "start_point": {"row": 179, "column": 41}, "end_point": {"row": 179, "column": 50}}, {"id": 610, "type": "ERROR", "text": "const ParagraphStyle& Style() const", "parent": 575, "children": [611, 612], "start_point": {"row": 180, "column": 3}, "end_point": {"row": 180, "column": 38}}, {"id": 611, "type": "type_identifier", "text": "ParagraphStyle", "parent": 610, "children": [], "start_point": {"row": 180, "column": 9}, "end_point": {"row": 180, "column": 23}}, {"id": 612, "type": "function_declarator", "text": "Style()", "parent": 610, "children": [613, 614], "start_point": {"row": 180, "column": 25}, "end_point": {"row": 180, "column": 32}}, {"id": 613, "type": "identifier", "text": "Style", "parent": 612, "children": [], "start_point": {"row": 180, "column": 25}, "end_point": {"row": 180, "column": 30}}, {"id": 614, "type": "parameter_list", "text": "()", "parent": 612, "children": [], "start_point": {"row": 180, "column": 30}, "end_point": {"row": 180, "column": 32}}, {"id": 615, "type": "return_statement", "text": "return fParagraphStyle;", "parent": 575, "children": [616], "start_point": {"row": 181, "column": 11}, "end_point": {"row": 181, "column": 34}}, {"id": 616, "type": "identifier", "text": "fParagraphStyle", "parent": 615, "children": [], "start_point": {"row": 181, "column": 18}, "end_point": {"row": 181, "column": 33}}, {"id": 617, "type": "declaration", "text": "void\t\t\t\tSetWidth(float width);", "parent": 575, "children": [618, 619], "start_point": {"row": 183, "column": 3}, "end_point": {"row": 183, "column": 33}}, {"id": 618, "type": "primitive_type", "text": "void", "parent": 617, "children": [], "start_point": {"row": 183, "column": 3}, "end_point": {"row": 183, "column": 7}}, {"id": 619, "type": "function_declarator", "text": "SetWidth(float width)", "parent": 617, "children": [620, 621], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 32}}, {"id": 620, "type": "identifier", "text": "SetWidth", "parent": 619, "children": [], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 19}}, {"id": 621, "type": "parameter_list", "text": "(float width)", "parent": 619, "children": [622], "start_point": {"row": 183, "column": 19}, "end_point": {"row": 183, "column": 32}}, {"id": 622, "type": "parameter_declaration", "text": "float width", "parent": 621, "children": [623, 624], "start_point": {"row": 183, "column": 20}, "end_point": {"row": 183, "column": 31}}, {"id": 623, "type": "primitive_type", "text": "float", "parent": 622, "children": [], "start_point": {"row": 183, "column": 20}, "end_point": {"row": 183, "column": 25}}, {"id": 624, "type": "identifier", "text": "width", "parent": 622, "children": [], "start_point": {"row": 183, "column": 26}, "end_point": {"row": 183, "column": 31}}, {"id": 625, "type": "ERROR", "text": "float\t\t\t\tWidth() const", "parent": 575, "children": [626, 627], "start_point": {"row": 184, "column": 3}, "end_point": {"row": 184, "column": 25}}, {"id": 626, "type": "primitive_type", "text": "float", "parent": 625, "children": [], "start_point": {"row": 184, "column": 3}, "end_point": {"row": 184, "column": 8}}, {"id": 627, "type": "function_declarator", "text": "Width()", "parent": 625, "children": [628, 629], "start_point": {"row": 184, "column": 12}, "end_point": {"row": 184, "column": 19}}, {"id": 628, "type": "identifier", "text": "Width", "parent": 627, "children": [], "start_point": {"row": 184, "column": 12}, "end_point": {"row": 184, "column": 17}}, {"id": 629, "type": "parameter_list", "text": "()", "parent": 627, "children": [], "start_point": {"row": 184, "column": 17}, "end_point": {"row": 184, "column": 19}}, {"id": 630, "type": "return_statement", "text": "return fWidth;", "parent": 575, "children": [631], "start_point": {"row": 185, "column": 11}, "end_point": {"row": 185, "column": 25}}, {"id": 631, "type": "identifier", "text": "fWidth", "parent": 630, "children": [], "start_point": {"row": 185, "column": 18}, "end_point": {"row": 185, "column": 24}}, {"id": 632, "type": "declaration", "text": "float\t\t\t\tHeight();", "parent": 575, "children": [633, 634], "start_point": {"row": 187, "column": 3}, "end_point": {"row": 187, "column": 21}}, {"id": 633, "type": "primitive_type", "text": "float", "parent": 632, "children": [], "start_point": {"row": 187, "column": 3}, "end_point": {"row": 187, "column": 8}}, {"id": 634, "type": "function_declarator", "text": "Height()", "parent": 632, "children": [635, 636], "start_point": {"row": 187, "column": 12}, "end_point": {"row": 187, "column": 20}}, {"id": 635, "type": "identifier", "text": "Height", "parent": 634, "children": [], "start_point": {"row": 187, "column": 12}, "end_point": {"row": 187, "column": 18}}, {"id": 636, "type": "parameter_list", "text": "()", "parent": 634, "children": [], "start_point": {"row": 187, "column": 18}, "end_point": {"row": 187, "column": 20}}, {"id": 637, "type": "declaration", "text": "void\t\t\t\tDraw(BView* view, const BPoint& offset);", "parent": 575, "children": [638, 639], "start_point": {"row": 188, "column": 3}, "end_point": {"row": 188, "column": 51}}, {"id": 638, "type": "primitive_type", "text": "void", "parent": 637, "children": [], "start_point": {"row": 188, "column": 3}, "end_point": {"row": 188, "column": 7}}, {"id": 639, "type": "function_declarator", "text": "Draw(BView* view, const BPoint& offset)", "parent": 637, "children": [640, 641], "start_point": {"row": 188, "column": 11}, "end_point": {"row": 188, "column": 50}}, {"id": 640, "type": "identifier", "text": "Draw", "parent": 639, "children": [], "start_point": {"row": 188, "column": 11}, "end_point": {"row": 188, "column": 15}}, {"id": 641, "type": "parameter_list", "text": "(BView* view, const BPoint& offset)", "parent": 639, "children": [642, 647], "start_point": {"row": 188, "column": 15}, "end_point": {"row": 188, "column": 50}}, {"id": 642, "type": "parameter_declaration", "text": "BView* view", "parent": 641, "children": [643, 644], "start_point": {"row": 188, "column": 16}, "end_point": {"row": 188, "column": 27}}, {"id": 643, "type": "type_identifier", "text": "BView", "parent": 642, "children": [], "start_point": {"row": 188, "column": 16}, "end_point": {"row": 188, "column": 21}}, {"id": 644, "type": "pointer_declarator", "text": "* view", "parent": 642, "children": [645, 646], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 27}}, {"id": 645, "type": "*", "text": "*", "parent": 644, "children": [], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 22}}, {"id": 646, "type": "identifier", "text": "view", "parent": 644, "children": [], "start_point": {"row": 188, "column": 23}, "end_point": {"row": 188, "column": 27}}, {"id": 647, "type": "parameter_declaration", "text": "const BPoint& offset", "parent": 641, "children": [648, 649], "start_point": {"row": 188, "column": 29}, "end_point": {"row": 188, "column": 49}}, {"id": 648, "type": "type_identifier", "text": "BPoint", "parent": 647, "children": [], "start_point": {"row": 188, "column": 35}, "end_point": {"row": 188, "column": 41}}, {"id": 649, "type": "identifier", "text": "offset", "parent": 647, "children": [], "start_point": {"row": 188, "column": 43}, "end_point": {"row": 188, "column": 49}}, {"id": 650, "type": "type_identifier", "text": "int32", "parent": 575, "children": [], "start_point": {"row": 190, "column": 3}, "end_point": {"row": 190, "column": 8}}, {"id": 651, "type": "function_declarator", "text": "CountGlyphs()", "parent": 575, "children": [652, 653], "start_point": {"row": 190, "column": 12}, "end_point": {"row": 190, "column": 25}}, {"id": 652, "type": "identifier", "text": "CountGlyphs", "parent": 651, "children": [], "start_point": {"row": 190, "column": 12}, "end_point": {"row": 190, "column": 23}}, {"id": 653, "type": "parameter_list", "text": "()", "parent": 651, "children": [], "start_point": {"row": 190, "column": 23}, "end_point": {"row": 190, "column": 25}}, {"id": 654, "type": "declaration", "text": "const;\n\t\t\tint32\t\t\t\tCountLines();", "parent": 575, "children": [655, 656], "start_point": {"row": 190, "column": 26}, "end_point": {"row": 191, "column": 25}}, {"id": 655, "type": "type_identifier", "text": "int32", "parent": 654, "children": [], "start_point": {"row": 191, "column": 3}, "end_point": {"row": 191, "column": 8}}, {"id": 656, "type": "function_declarator", "text": "CountLines()", "parent": 654, "children": [657, 658], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 24}}, {"id": 657, "type": "identifier", "text": "CountLines", "parent": 656, "children": [], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 22}}, {"id": 658, "type": "parameter_list", "text": "()", "parent": 656, "children": [], "start_point": {"row": 191, "column": 22}, "end_point": {"row": 191, "column": 24}}, {"id": 659, "type": "declaration", "text": "int32\t\t\t\tLineIndexForOffset(int32 textOffset);", "parent": 575, "children": [660, 661], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 49}}, {"id": 660, "type": "type_identifier", "text": "int32", "parent": 659, "children": [], "start_point": {"row": 193, "column": 3}, "end_point": {"row": 193, "column": 8}}, {"id": 661, "type": "function_declarator", "text": "LineIndexForOffset(int32 textOffset)", "parent": 659, "children": [662, 663], "start_point": {"row": 193, "column": 12}, "end_point": {"row": 193, "column": 48}}, {"id": 662, "type": "identifier", "text": "LineIndexForOffset", "parent": 661, "children": [], "start_point": {"row": 193, "column": 12}, "end_point": {"row": 193, "column": 30}}, {"id": 663, "type": "parameter_list", "text": "(int32 textOffset)", "parent": 661, "children": [664], "start_point": {"row": 193, "column": 30}, "end_point": {"row": 193, "column": 48}}, {"id": 664, "type": "parameter_declaration", "text": "int32 textOffset", "parent": 663, "children": [665, 666], "start_point": {"row": 193, "column": 31}, "end_point": {"row": 193, "column": 47}}, {"id": 665, "type": "type_identifier", "text": "int32", "parent": 664, "children": [], "start_point": {"row": 193, "column": 31}, "end_point": {"row": 193, "column": 36}}, {"id": 666, "type": "identifier", "text": "textOffset", "parent": 664, "children": [], "start_point": {"row": 193, "column": 37}, "end_point": {"row": 193, "column": 47}}, {"id": 667, "type": "declaration", "text": "int32\t\t\t\tFirstOffsetOnLine(int32 lineIndex);", "parent": 575, "children": [668, 669], "start_point": {"row": 194, "column": 3}, "end_point": {"row": 194, "column": 47}}, {"id": 668, "type": "type_identifier", "text": "int32", "parent": 667, "children": [], "start_point": {"row": 194, "column": 3}, "end_point": {"row": 194, "column": 8}}, {"id": 669, "type": "function_declarator", "text": "FirstOffsetOnLine(int32 lineIndex)", "parent": 667, "children": [670, 671], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 46}}, {"id": 670, "type": "identifier", "text": "FirstOffsetOnLine", "parent": 669, "children": [], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 29}}, {"id": 671, "type": "parameter_list", "text": "(int32 lineIndex)", "parent": 669, "children": [672], "start_point": {"row": 194, "column": 29}, "end_point": {"row": 194, "column": 46}}, {"id": 672, "type": "parameter_declaration", "text": "int32 lineIndex", "parent": 671, "children": [673, 674], "start_point": {"row": 194, "column": 30}, "end_point": {"row": 194, "column": 45}}, {"id": 673, "type": "type_identifier", "text": "int32", "parent": 672, "children": [], "start_point": {"row": 194, "column": 30}, "end_point": {"row": 194, "column": 35}}, {"id": 674, "type": "identifier", "text": "lineIndex", "parent": 672, "children": [], "start_point": {"row": 194, "column": 36}, "end_point": {"row": 194, "column": 45}}, {"id": 675, "type": "declaration", "text": "int32\t\t\t\tLastOffsetOnLine(int32 lineIndex);", "parent": 575, "children": [676, 677], "start_point": {"row": 195, "column": 3}, "end_point": {"row": 195, "column": 46}}, {"id": 676, "type": "type_identifier", "text": "int32", "parent": 675, "children": [], "start_point": {"row": 195, "column": 3}, "end_point": {"row": 195, "column": 8}}, {"id": 677, "type": "function_declarator", "text": "LastOffsetOnLine(int32 lineIndex)", "parent": 675, "children": [678, 679], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 45}}, {"id": 678, "type": "identifier", "text": "LastOffsetOnLine", "parent": 677, "children": [], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 28}}, {"id": 679, "type": "parameter_list", "text": "(int32 lineIndex)", "parent": 677, "children": [680], "start_point": {"row": 195, "column": 28}, "end_point": {"row": 195, "column": 45}}, {"id": 680, "type": "parameter_declaration", "text": "int32 lineIndex", "parent": 679, "children": [681, 682], "start_point": {"row": 195, "column": 29}, "end_point": {"row": 195, "column": 44}}, {"id": 681, "type": "type_identifier", "text": "int32", "parent": 680, "children": [], "start_point": {"row": 195, "column": 29}, "end_point": {"row": 195, "column": 34}}, {"id": 682, "type": "identifier", "text": "lineIndex", "parent": 680, "children": [], "start_point": {"row": 195, "column": 35}, "end_point": {"row": 195, "column": 44}}, {"id": 683, "type": "declaration", "text": "void\t\t\t\tGetLineBounds(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);", "parent": 575, "children": [684, 685], "start_point": {"row": 197, "column": 3}, "end_point": {"row": 199, "column": 31}}, {"id": 684, "type": "primitive_type", "text": "void", "parent": 683, "children": [], "start_point": {"row": 197, "column": 3}, "end_point": {"row": 197, "column": 7}}, {"id": 685, "type": "function_declarator", "text": "GetLineBounds(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)", "parent": 683, "children": [686, 687], "start_point": {"row": 197, "column": 11}, "end_point": {"row": 199, "column": 30}}, {"id": 686, "type": "identifier", "text": "GetLineBounds", "parent": 685, "children": [], "start_point": {"row": 197, "column": 11}, "end_point": {"row": 197, "column": 24}}, {"id": 687, "type": "parameter_list", "text": "(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)", "parent": 685, "children": [688, 691, 694, 697, 700], "start_point": {"row": 197, "column": 24}, "end_point": {"row": 199, "column": 30}}, {"id": 688, "type": "parameter_declaration", "text": "int32 lineIndex", "parent": 687, "children": [689, 690], "start_point": {"row": 197, "column": 25}, "end_point": {"row": 197, "column": 40}}, {"id": 689, "type": "type_identifier", "text": "int32", "parent": 688, "children": [], "start_point": {"row": 197, "column": 25}, "end_point": {"row": 197, "column": 30}}, {"id": 690, "type": "identifier", "text": "lineIndex", "parent": 688, "children": [], "start_point": {"row": 197, "column": 31}, "end_point": {"row": 197, "column": 40}}, {"id": 691, "type": "parameter_declaration", "text": "float& x1", "parent": 687, "children": [692, 693], "start_point": {"row": 198, "column": 9}, "end_point": {"row": 198, "column": 18}}, {"id": 692, "type": "primitive_type", "text": "float", "parent": 691, "children": [], "start_point": {"row": 198, "column": 9}, "end_point": {"row": 198, "column": 14}}, {"id": 693, "type": "identifier", "text": "x1", "parent": 691, "children": [], "start_point": {"row": 198, "column": 16}, "end_point": {"row": 198, "column": 18}}, {"id": 694, "type": "parameter_declaration", "text": "float& y1", "parent": 687, "children": [695, 696], "start_point": {"row": 198, "column": 20}, "end_point": {"row": 198, "column": 29}}, {"id": 695, "type": "primitive_type", "text": "float", "parent": 694, "children": [], "start_point": {"row": 198, "column": 20}, "end_point": {"row": 198, "column": 25}}, {"id": 696, "type": "identifier", "text": "y1", "parent": 694, "children": [], "start_point": {"row": 198, "column": 27}, "end_point": {"row": 198, "column": 29}}, {"id": 697, "type": "parameter_declaration", "text": "float& x2", "parent": 687, "children": [698, 699], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 18}}, {"id": 698, "type": "primitive_type", "text": "float", "parent": 697, "children": [], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 199, "column": 14}}, {"id": 699, "type": "identifier", "text": "x2", "parent": 697, "children": [], "start_point": {"row": 199, "column": 16}, "end_point": {"row": 199, "column": 18}}, {"id": 700, "type": "parameter_declaration", "text": "float& y2", "parent": 687, "children": [701, 702], "start_point": {"row": 199, "column": 20}, "end_point": {"row": 199, "column": 29}}, {"id": 701, "type": "primitive_type", "text": "float", "parent": 700, "children": [], "start_point": {"row": 199, "column": 20}, "end_point": {"row": 199, "column": 25}}, {"id": 702, "type": "identifier", "text": "y2", "parent": 700, "children": [], "start_point": {"row": 199, "column": 27}, "end_point": {"row": 199, "column": 29}}, {"id": 703, "type": "declaration", "text": "void\t\t\t\tGetTextBounds(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);", "parent": 575, "children": [704, 705], "start_point": {"row": 201, "column": 3}, "end_point": {"row": 203, "column": 31}}, {"id": 704, "type": "primitive_type", "text": "void", "parent": 703, "children": [], "start_point": {"row": 201, "column": 3}, "end_point": {"row": 201, "column": 7}}, {"id": 705, "type": "function_declarator", "text": "GetTextBounds(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)", "parent": 703, "children": [706, 707], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 203, "column": 30}}, {"id": 706, "type": "identifier", "text": "GetTextBounds", "parent": 705, "children": [], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 24}}, {"id": 707, "type": "parameter_list", "text": "(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)", "parent": 705, "children": [708, 711, 714, 717, 720], "start_point": {"row": 201, "column": 24}, "end_point": {"row": 203, "column": 30}}, {"id": 708, "type": "parameter_declaration", "text": "int32 textOffset", "parent": 707, "children": [709, 710], "start_point": {"row": 201, "column": 25}, "end_point": {"row": 201, "column": 41}}, {"id": 709, "type": "type_identifier", "text": "int32", "parent": 708, "children": [], "start_point": {"row": 201, "column": 25}, "end_point": {"row": 201, "column": 30}}, {"id": 710, "type": "identifier", "text": "textOffset", "parent": 708, "children": [], "start_point": {"row": 201, "column": 31}, "end_point": {"row": 201, "column": 41}}, {"id": 711, "type": "parameter_declaration", "text": "float& x1", "parent": 707, "children": [712, 713], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 18}}, {"id": 712, "type": "primitive_type", "text": "float", "parent": 711, "children": [], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 14}}, {"id": 713, "type": "identifier", "text": "x1", "parent": 711, "children": [], "start_point": {"row": 202, "column": 16}, "end_point": {"row": 202, "column": 18}}, {"id": 714, "type": "parameter_declaration", "text": "float& y1", "parent": 707, "children": [715, 716], "start_point": {"row": 202, "column": 20}, "end_point": {"row": 202, "column": 29}}, {"id": 715, "type": "primitive_type", "text": "float", "parent": 714, "children": [], "start_point": {"row": 202, "column": 20}, "end_point": {"row": 202, "column": 25}}, {"id": 716, "type": "identifier", "text": "y1", "parent": 714, "children": [], "start_point": {"row": 202, "column": 27}, "end_point": {"row": 202, "column": 29}}, {"id": 717, "type": "parameter_declaration", "text": "float& x2", "parent": 707, "children": [718, 719], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 18}}, {"id": 718, "type": "primitive_type", "text": "float", "parent": 717, "children": [], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 14}}, {"id": 719, "type": "identifier", "text": "x2", "parent": 717, "children": [], "start_point": {"row": 203, "column": 16}, "end_point": {"row": 203, "column": 18}}, {"id": 720, "type": "parameter_declaration", "text": "float& y2", "parent": 707, "children": [721, 722], "start_point": {"row": 203, "column": 20}, "end_point": {"row": 203, "column": 29}}, {"id": 721, "type": "primitive_type", "text": "float", "parent": 720, "children": [], "start_point": {"row": 203, "column": 20}, "end_point": {"row": 203, "column": 25}}, {"id": 722, "type": "identifier", "text": "y2", "parent": 720, "children": [], "start_point": {"row": 203, "column": 27}, "end_point": {"row": 203, "column": 29}}, {"id": 723, "type": "declaration", "text": "int32\t\t\t\tTextOffsetAt(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter);", "parent": 575, "children": [724, 725], "start_point": {"row": 205, "column": 3}, "end_point": {"row": 206, "column": 30}}, {"id": 724, "type": "type_identifier", "text": "int32", "parent": 723, "children": [], "start_point": {"row": 205, "column": 3}, "end_point": {"row": 205, "column": 8}}, {"id": 725, "type": "function_declarator", "text": "TextOffsetAt(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter)", "parent": 723, "children": [726, 727], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 206, "column": 29}}, {"id": 726, "type": "identifier", "text": "TextOffsetAt", "parent": 725, "children": [], "start_point": {"row": 205, "column": 12}, "end_point": {"row": 205, "column": 24}}, {"id": 727, "type": "parameter_list", "text": "(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter)", "parent": 725, "children": [728, 731, 734], "start_point": {"row": 205, "column": 24}, "end_point": {"row": 206, "column": 29}}, {"id": 728, "type": "parameter_declaration", "text": "float x", "parent": 727, "children": [729, 730], "start_point": {"row": 205, "column": 25}, "end_point": {"row": 205, "column": 32}}, {"id": 729, "type": "primitive_type", "text": "float", "parent": 728, "children": [], "start_point": {"row": 205, "column": 25}, "end_point": {"row": 205, "column": 30}}, {"id": 730, "type": "identifier", "text": "x", "parent": 728, "children": [], "start_point": {"row": 205, "column": 31}, "end_point": {"row": 205, "column": 32}}, {"id": 731, "type": "parameter_declaration", "text": "float y", "parent": 727, "children": [732, 733], "start_point": {"row": 205, "column": 34}, "end_point": {"row": 205, "column": 41}}, {"id": 732, "type": "primitive_type", "text": "float", "parent": 731, "children": [], "start_point": {"row": 205, "column": 34}, "end_point": {"row": 205, "column": 39}}, {"id": 733, "type": "identifier", "text": "y", "parent": 731, "children": [], "start_point": {"row": 205, "column": 40}, "end_point": {"row": 205, "column": 41}}, {"id": 734, "type": "parameter_declaration", "text": "bool& rightOfCenter", "parent": 727, "children": [735, 736], "start_point": {"row": 206, "column": 9}, "end_point": {"row": 206, "column": 28}}, {"id": 735, "type": "primitive_type", "text": "bool", "parent": 734, "children": [], "start_point": {"row": 206, "column": 9}, "end_point": {"row": 206, "column": 13}}, {"id": 736, "type": "identifier", "text": "rightOfCenter", "parent": 734, "children": [], "start_point": {"row": 206, "column": 15}, "end_point": {"row": 206, "column": 28}}, {"id": 737, "type": "ERROR", "text": "private:", "parent": 575, "children": [], "start_point": {"row": 208, "column": 0}, "end_point": {"row": 208, "column": 8}}, {"id": 738, "type": "declaration", "text": "void\t\t\t\t_Init();", "parent": 575, "children": [739, 740], "start_point": {"row": 209, "column": 3}, "end_point": {"row": 209, "column": 19}}, {"id": 739, "type": "primitive_type", "text": "void", "parent": 738, "children": [], "start_point": {"row": 209, "column": 3}, "end_point": {"row": 209, "column": 7}}, {"id": 740, "type": "function_declarator", "text": "_Init()", "parent": 738, "children": [741, 742], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 18}}, {"id": 741, "type": "identifier", "text": "_Init", "parent": 740, "children": [], "start_point": {"row": 209, "column": 11}, "end_point": {"row": 209, "column": 16}}, {"id": 742, "type": "parameter_list", "text": "()", "parent": 740, "children": [], "start_point": {"row": 209, "column": 16}, "end_point": {"row": 209, "column": 18}}, {"id": 743, "type": "declaration", "text": "void\t\t\t\t_ValidateLayout();", "parent": 575, "children": [744, 745], "start_point": {"row": 211, "column": 3}, "end_point": {"row": 211, "column": 29}}, {"id": 744, "type": "primitive_type", "text": "void", "parent": 743, "children": [], "start_point": {"row": 211, "column": 3}, "end_point": {"row": 211, "column": 7}}, {"id": 745, "type": "function_declarator", "text": "_ValidateLayout()", "parent": 743, "children": [746, 747], "start_point": {"row": 211, "column": 11}, "end_point": {"row": 211, "column": 28}}, {"id": 746, "type": "identifier", "text": "_ValidateLayout", "parent": 745, "children": [], "start_point": {"row": 211, "column": 11}, "end_point": {"row": 211, "column": 26}}, {"id": 747, "type": "parameter_list", "text": "()", "parent": 745, "children": [], "start_point": {"row": 211, "column": 26}, "end_point": {"row": 211, "column": 28}}, {"id": 748, "type": "declaration", "text": "void\t\t\t\t_Layout();", "parent": 575, "children": [749, 750], "start_point": {"row": 212, "column": 3}, "end_point": {"row": 212, "column": 21}}, {"id": 749, "type": "primitive_type", "text": "void", "parent": 748, "children": [], "start_point": {"row": 212, "column": 3}, "end_point": {"row": 212, "column": 7}}, {"id": 750, "type": "function_declarator", "text": "_Layout()", "parent": 748, "children": [751, 752], "start_point": {"row": 212, "column": 11}, "end_point": {"row": 212, "column": 20}}, {"id": 751, "type": "identifier", "text": "_Layout", "parent": 750, "children": [], "start_point": {"row": 212, "column": 11}, "end_point": {"row": 212, "column": 18}}, {"id": 752, "type": "parameter_list", "text": "()", "parent": 750, "children": [], "start_point": {"row": 212, "column": 18}, "end_point": {"row": 212, "column": 20}}, {"id": 753, "type": "declaration", "text": "void\t\t\t\t_ApplyAlignment();", "parent": 575, "children": [754, 755], "start_point": {"row": 213, "column": 3}, "end_point": {"row": 213, "column": 29}}, {"id": 754, "type": "primitive_type", "text": "void", "parent": 753, "children": [], "start_point": {"row": 213, "column": 3}, "end_point": {"row": 213, "column": 7}}, {"id": 755, "type": "function_declarator", "text": "_ApplyAlignment()", "parent": 753, "children": [756, 757], "start_point": {"row": 213, "column": 11}, "end_point": {"row": 213, "column": 28}}, {"id": 756, "type": "identifier", "text": "_ApplyAlignment", "parent": 755, "children": [], "start_point": {"row": 213, "column": 11}, "end_point": {"row": 213, "column": 26}}, {"id": 757, "type": "parameter_list", "text": "()", "parent": 755, "children": [], "start_point": {"row": 213, "column": 26}, "end_point": {"row": 213, "column": 28}}, {"id": 758, "type": "declaration", "text": "bool\t\t\t\t_AppendGlyphInfos(const TextSpan& span);", "parent": 575, "children": [759, 760], "start_point": {"row": 215, "column": 3}, "end_point": {"row": 215, "column": 51}}, {"id": 759, "type": "primitive_type", "text": "bool", "parent": 758, "children": [], "start_point": {"row": 215, "column": 3}, "end_point": {"row": 215, "column": 7}}, {"id": 760, "type": "function_declarator", "text": "_AppendGlyphInfos(const TextSpan& span)", "parent": 758, "children": [761, 762], "start_point": {"row": 215, "column": 11}, "end_point": {"row": 215, "column": 50}}, {"id": 761, "type": "identifier", "text": "_AppendGlyphInfos", "parent": 760, "children": [], "start_point": {"row": 215, "column": 11}, "end_point": {"row": 215, "column": 28}}, {"id": 762, "type": "parameter_list", "text": "(const TextSpan& span)", "parent": 760, "children": [763], "start_point": {"row": 215, "column": 28}, "end_point": {"row": 215, "column": 50}}, {"id": 763, "type": "parameter_declaration", "text": "const TextSpan& span", "parent": 762, "children": [764, 765], "start_point": {"row": 215, "column": 29}, "end_point": {"row": 215, "column": 49}}, {"id": 764, "type": "type_identifier", "text": "TextSpan", "parent": 763, "children": [], "start_point": {"row": 215, "column": 35}, "end_point": {"row": 215, "column": 43}}, {"id": 765, "type": "identifier", "text": "span", "parent": 763, "children": [], "start_point": {"row": 215, "column": 45}, "end_point": {"row": 215, "column": 49}}, {"id": 766, "type": "declaration", "text": "bool\t\t\t\t_AppendGlyphInfo(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);", "parent": 575, "children": [767, 768], "start_point": {"row": 216, "column": 3}, "end_point": {"row": 218, "column": 38}}, {"id": 767, "type": "primitive_type", "text": "bool", "parent": 766, "children": [], "start_point": {"row": 216, "column": 3}, "end_point": {"row": 216, "column": 7}}, {"id": 768, "type": "function_declarator", "text": "_AppendGlyphInfo(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style)", "parent": 766, "children": [769, 770], "start_point": {"row": 216, "column": 11}, "end_point": {"row": 218, "column": 37}}, {"id": 769, "type": "identifier", "text": "_AppendGlyphInfo", "parent": 768, "children": [], "start_point": {"row": 216, "column": 11}, "end_point": {"row": 216, "column": 27}}, {"id": 770, "type": "parameter_list", "text": "(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style)", "parent": 768, "children": [771, 774, 777], "start_point": {"row": 216, "column": 27}, "end_point": {"row": 218, "column": 37}}, {"id": 771, "type": "parameter_declaration", "text": "uint32 charCode", "parent": 770, "children": [772, 773], "start_point": {"row": 216, "column": 28}, "end_point": {"row": 216, "column": 43}}, {"id": 772, "type": "type_identifier", "text": "uint32", "parent": 771, "children": [], "start_point": {"row": 216, "column": 28}, "end_point": {"row": 216, "column": 34}}, {"id": 773, "type": "identifier", "text": "charCode", "parent": 771, "children": [], "start_point": {"row": 216, "column": 35}, "end_point": {"row": 216, "column": 43}}, {"id": 774, "type": "parameter_declaration", "text": "float advanceX", "parent": 770, "children": [775, 776], "start_point": {"row": 217, "column": 9}, "end_point": {"row": 217, "column": 23}}, {"id": 775, "type": "primitive_type", "text": "float", "parent": 774, "children": [], "start_point": {"row": 217, "column": 9}, "end_point": {"row": 217, "column": 14}}, {"id": 776, "type": "identifier", "text": "advanceX", "parent": 774, "children": [], "start_point": {"row": 217, "column": 15}, "end_point": {"row": 217, "column": 23}}, {"id": 777, "type": "parameter_declaration", "text": "const CharacterStyle& style", "parent": 770, "children": [778, 779], "start_point": {"row": 218, "column": 9}, "end_point": {"row": 218, "column": 36}}, {"id": 778, "type": "type_identifier", "text": "CharacterStyle", "parent": 777, "children": [], "start_point": {"row": 218, "column": 15}, "end_point": {"row": 218, "column": 29}}, {"id": 779, "type": "identifier", "text": "style", "parent": 777, "children": [], "start_point": {"row": 218, "column": 31}, "end_point": {"row": 218, "column": 36}}, {"id": 780, "type": "declaration", "text": "bool\t\t\t\t_FinalizeLine(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight);", "parent": 575, "children": [781, 782], "start_point": {"row": 220, "column": 3}, "end_point": {"row": 221, "column": 52}}, {"id": 781, "type": "primitive_type", "text": "bool", "parent": 780, "children": [], "start_point": {"row": 220, "column": 3}, "end_point": {"row": 220, "column": 7}}, {"id": 782, "type": "function_declarator", "text": "_FinalizeLine(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight)", "parent": 780, "children": [783, 784], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 221, "column": 51}}, {"id": 783, "type": "identifier", "text": "_FinalizeLine", "parent": 782, "children": [], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 220, "column": 24}}, {"id": 784, "type": "parameter_list", "text": "(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight)", "parent": 782, "children": [785, 788, 791, 794, 797], "start_point": {"row": 220, "column": 24}, "end_point": {"row": 221, "column": 51}}, {"id": 785, "type": "parameter_declaration", "text": "int lineStart", "parent": 784, "children": [786, 787], "start_point": {"row": 220, "column": 25}, "end_point": {"row": 220, "column": 38}}, {"id": 786, "type": "primitive_type", "text": "int", "parent": 785, "children": [], "start_point": {"row": 220, "column": 25}, "end_point": {"row": 220, "column": 28}}, {"id": 787, "type": "identifier", "text": "lineStart", "parent": 785, "children": [], "start_point": {"row": 220, "column": 29}, "end_point": {"row": 220, "column": 38}}, {"id": 788, "type": "parameter_declaration", "text": "int lineEnd", "parent": 784, "children": [789, 790], "start_point": {"row": 220, "column": 40}, "end_point": {"row": 220, "column": 51}}, {"id": 789, "type": "primitive_type", "text": "int", "parent": 788, "children": [], "start_point": {"row": 220, "column": 40}, "end_point": {"row": 220, "column": 43}}, {"id": 790, "type": "identifier", "text": "lineEnd", "parent": 788, "children": [], "start_point": {"row": 220, "column": 44}, "end_point": {"row": 220, "column": 51}}, {"id": 791, "type": "parameter_declaration", "text": "int lineIndex", "parent": 784, "children": [792, 793], "start_point": {"row": 221, "column": 9}, "end_point": {"row": 221, "column": 22}}, {"id": 792, "type": "primitive_type", "text": "int", "parent": 791, "children": [], "start_point": {"row": 221, "column": 9}, "end_point": {"row": 221, "column": 12}}, {"id": 793, "type": "identifier", "text": "lineIndex", "parent": 791, "children": [], "start_point": {"row": 221, "column": 13}, "end_point": {"row": 221, "column": 22}}, {"id": 794, "type": "parameter_declaration", "text": "float y", "parent": 784, "children": [795, 796], "start_point": {"row": 221, "column": 24}, "end_point": {"row": 221, "column": 31}}, {"id": 795, "type": "primitive_type", "text": "float", "parent": 794, "children": [], "start_point": {"row": 221, "column": 24}, "end_point": {"row": 221, "column": 29}}, {"id": 796, "type": "identifier", "text": "y", "parent": 794, "children": [], "start_point": {"row": 221, "column": 30}, "end_point": {"row": 221, "column": 31}}, {"id": 797, "type": "parameter_declaration", "text": "float& lineHeight", "parent": 784, "children": [798, 799], "start_point": {"row": 221, "column": 33}, "end_point": {"row": 221, "column": 50}}, {"id": 798, "type": "primitive_type", "text": "float", "parent": 797, "children": [], "start_point": {"row": 221, "column": 33}, "end_point": {"row": 221, "column": 38}}, {"id": 799, "type": "identifier", "text": "lineHeight", "parent": 797, "children": [], "start_point": {"row": 221, "column": 40}, "end_point": {"row": 221, "column": 50}}, {"id": 800, "type": "declaration", "text": "void\t\t\t\t_IncludeStyleInLine(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);", "parent": 575, "children": [801, 802], "start_point": {"row": 223, "column": 3}, "end_point": {"row": 224, "column": 38}}, {"id": 801, "type": "primitive_type", "text": "void", "parent": 800, "children": [], "start_point": {"row": 223, "column": 3}, "end_point": {"row": 223, "column": 7}}, {"id": 802, "type": "function_declarator", "text": "_IncludeStyleInLine(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style)", "parent": 800, "children": [803, 804], "start_point": {"row": 223, "column": 11}, "end_point": {"row": 224, "column": 37}}, {"id": 803, "type": "identifier", "text": "_IncludeStyleInLine", "parent": 802, "children": [], "start_point": {"row": 223, "column": 11}, "end_point": {"row": 223, "column": 30}}, {"id": 804, "type": "parameter_list", "text": "(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style)", "parent": 802, "children": [805, 808], "start_point": {"row": 223, "column": 30}, "end_point": {"row": 224, "column": 37}}, {"id": 805, "type": "parameter_declaration", "text": "LineInfo& line", "parent": 804, "children": [806, 807], "start_point": {"row": 223, "column": 31}, "end_point": {"row": 223, "column": 45}}, {"id": 806, "type": "type_identifier", "text": "LineInfo", "parent": 805, "children": [], "start_point": {"row": 223, "column": 31}, "end_point": {"row": 223, "column": 39}}, {"id": 807, "type": "identifier", "text": "line", "parent": 805, "children": [], "start_point": {"row": 223, "column": 41}, "end_point": {"row": 223, "column": 45}}, {"id": 808, "type": "parameter_declaration", "text": "const CharacterStyle& style", "parent": 804, "children": [809, 810], "start_point": {"row": 224, "column": 9}, "end_point": {"row": 224, "column": 36}}, {"id": 809, "type": "type_identifier", "text": "CharacterStyle", "parent": 808, "children": [], "start_point": {"row": 224, "column": 15}, "end_point": {"row": 224, "column": 29}}, {"id": 810, "type": "identifier", "text": "style", "parent": 808, "children": [], "start_point": {"row": 224, "column": 31}, "end_point": {"row": 224, "column": 36}}, {"id": 811, "type": "ERROR", "text": "void\t\t\t\t_DrawLine(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line) const;\n\t\t\tvoid\t\t\t\t_DrawSpan(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset) const;\n\n\t\t\tvoid\t\t\t\t_GetEmptyLayoutBounds(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2) const;", "parent": 575, "children": [812, 813, 827, 828, 845, 846], "start_point": {"row": 226, "column": 3}, "end_point": {"row": 233, "column": 37}}, {"id": 812, "type": "primitive_type", "text": "void", "parent": 811, "children": [], "start_point": {"row": 226, "column": 3}, "end_point": {"row": 226, "column": 7}}, {"id": 813, "type": "function_declarator", "text": "_DrawLine(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line) const", "parent": 811, "children": [814, 815], "start_point": {"row": 226, "column": 11}, "end_point": {"row": 227, "column": 36}}, {"id": 814, "type": "identifier", "text": "_DrawLine", "parent": 813, "children": [], "start_point": {"row": 226, "column": 11}, "end_point": {"row": 226, "column": 20}}, {"id": 815, "type": "parameter_list", "text": "(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line)", "parent": 813, "children": [816, 821, 824], "start_point": {"row": 226, "column": 20}, "end_point": {"row": 227, "column": 30}}, {"id": 816, "type": "parameter_declaration", "text": "BView* view", "parent": 815, "children": [817, 818], "start_point": {"row": 226, "column": 21}, "end_point": {"row": 226, "column": 32}}, {"id": 817, "type": "type_identifier", "text": "BView", "parent": 816, "children": [], "start_point": {"row": 226, "column": 21}, "end_point": {"row": 226, "column": 26}}, {"id": 818, "type": "pointer_declarator", "text": "* view", "parent": 816, "children": [819, 820], "start_point": {"row": 226, "column": 26}, "end_point": {"row": 226, "column": 32}}, {"id": 819, "type": "*", "text": "*", "parent": 818, "children": [], "start_point": {"row": 226, "column": 26}, "end_point": {"row": 226, "column": 27}}, {"id": 820, "type": "identifier", "text": "view", "parent": 818, "children": [], "start_point": {"row": 226, "column": 28}, "end_point": {"row": 226, "column": 32}}, {"id": 821, "type": "parameter_declaration", "text": "const BPoint& offset", "parent": 815, "children": [822, 823], "start_point": {"row": 226, "column": 34}, "end_point": {"row": 226, "column": 54}}, {"id": 822, "type": "type_identifier", "text": "BPoint", "parent": 821, "children": [], "start_point": {"row": 226, "column": 40}, "end_point": {"row": 226, "column": 46}}, {"id": 823, "type": "identifier", "text": "offset", "parent": 821, "children": [], "start_point": {"row": 226, "column": 48}, "end_point": {"row": 226, "column": 54}}, {"id": 824, "type": "parameter_declaration", "text": "const LineInfo& line", "parent": 815, "children": [825, 826], "start_point": {"row": 227, "column": 9}, "end_point": {"row": 227, "column": 29}}, {"id": 825, "type": "type_identifier", "text": "LineInfo", "parent": 824, "children": [], "start_point": {"row": 227, "column": 15}, "end_point": {"row": 227, "column": 23}}, {"id": 826, "type": "identifier", "text": "line", "parent": 824, "children": [], "start_point": {"row": 227, "column": 25}, "end_point": {"row": 227, "column": 29}}, {"id": 827, "type": "primitive_type", "text": "void", "parent": 811, "children": [], "start_point": {"row": 228, "column": 3}, "end_point": {"row": 228, "column": 7}}, {"id": 828, "type": "function_declarator", "text": "_DrawSpan(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset) const", "parent": 811, "children": [829, 830], "start_point": {"row": 228, "column": 11}, "end_point": {"row": 230, "column": 32}}, {"id": 829, "type": "identifier", "text": "_DrawSpan", "parent": 828, "children": [], "start_point": {"row": 228, "column": 11}, "end_point": {"row": 228, "column": 20}}, {"id": 830, "type": "parameter_list", "text": "(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset)", "parent": 828, "children": [831, 836, 839, 842], "start_point": {"row": 228, "column": 20}, "end_point": {"row": 230, "column": 26}}, {"id": 831, "type": "parameter_declaration", "text": "BView* view", "parent": 830, "children": [832, 833], "start_point": {"row": 228, "column": 21}, "end_point": {"row": 228, "column": 32}}, {"id": 832, "type": "type_identifier", "text": "BView", "parent": 831, "children": [], "start_point": {"row": 228, "column": 21}, "end_point": {"row": 228, "column": 26}}, {"id": 833, "type": "pointer_declarator", "text": "* view", "parent": 831, "children": [834, 835], "start_point": {"row": 228, "column": 26}, "end_point": {"row": 228, "column": 32}}, {"id": 834, "type": "*", "text": "*", "parent": 833, "children": [], "start_point": {"row": 228, "column": 26}, "end_point": {"row": 228, "column": 27}}, {"id": 835, "type": "identifier", "text": "view", "parent": 833, "children": [], "start_point": {"row": 228, "column": 28}, "end_point": {"row": 228, "column": 32}}, {"id": 836, "type": "parameter_declaration", "text": "BPoint offset", "parent": 830, "children": [837, 838], "start_point": {"row": 228, "column": 34}, "end_point": {"row": 228, "column": 47}}, {"id": 837, "type": "type_identifier", "text": "BPoint", "parent": 836, "children": [], "start_point": {"row": 228, "column": 34}, "end_point": {"row": 228, "column": 40}}, {"id": 838, "type": "identifier", "text": "offset", "parent": 836, "children": [], "start_point": {"row": 228, "column": 41}, "end_point": {"row": 228, "column": 47}}, {"id": 839, "type": "parameter_declaration", "text": "const TextSpan& span", "parent": 830, "children": [840, 841], "start_point": {"row": 229, "column": 9}, "end_point": {"row": 229, "column": 29}}, {"id": 840, "type": "type_identifier", "text": "TextSpan", "parent": 839, "children": [], "start_point": {"row": 229, "column": 15}, "end_point": {"row": 229, "column": 23}}, {"id": 841, "type": "identifier", "text": "span", "parent": 839, "children": [], "start_point": {"row": 229, "column": 25}, "end_point": {"row": 229, "column": 29}}, {"id": 842, "type": "parameter_declaration", "text": "int32 textOffset", "parent": 830, "children": [843, 844], "start_point": {"row": 230, "column": 9}, "end_point": {"row": 230, "column": 25}}, {"id": 843, "type": "type_identifier", "text": "int32", "parent": 842, "children": [], "start_point": {"row": 230, "column": 9}, "end_point": {"row": 230, "column": 14}}, {"id": 844, "type": "identifier", "text": "textOffset", "parent": 842, "children": [], "start_point": {"row": 230, "column": 15}, "end_point": {"row": 230, "column": 25}}, {"id": 845, "type": "primitive_type", "text": "void", "parent": 811, "children": [], "start_point": {"row": 232, "column": 3}, "end_point": {"row": 232, "column": 7}}, {"id": 846, "type": "function_declarator", "text": "_GetEmptyLayoutBounds(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2) const", "parent": 811, "children": [847, 848], "start_point": {"row": 232, "column": 11}, "end_point": {"row": 233, "column": 36}}, {"id": 847, "type": "identifier", "text": "_GetEmptyLayoutBounds", "parent": 846, "children": [], "start_point": {"row": 232, "column": 11}, "end_point": {"row": 232, "column": 32}}, {"id": 848, "type": "parameter_list", "text": "(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)", "parent": 846, "children": [849, 852, 855, 858], "start_point": {"row": 232, "column": 32}, "end_point": {"row": 233, "column": 30}}, {"id": 849, "type": "parameter_declaration", "text": "float& x1", "parent": 848, "children": [850, 851], "start_point": {"row": 232, "column": 33}, "end_point": {"row": 232, "column": 42}}, {"id": 850, "type": "primitive_type", "text": "float", "parent": 849, "children": [], "start_point": {"row": 232, "column": 33}, "end_point": {"row": 232, "column": 38}}, {"id": 851, "type": "identifier", "text": "x1", "parent": 849, "children": [], "start_point": {"row": 232, "column": 40}, "end_point": {"row": 232, "column": 42}}, {"id": 852, "type": "parameter_declaration", "text": "float& y1", "parent": 848, "children": [853, 854], "start_point": {"row": 232, "column": 44}, "end_point": {"row": 232, "column": 53}}, {"id": 853, "type": "primitive_type", "text": "float", "parent": 852, "children": [], "start_point": {"row": 232, "column": 44}, "end_point": {"row": 232, "column": 49}}, {"id": 854, "type": "identifier", "text": "y1", "parent": 852, "children": [], "start_point": {"row": 232, "column": 51}, "end_point": {"row": 232, "column": 53}}, {"id": 855, "type": "parameter_declaration", "text": "float& x2", "parent": 848, "children": [856, 857], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 18}}, {"id": 856, "type": "primitive_type", "text": "float", "parent": 855, "children": [], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 14}}, {"id": 857, "type": "identifier", "text": "x2", "parent": 855, "children": [], "start_point": {"row": 233, "column": 16}, "end_point": {"row": 233, "column": 18}}, {"id": 858, "type": "parameter_declaration", "text": "float& y2", "parent": 848, "children": [859, 860], "start_point": {"row": 233, "column": 20}, "end_point": {"row": 233, "column": 29}}, {"id": 859, "type": "primitive_type", "text": "float", "parent": 858, "children": [], "start_point": {"row": 233, "column": 20}, "end_point": {"row": 233, "column": 25}}, {"id": 860, "type": "identifier", "text": "y2", "parent": 858, "children": [], "start_point": {"row": 233, "column": 27}, "end_point": {"row": 233, "column": 29}}, {"id": 861, "type": "declaration", "text": "void\t\t\t\t_AppendTextSpans(const Paragraph& paragraph);", "parent": 575, "children": [862, 863], "start_point": {"row": 235, "column": 3}, "end_point": {"row": 235, "column": 56}}, {"id": 862, "type": "primitive_type", "text": "void", "parent": 861, "children": [], "start_point": {"row": 235, "column": 3}, "end_point": {"row": 235, "column": 7}}, {"id": 863, "type": "function_declarator", "text": "_AppendTextSpans(const Paragraph& paragraph)", "parent": 861, "children": [864, 865], "start_point": {"row": 235, "column": 11}, "end_point": {"row": 235, "column": 55}}, {"id": 864, "type": "identifier", "text": "_AppendTextSpans", "parent": 863, "children": [], "start_point": {"row": 235, "column": 11}, "end_point": {"row": 235, "column": 27}}, {"id": 865, "type": "parameter_list", "text": "(const Paragraph& paragraph)", "parent": 863, "children": [866], "start_point": {"row": 235, "column": 27}, "end_point": {"row": 235, "column": 55}}, {"id": 866, "type": "parameter_declaration", "text": "const Paragraph& paragraph", "parent": 865, "children": [867, 868], "start_point": {"row": 235, "column": 28}, "end_point": {"row": 235, "column": 54}}, {"id": 867, "type": "type_identifier", "text": "Paragraph", "parent": 866, "children": [], "start_point": {"row": 235, "column": 34}, "end_point": {"row": 235, "column": 43}}, {"id": 868, "type": "identifier", "text": "paragraph", "parent": 866, "children": [], "start_point": {"row": 235, "column": 45}, "end_point": {"row": 235, "column": 54}}, {"id": 869, "type": "declaration", "text": "private:\n\t\t\tstd::vector<TextSpan>\n\t\t\t\t\t\t\t\tfTextSpans;", "parent": 575, "children": [870, 876], "start_point": {"row": 237, "column": 0}, "end_point": {"row": 239, "column": 19}}, {"id": 870, "type": "ERROR", "text": ":\n\t\t\tstd::vector<TextSpan>", "parent": 869, "children": [871, 872, 873, 874, 875], "start_point": {"row": 237, "column": 7}, "end_point": {"row": 238, "column": 24}}, {"id": 871, "type": "identifier", "text": "std", "parent": 870, "children": [], "start_point": {"row": 238, "column": 3}, "end_point": {"row": 238, "column": 6}}, {"id": 872, "type": "identifier", "text": "vector", "parent": 870, "children": [], "start_point": {"row": 238, "column": 8}, "end_point": {"row": 238, "column": 14}}, {"id": 873, "type": "<", "text": "<", "parent": 870, "children": [], "start_point": {"row": 238, "column": 14}, "end_point": {"row": 238, "column": 15}}, {"id": 874, "type": "identifier", "text": "TextSpan", "parent": 870, "children": [], "start_point": {"row": 238, "column": 15}, "end_point": {"row": 238, "column": 23}}, {"id": 875, "type": ">", "text": ">", "parent": 870, "children": [], "start_point": {"row": 238, "column": 23}, "end_point": {"row": 238, "column": 24}}, {"id": 876, "type": "identifier", "text": "fTextSpans", "parent": 869, "children": [], "start_point": {"row": 239, "column": 8}, "end_point": {"row": 239, "column": 18}}, {"id": 877, "type": "declaration", "text": "ParagraphStyle\t\tfParagraphStyle;", "parent": 575, "children": [878, 879], "start_point": {"row": 240, "column": 3}, "end_point": {"row": 240, "column": 35}}, {"id": 878, "type": "type_identifier", "text": "ParagraphStyle", "parent": 877, "children": [], "start_point": {"row": 240, "column": 3}, "end_point": {"row": 240, "column": 17}}, {"id": 879, "type": "identifier", "text": "fParagraphStyle", "parent": 877, "children": [], "start_point": {"row": 240, "column": 19}, "end_point": {"row": 240, "column": 34}}, {"id": 880, "type": "declaration", "text": "float\t\t\t\tfWidth;", "parent": 575, "children": [881, 882], "start_point": {"row": 242, "column": 3}, "end_point": {"row": 242, "column": 19}}, {"id": 881, "type": "primitive_type", "text": "float", "parent": 880, "children": [], "start_point": {"row": 242, "column": 3}, "end_point": {"row": 242, "column": 8}}, {"id": 882, "type": "identifier", "text": "fWidth", "parent": 880, "children": [], "start_point": {"row": 242, "column": 12}, "end_point": {"row": 242, "column": 18}}, {"id": 883, "type": "declaration", "text": "bool\t\t\t\tfLayoutValid;", "parent": 575, "children": [884, 885], "start_point": {"row": 243, "column": 3}, "end_point": {"row": 243, "column": 24}}, {"id": 884, "type": "primitive_type", "text": "bool", "parent": 883, "children": [], "start_point": {"row": 243, "column": 3}, "end_point": {"row": 243, "column": 7}}, {"id": 885, "type": "identifier", "text": "fLayoutValid", "parent": 883, "children": [], "start_point": {"row": 243, "column": 11}, "end_point": {"row": 243, "column": 23}}, {"id": 886, "type": "declaration", "text": "std::vector<GlyphInfo>\n\t\t\t\t\t\t\t\tfGlyphInfos;", "parent": 575, "children": [887, 888, 893], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 246, "column": 20}}, {"id": 887, "type": "type_identifier", "text": "std", "parent": 886, "children": [], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 245, "column": 6}}, {"id": 888, "type": "ERROR", "text": "::vector<GlyphInfo>", "parent": 886, "children": [889, 890, 891, 892], "start_point": {"row": 245, "column": 6}, "end_point": {"row": 245, "column": 25}}, {"id": 889, "type": "identifier", "text": "vector", "parent": 888, "children": [], "start_point": {"row": 245, "column": 8}, "end_point": {"row": 245, "column": 14}}, {"id": 890, "type": "<", "text": "<", "parent": 888, "children": [], "start_point": {"row": 245, "column": 14}, "end_point": {"row": 245, "column": 15}}, {"id": 891, "type": "identifier", "text": "GlyphInfo", "parent": 888, "children": [], "start_point": {"row": 245, "column": 15}, "end_point": {"row": 245, "column": 24}}, {"id": 892, "type": ">", "text": ">", "parent": 888, "children": [], "start_point": {"row": 245, "column": 24}, "end_point": {"row": 245, "column": 25}}, {"id": 893, "type": "identifier", "text": "fGlyphInfos", "parent": 886, "children": [], "start_point": {"row": 246, "column": 8}, "end_point": {"row": 246, "column": 19}}, {"id": 894, "type": "declaration", "text": "std::vector<LineInfo>\n\t\t\t\t\t\t\t\tfLineInfos;", "parent": 575, "children": [895, 896, 901], "start_point": {"row": 247, "column": 3}, "end_point": {"row": 248, "column": 19}}, {"id": 895, "type": "type_identifier", "text": "std", "parent": 894, "children": [], "start_point": {"row": 247, "column": 3}, "end_point": {"row": 247, "column": 6}}, {"id": 896, "type": "ERROR", "text": "::vector<LineInfo>", "parent": 894, "children": [897, 898, 899, 900], "start_point": {"row": 247, "column": 6}, "end_point": {"row": 247, "column": 24}}, {"id": 897, "type": "identifier", "text": "vector", "parent": 896, "children": [], "start_point": {"row": 247, "column": 8}, "end_point": {"row": 247, "column": 14}}, {"id": 898, "type": "<", "text": "<", "parent": 896, "children": [], "start_point": {"row": 247, "column": 14}, "end_point": {"row": 247, "column": 15}}, {"id": 899, "type": "identifier", "text": "LineInfo", "parent": 896, "children": [], "start_point": {"row": 247, "column": 15}, "end_point": {"row": 247, "column": 23}}, {"id": 900, "type": ">", "text": ">", "parent": 896, "children": [], "start_point": {"row": 247, "column": 23}, "end_point": {"row": 247, "column": 24}}, {"id": 901, "type": "identifier", "text": "fLineInfos", "parent": 894, "children": [], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 18}}, {"id": 902, "type": "ERROR", "text": "};\n\n\ntypedef", "parent": 575, "children": [903], "start_point": {"row": 249, "column": 0}, "end_point": {"row": 252, "column": 7}}, {"id": 903, "type": "typedef", "text": "typedef", "parent": 902, "children": [], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 252, "column": 7}}, {"id": 904, "type": "declaration", "text": "BReference<ParagraphLayout> ParagraphLayoutRef;", "parent": 575, "children": [905, 906, 910], "start_point": {"row": 252, "column": 8}, "end_point": {"row": 252, "column": 55}}, {"id": 905, "type": "type_identifier", "text": "BReference", "parent": 904, "children": [], "start_point": {"row": 252, "column": 8}, "end_point": {"row": 252, "column": 18}}, {"id": 906, "type": "ERROR", "text": "<ParagraphLayout>", "parent": 904, "children": [907, 908, 909], "start_point": {"row": 252, "column": 18}, "end_point": {"row": 252, "column": 35}}, {"id": 907, "type": "<", "text": "<", "parent": 906, "children": [], "start_point": {"row": 252, "column": 18}, "end_point": {"row": 252, "column": 19}}, {"id": 908, "type": "identifier", "text": "ParagraphLayout", "parent": 906, "children": [], "start_point": {"row": 252, "column": 19}, "end_point": {"row": 252, "column": 34}}, {"id": 909, "type": ">", "text": ">", "parent": 906, "children": [], "start_point": {"row": 252, "column": 34}, "end_point": {"row": 252, "column": 35}}, {"id": 910, "type": "identifier", "text": "ParagraphLayoutRef", "parent": 904, "children": [], "start_point": {"row": 252, "column": 36}, "end_point": {"row": 252, "column": 54}}, {"id": 911, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 255, "column": 0}, "end_point": {"row": 255, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 70, 75, 80, 86, 91, 103, 109, 116, 228, 599, 604, 612, 619, 627, 634, 639, 651, 656, 661, 669, 677, 685, 705, 725, 740, 745, 750, 755, 760, 768, 782, 802, 813, 828, 846, 863], "variables": [27, 55, 73, 78, 83, 89, 94, 106, 112, 119, 216, 219, 222, 225, 545, 548, 551, 554, 557, 560, 563, 595, 602, 607, 617, 622, 632, 637, 642, 647, 654, 659, 664, 667, 672, 675, 680, 683, 688, 691, 694, 697, 700, 703, 708, 711, 714, 717, 720, 723, 728, 731, 734, 738, 743, 748, 753, 758, 763, 766, 771, 774, 777, 780, 785, 788, 791, 794, 797, 800, 805, 808, 816, 821, 824, 831, 836, 839, 842, 849, 852, 855, 858, 861, 866, 869, 877, 880, 883, 886, 894, 904], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [33, 36, 37, 41, 42, 46, 47, 51, 97, 126, 130, 135, 141, 147, 153, 157, 165, 168, 169, 170, 171, 174, 178, 181, 185, 188, 192, 195, 203, 206, 208, 209, 210, 232, 235, 236, 240, 241, 245, 246, 250, 251, 255, 256, 260, 261, 265, 266, 271, 274, 292, 293, 297, 298, 302, 303, 307, 308, 312, 313, 317, 318, 322, 323, 328, 331, 334, 337, 338, 341, 344, 345, 348, 351, 352, 355, 358, 359, 362, 365, 366, 369, 372, 373, 376, 379, 380, 383, 387, 390, 393, 399, 403, 408, 414, 420, 426, 432, 438, 444, 450, 454, 462, 465, 466, 467, 468, 469, 470, 471, 472, 475, 479, 482, 486, 489, 493, 496, 500, 503, 507, 510, 514, 517, 521, 524, 532, 535, 537, 538, 539, 568, 569, 580], "assignments": [132, 138, 144, 150, 395, 398, 411, 417, 423, 429, 435, 441, 447], "loops": [], "conditionals": [0, 1, 2, 5, 28, 30, 34, 38, 43, 48, 52, 56, 57, 59, 60, 61, 63, 64, 66, 68, 69, 71, 74, 76, 79, 81, 84, 87, 90, 92, 95, 96, 98, 101, 102, 104, 107, 108, 110, 113, 114, 117, 120, 121, 122, 124, 129, 131, 133, 136, 137, 139, 142, 143, 145, 148, 149, 151, 154, 155, 159, 162, 164, 166, 172, 175, 176, 179, 182, 183, 186, 189, 190, 193, 196, 197, 200, 202, 204, 212, 214, 217, 218, 221, 224, 226, 227, 229, 233, 237, 242, 247, 252, 257, 262, 267, 272, 275, 278, 279, 280, 282, 284, 285, 287, 288, 290, 291, 294, 296, 299, 301, 304, 306, 309, 311, 314, 316, 319, 324, 329, 332, 335, 336, 339, 342, 343, 346, 349, 350, 353, 356, 357, 360, 363, 364, 367, 370, 371, 374, 377, 378, 381, 384, 385, 388, 391, 392, 394, 396, 402, 404, 406, 409, 410, 412, 415, 416, 418, 421, 422, 424, 427, 428, 430, 433, 434, 436, 439, 440, 442, 445, 446, 448, 451, 452, 456, 459, 461, 463, 473, 476, 477, 480, 483, 484, 487, 490, 491, 494, 497, 498, 501, 504, 505, 508, 511, 512, 515, 518, 519, 522, 525, 526, 529, 531, 533, 541, 543, 546, 547, 550, 553, 556, 559, 562, 565, 567, 570, 572, 574, 576, 578, 581, 583, 584, 586, 588, 589, 590, 592, 594, 596, 600, 605, 608, 609, 611, 613, 616, 620, 624, 628, 631, 635, 640, 643, 646, 648, 649, 650, 652, 655, 657, 660, 662, 665, 666, 668, 670, 673, 674, 676, 678, 681, 682, 686, 689, 690, 693, 696, 699, 702, 706, 709, 710, 713, 716, 719, 722, 724, 726, 730, 733, 736, 741, 746, 751, 756, 761, 764, 765, 769, 772, 773, 776, 778, 779, 783, 787, 790, 793, 796, 799, 803, 806, 807, 809, 810, 814, 817, 820, 822, 823, 825, 826, 829, 832, 835, 837, 838, 840, 841, 843, 844, 847, 851, 854, 857, 860, 864, 867, 868, 871, 872, 874, 876, 878, 879, 882, 885, 887, 889, 891, 893, 895, 897, 899, 901, 905, 908, 910, 911], "returns": [156, 167, 205, 453, 464, 534, 615, 630], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 40, 45, 50, 54, 239, 244, 249, 254, 259, 264, 269, 321, 326], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "GlyphInfo", "text_snippet": "class GlyphInfo {\npublic:\n\tGlyphInfo()\n\t\t:\n\t\tcharCode(0),\n\t\tx(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)\n\t"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "charCode(charCode)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "x(x)"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "width(width)"}, {"node_id": 86, "universal_type": "function", "name": "unknown", "text_snippet": "lineIndex(lineIndex)"}, {"node_id": 91, "universal_type": "function", "name": "unknown", "text_snippet": "GlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode)"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "x(other.x)"}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "width(other.width)"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "lineIndex(other.lineIndex)"}, {"node_id": 228, "universal_type": "function", "name": "LineInfo", "text_snippet": "class LineInfo {\npublic:\n\tLineInfo()\n\t\t:\n\t\ttextOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0"}, {"node_id": 599, "universal_type": "function", "name": "unknown", "text_snippet": "ParagraphLayout()"}, {"node_id": 604, "universal_type": "function", "name": "unknown", "text_snippet": "SetParagraph(const Paragraph& paragraph)"}, {"node_id": 612, "universal_type": "function", "name": "unknown", "text_snippet": "Style()"}, {"node_id": 619, "universal_type": "function", "name": "unknown", "text_snippet": "SetWidth(float width)"}, {"node_id": 627, "universal_type": "function", "name": "unknown", "text_snippet": "Width()"}, {"node_id": 634, "universal_type": "function", "name": "unknown", "text_snippet": "Height()"}, {"node_id": 639, "universal_type": "function", "name": "unknown", "text_snippet": "Draw(BView* view, const BPoint& offset)"}, {"node_id": 651, "universal_type": "function", "name": "unknown", "text_snippet": "CountGlyphs()"}, {"node_id": 656, "universal_type": "function", "name": "unknown", "text_snippet": "CountLines()"}, {"node_id": 661, "universal_type": "function", "name": "unknown", "text_snippet": "LineIndexForOffset(int32 textOffset)"}, {"node_id": 669, "universal_type": "function", "name": "unknown", "text_snippet": "FirstOffsetOnLine(int32 lineIndex)"}, {"node_id": 677, "universal_type": "function", "name": "unknown", "text_snippet": "LastOffsetOnLine(int32 lineIndex)"}, {"node_id": 685, "universal_type": "function", "name": "unknown", "text_snippet": "GetLineBounds(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)"}, {"node_id": 705, "universal_type": "function", "name": "unknown", "text_snippet": "GetTextBounds(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2)"}, {"node_id": 725, "universal_type": "function", "name": "unknown", "text_snippet": "TextOffsetAt(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter)"}, {"node_id": 740, "universal_type": "function", "name": "unknown", "text_snippet": "_Init()"}, {"node_id": 745, "universal_type": "function", "name": "unknown", "text_snippet": "_ValidateLayout()"}, {"node_id": 750, "universal_type": "function", "name": "unknown", "text_snippet": "_Layout()"}, {"node_id": 755, "universal_type": "function", "name": "unknown", "text_snippet": "_ApplyAlignment()"}, {"node_id": 760, "universal_type": "function", "name": "unknown", "text_snippet": "_AppendGlyphInfos(const TextSpan& span)"}, {"node_id": 768, "universal_type": "function", "name": "unknown", "text_snippet": "_AppendGlyphInfo(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style)"}, {"node_id": 782, "universal_type": "function", "name": "lineEnd,", "text_snippet": "_FinalizeLine(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight)"}, {"node_id": 802, "universal_type": "function", "name": "unknown", "text_snippet": "_IncludeStyleInLine(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style)"}, {"node_id": 813, "universal_type": "function", "name": "unknown", "text_snippet": "_DrawLine(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line) const"}, {"node_id": 828, "universal_type": "function", "name": "unknown", "text_snippet": "_DrawSpan(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset) cons"}, {"node_id": 846, "universal_type": "function", "name": "unknown", "text_snippet": "_GetEmptyLayoutBounds(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2) const"}, {"node_id": 863, "universal_type": "function", "name": "unknown", "text_snippet": "_AppendTextSpans(const Paragraph& paragraph)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <vector>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <Font.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <Referenceable.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 \"CharacterStyle.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"List.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"Paragraph.h\"\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "/*\n * Copyright 2013, <NAME> <<EMAIL>>.\n * Copyright 2021, <NAME> <<EMAIL>>.\n * All rights reserved. Distributed under the terms of the MIT License.\n */\n#ifndef PARAGRAPH_LAYOUT_H\n#define PARAGRAPH_LAYOUT_H\n\n#include <vector>\n\n#include <Font.h>\n#include <Referenceable.h>\n#include <String.h>\n\n#include \"CharacterStyle.h\"\n#include \"List.h\"\n#include \"Paragraph.h\"\n\n\nclass BView;\n\n\nclass GlyphInfo {\npublic:\n\tGlyphInfo()\n\t\t:\n\t\tcharCode(0),\n\t\tx(0.0f),\n\t\twidth(0.0f),\n\t\tlineIndex(0)\n\t{\n\t}\n\n\tGlyphInfo(uint32 charCode, float x, float width, int32 lineIndex)\n\t\t:\n\t\tcharCode(charCode),\n\t\tx(x),\n\t\twidth(width),\n\t\tlineIndex(lineIndex)\n\t{\n\t}\n\n\tGlyphInfo(const GlyphInfo& other)\n\t\t:\n\t\tcharCode(other.charCode),\n\t\tx(other.x),\n\t\twidth(other.width),\n\t\tlineIndex(other.lineIndex)\n\t{\n\t}\n\n\tGlyphInfo& operator=(const GlyphInfo& other)\n\t{\n\t\tcharCode = other.charCode;\n\t\tx = other.x;\n\t\twidth = other.width;\n\t\tlineIndex = other.lineIndex;\n\t\treturn *this;\n\t}\n\n\tbool operator==(const GlyphInfo& other) const\n\t{\n\t\treturn charCode == other.charCode\n\t\t\t&& x == other.x\n\t\t\t&& width == other.width\n\t\t\t&& lineIndex == other.lineIndex;\n\t}\n\n\tbool operator!=(const GlyphInfo& other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\npublic:\n\tuint32\t\t\t\t\tcharCode;\n\n\tfloat\t\t\t\t\tx;\n\tfloat\t\t\t\t\twidth;\n\n\tint32\t\t\t\t\tlineIndex;\n};\n\n\nclass LineInfo {\npublic:\n\tLineInfo()\n\t\t:\n\t\ttextOffset(0),\n\t\ty(0.0f),\n\t\theight(0.0f),\n\t\tmaxAscent(0.0f),\n\t\tmaxDescent(0.0f),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(int32 textOffset, float y, float height, float maxAscent,\n\t\tfloat maxDescent)\n\t\t:\n\t\ttextOffset(textOffset),\n\t\ty(y),\n\t\theight(height),\n\t\tmaxAscent(maxAscent),\n\t\tmaxDescent(maxDescent),\n\t\textraGlyphSpacing(0.0f),\n\t\textraWhiteSpacing(0.0f),\n\t\tlayoutedSpans()\n\t{\n\t}\n\n\tLineInfo(const LineInfo& other)\n\t\t:\n\t\ttextOffset(other.textOffset),\n\t\ty(other.y),\n\t\theight(other.height),\n\t\tmaxAscent(other.maxAscent),\n\t\tmaxDescent(other.maxDescent),\n\t\textraGlyphSpacing(other.extraGlyphSpacing),\n\t\textraWhiteSpacing(other.extraWhiteSpacing),\n\t\tlayoutedSpans(other.layoutedSpans)\n\t{\n\t}\n\n\tLineInfo& operator=(const LineInfo& other)\n\t{\n\t\ttextOffset = other.textOffset;\n\t\ty = other.y;\n\t\theight = other.height;\n\t\tmaxAscent = other.maxAscent;\n\t\tmaxDescent = other.maxDescent;\n\t\textraGlyphSpacing = other.extraGlyphSpacing;\n\t\textraWhiteSpacing = other.extraWhiteSpacing;\n\t\tlayoutedSpans = other.layoutedSpans;\n\t\treturn *this;\n\t}\n\n\tbool operator==(const LineInfo& other) const\n\t{\n\t\treturn textOffset == other.textOffset\n\t\t\t&& y == other.y\n\t\t\t&& height == other.height\n\t\t\t&& maxAscent == other.maxAscent\n\t\t\t&& maxDescent == other.maxDescent\n\t\t\t&& extraGlyphSpacing == other.extraGlyphSpacing\n\t\t\t&& extraWhiteSpacing == other.extraWhiteSpacing\n\t\t\t&& layoutedSpans == other.layoutedSpans;\n\t}\n\n\tbool operator!=(const LineInfo& other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\npublic:\n\tint32\t\t\ttextOffset;\n\n\tfloat\t\t\ty;\n\tfloat\t\t\theight;\n\n\tfloat\t\t\tmaxAscent;\n\tfloat\t\t\tmaxDescent;\n\n\tfloat\t\t\textraGlyphSpacing;\n\tfloat\t\t\textraWhiteSpacing;\n\n\tstd::vector<TextSpan>\n\t\t\t\t\tlayoutedSpans;\n};\n\n\nclass ParagraphLayout : public BReferenceable {\npublic:\n\t\t\t\t\t\t\t\tParagraphLayout();\n\t\t\t\t\t\t\t\tParagraphLayout(const Paragraph& paragraph);\n\t\t\t\t\t\t\t\tParagraphLayout(const ParagraphLayout& other);\n\tvirtual\t\t\t\t\t\t~ParagraphLayout();\n\n\t\t\tvoid\t\t\t\tSetParagraph(const Paragraph& paragraph);\n\t\t\tconst ParagraphStyle& Style() const\n\t\t\t\t\t\t\t\t\t{ return fParagraphStyle; }\n\n\t\t\tvoid\t\t\t\tSetWidth(float width);\n\t\t\tfloat\t\t\t\tWidth() const\n\t\t\t\t\t\t\t\t\t{ return fWidth; }\n\n\t\t\tfloat\t\t\t\tHeight();\n\t\t\tvoid\t\t\t\tDraw(BView* view, const BPoint& offset);\n\n\t\t\tint32\t\t\t\tCountGlyphs() const;\n\t\t\tint32\t\t\t\tCountLines();\n\n\t\t\tint32\t\t\t\tLineIndexForOffset(int32 textOffset);\n\t\t\tint32\t\t\t\tFirstOffsetOnLine(int32 lineIndex);\n\t\t\tint32\t\t\t\tLastOffsetOnLine(int32 lineIndex);\n\n\t\t\tvoid\t\t\t\tGetLineBounds(int32 lineIndex,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);\n\n\t\t\tvoid\t\t\t\tGetTextBounds(int32 textOffset,\n\t\t\t\t\t\t\t\t\tfloat& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2);\n\n\t\t\tint32\t\t\t\tTextOffsetAt(float x, float y,\n\t\t\t\t\t\t\t\t\tbool& rightOfCenter);\n\nprivate:\n\t\t\tvoid\t\t\t\t_Init();\n\n\t\t\tvoid\t\t\t\t_ValidateLayout();\n\t\t\tvoid\t\t\t\t_Layout();\n\t\t\tvoid\t\t\t\t_ApplyAlignment();\n\n\t\t\tbool\t\t\t\t_AppendGlyphInfos(const TextSpan& span);\n\t\t\tbool\t\t\t\t_AppendGlyphInfo(uint32 charCode,\n\t\t\t\t\t\t\t\t\tfloat advanceX,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);\n\n\t\t\tbool\t\t\t\t_FinalizeLine(int lineStart, int lineEnd,\n\t\t\t\t\t\t\t\t\tint lineIndex, float y, float& lineHeight);\n\n\t\t\tvoid\t\t\t\t_IncludeStyleInLine(LineInfo& line,\n\t\t\t\t\t\t\t\t\tconst CharacterStyle& style);\n\n\t\t\tvoid\t\t\t\t_DrawLine(BView* view, const BPoint& offset,\n\t\t\t\t\t\t\t\t\tconst LineInfo& line) const;\n\t\t\tvoid\t\t\t\t_DrawSpan(BView* view, BPoint offset,\n\t\t\t\t\t\t\t\t\tconst TextSpan& span,\n\t\t\t\t\t\t\t\t\tint32 textOffset) const;\n\n\t\t\tvoid\t\t\t\t_GetEmptyLayoutBounds(float& x1, float& y1,\n\t\t\t\t\t\t\t\t\tfloat& x2, float& y2) const;\n\n\t\t\tvoid\t\t\t\t_AppendTextSpans(const Paragraph& paragraph);\n\nprivate:\n\t\t\tstd::vector<TextSpan>\n\t\t\t\t\t\t\t\tfTextSpans;\n\t\t\tParagraphStyle\t\tfParagraphStyle;\n\n\t\t\tfloat\t\t\t\tfWidth;\n\t\t\tbool\t\t\t\tfLayoutValid;\n\n\t\t\tstd::vector<GlyphInfo>\n\t\t\t\t\t\t\t\tfGlyphInfos;\n\t\t\tstd::vector<LineInfo>\n\t\t\t\t\t\t\t\tfLineInfos;\n};\n\n\ntypedef BReference<ParagraphLayout> ParagraphLayoutRef;\n\n\n#endif // PARAGRAPH_LAYOUT_H\n"}
247
c
// // BugButton.h // Thirstie // // Created by <NAME> on 11/23/13. // Copyright (c) 2013 Digital-Liquor-Delivery. All rights reserved. // #import <UIKit/UIKit.h> @class BugButton; @protocol BugButtonDelegate - (void)reportBug:(BugButton *)sender; @end @interface BugButton : UIButton @property (nonatomic, weak) id<BugButtonDelegate> delegate; //These are used to set the bounds where the bug button can be dragged @property (nonatomic) CGFloat minX, maxX, minY, maxY; + (instancetype)bugButton; - (NSData *)getScreenshot; - (NSString *)bugReportString; @end
27.15
20
(translation_unit) "//\n// BugButton.h\n// Thirstie\n//\n// Created by <NAME> on 11/23/13.\n// Copyright (c) 2013 Digital-Liquor-Delivery. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@class BugButton;\n\n@protocol BugButtonDelegate\n- (void)reportBug:(BugButton *)sender;\n@end\n\n@interface BugButton : UIButton\n\n@property (nonatomic, weak) id<BugButtonDelegate> delegate;\n//These are used to set the bounds where the bug button can be dragged\n@property (nonatomic) CGFloat minX, maxX, minY, maxY;\n\n+ (instancetype)bugButton;\n- (NSData *)getScreenshot;\n- (NSString *)bugReportString;\n\n@end\n" (comment) "//" (comment) "// BugButton.h" (comment) "// Thirstie" (comment) "//" (comment) "// Created by <NAME> on 11/23/13." (comment) "// Copyright (c) 2013 Digital-Liquor-Delivery. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@" (ERROR) "@" (declaration) "class BugButton;" (type_identifier) "class" (identifier) "BugButton" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "protocol BugButtonDelegate\n- (void)reportBug:(BugButton *)sender;\n@end\n\n@interface BugButton : UIButton\n\n@property (nonatomic, weak) id<BugButtonDelegate> delegate;\n//These are used to set the bounds where the bug button can be dragged\n@property (nonatomic) CGFloat minX, maxX, minY, maxY;\n\n+ (instancetype)bugButton;" (type_identifier) "protocol" (ERROR) "BugButtonDelegate\n- (void)reportBug:(BugButton *)sender;\n@end\n\n@interface BugButton : UIButton\n\n@property (nonatomic, weak) id<BugButtonDelegate> delegate;\n//These are used to set the bounds where the bug button can be dragged\n@property (nonatomic) CGFloat minX, maxX, minY, maxY;\n\n+ (instancetype)" (function_declarator) "BugButtonDelegate\n- (void)reportBug:(BugButton *)sender" (identifier) "BugButtonDelegate" (ERROR) "-" (-) "-" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "reportBug" (ERROR) ":(" (:) ":" (() "(" (identifier) "BugButton" (ERROR) "*)" (*) "*" ()) ")" (identifier) "sender" (;) ";" (ERROR) "@" (identifier) "end" (ERROR) "@" (identifier) "interface" (identifier) "BugButton" (:) ":" (identifier) "UIButton" (ERROR) "@" (function_declarator) "property (nonatomic, weak)" (identifier) "property" (parameter_list) "(nonatomic, weak)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "weak" ()) ")" (declaration) "id<BugButtonDelegate> delegate;" (type_identifier) "id" (ERROR) "<BugButtonDelegate>" (<) "<" (identifier) "BugButtonDelegate" (>) ">" (identifier) "delegate" (;) ";" (comment) "//These are used to set the bounds where the bug button can be dragged" (ERROR) "@" (ERROR) "@" (declaration) "property (nonatomic) CGFloat minX, maxX, minY, maxY;" (macro_type_specifier) "property (nonatomic)" (identifier) "property" (() "(" (type_descriptor) "nonatomic" (type_identifier) "nonatomic" ()) ")" (identifier) "CGFloat" (ERROR) "minX" (identifier) "minX" (,) "," (identifier) "maxX" (,) "," (identifier) "minY" (,) "," (identifier) "maxY" (;) ";" (+) "+" (parenthesized_declarator) "(instancetype)" (() "(" (identifier) "instancetype" ()) ")" (identifier) "bugButton" (;) ";" (expression_statement) "- (NSData *)getScreenshot;" (unary_expression) "- (NSData *)getScreenshot" (-) "-" (cast_expression) "(NSData *)getScreenshot" (() "(" (type_descriptor) "NSData *" (type_identifier) "NSData" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "getScreenshot" (;) ";" (expression_statement) "- (NSString *)bugReportString;" (unary_expression) "- (NSString *)bugReportString" (-) "-" (cast_expression) "(NSString *)bugReportString" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "bugReportString" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
121
17
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 27.15, "nodes": 78, "errors": 0, "source_hash": "dbf6e8aa02733b3530747afd209d7e0d35161561a6b5dc5ba353155774f33c03", "categorized_nodes": 41}, "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": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "declaration", "text": "class BugButton;", "parent": null, "children": [6], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 17}}, {"id": 6, "type": "identifier", "text": "BugButton", "parent": 5, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 16}}, {"id": 7, "type": "ERROR", "text": "@", "parent": null, "children": [8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 7, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 9, "type": "declaration", "text": "protocol BugButtonDelegate\n- (void)reportBug:(BugButton *)sender;\n@end\n\n@interface BugButton : UIButton\n\n@property (nonatomic, weak) id<BugButtonDelegate> delegate;\n//These are used to set the bounds where the bug button can be dragged\n@property (nonatomic) CGFloat minX, maxX, minY, maxY;\n\n+ (instancetype)bugButton;", "parent": null, "children": [10, 11, 59], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 22, "column": 26}}, {"id": 10, "type": "type_identifier", "text": "protocol", "parent": 9, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 11, "type": "ERROR", "text": "BugButtonDelegate\n- (void)reportBug:(BugButton *)sender;\n@end\n\n@interface BugButton : UIButton\n\n@property (nonatomic, weak) id<BugButtonDelegate> delegate;\n//These are used to set the bounds where the bug button can be dragged\n@property (nonatomic) CGFloat minX, maxX, minY, maxY;\n\n+ (instancetype)", "parent": 9, "children": [12, 25, 26, 27, 28, 29, 30, 31, 36, 43, 45, 56, 57], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 22, "column": 16}}, {"id": 12, "type": "function_declarator", "text": "BugButtonDelegate\n- (void)reportBug:(BugButton *)sender", "parent": 11, "children": [13, 14, 16, 19, 20, 21, 22, 24], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 13, "column": 37}}, {"id": 13, "type": "identifier", "text": "BugButtonDelegate", "parent": 12, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 27}}, {"id": 14, "type": "ERROR", "text": "-", "parent": 12, "children": [15], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 15, "type": "-", "text": "-", "parent": 14, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 16, "type": "parameter_list", "text": "(void)", "parent": 12, "children": [17], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 8}}, {"id": 17, "type": "parameter_declaration", "text": "void", "parent": 16, "children": [18], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 19, "type": "identifier", "text": "reportBug", "parent": 12, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 20, "type": "ERROR", "text": ":(", "parent": 12, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 19}}, {"id": 21, "type": "identifier", "text": "BugButton", "parent": 12, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 28}}, {"id": 22, "type": "ERROR", "text": "*)", "parent": 12, "children": [23], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 31}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 30}}, {"id": 24, "type": "identifier", "text": "sender", "parent": 12, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 37}}, {"id": 25, "type": "ERROR", "text": "@", "parent": 11, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 26, "type": "ERROR", "text": "@", "parent": 11, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 27, "type": "identifier", "text": "interface", "parent": 11, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 10}}, {"id": 28, "type": "identifier", "text": "BugButton", "parent": 11, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 29, "type": "identifier", "text": "UIButton", "parent": 11, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 31}}, {"id": 30, "type": "ERROR", "text": "@", "parent": 11, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 31, "type": "function_declarator", "text": "property (nonatomic, weak)", "parent": 11, "children": [32, 33], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 27}}, {"id": 32, "type": "identifier", "text": "property", "parent": 31, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 33, "type": "parameter_list", "text": "(nonatomic, weak)", "parent": 31, "children": [34, 35], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 27}}, {"id": 34, "type": "identifier", "text": "nonatomic", "parent": 33, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 20}}, {"id": 35, "type": "identifier", "text": "weak", "parent": 33, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 26}}, {"id": 36, "type": "declaration", "text": "id<BugButtonDelegate> delegate;", "parent": 11, "children": [37, 38, 42], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 59}}, {"id": 37, "type": "type_identifier", "text": "id", "parent": 36, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 30}}, {"id": 38, "type": "ERROR", "text": "<BugButtonDelegate>", "parent": 36, "children": [39, 40, 41], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 49}}, {"id": 39, "type": "<", "text": "<", "parent": 38, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 31}}, {"id": 40, "type": "identifier", "text": "BugButtonDelegate", "parent": 38, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 48}}, {"id": 41, "type": ">", "text": ">", "parent": 38, "children": [], "start_point": {"row": 18, "column": 48}, "end_point": {"row": 18, "column": 49}}, {"id": 42, "type": "identifier", "text": "delegate", "parent": 36, "children": [], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 58}}, {"id": 43, "type": "ERROR", "text": "@", "parent": 11, "children": [44], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 44, "type": "ERROR", "text": "@", "parent": 43, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 45, "type": "declaration", "text": "property (nonatomic) CGFloat minX, maxX, minY, maxY;", "parent": 11, "children": [46, 50, 51, 53, 54, 55], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 53}}, {"id": 46, "type": "macro_type_specifier", "text": "property (nonatomic)", "parent": 45, "children": [47, 48], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 21}}, {"id": 47, "type": "identifier", "text": "property", "parent": 46, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 48, "type": "type_descriptor", "text": "nonatomic", "parent": 46, "children": [49], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 20}}, {"id": 49, "type": "type_identifier", "text": "nonatomic", "parent": 48, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 20}}, {"id": 50, "type": "identifier", "text": "CGFloat", "parent": 45, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 29}}, {"id": 51, "type": "ERROR", "text": "minX", "parent": 45, "children": [52], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 34}}, {"id": 52, "type": "identifier", "text": "minX", "parent": 51, "children": [], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 34}}, {"id": 53, "type": "identifier", "text": "maxX", "parent": 45, "children": [], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 40}}, {"id": 54, "type": "identifier", "text": "minY", "parent": 45, "children": [], "start_point": {"row": 20, "column": 42}, "end_point": {"row": 20, "column": 46}}, {"id": 55, "type": "identifier", "text": "maxY", "parent": 45, "children": [], "start_point": {"row": 20, "column": 48}, "end_point": {"row": 20, "column": 52}}, {"id": 56, "type": "+", "text": "+", "parent": 11, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 57, "type": "parenthesized_declarator", "text": "(instancetype)", "parent": 11, "children": [58], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 16}}, {"id": 58, "type": "identifier", "text": "instancetype", "parent": 57, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 15}}, {"id": 59, "type": "identifier", "text": "bugButton", "parent": 9, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 25}}, {"id": 60, "type": "unary_expression", "text": "- (NSData *)getScreenshot", "parent": null, "children": [61, 62], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 25}}, {"id": 61, "type": "-", "text": "-", "parent": 60, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 62, "type": "cast_expression", "text": "(NSData *)getScreenshot", "parent": 60, "children": [63, 67], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 25}}, {"id": 63, "type": "type_descriptor", "text": "NSData *", "parent": 62, "children": [64, 65], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 11}}, {"id": 64, "type": "type_identifier", "text": "NSData", "parent": 63, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 9}}, {"id": 65, "type": "abstract_pointer_declarator", "text": "*", "parent": 63, "children": [66], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 67, "type": "identifier", "text": "getScreenshot", "parent": 62, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 25}}, {"id": 68, "type": "unary_expression", "text": "- (NSString *)bugReportString", "parent": null, "children": [69, 70], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 29}}, {"id": 69, "type": "-", "text": "-", "parent": 68, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 70, "type": "cast_expression", "text": "(NSString *)bugReportString", "parent": 68, "children": [71, 75], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 29}}, {"id": 71, "type": "type_descriptor", "text": "NSString *", "parent": 70, "children": [72, 73], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 13}}, {"id": 72, "type": "type_identifier", "text": "NSString", "parent": 71, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 11}}, {"id": 73, "type": "abstract_pointer_declarator", "text": "*", "parent": 71, "children": [74], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 13}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 13}}, {"id": 75, "type": "identifier", "text": "bugReportString", "parent": 70, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 29}}, {"id": 76, "type": "ERROR", "text": "@", "parent": null, "children": [77], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 77, "type": "ERROR", "text": "@", "parent": 76, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}]}, "node_categories": {"declarations": {"functions": [12, 31], "variables": [5, 9, 17, 36, 45], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [60, 62, 68, 70], "assignments": [], "loops": [], "conditionals": [6, 10, 13, 19, 21, 24, 27, 28, 29, 32, 34, 35, 37, 40, 42, 46, 47, 49, 50, 52, 53, 54, 55, 58, 59, 64, 67, 72, 75], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "BugButtonDelegate\n- (void)reportBug:(BugButton *)sender"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "property (nonatomic, weak)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// BugButton.h\n// Thirstie\n//\n// Created by <NAME> on 11/23/13.\n// Copyright (c) 2013 Digital-Liquor-Delivery. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@class BugButton;\n\n@protocol BugButtonDelegate\n- (void)reportBug:(BugButton *)sender;\n@end\n\n@interface BugButton : UIButton\n\n@property (nonatomic, weak) id<BugButtonDelegate> delegate;\n//These are used to set the bounds where the bug button can be dragged\n@property (nonatomic) CGFloat minX, maxX, minY, maxY;\n\n+ (instancetype)bugButton;\n- (NSData *)getScreenshot;\n- (NSString *)bugReportString;\n\n@end\n"}
248
c
#ifndef __PANEL_EDIT_H__ #define __PANEL_EDIT_H__ #include "Panel.h" #ifndef GAMEMODE class PanelEdit : public Panel { public: PanelEdit(char* name); ~PanelEdit(); bool Draw(); }; #endif #endif
14.15
13
(translation_unit) "#ifndef __PANEL_EDIT_H__\n#define __PANEL_EDIT_H__\n\n#include "Panel.h"\n\n#ifndef GAMEMODE\n\nclass PanelEdit : public Panel\n{\npublic:\n\n PanelEdit(char* name);\n ~PanelEdit();\n\n bool Draw();\n};\n\n#endif\n\n#endif\n" (preproc_ifdef) "#ifndef __PANEL_EDIT_H__\n#define __PANEL_EDIT_H__\n\n#include "Panel.h"\n\n#ifndef GAMEMODE\n\nclass PanelEdit : public Panel\n{\npublic:\n\n PanelEdit(char* name);\n ~PanelEdit();\n\n bool Draw();\n};\n\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "__PANEL_EDIT_H__" (preproc_def) "#define __PANEL_EDIT_H__\n" (#define) "#define" (identifier) "__PANEL_EDIT_H__" (preproc_include) "#include "Panel.h"\n" (#include) "#include" (string_literal) ""Panel.h"" (") """ (string_content) "Panel.h" (") """ (preproc_ifdef) "#ifndef GAMEMODE\n\nclass PanelEdit : public Panel\n{\npublic:\n\n PanelEdit(char* name);\n ~PanelEdit();\n\n bool Draw();\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "GAMEMODE" (function_definition) "class PanelEdit : public Panel\n{\npublic:\n\n PanelEdit(char* name);\n ~PanelEdit();\n\n bool Draw();\n}" (type_identifier) "class" (identifier) "PanelEdit" (ERROR) ": public Panel" (:) ":" (identifier) "public" (identifier) "Panel" (compound_statement) "{\npublic:\n\n PanelEdit(char* name);\n ~PanelEdit();\n\n bool Draw();\n}" ({) "{" (labeled_statement) "public:\n\n PanelEdit(char* name);" (statement_identifier) "public" (:) ":" (expression_statement) "PanelEdit(char* name);" (call_expression) "PanelEdit(char* name)" (identifier) "PanelEdit" (argument_list) "(char* name)" (() "(" (binary_expression) "char* name" (identifier) "char" (*) "*" (identifier) "name" ()) ")" (;) ";" (expression_statement) "~PanelEdit();" (unary_expression) "~PanelEdit()" (~) "~" (call_expression) "PanelEdit()" (identifier) "PanelEdit" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool Draw();" (primitive_type) "bool" (function_declarator) "Draw()" (identifier) "Draw" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (#endif) "#endif"
61
1
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 14.15, "nodes": 36, "errors": 0, "source_hash": "da4eabb23fef4a55c3d3695efffc3186df8327f620071d21bf7b69d3b23ed758", "categorized_nodes": 26}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __PANEL_EDIT_H__\n#define __PANEL_EDIT_H__\n\n#include \"Panel.h\"\n\n#ifndef GAMEMODE\n\nclass PanelEdit : public Panel\n{\npublic:\n\n\tPanelEdit(char* name);\n\t~PanelEdit();\n\n\tbool Draw();\n};\n\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 35], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 19, "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": "__PANEL_EDIT_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define __PANEL_EDIT_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": "__PANEL_EDIT_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include \"Panel.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": "\"Panel.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_ifdef", "text": "#ifndef GAMEMODE\n\nclass PanelEdit : public Panel\n{\npublic:\n\n\tPanelEdit(char* name);\n\t~PanelEdit();\n\n\tbool Draw();\n};\n\n#endif", "parent": 0, "children": [10, 11, 12, 34], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 10, "type": "#ifndef", "text": "#ifndef", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "identifier", "text": "GAMEMODE", "parent": 9, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 16}}, {"id": 12, "type": "function_definition", "text": "class PanelEdit : public Panel\n{\npublic:\n\n\tPanelEdit(char* name);\n\t~PanelEdit();\n\n\tbool Draw();\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 13, "type": "identifier", "text": "PanelEdit", "parent": 12, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 15}}, {"id": 14, "type": "ERROR", "text": ": public Panel", "parent": 12, "children": [15], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 30}}, {"id": 15, "type": "identifier", "text": "Panel", "parent": 14, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 30}}, {"id": 16, "type": "labeled_statement", "text": "public:\n\n\tPanelEdit(char* name);", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 11, "column": 23}}, {"id": 17, "type": "call_expression", "text": "PanelEdit(char* name)", "parent": 16, "children": [18, 19], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 22}}, {"id": 18, "type": "identifier", "text": "PanelEdit", "parent": 17, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 19, "type": "argument_list", "text": "(char* name)", "parent": 17, "children": [20], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 22}}, {"id": 20, "type": "binary_expression", "text": "char* name", "parent": 19, "children": [21, 22, 23], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 21}}, {"id": 21, "type": "identifier", "text": "char", "parent": 20, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 15}}, {"id": 22, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 16}}, {"id": 23, "type": "identifier", "text": "name", "parent": 20, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 21}}, {"id": 24, "type": "unary_expression", "text": "~PanelEdit()", "parent": 12, "children": [25, 26], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 13}}, {"id": 25, "type": "~", "text": "~", "parent": 24, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 2}}, {"id": 26, "type": "call_expression", "text": "PanelEdit()", "parent": 24, "children": [27, 28], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 13}}, {"id": 27, "type": "identifier", "text": "PanelEdit", "parent": 26, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 11}}, {"id": 28, "type": "argument_list", "text": "()", "parent": 26, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 13}}, {"id": 29, "type": "declaration", "text": "bool Draw();", "parent": 12, "children": [30, 31], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 13}}, {"id": 30, "type": "primitive_type", "text": "bool", "parent": 29, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 31, "type": "function_declarator", "text": "Draw()", "parent": 29, "children": [32, 33], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 12}}, {"id": 32, "type": "identifier", "text": "Draw", "parent": 31, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 10}}, {"id": 33, "type": "parameter_list", "text": "()", "parent": 31, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 12}}, {"id": 34, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 35, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 31], "variables": [29], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [17, 20, 24, 26], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 10, 11, 13, 15, 18, 21, 23, 27, 32, 34, 35], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "PanelEdit", "text_snippet": "class PanelEdit : public Panel\n{\npublic:\n\n\tPanelEdit(char* name);\n\t~PanelEdit();\n\n\tbool Draw();\n}"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "Draw()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"Panel.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __PANEL_EDIT_H__\n#define __PANEL_EDIT_H__\n\n#include \"Panel.h\"\n\n#ifndef GAMEMODE\n\nclass PanelEdit : public Panel\n{\npublic:\n\n\tPanelEdit(char* name);\n\t~PanelEdit();\n\n\tbool Draw();\n};\n\n#endif\n\n#endif\n"}
249
c
#ifndef __ESK8_MODEL_H__ #define __ESK8_MODEL_H__ #ifdef __cplusplus extern "C" { #endif #include "Arduino.h" #include "local_datatypes.h" #ifdef __cplusplus } #endif void convertToBytes(char *source, byte *destination, uint8_t length); void convertToCharArr(byte *source, char *destination, uint8_t length); void setSpeedValue(Message *msg, uint8_t value); uint8_t getSpeedValue(Message *msg); float getFloatValue(int *sourceIndex, byte* source); void injectToPayload(int *currentIndex, byte* payload, FloatPayload *item); int convertToRequiredReadings(Message *source, RequiredReadings *target); void convertToMessage(Message *target, RequiredReadings *source); #endif
32.8
20
(translation_unit) "#ifndef __ESK8_MODEL_H__\n#define __ESK8_MODEL_H__\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n#include "Arduino.h"\n#include "local_datatypes.h"\n\n#ifdef __cplusplus\n }\n#endif\n\n\nvoid convertToBytes(char *source, byte *destination, uint8_t length);\nvoid convertToCharArr(byte *source, char *destination, uint8_t length);\n\nvoid setSpeedValue(Message *msg, uint8_t value);\nuint8_t getSpeedValue(Message *msg);\n\nfloat getFloatValue(int *sourceIndex, byte* source);\nvoid injectToPayload(int *currentIndex, byte* payload, FloatPayload *item);\n\nint convertToRequiredReadings(Message *source, RequiredReadings *target); \nvoid convertToMessage(Message *target, RequiredReadings *source); \n#endif\n" (preproc_ifdef) "#ifndef __ESK8_MODEL_H__\n#define __ESK8_MODEL_H__\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n#include "Arduino.h"\n#include "local_datatypes.h"\n\n#ifdef __cplusplus\n }\n#endif\n\n\nvoid convertToBytes(char *source, byte *destination, uint8_t length);\nvoid convertToCharArr(byte *source, char *destination, uint8_t length);\n\nvoid setSpeedValue(Message *msg, uint8_t value);\nuint8_t getSpeedValue(Message *msg);\n\nfloat getFloatValue(int *sourceIndex, byte* source);\nvoid injectToPayload(int *currentIndex, byte* payload, FloatPayload *item);\n\nint convertToRequiredReadings(Message *source, RequiredReadings *target); \nvoid convertToMessage(Message *target, RequiredReadings *source); \n#endif" (#ifndef) "#ifndef" (identifier) "__ESK8_MODEL_H__" (preproc_def) "#define __ESK8_MODEL_H__\n" (#define) "#define" (identifier) "__ESK8_MODEL_H__" (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\n#include "Arduino.h"\n#include "local_datatypes.h"\n\n#ifdef __cplusplus\n }\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n\n#include "Arduino.h"\n#include "local_datatypes.h"\n\n#ifdef __cplusplus\n }" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\n#include "Arduino.h"\n#include "local_datatypes.h"\n\n#ifdef __cplusplus\n }" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (preproc_include) "#include "Arduino.h"\n" (#include) "#include" (string_literal) ""Arduino.h"" (") """ (string_content) "Arduino.h" (") """ (preproc_include) "#include "local_datatypes.h"\n" (#include) "#include" (string_literal) ""local_datatypes.h"" (") """ (string_content) "local_datatypes.h" (") """ (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif" (declaration) "void convertToBytes(char *source, byte *destination, uint8_t length);" (primitive_type) "void" (function_declarator) "convertToBytes(char *source, byte *destination, uint8_t length)" (identifier) "convertToBytes" (parameter_list) "(char *source, byte *destination, uint8_t length)" (() "(" (parameter_declaration) "char *source" (primitive_type) "char" (pointer_declarator) "*source" (*) "*" (identifier) "source" (,) "," (parameter_declaration) "byte *destination" (type_identifier) "byte" (pointer_declarator) "*destination" (*) "*" (identifier) "destination" (,) "," (parameter_declaration) "uint8_t length" (primitive_type) "uint8_t" (identifier) "length" ()) ")" (;) ";" (declaration) "void convertToCharArr(byte *source, char *destination, uint8_t length);" (primitive_type) "void" (function_declarator) "convertToCharArr(byte *source, char *destination, uint8_t length)" (identifier) "convertToCharArr" (parameter_list) "(byte *source, char *destination, uint8_t length)" (() "(" (parameter_declaration) "byte *source" (type_identifier) "byte" (pointer_declarator) "*source" (*) "*" (identifier) "source" (,) "," (parameter_declaration) "char *destination" (primitive_type) "char" (pointer_declarator) "*destination" (*) "*" (identifier) "destination" (,) "," (parameter_declaration) "uint8_t length" (primitive_type) "uint8_t" (identifier) "length" ()) ")" (;) ";" (declaration) "void setSpeedValue(Message *msg, uint8_t value);" (primitive_type) "void" (function_declarator) "setSpeedValue(Message *msg, uint8_t value)" (identifier) "setSpeedValue" (parameter_list) "(Message *msg, uint8_t value)" (() "(" (parameter_declaration) "Message *msg" (type_identifier) "Message" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" (,) "," (parameter_declaration) "uint8_t value" (primitive_type) "uint8_t" (identifier) "value" ()) ")" (;) ";" (declaration) "uint8_t getSpeedValue(Message *msg);" (primitive_type) "uint8_t" (function_declarator) "getSpeedValue(Message *msg)" (identifier) "getSpeedValue" (parameter_list) "(Message *msg)" (() "(" (parameter_declaration) "Message *msg" (type_identifier) "Message" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" ()) ")" (;) ";" (declaration) "float getFloatValue(int *sourceIndex, byte* source);" (primitive_type) "float" (function_declarator) "getFloatValue(int *sourceIndex, byte* source)" (identifier) "getFloatValue" (parameter_list) "(int *sourceIndex, byte* source)" (() "(" (parameter_declaration) "int *sourceIndex" (primitive_type) "int" (pointer_declarator) "*sourceIndex" (*) "*" (identifier) "sourceIndex" (,) "," (parameter_declaration) "byte* source" (type_identifier) "byte" (pointer_declarator) "* source" (*) "*" (identifier) "source" ()) ")" (;) ";" (declaration) "void injectToPayload(int *currentIndex, byte* payload, FloatPayload *item);" (primitive_type) "void" (function_declarator) "injectToPayload(int *currentIndex, byte* payload, FloatPayload *item)" (identifier) "injectToPayload" (parameter_list) "(int *currentIndex, byte* payload, FloatPayload *item)" (() "(" (parameter_declaration) "int *currentIndex" (primitive_type) "int" (pointer_declarator) "*currentIndex" (*) "*" (identifier) "currentIndex" (,) "," (parameter_declaration) "byte* payload" (type_identifier) "byte" (pointer_declarator) "* payload" (*) "*" (identifier) "payload" (,) "," (parameter_declaration) "FloatPayload *item" (type_identifier) "FloatPayload" (pointer_declarator) "*item" (*) "*" (identifier) "item" ()) ")" (;) ";" (declaration) "int convertToRequiredReadings(Message *source, RequiredReadings *target);" (primitive_type) "int" (function_declarator) "convertToRequiredReadings(Message *source, RequiredReadings *target)" (identifier) "convertToRequiredReadings" (parameter_list) "(Message *source, RequiredReadings *target)" (() "(" (parameter_declaration) "Message *source" (type_identifier) "Message" (pointer_declarator) "*source" (*) "*" (identifier) "source" (,) "," (parameter_declaration) "RequiredReadings *target" (type_identifier) "RequiredReadings" (pointer_declarator) "*target" (*) "*" (identifier) "target" ()) ")" (;) ";" (declaration) "void convertToMessage(Message *target, RequiredReadings *source);" (primitive_type) "void" (function_declarator) "convertToMessage(Message *target, RequiredReadings *source)" (identifier) "convertToMessage" (parameter_list) "(Message *target, RequiredReadings *source)" (() "(" (parameter_declaration) "Message *target" (type_identifier) "Message" (pointer_declarator) "*target" (*) "*" (identifier) "target" (,) "," (parameter_declaration) "RequiredReadings *source" (type_identifier) "RequiredReadings" (pointer_declarator) "*source" (*) "*" (identifier) "source" ()) ")" (;) ";" (#endif) "#endif"
197
0
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 32.8, "nodes": 150, "errors": 0, "source_hash": "2db6f15fecf472b31f2c376c6c51aa146cff8f7f31bd02ad0f21aaaed32d4d0b", "categorized_nodes": 93}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __ESK8_MODEL_H__\n#define __ESK8_MODEL_H__\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"Arduino.h\"\n#include \"local_datatypes.h\"\n\n#ifdef __cplusplus\n }\n#endif\n\n\nvoid convertToBytes(char *source, byte *destination, uint8_t length);\nvoid convertToCharArr(byte *source, char *destination, uint8_t length);\n\nvoid setSpeedValue(Message *msg, uint8_t value);\nuint8_t getSpeedValue(Message *msg);\n\nfloat getFloatValue(int *sourceIndex, byte* source);\nvoid injectToPayload(int *currentIndex, byte* payload, FloatPayload *item);\n\nint convertToRequiredReadings(Message *source, RequiredReadings *target); \nvoid convertToMessage(Message *target, RequiredReadings *source); \n#endif", "parent": null, "children": [1, 2, 3, 6, 25, 43, 61, 74, 84, 99, 119, 134, 149], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 26, "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": "__ESK8_MODEL_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define __ESK8_MODEL_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": "__ESK8_MODEL_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"Arduino.h\"\n#include \"local_datatypes.h\"\n\n#ifdef __cplusplus\n }\n#endif", "parent": 0, "children": [7, 8, 9, 24], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 8, "type": "identifier", "text": "__cplusplus", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\n#include \"Arduino.h\"\n#include \"local_datatypes.h\"\n\n#ifdef __cplusplus\n }", "parent": 6, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 10, "type": "extern", "text": "extern", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 11, "type": "string_literal", "text": "\"C\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 10}}, {"id": 12, "type": "preproc_call", "text": "#endif\n", "parent": 9, "children": [13], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 13, "type": "preproc_directive", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 14, "type": "preproc_include", "text": "#include \"Arduino.h\"\n", "parent": 9, "children": [15, 16], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 15, "type": "#include", "text": "#include", "parent": 14, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 16, "type": "string_literal", "text": "\"Arduino.h\"", "parent": 14, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 20}}, {"id": 17, "type": "preproc_include", "text": "#include \"local_datatypes.h\"\n", "parent": 9, "children": [18, 19], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 18, "type": "#include", "text": "#include", "parent": 17, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 19, "type": "string_literal", "text": "\"local_datatypes.h\"", "parent": 17, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 28}}, {"id": 20, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 9, "children": [21, 22, 23], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 18}}, {"id": 21, "type": "#ifdef", "text": "#ifdef", "parent": 20, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 22, "type": "identifier", "text": "__cplusplus", "parent": 20, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 18}}, {"id": 23, "type": "#endif", "text": "", "parent": 20, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 18}}, {"id": 24, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 25, "type": "declaration", "text": "void convertToBytes(char *source, byte *destination, uint8_t length);", "parent": 0, "children": [26, 27], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 69}}, {"id": 26, "type": "primitive_type", "text": "void", "parent": 25, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 27, "type": "function_declarator", "text": "convertToBytes(char *source, byte *destination, uint8_t length)", "parent": 25, "children": [28, 29], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 68}}, {"id": 28, "type": "identifier", "text": "convertToBytes", "parent": 27, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 19}}, {"id": 29, "type": "parameter_list", "text": "(char *source, byte *destination, uint8_t length)", "parent": 27, "children": [30, 35, 40], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 68}}, {"id": 30, "type": "parameter_declaration", "text": "char *source", "parent": 29, "children": [31, 32], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 32}}, {"id": 31, "type": "primitive_type", "text": "char", "parent": 30, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 24}}, {"id": 32, "type": "pointer_declarator", "text": "*source", "parent": 30, "children": [33, 34], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 32}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 26}}, {"id": 34, "type": "identifier", "text": "source", "parent": 32, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 32}}, {"id": 35, "type": "parameter_declaration", "text": "byte *destination", "parent": 29, "children": [36, 37], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 51}}, {"id": 36, "type": "type_identifier", "text": "byte", "parent": 35, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 38}}, {"id": 37, "type": "pointer_declarator", "text": "*destination", "parent": 35, "children": [38, 39], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 51}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 40}}, {"id": 39, "type": "identifier", "text": "destination", "parent": 37, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 51}}, {"id": 40, "type": "parameter_declaration", "text": "uint8_t length", "parent": 29, "children": [41, 42], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 67}}, {"id": 41, "type": "primitive_type", "text": "uint8_t", "parent": 40, "children": [], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 60}}, {"id": 42, "type": "identifier", "text": "length", "parent": 40, "children": [], "start_point": {"row": 15, "column": 61}, "end_point": {"row": 15, "column": 67}}, {"id": 43, "type": "declaration", "text": "void convertToCharArr(byte *source, char *destination, uint8_t length);", "parent": 0, "children": [44, 45], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 71}}, {"id": 44, "type": "primitive_type", "text": "void", "parent": 43, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 45, "type": "function_declarator", "text": "convertToCharArr(byte *source, char *destination, uint8_t length)", "parent": 43, "children": [46, 47], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 70}}, {"id": 46, "type": "identifier", "text": "convertToCharArr", "parent": 45, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 21}}, {"id": 47, "type": "parameter_list", "text": "(byte *source, char *destination, uint8_t length)", "parent": 45, "children": [48, 53, 58], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 70}}, {"id": 48, "type": "parameter_declaration", "text": "byte *source", "parent": 47, "children": [49, 50], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 34}}, {"id": 49, "type": "type_identifier", "text": "byte", "parent": 48, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 26}}, {"id": 50, "type": "pointer_declarator", "text": "*source", "parent": 48, "children": [51, 52], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 34}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 28}}, {"id": 52, "type": "identifier", "text": "source", "parent": 50, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 34}}, {"id": 53, "type": "parameter_declaration", "text": "char *destination", "parent": 47, "children": [54, 55], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 53}}, {"id": 54, "type": "primitive_type", "text": "char", "parent": 53, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 40}}, {"id": 55, "type": "pointer_declarator", "text": "*destination", "parent": 53, "children": [56, 57], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 53}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 42}}, {"id": 57, "type": "identifier", "text": "destination", "parent": 55, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 53}}, {"id": 58, "type": "parameter_declaration", "text": "uint8_t length", "parent": 47, "children": [59, 60], "start_point": {"row": 16, "column": 55}, "end_point": {"row": 16, "column": 69}}, {"id": 59, "type": "primitive_type", "text": "uint8_t", "parent": 58, "children": [], "start_point": {"row": 16, "column": 55}, "end_point": {"row": 16, "column": 62}}, {"id": 60, "type": "identifier", "text": "length", "parent": 58, "children": [], "start_point": {"row": 16, "column": 63}, "end_point": {"row": 16, "column": 69}}, {"id": 61, "type": "declaration", "text": "void setSpeedValue(Message *msg, uint8_t value);", "parent": 0, "children": [62, 63], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 48}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 63, "type": "function_declarator", "text": "setSpeedValue(Message *msg, uint8_t value)", "parent": 61, "children": [64, 65], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 47}}, {"id": 64, "type": "identifier", "text": "setSpeedValue", "parent": 63, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 18}}, {"id": 65, "type": "parameter_list", "text": "(Message *msg, uint8_t value)", "parent": 63, "children": [66, 71], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 47}}, {"id": 66, "type": "parameter_declaration", "text": "Message *msg", "parent": 65, "children": [67, 68], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 31}}, {"id": 67, "type": "type_identifier", "text": "Message", "parent": 66, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 26}}, {"id": 68, "type": "pointer_declarator", "text": "*msg", "parent": 66, "children": [69, 70], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 31}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 28}}, {"id": 70, "type": "identifier", "text": "msg", "parent": 68, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 31}}, {"id": 71, "type": "parameter_declaration", "text": "uint8_t value", "parent": 65, "children": [72, 73], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 46}}, {"id": 72, "type": "primitive_type", "text": "uint8_t", "parent": 71, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 40}}, {"id": 73, "type": "identifier", "text": "value", "parent": 71, "children": [], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 46}}, {"id": 74, "type": "declaration", "text": "uint8_t getSpeedValue(Message *msg);", "parent": 0, "children": [75, 76], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 36}}, {"id": 75, "type": "primitive_type", "text": "uint8_t", "parent": 74, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 76, "type": "function_declarator", "text": "getSpeedValue(Message *msg)", "parent": 74, "children": [77, 78], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 35}}, {"id": 77, "type": "identifier", "text": "getSpeedValue", "parent": 76, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 21}}, {"id": 78, "type": "parameter_list", "text": "(Message *msg)", "parent": 76, "children": [79], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 35}}, {"id": 79, "type": "parameter_declaration", "text": "Message *msg", "parent": 78, "children": [80, 81], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 34}}, {"id": 80, "type": "type_identifier", "text": "Message", "parent": 79, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 29}}, {"id": 81, "type": "pointer_declarator", "text": "*msg", "parent": 79, "children": [82, 83], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 34}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 31}}, {"id": 83, "type": "identifier", "text": "msg", "parent": 81, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 34}}, {"id": 84, "type": "declaration", "text": "float getFloatValue(int *sourceIndex, byte* source);", "parent": 0, "children": [85, 86], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 52}}, {"id": 85, "type": "primitive_type", "text": "float", "parent": 84, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 5}}, {"id": 86, "type": "function_declarator", "text": "getFloatValue(int *sourceIndex, byte* source)", "parent": 84, "children": [87, 88], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 51}}, {"id": 87, "type": "identifier", "text": "getFloatValue", "parent": 86, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 19}}, {"id": 88, "type": "parameter_list", "text": "(int *sourceIndex, byte* source)", "parent": 86, "children": [89, 94], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 51}}, {"id": 89, "type": "parameter_declaration", "text": "int *sourceIndex", "parent": 88, "children": [90, 91], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 36}}, {"id": 90, "type": "primitive_type", "text": "int", "parent": 89, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 23}}, {"id": 91, "type": "pointer_declarator", "text": "*sourceIndex", "parent": 89, "children": [92, 93], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 36}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 93, "type": "identifier", "text": "sourceIndex", "parent": 91, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 36}}, {"id": 94, "type": "parameter_declaration", "text": "byte* source", "parent": 88, "children": [95, 96], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 50}}, {"id": 95, "type": "type_identifier", "text": "byte", "parent": 94, "children": [], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 42}}, {"id": 96, "type": "pointer_declarator", "text": "* source", "parent": 94, "children": [97, 98], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 50}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 43}}, {"id": 98, "type": "identifier", "text": "source", "parent": 96, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 50}}, {"id": 99, "type": "declaration", "text": "void injectToPayload(int *currentIndex, byte* payload, FloatPayload *item);", "parent": 0, "children": [100, 101], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 75}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 101, "type": "function_declarator", "text": "injectToPayload(int *currentIndex, byte* payload, FloatPayload *item)", "parent": 99, "children": [102, 103], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 74}}, {"id": 102, "type": "identifier", "text": "injectToPayload", "parent": 101, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 20}}, {"id": 103, "type": "parameter_list", "text": "(int *currentIndex, byte* payload, FloatPayload *item)", "parent": 101, "children": [104, 109, 114], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 74}}, {"id": 104, "type": "parameter_declaration", "text": "int *currentIndex", "parent": 103, "children": [105, 106], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 38}}, {"id": 105, "type": "primitive_type", "text": "int", "parent": 104, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 24}}, {"id": 106, "type": "pointer_declarator", "text": "*currentIndex", "parent": 104, "children": [107, 108], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 38}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 26}}, {"id": 108, "type": "identifier", "text": "currentIndex", "parent": 106, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 38}}, {"id": 109, "type": "parameter_declaration", "text": "byte* payload", "parent": 103, "children": [110, 111], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 53}}, {"id": 110, "type": "type_identifier", "text": "byte", "parent": 109, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 44}}, {"id": 111, "type": "pointer_declarator", "text": "* payload", "parent": 109, "children": [112, 113], "start_point": {"row": 22, "column": 44}, "end_point": {"row": 22, "column": 53}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 22, "column": 44}, "end_point": {"row": 22, "column": 45}}, {"id": 113, "type": "identifier", "text": "payload", "parent": 111, "children": [], "start_point": {"row": 22, "column": 46}, "end_point": {"row": 22, "column": 53}}, {"id": 114, "type": "parameter_declaration", "text": "FloatPayload *item", "parent": 103, "children": [115, 116], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 73}}, {"id": 115, "type": "type_identifier", "text": "FloatPayload", "parent": 114, "children": [], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 67}}, {"id": 116, "type": "pointer_declarator", "text": "*item", "parent": 114, "children": [117, 118], "start_point": {"row": 22, "column": 68}, "end_point": {"row": 22, "column": 73}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 22, "column": 68}, "end_point": {"row": 22, "column": 69}}, {"id": 118, "type": "identifier", "text": "item", "parent": 116, "children": [], "start_point": {"row": 22, "column": 69}, "end_point": {"row": 22, "column": 73}}, {"id": 119, "type": "declaration", "text": "int convertToRequiredReadings(Message *source, RequiredReadings *target);", "parent": 0, "children": [120, 121], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 73}}, {"id": 120, "type": "primitive_type", "text": "int", "parent": 119, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 3}}, {"id": 121, "type": "function_declarator", "text": "convertToRequiredReadings(Message *source, RequiredReadings *target)", "parent": 119, "children": [122, 123], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 72}}, {"id": 122, "type": "identifier", "text": "convertToRequiredReadings", "parent": 121, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 29}}, {"id": 123, "type": "parameter_list", "text": "(Message *source, RequiredReadings *target)", "parent": 121, "children": [124, 129], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 72}}, {"id": 124, "type": "parameter_declaration", "text": "Message *source", "parent": 123, "children": [125, 126], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 45}}, {"id": 125, "type": "type_identifier", "text": "Message", "parent": 124, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 37}}, {"id": 126, "type": "pointer_declarator", "text": "*source", "parent": 124, "children": [127, 128], "start_point": {"row": 24, "column": 38}, "end_point": {"row": 24, "column": 45}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 24, "column": 38}, "end_point": {"row": 24, "column": 39}}, {"id": 128, "type": "identifier", "text": "source", "parent": 126, "children": [], "start_point": {"row": 24, "column": 39}, "end_point": {"row": 24, "column": 45}}, {"id": 129, "type": "parameter_declaration", "text": "RequiredReadings *target", "parent": 123, "children": [130, 131], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 71}}, {"id": 130, "type": "type_identifier", "text": "RequiredReadings", "parent": 129, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 63}}, {"id": 131, "type": "pointer_declarator", "text": "*target", "parent": 129, "children": [132, 133], "start_point": {"row": 24, "column": 64}, "end_point": {"row": 24, "column": 71}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 24, "column": 64}, "end_point": {"row": 24, "column": 65}}, {"id": 133, "type": "identifier", "text": "target", "parent": 131, "children": [], "start_point": {"row": 24, "column": 65}, "end_point": {"row": 24, "column": 71}}, {"id": 134, "type": "declaration", "text": "void convertToMessage(Message *target, RequiredReadings *source);", "parent": 0, "children": [135, 136], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 65}}, {"id": 135, "type": "primitive_type", "text": "void", "parent": 134, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 4}}, {"id": 136, "type": "function_declarator", "text": "convertToMessage(Message *target, RequiredReadings *source)", "parent": 134, "children": [137, 138], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 64}}, {"id": 137, "type": "identifier", "text": "convertToMessage", "parent": 136, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 21}}, {"id": 138, "type": "parameter_list", "text": "(Message *target, RequiredReadings *source)", "parent": 136, "children": [139, 144], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 64}}, {"id": 139, "type": "parameter_declaration", "text": "Message *target", "parent": 138, "children": [140, 141], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 37}}, {"id": 140, "type": "type_identifier", "text": "Message", "parent": 139, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 29}}, {"id": 141, "type": "pointer_declarator", "text": "*target", "parent": 139, "children": [142, 143], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 37}}, {"id": 142, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 31}}, {"id": 143, "type": "identifier", "text": "target", "parent": 141, "children": [], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 37}}, {"id": 144, "type": "parameter_declaration", "text": "RequiredReadings *source", "parent": 138, "children": [145, 146], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 63}}, {"id": 145, "type": "type_identifier", "text": "RequiredReadings", "parent": 144, "children": [], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 55}}, {"id": 146, "type": "pointer_declarator", "text": "*source", "parent": 144, "children": [147, 148], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 63}}, {"id": 147, "type": "*", "text": "*", "parent": 146, "children": [], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 57}}, {"id": 148, "type": "identifier", "text": "source", "parent": 146, "children": [], "start_point": {"row": 25, "column": 57}, "end_point": {"row": 25, "column": 63}}, {"id": 149, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}]}, "node_categories": {"declarations": {"functions": [27, 45, 63, 76, 86, 101, 121, 136], "variables": [25, 30, 35, 40, 43, 48, 53, 58, 61, 66, 71, 74, 79, 84, 89, 94, 99, 104, 109, 114, 119, 124, 129, 134, 139, 144], "classes": [], "imports": [14, 15, 17, 18], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 28, 34, 36, 39, 42, 46, 49, 52, 57, 60, 64, 67, 70, 73, 77, 80, 83, 87, 93, 95, 98, 102, 108, 110, 113, 115, 118, 122, 125, 128, 130, 133, 137, 140, 143, 145, 148, 149], "returns": [], "exceptions": []}, "expressions": {"calls": [12], "literals": [11, 16, 19], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "convertToBytes(char *source, byte *destination, uint8_t length)"}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "convertToCharArr(byte *source, char *destination, uint8_t length)"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "setSpeedValue(Message *msg, uint8_t value)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "getSpeedValue(Message *msg)"}, {"node_id": 86, "universal_type": "function", "name": "unknown", "text_snippet": "getFloatValue(int *sourceIndex, byte* source)"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "injectToPayload(int *currentIndex, byte* payload, FloatPayload *item)"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "convertToRequiredReadings(Message *source, RequiredReadings *target)"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "convertToMessage(Message *target, RequiredReadings *source)"}], "class_declarations": [], "import_statements": [{"node_id": 14, "text": "#include \"Arduino.h\"\n"}, {"node_id": 15, "text": "#include"}, {"node_id": 17, "text": "#include \"local_datatypes.h\"\n"}, {"node_id": 18, "text": "#include"}]}, "original_source_code": "#ifndef __ESK8_MODEL_H__\n#define __ESK8_MODEL_H__\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"Arduino.h\"\n#include \"local_datatypes.h\"\n\n#ifdef __cplusplus\n }\n#endif\n\n\nvoid convertToBytes(char *source, byte *destination, uint8_t length);\nvoid convertToCharArr(byte *source, char *destination, uint8_t length);\n\nvoid setSpeedValue(Message *msg, uint8_t value);\nuint8_t getSpeedValue(Message *msg);\n\nfloat getFloatValue(int *sourceIndex, byte* source);\nvoid injectToPayload(int *currentIndex, byte* payload, FloatPayload *item);\n\nint convertToRequiredReadings(Message *source, RequiredReadings *target); \nvoid convertToMessage(Message *target, RequiredReadings *source); \n#endif\n"}
250
c
/** * @file ArmCollisionDetector.h * * @author <a href="mailto:<EMAIL>"><NAME></a> * ArmCollisionDetector: detect collisions with arms based on joint position deviation. */ #ifndef _ArmCollisionDetector_H_ #define _ArmCollisionDetector_H_ #include <ModuleFramework/Module.h> // representations #include <Representations/Infrastructure/FrameInfo.h> #include <Representations/Infrastructure/JointData.h> #include "Representations/Motion/MotionStatus.h" #include "Representations/Motion/Request/MotionRequest.h" #include "Representations/Motion/CollisionPercept.h" // tools #include <Tools/DataStructures/RingBufferWithSum.h> // debug #include "Tools/Debug/DebugRequest.h" #include "Tools/Debug/DebugPlot.h" #include "Tools/Debug/DebugModify.h" #include "Tools/Debug/DebugParameterList.h" BEGIN_DECLARE_MODULE(ArmCollisionDetector) PROVIDE(DebugRequest) PROVIDE(DebugPlot) PROVIDE(DebugModify) PROVIDE(DebugParameterList) REQUIRE(FrameInfo) REQUIRE(MotorJointData) REQUIRE(SensorJointData) REQUIRE(MotionStatus) REQUIRE(MotionRequest) PROVIDE(CollisionPercept) END_DECLARE_MODULE(ArmCollisionDetector) class ArmCollisionDetector : private ArmCollisionDetectorBase { public: ArmCollisionDetector(); ~ArmCollisionDetector(); void execute(); public: class Parameter : public ParameterList { public: Parameter() : ParameterList("ArmCollisionDetector") { PARAMETER_REGISTER(maxErrorStand) = 0.02; PARAMETER_REGISTER(maxErrorWalk) = 0.05; syncWithConfig(); } double maxErrorStand; double maxErrorWalk; } params; private: RingBufferWithSum<double, 100> collisionBufferLeft; RingBufferWithSum<double, 100> collisionBufferRight; RingBuffer<double, 4> jointDataBufferLeft; RingBuffer<double, 4> jointDataBufferRight; //naoth::FrameInfo frameWhenArmsBack; //ArmMotionRequest::ArmMotionID armStatus; }; #endif //_ArmCollisionDetector_H_
28.83
64
(translation_unit) "/**\n* @file ArmCollisionDetector.h\n*\n* @author <a href="mailto:<EMAIL>"><NAME></a>\n* ArmCollisionDetector: detect collisions with arms based on joint position deviation.\n*/\n\n#ifndef _ArmCollisionDetector_H_\n#define _ArmCollisionDetector_H_\n\n#include <ModuleFramework/Module.h>\n\n// representations\n#include <Representations/Infrastructure/FrameInfo.h>\n#include <Representations/Infrastructure/JointData.h>\n\n#include "Representations/Motion/MotionStatus.h"\n#include "Representations/Motion/Request/MotionRequest.h"\n#include "Representations/Motion/CollisionPercept.h"\n\n// tools\n#include <Tools/DataStructures/RingBufferWithSum.h>\n\n// debug\n#include "Tools/Debug/DebugRequest.h"\n#include "Tools/Debug/DebugPlot.h"\n#include "Tools/Debug/DebugModify.h"\n#include "Tools/Debug/DebugParameterList.h"\n\n\nBEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase\n{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n};\n\n#endif //_ArmCollisionDetector_H_\n" (comment) "/**\n* @file ArmCollisionDetector.h\n*\n* @author <a href="mailto:<EMAIL>"><NAME></a>\n* ArmCollisionDetector: detect collisions with arms based on joint position deviation.\n*/" (preproc_ifdef) "#ifndef _ArmCollisionDetector_H_\n#define _ArmCollisionDetector_H_\n\n#include <ModuleFramework/Module.h>\n\n// representations\n#include <Representations/Infrastructure/FrameInfo.h>\n#include <Representations/Infrastructure/JointData.h>\n\n#include "Representations/Motion/MotionStatus.h"\n#include "Representations/Motion/Request/MotionRequest.h"\n#include "Representations/Motion/CollisionPercept.h"\n\n// tools\n#include <Tools/DataStructures/RingBufferWithSum.h>\n\n// debug\n#include "Tools/Debug/DebugRequest.h"\n#include "Tools/Debug/DebugPlot.h"\n#include "Tools/Debug/DebugModify.h"\n#include "Tools/Debug/DebugParameterList.h"\n\n\nBEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase\n{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "_ArmCollisionDetector_H_" (preproc_def) "#define _ArmCollisionDetector_H_\n" (#define) "#define" (identifier) "_ArmCollisionDetector_H_" (preproc_include) "#include <ModuleFramework/Module.h>\n" (#include) "#include" (system_lib_string) "<ModuleFramework/Module.h>" (comment) "// representations" (preproc_include) "#include <Representations/Infrastructure/FrameInfo.h>\n" (#include) "#include" (system_lib_string) "<Representations/Infrastructure/FrameInfo.h>" (preproc_include) "#include <Representations/Infrastructure/JointData.h>\n" (#include) "#include" (system_lib_string) "<Representations/Infrastructure/JointData.h>" (preproc_include) "#include "Representations/Motion/MotionStatus.h"\n" (#include) "#include" (string_literal) ""Representations/Motion/MotionStatus.h"" (") """ (string_content) "Representations/Motion/MotionStatus.h" (") """ (preproc_include) "#include "Representations/Motion/Request/MotionRequest.h"\n" (#include) "#include" (string_literal) ""Representations/Motion/Request/MotionRequest.h"" (") """ (string_content) "Representations/Motion/Request/MotionRequest.h" (") """ (preproc_include) "#include "Representations/Motion/CollisionPercept.h"\n" (#include) "#include" (string_literal) ""Representations/Motion/CollisionPercept.h"" (") """ (string_content) "Representations/Motion/CollisionPercept.h" (") """ (comment) "// tools" (preproc_include) "#include <Tools/DataStructures/RingBufferWithSum.h>\n" (#include) "#include" (system_lib_string) "<Tools/DataStructures/RingBufferWithSum.h>" (comment) "// debug" (preproc_include) "#include "Tools/Debug/DebugRequest.h"\n" (#include) "#include" (string_literal) ""Tools/Debug/DebugRequest.h"" (") """ (string_content) "Tools/Debug/DebugRequest.h" (") """ (preproc_include) "#include "Tools/Debug/DebugPlot.h"\n" (#include) "#include" (string_literal) ""Tools/Debug/DebugPlot.h"" (") """ (string_content) "Tools/Debug/DebugPlot.h" (") """ (preproc_include) "#include "Tools/Debug/DebugModify.h"\n" (#include) "#include" (string_literal) ""Tools/Debug/DebugModify.h"" (") """ (string_content) "Tools/Debug/DebugModify.h" (") """ (preproc_include) "#include "Tools/Debug/DebugParameterList.h"\n" (#include) "#include" (string_literal) ""Tools/Debug/DebugParameterList.h"" (") """ (string_content) "Tools/Debug/DebugParameterList.h" (") """ (function_definition) "BEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase\n{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n}" (macro_type_specifier) "BEGIN_DECLARE_MODULE(ArmCollisionDetector)" (identifier) "BEGIN_DECLARE_MODULE" (() "(" (type_descriptor) "ArmCollisionDetector" (type_identifier) "ArmCollisionDetector" ()) ")" (function_declarator) "PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase" (identifier) "PROVIDE" (parameter_list) "(DebugRequest)" (() "(" (parameter_declaration) "DebugRequest" (type_identifier) "DebugRequest" ()) ")" (call_expression) "PROVIDE(DebugPlot)" (identifier) "PROVIDE" (argument_list) "(DebugPlot)" (() "(" (identifier) "DebugPlot" ()) ")" (call_expression) "PROVIDE(DebugModify)" (identifier) "PROVIDE" (argument_list) "(DebugModify)" (() "(" (identifier) "DebugModify" ()) ")" (call_expression) "PROVIDE(DebugParameterList)" (identifier) "PROVIDE" (argument_list) "(DebugParameterList)" (() "(" (identifier) "DebugParameterList" ()) ")" (call_expression) "REQUIRE(FrameInfo)" (identifier) "REQUIRE" (argument_list) "(FrameInfo)" (() "(" (identifier) "FrameInfo" ()) ")" (call_expression) "REQUIRE(MotorJointData)" (identifier) "REQUIRE" (argument_list) "(MotorJointData)" (() "(" (identifier) "MotorJointData" ()) ")" (call_expression) "REQUIRE(SensorJointData)" (identifier) "REQUIRE" (argument_list) "(SensorJointData)" (() "(" (identifier) "SensorJointData" ()) ")" (call_expression) "REQUIRE(MotionStatus)" (identifier) "REQUIRE" (argument_list) "(MotionStatus)" (() "(" (identifier) "MotionStatus" ()) ")" (call_expression) "REQUIRE(MotionRequest)" (identifier) "REQUIRE" (argument_list) "(MotionRequest)" (() "(" (identifier) "MotionRequest" ()) ")" (call_expression) "PROVIDE(CollisionPercept)" (identifier) "PROVIDE" (argument_list) "(CollisionPercept)" (() "(" (identifier) "CollisionPercept" ()) ")" (call_expression) "END_DECLARE_MODULE(ArmCollisionDetector)" (identifier) "END_DECLARE_MODULE" (argument_list) "(ArmCollisionDetector)" (() "(" (identifier) "ArmCollisionDetector" ()) ")" (identifier) "class" (identifier) "ArmCollisionDetector" (ERROR) ":" (:) ":" (identifier) "private" (identifier) "ArmCollisionDetectorBase" (compound_statement) "{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n}" ({) "{" (labeled_statement) "public:\n ArmCollisionDetector();" (statement_identifier) "public" (:) ":" (expression_statement) "ArmCollisionDetector();" (call_expression) "ArmCollisionDetector()" (identifier) "ArmCollisionDetector" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "~ArmCollisionDetector();" (unary_expression) "~ArmCollisionDetector()" (~) "~" (call_expression) "ArmCollisionDetector()" (identifier) "ArmCollisionDetector" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void execute();" (primitive_type) "void" (function_declarator) "execute()" (identifier) "execute" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "public:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n }" (statement_identifier) "public" (:) ":" (ERROR) "class Parameter : public ParameterList" (type_identifier) "class" (ERROR) "Parameter : public" (identifier) "Parameter" (:) ":" (identifier) "public" (identifier) "ParameterList" (compound_statement) "{\n public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n }" ({) "{" (labeled_statement) "public:\n Parameter() : ParameterList("ArmCollisionDetector") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }" (statement_identifier) "public" (:) ":" (ERROR) "Parameter() : ParameterList("ArmCollisionDetector")" (call_expression) "Parameter()" (identifier) "Parameter" (argument_list) "()" (() "(" ()) ")" (:) ":" (call_expression) "ParameterList("ArmCollisionDetector")" (identifier) "ParameterList" (argument_list) "("ArmCollisionDetector")" (() "(" (string_literal) ""ArmCollisionDetector"" (") """ (string_content) "ArmCollisionDetector" (") """ ()) ")" (compound_statement) "{\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }" ({) "{" (expression_statement) "PARAMETER_REGISTER(maxErrorStand) = 0.02;" (assignment_expression) "PARAMETER_REGISTER(maxErrorStand) = 0.02" (call_expression) "PARAMETER_REGISTER(maxErrorStand)" (identifier) "PARAMETER_REGISTER" (argument_list) "(maxErrorStand)" (() "(" (identifier) "maxErrorStand" ()) ")" (=) "=" (number_literal) "0.02" (;) ";" (expression_statement) "PARAMETER_REGISTER(maxErrorWalk) = 0.05;" (assignment_expression) "PARAMETER_REGISTER(maxErrorWalk) = 0.05" (call_expression) "PARAMETER_REGISTER(maxErrorWalk)" (identifier) "PARAMETER_REGISTER" (argument_list) "(maxErrorWalk)" (() "(" (identifier) "maxErrorWalk" ()) ")" (=) "=" (number_literal) "0.05" (;) ";" (expression_statement) "syncWithConfig();" (call_expression) "syncWithConfig()" (identifier) "syncWithConfig" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (declaration) "double maxErrorStand;" (primitive_type) "double" (identifier) "maxErrorStand" (;) ";" (declaration) "double maxErrorWalk;" (primitive_type) "double" (identifier) "maxErrorWalk" (;) ";" (}) "}" (expression_statement) "params;" (identifier) "params" (;) ";" (labeled_statement) "private:\n RingBufferWithSum<double, 100> collisionBufferLeft;" (statement_identifier) "private" (:) ":" (expression_statement) "RingBufferWithSum<double, 100> collisionBufferLeft;" (comma_expression) "RingBufferWithSum<double, 100> collisionBufferLeft" (binary_expression) "RingBufferWithSum<double" (identifier) "RingBufferWithSum" (<) "<" (identifier) "double" (,) "," (binary_expression) "100> collisionBufferLeft" (number_literal) "100" (>) ">" (identifier) "collisionBufferLeft" (;) ";" (expression_statement) "RingBufferWithSum<double, 100> collisionBufferRight;" (comma_expression) "RingBufferWithSum<double, 100> collisionBufferRight" (binary_expression) "RingBufferWithSum<double" (identifier) "RingBufferWithSum" (<) "<" (identifier) "double" (,) "," (binary_expression) "100> collisionBufferRight" (number_literal) "100" (>) ">" (identifier) "collisionBufferRight" (;) ";" (expression_statement) "RingBuffer<double, 4> jointDataBufferLeft;" (comma_expression) "RingBuffer<double, 4> jointDataBufferLeft" (binary_expression) "RingBuffer<double" (identifier) "RingBuffer" (<) "<" (identifier) "double" (,) "," (binary_expression) "4> jointDataBufferLeft" (number_literal) "4" (>) ">" (identifier) "jointDataBufferLeft" (;) ";" (expression_statement) "RingBuffer<double, 4> jointDataBufferRight;" (comma_expression) "RingBuffer<double, 4> jointDataBufferRight" (binary_expression) "RingBuffer<double" (identifier) "RingBuffer" (<) "<" (identifier) "double" (,) "," (binary_expression) "4> jointDataBufferRight" (number_literal) "4" (>) ">" (identifier) "jointDataBufferRight" (;) ";" (comment) "//naoth::FrameInfo frameWhenArmsBack;" (comment) "//ArmMotionRequest::ArmMotionID armStatus;" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//_ArmCollisionDetector_H_"
307
4
{"language": "c", "success": true, "metadata": {"lines": 64, "avg_line_length": 28.83, "nodes": 181, "errors": 0, "source_hash": "be6b4b3603f73fcd5ca779529d36ff2f1a1d0762d723d6805d99b4b073720de2", "categorized_nodes": 138}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _ArmCollisionDetector_H_\n#define _ArmCollisionDetector_H_\n\n#include <ModuleFramework/Module.h>\n\n// representations\n#include <Representations/Infrastructure/FrameInfo.h>\n#include <Representations/Infrastructure/JointData.h>\n\n#include \"Representations/Motion/MotionStatus.h\"\n#include \"Representations/Motion/Request/MotionRequest.h\"\n#include \"Representations/Motion/CollisionPercept.h\"\n\n// tools\n#include <Tools/DataStructures/RingBufferWithSum.h>\n\n// debug\n#include \"Tools/Debug/DebugRequest.h\"\n#include \"Tools/Debug/DebugPlot.h\"\n#include \"Tools/Debug/DebugModify.h\"\n#include \"Tools/Debug/DebugParameterList.h\"\n\n\nBEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase\n{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList(\"ArmCollisionDetector\") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 180], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 79, "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": "_ArmCollisionDetector_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 32}}, {"id": 3, "type": "preproc_def", "text": "#define _ArmCollisionDetector_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": "_ArmCollisionDetector_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 32}}, {"id": 6, "type": "preproc_include", "text": "#include <ModuleFramework/Module.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": "<ModuleFramework/Module.h>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 35}}, {"id": 9, "type": "preproc_include", "text": "#include <Representations/Infrastructure/FrameInfo.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<Representations/Infrastructure/FrameInfo.h>", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 53}}, {"id": 12, "type": "preproc_include", "text": "#include <Representations/Infrastructure/JointData.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<Representations/Infrastructure/JointData.h>", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 53}}, {"id": 15, "type": "preproc_include", "text": "#include \"Representations/Motion/MotionStatus.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": "\"Representations/Motion/MotionStatus.h\"", "parent": 15, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 48}}, {"id": 18, "type": "preproc_include", "text": "#include \"Representations/Motion/Request/MotionRequest.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": "\"Representations/Motion/Request/MotionRequest.h\"", "parent": 18, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 57}}, {"id": 21, "type": "preproc_include", "text": "#include \"Representations/Motion/CollisionPercept.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": "\"Representations/Motion/CollisionPercept.h\"", "parent": 21, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 52}}, {"id": 24, "type": "preproc_include", "text": "#include <Tools/DataStructures/RingBufferWithSum.h>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<Tools/DataStructures/RingBufferWithSum.h>", "parent": 24, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 51}}, {"id": 27, "type": "preproc_include", "text": "#include \"Tools/Debug/DebugRequest.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"Tools/Debug/DebugRequest.h\"", "parent": 27, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 37}}, {"id": 30, "type": "preproc_include", "text": "#include \"Tools/Debug/DebugPlot.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"Tools/Debug/DebugPlot.h\"", "parent": 30, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 34}}, {"id": 33, "type": "preproc_include", "text": "#include \"Tools/Debug/DebugModify.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"Tools/Debug/DebugModify.h\"", "parent": 33, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 36}}, {"id": 36, "type": "preproc_include", "text": "#include \"Tools/Debug/DebugParameterList.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"Tools/Debug/DebugParameterList.h\"", "parent": 36, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 43}}, {"id": 39, "type": "function_definition", "text": "BEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase\n{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList(\"ArmCollisionDetector\") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n}", "parent": 0, "children": [40, 44], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 77, "column": 1}}, {"id": 40, "type": "macro_type_specifier", "text": "BEGIN_DECLARE_MODULE(ArmCollisionDetector)", "parent": 39, "children": [41, 42], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 42}}, {"id": 41, "type": "identifier", "text": "BEGIN_DECLARE_MODULE", "parent": 40, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 20}}, {"id": 42, "type": "type_descriptor", "text": "ArmCollisionDetector", "parent": 40, "children": [43], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 41}}, {"id": 43, "type": "type_identifier", "text": "ArmCollisionDetector", "parent": 42, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 41}}, {"id": 44, "type": "function_declarator", "text": "PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase", "parent": 39, "children": [45, 46, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 90], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 45, "column": 61}}, {"id": 45, "type": "identifier", "text": "PROVIDE", "parent": 44, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 9}}, {"id": 46, "type": "parameter_list", "text": "(DebugRequest)", "parent": 44, "children": [47], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 23}}, {"id": 47, "type": "parameter_declaration", "text": "DebugRequest", "parent": 46, "children": [48], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 22}}, {"id": 48, "type": "type_identifier", "text": "DebugRequest", "parent": 47, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 22}}, {"id": 49, "type": "call_expression", "text": "PROVIDE(DebugPlot)", "parent": 44, "children": [50, 51], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 20}}, {"id": 50, "type": "identifier", "text": "PROVIDE", "parent": 49, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 9}}, {"id": 51, "type": "argument_list", "text": "(DebugPlot)", "parent": 49, "children": [52], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 20}}, {"id": 52, "type": "identifier", "text": "DebugPlot", "parent": 51, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 19}}, {"id": 53, "type": "call_expression", "text": "PROVIDE(DebugModify)", "parent": 44, "children": [54, 55], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 22}}, {"id": 54, "type": "identifier", "text": "PROVIDE", "parent": 53, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 9}}, {"id": 55, "type": "argument_list", "text": "(DebugModify)", "parent": 53, "children": [56], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 22}}, {"id": 56, "type": "identifier", "text": "DebugModify", "parent": 55, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 21}}, {"id": 57, "type": "call_expression", "text": "PROVIDE(DebugParameterList)", "parent": 44, "children": [58, 59], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 29}}, {"id": 58, "type": "identifier", "text": "PROVIDE", "parent": 57, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 9}}, {"id": 59, "type": "argument_list", "text": "(DebugParameterList)", "parent": 57, "children": [60], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 29}}, {"id": 60, "type": "identifier", "text": "DebugParameterList", "parent": 59, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 28}}, {"id": 61, "type": "call_expression", "text": "REQUIRE(FrameInfo)", "parent": 44, "children": [62, 63], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 20}}, {"id": 62, "type": "identifier", "text": "REQUIRE", "parent": 61, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 9}}, {"id": 63, "type": "argument_list", "text": "(FrameInfo)", "parent": 61, "children": [64], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 20}}, {"id": 64, "type": "identifier", "text": "FrameInfo", "parent": 63, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 19}}, {"id": 65, "type": "call_expression", "text": "REQUIRE(MotorJointData)", "parent": 44, "children": [66, 67], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 25}}, {"id": 66, "type": "identifier", "text": "REQUIRE", "parent": 65, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 9}}, {"id": 67, "type": "argument_list", "text": "(MotorJointData)", "parent": 65, "children": [68], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 25}}, {"id": 68, "type": "identifier", "text": "MotorJointData", "parent": 67, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 24}}, {"id": 69, "type": "call_expression", "text": "REQUIRE(SensorJointData)", "parent": 44, "children": [70, 71], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 26}}, {"id": 70, "type": "identifier", "text": "REQUIRE", "parent": 69, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 9}}, {"id": 71, "type": "argument_list", "text": "(SensorJointData)", "parent": 69, "children": [72], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 26}}, {"id": 72, "type": "identifier", "text": "SensorJointData", "parent": 71, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 25}}, {"id": 73, "type": "call_expression", "text": "REQUIRE(MotionStatus)", "parent": 44, "children": [74, 75], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 23}}, {"id": 74, "type": "identifier", "text": "REQUIRE", "parent": 73, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 9}}, {"id": 75, "type": "argument_list", "text": "(MotionStatus)", "parent": 73, "children": [76], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 23}}, {"id": 76, "type": "identifier", "text": "MotionStatus", "parent": 75, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 22}}, {"id": 77, "type": "call_expression", "text": "REQUIRE(MotionRequest)", "parent": 44, "children": [78, 79], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 24}}, {"id": 78, "type": "identifier", "text": "REQUIRE", "parent": 77, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 9}}, {"id": 79, "type": "argument_list", "text": "(MotionRequest)", "parent": 77, "children": [80], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 24}}, {"id": 80, "type": "identifier", "text": "MotionRequest", "parent": 79, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 23}}, {"id": 81, "type": "call_expression", "text": "PROVIDE(CollisionPercept)", "parent": 44, "children": [82, 83], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 27}}, {"id": 82, "type": "identifier", "text": "PROVIDE", "parent": 81, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 9}}, {"id": 83, "type": "argument_list", "text": "(CollisionPercept)", "parent": 81, "children": [84], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 27}}, {"id": 84, "type": "identifier", "text": "CollisionPercept", "parent": 83, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 26}}, {"id": 85, "type": "call_expression", "text": "END_DECLARE_MODULE(ArmCollisionDetector)", "parent": 44, "children": [86, 87], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 40}}, {"id": 86, "type": "identifier", "text": "END_DECLARE_MODULE", "parent": 85, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 18}}, {"id": 87, "type": "argument_list", "text": "(ArmCollisionDetector)", "parent": 85, "children": [88], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 40}}, {"id": 88, "type": "identifier", "text": "ArmCollisionDetector", "parent": 87, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 39}}, {"id": 89, "type": "identifier", "text": "ArmCollisionDetector", "parent": 44, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 26}}, {"id": 90, "type": "identifier", "text": "ArmCollisionDetectorBase", "parent": 44, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 61}}, {"id": 91, "type": "labeled_statement", "text": "public:\n ArmCollisionDetector();", "parent": 39, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 25}}, {"id": 92, "type": "call_expression", "text": "ArmCollisionDetector()", "parent": 91, "children": [93, 94], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 24}}, {"id": 93, "type": "identifier", "text": "ArmCollisionDetector", "parent": 92, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 22}}, {"id": 94, "type": "argument_list", "text": "()", "parent": 92, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 24}}, {"id": 95, "type": "unary_expression", "text": "~ArmCollisionDetector()", "parent": 39, "children": [96, 97], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 25}}, {"id": 96, "type": "~", "text": "~", "parent": 95, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 3}}, {"id": 97, "type": "call_expression", "text": "ArmCollisionDetector()", "parent": 95, "children": [98, 99], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 25}}, {"id": 98, "type": "identifier", "text": "ArmCollisionDetector", "parent": 97, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 23}}, {"id": 99, "type": "argument_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 25}}, {"id": 100, "type": "declaration", "text": "void execute();", "parent": 39, "children": [101, 102], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 17}}, {"id": 101, "type": "primitive_type", "text": "void", "parent": 100, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 102, "type": "function_declarator", "text": "execute()", "parent": 100, "children": [103, 104], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 16}}, {"id": 103, "type": "identifier", "text": "execute", "parent": 102, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 14}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 16}}, {"id": 105, "type": "labeled_statement", "text": "public:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList(\"ArmCollisionDetector\") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n }", "parent": 39, "children": [106], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 66, "column": 3}}, {"id": 106, "type": "ERROR", "text": "class Parameter : public ParameterList", "parent": 105, "children": [107, 109], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 40}}, {"id": 107, "type": "ERROR", "text": "Parameter : public", "parent": 106, "children": [108], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 26}}, {"id": 108, "type": "identifier", "text": "Parameter", "parent": 107, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 17}}, {"id": 109, "type": "identifier", "text": "ParameterList", "parent": 106, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 40}}, {"id": 110, "type": "labeled_statement", "text": "public:\n Parameter() : ParameterList(\"ArmCollisionDetector\") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }", "parent": 105, "children": [111], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 62, "column": 5}}, {"id": 111, "type": "ERROR", "text": "Parameter() : ParameterList(\"ArmCollisionDetector\")", "parent": 110, "children": [112, 115], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 55}}, {"id": 112, "type": "call_expression", "text": "Parameter()", "parent": 111, "children": [113, 114], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 15}}, {"id": 113, "type": "identifier", "text": "Parameter", "parent": 112, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 13}}, {"id": 114, "type": "argument_list", "text": "()", "parent": 112, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 15}}, {"id": 115, "type": "call_expression", "text": "ParameterList(\"ArmCollisionDetector\")", "parent": 111, "children": [116, 117], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 55}}, {"id": 116, "type": "identifier", "text": "ParameterList", "parent": 115, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 31}}, {"id": 117, "type": "argument_list", "text": "(\"ArmCollisionDetector\")", "parent": 115, "children": [118], "start_point": {"row": 57, "column": 31}, "end_point": {"row": 57, "column": 55}}, {"id": 118, "type": "string_literal", "text": "\"ArmCollisionDetector\"", "parent": 117, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 54}}, {"id": 119, "type": "assignment_expression", "text": "PARAMETER_REGISTER(maxErrorStand) = 0.02", "parent": 110, "children": [120, 124, 125], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 46}}, {"id": 120, "type": "call_expression", "text": "PARAMETER_REGISTER(maxErrorStand)", "parent": 119, "children": [121, 122], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 39}}, {"id": 121, "type": "identifier", "text": "PARAMETER_REGISTER", "parent": 120, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 24}}, {"id": 122, "type": "argument_list", "text": "(maxErrorStand)", "parent": 120, "children": [123], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 39}}, {"id": 123, "type": "identifier", "text": "maxErrorStand", "parent": 122, "children": [], "start_point": {"row": 59, "column": 25}, "end_point": {"row": 59, "column": 38}}, {"id": 124, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 41}}, {"id": 125, "type": "number_literal", "text": "0.02", "parent": 119, "children": [], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 46}}, {"id": 126, "type": "assignment_expression", "text": "PARAMETER_REGISTER(maxErrorWalk) = 0.05", "parent": 110, "children": [127, 131, 132], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 45}}, {"id": 127, "type": "call_expression", "text": "PARAMETER_REGISTER(maxErrorWalk)", "parent": 126, "children": [128, 129], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 38}}, {"id": 128, "type": "identifier", "text": "PARAMETER_REGISTER", "parent": 127, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 24}}, {"id": 129, "type": "argument_list", "text": "(maxErrorWalk)", "parent": 127, "children": [130], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 38}}, {"id": 130, "type": "identifier", "text": "maxErrorWalk", "parent": 129, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 37}}, {"id": 131, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 40}}, {"id": 132, "type": "number_literal", "text": "0.05", "parent": 126, "children": [], "start_point": {"row": 60, "column": 41}, "end_point": {"row": 60, "column": 45}}, {"id": 133, "type": "call_expression", "text": "syncWithConfig()", "parent": 110, "children": [134, 135], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 22}}, {"id": 134, "type": "identifier", "text": "syncWithConfig", "parent": 133, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 20}}, {"id": 135, "type": "argument_list", "text": "()", "parent": 133, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 22}}, {"id": 136, "type": "declaration", "text": "double maxErrorStand;", "parent": 105, "children": [137, 138], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 25}}, {"id": 137, "type": "primitive_type", "text": "double", "parent": 136, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 10}}, {"id": 138, "type": "identifier", "text": "maxErrorStand", "parent": 136, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 24}}, {"id": 139, "type": "declaration", "text": "double maxErrorWalk;", "parent": 105, "children": [140, 141], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 24}}, {"id": 140, "type": "primitive_type", "text": "double", "parent": 139, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 10}}, {"id": 141, "type": "identifier", "text": "maxErrorWalk", "parent": 139, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 23}}, {"id": 142, "type": "identifier", "text": "params", "parent": 39, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 10}}, {"id": 143, "type": "labeled_statement", "text": "private:\n RingBufferWithSum<double, 100> collisionBufferLeft;", "parent": 39, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 53}}, {"id": 144, "type": "comma_expression", "text": "RingBufferWithSum<double, 100> collisionBufferLeft", "parent": 143, "children": [145, 149], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 52}}, {"id": 145, "type": "binary_expression", "text": "RingBufferWithSum<double", "parent": 144, "children": [146, 147, 148], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 26}}, {"id": 146, "type": "identifier", "text": "RingBufferWithSum", "parent": 145, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 19}}, {"id": 147, "type": "<", "text": "<", "parent": 145, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 20}}, {"id": 148, "type": "identifier", "text": "double", "parent": 145, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 26}}, {"id": 149, "type": "binary_expression", "text": "100> collisionBufferLeft", "parent": 144, "children": [150, 151, 152], "start_point": {"row": 70, "column": 28}, "end_point": {"row": 70, "column": 52}}, {"id": 150, "type": "number_literal", "text": "100", "parent": 149, "children": [], "start_point": {"row": 70, "column": 28}, "end_point": {"row": 70, "column": 31}}, {"id": 151, "type": ">", "text": ">", "parent": 149, "children": [], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 32}}, {"id": 152, "type": "identifier", "text": "collisionBufferLeft", "parent": 149, "children": [], "start_point": {"row": 70, "column": 33}, "end_point": {"row": 70, "column": 52}}, {"id": 153, "type": "comma_expression", "text": "RingBufferWithSum<double, 100> collisionBufferRight", "parent": 39, "children": [154, 158], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 53}}, {"id": 154, "type": "binary_expression", "text": "RingBufferWithSum<double", "parent": 153, "children": [155, 156, 157], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 26}}, {"id": 155, "type": "identifier", "text": "RingBufferWithSum", "parent": 154, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 19}}, {"id": 156, "type": "<", "text": "<", "parent": 154, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 20}}, {"id": 157, "type": "identifier", "text": "double", "parent": 154, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 26}}, {"id": 158, "type": "binary_expression", "text": "100> collisionBufferRight", "parent": 153, "children": [159, 160, 161], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 53}}, {"id": 159, "type": "number_literal", "text": "100", "parent": 158, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 31}}, {"id": 160, "type": ">", "text": ">", "parent": 158, "children": [], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 32}}, {"id": 161, "type": "identifier", "text": "collisionBufferRight", "parent": 158, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 53}}, {"id": 162, "type": "comma_expression", "text": "RingBuffer<double, 4> jointDataBufferLeft", "parent": 39, "children": [163, 167], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 43}}, {"id": 163, "type": "binary_expression", "text": "RingBuffer<double", "parent": 162, "children": [164, 165, 166], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 19}}, {"id": 164, "type": "identifier", "text": "RingBuffer", "parent": 163, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 12}}, {"id": 165, "type": "<", "text": "<", "parent": 163, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 13}}, {"id": 166, "type": "identifier", "text": "double", "parent": 163, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 19}}, {"id": 167, "type": "binary_expression", "text": "4> jointDataBufferLeft", "parent": 162, "children": [168, 169, 170], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 43}}, {"id": 168, "type": "number_literal", "text": "4", "parent": 167, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 22}}, {"id": 169, "type": ">", "text": ">", "parent": 167, "children": [], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 23}}, {"id": 170, "type": "identifier", "text": "jointDataBufferLeft", "parent": 167, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 43}}, {"id": 171, "type": "comma_expression", "text": "RingBuffer<double, 4> jointDataBufferRight", "parent": 39, "children": [172, 176], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 44}}, {"id": 172, "type": "binary_expression", "text": "RingBuffer<double", "parent": 171, "children": [173, 174, 175], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 19}}, {"id": 173, "type": "identifier", "text": "RingBuffer", "parent": 172, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 12}}, {"id": 174, "type": "<", "text": "<", "parent": 172, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 13}}, {"id": 175, "type": "identifier", "text": "double", "parent": 172, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 19}}, {"id": 176, "type": "binary_expression", "text": "4> jointDataBufferRight", "parent": 171, "children": [177, 178, 179], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 44}}, {"id": 177, "type": "number_literal", "text": "4", "parent": 176, "children": [], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 22}}, {"id": 178, "type": ">", "text": ">", "parent": 176, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 23}}, {"id": 179, "type": "identifier", "text": "jointDataBufferRight", "parent": 176, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 44}}, {"id": 180, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39, 44, 102], "variables": [47, 100, 136, 139], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37], "modules": [], "enums": []}, "statements": {"expressions": [49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 92, 95, 97, 112, 115, 120, 127, 133, 144, 145, 149, 153, 154, 158, 162, 163, 167, 171, 172, 176], "assignments": [119, 126], "loops": [], "conditionals": [0, 1, 2, 5, 40, 41, 43, 45, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 89, 90, 93, 98, 103, 108, 109, 113, 116, 121, 123, 128, 130, 134, 138, 141, 142, 146, 148, 152, 155, 157, 161, 164, 166, 170, 173, 175, 179, 180], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 118, 125, 132, 150, 159, 168, 177], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "ArmCollisionDetector", "text_snippet": "BEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(De"}, {"node_id": 44, "universal_type": "function", "name": "ArmCollisionDetector", "text_snippet": "PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n R"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "execute()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <ModuleFramework/Module.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <Representations/Infrastructure/FrameInfo.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <Representations/Infrastructure/JointData.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"Representations/Motion/MotionStatus.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"Representations/Motion/Request/MotionRequest.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"Representations/Motion/CollisionPercept.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <Tools/DataStructures/RingBufferWithSum.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"Tools/Debug/DebugRequest.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"Tools/Debug/DebugPlot.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"Tools/Debug/DebugModify.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"Tools/Debug/DebugParameterList.h\"\n"}, {"node_id": 37, "text": "#include"}]}, "original_source_code": "/**\n* @file ArmCollisionDetector.h\n*\n* @author <a href=\"mailto:<EMAIL>\"><NAME></a>\n* ArmCollisionDetector: detect collisions with arms based on joint position deviation.\n*/\n\n#ifndef _ArmCollisionDetector_H_\n#define _ArmCollisionDetector_H_\n\n#include <ModuleFramework/Module.h>\n\n// representations\n#include <Representations/Infrastructure/FrameInfo.h>\n#include <Representations/Infrastructure/JointData.h>\n\n#include \"Representations/Motion/MotionStatus.h\"\n#include \"Representations/Motion/Request/MotionRequest.h\"\n#include \"Representations/Motion/CollisionPercept.h\"\n\n// tools\n#include <Tools/DataStructures/RingBufferWithSum.h>\n\n// debug\n#include \"Tools/Debug/DebugRequest.h\"\n#include \"Tools/Debug/DebugPlot.h\"\n#include \"Tools/Debug/DebugModify.h\"\n#include \"Tools/Debug/DebugParameterList.h\"\n\n\nBEGIN_DECLARE_MODULE(ArmCollisionDetector)\n PROVIDE(DebugRequest)\n PROVIDE(DebugPlot)\n PROVIDE(DebugModify)\n PROVIDE(DebugParameterList)\n\n REQUIRE(FrameInfo)\n REQUIRE(MotorJointData)\n REQUIRE(SensorJointData)\n REQUIRE(MotionStatus)\n REQUIRE(MotionRequest)\n\n PROVIDE(CollisionPercept)\nEND_DECLARE_MODULE(ArmCollisionDetector)\n\nclass ArmCollisionDetector : private ArmCollisionDetectorBase\n{\npublic:\n ArmCollisionDetector();\n ~ArmCollisionDetector();\n\n void execute();\n\npublic:\n class Parameter : public ParameterList\n {\n public:\n Parameter() : ParameterList(\"ArmCollisionDetector\") \n {\n PARAMETER_REGISTER(maxErrorStand) = 0.02;\n PARAMETER_REGISTER(maxErrorWalk) = 0.05;\n syncWithConfig();\n }\n\n double maxErrorStand;\n double maxErrorWalk;\n } params;\n\n\nprivate:\n RingBufferWithSum<double, 100> collisionBufferLeft;\n RingBufferWithSum<double, 100> collisionBufferRight;\n\n RingBuffer<double, 4> jointDataBufferLeft;\n RingBuffer<double, 4> jointDataBufferRight;\n //naoth::FrameInfo frameWhenArmsBack;\n //ArmMotionRequest::ArmMotionID armStatus;\n};\n\n#endif //_ArmCollisionDetector_H_\n"}
251
c
#pragma once #include "MatrixHelper.h" #include <cstdint> namespace DX { class TextRenderer; enum class TextRenderer::AnchorPoint; } namespace DirectXGame { class GameMain; class Snake; enum class Snake::SnakeType; class ProgramHelper { public: struct PlayerConfig { std::string mName; std::uint32_t mBlocks; DirectX::XMFLOAT2 mDimension; DirectX::XMFLOAT2 mPosition; DirectX::XMFLOAT2 mHeading; Snake::SnakeType mType; DirectX::XMFLOAT4 mHeadColor; DirectX::XMFLOAT4 mBodyColor; DX::TextRenderer::AnchorPoint mScoreAnchorPoint; }; static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension); static float RandomFloat(float min, float max); static int32_t RandomInt(std::int32_t min, std::int32_t max); static void ToWideString(const std::string& source, std::wstring& dest); static std::wstring ToWideString(const std::string& source); static void Totring(const std::wstring& source, std::string& dest); static std::string ToString(const std::wstring& source); static const float Left; static const float Right; static const float Top; static const float Bottom; static const std::vector<PlayerConfig> PlayerConfigs; static bool IsDebugEnabled; private: static std::default_random_engine RandomGenerator; static std::uniform_real_distribution<float> RandomRealDistribution; static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution; friend GameMain; }; }
26.61
56
(translation_unit) "#pragma once \n \n#include "MatrixHelper.h" \n#include <cstdint> \n \nnamespace DX \n{ \n class TextRenderer; \n enum class TextRenderer::AnchorPoint; \n} \n \nnamespace DirectXGame \n{ \n class GameMain; \n class Snake; \n enum class Snake::SnakeType; \n \n class ProgramHelper \n { \n public: \n struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }; \n \n static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension); \n static float RandomFloat(float min, float max); \n static int32_t RandomInt(std::int32_t min, std::int32_t max); \n static void ToWideString(const std::string& source, std::wstring& dest); \n static std::wstring ToWideString(const std::string& source); \n static void Totring(const std::wstring& source, std::string& dest); \n static std::string ToString(const std::wstring& source); \n \n static const float Left; \n static const float Right; \n static const float Top; \n static const float Bottom; \n static const std::vector<PlayerConfig> PlayerConfigs; \n \n static bool IsDebugEnabled; \n private: \n static std::default_random_engine RandomGenerator; \n static std::uniform_real_distribution<float> RandomRealDistribution; \n static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution; \n \n friend GameMain; \n }; \n} \n" (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (preproc_include) "#include "MatrixHelper.h" \n" (#include) "#include" (string_literal) ""MatrixHelper.h"" (") """ (string_content) "MatrixHelper.h" (") """ (preproc_include) "#include <cstdint> \n" (#include) "#include" (system_lib_string) "<cstdint>" (function_definition) "namespace DX \n{ \n class TextRenderer; \n enum class TextRenderer::AnchorPoint; \n}" (type_identifier) "namespace" (identifier) "DX" (compound_statement) "{ \n class TextRenderer; \n enum class TextRenderer::AnchorPoint; \n}" ({) "{" (declaration) "class TextRenderer;" (type_identifier) "class" (identifier) "TextRenderer" (;) ";" (declaration) "enum class TextRenderer::AnchorPoint;" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "TextRenderer" (ERROR) "::AnchorPoint" (:) ":" (:) ":" (identifier) "AnchorPoint" (;) ";" (}) "}" (function_definition) "namespace DirectXGame \n{ \n class GameMain; \n class Snake; \n enum class Snake::SnakeType; \n \n class ProgramHelper \n { \n public: \n struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }; \n \n static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension); \n static float RandomFloat(float min, float max); \n static int32_t RandomInt(std::int32_t min, std::int32_t max); \n static void ToWideString(const std::string& source, std::wstring& dest); \n static std::wstring ToWideString(const std::string& source); \n static void Totring(const std::wstring& source, std::string& dest); \n static std::string ToString(const std::wstring& source); \n \n static const float Left; \n static const float Right; \n static const float Top; \n static const float Bottom; \n static const std::vector<PlayerConfig> PlayerConfigs; \n \n static bool IsDebugEnabled; \n private: \n static std::default_random_engine RandomGenerator; \n static std::uniform_real_distribution<float> RandomRealDistribution; \n static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution; \n \n friend GameMain; \n }; \n}" (type_identifier) "namespace" (identifier) "DirectXGame" (compound_statement) "{ \n class GameMain; \n class Snake; \n enum class Snake::SnakeType; \n \n class ProgramHelper \n { \n public: \n struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }; \n \n static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension); \n static float RandomFloat(float min, float max); \n static int32_t RandomInt(std::int32_t min, std::int32_t max); \n static void ToWideString(const std::string& source, std::wstring& dest); \n static std::wstring ToWideString(const std::string& source); \n static void Totring(const std::wstring& source, std::string& dest); \n static std::string ToString(const std::wstring& source); \n \n static const float Left; \n static const float Right; \n static const float Top; \n static const float Bottom; \n static const std::vector<PlayerConfig> PlayerConfigs; \n \n static bool IsDebugEnabled; \n private: \n static std::default_random_engine RandomGenerator; \n static std::uniform_real_distribution<float> RandomRealDistribution; \n static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution; \n \n friend GameMain; \n }; \n}" ({) "{" (declaration) "class GameMain;" (type_identifier) "class" (identifier) "GameMain" (;) ";" (declaration) "class Snake;" (type_identifier) "class" (identifier) "Snake" (;) ";" (declaration) "enum class Snake::SnakeType;" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (ERROR) "Snake::" (identifier) "Snake" (:) ":" (:) ":" (identifier) "SnakeType" (;) ";" (function_definition) "class ProgramHelper \n { \n public: \n struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }; \n \n static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension); \n static float RandomFloat(float min, float max); \n static int32_t RandomInt(std::int32_t min, std::int32_t max); \n static void ToWideString(const std::string& source, std::wstring& dest); \n static std::wstring ToWideString(const std::string& source); \n static void Totring(const std::wstring& source, std::string& dest); \n static std::string ToString(const std::wstring& source); \n \n static const float Left; \n static const float Right; \n static const float Top; \n static const float Bottom; \n static const std::vector<PlayerConfig> PlayerConfigs; \n \n static bool IsDebugEnabled; \n private: \n static std::default_random_engine RandomGenerator; \n static std::uniform_real_distribution<float> RandomRealDistribution; \n static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution; \n \n friend GameMain; \n }" (type_identifier) "class" (identifier) "ProgramHelper" (compound_statement) "{ \n public: \n struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }; \n \n static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension); \n static float RandomFloat(float min, float max); \n static int32_t RandomInt(std::int32_t min, std::int32_t max); \n static void ToWideString(const std::string& source, std::wstring& dest); \n static std::wstring ToWideString(const std::string& source); \n static void Totring(const std::wstring& source, std::string& dest); \n static std::string ToString(const std::wstring& source); \n \n static const float Left; \n static const float Right; \n static const float Top; \n static const float Bottom; \n static const std::vector<PlayerConfig> PlayerConfigs; \n \n static bool IsDebugEnabled; \n private: \n static std::default_random_engine RandomGenerator; \n static std::uniform_real_distribution<float> RandomRealDistribution; \n static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution; \n \n friend GameMain; \n }" ({) "{" (labeled_statement) "public: \n struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n };" (statement_identifier) "public" (:) ":" (declaration) "struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n };" (struct_specifier) "struct PlayerConfig \n { \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }" (struct) "struct" (type_identifier) "PlayerConfig" (field_declaration_list) "{ \n std::string mName; \n std::uint32_t mBlocks; \n DirectX::XMFLOAT2 mDimension; \n DirectX::XMFLOAT2 mPosition; \n DirectX::XMFLOAT2 mHeading; \n Snake::SnakeType mType; \n DirectX::XMFLOAT4 mHeadColor; \n DirectX::XMFLOAT4 mBodyColor; \n DX::TextRenderer::AnchorPoint mScoreAnchorPoint; \n }" ({) "{" (field_declaration) "std::string mName;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "mName" (;) ";" (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (field_declaration) "uint32_t mBlocks;" (primitive_type) "uint32_t" (field_identifier) "mBlocks" (;) ";" (field_declaration) "DirectX::XMFLOAT2 mDimension;" (type_identifier) "DirectX" (ERROR) "::XMFLOAT2" (:) ":" (:) ":" (field_identifier) "XMFLOAT2" (field_identifier) "mDimension" (;) ";" (field_declaration) "DirectX::XMFLOAT2 mPosition;" (type_identifier) "DirectX" (ERROR) "::XMFLOAT2" (:) ":" (:) ":" (field_identifier) "XMFLOAT2" (field_identifier) "mPosition" (;) ";" (field_declaration) "DirectX::XMFLOAT2 mHeading;" (type_identifier) "DirectX" (ERROR) "::XMFLOAT2" (:) ":" (:) ":" (field_identifier) "XMFLOAT2" (field_identifier) "mHeading" (;) ";" (field_declaration) "Snake::SnakeType mType;" (type_identifier) "Snake" (ERROR) "::SnakeType" (:) ":" (:) ":" (field_identifier) "SnakeType" (field_identifier) "mType" (;) ";" (field_declaration) "DirectX::XMFLOAT4 mHeadColor;" (type_identifier) "DirectX" (ERROR) "::XMFLOAT4" (:) ":" (:) ":" (field_identifier) "XMFLOAT4" (field_identifier) "mHeadColor" (;) ";" (field_declaration) "DirectX::XMFLOAT4 mBodyColor;" (type_identifier) "DirectX" (ERROR) "::XMFLOAT4" (:) ":" (:) ":" (field_identifier) "XMFLOAT4" (field_identifier) "mBodyColor" (;) ";" (field_declaration) "DX::TextRenderer::AnchorPoint mScoreAnchorPoint;" (type_identifier) "DX" (ERROR) "::" (:) ":" (:) ":" (field_identifier) "TextRenderer" (bitfield_clause) "::AnchorPoint mScoreAnchorPoint" (:) ":" (ERROR) ":AnchorPoint" (:) ":" (identifier) "AnchorPoint" (identifier) "mScoreAnchorPoint" (;) ";" (}) "}" (identifier) "" (;) ";" (declaration) "static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension);" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "DirectX" (ERROR) "::XMFLOAT2" (:) ":" (:) ":" (identifier) "XMFLOAT2" (function_declarator) "RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension)" (identifier) "RandomLocationInsideBorder" (parameter_list) "(const DirectX::XMFLOAT2& dimension)" (() "(" (parameter_declaration) "const DirectX::XMFLOAT2& dimension" (type_qualifier) "const" (const) "const" (type_identifier) "DirectX" (ERROR) "::XMFLOAT2&" (:) ":" (:) ":" (identifier) "XMFLOAT2" (&) "&" (identifier) "dimension" ()) ")" (;) ";" (declaration) "static float RandomFloat(float min, float max);" (storage_class_specifier) "static" (static) "static" (primitive_type) "float" (function_declarator) "RandomFloat(float min, float max)" (identifier) "RandomFloat" (parameter_list) "(float min, float max)" (() "(" (parameter_declaration) "float min" (primitive_type) "float" (identifier) "min" (,) "," (parameter_declaration) "float max" (primitive_type) "float" (identifier) "max" ()) ")" (;) ";" (declaration) "static int32_t RandomInt(std::int32_t min, std::int32_t max);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int32_t" (function_declarator) "RandomInt(std::int32_t min, std::int32_t max)" (identifier) "RandomInt" (parameter_list) "(std::int32_t min, std::int32_t max)" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (parameter_declaration) "int32_t min" (primitive_type) "int32_t" (identifier) "min" (,) "," (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (parameter_declaration) "int32_t max" (primitive_type) "int32_t" (identifier) "max" ()) ")" (;) ";" (declaration) "static void ToWideString(const std::string& source, std::wstring& dest);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "ToWideString(const std::string& source, std::wstring& dest)" (identifier) "ToWideString" (parameter_list) "(const std::string& source, std::wstring& dest)" (() "(" (parameter_declaration) "const std::string& source" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "source" (,) "," (parameter_declaration) "std::wstring& dest" (type_identifier) "std" (ERROR) "::wstring&" (:) ":" (:) ":" (identifier) "wstring" (&) "&" (identifier) "dest" ()) ")" (;) ";" (declaration) "static std::wstring ToWideString(const std::string& source);" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::wstring" (:) ":" (:) ":" (identifier) "wstring" (function_declarator) "ToWideString(const std::string& source)" (identifier) "ToWideString" (parameter_list) "(const std::string& source)" (() "(" (parameter_declaration) "const std::string& source" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "source" ()) ")" (;) ";" (declaration) "static void Totring(const std::wstring& source, std::string& dest);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "Totring(const std::wstring& source, std::string& dest)" (identifier) "Totring" (parameter_list) "(const std::wstring& source, std::string& dest)" (() "(" (parameter_declaration) "const std::wstring& source" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::wstring&" (:) ":" (:) ":" (identifier) "wstring" (&) "&" (identifier) "source" (,) "," (parameter_declaration) "std::string& dest" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "dest" ()) ")" (;) ";" (declaration) "static std::string ToString(const std::wstring& source);" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (function_declarator) "ToString(const std::wstring& source)" (identifier) "ToString" (parameter_list) "(const std::wstring& source)" (() "(" (parameter_declaration) "const std::wstring& source" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::wstring&" (:) ":" (:) ":" (identifier) "wstring" (&) "&" (identifier) "source" ()) ")" (;) ";" (declaration) "static const float Left;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "Left" (;) ";" (declaration) "static const float Right;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "Right" (;) ";" (declaration) "static const float Top;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "Top" (;) ";" (declaration) "static const float Bottom;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "Bottom" (;) ";" (declaration) "static const std::vector<PlayerConfig> PlayerConfigs;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<PlayerConfig>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "PlayerConfig" (>) ">" (identifier) "PlayerConfigs" (;) ";" (declaration) "static bool IsDebugEnabled;" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (identifier) "IsDebugEnabled" (;) ";" (labeled_statement) "private: \n static std::default_random_engine RandomGenerator;" (statement_identifier) "private" (ERROR) ": \n static std:" (:) ":" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (:) ":" (:) ":" (declaration) "default_random_engine RandomGenerator;" (type_identifier) "default_random_engine" (identifier) "RandomGenerator" (;) ";" (declaration) "static std::uniform_real_distribution<float> RandomRealDistribution;" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::uniform_real_distribution<float>" (:) ":" (:) ":" (identifier) "uniform_real_distribution" (<) "<" (primitive_type) "float" (>) ">" (identifier) "RandomRealDistribution" (;) ";" (declaration) "static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution;" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::uniform_int_distribution<std::uint32_t>" (:) ":" (:) ":" (identifier) "uniform_int_distribution" (<) "<" (identifier) "std" (:) ":" (:) ":" (primitive_type) "uint32_t" (>) ">" (identifier) "RandomIntDistribution" (;) ";" (declaration) "friend GameMain;" (type_identifier) "friend" (identifier) "GameMain" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
427
28
{"language": "c", "success": true, "metadata": {"lines": 56, "avg_line_length": 26.61, "nodes": 229, "errors": 0, "source_hash": "0f7f211dc37fae945267660fc64be70d32cbd571ddb672c93e0b72e11f9238a4", "categorized_nodes": 169}, "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 \"MatrixHelper.h\"\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": "string_literal", "text": "\"MatrixHelper.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <cstdint>\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": "<cstdint>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "function_definition", "text": "namespace DX\r\n{\r\n\tclass TextRenderer;\r\n\tenum class TextRenderer::AnchorPoint;\r\n}", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 11, "type": "identifier", "text": "DX", "parent": 9, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 12}}, {"id": 12, "type": "declaration", "text": "class TextRenderer;", "parent": 9, "children": [13], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 20}}, {"id": 13, "type": "identifier", "text": "TextRenderer", "parent": 12, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 19}}, {"id": 14, "type": "declaration", "text": "enum class TextRenderer::AnchorPoint;", "parent": 9, "children": [15, 17, 18], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 38}}, {"id": 15, "type": "enum_specifier", "text": "enum class", "parent": 14, "children": [16], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 11}}, {"id": 16, "type": "enum", "text": "enum", "parent": 15, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 5}}, {"id": 17, "type": "identifier", "text": "TextRenderer", "parent": 14, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 24}}, {"id": 18, "type": "ERROR", "text": "::AnchorPoint", "parent": 14, "children": [19], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 37}}, {"id": 19, "type": "identifier", "text": "AnchorPoint", "parent": 18, "children": [], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 37}}, {"id": 20, "type": "function_definition", "text": "namespace DirectXGame\r\n{\r\n\tclass GameMain;\r\n\tclass Snake;\r\n\tenum class Snake::SnakeType;\r\n\r\n\tclass ProgramHelper\r\n\t{\r\n\tpublic:\r\n\t\tstruct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDimension;\r\n\t\t\tDirectX::XMFLOAT2 mPosition;\r\n\t\t\tDirectX::XMFLOAT2 mHeading;\r\n\t\t\tSnake::SnakeType mType;\r\n\t\t\tDirectX::XMFLOAT4 mHeadColor;\r\n\t\t\tDirectX::XMFLOAT4 mBodyColor;\r\n\t\t\tDX::TextRenderer::AnchorPoint mScoreAnchorPoint;\r\n\t\t};\r\n\r\n\t\tstatic const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension);\r\n\t\tstatic float RandomFloat(float min, float max);\r\n\t\tstatic int32_t RandomInt(std::int32_t min, std::int32_t max);\r\n\t\tstatic void ToWideString(const std::string& source, std::wstring& dest);\r\n\t\tstatic std::wstring ToWideString(const std::string& source);\r\n\t\tstatic void Totring(const std::wstring& source, std::string& dest);\r\n\t\tstatic std::string ToString(const std::wstring& source);\r\n\r\n\t\tstatic const float Left;\r\n\t\tstatic const float Right;\r\n\t\tstatic const float Top;\r\n\t\tstatic const float Bottom;\r\n\t\tstatic const std::vector<PlayerConfig> PlayerConfigs;\r\n\r\n\t\tstatic bool IsDebugEnabled;\r\n\tprivate:\r\n\t\tstatic std::default_random_engine RandomGenerator;\r\n\t\tstatic std::uniform_real_distribution<float> RandomRealDistribution;\r\n\t\tstatic std::uniform_int_distribution<std::uint32_t> RandomIntDistribution;\r\n\r\n\t\tfriend GameMain;\r\n\t};\r\n}", "parent": null, "children": [21, 22], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 21, "type": "type_identifier", "text": "namespace", "parent": 20, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 22, "type": "identifier", "text": "DirectXGame", "parent": 20, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 21}}, {"id": 23, "type": "declaration", "text": "class GameMain;", "parent": 20, "children": [24], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 16}}, {"id": 24, "type": "identifier", "text": "GameMain", "parent": 23, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 15}}, {"id": 25, "type": "declaration", "text": "class Snake;", "parent": 20, "children": [26], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 13}}, {"id": 26, "type": "identifier", "text": "Snake", "parent": 25, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 12}}, {"id": 27, "type": "declaration", "text": "enum class Snake::SnakeType;", "parent": 20, "children": [28, 30, 32], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 29}}, {"id": 28, "type": "enum_specifier", "text": "enum class", "parent": 27, "children": [29], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 11}}, {"id": 29, "type": "enum", "text": "enum", "parent": 28, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 5}}, {"id": 30, "type": "ERROR", "text": "Snake::", "parent": 27, "children": [31], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 19}}, {"id": 31, "type": "identifier", "text": "Snake", "parent": 30, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 17}}, {"id": 32, "type": "identifier", "text": "SnakeType", "parent": 27, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 28}}, {"id": 33, "type": "function_definition", "text": "class ProgramHelper\r\n\t{\r\n\tpublic:\r\n\t\tstruct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDimension;\r\n\t\t\tDirectX::XMFLOAT2 mPosition;\r\n\t\t\tDirectX::XMFLOAT2 mHeading;\r\n\t\t\tSnake::SnakeType mType;\r\n\t\t\tDirectX::XMFLOAT4 mHeadColor;\r\n\t\t\tDirectX::XMFLOAT4 mBodyColor;\r\n\t\t\tDX::TextRenderer::AnchorPoint mScoreAnchorPoint;\r\n\t\t};\r\n\r\n\t\tstatic const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension);\r\n\t\tstatic float RandomFloat(float min, float max);\r\n\t\tstatic int32_t RandomInt(std::int32_t min, std::int32_t max);\r\n\t\tstatic void ToWideString(const std::string& source, std::wstring& dest);\r\n\t\tstatic std::wstring ToWideString(const std::string& source);\r\n\t\tstatic void Totring(const std::wstring& source, std::string& dest);\r\n\t\tstatic std::string ToString(const std::wstring& source);\r\n\r\n\t\tstatic const float Left;\r\n\t\tstatic const float Right;\r\n\t\tstatic const float Top;\r\n\t\tstatic const float Bottom;\r\n\t\tstatic const std::vector<PlayerConfig> PlayerConfigs;\r\n\r\n\t\tstatic bool IsDebugEnabled;\r\n\tprivate:\r\n\t\tstatic std::default_random_engine RandomGenerator;\r\n\t\tstatic std::uniform_real_distribution<float> RandomRealDistribution;\r\n\t\tstatic std::uniform_int_distribution<std::uint32_t> RandomIntDistribution;\r\n\r\n\t\tfriend GameMain;\r\n\t}", "parent": 20, "children": [34], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 54, "column": 2}}, {"id": 34, "type": "identifier", "text": "ProgramHelper", "parent": 33, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 20}}, {"id": 35, "type": "labeled_statement", "text": "public:\r\n\t\tstruct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDimension;\r\n\t\t\tDirectX::XMFLOAT2 mPosition;\r\n\t\t\tDirectX::XMFLOAT2 mHeading;\r\n\t\t\tSnake::SnakeType mType;\r\n\t\t\tDirectX::XMFLOAT4 mHeadColor;\r\n\t\t\tDirectX::XMFLOAT4 mBodyColor;\r\n\t\t\tDX::TextRenderer::AnchorPoint mScoreAnchorPoint;\r\n\t\t};", "parent": 33, "children": [36], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 36, "type": "declaration", "text": "struct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDimension;\r\n\t\t\tDirectX::XMFLOAT2 mPosition;\r\n\t\t\tDirectX::XMFLOAT2 mHeading;\r\n\t\t\tSnake::SnakeType mType;\r\n\t\t\tDirectX::XMFLOAT4 mHeadColor;\r\n\t\t\tDirectX::XMFLOAT4 mBodyColor;\r\n\t\t\tDX::TextRenderer::AnchorPoint mScoreAnchorPoint;\r\n\t\t};", "parent": 35, "children": [37, 87], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 31, "column": 4}}, {"id": 37, "type": "struct_specifier", "text": "struct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDimension;\r\n\t\t\tDirectX::XMFLOAT2 mPosition;\r\n\t\t\tDirectX::XMFLOAT2 mHeading;\r\n\t\t\tSnake::SnakeType mType;\r\n\t\t\tDirectX::XMFLOAT4 mHeadColor;\r\n\t\t\tDirectX::XMFLOAT4 mBodyColor;\r\n\t\t\tDX::TextRenderer::AnchorPoint mScoreAnchorPoint;\r\n\t\t}", "parent": 36, "children": [38, 39], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 31, "column": 3}}, {"id": 38, "type": "struct", "text": "struct", "parent": 37, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 8}}, {"id": 39, "type": "type_identifier", "text": "PlayerConfig", "parent": 37, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 21}}, {"id": 40, "type": "field_declaration", "text": "std::string mName;", "parent": 37, "children": [41, 42, 44], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 21}}, {"id": 41, "type": "type_identifier", "text": "std", "parent": 40, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 6}}, {"id": 42, "type": "ERROR", "text": "::string", "parent": 40, "children": [43], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 14}}, {"id": 43, "type": "field_identifier", "text": "string", "parent": 42, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 14}}, {"id": 44, "type": "field_identifier", "text": "mName", "parent": 40, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 20}}, {"id": 45, "type": "ERROR", "text": "std::", "parent": 37, "children": [46], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 8}}, {"id": 46, "type": "type_identifier", "text": "std", "parent": 45, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 6}}, {"id": 47, "type": "field_declaration", "text": "uint32_t mBlocks;", "parent": 37, "children": [48, 49], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 25}}, {"id": 48, "type": "primitive_type", "text": "uint32_t", "parent": 47, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 49, "type": "field_identifier", "text": "mBlocks", "parent": 47, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 24}}, {"id": 50, "type": "field_declaration", "text": "DirectX::XMFLOAT2 mDimension;", "parent": 37, "children": [51, 52, 54], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 32}}, {"id": 51, "type": "type_identifier", "text": "DirectX", "parent": 50, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 10}}, {"id": 52, "type": "ERROR", "text": "::XMFLOAT2", "parent": 50, "children": [53], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 20}}, {"id": 53, "type": "field_identifier", "text": "XMFLOAT2", "parent": 52, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 20}}, {"id": 54, "type": "field_identifier", "text": "mDimension", "parent": 50, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 31}}, {"id": 55, "type": "field_declaration", "text": "DirectX::XMFLOAT2 mPosition;", "parent": 37, "children": [56, 57, 59], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 31}}, {"id": 56, "type": "type_identifier", "text": "DirectX", "parent": 55, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 10}}, {"id": 57, "type": "ERROR", "text": "::XMFLOAT2", "parent": 55, "children": [58], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 20}}, {"id": 58, "type": "field_identifier", "text": "XMFLOAT2", "parent": 57, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 20}}, {"id": 59, "type": "field_identifier", "text": "mPosition", "parent": 55, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 30}}, {"id": 60, "type": "field_declaration", "text": "DirectX::XMFLOAT2 mHeading;", "parent": 37, "children": [61, 62, 64], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 30}}, {"id": 61, "type": "type_identifier", "text": "DirectX", "parent": 60, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 10}}, {"id": 62, "type": "ERROR", "text": "::XMFLOAT2", "parent": 60, "children": [63], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 20}}, {"id": 63, "type": "field_identifier", "text": "XMFLOAT2", "parent": 62, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 20}}, {"id": 64, "type": "field_identifier", "text": "mHeading", "parent": 60, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 29}}, {"id": 65, "type": "field_declaration", "text": "Snake::SnakeType mType;", "parent": 37, "children": [66, 67, 69], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 26}}, {"id": 66, "type": "type_identifier", "text": "Snake", "parent": 65, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 8}}, {"id": 67, "type": "ERROR", "text": "::SnakeType", "parent": 65, "children": [68], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 19}}, {"id": 68, "type": "field_identifier", "text": "SnakeType", "parent": 67, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 19}}, {"id": 69, "type": "field_identifier", "text": "mType", "parent": 65, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 25}}, {"id": 70, "type": "field_declaration", "text": "DirectX::XMFLOAT4 mHeadColor;", "parent": 37, "children": [71, 72, 74], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 32}}, {"id": 71, "type": "type_identifier", "text": "DirectX", "parent": 70, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 10}}, {"id": 72, "type": "ERROR", "text": "::XMFLOAT4", "parent": 70, "children": [73], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 20}}, {"id": 73, "type": "field_identifier", "text": "XMFLOAT4", "parent": 72, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 20}}, {"id": 74, "type": "field_identifier", "text": "mHeadColor", "parent": 70, "children": [], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 28, "column": 31}}, {"id": 75, "type": "field_declaration", "text": "DirectX::XMFLOAT4 mBodyColor;", "parent": 37, "children": [76, 77, 79], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 32}}, {"id": 76, "type": "type_identifier", "text": "DirectX", "parent": 75, "children": [], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 10}}, {"id": 77, "type": "ERROR", "text": "::XMFLOAT4", "parent": 75, "children": [78], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 20}}, {"id": 78, "type": "field_identifier", "text": "XMFLOAT4", "parent": 77, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 20}}, {"id": 79, "type": "field_identifier", "text": "mBodyColor", "parent": 75, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 31}}, {"id": 80, "type": "field_declaration", "text": "DX::TextRenderer::AnchorPoint mScoreAnchorPoint;", "parent": 37, "children": [81, 82, 83], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 51}}, {"id": 81, "type": "type_identifier", "text": "DX", "parent": 80, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 5}}, {"id": 82, "type": "field_identifier", "text": "TextRenderer", "parent": 80, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 19}}, {"id": 83, "type": "bitfield_clause", "text": "::AnchorPoint mScoreAnchorPoint", "parent": 80, "children": [84, 86], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 50}}, {"id": 84, "type": "ERROR", "text": ":AnchorPoint", "parent": 83, "children": [85], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 32}}, {"id": 85, "type": "identifier", "text": "AnchorPoint", "parent": 84, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 32}}, {"id": 86, "type": "identifier", "text": "mScoreAnchorPoint", "parent": 83, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 50}}, {"id": 87, "type": "identifier", "text": "", "parent": 36, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 3}}, {"id": 88, "type": "declaration", "text": "static const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension);", "parent": 33, "children": [89, 90, 92], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 96}}, {"id": 89, "type": "type_identifier", "text": "DirectX", "parent": 88, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 22}}, {"id": 90, "type": "ERROR", "text": "::XMFLOAT2", "parent": 88, "children": [91], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 32}}, {"id": 91, "type": "identifier", "text": "XMFLOAT2", "parent": 90, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 32}}, {"id": 92, "type": "function_declarator", "text": "RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension)", "parent": 88, "children": [93, 94], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 95}}, {"id": 93, "type": "identifier", "text": "RandomLocationInsideBorder", "parent": 92, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 59}}, {"id": 94, "type": "parameter_list", "text": "(const DirectX::XMFLOAT2& dimension)", "parent": 92, "children": [95], "start_point": {"row": 33, "column": 59}, "end_point": {"row": 33, "column": 95}}, {"id": 95, "type": "parameter_declaration", "text": "const DirectX::XMFLOAT2& dimension", "parent": 94, "children": [96, 97, 99], "start_point": {"row": 33, "column": 60}, "end_point": {"row": 33, "column": 94}}, {"id": 96, "type": "type_identifier", "text": "DirectX", "parent": 95, "children": [], "start_point": {"row": 33, "column": 66}, "end_point": {"row": 33, "column": 73}}, {"id": 97, "type": "ERROR", "text": "::XMFLOAT2&", "parent": 95, "children": [98], "start_point": {"row": 33, "column": 73}, "end_point": {"row": 33, "column": 84}}, {"id": 98, "type": "identifier", "text": "XMFLOAT2", "parent": 97, "children": [], "start_point": {"row": 33, "column": 75}, "end_point": {"row": 33, "column": 83}}, {"id": 99, "type": "identifier", "text": "dimension", "parent": 95, "children": [], "start_point": {"row": 33, "column": 85}, "end_point": {"row": 33, "column": 94}}, {"id": 100, "type": "declaration", "text": "static float RandomFloat(float min, float max);", "parent": 33, "children": [101, 102], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 49}}, {"id": 101, "type": "primitive_type", "text": "float", "parent": 100, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 14}}, {"id": 102, "type": "function_declarator", "text": "RandomFloat(float min, float max)", "parent": 100, "children": [103, 104], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 48}}, {"id": 103, "type": "identifier", "text": "RandomFloat", "parent": 102, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 26}}, {"id": 104, "type": "parameter_list", "text": "(float min, float max)", "parent": 102, "children": [105, 108], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 48}}, {"id": 105, "type": "parameter_declaration", "text": "float min", "parent": 104, "children": [106, 107], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 36}}, {"id": 106, "type": "primitive_type", "text": "float", "parent": 105, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 32}}, {"id": 107, "type": "identifier", "text": "min", "parent": 105, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 36}}, {"id": 108, "type": "parameter_declaration", "text": "float max", "parent": 104, "children": [109, 110], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 47}}, {"id": 109, "type": "primitive_type", "text": "float", "parent": 108, "children": [], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 43}}, {"id": 110, "type": "identifier", "text": "max", "parent": 108, "children": [], "start_point": {"row": 34, "column": 44}, "end_point": {"row": 34, "column": 47}}, {"id": 111, "type": "declaration", "text": "static int32_t RandomInt(std::int32_t min, std::int32_t max);", "parent": 33, "children": [112, 113], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 63}}, {"id": 112, "type": "primitive_type", "text": "int32_t", "parent": 111, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 16}}, {"id": 113, "type": "function_declarator", "text": "RandomInt(std::int32_t min, std::int32_t max)", "parent": 111, "children": [114, 115], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 62}}, {"id": 114, "type": "identifier", "text": "RandomInt", "parent": 113, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 26}}, {"id": 115, "type": "parameter_list", "text": "(std::int32_t min, std::int32_t max)", "parent": 113, "children": [116, 118, 121, 123], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 62}}, {"id": 116, "type": "ERROR", "text": "std::", "parent": 115, "children": [117], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 32}}, {"id": 117, "type": "identifier", "text": "std", "parent": 116, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 30}}, {"id": 118, "type": "parameter_declaration", "text": "int32_t min", "parent": 115, "children": [119, 120], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 43}}, {"id": 119, "type": "primitive_type", "text": "int32_t", "parent": 118, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 39}}, {"id": 120, "type": "identifier", "text": "min", "parent": 118, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 43}}, {"id": 121, "type": "ERROR", "text": "std::", "parent": 115, "children": [122], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 50}}, {"id": 122, "type": "type_identifier", "text": "std", "parent": 121, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 48}}, {"id": 123, "type": "parameter_declaration", "text": "int32_t max", "parent": 115, "children": [124, 125], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 61}}, {"id": 124, "type": "primitive_type", "text": "int32_t", "parent": 123, "children": [], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 57}}, {"id": 125, "type": "identifier", "text": "max", "parent": 123, "children": [], "start_point": {"row": 35, "column": 58}, "end_point": {"row": 35, "column": 61}}, {"id": 126, "type": "declaration", "text": "static void ToWideString(const std::string& source, std::wstring& dest);", "parent": 33, "children": [127, 128], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 74}}, {"id": 127, "type": "primitive_type", "text": "void", "parent": 126, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 13}}, {"id": 128, "type": "function_declarator", "text": "ToWideString(const std::string& source, std::wstring& dest)", "parent": 126, "children": [129, 130], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 73}}, {"id": 129, "type": "identifier", "text": "ToWideString", "parent": 128, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 26}}, {"id": 130, "type": "parameter_list", "text": "(const std::string& source, std::wstring& dest)", "parent": 128, "children": [131, 136], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 73}}, {"id": 131, "type": "parameter_declaration", "text": "const std::string& source", "parent": 130, "children": [132, 133, 135], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 52}}, {"id": 132, "type": "type_identifier", "text": "std", "parent": 131, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 36}}, {"id": 133, "type": "ERROR", "text": "::string&", "parent": 131, "children": [134], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 45}}, {"id": 134, "type": "identifier", "text": "string", "parent": 133, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 44}}, {"id": 135, "type": "identifier", "text": "source", "parent": 131, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 52}}, {"id": 136, "type": "parameter_declaration", "text": "std::wstring& dest", "parent": 130, "children": [137, 138, 140], "start_point": {"row": 36, "column": 54}, "end_point": {"row": 36, "column": 72}}, {"id": 137, "type": "type_identifier", "text": "std", "parent": 136, "children": [], "start_point": {"row": 36, "column": 54}, "end_point": {"row": 36, "column": 57}}, {"id": 138, "type": "ERROR", "text": "::wstring&", "parent": 136, "children": [139], "start_point": {"row": 36, "column": 57}, "end_point": {"row": 36, "column": 67}}, {"id": 139, "type": "identifier", "text": "wstring", "parent": 138, "children": [], "start_point": {"row": 36, "column": 59}, "end_point": {"row": 36, "column": 66}}, {"id": 140, "type": "identifier", "text": "dest", "parent": 136, "children": [], "start_point": {"row": 36, "column": 68}, "end_point": {"row": 36, "column": 72}}, {"id": 141, "type": "declaration", "text": "static std::wstring ToWideString(const std::string& source);", "parent": 33, "children": [142, 143, 145], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 62}}, {"id": 142, "type": "type_identifier", "text": "std", "parent": 141, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 12}}, {"id": 143, "type": "ERROR", "text": "::wstring", "parent": 141, "children": [144], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 21}}, {"id": 144, "type": "identifier", "text": "wstring", "parent": 143, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 21}}, {"id": 145, "type": "function_declarator", "text": "ToWideString(const std::string& source)", "parent": 141, "children": [146, 147], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 61}}, {"id": 146, "type": "identifier", "text": "ToWideString", "parent": 145, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 34}}, {"id": 147, "type": "parameter_list", "text": "(const std::string& source)", "parent": 145, "children": [148], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 61}}, {"id": 148, "type": "parameter_declaration", "text": "const std::string& source", "parent": 147, "children": [149, 150, 152], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 60}}, {"id": 149, "type": "type_identifier", "text": "std", "parent": 148, "children": [], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 44}}, {"id": 150, "type": "ERROR", "text": "::string&", "parent": 148, "children": [151], "start_point": {"row": 37, "column": 44}, "end_point": {"row": 37, "column": 53}}, {"id": 151, "type": "identifier", "text": "string", "parent": 150, "children": [], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 52}}, {"id": 152, "type": "identifier", "text": "source", "parent": 148, "children": [], "start_point": {"row": 37, "column": 54}, "end_point": {"row": 37, "column": 60}}, {"id": 153, "type": "declaration", "text": "static void Totring(const std::wstring& source, std::string& dest);", "parent": 33, "children": [154, 155], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 69}}, {"id": 154, "type": "primitive_type", "text": "void", "parent": 153, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 13}}, {"id": 155, "type": "function_declarator", "text": "Totring(const std::wstring& source, std::string& dest)", "parent": 153, "children": [156, 157], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 68}}, {"id": 156, "type": "identifier", "text": "Totring", "parent": 155, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 21}}, {"id": 157, "type": "parameter_list", "text": "(const std::wstring& source, std::string& dest)", "parent": 155, "children": [158, 163], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 68}}, {"id": 158, "type": "parameter_declaration", "text": "const std::wstring& source", "parent": 157, "children": [159, 160, 162], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 48}}, {"id": 159, "type": "type_identifier", "text": "std", "parent": 158, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 31}}, {"id": 160, "type": "ERROR", "text": "::wstring&", "parent": 158, "children": [161], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 38, "column": 41}}, {"id": 161, "type": "identifier", "text": "wstring", "parent": 160, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 40}}, {"id": 162, "type": "identifier", "text": "source", "parent": 158, "children": [], "start_point": {"row": 38, "column": 42}, "end_point": {"row": 38, "column": 48}}, {"id": 163, "type": "parameter_declaration", "text": "std::string& dest", "parent": 157, "children": [164, 165, 167], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 67}}, {"id": 164, "type": "type_identifier", "text": "std", "parent": 163, "children": [], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 53}}, {"id": 165, "type": "ERROR", "text": "::string&", "parent": 163, "children": [166], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 62}}, {"id": 166, "type": "identifier", "text": "string", "parent": 165, "children": [], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 61}}, {"id": 167, "type": "identifier", "text": "dest", "parent": 163, "children": [], "start_point": {"row": 38, "column": 63}, "end_point": {"row": 38, "column": 67}}, {"id": 168, "type": "declaration", "text": "static std::string ToString(const std::wstring& source);", "parent": 33, "children": [169, 170, 172], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 58}}, {"id": 169, "type": "type_identifier", "text": "std", "parent": 168, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 12}}, {"id": 170, "type": "ERROR", "text": "::string", "parent": 168, "children": [171], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 20}}, {"id": 171, "type": "identifier", "text": "string", "parent": 170, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 20}}, {"id": 172, "type": "function_declarator", "text": "ToString(const std::wstring& source)", "parent": 168, "children": [173, 174], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 57}}, {"id": 173, "type": "identifier", "text": "ToString", "parent": 172, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 29}}, {"id": 174, "type": "parameter_list", "text": "(const std::wstring& source)", "parent": 172, "children": [175], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 57}}, {"id": 175, "type": "parameter_declaration", "text": "const std::wstring& source", "parent": 174, "children": [176, 177, 179], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 56}}, {"id": 176, "type": "type_identifier", "text": "std", "parent": 175, "children": [], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 39}}, {"id": 177, "type": "ERROR", "text": "::wstring&", "parent": 175, "children": [178], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 49}}, {"id": 178, "type": "identifier", "text": "wstring", "parent": 177, "children": [], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 48}}, {"id": 179, "type": "identifier", "text": "source", "parent": 175, "children": [], "start_point": {"row": 39, "column": 50}, "end_point": {"row": 39, "column": 56}}, {"id": 180, "type": "declaration", "text": "static const float Left;", "parent": 33, "children": [181, 182], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 26}}, {"id": 181, "type": "primitive_type", "text": "float", "parent": 180, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 20}}, {"id": 182, "type": "identifier", "text": "Left", "parent": 180, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 25}}, {"id": 183, "type": "declaration", "text": "static const float Right;", "parent": 33, "children": [184, 185], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 27}}, {"id": 184, "type": "primitive_type", "text": "float", "parent": 183, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 20}}, {"id": 185, "type": "identifier", "text": "Right", "parent": 183, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 26}}, {"id": 186, "type": "declaration", "text": "static const float Top;", "parent": 33, "children": [187, 188], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 25}}, {"id": 187, "type": "primitive_type", "text": "float", "parent": 186, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 20}}, {"id": 188, "type": "identifier", "text": "Top", "parent": 186, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 24}}, {"id": 189, "type": "declaration", "text": "static const float Bottom;", "parent": 33, "children": [190, 191], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 28}}, {"id": 190, "type": "primitive_type", "text": "float", "parent": 189, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 20}}, {"id": 191, "type": "identifier", "text": "Bottom", "parent": 189, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 27}}, {"id": 192, "type": "declaration", "text": "static const std::vector<PlayerConfig> PlayerConfigs;", "parent": 33, "children": [193, 194, 199], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 55}}, {"id": 193, "type": "type_identifier", "text": "std", "parent": 192, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 18}}, {"id": 194, "type": "ERROR", "text": "::vector<PlayerConfig>", "parent": 192, "children": [195, 196, 197, 198], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 40}}, {"id": 195, "type": "identifier", "text": "vector", "parent": 194, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 26}}, {"id": 196, "type": "<", "text": "<", "parent": 194, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 27}}, {"id": 197, "type": "identifier", "text": "PlayerConfig", "parent": 194, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 39}}, {"id": 198, "type": ">", "text": ">", "parent": 194, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 40}}, {"id": 199, "type": "identifier", "text": "PlayerConfigs", "parent": 192, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 54}}, {"id": 200, "type": "declaration", "text": "static bool IsDebugEnabled;", "parent": 33, "children": [201, 202], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 29}}, {"id": 201, "type": "primitive_type", "text": "bool", "parent": 200, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 13}}, {"id": 202, "type": "identifier", "text": "IsDebugEnabled", "parent": 200, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 28}}, {"id": 203, "type": "labeled_statement", "text": "private:\r\n\t\tstatic std::default_random_engine RandomGenerator;", "parent": 33, "children": [204, 206], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 49, "column": 52}}, {"id": 204, "type": "ERROR", "text": ":\r\n\t\tstatic std:", "parent": 203, "children": [205], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 49, "column": 13}}, {"id": 205, "type": "type_identifier", "text": "std", "parent": 204, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 12}}, {"id": 206, "type": "declaration", "text": "default_random_engine RandomGenerator;", "parent": 203, "children": [207, 208], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 52}}, {"id": 207, "type": "type_identifier", "text": "default_random_engine", "parent": 206, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 35}}, {"id": 208, "type": "identifier", "text": "RandomGenerator", "parent": 206, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 51}}, {"id": 209, "type": "declaration", "text": "static std::uniform_real_distribution<float> RandomRealDistribution;", "parent": 33, "children": [210, 211, 216], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 70}}, {"id": 210, "type": "type_identifier", "text": "std", "parent": 209, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 12}}, {"id": 211, "type": "ERROR", "text": "::uniform_real_distribution<float>", "parent": 209, "children": [212, 213, 214, 215], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 46}}, {"id": 212, "type": "identifier", "text": "uniform_real_distribution", "parent": 211, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 39}}, {"id": 213, "type": "<", "text": "<", "parent": 211, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 214, "type": "primitive_type", "text": "float", "parent": 211, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 45}}, {"id": 215, "type": ">", "text": ">", "parent": 211, "children": [], "start_point": {"row": 50, "column": 45}, "end_point": {"row": 50, "column": 46}}, {"id": 216, "type": "identifier", "text": "RandomRealDistribution", "parent": 209, "children": [], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 69}}, {"id": 217, "type": "declaration", "text": "static std::uniform_int_distribution<std::uint32_t> RandomIntDistribution;", "parent": 33, "children": [218, 219, 225], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 76}}, {"id": 218, "type": "type_identifier", "text": "std", "parent": 217, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 12}}, {"id": 219, "type": "ERROR", "text": "::uniform_int_distribution<std::uint32_t>", "parent": 217, "children": [220, 221, 222, 223, 224], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 53}}, {"id": 220, "type": "identifier", "text": "uniform_int_distribution", "parent": 219, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 38}}, {"id": 221, "type": "<", "text": "<", "parent": 219, "children": [], "start_point": {"row": 51, "column": 38}, "end_point": {"row": 51, "column": 39}}, {"id": 222, "type": "identifier", "text": "std", "parent": 219, "children": [], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 42}}, {"id": 223, "type": "primitive_type", "text": "uint32_t", "parent": 219, "children": [], "start_point": {"row": 51, "column": 44}, "end_point": {"row": 51, "column": 52}}, {"id": 224, "type": ">", "text": ">", "parent": 219, "children": [], "start_point": {"row": 51, "column": 52}, "end_point": {"row": 51, "column": 53}}, {"id": 225, "type": "identifier", "text": "RandomIntDistribution", "parent": 217, "children": [], "start_point": {"row": 51, "column": 54}, "end_point": {"row": 51, "column": 75}}, {"id": 226, "type": "declaration", "text": "friend GameMain;", "parent": 33, "children": [227, 228], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 18}}, {"id": 227, "type": "type_identifier", "text": "friend", "parent": 226, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 8}}, {"id": 228, "type": "identifier", "text": "GameMain", "parent": 226, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 17}}]}, "node_categories": {"declarations": {"functions": [9, 20, 33, 92, 102, 113, 128, 145, 155, 172], "variables": [12, 14, 23, 25, 27, 36, 40, 47, 50, 55, 60, 65, 70, 75, 80, 88, 95, 100, 105, 108, 111, 118, 123, 126, 131, 136, 141, 148, 153, 158, 163, 168, 175, 180, 183, 186, 189, 192, 200, 206, 209, 217, 226], "classes": [37, 38], "imports": [3, 4, 6, 7], "modules": [], "enums": [15, 16, 28, 29]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [10, 11, 13, 17, 19, 21, 22, 24, 26, 31, 32, 34, 39, 41, 43, 44, 46, 49, 51, 53, 54, 56, 58, 59, 61, 63, 64, 66, 68, 69, 71, 73, 74, 76, 78, 79, 81, 82, 85, 86, 87, 89, 91, 93, 96, 98, 99, 103, 107, 110, 114, 117, 120, 122, 125, 129, 132, 134, 135, 137, 139, 140, 142, 144, 146, 149, 151, 152, 156, 159, 161, 162, 164, 166, 167, 169, 171, 173, 176, 178, 179, 182, 185, 188, 191, 193, 195, 197, 199, 202, 205, 207, 208, 210, 212, 216, 218, 220, 222, 225, 227, 228], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [83]}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "TextRenderer;", "text_snippet": "namespace DX\r\n{\r\n\tclass TextRenderer;\r\n\tenum class TextRenderer::AnchorPoint;\r\n}"}, {"node_id": 20, "universal_type": "function", "name": "GameMain;", "text_snippet": "namespace DirectXGame\r\n{\r\n\tclass GameMain;\r\n\tclass Snake;\r\n\tenum class Snake::SnakeType;\r\n\r\n\tclass P"}, {"node_id": 33, "universal_type": "function", "name": "ProgramHelper", "text_snippet": "class ProgramHelper\r\n\t{\r\n\tpublic:\r\n\t\tstruct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension)"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "RandomFloat(float min, float max)"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "RandomInt(std::int32_t min, std::int32_t max)"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "ToWideString(const std::string& source, std::wstring& dest)"}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "ToWideString(const std::string& source)"}, {"node_id": 155, "universal_type": "function", "name": "unknown", "text_snippet": "Totring(const std::wstring& source, std::string& dest)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "ToString(const std::wstring& source)"}], "class_declarations": [{"node_id": 37, "universal_type": "class", "name": "PlayerConfig", "text_snippet": "struct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDi"}, {"node_id": 38, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"MatrixHelper.h\"\r\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <cstdint>\r\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\r\n\r\n#include \"MatrixHelper.h\"\r\n#include <cstdint>\r\n\r\nnamespace DX\r\n{\r\n\tclass TextRenderer;\r\n\tenum class TextRenderer::AnchorPoint;\r\n}\r\n\r\nnamespace DirectXGame\r\n{\r\n\tclass GameMain;\r\n\tclass Snake;\r\n\tenum class Snake::SnakeType;\r\n\r\n\tclass ProgramHelper\r\n\t{\r\n\tpublic:\r\n\t\tstruct PlayerConfig\r\n\t\t{\r\n\t\t\tstd::string mName;\r\n\t\t\tstd::uint32_t mBlocks;\r\n\t\t\tDirectX::XMFLOAT2 mDimension;\r\n\t\t\tDirectX::XMFLOAT2 mPosition;\r\n\t\t\tDirectX::XMFLOAT2 mHeading;\r\n\t\t\tSnake::SnakeType mType;\r\n\t\t\tDirectX::XMFLOAT4 mHeadColor;\r\n\t\t\tDirectX::XMFLOAT4 mBodyColor;\r\n\t\t\tDX::TextRenderer::AnchorPoint mScoreAnchorPoint;\r\n\t\t};\r\n\r\n\t\tstatic const DirectX::XMFLOAT2 RandomLocationInsideBorder(const DirectX::XMFLOAT2& dimension);\r\n\t\tstatic float RandomFloat(float min, float max);\r\n\t\tstatic int32_t RandomInt(std::int32_t min, std::int32_t max);\r\n\t\tstatic void ToWideString(const std::string& source, std::wstring& dest);\r\n\t\tstatic std::wstring ToWideString(const std::string& source);\r\n\t\tstatic void Totring(const std::wstring& source, std::string& dest);\r\n\t\tstatic std::string ToString(const std::wstring& source);\r\n\r\n\t\tstatic const float Left;\r\n\t\tstatic const float Right;\r\n\t\tstatic const float Top;\r\n\t\tstatic const float Bottom;\r\n\t\tstatic const std::vector<PlayerConfig> PlayerConfigs;\r\n\r\n\t\tstatic bool IsDebugEnabled;\r\n\tprivate:\r\n\t\tstatic std::default_random_engine RandomGenerator;\r\n\t\tstatic std::uniform_real_distribution<float> RandomRealDistribution;\r\n\t\tstatic std::uniform_int_distribution<std::uint32_t> RandomIntDistribution;\r\n\r\n\t\tfriend GameMain;\r\n\t};\r\n}\r\n"}
252
c
// Copyright 2011 Google Inc. 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 NINJA_CLEAN_H_ #define NINJA_CLEAN_H_ #include <set> #include <string> #include "build.h" #include "dyndep.h" #include "build_log.h" struct State; struct Node; struct Rule; struct DiskInterface; struct Cleaner { /// Build a cleaner object with the given @a disk_interface Cleaner(State* state, const BuildConfig& config, DiskInterface* disk_interface); /// Clean the given @a target and all the file built for it. /// @return non-zero if an error occurs. int CleanTarget(Node* target); /// Clean the given target @a target. /// @return non-zero if an error occurs. int CleanTarget(const char* target); /// Clean the given target @a targets. /// @return non-zero if an error occurs. int CleanTargets(int target_count, char* targets[]); /// Clean all built files, except for files created by generator rules. /// @param generator If set, also clean files created by generator rules. /// @return non-zero if an error occurs. int CleanAll(bool generator = false); /// Clean all the file built with the given rule @a rule. /// @return non-zero if an error occurs. int CleanRule(const Rule* rule); /// Clean the file produced by the given @a rule. /// @return non-zero if an error occurs. int CleanRule(const char* rule); /// Clean the file produced by the given @a rules. /// @return non-zero if an error occurs. int CleanRules(int rule_count, char* rules[]); /// Clean the files produced by previous builds that are no longer in the /// manifest. /// @return non-zero if an error occurs. int CleanDead(const BuildLog::Entries& entries); /// @return the number of file cleaned. int cleaned_files_count() const { return cleaned_files_count_; } /// @return whether the cleaner is in verbose mode. bool IsVerbose() const { return (config_.verbosity != BuildConfig::QUIET && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run)); } private: /// Remove the file @a path. /// @return whether the file has been removed. int RemoveFile(const std::string& path); /// @returns whether the file @a path exists. bool FileExists(const std::string& path); void Report(const std::string& path); /// Remove the given @a path file only if it has not been already removed. void Remove(const std::string& path); /// @return whether the given @a path has already been removed. bool IsAlreadyRemoved(const std::string& path); /// Remove the depfile and rspfile for an Edge. void RemoveEdgeFiles(Edge* edge); /// Helper recursive method for CleanTarget(). void DoCleanTarget(Node* target); void PrintHeader(); void PrintFooter(); void DoCleanRule(const Rule* rule); void Reset(); /// Load dependencies from dyndep bindings. void LoadDyndeps(); State* state_; const BuildConfig& config_; DyndepLoader dyndep_loader_; std::set<std::string> removed_; std::set<Node*> cleaned_; int cleaned_files_count_; DiskInterface* disk_interface_; int status_; }; #endif // NINJA_CLEAN_H_
37.31
95
(translation_unit) "// Copyright 2011 Google Inc. All Rights 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#ifndef NINJA_CLEAN_H_\n#define NINJA_CLEAN_H_\n\n#include <set>\n#include <string>\n\n#include "build.h"\n#include "dyndep.h"\n#include "build_log.h"\n\nstruct State;\nstruct Node;\nstruct Rule;\nstruct DiskInterface;\n\nstruct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }\n\n /// @return whether the cleaner is in verbose mode.\n bool IsVerbose() const {\n return (config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run));\n }\n\n private:\n /// Remove the file @a path.\n /// @return whether the file has been removed.\n int RemoveFile(const std::string& path);\n /// @returns whether the file @a path exists.\n bool FileExists(const std::string& path);\n void Report(const std::string& path);\n\n /// Remove the given @a path file only if it has not been already removed.\n void Remove(const std::string& path);\n /// @return whether the given @a path has already been removed.\n bool IsAlreadyRemoved(const std::string& path);\n /// Remove the depfile and rspfile for an Edge.\n void RemoveEdgeFiles(Edge* edge);\n\n /// Helper recursive method for CleanTarget().\n void DoCleanTarget(Node* target);\n void PrintHeader();\n void PrintFooter();\n void DoCleanRule(const Rule* rule);\n void Reset();\n\n /// Load dependencies from dyndep bindings.\n void LoadDyndeps();\n\n State* state_;\n const BuildConfig& config_;\n DyndepLoader dyndep_loader_;\n std::set<std::string> removed_;\n std::set<Node*> cleaned_;\n int cleaned_files_count_;\n DiskInterface* disk_interface_;\n int status_;\n};\n\n#endif // NINJA_CLEAN_H_\n" (comment) "// Copyright 2011 Google Inc. All Rights Reserved." (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." (preproc_ifdef) "#ifndef NINJA_CLEAN_H_\n#define NINJA_CLEAN_H_\n\n#include <set>\n#include <string>\n\n#include "build.h"\n#include "dyndep.h"\n#include "build_log.h"\n\nstruct State;\nstruct Node;\nstruct Rule;\nstruct DiskInterface;\n\nstruct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }\n\n /// @return whether the cleaner is in verbose mode.\n bool IsVerbose() const {\n return (config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run));\n }\n\n private:\n /// Remove the file @a path.\n /// @return whether the file has been removed.\n int RemoveFile(const std::string& path);\n /// @returns whether the file @a path exists.\n bool FileExists(const std::string& path);\n void Report(const std::string& path);\n\n /// Remove the given @a path file only if it has not been already removed.\n void Remove(const std::string& path);\n /// @return whether the given @a path has already been removed.\n bool IsAlreadyRemoved(const std::string& path);\n /// Remove the depfile and rspfile for an Edge.\n void RemoveEdgeFiles(Edge* edge);\n\n /// Helper recursive method for CleanTarget().\n void DoCleanTarget(Node* target);\n void PrintHeader();\n void PrintFooter();\n void DoCleanRule(const Rule* rule);\n void Reset();\n\n /// Load dependencies from dyndep bindings.\n void LoadDyndeps();\n\n State* state_;\n const BuildConfig& config_;\n DyndepLoader dyndep_loader_;\n std::set<std::string> removed_;\n std::set<Node*> cleaned_;\n int cleaned_files_count_;\n DiskInterface* disk_interface_;\n int status_;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "NINJA_CLEAN_H_" (preproc_def) "#define NINJA_CLEAN_H_\n" (#define) "#define" (identifier) "NINJA_CLEAN_H_" (preproc_include) "#include <set>\n" (#include) "#include" (system_lib_string) "<set>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include "build.h"\n" (#include) "#include" (string_literal) ""build.h"" (") """ (string_content) "build.h" (") """ (preproc_include) "#include "dyndep.h"\n" (#include) "#include" (string_literal) ""dyndep.h"" (") """ (string_content) "dyndep.h" (") """ (preproc_include) "#include "build_log.h"\n" (#include) "#include" (string_literal) ""build_log.h"" (") """ (string_content) "build_log.h" (") """ (struct_specifier) "struct State" (struct) "struct" (type_identifier) "State" (;) ";" (struct_specifier) "struct Node" (struct) "struct" (type_identifier) "Node" (;) ";" (struct_specifier) "struct Rule" (struct) "struct" (type_identifier) "Rule" (;) ";" (struct_specifier) "struct DiskInterface" (struct) "struct" (type_identifier) "DiskInterface" (;) ";" (declaration) "struct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }\n\n /// @return whether the cleaner is in verbose mode.\n bool IsVerbose() const {\n return (config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run));" (struct_specifier) "struct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }" (struct) "struct" (type_identifier) "Cleaner" (field_declaration_list) "{\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }" ({) "{" (comment) "/// Build a cleaner object with the given @a disk_interface" (field_declaration) "Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);" (macro_type_specifier) "Cleaner(State*" (identifier) "Cleaner" (() "(" (type_descriptor) "State*" (type_identifier) "State" (abstract_pointer_declarator) "*" (*) "*" ()) "" (field_identifier) "state" (,) "," (ERROR) "const BuildConfig&" (field_identifier) "const" (identifier) "BuildConfig" (&) "&" (field_identifier) "config" (,) "," (ERROR) "DiskInterface" (field_identifier) "DiskInterface" (pointer_declarator) "* disk_interface" (*) "*" (field_identifier) "disk_interface" (ERROR) ")" ()) ")" (;) ";" (comment) "/// Clean the given @a target and all the file built for it." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanTarget(Node* target);" (primitive_type) "int" (function_declarator) "CleanTarget(Node* target)" (field_identifier) "CleanTarget" (parameter_list) "(Node* target)" (() "(" (parameter_declaration) "Node* target" (type_identifier) "Node" (pointer_declarator) "* target" (*) "*" (identifier) "target" ()) ")" (;) ";" (comment) "/// Clean the given target @a target." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanTarget(const char* target);" (primitive_type) "int" (function_declarator) "CleanTarget(const char* target)" (field_identifier) "CleanTarget" (parameter_list) "(const char* target)" (() "(" (parameter_declaration) "const char* target" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* target" (*) "*" (identifier) "target" ()) ")" (;) ";" (comment) "/// Clean the given target @a targets." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanTargets(int target_count, char* targets[]);" (primitive_type) "int" (function_declarator) "CleanTargets(int target_count, char* targets[])" (field_identifier) "CleanTargets" (parameter_list) "(int target_count, char* targets[])" (() "(" (parameter_declaration) "int target_count" (primitive_type) "int" (identifier) "target_count" (,) "," (parameter_declaration) "char* targets[]" (primitive_type) "char" (pointer_declarator) "* targets[]" (*) "*" (array_declarator) "targets[]" (identifier) "targets" ([) "[" (]) "]" ()) ")" (;) ";" (comment) "/// Clean all built files, except for files created by generator rules." (comment) "/// @param generator If set, also clean files created by generator rules." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanAll(bool generator = false);" (primitive_type) "int" (function_declarator) "CleanAll(bool generator = false)" (field_identifier) "CleanAll" (parameter_list) "(bool generator = false)" (() "(" (parameter_declaration) "bool generator" (primitive_type) "bool" (identifier) "generator" (ERROR) "= false" (=) "=" (false) "false" ()) ")" (;) ";" (comment) "/// Clean all the file built with the given rule @a rule." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanRule(const Rule* rule);" (primitive_type) "int" (function_declarator) "CleanRule(const Rule* rule)" (field_identifier) "CleanRule" (parameter_list) "(const Rule* rule)" (() "(" (parameter_declaration) "const Rule* rule" (type_qualifier) "const" (const) "const" (type_identifier) "Rule" (pointer_declarator) "* rule" (*) "*" (identifier) "rule" ()) ")" (;) ";" (comment) "/// Clean the file produced by the given @a rule." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanRule(const char* rule);" (primitive_type) "int" (function_declarator) "CleanRule(const char* rule)" (field_identifier) "CleanRule" (parameter_list) "(const char* rule)" (() "(" (parameter_declaration) "const char* rule" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* rule" (*) "*" (identifier) "rule" ()) ")" (;) ";" (comment) "/// Clean the file produced by the given @a rules." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanRules(int rule_count, char* rules[]);" (primitive_type) "int" (function_declarator) "CleanRules(int rule_count, char* rules[])" (field_identifier) "CleanRules" (parameter_list) "(int rule_count, char* rules[])" (() "(" (parameter_declaration) "int rule_count" (primitive_type) "int" (identifier) "rule_count" (,) "," (parameter_declaration) "char* rules[]" (primitive_type) "char" (pointer_declarator) "* rules[]" (*) "*" (array_declarator) "rules[]" (identifier) "rules" ([) "[" (]) "]" ()) ")" (;) ";" (comment) "/// Clean the files produced by previous builds that are no longer in the" (comment) "/// manifest." (comment) "/// @return non-zero if an error occurs." (field_declaration) "int CleanDead(const BuildLog::Entries& entries);" (primitive_type) "int" (field_identifier) "CleanDead" (ERROR) "(const BuildLog:" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "BuildLog" (:) ":" (bitfield_clause) ":Entries& entries" (:) ":" (binary_expression) "Entries& entries" (identifier) "Entries" (&) "&" (identifier) "entries" (ERROR) ")" ()) ")" (;) ";" (comment) "/// @return the number of file cleaned." (field_declaration) "int cleaned_files_count() const {\n return cleaned_files_count_;" (primitive_type) "int" (function_declarator) "cleaned_files_count()" (field_identifier) "cleaned_files_count" (parameter_list) "()" (() "(" ()) ")" (ERROR) "const {\n return cleaned_files_count_" (identifier) "const" ({) "{" (return) "return" (identifier) "cleaned_files_count_" (;) ";" (}) "}" (comment) "/// @return whether the cleaner is in verbose mode." (ERROR) "bool IsVerbose() const {\n return" (identifier) "bool" (function_declarator) "IsVerbose()" (identifier) "IsVerbose" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" ({) "{" (return) "return" (parenthesized_declarator) "(config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run))" (() "(" (ERROR) "config_.verbosity != BuildConfig::" (identifier) "config_" (.) "." (identifier) "verbosity" (!=) "!=" (identifier) "BuildConfig" (:) ":" (:) ":" (function_declarator) "QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run)" (identifier) "QUIET" (ERROR) "&&" (&&) "&&" (parameter_list) "(config_.verbosity == BuildConfig::VERBOSE || config_.dry_run)" (() "(" (parameter_declaration) "config_.verbosity == BuildConfig::VERBOSE || config_.dry_run" (type_identifier) "config_" (ERROR) ".verbosity == BuildConfig::VERBOSE || config_." (.) "." (identifier) "verbosity" (==) "==" (identifier) "BuildConfig" (:) ":" (:) ":" (identifier) "VERBOSE" (||) "||" (identifier) "config_" (.) "." (identifier) "dry_run" ()) ")" ()) ")" (;) ";" (ERROR) "}" (}) "}" (labeled_statement) "private:\n /// Remove the file @a path.\n /// @return whether the file has been removed.\n int RemoveFile(const std::string& path);" (statement_identifier) "private" (:) ":" (comment) "/// Remove the file @a path." (comment) "/// @return whether the file has been removed." (declaration) "int RemoveFile(const std::string& path);" (primitive_type) "int" (function_declarator) "RemoveFile(const std::string& path)" (identifier) "RemoveFile" (parameter_list) "(const std::string& path)" (() "(" (parameter_declaration) "const std::string& path" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "path" ()) ")" (;) ";" (comment) "/// @returns whether the file @a path exists." (declaration) "bool FileExists(const std::string& path);" (primitive_type) "bool" (function_declarator) "FileExists(const std::string& path)" (identifier) "FileExists" (parameter_list) "(const std::string& path)" (() "(" (parameter_declaration) "const std::string& path" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "path" ()) ")" (;) ";" (declaration) "void Report(const std::string& path);" (primitive_type) "void" (function_declarator) "Report(const std::string& path)" (identifier) "Report" (parameter_list) "(const std::string& path)" (() "(" (parameter_declaration) "const std::string& path" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "path" ()) ")" (;) ";" (comment) "/// Remove the given @a path file only if it has not been already removed." (declaration) "void Remove(const std::string& path);" (primitive_type) "void" (function_declarator) "Remove(const std::string& path)" (identifier) "Remove" (parameter_list) "(const std::string& path)" (() "(" (parameter_declaration) "const std::string& path" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "path" ()) ")" (;) ";" (comment) "/// @return whether the given @a path has already been removed." (declaration) "bool IsAlreadyRemoved(const std::string& path);" (primitive_type) "bool" (function_declarator) "IsAlreadyRemoved(const std::string& path)" (identifier) "IsAlreadyRemoved" (parameter_list) "(const std::string& path)" (() "(" (parameter_declaration) "const std::string& path" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "path" ()) ")" (;) ";" (comment) "/// Remove the depfile and rspfile for an Edge." (declaration) "void RemoveEdgeFiles(Edge* edge);" (primitive_type) "void" (function_declarator) "RemoveEdgeFiles(Edge* edge)" (identifier) "RemoveEdgeFiles" (parameter_list) "(Edge* edge)" (() "(" (parameter_declaration) "Edge* edge" (type_identifier) "Edge" (pointer_declarator) "* edge" (*) "*" (identifier) "edge" ()) ")" (;) ";" (comment) "/// Helper recursive method for CleanTarget()." (declaration) "void DoCleanTarget(Node* target);" (primitive_type) "void" (function_declarator) "DoCleanTarget(Node* target)" (identifier) "DoCleanTarget" (parameter_list) "(Node* target)" (() "(" (parameter_declaration) "Node* target" (type_identifier) "Node" (pointer_declarator) "* target" (*) "*" (identifier) "target" ()) ")" (;) ";" (declaration) "void PrintHeader();" (primitive_type) "void" (function_declarator) "PrintHeader()" (identifier) "PrintHeader" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void PrintFooter();" (primitive_type) "void" (function_declarator) "PrintFooter()" (identifier) "PrintFooter" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void DoCleanRule(const Rule* rule);" (primitive_type) "void" (function_declarator) "DoCleanRule(const Rule* rule)" (identifier) "DoCleanRule" (parameter_list) "(const Rule* rule)" (() "(" (parameter_declaration) "const Rule* rule" (type_qualifier) "const" (const) "const" (type_identifier) "Rule" (pointer_declarator) "* rule" (*) "*" (identifier) "rule" ()) ")" (;) ";" (declaration) "void Reset();" (primitive_type) "void" (function_declarator) "Reset()" (identifier) "Reset" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// Load dependencies from dyndep bindings." (declaration) "void LoadDyndeps();" (primitive_type) "void" (function_declarator) "LoadDyndeps()" (identifier) "LoadDyndeps" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "State* state_;" (type_identifier) "State" (pointer_declarator) "* state_" (*) "*" (identifier) "state_" (;) ";" (declaration) "const BuildConfig& config_;" (type_qualifier) "const" (const) "const" (type_identifier) "BuildConfig" (ERROR) "&" (&) "&" (identifier) "config_" (;) ";" (declaration) "DyndepLoader dyndep_loader_;" (type_identifier) "DyndepLoader" (identifier) "dyndep_loader_" (;) ";" (labeled_statement) "std::set<std::string> removed_;" (statement_identifier) "std" (ERROR) "::set<std:" (:) ":" (:) ":" (binary_expression) "set<std" (identifier) "set" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "string> removed_;" (binary_expression) "string> removed_" (identifier) "string" (>) ">" (identifier) "removed_" (;) ";" (labeled_statement) "std::set<Node*> cleaned_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "set<Node*> cleaned_;" (binary_expression) "set<Node*> cleaned_" (binary_expression) "set<Node" (identifier) "set" (<) "<" (identifier) "Node" (ERROR) "*" (*) "*" (>) ">" (identifier) "cleaned_" (;) ";" (declaration) "int cleaned_files_count_;" (primitive_type) "int" (identifier) "cleaned_files_count_" (;) ";" (declaration) "DiskInterface* disk_interface_;" (type_identifier) "DiskInterface" (pointer_declarator) "* disk_interface_" (*) "*" (identifier) "disk_interface_" (;) ";" (declaration) "int status_;" (primitive_type) "int" (identifier) "status_" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// NINJA_CLEAN_H_"
547
22
{"language": "c", "success": true, "metadata": {"lines": 95, "avg_line_length": 37.31, "nodes": 320, "errors": 0, "source_hash": "9e802c85af45cf548d31cac67cf6b8d1d67a8c1fabfb1c894b820d9a242521dd", "categorized_nodes": 206}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef NINJA_CLEAN_H_\n#define NINJA_CLEAN_H_\n\n#include <set>\n#include <string>\n\n#include \"build.h\"\n#include \"dyndep.h\"\n#include \"build_log.h\"\n\nstruct State;\nstruct Node;\nstruct Rule;\nstruct DiskInterface;\n\nstruct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }\n\n /// @return whether the cleaner is in verbose mode.\n bool IsVerbose() const {\n return (config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run));\n }\n\n private:\n /// Remove the file @a path.\n /// @return whether the file has been removed.\n int RemoveFile(const std::string& path);\n /// @returns whether the file @a path exists.\n bool FileExists(const std::string& path);\n void Report(const std::string& path);\n\n /// Remove the given @a path file only if it has not been already removed.\n void Remove(const std::string& path);\n /// @return whether the given @a path has already been removed.\n bool IsAlreadyRemoved(const std::string& path);\n /// Remove the depfile and rspfile for an Edge.\n void RemoveEdgeFiles(Edge* edge);\n\n /// Helper recursive method for CleanTarget().\n void DoCleanTarget(Node* target);\n void PrintHeader();\n void PrintFooter();\n void DoCleanRule(const Rule* rule);\n void Reset();\n\n /// Load dependencies from dyndep bindings.\n void LoadDyndeps();\n\n State* state_;\n const BuildConfig& config_;\n DyndepLoader dyndep_loader_;\n std::set<std::string> removed_;\n std::set<Node*> cleaned_;\n int cleaned_files_count_;\n DiskInterface* disk_interface_;\n int status_;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 174, 185, 195, 205, 215, 225, 235, 245, 250, 255, 265, 270, 275, 280, 283, 286, 297, 308, 311, 316, 319], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 110, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 2, "type": "identifier", "text": "NINJA_CLEAN_H_", "parent": 0, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define NINJA_CLEAN_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 5, "type": "identifier", "text": "NINJA_CLEAN_H_", "parent": 3, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <set>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<set>", "parent": 6, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 14}}, {"id": 9, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<string>", "parent": 9, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include \"build.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": "\"build.h\"", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include \"dyndep.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": "\"dyndep.h\"", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include \"build_log.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": "\"build_log.h\"", "parent": 18, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 22}}, {"id": 21, "type": "struct_specifier", "text": "struct State", "parent": 0, "children": [22, 23], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 12}}, {"id": 22, "type": "struct", "text": "struct", "parent": 21, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 23, "type": "type_identifier", "text": "State", "parent": 21, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 12}}, {"id": 24, "type": "struct_specifier", "text": "struct Node", "parent": 0, "children": [25, 26], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 11}}, {"id": 25, "type": "struct", "text": "struct", "parent": 24, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 26, "type": "type_identifier", "text": "Node", "parent": 24, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 11}}, {"id": 27, "type": "struct_specifier", "text": "struct Rule", "parent": 0, "children": [28, 29], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 11}}, {"id": 28, "type": "struct", "text": "struct", "parent": 27, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 29, "type": "type_identifier", "text": "Rule", "parent": 27, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 11}}, {"id": 30, "type": "struct_specifier", "text": "struct DiskInterface", "parent": 0, "children": [31, 32], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 20}}, {"id": 31, "type": "struct", "text": "struct", "parent": 30, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 32, "type": "type_identifier", "text": "DiskInterface", "parent": 30, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 20}}, {"id": 33, "type": "declaration", "text": "struct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }\n\n /// @return whether the cleaner is in verbose mode.\n bool IsVerbose() const {\n return (config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run));", "parent": 0, "children": [34, 148, 153], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 72, "column": 79}}, {"id": 34, "type": "struct_specifier", "text": "struct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }", "parent": 33, "children": [35, 36], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 67, "column": 3}}, {"id": 35, "type": "struct", "text": "struct", "parent": 34, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 36, "type": "type_identifier", "text": "Cleaner", "parent": 34, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 14}}, {"id": 37, "type": "field_declaration", "text": "Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);", "parent": 34, "children": [38, 44, 45, 47, 48, 50], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 33, "column": 41}}, {"id": 38, "type": "macro_type_specifier", "text": "Cleaner(State*", "parent": 37, "children": [39, 40], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 16}}, {"id": 39, "type": "identifier", "text": "Cleaner", "parent": 38, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 9}}, {"id": 40, "type": "type_descriptor", "text": "State*", "parent": 38, "children": [41, 42], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 16}}, {"id": 41, "type": "type_identifier", "text": "State", "parent": 40, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 15}}, {"id": 42, "type": "abstract_pointer_declarator", "text": "*", "parent": 40, "children": [43], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 16}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 16}}, {"id": 44, "type": "field_identifier", "text": "state", "parent": 37, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 22}}, {"id": 45, "type": "ERROR", "text": "const BuildConfig&", "parent": 37, "children": [46], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 28}}, {"id": 46, "type": "identifier", "text": "BuildConfig", "parent": 45, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 27}}, {"id": 47, "type": "field_identifier", "text": "config", "parent": 37, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 35}}, {"id": 48, "type": "ERROR", "text": "DiskInterface", "parent": 37, "children": [49], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 23}}, {"id": 49, "type": "field_identifier", "text": "DiskInterface", "parent": 48, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 23}}, {"id": 50, "type": "pointer_declarator", "text": "* disk_interface", "parent": 37, "children": [51, 52], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 39}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 24}}, {"id": 52, "type": "field_identifier", "text": "disk_interface", "parent": 50, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 39}}, {"id": 53, "type": "field_declaration", "text": "int CleanTarget(Node* target);", "parent": 34, "children": [54, 55], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 32}}, {"id": 54, "type": "primitive_type", "text": "int", "parent": 53, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 5}}, {"id": 55, "type": "function_declarator", "text": "CleanTarget(Node* target)", "parent": 53, "children": [56, 57], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 31}}, {"id": 56, "type": "field_identifier", "text": "CleanTarget", "parent": 55, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 17}}, {"id": 57, "type": "parameter_list", "text": "(Node* target)", "parent": 55, "children": [58], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 31}}, {"id": 58, "type": "parameter_declaration", "text": "Node* target", "parent": 57, "children": [59, 60], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 30}}, {"id": 59, "type": "type_identifier", "text": "Node", "parent": 58, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 22}}, {"id": 60, "type": "pointer_declarator", "text": "* target", "parent": 58, "children": [61, 62], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 30}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 23}}, {"id": 62, "type": "identifier", "text": "target", "parent": 60, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 30}}, {"id": 63, "type": "field_declaration", "text": "int CleanTarget(const char* target);", "parent": 34, "children": [64, 65], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 38}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 63, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 5}}, {"id": 65, "type": "function_declarator", "text": "CleanTarget(const char* target)", "parent": 63, "children": [66, 67], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 37}}, {"id": 66, "type": "field_identifier", "text": "CleanTarget", "parent": 65, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 17}}, {"id": 67, "type": "parameter_list", "text": "(const char* target)", "parent": 65, "children": [68], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 37}}, {"id": 68, "type": "parameter_declaration", "text": "const char* target", "parent": 67, "children": [69, 70], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 36}}, {"id": 69, "type": "primitive_type", "text": "char", "parent": 68, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 28}}, {"id": 70, "type": "pointer_declarator", "text": "* target", "parent": 68, "children": [71, 72], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 36}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 29}}, {"id": 72, "type": "identifier", "text": "target", "parent": 70, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 36}}, {"id": 73, "type": "field_declaration", "text": "int CleanTargets(int target_count, char* targets[]);", "parent": 34, "children": [74, 75], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 54}}, {"id": 74, "type": "primitive_type", "text": "int", "parent": 73, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 5}}, {"id": 75, "type": "function_declarator", "text": "CleanTargets(int target_count, char* targets[])", "parent": 73, "children": [76, 77], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 53}}, {"id": 76, "type": "field_identifier", "text": "CleanTargets", "parent": 75, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 18}}, {"id": 77, "type": "parameter_list", "text": "(int target_count, char* targets[])", "parent": 75, "children": [78, 81], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 53}}, {"id": 78, "type": "parameter_declaration", "text": "int target_count", "parent": 77, "children": [79, 80], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 35}}, {"id": 79, "type": "primitive_type", "text": "int", "parent": 78, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 22}}, {"id": 80, "type": "identifier", "text": "target_count", "parent": 78, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 35}}, {"id": 81, "type": "parameter_declaration", "text": "char* targets[]", "parent": 77, "children": [82, 83], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 52}}, {"id": 82, "type": "primitive_type", "text": "char", "parent": 81, "children": [], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 41}}, {"id": 83, "type": "pointer_declarator", "text": "* targets[]", "parent": 81, "children": [84, 85], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 52}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 42}}, {"id": 85, "type": "array_declarator", "text": "targets[]", "parent": 83, "children": [86], "start_point": {"row": 43, "column": 43}, "end_point": {"row": 43, "column": 52}}, {"id": 86, "type": "identifier", "text": "targets", "parent": 85, "children": [], "start_point": {"row": 43, "column": 43}, "end_point": {"row": 43, "column": 50}}, {"id": 87, "type": "field_declaration", "text": "int CleanAll(bool generator = false);", "parent": 34, "children": [88, 89], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 39}}, {"id": 88, "type": "primitive_type", "text": "int", "parent": 87, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 5}}, {"id": 89, "type": "function_declarator", "text": "CleanAll(bool generator = false)", "parent": 87, "children": [90, 91], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 38}}, {"id": 90, "type": "field_identifier", "text": "CleanAll", "parent": 89, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 14}}, {"id": 91, "type": "parameter_list", "text": "(bool generator = false)", "parent": 89, "children": [92, 95], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 38}}, {"id": 92, "type": "parameter_declaration", "text": "bool generator", "parent": 91, "children": [93, 94], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 29}}, {"id": 93, "type": "primitive_type", "text": "bool", "parent": 92, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 19}}, {"id": 94, "type": "identifier", "text": "generator", "parent": 92, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 29}}, {"id": 95, "type": "ERROR", "text": "= false", "parent": 91, "children": [96, 97], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 37}}, {"id": 96, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 31}}, {"id": 97, "type": "false", "text": "false", "parent": 95, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 37}}, {"id": 98, "type": "field_declaration", "text": "int CleanRule(const Rule* rule);", "parent": 34, "children": [99, 100], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 34}}, {"id": 99, "type": "primitive_type", "text": "int", "parent": 98, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 5}}, {"id": 100, "type": "function_declarator", "text": "CleanRule(const Rule* rule)", "parent": 98, "children": [101, 102], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 33}}, {"id": 101, "type": "field_identifier", "text": "CleanRule", "parent": 100, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 15}}, {"id": 102, "type": "parameter_list", "text": "(const Rule* rule)", "parent": 100, "children": [103], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 33}}, {"id": 103, "type": "parameter_declaration", "text": "const Rule* rule", "parent": 102, "children": [104, 105], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 32}}, {"id": 104, "type": "type_identifier", "text": "Rule", "parent": 103, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 26}}, {"id": 105, "type": "pointer_declarator", "text": "* rule", "parent": 103, "children": [106, 107], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 32}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 27}}, {"id": 107, "type": "identifier", "text": "rule", "parent": 105, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 32}}, {"id": 108, "type": "field_declaration", "text": "int CleanRule(const char* rule);", "parent": 34, "children": [109, 110], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 34}}, {"id": 109, "type": "primitive_type", "text": "int", "parent": 108, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 5}}, {"id": 110, "type": "function_declarator", "text": "CleanRule(const char* rule)", "parent": 108, "children": [111, 112], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 33}}, {"id": 111, "type": "field_identifier", "text": "CleanRule", "parent": 110, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 15}}, {"id": 112, "type": "parameter_list", "text": "(const char* rule)", "parent": 110, "children": [113], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 33}}, {"id": 113, "type": "parameter_declaration", "text": "const char* rule", "parent": 112, "children": [114, 115], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 32}}, {"id": 114, "type": "primitive_type", "text": "char", "parent": 113, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 26}}, {"id": 115, "type": "pointer_declarator", "text": "* rule", "parent": 113, "children": [116, 117], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 32}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 27}}, {"id": 117, "type": "identifier", "text": "rule", "parent": 115, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 32}}, {"id": 118, "type": "field_declaration", "text": "int CleanRules(int rule_count, char* rules[]);", "parent": 34, "children": [119, 120], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 48}}, {"id": 119, "type": "primitive_type", "text": "int", "parent": 118, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 5}}, {"id": 120, "type": "function_declarator", "text": "CleanRules(int rule_count, char* rules[])", "parent": 118, "children": [121, 122], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 47}}, {"id": 121, "type": "field_identifier", "text": "CleanRules", "parent": 120, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 16}}, {"id": 122, "type": "parameter_list", "text": "(int rule_count, char* rules[])", "parent": 120, "children": [123, 126], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 47}}, {"id": 123, "type": "parameter_declaration", "text": "int rule_count", "parent": 122, "children": [124, 125], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 31}}, {"id": 124, "type": "primitive_type", "text": "int", "parent": 123, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 20}}, {"id": 125, "type": "identifier", "text": "rule_count", "parent": 123, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 31}}, {"id": 126, "type": "parameter_declaration", "text": "char* rules[]", "parent": 122, "children": [127, 128], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 46}}, {"id": 127, "type": "primitive_type", "text": "char", "parent": 126, "children": [], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 37}}, {"id": 128, "type": "pointer_declarator", "text": "* rules[]", "parent": 126, "children": [129, 130], "start_point": {"row": 58, "column": 37}, "end_point": {"row": 58, "column": 46}}, {"id": 129, "type": "*", "text": "*", "parent": 128, "children": [], "start_point": {"row": 58, "column": 37}, "end_point": {"row": 58, "column": 38}}, {"id": 130, "type": "array_declarator", "text": "rules[]", "parent": 128, "children": [131], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 46}}, {"id": 131, "type": "identifier", "text": "rules", "parent": 130, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 44}}, {"id": 132, "type": "field_declaration", "text": "int CleanDead(const BuildLog::Entries& entries);", "parent": 34, "children": [133, 134, 135, 137], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 50}}, {"id": 133, "type": "primitive_type", "text": "int", "parent": 132, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 5}}, {"id": 134, "type": "field_identifier", "text": "CleanDead", "parent": 132, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 15}}, {"id": 135, "type": "ERROR", "text": "(const BuildLog:", "parent": 132, "children": [136], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 31}}, {"id": 136, "type": "type_identifier", "text": "BuildLog", "parent": 135, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 30}}, {"id": 137, "type": "bitfield_clause", "text": ":Entries& entries", "parent": 132, "children": [138], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 48}}, {"id": 138, "type": "binary_expression", "text": "Entries& entries", "parent": 137, "children": [139, 140], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 48}}, {"id": 139, "type": "identifier", "text": "Entries", "parent": 138, "children": [], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 39}}, {"id": 140, "type": "identifier", "text": "entries", "parent": 138, "children": [], "start_point": {"row": 62, "column": 41}, "end_point": {"row": 62, "column": 48}}, {"id": 141, "type": "field_declaration", "text": "int cleaned_files_count() const {\n return cleaned_files_count_;", "parent": 34, "children": [142, 143, 146], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 66, "column": 32}}, {"id": 142, "type": "primitive_type", "text": "int", "parent": 141, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 5}}, {"id": 143, "type": "function_declarator", "text": "cleaned_files_count()", "parent": 141, "children": [144, 145], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 27}}, {"id": 144, "type": "field_identifier", "text": "cleaned_files_count", "parent": 143, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 25}}, {"id": 145, "type": "parameter_list", "text": "()", "parent": 143, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 27}}, {"id": 146, "type": "ERROR", "text": "const {\n return cleaned_files_count_", "parent": 141, "children": [147], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 66, "column": 31}}, {"id": 147, "type": "identifier", "text": "cleaned_files_count_", "parent": 146, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 31}}, {"id": 148, "type": "ERROR", "text": "bool IsVerbose() const {\n return", "parent": 33, "children": [149, 150], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 71, "column": 10}}, {"id": 149, "type": "identifier", "text": "bool", "parent": 148, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 6}}, {"id": 150, "type": "function_declarator", "text": "IsVerbose()", "parent": 148, "children": [151, 152], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 18}}, {"id": 151, "type": "identifier", "text": "IsVerbose", "parent": 150, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 16}}, {"id": 152, "type": "parameter_list", "text": "()", "parent": 150, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 18}}, {"id": 153, "type": "parenthesized_declarator", "text": "(config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run))", "parent": 33, "children": [154, 159], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 72, "column": 78}}, {"id": 154, "type": "ERROR", "text": "config_.verbosity != BuildConfig::", "parent": 153, "children": [155, 156, 157, 158], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 46}}, {"id": 155, "type": "identifier", "text": "config_", "parent": 154, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 19}}, {"id": 156, "type": "identifier", "text": "verbosity", "parent": 154, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 29}}, {"id": 157, "type": "!=", "text": "!=", "parent": 154, "children": [], "start_point": {"row": 71, "column": 30}, "end_point": {"row": 71, "column": 32}}, {"id": 158, "type": "identifier", "text": "BuildConfig", "parent": 154, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 44}}, {"id": 159, "type": "function_declarator", "text": "QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run)", "parent": 153, "children": [160, 161, 163], "start_point": {"row": 71, "column": 46}, "end_point": {"row": 72, "column": 77}}, {"id": 160, "type": "identifier", "text": "QUIET", "parent": 159, "children": [], "start_point": {"row": 71, "column": 46}, "end_point": {"row": 71, "column": 51}}, {"id": 161, "type": "ERROR", "text": "&&", "parent": 159, "children": [162], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 14}}, {"id": 162, "type": "&&", "text": "&&", "parent": 161, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 14}}, {"id": 163, "type": "parameter_list", "text": "(config_.verbosity == BuildConfig::VERBOSE || config_.dry_run)", "parent": 159, "children": [164], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 77}}, {"id": 164, "type": "parameter_declaration", "text": "config_.verbosity == BuildConfig::VERBOSE || config_.dry_run", "parent": 163, "children": [165, 166, 173], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 76}}, {"id": 165, "type": "type_identifier", "text": "config_", "parent": 164, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 23}}, {"id": 166, "type": "ERROR", "text": ".verbosity == BuildConfig::VERBOSE || config_.", "parent": 164, "children": [167, 168, 169, 170, 171, 172], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 69}}, {"id": 167, "type": "identifier", "text": "verbosity", "parent": 166, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 33}}, {"id": 168, "type": "==", "text": "==", "parent": 166, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 36}}, {"id": 169, "type": "identifier", "text": "BuildConfig", "parent": 166, "children": [], "start_point": {"row": 72, "column": 37}, "end_point": {"row": 72, "column": 48}}, {"id": 170, "type": "identifier", "text": "VERBOSE", "parent": 166, "children": [], "start_point": {"row": 72, "column": 50}, "end_point": {"row": 72, "column": 57}}, {"id": 171, "type": "||", "text": "||", "parent": 166, "children": [], "start_point": {"row": 72, "column": 58}, "end_point": {"row": 72, "column": 60}}, {"id": 172, "type": "identifier", "text": "config_", "parent": 166, "children": [], "start_point": {"row": 72, "column": 61}, "end_point": {"row": 72, "column": 68}}, {"id": 173, "type": "identifier", "text": "dry_run", "parent": 164, "children": [], "start_point": {"row": 72, "column": 69}, "end_point": {"row": 72, "column": 76}}, {"id": 174, "type": "labeled_statement", "text": "private:\n /// Remove the file @a path.\n /// @return whether the file has been removed.\n int RemoveFile(const std::string& path);", "parent": 0, "children": [175], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 78, "column": 42}}, {"id": 175, "type": "declaration", "text": "int RemoveFile(const std::string& path);", "parent": 174, "children": [176, 177], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 42}}, {"id": 176, "type": "primitive_type", "text": "int", "parent": 175, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 5}}, {"id": 177, "type": "function_declarator", "text": "RemoveFile(const std::string& path)", "parent": 175, "children": [178, 179], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 41}}, {"id": 178, "type": "identifier", "text": "RemoveFile", "parent": 177, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 16}}, {"id": 179, "type": "parameter_list", "text": "(const std::string& path)", "parent": 177, "children": [180], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 41}}, {"id": 180, "type": "parameter_declaration", "text": "const std::string& path", "parent": 179, "children": [181, 182, 184], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 40}}, {"id": 181, "type": "type_identifier", "text": "std", "parent": 180, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 26}}, {"id": 182, "type": "ERROR", "text": "::string&", "parent": 180, "children": [183], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 35}}, {"id": 183, "type": "identifier", "text": "string", "parent": 182, "children": [], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 34}}, {"id": 184, "type": "identifier", "text": "path", "parent": 180, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 40}}, {"id": 185, "type": "declaration", "text": "bool FileExists(const std::string& path);", "parent": 0, "children": [186, 187], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 43}}, {"id": 186, "type": "primitive_type", "text": "bool", "parent": 185, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 6}}, {"id": 187, "type": "function_declarator", "text": "FileExists(const std::string& path)", "parent": 185, "children": [188, 189], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 42}}, {"id": 188, "type": "identifier", "text": "FileExists", "parent": 187, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 17}}, {"id": 189, "type": "parameter_list", "text": "(const std::string& path)", "parent": 187, "children": [190], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 42}}, {"id": 190, "type": "parameter_declaration", "text": "const std::string& path", "parent": 189, "children": [191, 192, 194], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 41}}, {"id": 191, "type": "type_identifier", "text": "std", "parent": 190, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 27}}, {"id": 192, "type": "ERROR", "text": "::string&", "parent": 190, "children": [193], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 36}}, {"id": 193, "type": "identifier", "text": "string", "parent": 192, "children": [], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 35}}, {"id": 194, "type": "identifier", "text": "path", "parent": 190, "children": [], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 41}}, {"id": 195, "type": "declaration", "text": "void Report(const std::string& path);", "parent": 0, "children": [196, 197], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 39}}, {"id": 196, "type": "primitive_type", "text": "void", "parent": 195, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 6}}, {"id": 197, "type": "function_declarator", "text": "Report(const std::string& path)", "parent": 195, "children": [198, 199], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 38}}, {"id": 198, "type": "identifier", "text": "Report", "parent": 197, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 13}}, {"id": 199, "type": "parameter_list", "text": "(const std::string& path)", "parent": 197, "children": [200], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 38}}, {"id": 200, "type": "parameter_declaration", "text": "const std::string& path", "parent": 199, "children": [201, 202, 204], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 37}}, {"id": 201, "type": "type_identifier", "text": "std", "parent": 200, "children": [], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 23}}, {"id": 202, "type": "ERROR", "text": "::string&", "parent": 200, "children": [203], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 32}}, {"id": 203, "type": "identifier", "text": "string", "parent": 202, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 31}}, {"id": 204, "type": "identifier", "text": "path", "parent": 200, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 37}}, {"id": 205, "type": "declaration", "text": "void Remove(const std::string& path);", "parent": 0, "children": [206, 207], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 39}}, {"id": 206, "type": "primitive_type", "text": "void", "parent": 205, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 6}}, {"id": 207, "type": "function_declarator", "text": "Remove(const std::string& path)", "parent": 205, "children": [208, 209], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 38}}, {"id": 208, "type": "identifier", "text": "Remove", "parent": 207, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 13}}, {"id": 209, "type": "parameter_list", "text": "(const std::string& path)", "parent": 207, "children": [210], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 38}}, {"id": 210, "type": "parameter_declaration", "text": "const std::string& path", "parent": 209, "children": [211, 212, 214], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 37}}, {"id": 211, "type": "type_identifier", "text": "std", "parent": 210, "children": [], "start_point": {"row": 84, "column": 20}, "end_point": {"row": 84, "column": 23}}, {"id": 212, "type": "ERROR", "text": "::string&", "parent": 210, "children": [213], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 32}}, {"id": 213, "type": "identifier", "text": "string", "parent": 212, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 31}}, {"id": 214, "type": "identifier", "text": "path", "parent": 210, "children": [], "start_point": {"row": 84, "column": 33}, "end_point": {"row": 84, "column": 37}}, {"id": 215, "type": "declaration", "text": "bool IsAlreadyRemoved(const std::string& path);", "parent": 0, "children": [216, 217], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 49}}, {"id": 216, "type": "primitive_type", "text": "bool", "parent": 215, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 6}}, {"id": 217, "type": "function_declarator", "text": "IsAlreadyRemoved(const std::string& path)", "parent": 215, "children": [218, 219], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 48}}, {"id": 218, "type": "identifier", "text": "IsAlreadyRemoved", "parent": 217, "children": [], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 23}}, {"id": 219, "type": "parameter_list", "text": "(const std::string& path)", "parent": 217, "children": [220], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 48}}, {"id": 220, "type": "parameter_declaration", "text": "const std::string& path", "parent": 219, "children": [221, 222, 224], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 47}}, {"id": 221, "type": "type_identifier", "text": "std", "parent": 220, "children": [], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 33}}, {"id": 222, "type": "ERROR", "text": "::string&", "parent": 220, "children": [223], "start_point": {"row": 86, "column": 33}, "end_point": {"row": 86, "column": 42}}, {"id": 223, "type": "identifier", "text": "string", "parent": 222, "children": [], "start_point": {"row": 86, "column": 35}, "end_point": {"row": 86, "column": 41}}, {"id": 224, "type": "identifier", "text": "path", "parent": 220, "children": [], "start_point": {"row": 86, "column": 43}, "end_point": {"row": 86, "column": 47}}, {"id": 225, "type": "declaration", "text": "void RemoveEdgeFiles(Edge* edge);", "parent": 0, "children": [226, 227], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 35}}, {"id": 226, "type": "primitive_type", "text": "void", "parent": 225, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 6}}, {"id": 227, "type": "function_declarator", "text": "RemoveEdgeFiles(Edge* edge)", "parent": 225, "children": [228, 229], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 34}}, {"id": 228, "type": "identifier", "text": "RemoveEdgeFiles", "parent": 227, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 22}}, {"id": 229, "type": "parameter_list", "text": "(Edge* edge)", "parent": 227, "children": [230], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 34}}, {"id": 230, "type": "parameter_declaration", "text": "Edge* edge", "parent": 229, "children": [231, 232], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 33}}, {"id": 231, "type": "type_identifier", "text": "Edge", "parent": 230, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 27}}, {"id": 232, "type": "pointer_declarator", "text": "* edge", "parent": 230, "children": [233, 234], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 33}}, {"id": 233, "type": "*", "text": "*", "parent": 232, "children": [], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 28}}, {"id": 234, "type": "identifier", "text": "edge", "parent": 232, "children": [], "start_point": {"row": 88, "column": 29}, "end_point": {"row": 88, "column": 33}}, {"id": 235, "type": "declaration", "text": "void DoCleanTarget(Node* target);", "parent": 0, "children": [236, 237], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 35}}, {"id": 236, "type": "primitive_type", "text": "void", "parent": 235, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 6}}, {"id": 237, "type": "function_declarator", "text": "DoCleanTarget(Node* target)", "parent": 235, "children": [238, 239], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 34}}, {"id": 238, "type": "identifier", "text": "DoCleanTarget", "parent": 237, "children": [], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 20}}, {"id": 239, "type": "parameter_list", "text": "(Node* target)", "parent": 237, "children": [240], "start_point": {"row": 91, "column": 20}, "end_point": {"row": 91, "column": 34}}, {"id": 240, "type": "parameter_declaration", "text": "Node* target", "parent": 239, "children": [241, 242], "start_point": {"row": 91, "column": 21}, "end_point": {"row": 91, "column": 33}}, {"id": 241, "type": "type_identifier", "text": "Node", "parent": 240, "children": [], "start_point": {"row": 91, "column": 21}, "end_point": {"row": 91, "column": 25}}, {"id": 242, "type": "pointer_declarator", "text": "* target", "parent": 240, "children": [243, 244], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 33}}, {"id": 243, "type": "*", "text": "*", "parent": 242, "children": [], "start_point": {"row": 91, "column": 25}, "end_point": {"row": 91, "column": 26}}, {"id": 244, "type": "identifier", "text": "target", "parent": 242, "children": [], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 33}}, {"id": 245, "type": "declaration", "text": "void PrintHeader();", "parent": 0, "children": [246, 247], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 21}}, {"id": 246, "type": "primitive_type", "text": "void", "parent": 245, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 6}}, {"id": 247, "type": "function_declarator", "text": "PrintHeader()", "parent": 245, "children": [248, 249], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 20}}, {"id": 248, "type": "identifier", "text": "PrintHeader", "parent": 247, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 18}}, {"id": 249, "type": "parameter_list", "text": "()", "parent": 247, "children": [], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 20}}, {"id": 250, "type": "declaration", "text": "void PrintFooter();", "parent": 0, "children": [251, 252], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 21}}, {"id": 251, "type": "primitive_type", "text": "void", "parent": 250, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 6}}, {"id": 252, "type": "function_declarator", "text": "PrintFooter()", "parent": 250, "children": [253, 254], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 20}}, {"id": 253, "type": "identifier", "text": "PrintFooter", "parent": 252, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 18}}, {"id": 254, "type": "parameter_list", "text": "()", "parent": 252, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 20}}, {"id": 255, "type": "declaration", "text": "void DoCleanRule(const Rule* rule);", "parent": 0, "children": [256, 257], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 37}}, {"id": 256, "type": "primitive_type", "text": "void", "parent": 255, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 6}}, {"id": 257, "type": "function_declarator", "text": "DoCleanRule(const Rule* rule)", "parent": 255, "children": [258, 259], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 36}}, {"id": 258, "type": "identifier", "text": "DoCleanRule", "parent": 257, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 18}}, {"id": 259, "type": "parameter_list", "text": "(const Rule* rule)", "parent": 257, "children": [260], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 36}}, {"id": 260, "type": "parameter_declaration", "text": "const Rule* rule", "parent": 259, "children": [261, 262], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 35}}, {"id": 261, "type": "type_identifier", "text": "Rule", "parent": 260, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 29}}, {"id": 262, "type": "pointer_declarator", "text": "* rule", "parent": 260, "children": [263, 264], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 35}}, {"id": 263, "type": "*", "text": "*", "parent": 262, "children": [], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 30}}, {"id": 264, "type": "identifier", "text": "rule", "parent": 262, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 35}}, {"id": 265, "type": "declaration", "text": "void Reset();", "parent": 0, "children": [266, 267], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 15}}, {"id": 266, "type": "primitive_type", "text": "void", "parent": 265, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 6}}, {"id": 267, "type": "function_declarator", "text": "Reset()", "parent": 265, "children": [268, 269], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 14}}, {"id": 268, "type": "identifier", "text": "Reset", "parent": 267, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 12}}, {"id": 269, "type": "parameter_list", "text": "()", "parent": 267, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 14}}, {"id": 270, "type": "declaration", "text": "void LoadDyndeps();", "parent": 0, "children": [271, 272], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 21}}, {"id": 271, "type": "primitive_type", "text": "void", "parent": 270, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 6}}, {"id": 272, "type": "function_declarator", "text": "LoadDyndeps()", "parent": 270, "children": [273, 274], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 20}}, {"id": 273, "type": "identifier", "text": "LoadDyndeps", "parent": 272, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 18}}, {"id": 274, "type": "parameter_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 20}}, {"id": 275, "type": "declaration", "text": "State* state_;", "parent": 0, "children": [276, 277], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 16}}, {"id": 276, "type": "type_identifier", "text": "State", "parent": 275, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 7}}, {"id": 277, "type": "pointer_declarator", "text": "* state_", "parent": 275, "children": [278, 279], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 15}}, {"id": 278, "type": "*", "text": "*", "parent": 277, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 8}}, {"id": 279, "type": "identifier", "text": "state_", "parent": 277, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 15}}, {"id": 280, "type": "declaration", "text": "const BuildConfig& config_;", "parent": 0, "children": [281, 282], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 29}}, {"id": 281, "type": "type_identifier", "text": "BuildConfig", "parent": 280, "children": [], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 19}}, {"id": 282, "type": "identifier", "text": "config_", "parent": 280, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 28}}, {"id": 283, "type": "declaration", "text": "DyndepLoader dyndep_loader_;", "parent": 0, "children": [284, 285], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 30}}, {"id": 284, "type": "type_identifier", "text": "DyndepLoader", "parent": 283, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 14}}, {"id": 285, "type": "identifier", "text": "dyndep_loader_", "parent": 283, "children": [], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 29}}, {"id": 286, "type": "labeled_statement", "text": "std::set<std::string> removed_;", "parent": 0, "children": [287, 288], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 33}}, {"id": 287, "type": "statement_identifier", "text": "std", "parent": 286, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 5}}, {"id": 288, "type": "ERROR", "text": "::set<std:", "parent": 286, "children": [289], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 15}}, {"id": 289, "type": "binary_expression", "text": "set<std", "parent": 288, "children": [290, 291, 292], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 14}}, {"id": 290, "type": "identifier", "text": "set", "parent": 289, "children": [], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 10}}, {"id": 291, "type": "<", "text": "<", "parent": 289, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 11}}, {"id": 292, "type": "identifier", "text": "std", "parent": 289, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 14}}, {"id": 293, "type": "binary_expression", "text": "string> removed_", "parent": 286, "children": [294, 295, 296], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 32}}, {"id": 294, "type": "identifier", "text": "string", "parent": 293, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 22}}, {"id": 295, "type": ">", "text": ">", "parent": 293, "children": [], "start_point": {"row": 103, "column": 22}, "end_point": {"row": 103, "column": 23}}, {"id": 296, "type": "identifier", "text": "removed_", "parent": 293, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 32}}, {"id": 297, "type": "labeled_statement", "text": "std::set<Node*> cleaned_;", "parent": 0, "children": [298], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 27}}, {"id": 298, "type": "statement_identifier", "text": "std", "parent": 297, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 5}}, {"id": 299, "type": "binary_expression", "text": "set<Node*> cleaned_", "parent": 297, "children": [300, 304, 306, 307], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 26}}, {"id": 300, "type": "binary_expression", "text": "set<Node", "parent": 299, "children": [301, 302, 303], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 15}}, {"id": 301, "type": "identifier", "text": "set", "parent": 300, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 10}}, {"id": 302, "type": "<", "text": "<", "parent": 300, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 11}}, {"id": 303, "type": "identifier", "text": "Node", "parent": 300, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 15}}, {"id": 304, "type": "ERROR", "text": "*", "parent": 299, "children": [305], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 16}}, {"id": 305, "type": "*", "text": "*", "parent": 304, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 16}}, {"id": 306, "type": ">", "text": ">", "parent": 299, "children": [], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 17}}, {"id": 307, "type": "identifier", "text": "cleaned_", "parent": 299, "children": [], "start_point": {"row": 104, "column": 18}, "end_point": {"row": 104, "column": 26}}, {"id": 308, "type": "declaration", "text": "int cleaned_files_count_;", "parent": 0, "children": [309, 310], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 27}}, {"id": 309, "type": "primitive_type", "text": "int", "parent": 308, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 5}}, {"id": 310, "type": "identifier", "text": "cleaned_files_count_", "parent": 308, "children": [], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 26}}, {"id": 311, "type": "declaration", "text": "DiskInterface* disk_interface_;", "parent": 0, "children": [312, 313], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 33}}, {"id": 312, "type": "type_identifier", "text": "DiskInterface", "parent": 311, "children": [], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 15}}, {"id": 313, "type": "pointer_declarator", "text": "* disk_interface_", "parent": 311, "children": [314, 315], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 32}}, {"id": 314, "type": "*", "text": "*", "parent": 313, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 16}}, {"id": 315, "type": "identifier", "text": "disk_interface_", "parent": 313, "children": [], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 32}}, {"id": 316, "type": "declaration", "text": "int status_;", "parent": 0, "children": [317, 318], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 14}}, {"id": 317, "type": "primitive_type", "text": "int", "parent": 316, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 5}}, {"id": 318, "type": "identifier", "text": "status_", "parent": 316, "children": [], "start_point": {"row": 107, "column": 6}, "end_point": {"row": 107, "column": 13}}, {"id": 319, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 6}}]}, "node_categories": {"declarations": {"functions": [55, 65, 75, 89, 100, 110, 120, 143, 150, 159, 177, 187, 197, 207, 217, 227, 237, 247, 252, 257, 267, 272], "variables": [33, 37, 53, 58, 63, 68, 73, 78, 81, 87, 92, 98, 103, 108, 113, 118, 123, 126, 132, 141, 164, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 283, 308, 311, 316], "classes": [21, 22, 24, 25, 27, 28, 30, 31, 34, 35], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [138, 289, 293, 299, 300], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 23, 26, 29, 32, 36, 38, 39, 41, 44, 46, 47, 49, 52, 56, 59, 62, 66, 72, 76, 80, 86, 90, 94, 101, 104, 107, 111, 117, 121, 125, 131, 134, 136, 139, 140, 144, 147, 149, 151, 155, 156, 158, 160, 165, 167, 169, 170, 172, 173, 178, 181, 183, 184, 188, 191, 193, 194, 198, 201, 203, 204, 208, 211, 213, 214, 218, 221, 223, 224, 228, 231, 234, 238, 241, 244, 248, 253, 258, 261, 264, 268, 273, 276, 279, 281, 282, 284, 285, 287, 290, 292, 294, 296, 298, 301, 303, 307, 310, 312, 315, 318, 319], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [137]}}, "cross_language_map": {"function_declarations": [{"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "CleanTarget(Node* target)"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "CleanTarget(const char* target)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "CleanTargets(int target_count, char* targets[])"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "CleanAll(bool generator = false)"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "CleanRule(const Rule* rule)"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "CleanRule(const char* rule)"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "CleanRules(int rule_count, char* rules[])"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "cleaned_files_count()"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "IsVerbose()"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run)"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "RemoveFile(const std::string& path)"}, {"node_id": 187, "universal_type": "function", "name": "unknown", "text_snippet": "FileExists(const std::string& path)"}, {"node_id": 197, "universal_type": "function", "name": "unknown", "text_snippet": "Report(const std::string& path)"}, {"node_id": 207, "universal_type": "function", "name": "unknown", "text_snippet": "Remove(const std::string& path)"}, {"node_id": 217, "universal_type": "function", "name": "unknown", "text_snippet": "IsAlreadyRemoved(const std::string& path)"}, {"node_id": 227, "universal_type": "function", "name": "unknown", "text_snippet": "RemoveEdgeFiles(Edge* edge)"}, {"node_id": 237, "universal_type": "function", "name": "unknown", "text_snippet": "DoCleanTarget(Node* target)"}, {"node_id": 247, "universal_type": "function", "name": "unknown", "text_snippet": "PrintHeader()"}, {"node_id": 252, "universal_type": "function", "name": "unknown", "text_snippet": "PrintFooter()"}, {"node_id": 257, "universal_type": "function", "name": "unknown", "text_snippet": "DoCleanRule(const Rule* rule)"}, {"node_id": 267, "universal_type": "function", "name": "unknown", "text_snippet": "Reset()"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "LoadDyndeps()"}], "class_declarations": [{"node_id": 21, "universal_type": "class", "name": "State", "text_snippet": "struct State"}, {"node_id": 22, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 24, "universal_type": "class", "name": "Node", "text_snippet": "struct Node"}, {"node_id": 25, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 27, "universal_type": "class", "name": "Rule", "text_snippet": "struct Rule"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 30, "universal_type": "class", "name": "DiskInterface", "text_snippet": "struct DiskInterface"}, {"node_id": 31, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 34, "universal_type": "class", "name": "Cleaner", "text_snippet": "struct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* stat"}, {"node_id": 35, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <set>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <string>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"build.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"dyndep.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"build_log.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "// Copyright 2011 Google Inc. All Rights 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#ifndef NINJA_CLEAN_H_\n#define NINJA_CLEAN_H_\n\n#include <set>\n#include <string>\n\n#include \"build.h\"\n#include \"dyndep.h\"\n#include \"build_log.h\"\n\nstruct State;\nstruct Node;\nstruct Rule;\nstruct DiskInterface;\n\nstruct Cleaner {\n /// Build a cleaner object with the given @a disk_interface\n Cleaner(State* state,\n const BuildConfig& config,\n DiskInterface* disk_interface);\n\n /// Clean the given @a target and all the file built for it.\n /// @return non-zero if an error occurs.\n int CleanTarget(Node* target);\n /// Clean the given target @a target.\n /// @return non-zero if an error occurs.\n int CleanTarget(const char* target);\n /// Clean the given target @a targets.\n /// @return non-zero if an error occurs.\n int CleanTargets(int target_count, char* targets[]);\n\n /// Clean all built files, except for files created by generator rules.\n /// @param generator If set, also clean files created by generator rules.\n /// @return non-zero if an error occurs.\n int CleanAll(bool generator = false);\n\n /// Clean all the file built with the given rule @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const Rule* rule);\n /// Clean the file produced by the given @a rule.\n /// @return non-zero if an error occurs.\n int CleanRule(const char* rule);\n /// Clean the file produced by the given @a rules.\n /// @return non-zero if an error occurs.\n int CleanRules(int rule_count, char* rules[]);\n /// Clean the files produced by previous builds that are no longer in the\n /// manifest.\n /// @return non-zero if an error occurs.\n int CleanDead(const BuildLog::Entries& entries);\n\n /// @return the number of file cleaned.\n int cleaned_files_count() const {\n return cleaned_files_count_;\n }\n\n /// @return whether the cleaner is in verbose mode.\n bool IsVerbose() const {\n return (config_.verbosity != BuildConfig::QUIET\n && (config_.verbosity == BuildConfig::VERBOSE || config_.dry_run));\n }\n\n private:\n /// Remove the file @a path.\n /// @return whether the file has been removed.\n int RemoveFile(const std::string& path);\n /// @returns whether the file @a path exists.\n bool FileExists(const std::string& path);\n void Report(const std::string& path);\n\n /// Remove the given @a path file only if it has not been already removed.\n void Remove(const std::string& path);\n /// @return whether the given @a path has already been removed.\n bool IsAlreadyRemoved(const std::string& path);\n /// Remove the depfile and rspfile for an Edge.\n void RemoveEdgeFiles(Edge* edge);\n\n /// Helper recursive method for CleanTarget().\n void DoCleanTarget(Node* target);\n void PrintHeader();\n void PrintFooter();\n void DoCleanRule(const Rule* rule);\n void Reset();\n\n /// Load dependencies from dyndep bindings.\n void LoadDyndeps();\n\n State* state_;\n const BuildConfig& config_;\n DyndepLoader dyndep_loader_;\n std::set<std::string> removed_;\n std::set<Node*> cleaned_;\n int cleaned_files_count_;\n DiskInterface* disk_interface_;\n int status_;\n};\n\n#endif // NINJA_CLEAN_H_\n"}
253
c
#include <std.h> inherit "/d/common/obj/weapon/mspear.c"; create() { ::create(); set_id(({"spear","mithril spear","mithril medium spear"})); set_name("mithril spear"); set_short("A mithril spear"); set_long("%^BOLD%^This short spear is tipped with"+ " a bright silvery mithril spearhead. It was "+ "forged by the Dwarves of Mt. Sholkum in the "+ "Dagger Reaches. Dwarven runes line the center"+ " of the spearhead and the long oak shaft is "+ "polished to a high shine. Engraved on the shaft"+ " is the crest of the Army of the Dagger Reaches."); //set_weight(7); //set_prof_type("medium spear"); //set_size(2); set_value(100); //set_wc(1,8); //set_large_wc(1,12); //set_type("piercing"); set_property("enchantment", 2); }
34.57
23
(translation_unit) "#include <std.h>\ninherit "/d/common/obj/weapon/mspear.c";\n\ncreate() {\n ::create();\n set_id(({"spear","mithril spear","mithril medium spear"}));\n set_name("mithril spear");\n set_short("A mithril spear");\n set_long("%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "+\n "polished to a high shine. Engraved on the shaft"+\n " is the crest of the Army of the Dagger Reaches.");\n //set_weight(7);\n //set_prof_type("medium spear");\n //set_size(2);\n set_value(100);\n //set_wc(1,8);\n //set_large_wc(1,12);\n //set_type("piercing");\n set_property("enchantment", 2);\n}\n" (preproc_include) "#include <std.h>\n" (#include) "#include" (system_lib_string) "<std.h>" (expression_statement) "inherit "/d/common/obj/weapon/mspear.c";" (concatenated_string) "inherit "/d/common/obj/weapon/mspear.c"" (identifier) "inherit" (string_literal) ""/d/common/obj/weapon/mspear.c"" (") """ (string_content) "/d/common/obj/weapon/mspear.c" (") """ (;) ";" (ERROR) "create() {\n ::" (call_expression) "create()" (identifier) "create" (argument_list) "()" (() "(" ()) ")" ({) "{" (:) ":" (:) ":" (expression_statement) "create();" (call_expression) "create()" (identifier) "create" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "set_id(({"spear","mithril spear","mithril medium spear"}));" (call_expression) "set_id(({"spear","mithril spear","mithril medium spear"}))" (identifier) "set_id" (argument_list) "(({"spear","mithril spear","mithril medium spear"}))" (() "(" (parenthesized_expression) "({"spear","mithril spear","mithril medium spear"})" (() "(" (compound_statement) "{"spear","mithril spear","mithril medium spear"}" ({) "{" (expression_statement) ""spear","mithril spear","mithril medium spear"" (comma_expression) ""spear","mithril spear","mithril medium spear"" (string_literal) ""spear"" (") """ (string_content) "spear" (") """ (,) "," (comma_expression) ""mithril spear","mithril medium spear"" (string_literal) ""mithril spear"" (") """ (string_content) "mithril spear" (") """ (,) "," (string_literal) ""mithril medium spear"" (") """ (string_content) "mithril medium spear" (") """ (;) "" (}) "}" ()) ")" ()) ")" (;) ";" (expression_statement) "set_name("mithril spear");" (call_expression) "set_name("mithril spear")" (identifier) "set_name" (argument_list) "("mithril spear")" (() "(" (string_literal) ""mithril spear"" (") """ (string_content) "mithril spear" (") """ ()) ")" (;) ";" (expression_statement) "set_short("A mithril spear");" (call_expression) "set_short("A mithril spear")" (identifier) "set_short" (argument_list) "("A mithril spear")" (() "(" (string_literal) ""A mithril spear"" (") """ (string_content) "A mithril spear" (") """ ()) ")" (;) ";" (expression_statement) "set_long("%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "+\n "polished to a high shine. Engraved on the shaft"+\n " is the crest of the Army of the Dagger Reaches.");" (call_expression) "set_long("%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "+\n "polished to a high shine. Engraved on the shaft"+\n " is the crest of the Army of the Dagger Reaches.")" (identifier) "set_long" (argument_list) "("%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "+\n "polished to a high shine. Engraved on the shaft"+\n " is the crest of the Army of the Dagger Reaches.")" (() "(" (binary_expression) ""%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "+\n "polished to a high shine. Engraved on the shaft"+\n " is the crest of the Army of the Dagger Reaches."" (binary_expression) ""%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "+\n "polished to a high shine. Engraved on the shaft"" (binary_expression) ""%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"+\n " of the spearhead and the long oak shaft is "" (binary_expression) ""%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "+\n "Dagger Reaches. Dwarven runes line the center"" (binary_expression) ""%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "+\n "forged by the Dwarves of Mt. Sholkum in the "" (binary_expression) ""%^BOLD%^This short spear is tipped with"+\n " a bright silvery mithril spearhead. It was "" (string_literal) ""%^BOLD%^This short spear is tipped with"" (") """ (string_content) "%^BOLD%^This short spear is tipped with" (") """ (+) "+" (string_literal) "" a bright silvery mithril spearhead. It was "" (") """ (string_content) " a bright silvery mithril spearhead. It was " (") """ (+) "+" (string_literal) ""forged by the Dwarves of Mt. Sholkum in the "" (") """ (string_content) "forged by the Dwarves of Mt. Sholkum in the " (") """ (+) "+" (string_literal) ""Dagger Reaches. Dwarven runes line the center"" (") """ (string_content) "Dagger Reaches. Dwarven runes line the center" (") """ (+) "+" (string_literal) "" of the spearhead and the long oak shaft is "" (") """ (string_content) " of the spearhead and the long oak shaft is " (") """ (+) "+" (string_literal) ""polished to a high shine. Engraved on the shaft"" (") """ (string_content) "polished to a high shine. Engraved on the shaft" (") """ (+) "+" (string_literal) "" is the crest of the Army of the Dagger Reaches."" (") """ (string_content) " is the crest of the Army of the Dagger Reaches." (") """ ()) ")" (;) ";" (comment) "//set_weight(7);" (comment) "//set_prof_type("medium spear");" (comment) "//set_size(2);" (expression_statement) "set_value(100);" (call_expression) "set_value(100)" (identifier) "set_value" (argument_list) "(100)" (() "(" (number_literal) "100" ()) ")" (;) ";" (comment) "//set_wc(1,8);" (comment) "//set_large_wc(1,12);" (comment) "//set_type("piercing");" (expression_statement) "set_property("enchantment", 2);" (call_expression) "set_property("enchantment", 2)" (identifier) "set_property" (argument_list) "("enchantment", 2)" (() "(" (string_literal) ""enchantment"" (") """ (string_content) "enchantment" (") """ (,) "," (number_literal) "2" ()) ")" (;) ";" (ERROR) "}" (}) "}"
157
2
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 34.57, "nodes": 61, "errors": 0, "source_hash": "738782e5265d139e6d1de58c4bfd83a4d8b421cb4c23c0a3a1b4cdda524e9b34", "categorized_nodes": 46}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <std.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": "<std.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "concatenated_string", "text": "inherit \"/d/common/obj/weapon/mspear.c\"", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 39}}, {"id": 4, "type": "identifier", "text": "inherit", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "string_literal", "text": "\"/d/common/obj/weapon/mspear.c\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 39}}, {"id": 6, "type": "ERROR", "text": "create() {\n ::", "parent": null, "children": [7], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 7, "type": "call_expression", "text": "create()", "parent": 6, "children": [8, 9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "identifier", "text": "create", "parent": 7, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 9, "type": "argument_list", "text": "()", "parent": 7, "children": [], "start_point": {"row": 3, "column": 6}, "end_point": {"row": 3, "column": 8}}, {"id": 10, "type": "call_expression", "text": "create()", "parent": null, "children": [11, 12], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 14}}, {"id": 11, "type": "identifier", "text": "create", "parent": 10, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 12}}, {"id": 12, "type": "argument_list", "text": "()", "parent": 10, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 14}}, {"id": 13, "type": "call_expression", "text": "set_id(({\"spear\",\"mithril spear\",\"mithril medium spear\"}))", "parent": null, "children": [14, 15], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 62}}, {"id": 14, "type": "identifier", "text": "set_id", "parent": 13, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 10}}, {"id": 15, "type": "argument_list", "text": "(({\"spear\",\"mithril spear\",\"mithril medium spear\"}))", "parent": 13, "children": [16], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 62}}, {"id": 16, "type": "parenthesized_expression", "text": "({\"spear\",\"mithril spear\",\"mithril medium spear\"})", "parent": 15, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 61}}, {"id": 17, "type": "comma_expression", "text": "\"spear\",\"mithril spear\",\"mithril medium spear\"", "parent": 16, "children": [18, 19], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 59}}, {"id": 18, "type": "string_literal", "text": "\"spear\"", "parent": 17, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 20}}, {"id": 19, "type": "comma_expression", "text": "\"mithril spear\",\"mithril medium spear\"", "parent": 17, "children": [20, 21], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 59}}, {"id": 20, "type": "string_literal", "text": "\"mithril spear\"", "parent": 19, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 36}}, {"id": 21, "type": "string_literal", "text": "\"mithril medium spear\"", "parent": 19, "children": [], "start_point": {"row": 5, "column": 37}, "end_point": {"row": 5, "column": 59}}, {"id": 22, "type": "call_expression", "text": "set_name(\"mithril spear\")", "parent": null, "children": [23, 24], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 29}}, {"id": 23, "type": "identifier", "text": "set_name", "parent": 22, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 12}}, {"id": 24, "type": "argument_list", "text": "(\"mithril spear\")", "parent": 22, "children": [25], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 29}}, {"id": 25, "type": "string_literal", "text": "\"mithril spear\"", "parent": 24, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 28}}, {"id": 26, "type": "call_expression", "text": "set_short(\"A mithril spear\")", "parent": null, "children": [27, 28], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 32}}, {"id": 27, "type": "identifier", "text": "set_short", "parent": 26, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 13}}, {"id": 28, "type": "argument_list", "text": "(\"A mithril spear\")", "parent": 26, "children": [29], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 32}}, {"id": 29, "type": "string_literal", "text": "\"A mithril spear\"", "parent": 28, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 31}}, {"id": 30, "type": "call_expression", "text": "set_long(\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"+\n \" of the spearhead and the long oak shaft is \"+\n \"polished to a high shine. Engraved on the shaft\"+\n \" is the crest of the Army of the Dagger Reaches.\")", "parent": null, "children": [31, 32], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 14, "column": 59}}, {"id": 31, "type": "identifier", "text": "set_long", "parent": 30, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 12}}, {"id": 32, "type": "argument_list", "text": "(\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"+\n \" of the spearhead and the long oak shaft is \"+\n \"polished to a high shine. Engraved on the shaft\"+\n \" is the crest of the Army of the Dagger Reaches.\")", "parent": 30, "children": [33], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 14, "column": 59}}, {"id": 33, "type": "binary_expression", "text": "\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"+\n \" of the spearhead and the long oak shaft is \"+\n \"polished to a high shine. Engraved on the shaft\"+\n \" is the crest of the Army of the Dagger Reaches.\"", "parent": 32, "children": [34, 50, 51], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 14, "column": 58}}, {"id": 34, "type": "binary_expression", "text": "\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"+\n \" of the spearhead and the long oak shaft is \"+\n \"polished to a high shine. Engraved on the shaft\"", "parent": 33, "children": [35, 48, 49], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 13, "column": 58}}, {"id": 35, "type": "binary_expression", "text": "\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"+\n \" of the spearhead and the long oak shaft is \"", "parent": 34, "children": [36, 46, 47], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 12, "column": 54}}, {"id": 36, "type": "binary_expression", "text": "\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"", "parent": 35, "children": [37, 44, 45], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 11, "column": 56}}, {"id": 37, "type": "binary_expression", "text": "\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"", "parent": 36, "children": [38, 42, 43], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 10, "column": 54}}, {"id": 38, "type": "binary_expression", "text": "\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"", "parent": 37, "children": [39, 40, 41], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 9, "column": 55}}, {"id": 39, "type": "string_literal", "text": "\"%^BOLD%^This short spear is tipped with\"", "parent": 38, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 54}}, {"id": 40, "type": "+", "text": "+", "parent": 38, "children": [], "start_point": {"row": 8, "column": 54}, "end_point": {"row": 8, "column": 55}}, {"id": 41, "type": "string_literal", "text": "\" a bright silvery mithril spearhead. It was \"", "parent": 38, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 55}}, {"id": 42, "type": "+", "text": "+", "parent": 37, "children": [], "start_point": {"row": 9, "column": 55}, "end_point": {"row": 9, "column": 56}}, {"id": 43, "type": "string_literal", "text": "\"forged by the Dwarves of Mt. Sholkum in the \"", "parent": 37, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 54}}, {"id": 44, "type": "+", "text": "+", "parent": 36, "children": [], "start_point": {"row": 10, "column": 54}, "end_point": {"row": 10, "column": 55}}, {"id": 45, "type": "string_literal", "text": "\"Dagger Reaches. Dwarven runes line the center\"", "parent": 36, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 56}}, {"id": 46, "type": "+", "text": "+", "parent": 35, "children": [], "start_point": {"row": 11, "column": 56}, "end_point": {"row": 11, "column": 57}}, {"id": 47, "type": "string_literal", "text": "\" of the spearhead and the long oak shaft is \"", "parent": 35, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 54}}, {"id": 48, "type": "+", "text": "+", "parent": 34, "children": [], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 55}}, {"id": 49, "type": "string_literal", "text": "\"polished to a high shine. Engraved on the shaft\"", "parent": 34, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 58}}, {"id": 50, "type": "+", "text": "+", "parent": 33, "children": [], "start_point": {"row": 13, "column": 58}, "end_point": {"row": 13, "column": 59}}, {"id": 51, "type": "string_literal", "text": "\" is the crest of the Army of the Dagger Reaches.\"", "parent": 33, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 58}}, {"id": 52, "type": "call_expression", "text": "set_value(100)", "parent": null, "children": [53, 54], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 17}}, {"id": 53, "type": "identifier", "text": "set_value", "parent": 52, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 12}}, {"id": 54, "type": "argument_list", "text": "(100)", "parent": 52, "children": [55], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 17}}, {"id": 55, "type": "number_literal", "text": "100", "parent": 54, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 16}}, {"id": 56, "type": "call_expression", "text": "set_property(\"enchantment\", 2)", "parent": null, "children": [57, 58], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 33}}, {"id": 57, "type": "identifier", "text": "set_property", "parent": 56, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 15}}, {"id": 58, "type": "argument_list", "text": "(\"enchantment\", 2)", "parent": 56, "children": [59, 60], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 33}}, {"id": 59, "type": "string_literal", "text": "\"enchantment\"", "parent": 58, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 29}}, {"id": 60, "type": "number_literal", "text": "2", "parent": 58, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 32}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [7, 10, 13, 16, 17, 19, 22, 26, 30, 33, 34, 35, 36, 37, 38, 52, 56], "assignments": [], "loops": [], "conditionals": [4, 8, 11, 14, 23, 27, 31, 53, 57], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 3, 5, 18, 20, 21, 25, 29, 39, 41, 43, 45, 47, 49, 51, 55, 59, 60], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <std.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <std.h>\ninherit \"/d/common/obj/weapon/mspear.c\";\n\ncreate() {\n ::create();\n set_id(({\"spear\",\"mithril spear\",\"mithril medium spear\"}));\n set_name(\"mithril spear\");\n set_short(\"A mithril spear\");\n set_long(\"%^BOLD%^This short spear is tipped with\"+\n \" a bright silvery mithril spearhead. It was \"+\n \"forged by the Dwarves of Mt. Sholkum in the \"+\n \"Dagger Reaches. Dwarven runes line the center\"+\n \" of the spearhead and the long oak shaft is \"+\n \"polished to a high shine. Engraved on the shaft\"+\n \" is the crest of the Army of the Dagger Reaches.\");\n //set_weight(7);\n //set_prof_type(\"medium spear\");\n //set_size(2);\n set_value(100);\n //set_wc(1,8);\n //set_large_wc(1,12);\n //set_type(\"piercing\");\n set_property(\"enchantment\", 2);\n}\n"}
254
c
/* * cubieboard emulation * * Copyright (C) 2013 <NAME> * Written by <NAME> <<EMAIL>> * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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. */ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/devices.h" #include "hw/boards.h" #include "hw/arm/allwinner-a10.h" static struct arm_boot_info cubieboard_binfo = { .loader_start = AW_A10_SDRAM_BASE, .board_id = 0x1008, }; typedef struct CubieBoardState { AwA10State *a10; MemoryRegion sdram; } CubieBoardState; static void cubieboard_init(MachineState *machine) { CubieBoardState *s = g_new(CubieBoardState, 1); Error *err = NULL; s->a10 = AW_A10(object_new(TYPE_AW_A10)); object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err); if (err != NULL) { error_reportf_err(err, "Couldn't set phy address: "); exit(1); } object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err); if (err != NULL) { error_reportf_err(err, "Couldn't set clk0 frequency: "); exit(1); } object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq", &err); if (err != NULL) { error_reportf_err(err, "Couldn't set clk1 frequency: "); exit(1); } object_property_set_bool(OBJECT(s->a10), true, "realized", &err); if (err != NULL) { error_reportf_err(err, "Couldn't realize Allwinner A10: "); exit(1); } memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram", machine->ram_size); memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE, &s->sdram); cubieboard_binfo.ram_size = machine->ram_size; cubieboard_binfo.kernel_filename = machine->kernel_filename; cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline; arm_load_kernel(&s->a10->cpu, &cubieboard_binfo); } static void cubieboard_machine_init(MachineClass *mc) { mc->desc = "cubietech cubieboard"; mc->init = cubieboard_init; } DEFINE_MACHINE("cubieboard", cubieboard_machine_init)
35.54
70
(translation_unit) "/*\n * cubieboard emulation\n *\n * Copyright (C) 2013 <NAME>\n * Written by <NAME> <<EMAIL>>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * for more details.\n */\n\n#include "qemu/osdep.h"\n#include "hw/sysbus.h"\n#include "hw/devices.h"\n#include "hw/boards.h"\n#include "hw/arm/allwinner-a10.h"\n\nstatic struct arm_boot_info cubieboard_binfo = {\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n};\n\ntypedef struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n} CubieBoardState;\n\nstatic void cubieboard_init(MachineState *machine)\n{\n CubieBoardState *s = g_new(CubieBoardState, 1);\n Error *err = NULL;\n\n s->a10 = AW_A10(object_new(TYPE_AW_A10));\n\n object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set phy address: ");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk0 frequency: ");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq",\n &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk1 frequency: ");\n exit(1);\n }\n\n object_property_set_bool(OBJECT(s->a10), true, "realized", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't realize Allwinner A10: ");\n exit(1);\n }\n\n memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram",\n machine->ram_size);\n memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram);\n\n cubieboard_binfo.ram_size = machine->ram_size;\n cubieboard_binfo.kernel_filename = machine->kernel_filename;\n cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline;\n arm_load_kernel(&s->a10->cpu, &cubieboard_binfo);\n}\n\nstatic void cubieboard_machine_init(MachineClass *mc)\n{\n mc->desc = "cubietech cubieboard";\n mc->init = cubieboard_init;\n}\n\nDEFINE_MACHINE("cubieboard", cubieboard_machine_init)\n" (comment) "/*\n * cubieboard emulation\n *\n * Copyright (C) 2013 <NAME>\n * Written by <NAME> <<EMAIL>>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * for more details.\n */" (preproc_include) "#include "qemu/osdep.h"\n" (#include) "#include" (string_literal) ""qemu/osdep.h"" (") """ (string_content) "qemu/osdep.h" (") """ (preproc_include) "#include "hw/sysbus.h"\n" (#include) "#include" (string_literal) ""hw/sysbus.h"" (") """ (string_content) "hw/sysbus.h" (") """ (preproc_include) "#include "hw/devices.h"\n" (#include) "#include" (string_literal) ""hw/devices.h"" (") """ (string_content) "hw/devices.h" (") """ (preproc_include) "#include "hw/boards.h"\n" (#include) "#include" (string_literal) ""hw/boards.h"" (") """ (string_content) "hw/boards.h" (") """ (preproc_include) "#include "hw/arm/allwinner-a10.h"\n" (#include) "#include" (string_literal) ""hw/arm/allwinner-a10.h"" (") """ (string_content) "hw/arm/allwinner-a10.h" (") """ (declaration) "static struct arm_boot_info cubieboard_binfo = {\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct arm_boot_info" (struct) "struct" (type_identifier) "arm_boot_info" (init_declarator) "cubieboard_binfo = {\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n}" (identifier) "cubieboard_binfo" (=) "=" (initializer_list) "{\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n}" ({) "{" (initializer_pair) ".loader_start = AW_A10_SDRAM_BASE" (field_designator) ".loader_start" (.) "." (field_identifier) "loader_start" (=) "=" (identifier) "AW_A10_SDRAM_BASE" (,) "," (initializer_pair) ".board_id = 0x1008" (field_designator) ".board_id" (.) "." (field_identifier) "board_id" (=) "=" (number_literal) "0x1008" (,) "," (}) "}" (;) ";" (type_definition) "typedef struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n} CubieBoardState;" (typedef) "typedef" (struct_specifier) "struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n}" (struct) "struct" (type_identifier) "CubieBoardState" (field_declaration_list) "{\n AwA10State *a10;\n MemoryRegion sdram;\n}" ({) "{" (field_declaration) "AwA10State *a10;" (type_identifier) "AwA10State" (pointer_declarator) "*a10" (*) "*" (field_identifier) "a10" (;) ";" (field_declaration) "MemoryRegion sdram;" (type_identifier) "MemoryRegion" (field_identifier) "sdram" (;) ";" (}) "}" (type_identifier) "CubieBoardState" (;) ";" (function_definition) "static void cubieboard_init(MachineState *machine)\n{\n CubieBoardState *s = g_new(CubieBoardState, 1);\n Error *err = NULL;\n\n s->a10 = AW_A10(object_new(TYPE_AW_A10));\n\n object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set phy address: ");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk0 frequency: ");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq",\n &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk1 frequency: ");\n exit(1);\n }\n\n object_property_set_bool(OBJECT(s->a10), true, "realized", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't realize Allwinner A10: ");\n exit(1);\n }\n\n memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram",\n machine->ram_size);\n memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram);\n\n cubieboard_binfo.ram_size = machine->ram_size;\n cubieboard_binfo.kernel_filename = machine->kernel_filename;\n cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline;\n arm_load_kernel(&s->a10->cpu, &cubieboard_binfo);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "cubieboard_init(MachineState *machine)" (identifier) "cubieboard_init" (parameter_list) "(MachineState *machine)" (() "(" (parameter_declaration) "MachineState *machine" (type_identifier) "MachineState" (pointer_declarator) "*machine" (*) "*" (identifier) "machine" ()) ")" (compound_statement) "{\n CubieBoardState *s = g_new(CubieBoardState, 1);\n Error *err = NULL;\n\n s->a10 = AW_A10(object_new(TYPE_AW_A10));\n\n object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set phy address: ");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk0 frequency: ");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq",\n &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk1 frequency: ");\n exit(1);\n }\n\n object_property_set_bool(OBJECT(s->a10), true, "realized", &err);\n if (err != NULL) {\n error_reportf_err(err, "Couldn't realize Allwinner A10: ");\n exit(1);\n }\n\n memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram",\n machine->ram_size);\n memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram);\n\n cubieboard_binfo.ram_size = machine->ram_size;\n cubieboard_binfo.kernel_filename = machine->kernel_filename;\n cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline;\n arm_load_kernel(&s->a10->cpu, &cubieboard_binfo);\n}" ({) "{" (declaration) "CubieBoardState *s = g_new(CubieBoardState, 1);" (type_identifier) "CubieBoardState" (init_declarator) "*s = g_new(CubieBoardState, 1)" (pointer_declarator) "*s" (*) "*" (identifier) "s" (=) "=" (call_expression) "g_new(CubieBoardState, 1)" (identifier) "g_new" (argument_list) "(CubieBoardState, 1)" (() "(" (identifier) "CubieBoardState" (,) "," (number_literal) "1" ()) ")" (;) ";" (declaration) "Error *err = NULL;" (type_identifier) "Error" (init_declarator) "*err = NULL" (pointer_declarator) "*err" (*) "*" (identifier) "err" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "s->a10 = AW_A10(object_new(TYPE_AW_A10));" (assignment_expression) "s->a10 = AW_A10(object_new(TYPE_AW_A10))" (field_expression) "s->a10" (identifier) "s" (->) "->" (field_identifier) "a10" (=) "=" (call_expression) "AW_A10(object_new(TYPE_AW_A10))" (identifier) "AW_A10" (argument_list) "(object_new(TYPE_AW_A10))" (() "(" (call_expression) "object_new(TYPE_AW_A10)" (identifier) "object_new" (argument_list) "(TYPE_AW_A10)" (() "(" (identifier) "TYPE_AW_A10" ()) ")" ()) ")" (;) ";" (expression_statement) "object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err);" (call_expression) "object_property_set_int(OBJECT(&s->a10->emac), 1, "phy-addr", &err)" (identifier) "object_property_set_int" (argument_list) "(OBJECT(&s->a10->emac), 1, "phy-addr", &err)" (() "(" (call_expression) "OBJECT(&s->a10->emac)" (identifier) "OBJECT" (argument_list) "(&s->a10->emac)" (() "(" (pointer_expression) "&s->a10->emac" (&) "&" (field_expression) "s->a10->emac" (field_expression) "s->a10" (identifier) "s" (->) "->" (field_identifier) "a10" (->) "->" (field_identifier) "emac" ()) ")" (,) "," (number_literal) "1" (,) "," (string_literal) ""phy-addr"" (") """ (string_content) "phy-addr" (") """ (,) "," (pointer_expression) "&err" (&) "&" (identifier) "err" ()) ")" (;) ";" (if_statement) "if (err != NULL) {\n error_reportf_err(err, "Couldn't set phy address: ");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(err != NULL)" (() "(" (binary_expression) "err != NULL" (identifier) "err" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n error_reportf_err(err, "Couldn't set phy address: ");\n exit(1);\n }" ({) "{" (expression_statement) "error_reportf_err(err, "Couldn't set phy address: ");" (call_expression) "error_reportf_err(err, "Couldn't set phy address: ")" (identifier) "error_reportf_err" (argument_list) "(err, "Couldn't set phy address: ")" (() "(" (identifier) "err" (,) "," (string_literal) ""Couldn't set phy address: "" (") """ (string_content) "Couldn't set phy address: " (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err);" (call_expression) "object_property_set_int(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err)" (identifier) "object_property_set_int" (argument_list) "(OBJECT(&s->a10->timer), 32768, "clk0-freq", &err)" (() "(" (call_expression) "OBJECT(&s->a10->timer)" (identifier) "OBJECT" (argument_list) "(&s->a10->timer)" (() "(" (pointer_expression) "&s->a10->timer" (&) "&" (field_expression) "s->a10->timer" (field_expression) "s->a10" (identifier) "s" (->) "->" (field_identifier) "a10" (->) "->" (field_identifier) "timer" ()) ")" (,) "," (number_literal) "32768" (,) "," (string_literal) ""clk0-freq"" (") """ (string_content) "clk0-freq" (") """ (,) "," (pointer_expression) "&err" (&) "&" (identifier) "err" ()) ")" (;) ";" (if_statement) "if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk0 frequency: ");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(err != NULL)" (() "(" (binary_expression) "err != NULL" (identifier) "err" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n error_reportf_err(err, "Couldn't set clk0 frequency: ");\n exit(1);\n }" ({) "{" (expression_statement) "error_reportf_err(err, "Couldn't set clk0 frequency: ");" (call_expression) "error_reportf_err(err, "Couldn't set clk0 frequency: ")" (identifier) "error_reportf_err" (argument_list) "(err, "Couldn't set clk0 frequency: ")" (() "(" (identifier) "err" (,) "," (string_literal) ""Couldn't set clk0 frequency: "" (") """ (string_content) "Couldn't set clk0 frequency: " (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq",\n &err);" (call_expression) "object_property_set_int(OBJECT(&s->a10->timer), 24000000, "clk1-freq",\n &err)" (identifier) "object_property_set_int" (argument_list) "(OBJECT(&s->a10->timer), 24000000, "clk1-freq",\n &err)" (() "(" (call_expression) "OBJECT(&s->a10->timer)" (identifier) "OBJECT" (argument_list) "(&s->a10->timer)" (() "(" (pointer_expression) "&s->a10->timer" (&) "&" (field_expression) "s->a10->timer" (field_expression) "s->a10" (identifier) "s" (->) "->" (field_identifier) "a10" (->) "->" (field_identifier) "timer" ()) ")" (,) "," (number_literal) "24000000" (,) "," (string_literal) ""clk1-freq"" (") """ (string_content) "clk1-freq" (") """ (,) "," (pointer_expression) "&err" (&) "&" (identifier) "err" ()) ")" (;) ";" (if_statement) "if (err != NULL) {\n error_reportf_err(err, "Couldn't set clk1 frequency: ");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(err != NULL)" (() "(" (binary_expression) "err != NULL" (identifier) "err" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n error_reportf_err(err, "Couldn't set clk1 frequency: ");\n exit(1);\n }" ({) "{" (expression_statement) "error_reportf_err(err, "Couldn't set clk1 frequency: ");" (call_expression) "error_reportf_err(err, "Couldn't set clk1 frequency: ")" (identifier) "error_reportf_err" (argument_list) "(err, "Couldn't set clk1 frequency: ")" (() "(" (identifier) "err" (,) "," (string_literal) ""Couldn't set clk1 frequency: "" (") """ (string_content) "Couldn't set clk1 frequency: " (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "object_property_set_bool(OBJECT(s->a10), true, "realized", &err);" (call_expression) "object_property_set_bool(OBJECT(s->a10), true, "realized", &err)" (identifier) "object_property_set_bool" (argument_list) "(OBJECT(s->a10), true, "realized", &err)" (() "(" (call_expression) "OBJECT(s->a10)" (identifier) "OBJECT" (argument_list) "(s->a10)" (() "(" (field_expression) "s->a10" (identifier) "s" (->) "->" (field_identifier) "a10" ()) ")" (,) "," (true) "true" (,) "," (string_literal) ""realized"" (") """ (string_content) "realized" (") """ (,) "," (pointer_expression) "&err" (&) "&" (identifier) "err" ()) ")" (;) ";" (if_statement) "if (err != NULL) {\n error_reportf_err(err, "Couldn't realize Allwinner A10: ");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(err != NULL)" (() "(" (binary_expression) "err != NULL" (identifier) "err" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n error_reportf_err(err, "Couldn't realize Allwinner A10: ");\n exit(1);\n }" ({) "{" (expression_statement) "error_reportf_err(err, "Couldn't realize Allwinner A10: ");" (call_expression) "error_reportf_err(err, "Couldn't realize Allwinner A10: ")" (identifier) "error_reportf_err" (argument_list) "(err, "Couldn't realize Allwinner A10: ")" (() "(" (identifier) "err" (,) "," (string_literal) ""Couldn't realize Allwinner A10: "" (") """ (string_content) "Couldn't realize Allwinner A10: " (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram",\n machine->ram_size);" (call_expression) "memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram",\n machine->ram_size)" (identifier) "memory_region_allocate_system_memory" (argument_list) "(&s->sdram, NULL, "cubieboard.ram",\n machine->ram_size)" (() "(" (pointer_expression) "&s->sdram" (&) "&" (field_expression) "s->sdram" (identifier) "s" (->) "->" (field_identifier) "sdram" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (string_literal) ""cubieboard.ram"" (") """ (string_content) "cubieboard.ram" (") """ (,) "," (field_expression) "machine->ram_size" (identifier) "machine" (->) "->" (field_identifier) "ram_size" ()) ")" (;) ";" (expression_statement) "memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram);" (call_expression) "memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram)" (identifier) "memory_region_add_subregion" (argument_list) "(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram)" (() "(" (call_expression) "get_system_memory()" (identifier) "get_system_memory" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "AW_A10_SDRAM_BASE" (,) "," (pointer_expression) "&s->sdram" (&) "&" (field_expression) "s->sdram" (identifier) "s" (->) "->" (field_identifier) "sdram" ()) ")" (;) ";" (expression_statement) "cubieboard_binfo.ram_size = machine->ram_size;" (assignment_expression) "cubieboard_binfo.ram_size = machine->ram_size" (field_expression) "cubieboard_binfo.ram_size" (identifier) "cubieboard_binfo" (.) "." (field_identifier) "ram_size" (=) "=" (field_expression) "machine->ram_size" (identifier) "machine" (->) "->" (field_identifier) "ram_size" (;) ";" (expression_statement) "cubieboard_binfo.kernel_filename = machine->kernel_filename;" (assignment_expression) "cubieboard_binfo.kernel_filename = machine->kernel_filename" (field_expression) "cubieboard_binfo.kernel_filename" (identifier) "cubieboard_binfo" (.) "." (field_identifier) "kernel_filename" (=) "=" (field_expression) "machine->kernel_filename" (identifier) "machine" (->) "->" (field_identifier) "kernel_filename" (;) ";" (expression_statement) "cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline;" (assignment_expression) "cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline" (field_expression) "cubieboard_binfo.kernel_cmdline" (identifier) "cubieboard_binfo" (.) "." (field_identifier) "kernel_cmdline" (=) "=" (field_expression) "machine->kernel_cmdline" (identifier) "machine" (->) "->" (field_identifier) "kernel_cmdline" (;) ";" (expression_statement) "arm_load_kernel(&s->a10->cpu, &cubieboard_binfo);" (call_expression) "arm_load_kernel(&s->a10->cpu, &cubieboard_binfo)" (identifier) "arm_load_kernel" (argument_list) "(&s->a10->cpu, &cubieboard_binfo)" (() "(" (pointer_expression) "&s->a10->cpu" (&) "&" (field_expression) "s->a10->cpu" (field_expression) "s->a10" (identifier) "s" (->) "->" (field_identifier) "a10" (->) "->" (field_identifier) "cpu" (,) "," (pointer_expression) "&cubieboard_binfo" (&) "&" (identifier) "cubieboard_binfo" ()) ")" (;) ";" (}) "}" (function_definition) "static void cubieboard_machine_init(MachineClass *mc)\n{\n mc->desc = "cubietech cubieboard";\n mc->init = cubieboard_init;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "cubieboard_machine_init(MachineClass *mc)" (identifier) "cubieboard_machine_init" (parameter_list) "(MachineClass *mc)" (() "(" (parameter_declaration) "MachineClass *mc" (type_identifier) "MachineClass" (pointer_declarator) "*mc" (*) "*" (identifier) "mc" ()) ")" (compound_statement) "{\n mc->desc = "cubietech cubieboard";\n mc->init = cubieboard_init;\n}" ({) "{" (expression_statement) "mc->desc = "cubietech cubieboard";" (assignment_expression) "mc->desc = "cubietech cubieboard"" (field_expression) "mc->desc" (identifier) "mc" (->) "->" (field_identifier) "desc" (=) "=" (string_literal) ""cubietech cubieboard"" (") """ (string_content) "cubietech cubieboard" (") """ (;) ";" (expression_statement) "mc->init = cubieboard_init;" (assignment_expression) "mc->init = cubieboard_init" (field_expression) "mc->init" (identifier) "mc" (->) "->" (field_identifier) "init" (=) "=" (identifier) "cubieboard_init" (;) ";" (}) "}" (expression_statement) "DEFINE_MACHINE("cubieboard", cubieboard_machine_init)" (call_expression) "DEFINE_MACHINE("cubieboard", cubieboard_machine_init)" (identifier) "DEFINE_MACHINE" (argument_list) "("cubieboard", cubieboard_machine_init)" (() "(" (string_literal) ""cubieboard"" (") """ (string_content) "cubieboard" (") """ (,) "," (identifier) "cubieboard_machine_init" ()) ")" (;) ""
554
0
{"language": "c", "success": true, "metadata": {"lines": 70, "avg_line_length": 35.54, "nodes": 301, "errors": 0, "source_hash": "449c23717576d2f27722167b6ee991a4724576fbffd372ab3d3092cf5c36221b", "categorized_nodes": 228}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"qemu/osdep.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"qemu/osdep.h\"", "parent": 0, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 23}}, {"id": 3, "type": "preproc_include", "text": "#include \"hw/sysbus.h\"\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": "string_literal", "text": "\"hw/sysbus.h\"", "parent": 3, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"hw/devices.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"hw/devices.h\"", "parent": 6, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include \"hw/boards.h\"\n", "parent": null, "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": "\"hw/boards.h\"", "parent": 9, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "#include \"hw/arm/allwinner-a10.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"hw/arm/allwinner-a10.h\"", "parent": 12, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 33}}, {"id": 15, "type": "declaration", "text": "static struct arm_boot_info cubieboard_binfo = {\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n};", "parent": null, "children": [16, 19], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 26, "column": 2}}, {"id": 16, "type": "struct_specifier", "text": "struct arm_boot_info", "parent": 15, "children": [17, 18], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 27}}, {"id": 17, "type": "struct", "text": "struct", "parent": 16, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 13}}, {"id": 18, "type": "type_identifier", "text": "arm_boot_info", "parent": 16, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 27}}, {"id": 19, "type": "init_declarator", "text": "cubieboard_binfo = {\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n}", "parent": 15, "children": [20, 21, 22], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 26, "column": 1}}, {"id": 20, "type": "identifier", "text": "cubieboard_binfo", "parent": 19, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 44}}, {"id": 21, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 23, "column": 45}, "end_point": {"row": 23, "column": 46}}, {"id": 22, "type": "initializer_list", "text": "{\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n}", "parent": 19, "children": [23, 28], "start_point": {"row": 23, "column": 47}, "end_point": {"row": 26, "column": 1}}, {"id": 23, "type": "initializer_pair", "text": ".loader_start = AW_A10_SDRAM_BASE", "parent": 22, "children": [24, 26, 27], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 37}}, {"id": 24, "type": "field_designator", "text": ".loader_start", "parent": 23, "children": [25], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 17}}, {"id": 25, "type": "field_identifier", "text": "loader_start", "parent": 24, "children": [], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 17}}, {"id": 26, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 19}}, {"id": 27, "type": "identifier", "text": "AW_A10_SDRAM_BASE", "parent": 23, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 37}}, {"id": 28, "type": "initializer_pair", "text": ".board_id = 0x1008", "parent": 22, "children": [29, 31, 32], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 22}}, {"id": 29, "type": "field_designator", "text": ".board_id", "parent": 28, "children": [30], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 13}}, {"id": 30, "type": "field_identifier", "text": "board_id", "parent": 29, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 13}}, {"id": 31, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 15}}, {"id": 32, "type": "number_literal", "text": "0x1008", "parent": 28, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 22}}, {"id": 33, "type": "type_definition", "text": "typedef struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n} CubieBoardState;", "parent": null, "children": [34, 35, 46], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 31, "column": 18}}, {"id": 34, "type": "typedef", "text": "typedef", "parent": 33, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 35, "type": "struct_specifier", "text": "struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n}", "parent": 33, "children": [36, 37], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 31, "column": 1}}, {"id": 36, "type": "struct", "text": "struct", "parent": 35, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 14}}, {"id": 37, "type": "type_identifier", "text": "CubieBoardState", "parent": 35, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 30}}, {"id": 38, "type": "field_declaration", "text": "AwA10State *a10;", "parent": 35, "children": [39, 40], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 20}}, {"id": 39, "type": "type_identifier", "text": "AwA10State", "parent": 38, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 14}}, {"id": 40, "type": "pointer_declarator", "text": "*a10", "parent": 38, "children": [41, 42], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 19}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 16}}, {"id": 42, "type": "field_identifier", "text": "a10", "parent": 40, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 19}}, {"id": 43, "type": "field_declaration", "text": "MemoryRegion sdram;", "parent": 35, "children": [44, 45], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 23}}, {"id": 44, "type": "type_identifier", "text": "MemoryRegion", "parent": 43, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 16}}, {"id": 45, "type": "field_identifier", "text": "sdram", "parent": 43, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 22}}, {"id": 46, "type": "type_identifier", "text": "CubieBoardState", "parent": 33, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 17}}, {"id": 47, "type": "function_definition", "text": "static void cubieboard_init(MachineState *machine)\n{\n CubieBoardState *s = g_new(CubieBoardState, 1);\n Error *err = NULL;\n\n s->a10 = AW_A10(object_new(TYPE_AW_A10));\n\n object_property_set_int(OBJECT(&s->a10->emac), 1, \"phy-addr\", &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't set phy address: \");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 32768, \"clk0-freq\", &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't set clk0 frequency: \");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 24000000, \"clk1-freq\",\n &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't set clk1 frequency: \");\n exit(1);\n }\n\n object_property_set_bool(OBJECT(s->a10), true, \"realized\", &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't realize Allwinner A10: \");\n exit(1);\n }\n\n memory_region_allocate_system_memory(&s->sdram, NULL, \"cubieboard.ram\",\n machine->ram_size);\n memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram);\n\n cubieboard_binfo.ram_size = machine->ram_size;\n cubieboard_binfo.kernel_filename = machine->kernel_filename;\n cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline;\n arm_load_kernel(&s->a10->cpu, &cubieboard_binfo);\n}", "parent": null, "children": [48, 49], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 11}}, {"id": 49, "type": "function_declarator", "text": "cubieboard_init(MachineState *machine)", "parent": 47, "children": [50, 51], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 50}}, {"id": 50, "type": "identifier", "text": "cubieboard_init", "parent": 49, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 27}}, {"id": 51, "type": "parameter_list", "text": "(MachineState *machine)", "parent": 49, "children": [52], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 50}}, {"id": 52, "type": "parameter_declaration", "text": "MachineState *machine", "parent": 51, "children": [53, 54], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 49}}, {"id": 53, "type": "type_identifier", "text": "MachineState", "parent": 52, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 40}}, {"id": 54, "type": "pointer_declarator", "text": "*machine", "parent": 52, "children": [55, 56], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 49}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 42}}, {"id": 56, "type": "identifier", "text": "machine", "parent": 54, "children": [], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 33, "column": 49}}, {"id": 57, "type": "declaration", "text": "CubieBoardState *s = g_new(CubieBoardState, 1);", "parent": 47, "children": [58, 59], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 51}}, {"id": 58, "type": "type_identifier", "text": "CubieBoardState", "parent": 57, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 19}}, {"id": 59, "type": "init_declarator", "text": "*s = g_new(CubieBoardState, 1)", "parent": 57, "children": [60, 63, 64], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 50}}, {"id": 60, "type": "pointer_declarator", "text": "*s", "parent": 59, "children": [61, 62], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 22}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 21}}, {"id": 62, "type": "identifier", "text": "s", "parent": 60, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 22}}, {"id": 63, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 24}}, {"id": 64, "type": "call_expression", "text": "g_new(CubieBoardState, 1)", "parent": 59, "children": [65, 66], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 50}}, {"id": 65, "type": "identifier", "text": "g_new", "parent": 64, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 30}}, {"id": 66, "type": "argument_list", "text": "(CubieBoardState, 1)", "parent": 64, "children": [67, 68], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 50}}, {"id": 67, "type": "identifier", "text": "CubieBoardState", "parent": 66, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 46}}, {"id": 68, "type": "number_literal", "text": "1", "parent": 66, "children": [], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 49}}, {"id": 69, "type": "declaration", "text": "Error *err = NULL;", "parent": 47, "children": [70, 71], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 22}}, {"id": 70, "type": "type_identifier", "text": "Error", "parent": 69, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 9}}, {"id": 71, "type": "init_declarator", "text": "*err = NULL", "parent": 69, "children": [72, 75, 76], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 21}}, {"id": 72, "type": "pointer_declarator", "text": "*err", "parent": 71, "children": [73, 74], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 14}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 11}}, {"id": 74, "type": "identifier", "text": "err", "parent": 72, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 14}}, {"id": 75, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 16}}, {"id": 76, "type": "null", "text": "NULL", "parent": 71, "children": [77], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 21}}, {"id": 77, "type": "NULL", "text": "NULL", "parent": 76, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 21}}, {"id": 78, "type": "assignment_expression", "text": "s->a10 = AW_A10(object_new(TYPE_AW_A10))", "parent": 47, "children": [79, 82, 83], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 44}}, {"id": 79, "type": "field_expression", "text": "s->a10", "parent": 78, "children": [80, 81], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 80, "type": "identifier", "text": "s", "parent": 79, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 5}}, {"id": 81, "type": "field_identifier", "text": "a10", "parent": 79, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 10}}, {"id": 82, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 12}}, {"id": 83, "type": "call_expression", "text": "AW_A10(object_new(TYPE_AW_A10))", "parent": 78, "children": [84, 85], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 44}}, {"id": 84, "type": "identifier", "text": "AW_A10", "parent": 83, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 19}}, {"id": 85, "type": "argument_list", "text": "(object_new(TYPE_AW_A10))", "parent": 83, "children": [86], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 44}}, {"id": 86, "type": "call_expression", "text": "object_new(TYPE_AW_A10)", "parent": 85, "children": [87, 88], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 43}}, {"id": 87, "type": "identifier", "text": "object_new", "parent": 86, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 30}}, {"id": 88, "type": "argument_list", "text": "(TYPE_AW_A10)", "parent": 86, "children": [89], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 43}}, {"id": 89, "type": "identifier", "text": "TYPE_AW_A10", "parent": 88, "children": [], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 38, "column": 42}}, {"id": 90, "type": "call_expression", "text": "object_property_set_int(OBJECT(&s->a10->emac), 1, \"phy-addr\", &err)", "parent": 47, "children": [91, 92], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 71}}, {"id": 91, "type": "identifier", "text": "object_property_set_int", "parent": 90, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 27}}, {"id": 92, "type": "argument_list", "text": "(OBJECT(&s->a10->emac), 1, \"phy-addr\", &err)", "parent": 90, "children": [93, 102, 103, 104], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 71}}, {"id": 93, "type": "call_expression", "text": "OBJECT(&s->a10->emac)", "parent": 92, "children": [94, 95], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 49}}, {"id": 94, "type": "identifier", "text": "OBJECT", "parent": 93, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 34}}, {"id": 95, "type": "argument_list", "text": "(&s->a10->emac)", "parent": 93, "children": [96], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 49}}, {"id": 96, "type": "pointer_expression", "text": "&s->a10->emac", "parent": 95, "children": [97], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 48}}, {"id": 97, "type": "field_expression", "text": "s->a10->emac", "parent": 96, "children": [98, 101], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 48}}, {"id": 98, "type": "field_expression", "text": "s->a10", "parent": 97, "children": [99, 100], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 42}}, {"id": 99, "type": "identifier", "text": "s", "parent": 98, "children": [], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 37}}, {"id": 100, "type": "field_identifier", "text": "a10", "parent": 98, "children": [], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 42}}, {"id": 101, "type": "field_identifier", "text": "emac", "parent": 97, "children": [], "start_point": {"row": 40, "column": 44}, "end_point": {"row": 40, "column": 48}}, {"id": 102, "type": "number_literal", "text": "1", "parent": 92, "children": [], "start_point": {"row": 40, "column": 51}, "end_point": {"row": 40, "column": 52}}, {"id": 103, "type": "string_literal", "text": "\"phy-addr\"", "parent": 92, "children": [], "start_point": {"row": 40, "column": 54}, "end_point": {"row": 40, "column": 64}}, {"id": 104, "type": "pointer_expression", "text": "&err", "parent": 92, "children": [105], "start_point": {"row": 40, "column": 66}, "end_point": {"row": 40, "column": 70}}, {"id": 105, "type": "identifier", "text": "err", "parent": 104, "children": [], "start_point": {"row": 40, "column": 67}, "end_point": {"row": 40, "column": 70}}, {"id": 106, "type": "if_statement", "text": "if (err != NULL) {\n error_reportf_err(err, \"Couldn't set phy address: \");\n exit(1);\n }", "parent": 47, "children": [107], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 44, "column": 5}}, {"id": 107, "type": "parenthesized_expression", "text": "(err != NULL)", "parent": 106, "children": [108], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 20}}, {"id": 108, "type": "binary_expression", "text": "err != NULL", "parent": 107, "children": [109, 110, 111], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 19}}, {"id": 109, "type": "identifier", "text": "err", "parent": 108, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 11}}, {"id": 110, "type": "!=", "text": "!=", "parent": 108, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 14}}, {"id": 111, "type": "null", "text": "NULL", "parent": 108, "children": [112], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 19}}, {"id": 112, "type": "NULL", "text": "NULL", "parent": 111, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 19}}, {"id": 113, "type": "call_expression", "text": "error_reportf_err(err, \"Couldn't set phy address: \")", "parent": 106, "children": [114, 115], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 60}}, {"id": 114, "type": "identifier", "text": "error_reportf_err", "parent": 113, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 25}}, {"id": 115, "type": "argument_list", "text": "(err, \"Couldn't set phy address: \")", "parent": 113, "children": [116, 117], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 60}}, {"id": 116, "type": "identifier", "text": "err", "parent": 115, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 29}}, {"id": 117, "type": "string_literal", "text": "\"Couldn't set phy address: \"", "parent": 115, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 59}}, {"id": 118, "type": "call_expression", "text": "exit(1)", "parent": 106, "children": [119, 120], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 15}}, {"id": 119, "type": "identifier", "text": "exit", "parent": 118, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 120, "type": "argument_list", "text": "(1)", "parent": 118, "children": [121], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 15}}, {"id": 121, "type": "number_literal", "text": "1", "parent": 120, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 14}}, {"id": 122, "type": "call_expression", "text": "object_property_set_int(OBJECT(&s->a10->timer), 32768, \"clk0-freq\", &err)", "parent": 47, "children": [123, 124], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 77}}, {"id": 123, "type": "identifier", "text": "object_property_set_int", "parent": 122, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 27}}, {"id": 124, "type": "argument_list", "text": "(OBJECT(&s->a10->timer), 32768, \"clk0-freq\", &err)", "parent": 122, "children": [125, 134, 135, 136], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 77}}, {"id": 125, "type": "call_expression", "text": "OBJECT(&s->a10->timer)", "parent": 124, "children": [126, 127], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 50}}, {"id": 126, "type": "identifier", "text": "OBJECT", "parent": 125, "children": [], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 34}}, {"id": 127, "type": "argument_list", "text": "(&s->a10->timer)", "parent": 125, "children": [128], "start_point": {"row": 46, "column": 34}, "end_point": {"row": 46, "column": 50}}, {"id": 128, "type": "pointer_expression", "text": "&s->a10->timer", "parent": 127, "children": [129], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 49}}, {"id": 129, "type": "field_expression", "text": "s->a10->timer", "parent": 128, "children": [130, 133], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 49}}, {"id": 130, "type": "field_expression", "text": "s->a10", "parent": 129, "children": [131, 132], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 42}}, {"id": 131, "type": "identifier", "text": "s", "parent": 130, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 37}}, {"id": 132, "type": "field_identifier", "text": "a10", "parent": 130, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 42}}, {"id": 133, "type": "field_identifier", "text": "timer", "parent": 129, "children": [], "start_point": {"row": 46, "column": 44}, "end_point": {"row": 46, "column": 49}}, {"id": 134, "type": "number_literal", "text": "32768", "parent": 124, "children": [], "start_point": {"row": 46, "column": 52}, "end_point": {"row": 46, "column": 57}}, {"id": 135, "type": "string_literal", "text": "\"clk0-freq\"", "parent": 124, "children": [], "start_point": {"row": 46, "column": 59}, "end_point": {"row": 46, "column": 70}}, {"id": 136, "type": "pointer_expression", "text": "&err", "parent": 124, "children": [137], "start_point": {"row": 46, "column": 72}, "end_point": {"row": 46, "column": 76}}, {"id": 137, "type": "identifier", "text": "err", "parent": 136, "children": [], "start_point": {"row": 46, "column": 73}, "end_point": {"row": 46, "column": 76}}, {"id": 138, "type": "if_statement", "text": "if (err != NULL) {\n error_reportf_err(err, \"Couldn't set clk0 frequency: \");\n exit(1);\n }", "parent": 47, "children": [139], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 50, "column": 5}}, {"id": 139, "type": "parenthesized_expression", "text": "(err != NULL)", "parent": 138, "children": [140], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 20}}, {"id": 140, "type": "binary_expression", "text": "err != NULL", "parent": 139, "children": [141, 142, 143], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 19}}, {"id": 141, "type": "identifier", "text": "err", "parent": 140, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 11}}, {"id": 142, "type": "!=", "text": "!=", "parent": 140, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 14}}, {"id": 143, "type": "null", "text": "NULL", "parent": 140, "children": [144], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 19}}, {"id": 144, "type": "NULL", "text": "NULL", "parent": 143, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 19}}, {"id": 145, "type": "call_expression", "text": "error_reportf_err(err, \"Couldn't set clk0 frequency: \")", "parent": 138, "children": [146, 147], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 63}}, {"id": 146, "type": "identifier", "text": "error_reportf_err", "parent": 145, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 25}}, {"id": 147, "type": "argument_list", "text": "(err, \"Couldn't set clk0 frequency: \")", "parent": 145, "children": [148, 149], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 63}}, {"id": 148, "type": "identifier", "text": "err", "parent": 147, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 29}}, {"id": 149, "type": "string_literal", "text": "\"Couldn't set clk0 frequency: \"", "parent": 147, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 62}}, {"id": 150, "type": "call_expression", "text": "exit(1)", "parent": 138, "children": [151, 152], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 15}}, {"id": 151, "type": "identifier", "text": "exit", "parent": 150, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 12}}, {"id": 152, "type": "argument_list", "text": "(1)", "parent": 150, "children": [153], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 15}}, {"id": 153, "type": "number_literal", "text": "1", "parent": 152, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 154, "type": "call_expression", "text": "object_property_set_int(OBJECT(&s->a10->timer), 24000000, \"clk1-freq\",\n &err)", "parent": 47, "children": [155, 156], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 53, "column": 33}}, {"id": 155, "type": "identifier", "text": "object_property_set_int", "parent": 154, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 27}}, {"id": 156, "type": "argument_list", "text": "(OBJECT(&s->a10->timer), 24000000, \"clk1-freq\",\n &err)", "parent": 154, "children": [157, 166, 167, 168], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 53, "column": 33}}, {"id": 157, "type": "call_expression", "text": "OBJECT(&s->a10->timer)", "parent": 156, "children": [158, 159], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 50}}, {"id": 158, "type": "identifier", "text": "OBJECT", "parent": 157, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 34}}, {"id": 159, "type": "argument_list", "text": "(&s->a10->timer)", "parent": 157, "children": [160], "start_point": {"row": 52, "column": 34}, "end_point": {"row": 52, "column": 50}}, {"id": 160, "type": "pointer_expression", "text": "&s->a10->timer", "parent": 159, "children": [161], "start_point": {"row": 52, "column": 35}, "end_point": {"row": 52, "column": 49}}, {"id": 161, "type": "field_expression", "text": "s->a10->timer", "parent": 160, "children": [162, 165], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 49}}, {"id": 162, "type": "field_expression", "text": "s->a10", "parent": 161, "children": [163, 164], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 42}}, {"id": 163, "type": "identifier", "text": "s", "parent": 162, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 37}}, {"id": 164, "type": "field_identifier", "text": "a10", "parent": 162, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 42}}, {"id": 165, "type": "field_identifier", "text": "timer", "parent": 161, "children": [], "start_point": {"row": 52, "column": 44}, "end_point": {"row": 52, "column": 49}}, {"id": 166, "type": "number_literal", "text": "24000000", "parent": 156, "children": [], "start_point": {"row": 52, "column": 52}, "end_point": {"row": 52, "column": 60}}, {"id": 167, "type": "string_literal", "text": "\"clk1-freq\"", "parent": 156, "children": [], "start_point": {"row": 52, "column": 62}, "end_point": {"row": 52, "column": 73}}, {"id": 168, "type": "pointer_expression", "text": "&err", "parent": 156, "children": [169], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 32}}, {"id": 169, "type": "identifier", "text": "err", "parent": 168, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 32}}, {"id": 170, "type": "if_statement", "text": "if (err != NULL) {\n error_reportf_err(err, \"Couldn't set clk1 frequency: \");\n exit(1);\n }", "parent": 47, "children": [171], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 57, "column": 5}}, {"id": 171, "type": "parenthesized_expression", "text": "(err != NULL)", "parent": 170, "children": [172], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 20}}, {"id": 172, "type": "binary_expression", "text": "err != NULL", "parent": 171, "children": [173, 174, 175], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 19}}, {"id": 173, "type": "identifier", "text": "err", "parent": 172, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 11}}, {"id": 174, "type": "!=", "text": "!=", "parent": 172, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 14}}, {"id": 175, "type": "null", "text": "NULL", "parent": 172, "children": [176], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 19}}, {"id": 176, "type": "NULL", "text": "NULL", "parent": 175, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 19}}, {"id": 177, "type": "call_expression", "text": "error_reportf_err(err, \"Couldn't set clk1 frequency: \")", "parent": 170, "children": [178, 179], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 63}}, {"id": 178, "type": "identifier", "text": "error_reportf_err", "parent": 177, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 25}}, {"id": 179, "type": "argument_list", "text": "(err, \"Couldn't set clk1 frequency: \")", "parent": 177, "children": [180, 181], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 63}}, {"id": 180, "type": "identifier", "text": "err", "parent": 179, "children": [], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 29}}, {"id": 181, "type": "string_literal", "text": "\"Couldn't set clk1 frequency: \"", "parent": 179, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 62}}, {"id": 182, "type": "call_expression", "text": "exit(1)", "parent": 170, "children": [183, 184], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 15}}, {"id": 183, "type": "identifier", "text": "exit", "parent": 182, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 12}}, {"id": 184, "type": "argument_list", "text": "(1)", "parent": 182, "children": [185], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 15}}, {"id": 185, "type": "number_literal", "text": "1", "parent": 184, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 14}}, {"id": 186, "type": "call_expression", "text": "object_property_set_bool(OBJECT(s->a10), true, \"realized\", &err)", "parent": 47, "children": [187, 188], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 68}}, {"id": 187, "type": "identifier", "text": "object_property_set_bool", "parent": 186, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 28}}, {"id": 188, "type": "argument_list", "text": "(OBJECT(s->a10), true, \"realized\", &err)", "parent": 186, "children": [189, 195, 196, 197], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 68}}, {"id": 189, "type": "call_expression", "text": "OBJECT(s->a10)", "parent": 188, "children": [190, 191], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 43}}, {"id": 190, "type": "identifier", "text": "OBJECT", "parent": 189, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 35}}, {"id": 191, "type": "argument_list", "text": "(s->a10)", "parent": 189, "children": [192], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 43}}, {"id": 192, "type": "field_expression", "text": "s->a10", "parent": 191, "children": [193, 194], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 42}}, {"id": 193, "type": "identifier", "text": "s", "parent": 192, "children": [], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 37}}, {"id": 194, "type": "field_identifier", "text": "a10", "parent": 192, "children": [], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 59, "column": 42}}, {"id": 195, "type": "true", "text": "true", "parent": 188, "children": [], "start_point": {"row": 59, "column": 45}, "end_point": {"row": 59, "column": 49}}, {"id": 196, "type": "string_literal", "text": "\"realized\"", "parent": 188, "children": [], "start_point": {"row": 59, "column": 51}, "end_point": {"row": 59, "column": 61}}, {"id": 197, "type": "pointer_expression", "text": "&err", "parent": 188, "children": [198], "start_point": {"row": 59, "column": 63}, "end_point": {"row": 59, "column": 67}}, {"id": 198, "type": "identifier", "text": "err", "parent": 197, "children": [], "start_point": {"row": 59, "column": 64}, "end_point": {"row": 59, "column": 67}}, {"id": 199, "type": "if_statement", "text": "if (err != NULL) {\n error_reportf_err(err, \"Couldn't realize Allwinner A10: \");\n exit(1);\n }", "parent": 47, "children": [200], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 63, "column": 5}}, {"id": 200, "type": "parenthesized_expression", "text": "(err != NULL)", "parent": 199, "children": [201], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 20}}, {"id": 201, "type": "binary_expression", "text": "err != NULL", "parent": 200, "children": [202, 203, 204], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 19}}, {"id": 202, "type": "identifier", "text": "err", "parent": 201, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 11}}, {"id": 203, "type": "!=", "text": "!=", "parent": 201, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 14}}, {"id": 204, "type": "null", "text": "NULL", "parent": 201, "children": [205], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 19}}, {"id": 205, "type": "NULL", "text": "NULL", "parent": 204, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 19}}, {"id": 206, "type": "call_expression", "text": "error_reportf_err(err, \"Couldn't realize Allwinner A10: \")", "parent": 199, "children": [207, 208], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 66}}, {"id": 207, "type": "identifier", "text": "error_reportf_err", "parent": 206, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 25}}, {"id": 208, "type": "argument_list", "text": "(err, \"Couldn't realize Allwinner A10: \")", "parent": 206, "children": [209, 210], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 66}}, {"id": 209, "type": "identifier", "text": "err", "parent": 208, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 29}}, {"id": 210, "type": "string_literal", "text": "\"Couldn't realize Allwinner A10: \"", "parent": 208, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 65}}, {"id": 211, "type": "call_expression", "text": "exit(1)", "parent": 199, "children": [212, 213], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 15}}, {"id": 212, "type": "identifier", "text": "exit", "parent": 211, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 12}}, {"id": 213, "type": "argument_list", "text": "(1)", "parent": 211, "children": [214], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 15}}, {"id": 214, "type": "number_literal", "text": "1", "parent": 213, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 14}}, {"id": 215, "type": "call_expression", "text": "memory_region_allocate_system_memory(&s->sdram, NULL, \"cubieboard.ram\",\n machine->ram_size)", "parent": 47, "children": [216, 217], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 66, "column": 59}}, {"id": 216, "type": "identifier", "text": "memory_region_allocate_system_memory", "parent": 215, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 40}}, {"id": 217, "type": "argument_list", "text": "(&s->sdram, NULL, \"cubieboard.ram\",\n machine->ram_size)", "parent": 215, "children": [218, 222, 224, 225], "start_point": {"row": 65, "column": 40}, "end_point": {"row": 66, "column": 59}}, {"id": 218, "type": "pointer_expression", "text": "&s->sdram", "parent": 217, "children": [219], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 50}}, {"id": 219, "type": "field_expression", "text": "s->sdram", "parent": 218, "children": [220, 221], "start_point": {"row": 65, "column": 42}, "end_point": {"row": 65, "column": 50}}, {"id": 220, "type": "identifier", "text": "s", "parent": 219, "children": [], "start_point": {"row": 65, "column": 42}, "end_point": {"row": 65, "column": 43}}, {"id": 221, "type": "field_identifier", "text": "sdram", "parent": 219, "children": [], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 50}}, {"id": 222, "type": "null", "text": "NULL", "parent": 217, "children": [223], "start_point": {"row": 65, "column": 52}, "end_point": {"row": 65, "column": 56}}, {"id": 223, "type": "NULL", "text": "NULL", "parent": 222, "children": [], "start_point": {"row": 65, "column": 52}, "end_point": {"row": 65, "column": 56}}, {"id": 224, "type": "string_literal", "text": "\"cubieboard.ram\"", "parent": 217, "children": [], "start_point": {"row": 65, "column": 58}, "end_point": {"row": 65, "column": 74}}, {"id": 225, "type": "field_expression", "text": "machine->ram_size", "parent": 217, "children": [226, 227], "start_point": {"row": 66, "column": 41}, "end_point": {"row": 66, "column": 58}}, {"id": 226, "type": "identifier", "text": "machine", "parent": 225, "children": [], "start_point": {"row": 66, "column": 41}, "end_point": {"row": 66, "column": 48}}, {"id": 227, "type": "field_identifier", "text": "ram_size", "parent": 225, "children": [], "start_point": {"row": 66, "column": 50}, "end_point": {"row": 66, "column": 58}}, {"id": 228, "type": "call_expression", "text": "memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram)", "parent": 47, "children": [229, 230], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 68, "column": 42}}, {"id": 229, "type": "identifier", "text": "memory_region_add_subregion", "parent": 228, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 31}}, {"id": 230, "type": "argument_list", "text": "(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram)", "parent": 228, "children": [231, 234, 235], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 68, "column": 42}}, {"id": 231, "type": "call_expression", "text": "get_system_memory()", "parent": 230, "children": [232, 233], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 51}}, {"id": 232, "type": "identifier", "text": "get_system_memory", "parent": 231, "children": [], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 49}}, {"id": 233, "type": "argument_list", "text": "()", "parent": 231, "children": [], "start_point": {"row": 67, "column": 49}, "end_point": {"row": 67, "column": 51}}, {"id": 234, "type": "identifier", "text": "AW_A10_SDRAM_BASE", "parent": 230, "children": [], "start_point": {"row": 67, "column": 53}, "end_point": {"row": 67, "column": 70}}, {"id": 235, "type": "pointer_expression", "text": "&s->sdram", "parent": 230, "children": [236], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 41}}, {"id": 236, "type": "field_expression", "text": "s->sdram", "parent": 235, "children": [237, 238], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 41}}, {"id": 237, "type": "identifier", "text": "s", "parent": 236, "children": [], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 34}}, {"id": 238, "type": "field_identifier", "text": "sdram", "parent": 236, "children": [], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 41}}, {"id": 239, "type": "assignment_expression", "text": "cubieboard_binfo.ram_size = machine->ram_size", "parent": 47, "children": [240, 243, 244], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 49}}, {"id": 240, "type": "field_expression", "text": "cubieboard_binfo.ram_size", "parent": 239, "children": [241, 242], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 29}}, {"id": 241, "type": "identifier", "text": "cubieboard_binfo", "parent": 240, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 20}}, {"id": 242, "type": "field_identifier", "text": "ram_size", "parent": 240, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 29}}, {"id": 243, "type": "=", "text": "=", "parent": 239, "children": [], "start_point": {"row": 70, "column": 30}, "end_point": {"row": 70, "column": 31}}, {"id": 244, "type": "field_expression", "text": "machine->ram_size", "parent": 239, "children": [245, 246], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 49}}, {"id": 245, "type": "identifier", "text": "machine", "parent": 244, "children": [], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 39}}, {"id": 246, "type": "field_identifier", "text": "ram_size", "parent": 244, "children": [], "start_point": {"row": 70, "column": 41}, "end_point": {"row": 70, "column": 49}}, {"id": 247, "type": "assignment_expression", "text": "cubieboard_binfo.kernel_filename = machine->kernel_filename", "parent": 47, "children": [248, 251, 252], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 63}}, {"id": 248, "type": "field_expression", "text": "cubieboard_binfo.kernel_filename", "parent": 247, "children": [249, 250], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 36}}, {"id": 249, "type": "identifier", "text": "cubieboard_binfo", "parent": 248, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 20}}, {"id": 250, "type": "field_identifier", "text": "kernel_filename", "parent": 248, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 36}}, {"id": 251, "type": "=", "text": "=", "parent": 247, "children": [], "start_point": {"row": 71, "column": 37}, "end_point": {"row": 71, "column": 38}}, {"id": 252, "type": "field_expression", "text": "machine->kernel_filename", "parent": 247, "children": [253, 254], "start_point": {"row": 71, "column": 39}, "end_point": {"row": 71, "column": 63}}, {"id": 253, "type": "identifier", "text": "machine", "parent": 252, "children": [], "start_point": {"row": 71, "column": 39}, "end_point": {"row": 71, "column": 46}}, {"id": 254, "type": "field_identifier", "text": "kernel_filename", "parent": 252, "children": [], "start_point": {"row": 71, "column": 48}, "end_point": {"row": 71, "column": 63}}, {"id": 255, "type": "assignment_expression", "text": "cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline", "parent": 47, "children": [256, 259, 260], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 61}}, {"id": 256, "type": "field_expression", "text": "cubieboard_binfo.kernel_cmdline", "parent": 255, "children": [257, 258], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 35}}, {"id": 257, "type": "identifier", "text": "cubieboard_binfo", "parent": 256, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 20}}, {"id": 258, "type": "field_identifier", "text": "kernel_cmdline", "parent": 256, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 35}}, {"id": 259, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 72, "column": 36}, "end_point": {"row": 72, "column": 37}}, {"id": 260, "type": "field_expression", "text": "machine->kernel_cmdline", "parent": 255, "children": [261, 262], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 61}}, {"id": 261, "type": "identifier", "text": "machine", "parent": 260, "children": [], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 45}}, {"id": 262, "type": "field_identifier", "text": "kernel_cmdline", "parent": 260, "children": [], "start_point": {"row": 72, "column": 47}, "end_point": {"row": 72, "column": 61}}, {"id": 263, "type": "call_expression", "text": "arm_load_kernel(&s->a10->cpu, &cubieboard_binfo)", "parent": 47, "children": [264, 265], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 52}}, {"id": 264, "type": "identifier", "text": "arm_load_kernel", "parent": 263, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 19}}, {"id": 265, "type": "argument_list", "text": "(&s->a10->cpu, &cubieboard_binfo)", "parent": 263, "children": [266, 272], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 52}}, {"id": 266, "type": "pointer_expression", "text": "&s->a10->cpu", "parent": 265, "children": [267], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 32}}, {"id": 267, "type": "field_expression", "text": "s->a10->cpu", "parent": 266, "children": [268, 271], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 32}}, {"id": 268, "type": "field_expression", "text": "s->a10", "parent": 267, "children": [269, 270], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 27}}, {"id": 269, "type": "identifier", "text": "s", "parent": 268, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 22}}, {"id": 270, "type": "field_identifier", "text": "a10", "parent": 268, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 27}}, {"id": 271, "type": "field_identifier", "text": "cpu", "parent": 267, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 32}}, {"id": 272, "type": "pointer_expression", "text": "&cubieboard_binfo", "parent": 265, "children": [273], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 51}}, {"id": 273, "type": "identifier", "text": "cubieboard_binfo", "parent": 272, "children": [], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 51}}, {"id": 274, "type": "function_definition", "text": "static void cubieboard_machine_init(MachineClass *mc)\n{\n mc->desc = \"cubietech cubieboard\";\n mc->init = cubieboard_init;\n}", "parent": null, "children": [275, 276], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 275, "type": "primitive_type", "text": "void", "parent": 274, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 11}}, {"id": 276, "type": "function_declarator", "text": "cubieboard_machine_init(MachineClass *mc)", "parent": 274, "children": [277, 278], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 53}}, {"id": 277, "type": "identifier", "text": "cubieboard_machine_init", "parent": 276, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 35}}, {"id": 278, "type": "parameter_list", "text": "(MachineClass *mc)", "parent": 276, "children": [279], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 53}}, {"id": 279, "type": "parameter_declaration", "text": "MachineClass *mc", "parent": 278, "children": [280, 281], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 52}}, {"id": 280, "type": "type_identifier", "text": "MachineClass", "parent": 279, "children": [], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 48}}, {"id": 281, "type": "pointer_declarator", "text": "*mc", "parent": 279, "children": [282, 283], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 52}}, {"id": 282, "type": "*", "text": "*", "parent": 281, "children": [], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 50}}, {"id": 283, "type": "identifier", "text": "mc", "parent": 281, "children": [], "start_point": {"row": 76, "column": 50}, "end_point": {"row": 76, "column": 52}}, {"id": 284, "type": "assignment_expression", "text": "mc->desc = \"cubietech cubieboard\"", "parent": 274, "children": [285, 288, 289], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 37}}, {"id": 285, "type": "field_expression", "text": "mc->desc", "parent": 284, "children": [286, 287], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 12}}, {"id": 286, "type": "identifier", "text": "mc", "parent": 285, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 6}}, {"id": 287, "type": "field_identifier", "text": "desc", "parent": 285, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 12}}, {"id": 288, "type": "=", "text": "=", "parent": 284, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 289, "type": "string_literal", "text": "\"cubietech cubieboard\"", "parent": 284, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 37}}, {"id": 290, "type": "assignment_expression", "text": "mc->init = cubieboard_init", "parent": 274, "children": [291, 294, 295], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 30}}, {"id": 291, "type": "field_expression", "text": "mc->init", "parent": 290, "children": [292, 293], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 12}}, {"id": 292, "type": "identifier", "text": "mc", "parent": 291, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 6}}, {"id": 293, "type": "field_identifier", "text": "init", "parent": 291, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 12}}, {"id": 294, "type": "=", "text": "=", "parent": 290, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 295, "type": "identifier", "text": "cubieboard_init", "parent": 290, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 30}}, {"id": 296, "type": "call_expression", "text": "DEFINE_MACHINE(\"cubieboard\", cubieboard_machine_init)", "parent": null, "children": [297, 298], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 53}}, {"id": 297, "type": "identifier", "text": "DEFINE_MACHINE", "parent": 296, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 14}}, {"id": 298, "type": "argument_list", "text": "(\"cubieboard\", cubieboard_machine_init)", "parent": 296, "children": [299, 300], "start_point": {"row": 82, "column": 14}, "end_point": {"row": 82, "column": 53}}, {"id": 299, "type": "string_literal", "text": "\"cubieboard\"", "parent": 298, "children": [], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 27}}, {"id": 300, "type": "identifier", "text": "cubieboard_machine_init", "parent": 298, "children": [], "start_point": {"row": 82, "column": 29}, "end_point": {"row": 82, "column": 52}}]}, "node_categories": {"declarations": {"functions": [47, 49, 274, 276], "variables": [15, 33, 38, 43, 52, 57, 69, 279], "classes": [16, 17, 35, 36], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [64, 79, 83, 86, 90, 93, 96, 97, 98, 104, 107, 108, 113, 118, 122, 125, 128, 129, 130, 136, 139, 140, 145, 150, 154, 157, 160, 161, 162, 168, 171, 172, 177, 182, 186, 189, 192, 197, 200, 201, 206, 211, 215, 218, 219, 225, 228, 231, 235, 236, 240, 244, 248, 252, 256, 260, 263, 266, 267, 268, 272, 285, 291, 296], "assignments": [78, 239, 247, 255, 284, 290], "loops": [], "conditionals": [18, 20, 25, 27, 30, 37, 39, 42, 44, 45, 46, 50, 53, 56, 58, 62, 65, 67, 70, 74, 80, 81, 84, 87, 89, 91, 94, 99, 100, 101, 105, 106, 109, 114, 116, 119, 123, 126, 131, 132, 133, 137, 138, 141, 146, 148, 151, 155, 158, 163, 164, 165, 169, 170, 173, 178, 180, 183, 187, 190, 193, 194, 198, 199, 202, 207, 209, 212, 216, 220, 221, 226, 227, 229, 232, 234, 237, 238, 241, 242, 245, 246, 249, 250, 253, 254, 257, 258, 261, 262, 264, 269, 270, 271, 273, 277, 280, 283, 286, 287, 292, 293, 295, 297, 300], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 32, 68, 102, 103, 117, 121, 134, 135, 149, 153, 166, 167, 181, 185, 196, 210, 214, 224, 289, 299], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [24, 29]}}, "cross_language_map": {"function_declarations": [{"node_id": 47, "universal_type": "function", "name": "cubieboard_init", "text_snippet": "static void cubieboard_init(MachineState *machine)\n{\n CubieBoardState *s = g_new(CubieBoardState,"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "cubieboard_init(MachineState *machine)"}, {"node_id": 274, "universal_type": "function", "name": "cubieboard_machine_init", "text_snippet": "static void cubieboard_machine_init(MachineClass *mc)\n{\n mc->desc = \"cubietech cubieboard\";\n m"}, {"node_id": 276, "universal_type": "function", "name": "unknown", "text_snippet": "cubieboard_machine_init(MachineClass *mc)"}], "class_declarations": [{"node_id": 16, "universal_type": "class", "name": "arm_boot_info", "text_snippet": "struct arm_boot_info"}, {"node_id": 17, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 35, "universal_type": "class", "name": "CubieBoardState", "text_snippet": "struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n}"}, {"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"qemu/osdep.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"hw/sysbus.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"hw/devices.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"hw/boards.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"hw/arm/allwinner-a10.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/*\n * cubieboard emulation\n *\n * Copyright (C) 2013 <NAME>\n * Written by <NAME> <<EMAIL>>\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * for more details.\n */\n\n#include \"qemu/osdep.h\"\n#include \"hw/sysbus.h\"\n#include \"hw/devices.h\"\n#include \"hw/boards.h\"\n#include \"hw/arm/allwinner-a10.h\"\n\nstatic struct arm_boot_info cubieboard_binfo = {\n .loader_start = AW_A10_SDRAM_BASE,\n .board_id = 0x1008,\n};\n\ntypedef struct CubieBoardState {\n AwA10State *a10;\n MemoryRegion sdram;\n} CubieBoardState;\n\nstatic void cubieboard_init(MachineState *machine)\n{\n CubieBoardState *s = g_new(CubieBoardState, 1);\n Error *err = NULL;\n\n s->a10 = AW_A10(object_new(TYPE_AW_A10));\n\n object_property_set_int(OBJECT(&s->a10->emac), 1, \"phy-addr\", &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't set phy address: \");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 32768, \"clk0-freq\", &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't set clk0 frequency: \");\n exit(1);\n }\n\n object_property_set_int(OBJECT(&s->a10->timer), 24000000, \"clk1-freq\",\n &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't set clk1 frequency: \");\n exit(1);\n }\n\n object_property_set_bool(OBJECT(s->a10), true, \"realized\", &err);\n if (err != NULL) {\n error_reportf_err(err, \"Couldn't realize Allwinner A10: \");\n exit(1);\n }\n\n memory_region_allocate_system_memory(&s->sdram, NULL, \"cubieboard.ram\",\n machine->ram_size);\n memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,\n &s->sdram);\n\n cubieboard_binfo.ram_size = machine->ram_size;\n cubieboard_binfo.kernel_filename = machine->kernel_filename;\n cubieboard_binfo.kernel_cmdline = machine->kernel_cmdline;\n arm_load_kernel(&s->a10->cpu, &cubieboard_binfo);\n}\n\nstatic void cubieboard_machine_init(MachineClass *mc)\n{\n mc->desc = \"cubietech cubieboard\";\n mc->init = cubieboard_init;\n}\n\nDEFINE_MACHINE(\"cubieboard\", cubieboard_machine_init)\n"}
255
c
#include<stdio.h> int a[100]; int n; void main() { int item,j,i,f=0,l=0,m,temp,min; printf("Enter number of elements\n"); scanf("%d",&n); printf("Enter elemets\n"); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=1;i<n;i++) { m=a[i]; for(j=i-1;j>=0;j--) { if(a[j]>m) a[j+1]=a[j]; else break; } a[j+1]=m; } for(i=0;i<n;i++) printf("%d\t",a[i]); printf("\n"); }
12.72
29
(translation_unit) "#include<stdio.h>\nint a[100];\nint n;\nvoid main()\n{\n int item,j,i,f=0,l=0,m,temp,min;\n printf("Enter number of elements\n");\n scanf("%d",&n);\n printf("Enter elemets\n");\n for(i=0;i<n;i++)\n {\n scanf("%d",&a[i]);\n }\n for(i=1;i<n;i++)\n {\n m=a[i];\n for(j=i-1;j>=0;j--)\n {\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }\n a[j+1]=m;\n }\n for(i=0;i<n;i++)\n printf("%d\t",a[i]);\n printf("\n");\n}\n" (preproc_include) "#include<stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (declaration) "int a[100];" (primitive_type) "int" (array_declarator) "a[100]" (identifier) "a" ([) "[" (number_literal) "100" (]) "]" (;) ";" (declaration) "int n;" (primitive_type) "int" (identifier) "n" (;) ";" (function_definition) "void main()\n{\n int item,j,i,f=0,l=0,m,temp,min;\n printf("Enter number of elements\n");\n scanf("%d",&n);\n printf("Enter elemets\n");\n for(i=0;i<n;i++)\n {\n scanf("%d",&a[i]);\n }\n for(i=1;i<n;i++)\n {\n m=a[i];\n for(j=i-1;j>=0;j--)\n {\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }\n a[j+1]=m;\n }\n for(i=0;i<n;i++)\n printf("%d\t",a[i]);\n printf("\n");\n}" (primitive_type) "void" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int item,j,i,f=0,l=0,m,temp,min;\n printf("Enter number of elements\n");\n scanf("%d",&n);\n printf("Enter elemets\n");\n for(i=0;i<n;i++)\n {\n scanf("%d",&a[i]);\n }\n for(i=1;i<n;i++)\n {\n m=a[i];\n for(j=i-1;j>=0;j--)\n {\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }\n a[j+1]=m;\n }\n for(i=0;i<n;i++)\n printf("%d\t",a[i]);\n printf("\n");\n}" ({) "{" (declaration) "int item,j,i,f=0,l=0,m,temp,min;" (primitive_type) "int" (identifier) "item" (,) "," (identifier) "j" (,) "," (identifier) "i" (,) "," (init_declarator) "f=0" (identifier) "f" (=) "=" (number_literal) "0" (,) "," (init_declarator) "l=0" (identifier) "l" (=) "=" (number_literal) "0" (,) "," (identifier) "m" (,) "," (identifier) "temp" (,) "," (identifier) "min" (;) ";" (expression_statement) "printf("Enter number of elements\n");" (call_expression) "printf("Enter number of elements\n")" (identifier) "printf" (argument_list) "("Enter number of elements\n")" (() "(" (string_literal) ""Enter number of elements\n"" (") """ (string_content) "Enter number of elements" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "scanf("%d",&n);" (call_expression) "scanf("%d",&n)" (identifier) "scanf" (argument_list) "("%d",&n)" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&n" (&) "&" (identifier) "n" ()) ")" (;) ";" (expression_statement) "printf("Enter elemets\n");" (call_expression) "printf("Enter elemets\n")" (identifier) "printf" (argument_list) "("Enter elemets\n")" (() "(" (string_literal) ""Enter elemets\n"" (") """ (string_content) "Enter elemets" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for(i=0;i<n;i++)\n {\n scanf("%d",&a[i]);\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 scanf("%d",&a[i]);\n }" ({) "{" (expression_statement) "scanf("%d",&a[i]);" (call_expression) "scanf("%d",&a[i])" (identifier) "scanf" (argument_list) "("%d",&a[i])" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&a[i]" (&) "&" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (for_statement) "for(i=1;i<n;i++)\n {\n m=a[i];\n for(j=i-1;j>=0;j--)\n {\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }\n a[j+1]=m;\n }" (for) "for" (() "(" (assignment_expression) "i=1" (identifier) "i" (=) "=" (number_literal) "1" (;) ";" (binary_expression) "i<n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n m=a[i];\n for(j=i-1;j>=0;j--)\n {\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }\n a[j+1]=m;\n }" ({) "{" (expression_statement) "m=a[i];" (assignment_expression) "m=a[i]" (identifier) "m" (=) "=" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (;) ";" (for_statement) "for(j=i-1;j>=0;j--)\n {\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }" (for) "for" (() "(" (assignment_expression) "j=i-1" (identifier) "j" (=) "=" (binary_expression) "i-1" (identifier) "i" (-) "-" (number_literal) "1" (;) ";" (binary_expression) "j>=0" (identifier) "j" (>=) ">=" (number_literal) "0" (;) ";" (update_expression) "j--" (identifier) "j" (--) "--" ()) ")" (compound_statement) "{\n if(a[j]>m)\n a[j+1]=a[j];\n else\n break;\n }" ({) "{" (if_statement) "if(a[j]>m)\n a[j+1]=a[j];\n else\n break;" (if) "if" (parenthesized_expression) "(a[j]>m)" (() "(" (binary_expression) "a[j]>m" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (>) ">" (identifier) "m" ()) ")" (expression_statement) "a[j+1]=a[j];" (assignment_expression) "a[j+1]=a[j]" (subscript_expression) "a[j+1]" (identifier) "a" ([) "[" (binary_expression) "j+1" (identifier) "j" (+) "+" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (;) ";" (else_clause) "else\n break;" (else) "else" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "a[j+1]=m;" (assignment_expression) "a[j+1]=m" (subscript_expression) "a[j+1]" (identifier) "a" ([) "[" (binary_expression) "j+1" (identifier) "j" (+) "+" (number_literal) "1" (]) "]" (=) "=" (identifier) "m" (;) ";" (}) "}" (for_statement) "for(i=0;i<n;i++)\n printf("%d\t",a[i]);" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "printf("%d\t",a[i]);" (call_expression) "printf("%d\t",a[i])" (identifier) "printf" (argument_list) "("%d\t",a[i])" (() "(" (string_literal) ""%d\t"" (") """ (string_content) "%d" (escape_sequence) "\t" (") """ (,) "," (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
275
0
{"language": "c", "success": true, "metadata": {"lines": 29, "avg_line_length": 12.72, "nodes": 157, "errors": 0, "source_hash": "1b6d9fb950a7a7d0dc0a8962d4a7af3bd3eaf89e8f040d5feba2f5f78a692615", "categorized_nodes": 115}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "declaration", "text": "int a[100];", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 11}}, {"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": "array_declarator", "text": "a[100]", "parent": 3, "children": [6, 7], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 10}}, {"id": 6, "type": "identifier", "text": "a", "parent": 5, "children": [], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 5}}, {"id": 7, "type": "number_literal", "text": "100", "parent": 5, "children": [], "start_point": {"row": 1, "column": 6}, "end_point": {"row": 1, "column": 9}}, {"id": 8, "type": "declaration", "text": "int n;", "parent": null, "children": [9, 10], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 3}}, {"id": 10, "type": "identifier", "text": "n", "parent": 8, "children": [], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 5}}, {"id": 11, "type": "function_definition", "text": "void main()\n{\n\tint item,j,i,f=0,l=0,m,temp,min;\n\tprintf(\"Enter number of elements\\n\");\n\tscanf(\"%d\",&n);\n\tprintf(\"Enter elemets\\n\");\n\tfor(i=0;i<n;i++)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t}\n\tfor(i=1;i<n;i++)\n\t{\n\t\tm=a[i];\n\t\tfor(j=i-1;j>=0;j--)\n\t\t{\n\t\t\tif(a[j]>m)\n\t\t\t\ta[j+1]=a[j];\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\ta[j+1]=m;\n\t}\n\tfor(i=0;i<n;i++)\n\t\tprintf(\"%d\\t\",a[i]);\n\tprintf(\"\\n\");\n}", "parent": null, "children": [12, 13], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 13, "type": "function_declarator", "text": "main()", "parent": 11, "children": [14, 15], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 11}}, {"id": 14, "type": "identifier", "text": "main", "parent": 13, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 9}}, {"id": 15, "type": "parameter_list", "text": "()", "parent": 13, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 11}}, {"id": 16, "type": "declaration", "text": "int item,j,i,f=0,l=0,m,temp,min;", "parent": 11, "children": [17, 18, 19, 20, 21, 25, 29, 30, 31], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 33}}, {"id": 17, "type": "primitive_type", "text": "int", "parent": 16, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 4}}, {"id": 18, "type": "identifier", "text": "item", "parent": 16, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 9}}, {"id": 19, "type": "identifier", "text": "j", "parent": 16, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 11}}, {"id": 20, "type": "identifier", "text": "i", "parent": 16, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 21, "type": "init_declarator", "text": "f=0", "parent": 16, "children": [22, 23, 24], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 17}}, {"id": 22, "type": "identifier", "text": "f", "parent": 21, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 15}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 16}}, {"id": 24, "type": "number_literal", "text": "0", "parent": 21, "children": [], "start_point": {"row": 5, "column": 16}, "end_point": {"row": 5, "column": 17}}, {"id": 25, "type": "init_declarator", "text": "l=0", "parent": 16, "children": [26, 27, 28], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 21}}, {"id": 26, "type": "identifier", "text": "l", "parent": 25, "children": [], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 19}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 20}}, {"id": 28, "type": "number_literal", "text": "0", "parent": 25, "children": [], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 21}}, {"id": 29, "type": "identifier", "text": "m", "parent": 16, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 23}}, {"id": 30, "type": "identifier", "text": "temp", "parent": 16, "children": [], "start_point": {"row": 5, "column": 24}, "end_point": {"row": 5, "column": 28}}, {"id": 31, "type": "identifier", "text": "min", "parent": 16, "children": [], "start_point": {"row": 5, "column": 29}, "end_point": {"row": 5, "column": 32}}, {"id": 32, "type": "call_expression", "text": "printf(\"Enter number of elements\\n\")", "parent": 11, "children": [33, 34], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 37}}, {"id": 33, "type": "identifier", "text": "printf", "parent": 32, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 7}}, {"id": 34, "type": "argument_list", "text": "(\"Enter number of elements\\n\")", "parent": 32, "children": [35], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 37}}, {"id": 35, "type": "string_literal", "text": "\"Enter number of elements\\n\"", "parent": 34, "children": [36], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 36}}, {"id": 36, "type": "escape_sequence", "text": "\\n", "parent": 35, "children": [], "start_point": {"row": 6, "column": 33}, "end_point": {"row": 6, "column": 35}}, {"id": 37, "type": "call_expression", "text": "scanf(\"%d\",&n)", "parent": 11, "children": [38, 39], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 15}}, {"id": 38, "type": "identifier", "text": "scanf", "parent": 37, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 6}}, {"id": 39, "type": "argument_list", "text": "(\"%d\",&n)", "parent": 37, "children": [40, 41], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 15}}, {"id": 40, "type": "string_literal", "text": "\"%d\"", "parent": 39, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 11}}, {"id": 41, "type": "pointer_expression", "text": "&n", "parent": 39, "children": [42], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 14}}, {"id": 42, "type": "identifier", "text": "n", "parent": 41, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 43, "type": "call_expression", "text": "printf(\"Enter elemets\\n\")", "parent": 11, "children": [44, 45], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 26}}, {"id": 44, "type": "identifier", "text": "printf", "parent": 43, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 7}}, {"id": 45, "type": "argument_list", "text": "(\"Enter elemets\\n\")", "parent": 43, "children": [46], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 26}}, {"id": 46, "type": "string_literal", "text": "\"Enter elemets\\n\"", "parent": 45, "children": [47], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 25}}, {"id": 47, "type": "escape_sequence", "text": "\\n", "parent": 46, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 24}}, {"id": 48, "type": "for_statement", "text": "for(i=0;i<n;i++)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t}", "parent": 11, "children": [49, 53, 57], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 12, "column": 2}}, {"id": 49, "type": "assignment_expression", "text": "i=0", "parent": 48, "children": [50, 51, 52], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 8}}, {"id": 50, "type": "identifier", "text": "i", "parent": 49, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 6}}, {"id": 51, "type": "=", "text": "=", "parent": 49, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 7}}, {"id": 52, "type": "number_literal", "text": "0", "parent": 49, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 8}}, {"id": 53, "type": "binary_expression", "text": "i<n", "parent": 48, "children": [54, 55, 56], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 12}}, {"id": 54, "type": "identifier", "text": "i", "parent": 53, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 55, "type": "<", "text": "<", "parent": 53, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 11}}, {"id": 56, "type": "identifier", "text": "n", "parent": 53, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 12}}, {"id": 57, "type": "update_expression", "text": "i++", "parent": 48, "children": [58, 59], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 16}}, {"id": 58, "type": "identifier", "text": "i", "parent": 57, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 14}}, {"id": 59, "type": "++", "text": "++", "parent": 57, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 16}}, {"id": 60, "type": "call_expression", "text": "scanf(\"%d\",&a[i])", "parent": 48, "children": [61, 62], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 19}}, {"id": 61, "type": "identifier", "text": "scanf", "parent": 60, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 7}}, {"id": 62, "type": "argument_list", "text": "(\"%d\",&a[i])", "parent": 60, "children": [63, 64], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 19}}, {"id": 63, "type": "string_literal", "text": "\"%d\"", "parent": 62, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 12}}, {"id": 64, "type": "pointer_expression", "text": "&a[i]", "parent": 62, "children": [65], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 18}}, {"id": 65, "type": "subscript_expression", "text": "a[i]", "parent": 64, "children": [66, 67], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 18}}, {"id": 66, "type": "identifier", "text": "a", "parent": 65, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 67, "type": "identifier", "text": "i", "parent": 65, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 68, "type": "for_statement", "text": "for(i=1;i<n;i++)\n\t{\n\t\tm=a[i];\n\t\tfor(j=i-1;j>=0;j--)\n\t\t{\n\t\t\tif(a[j]>m)\n\t\t\t\ta[j+1]=a[j];\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\ta[j+1]=m;\n\t}", "parent": 11, "children": [69, 73, 77], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 24, "column": 2}}, {"id": 69, "type": "assignment_expression", "text": "i=1", "parent": 68, "children": [70, 71, 72], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 8}}, {"id": 70, "type": "identifier", "text": "i", "parent": 69, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 6}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 7}}, {"id": 72, "type": "number_literal", "text": "1", "parent": 69, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 8}}, {"id": 73, "type": "binary_expression", "text": "i<n", "parent": 68, "children": [74, 75, 76], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 12}}, {"id": 74, "type": "identifier", "text": "i", "parent": 73, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 10}}, {"id": 75, "type": "<", "text": "<", "parent": 73, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 11}}, {"id": 76, "type": "identifier", "text": "n", "parent": 73, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 77, "type": "update_expression", "text": "i++", "parent": 68, "children": [78, 79], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 16}}, {"id": 78, "type": "identifier", "text": "i", "parent": 77, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 14}}, {"id": 79, "type": "++", "text": "++", "parent": 77, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 16}}, {"id": 80, "type": "assignment_expression", "text": "m=a[i]", "parent": 68, "children": [81, 82, 83], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 8}}, {"id": 81, "type": "identifier", "text": "m", "parent": 80, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 3}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 4}}, {"id": 83, "type": "subscript_expression", "text": "a[i]", "parent": 80, "children": [84, 85], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 8}}, {"id": 84, "type": "identifier", "text": "a", "parent": 83, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 5}}, {"id": 85, "type": "identifier", "text": "i", "parent": 83, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 7}}, {"id": 86, "type": "for_statement", "text": "for(j=i-1;j>=0;j--)\n\t\t{\n\t\t\tif(a[j]>m)\n\t\t\t\ta[j+1]=a[j];\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}", "parent": 68, "children": [87, 94, 98], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 22, "column": 3}}, {"id": 87, "type": "assignment_expression", "text": "j=i-1", "parent": 86, "children": [88, 89, 90], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 11}}, {"id": 88, "type": "identifier", "text": "j", "parent": 87, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 7}}, {"id": 89, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 8}}, {"id": 90, "type": "binary_expression", "text": "i-1", "parent": 87, "children": [91, 92, 93], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 11}}, {"id": 91, "type": "identifier", "text": "i", "parent": 90, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 9}}, {"id": 92, "type": "-", "text": "-", "parent": 90, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 10}}, {"id": 93, "type": "number_literal", "text": "1", "parent": 90, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 11}}, {"id": 94, "type": "binary_expression", "text": "j>=0", "parent": 86, "children": [95, 96, 97], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 16}}, {"id": 95, "type": "identifier", "text": "j", "parent": 94, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 96, "type": ">=", "text": ">=", "parent": 94, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 15}}, {"id": 97, "type": "number_literal", "text": "0", "parent": 94, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 16}}, {"id": 98, "type": "update_expression", "text": "j--", "parent": 86, "children": [99, 100], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 20}}, {"id": 99, "type": "identifier", "text": "j", "parent": 98, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 18}}, {"id": 100, "type": "--", "text": "--", "parent": 98, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 20}}, {"id": 101, "type": "if_statement", "text": "if(a[j]>m)\n\t\t\t\ta[j+1]=a[j];\n\t\t\telse\n\t\t\t\tbreak;", "parent": 86, "children": [102, 120], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 21, "column": 10}}, {"id": 102, "type": "parenthesized_expression", "text": "(a[j]>m)", "parent": 101, "children": [103], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 13}}, {"id": 103, "type": "binary_expression", "text": "a[j]>m", "parent": 102, "children": [104, 107, 108], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 12}}, {"id": 104, "type": "subscript_expression", "text": "a[j]", "parent": 103, "children": [105, 106], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 10}}, {"id": 105, "type": "identifier", "text": "a", "parent": 104, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 7}}, {"id": 106, "type": "identifier", "text": "j", "parent": 104, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 9}}, {"id": 107, "type": ">", "text": ">", "parent": 103, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 11}}, {"id": 108, "type": "identifier", "text": "m", "parent": 103, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 12}}, {"id": 109, "type": "assignment_expression", "text": "a[j+1]=a[j]", "parent": 101, "children": [110, 116, 117], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 15}}, {"id": 110, "type": "subscript_expression", "text": "a[j+1]", "parent": 109, "children": [111, 112], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 10}}, {"id": 111, "type": "identifier", "text": "a", "parent": 110, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 5}}, {"id": 112, "type": "binary_expression", "text": "j+1", "parent": 110, "children": [113, 114, 115], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 9}}, {"id": 113, "type": "identifier", "text": "j", "parent": 112, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 7}}, {"id": 114, "type": "+", "text": "+", "parent": 112, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 8}}, {"id": 115, "type": "number_literal", "text": "1", "parent": 112, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 9}}, {"id": 116, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 11}}, {"id": 117, "type": "subscript_expression", "text": "a[j]", "parent": 109, "children": [118, 119], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 15}}, {"id": 118, "type": "identifier", "text": "a", "parent": 117, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 12}}, {"id": 119, "type": "identifier", "text": "j", "parent": 117, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 14}}, {"id": 120, "type": "else_clause", "text": "else\n\t\t\t\tbreak;", "parent": 101, "children": [121], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 21, "column": 10}}, {"id": 121, "type": "break_statement", "text": "break;", "parent": 120, "children": [122], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 122, "type": "break", "text": "break", "parent": 121, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 9}}, {"id": 123, "type": "assignment_expression", "text": "a[j+1]=m", "parent": 68, "children": [124, 130, 131], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 10}}, {"id": 124, "type": "subscript_expression", "text": "a[j+1]", "parent": 123, "children": [125, 126], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 8}}, {"id": 125, "type": "identifier", "text": "a", "parent": 124, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 3}}, {"id": 126, "type": "binary_expression", "text": "j+1", "parent": 124, "children": [127, 128, 129], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 7}}, {"id": 127, "type": "identifier", "text": "j", "parent": 126, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 5}}, {"id": 128, "type": "+", "text": "+", "parent": 126, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 6}}, {"id": 129, "type": "number_literal", "text": "1", "parent": 126, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 7}}, {"id": 130, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 131, "type": "identifier", "text": "m", "parent": 123, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 132, "type": "for_statement", "text": "for(i=0;i<n;i++)\n\t\tprintf(\"%d\\t\",a[i]);", "parent": 11, "children": [133, 137, 141], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 26, "column": 22}}, {"id": 133, "type": "assignment_expression", "text": "i=0", "parent": 132, "children": [134, 135, 136], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 8}}, {"id": 134, "type": "identifier", "text": "i", "parent": 133, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 6}}, {"id": 135, "type": "=", "text": "=", "parent": 133, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 7}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 133, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 8}}, {"id": 137, "type": "binary_expression", "text": "i<n", "parent": 132, "children": [138, 139, 140], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 12}}, {"id": 138, "type": "identifier", "text": "i", "parent": 137, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 10}}, {"id": 139, "type": "<", "text": "<", "parent": 137, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 11}}, {"id": 140, "type": "identifier", "text": "n", "parent": 137, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 12}}, {"id": 141, "type": "update_expression", "text": "i++", "parent": 132, "children": [142, 143], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 16}}, {"id": 142, "type": "identifier", "text": "i", "parent": 141, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 143, "type": "++", "text": "++", "parent": 141, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 16}}, {"id": 144, "type": "call_expression", "text": "printf(\"%d\\t\",a[i])", "parent": 132, "children": [145, 146], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 21}}, {"id": 145, "type": "identifier", "text": "printf", "parent": 144, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 8}}, {"id": 146, "type": "argument_list", "text": "(\"%d\\t\",a[i])", "parent": 144, "children": [147, 149], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 21}}, {"id": 147, "type": "string_literal", "text": "\"%d\\t\"", "parent": 146, "children": [148], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 15}}, {"id": 148, "type": "escape_sequence", "text": "\\t", "parent": 147, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 14}}, {"id": 149, "type": "subscript_expression", "text": "a[i]", "parent": 146, "children": [150, 151], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 20}}, {"id": 150, "type": "identifier", "text": "a", "parent": 149, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 151, "type": "identifier", "text": "i", "parent": 149, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 19}}, {"id": 152, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 11, "children": [153, 154], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 13}}, {"id": 153, "type": "identifier", "text": "printf", "parent": 152, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 7}}, {"id": 154, "type": "argument_list", "text": "(\"\\n\")", "parent": 152, "children": [155], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 13}}, {"id": 155, "type": "string_literal", "text": "\"\\n\"", "parent": 154, "children": [156], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 12}}, {"id": 156, "type": "escape_sequence", "text": "\\n", "parent": 155, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 11}}]}, "node_categories": {"declarations": {"functions": [11, 13], "variables": [3, 8, 16], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [32, 37, 41, 43, 53, 57, 60, 64, 65, 73, 77, 83, 90, 94, 98, 102, 103, 104, 110, 112, 117, 124, 126, 137, 141, 144, 149, 152], "assignments": [49, 69, 80, 87, 109, 123, 133], "loops": [48, 68, 86, 132], "conditionals": [6, 10, 14, 18, 19, 20, 22, 26, 29, 30, 31, 33, 38, 42, 44, 50, 54, 56, 58, 61, 66, 67, 70, 74, 76, 78, 81, 84, 85, 88, 91, 95, 99, 101, 105, 106, 108, 111, 113, 118, 119, 125, 127, 131, 134, 138, 140, 142, 145, 150, 151, 153], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 7, 24, 28, 35, 40, 46, 52, 63, 72, 93, 97, 115, 129, 136, 147, 155], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "main", "text_snippet": "void main()\n{\n\tint item,j,i,f=0,l=0,m,temp,min;\n\tprintf(\"Enter number of elements\\n\");\n\tscanf(\"%d\",&"}, {"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\nint a[100];\nint n;\nvoid main()\n{\n\tint item,j,i,f=0,l=0,m,temp,min;\n\tprintf(\"Enter number of elements\\n\");\n\tscanf(\"%d\",&n);\n\tprintf(\"Enter elemets\\n\");\n\tfor(i=0;i<n;i++)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t}\n\tfor(i=1;i<n;i++)\n\t{\n\t\tm=a[i];\n\t\tfor(j=i-1;j>=0;j--)\n\t\t{\n\t\t\tif(a[j]>m)\n\t\t\t\ta[j+1]=a[j];\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\ta[j+1]=m;\n\t}\n\tfor(i=0;i<n;i++)\n\t\tprintf(\"%d\\t\",a[i]);\n\tprintf(\"\\n\");\n}\n"}
256
c
#include "mex.h" #include "blas.h" #include "conv2d.h" #define DEBUG 0 void inner_fv_term(int Np, int K, double *h, double *u, double *v, int Nedge, double *v1, double *v2, double *nx, double *ny, double *ds, signed char *EToR, double *rhs) { #ifdef _OPENMP #pragma omp parallel for num_threads(DG_THREADS) #endif for (int k = 0; k < K; k++) { if ((cell_type)EToR[k] != REFINE) continue; int n, ind = k * Nedge; for (n = 0; n < Nedge; n++) { int n1 = (int)v1[n] + k*Np - 1; // change to C type int n2 = (int)v2[n] + k*Np - 1; double nx_ = nx[ind]; double ny_ = ny[ind]; double delta_s = ds[ind]; double num_flux; upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux); rhs[n1] -= num_flux * delta_s; rhs[n2] += num_flux * delta_s; #if DEBUG mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n", k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]); #endif ind++; } } #if DEBUG mexPrintf("inner_rhs = \n"); int n; for (n = 0; n < Np; n++) { mexPrintf("\t"); for (k = 0; k < K; k++) { mexPrintf("%e\t", rhs[k * Np + n]); } mexPrintf("\n"); } #endif return; } void surface_fv_term(size_t Np, size_t Nfp, size_t K, double *h, double *h_ext, double *u, double *v, signed char *EToR, signed char *eidtype, double *eidM, double *eidP, double *nx, double *ny, double *Js, double *LIFT, double *rhs) { int k; double *flux = calloc(Nfp * K, sizeof(double)); // #ifdef _OPENMP // #pragma omp parallel for num_threads(DG_THREADS) // #endif for (k = 0; k < K; k++) { if ((cell_type)EToR[k] != REFINE) continue; int j, ind = k * Nfp; for (j = 0; j < Nfp; j++) { int iM = (int)eidM[ind] - 1; // change index to C type int iP = (int)eidP[ind] - 1; double f_M = h[iM]; // local and adjacent node values double hP = h[iP]; double uM = u[iM], vM = v[iM]; // outward normal vector of local element double nx_ = nx[ind]; double ny_ = ny[ind]; double f_ext; // external values on local nodes f_ext = h_ext[iM]; bc_type type = (bc_type)eidtype[ind]; // get adjacent values hP, qxP, qyP, considering // various boudnary conditions double f_P; int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P); // if(info) mexErrMsgTxt("Unknown boundary conditions."); double numflux; upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux); flux[ind] = -numflux; ind++; } } #if DEBUG mexPrintf("flux = \n"); int n; for (n = 0; n < Nfp; n++) { mexPrintf("\t"); for (k = 0; k < K; k++) { mexPrintf("%e\t", flux[k * Nfp + n]); } mexPrintf("\n"); } #endif double *stemp = calloc(Nfp * K, sizeof(double)); dvecm(Nfp * K, 1, flux, Js, stemp); char *chn = "N"; double one = 1.0; mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp; dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_); free(flux); free(stemp); return; } /* * @brief calculate the sub-cell discretization by finite volume scheme. * Usages: * [ rhsQ ] = rhs_fv_term(f_Q, f_ext, u, v, Nedge, v1, v2, nx, ny, ds, ... * eidM, eidP, nxM, nyM, Js, LIFT, vol, ... * eidtype, EToR) */ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { /* check input */ if (nrhs != 19) { mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs", "20 input required."); } else if (nlhs > 1) { mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs", "Too many output arguments."); } double *f_Q = mxGetPr(prhs[0]); double *f_extQ = mxGetPr(prhs[1]); double *u = mxGetPr(prhs[2]); double *v = mxGetPr(prhs[3]); double Nedge = mxGetScalar(prhs[4]); double *v1 = mxGetPr(prhs[5]); double *v2 = mxGetPr(prhs[6]); double *nx = mxGetPr(prhs[7]); double *ny = mxGetPr(prhs[8]); double *ds = mxGetPr(prhs[9]); double *eidM = mxGetPr(prhs[10]); double *eidP = mxGetPr(prhs[11]); double *nxM = mxGetPr(prhs[12]); double *nyM = mxGetPr(prhs[13]); double *Js = mxGetPr(prhs[14]); double *LIFT = mxGetPr(prhs[15]); double *vol = mxGetPr(prhs[16]); signed char *eidtype = (signed char *)mxGetData(prhs[17]); signed char *EToR = (signed char *)mxGetData(prhs[18]); /* get dimensions */ size_t Np = mxGetM(prhs[0]); size_t K = mxGetN(prhs[0]); size_t Nfp = mxGetM(prhs[10]); /* allocate output array */ plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL); double *rhsQ = mxGetPr(plhs[0]); double *vtemp = calloc(Np * K, sizeof(double)); inner_fv_term(Np, K, f_Q, u, v, (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp); surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v, EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp); dvecd(Np * K, 1, vtemp, vol, rhsQ); free(vtemp); return; }
32.59
169
(translation_unit) "#include "mex.h"\n#include "blas.h"\n#include "conv2d.h"\n\n#define DEBUG 0\n\nvoid inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)\n{\n#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif\n for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }\n\n#if DEBUG\n mexPrintf("inner_rhs = \n");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }\n mexPrintf("\n");\n }\n#endif\n return;\n}\n\nvoid surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)\n{\n\n int k;\n double *flux = calloc(Nfp * K, sizeof(double));\n // #ifdef _OPENMP\n // #pragma omp parallel for num_threads(DG_THREADS)\n // #endif\n for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }\n#if DEBUG\n mexPrintf("flux = \n");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }\n mexPrintf("\n");\n }\n#endif\n double *stemp = calloc(Nfp * K, sizeof(double));\n dvecm(Nfp * K, 1, flux, Js, stemp);\n char *chn = "N";\n double one = 1.0;\n mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;\n dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_);\n free(flux);\n free(stemp);\n return;\n}\n\n/*\n * @brief calculate the sub-cell discretization by finite volume scheme.\n * Usages: \n * [ rhsQ ] = rhs_fv_term(f_Q, f_ext, u, v, Nedge, v1, v2, nx, ny, ds, ...\n * eidM, eidP, nxM, nyM, Js, LIFT, vol, ...\n * eidtype, EToR)\n */\nvoid mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])\n{\n /* check input */\n if (nrhs != 19)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }\n\n double *f_Q = mxGetPr(prhs[0]);\n double *f_extQ = mxGetPr(prhs[1]);\n double *u = mxGetPr(prhs[2]);\n double *v = mxGetPr(prhs[3]);\n double Nedge = mxGetScalar(prhs[4]);\n double *v1 = mxGetPr(prhs[5]);\n double *v2 = mxGetPr(prhs[6]);\n double *nx = mxGetPr(prhs[7]);\n double *ny = mxGetPr(prhs[8]);\n double *ds = mxGetPr(prhs[9]);\n double *eidM = mxGetPr(prhs[10]);\n double *eidP = mxGetPr(prhs[11]);\n double *nxM = mxGetPr(prhs[12]);\n double *nyM = mxGetPr(prhs[13]);\n double *Js = mxGetPr(prhs[14]);\n double *LIFT = mxGetPr(prhs[15]);\n double *vol = mxGetPr(prhs[16]);\n signed char *eidtype = (signed char *)mxGetData(prhs[17]);\n signed char *EToR = (signed char *)mxGetData(prhs[18]);\n\n /* get dimensions */\n size_t Np = mxGetM(prhs[0]);\n size_t K = mxGetN(prhs[0]);\n size_t Nfp = mxGetM(prhs[10]);\n\n /* allocate output array */\n plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL);\n double *rhsQ = mxGetPr(plhs[0]);\n\n double *vtemp = calloc(Np * K, sizeof(double));\n inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp);\n\n surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp);\n\n dvecd(Np * K, 1, vtemp, vol, rhsQ);\n\n free(vtemp);\n return;\n}" (preproc_include) "#include "mex.h"\n" (#include) "#include" (string_literal) ""mex.h"" (") """ (string_content) "mex.h" (") """ (preproc_include) "#include "blas.h"\n" (#include) "#include" (string_literal) ""blas.h"" (") """ (string_content) "blas.h" (") """ (preproc_include) "#include "conv2d.h"\n" (#include) "#include" (string_literal) ""conv2d.h"" (") """ (string_content) "conv2d.h" (") """ (preproc_def) "#define DEBUG 0\n" (#define) "#define" (identifier) "DEBUG" (preproc_arg) "0" (function_definition) "void inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)\n{\n#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif\n for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }\n\n#if DEBUG\n mexPrintf("inner_rhs = \n");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }\n mexPrintf("\n");\n }\n#endif\n return;\n}" (primitive_type) "void" (function_declarator) "inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)" (identifier) "inner_fv_term" (parameter_list) "(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)" (() "(" (parameter_declaration) "int Np" (primitive_type) "int" (identifier) "Np" (,) "," (parameter_declaration) "int K" (primitive_type) "int" (identifier) "K" (,) "," (parameter_declaration) "double *h" (primitive_type) "double" (pointer_declarator) "*h" (*) "*" (identifier) "h" (,) "," (parameter_declaration) "double *u" (primitive_type) "double" (pointer_declarator) "*u" (*) "*" (identifier) "u" (,) "," (parameter_declaration) "double *v" (primitive_type) "double" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int Nedge" (primitive_type) "int" (identifier) "Nedge" (,) "," (parameter_declaration) "double *v1" (primitive_type) "double" (pointer_declarator) "*v1" (*) "*" (identifier) "v1" (,) "," (parameter_declaration) "double *v2" (primitive_type) "double" (pointer_declarator) "*v2" (*) "*" (identifier) "v2" (,) "," (parameter_declaration) "double *nx" (primitive_type) "double" (pointer_declarator) "*nx" (*) "*" (identifier) "nx" (,) "," (parameter_declaration) "double *ny" (primitive_type) "double" (pointer_declarator) "*ny" (*) "*" (identifier) "ny" (,) "," (parameter_declaration) "double *ds" (primitive_type) "double" (pointer_declarator) "*ds" (*) "*" (identifier) "ds" (,) "," (parameter_declaration) "signed char *EToR" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (pointer_declarator) "*EToR" (*) "*" (identifier) "EToR" (,) "," (parameter_declaration) "double *rhs" (primitive_type) "double" (pointer_declarator) "*rhs" (*) "*" (identifier) "rhs" ()) ")" (compound_statement) "{\n#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif\n for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }\n\n#if DEBUG\n mexPrintf("inner_rhs = \n");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }\n mexPrintf("\n");\n }\n#endif\n return;\n}" ({) "{" (preproc_ifdef) "#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif" (#ifdef) "#ifdef" (identifier) "_OPENMP" (preproc_call) "#pragma omp parallel for num_threads(DG_THREADS)\n" (preproc_directive) "#pragma" (preproc_arg) "omp parallel for num_threads(DG_THREADS)" (#endif) "#endif" (for_statement) "for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }" (for) "for" (() "(" (declaration) "int k = 0;" (primitive_type) "int" (init_declarator) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < K" (identifier) "k" (<) "<" (identifier) "K" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }" ({) "{" (if_statement) "if ((cell_type)EToR[k] != REFINE)\n continue;" (if) "if" (parenthesized_expression) "((cell_type)EToR[k] != REFINE)" (() "(" (binary_expression) "(cell_type)EToR[k] != REFINE" (cast_expression) "(cell_type)EToR[k]" (() "(" (type_descriptor) "cell_type" (type_identifier) "cell_type" ()) ")" (subscript_expression) "EToR[k]" (identifier) "EToR" ([) "[" (identifier) "k" (]) "]" (!=) "!=" (identifier) "REFINE" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (declaration) "int n, ind = k * Nedge;" (primitive_type) "int" (identifier) "n" (,) "," (init_declarator) "ind = k * Nedge" (identifier) "ind" (=) "=" (binary_expression) "k * Nedge" (identifier) "k" (*) "*" (identifier) "Nedge" (;) ";" (for_statement) "for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }" (for) "for" (() "(" (assignment_expression) "n = 0" (identifier) "n" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "n < Nedge" (identifier) "n" (<) "<" (identifier) "Nedge" (;) ";" (update_expression) "n++" (identifier) "n" (++) "++" ()) ")" (compound_statement) "{\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }" ({) "{" (declaration) "int n1 = (int)v1[n] + k*Np - 1;" (primitive_type) "int" (init_declarator) "n1 = (int)v1[n] + k*Np - 1" (identifier) "n1" (=) "=" (binary_expression) "(int)v1[n] + k*Np - 1" (binary_expression) "(int)v1[n] + k*Np" (cast_expression) "(int)v1[n]" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (subscript_expression) "v1[n]" (identifier) "v1" ([) "[" (identifier) "n" (]) "]" (+) "+" (binary_expression) "k*Np" (identifier) "k" (*) "*" (identifier) "Np" (-) "-" (number_literal) "1" (;) ";" (comment) "// change to C type" (declaration) "int n2 = (int)v2[n] + k*Np - 1;" (primitive_type) "int" (init_declarator) "n2 = (int)v2[n] + k*Np - 1" (identifier) "n2" (=) "=" (binary_expression) "(int)v2[n] + k*Np - 1" (binary_expression) "(int)v2[n] + k*Np" (cast_expression) "(int)v2[n]" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (subscript_expression) "v2[n]" (identifier) "v2" ([) "[" (identifier) "n" (]) "]" (+) "+" (binary_expression) "k*Np" (identifier) "k" (*) "*" (identifier) "Np" (-) "-" (number_literal) "1" (;) ";" (declaration) "double nx_ = nx[ind];" (primitive_type) "double" (init_declarator) "nx_ = nx[ind]" (identifier) "nx_" (=) "=" (subscript_expression) "nx[ind]" (identifier) "nx" ([) "[" (identifier) "ind" (]) "]" (;) ";" (declaration) "double ny_ = ny[ind];" (primitive_type) "double" (init_declarator) "ny_ = ny[ind]" (identifier) "ny_" (=) "=" (subscript_expression) "ny[ind]" (identifier) "ny" ([) "[" (identifier) "ind" (]) "]" (;) ";" (declaration) "double delta_s = ds[ind];" (primitive_type) "double" (init_declarator) "delta_s = ds[ind]" (identifier) "delta_s" (=) "=" (subscript_expression) "ds[ind]" (identifier) "ds" ([) "[" (identifier) "ind" (]) "]" (;) ";" (declaration) "double num_flux;" (primitive_type) "double" (identifier) "num_flux" (;) ";" (expression_statement) "upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);" (call_expression) "upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux)" (identifier) "upwind_flux" (argument_list) "(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux)" (() "(" (subscript_expression) "h[n1]" (identifier) "h" ([) "[" (identifier) "n1" (]) "]" (,) "," (subscript_expression) "h[n2]" (identifier) "h" ([) "[" (identifier) "n2" (]) "]" (,) "," (subscript_expression) "u[n1]" (identifier) "u" ([) "[" (identifier) "n1" (]) "]" (,) "," (subscript_expression) "v[n1]" (identifier) "v" ([) "[" (identifier) "n1" (]) "]" (,) "," (identifier) "nx_" (,) "," (identifier) "ny_" (,) "," (pointer_expression) "&num_flux" (&) "&" (identifier) "num_flux" ()) ")" (;) ";" (expression_statement) "rhs[n1] -= num_flux * delta_s;" (assignment_expression) "rhs[n1] -= num_flux * delta_s" (subscript_expression) "rhs[n1]" (identifier) "rhs" ([) "[" (identifier) "n1" (]) "]" (-=) "-=" (binary_expression) "num_flux * delta_s" (identifier) "num_flux" (*) "*" (identifier) "delta_s" (;) ";" (expression_statement) "rhs[n2] += num_flux * delta_s;" (assignment_expression) "rhs[n2] += num_flux * delta_s" (subscript_expression) "rhs[n2]" (identifier) "rhs" ([) "[" (identifier) "n2" (]) "]" (+=) "+=" (binary_expression) "num_flux * delta_s" (identifier) "num_flux" (*) "*" (identifier) "delta_s" (;) ";" (preproc_if) "#if DEBUG\n mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif" (#if) "#if" (identifier) "DEBUG" ( ) "\n" (expression_statement) "mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);" (call_expression) "mexPrintf("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2])" (identifier) "mexPrintf" (argument_list) "("k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2])" (() "(" (string_literal) ""k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\n"" (") """ (string_content) "k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e" (escape_sequence) "\n" (") """ (,) "," (identifier) "k" (,) "," (identifier) "n" (,) "," (identifier) "n1" (,) "," (identifier) "n2" (,) "," (identifier) "nx_" (,) "," (identifier) "ny_" (,) "," (identifier) "delta_s" (,) "," (identifier) "num_flux" (,) "," (subscript_expression) "rhs[n1]" (identifier) "rhs" ([) "[" (identifier) "n1" (]) "]" (,) "," (subscript_expression) "rhs[n2]" (identifier) "rhs" ([) "[" (identifier) "n2" (]) "]" ()) ")" (;) ";" (#endif) "#endif" (expression_statement) "ind++;" (update_expression) "ind++" (identifier) "ind" (++) "++" (;) ";" (}) "}" (}) "}" (preproc_if) "#if DEBUG\n mexPrintf("inner_rhs = \n");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }\n mexPrintf("\n");\n }\n#endif" (#if) "#if" (identifier) "DEBUG" ( ) "\n" (expression_statement) "mexPrintf("inner_rhs = \n");" (call_expression) "mexPrintf("inner_rhs = \n")" (identifier) "mexPrintf" (argument_list) "("inner_rhs = \n")" (() "(" (string_literal) ""inner_rhs = \n"" (") """ (string_content) "inner_rhs = " (escape_sequence) "\n" (") """ ()) ")" (;) ";" (declaration) "int n;" (primitive_type) "int" (identifier) "n" (;) ";" (for_statement) "for (n = 0; n < Np; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }\n mexPrintf("\n");\n }" (for) "for" (() "(" (assignment_expression) "n = 0" (identifier) "n" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "n < Np" (identifier) "n" (<) "<" (identifier) "Np" (;) ";" (update_expression) "n++" (identifier) "n" (++) "++" ()) ")" (compound_statement) "{\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }\n mexPrintf("\n");\n }" ({) "{" (expression_statement) "mexPrintf("\t");" (call_expression) "mexPrintf("\t")" (identifier) "mexPrintf" (argument_list) "("\t")" (() "(" (string_literal) ""\t"" (") """ (escape_sequence) "\t" (") """ ()) ")" (;) ";" (for_statement) "for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", rhs[k * Np + n]);\n }" (for) "for" (() "(" (assignment_expression) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < K" (identifier) "k" (<) "<" (identifier) "K" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n mexPrintf("%e\t", rhs[k * Np + n]);\n }" ({) "{" (expression_statement) "mexPrintf("%e\t", rhs[k * Np + n]);" (call_expression) "mexPrintf("%e\t", rhs[k * Np + n])" (identifier) "mexPrintf" (argument_list) "("%e\t", rhs[k * Np + n])" (() "(" (string_literal) ""%e\t"" (") """ (string_content) "%e" (escape_sequence) "\t" (") """ (,) "," (subscript_expression) "rhs[k * Np + n]" (identifier) "rhs" ([) "[" (binary_expression) "k * Np + n" (binary_expression) "k * Np" (identifier) "k" (*) "*" (identifier) "Np" (+) "+" (identifier) "n" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "mexPrintf("\n");" (call_expression) "mexPrintf("\n")" (identifier) "mexPrintf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (#endif) "#endif" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (function_definition) "void surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)\n{\n\n int k;\n double *flux = calloc(Nfp * K, sizeof(double));\n // #ifdef _OPENMP\n // #pragma omp parallel for num_threads(DG_THREADS)\n // #endif\n for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }\n#if DEBUG\n mexPrintf("flux = \n");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }\n mexPrintf("\n");\n }\n#endif\n double *stemp = calloc(Nfp * K, sizeof(double));\n dvecm(Nfp * K, 1, flux, Js, stemp);\n char *chn = "N";\n double one = 1.0;\n mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;\n dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_);\n free(flux);\n free(stemp);\n return;\n}" (primitive_type) "void" (function_declarator) "surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)" (identifier) "surface_fv_term" (parameter_list) "(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)" (() "(" (parameter_declaration) "size_t Np" (primitive_type) "size_t" (identifier) "Np" (,) "," (parameter_declaration) "size_t Nfp" (primitive_type) "size_t" (identifier) "Nfp" (,) "," (parameter_declaration) "size_t K" (primitive_type) "size_t" (identifier) "K" (,) "," (parameter_declaration) "double *h" (primitive_type) "double" (pointer_declarator) "*h" (*) "*" (identifier) "h" (,) "," (parameter_declaration) "double *h_ext" (primitive_type) "double" (pointer_declarator) "*h_ext" (*) "*" (identifier) "h_ext" (,) "," (parameter_declaration) "double *u" (primitive_type) "double" (pointer_declarator) "*u" (*) "*" (identifier) "u" (,) "," (parameter_declaration) "double *v" (primitive_type) "double" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "signed char *EToR" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (pointer_declarator) "*EToR" (*) "*" (identifier) "EToR" (,) "," (parameter_declaration) "signed char *eidtype" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (pointer_declarator) "*eidtype" (*) "*" (identifier) "eidtype" (,) "," (parameter_declaration) "double *eidM" (primitive_type) "double" (pointer_declarator) "*eidM" (*) "*" (identifier) "eidM" (,) "," (parameter_declaration) "double *eidP" (primitive_type) "double" (pointer_declarator) "*eidP" (*) "*" (identifier) "eidP" (,) "," (parameter_declaration) "double *nx" (primitive_type) "double" (pointer_declarator) "*nx" (*) "*" (identifier) "nx" (,) "," (parameter_declaration) "double *ny" (primitive_type) "double" (pointer_declarator) "*ny" (*) "*" (identifier) "ny" (,) "," (parameter_declaration) "double *Js" (primitive_type) "double" (pointer_declarator) "*Js" (*) "*" (identifier) "Js" (,) "," (parameter_declaration) "double *LIFT" (primitive_type) "double" (pointer_declarator) "*LIFT" (*) "*" (identifier) "LIFT" (,) "," (parameter_declaration) "double *rhs" (primitive_type) "double" (pointer_declarator) "*rhs" (*) "*" (identifier) "rhs" ()) ")" (compound_statement) "{\n\n int k;\n double *flux = calloc(Nfp * K, sizeof(double));\n // #ifdef _OPENMP\n // #pragma omp parallel for num_threads(DG_THREADS)\n // #endif\n for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }\n#if DEBUG\n mexPrintf("flux = \n");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }\n mexPrintf("\n");\n }\n#endif\n double *stemp = calloc(Nfp * K, sizeof(double));\n dvecm(Nfp * K, 1, flux, Js, stemp);\n char *chn = "N";\n double one = 1.0;\n mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;\n dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_);\n free(flux);\n free(stemp);\n return;\n}" ({) "{" (declaration) "int k;" (primitive_type) "int" (identifier) "k" (;) ";" (declaration) "double *flux = calloc(Nfp * K, sizeof(double));" (primitive_type) "double" (init_declarator) "*flux = calloc(Nfp * K, sizeof(double))" (pointer_declarator) "*flux" (*) "*" (identifier) "flux" (=) "=" (call_expression) "calloc(Nfp * K, sizeof(double))" (identifier) "calloc" (argument_list) "(Nfp * K, sizeof(double))" (() "(" (binary_expression) "Nfp * K" (identifier) "Nfp" (*) "*" (identifier) "K" (,) "," (sizeof_expression) "sizeof(double)" (sizeof) "sizeof" (() "(" (type_descriptor) "double" (primitive_type) "double" ()) ")" ()) ")" (;) ";" (comment) "// #ifdef _OPENMP" (comment) "// #pragma omp parallel for num_threads(DG_THREADS)" (comment) "// #endif" (for_statement) "for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }" (for) "for" (() "(" (assignment_expression) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < K" (identifier) "k" (<) "<" (identifier) "K" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }" ({) "{" (if_statement) "if ((cell_type)EToR[k] != REFINE)\n continue;" (if) "if" (parenthesized_expression) "((cell_type)EToR[k] != REFINE)" (() "(" (binary_expression) "(cell_type)EToR[k] != REFINE" (cast_expression) "(cell_type)EToR[k]" (() "(" (type_descriptor) "cell_type" (type_identifier) "cell_type" ()) ")" (subscript_expression) "EToR[k]" (identifier) "EToR" ([) "[" (identifier) "k" (]) "]" (!=) "!=" (identifier) "REFINE" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (declaration) "int j, ind = k * Nfp;" (primitive_type) "int" (identifier) "j" (,) "," (init_declarator) "ind = k * Nfp" (identifier) "ind" (=) "=" (binary_expression) "k * Nfp" (identifier) "k" (*) "*" (identifier) "Nfp" (;) ";" (for_statement) "for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }" (for) "for" (() "(" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < Nfp" (identifier) "j" (<) "<" (identifier) "Nfp" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt("Unknown boundary conditions.");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }" ({) "{" (declaration) "int iM = (int)eidM[ind] - 1;" (primitive_type) "int" (init_declarator) "iM = (int)eidM[ind] - 1" (identifier) "iM" (=) "=" (binary_expression) "(int)eidM[ind] - 1" (cast_expression) "(int)eidM[ind]" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (subscript_expression) "eidM[ind]" (identifier) "eidM" ([) "[" (identifier) "ind" (]) "]" (-) "-" (number_literal) "1" (;) ";" (comment) "// change index to C type" (declaration) "int iP = (int)eidP[ind] - 1;" (primitive_type) "int" (init_declarator) "iP = (int)eidP[ind] - 1" (identifier) "iP" (=) "=" (binary_expression) "(int)eidP[ind] - 1" (cast_expression) "(int)eidP[ind]" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (subscript_expression) "eidP[ind]" (identifier) "eidP" ([) "[" (identifier) "ind" (]) "]" (-) "-" (number_literal) "1" (;) ";" (declaration) "double f_M = h[iM];" (primitive_type) "double" (init_declarator) "f_M = h[iM]" (identifier) "f_M" (=) "=" (subscript_expression) "h[iM]" (identifier) "h" ([) "[" (identifier) "iM" (]) "]" (;) ";" (comment) "// local and adjacent node values" (declaration) "double hP = h[iP];" (primitive_type) "double" (init_declarator) "hP = h[iP]" (identifier) "hP" (=) "=" (subscript_expression) "h[iP]" (identifier) "h" ([) "[" (identifier) "iP" (]) "]" (;) ";" (declaration) "double uM = u[iM], vM = v[iM];" (primitive_type) "double" (init_declarator) "uM = u[iM]" (identifier) "uM" (=) "=" (subscript_expression) "u[iM]" (identifier) "u" ([) "[" (identifier) "iM" (]) "]" (,) "," (init_declarator) "vM = v[iM]" (identifier) "vM" (=) "=" (subscript_expression) "v[iM]" (identifier) "v" ([) "[" (identifier) "iM" (]) "]" (;) ";" (comment) "// outward normal vector of local element" (declaration) "double nx_ = nx[ind];" (primitive_type) "double" (init_declarator) "nx_ = nx[ind]" (identifier) "nx_" (=) "=" (subscript_expression) "nx[ind]" (identifier) "nx" ([) "[" (identifier) "ind" (]) "]" (;) ";" (declaration) "double ny_ = ny[ind];" (primitive_type) "double" (init_declarator) "ny_ = ny[ind]" (identifier) "ny_" (=) "=" (subscript_expression) "ny[ind]" (identifier) "ny" ([) "[" (identifier) "ind" (]) "]" (;) ";" (declaration) "double f_ext;" (primitive_type) "double" (identifier) "f_ext" (;) ";" (comment) "// external values on local nodes" (expression_statement) "f_ext = h_ext[iM];" (assignment_expression) "f_ext = h_ext[iM]" (identifier) "f_ext" (=) "=" (subscript_expression) "h_ext[iM]" (identifier) "h_ext" ([) "[" (identifier) "iM" (]) "]" (;) ";" (declaration) "bc_type type = (bc_type)eidtype[ind];" (type_identifier) "bc_type" (init_declarator) "type = (bc_type)eidtype[ind]" (identifier) "type" (=) "=" (cast_expression) "(bc_type)eidtype[ind]" (() "(" (type_descriptor) "bc_type" (type_identifier) "bc_type" ()) ")" (subscript_expression) "eidtype[ind]" (identifier) "eidtype" ([) "[" (identifier) "ind" (]) "]" (;) ";" (comment) "// get adjacent values hP, qxP, qyP, considering" (comment) "// various boudnary conditions" (declaration) "double f_P;" (primitive_type) "double" (identifier) "f_P" (;) ";" (declaration) "int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);" (primitive_type) "int" (init_declarator) "info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P)" (identifier) "info" (=) "=" (call_expression) "bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P)" (identifier) "bound_cond" (argument_list) "(f_M, hP, f_ext, nx_, ny_, type, &f_P)" (() "(" (identifier) "f_M" (,) "," (identifier) "hP" (,) "," (identifier) "f_ext" (,) "," (identifier) "nx_" (,) "," (identifier) "ny_" (,) "," (identifier) "type" (,) "," (pointer_expression) "&f_P" (&) "&" (identifier) "f_P" ()) ")" (;) ";" (comment) "// if(info) mexErrMsgTxt("Unknown boundary conditions.");" (declaration) "double numflux;" (primitive_type) "double" (identifier) "numflux" (;) ";" (expression_statement) "upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);" (call_expression) "upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux)" (identifier) "upwind_flux" (argument_list) "(f_M, f_P, uM, vM, nx_, ny_, &numflux)" (() "(" (identifier) "f_M" (,) "," (identifier) "f_P" (,) "," (identifier) "uM" (,) "," (identifier) "vM" (,) "," (identifier) "nx_" (,) "," (identifier) "ny_" (,) "," (pointer_expression) "&numflux" (&) "&" (identifier) "numflux" ()) ")" (;) ";" (expression_statement) "flux[ind] = -numflux;" (assignment_expression) "flux[ind] = -numflux" (subscript_expression) "flux[ind]" (identifier) "flux" ([) "[" (identifier) "ind" (]) "]" (=) "=" (unary_expression) "-numflux" (-) "-" (identifier) "numflux" (;) ";" (expression_statement) "ind++;" (update_expression) "ind++" (identifier) "ind" (++) "++" (;) ";" (}) "}" (}) "}" (preproc_if) "#if DEBUG\n mexPrintf("flux = \n");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }\n mexPrintf("\n");\n }\n#endif" (#if) "#if" (identifier) "DEBUG" ( ) "\n" (expression_statement) "mexPrintf("flux = \n");" (call_expression) "mexPrintf("flux = \n")" (identifier) "mexPrintf" (argument_list) "("flux = \n")" (() "(" (string_literal) ""flux = \n"" (") """ (string_content) "flux = " (escape_sequence) "\n" (") """ ()) ")" (;) ";" (declaration) "int n;" (primitive_type) "int" (identifier) "n" (;) ";" (for_statement) "for (n = 0; n < Nfp; n++)\n {\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }\n mexPrintf("\n");\n }" (for) "for" (() "(" (assignment_expression) "n = 0" (identifier) "n" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "n < Nfp" (identifier) "n" (<) "<" (identifier) "Nfp" (;) ";" (update_expression) "n++" (identifier) "n" (++) "++" ()) ")" (compound_statement) "{\n mexPrintf("\t");\n for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }\n mexPrintf("\n");\n }" ({) "{" (expression_statement) "mexPrintf("\t");" (call_expression) "mexPrintf("\t")" (identifier) "mexPrintf" (argument_list) "("\t")" (() "(" (string_literal) ""\t"" (") """ (escape_sequence) "\t" (") """ ()) ")" (;) ";" (for_statement) "for (k = 0; k < K; k++)\n {\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }" (for) "for" (() "(" (assignment_expression) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < K" (identifier) "k" (<) "<" (identifier) "K" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n mexPrintf("%e\t", flux[k * Nfp + n]);\n }" ({) "{" (expression_statement) "mexPrintf("%e\t", flux[k * Nfp + n]);" (call_expression) "mexPrintf("%e\t", flux[k * Nfp + n])" (identifier) "mexPrintf" (argument_list) "("%e\t", flux[k * Nfp + n])" (() "(" (string_literal) ""%e\t"" (") """ (string_content) "%e" (escape_sequence) "\t" (") """ (,) "," (subscript_expression) "flux[k * Nfp + n]" (identifier) "flux" ([) "[" (binary_expression) "k * Nfp + n" (binary_expression) "k * Nfp" (identifier) "k" (*) "*" (identifier) "Nfp" (+) "+" (identifier) "n" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "mexPrintf("\n");" (call_expression) "mexPrintf("\n")" (identifier) "mexPrintf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (#endif) "#endif" (declaration) "double *stemp = calloc(Nfp * K, sizeof(double));" (primitive_type) "double" (init_declarator) "*stemp = calloc(Nfp * K, sizeof(double))" (pointer_declarator) "*stemp" (*) "*" (identifier) "stemp" (=) "=" (call_expression) "calloc(Nfp * K, sizeof(double))" (identifier) "calloc" (argument_list) "(Nfp * K, sizeof(double))" (() "(" (binary_expression) "Nfp * K" (identifier) "Nfp" (*) "*" (identifier) "K" (,) "," (sizeof_expression) "sizeof(double)" (sizeof) "sizeof" (() "(" (type_descriptor) "double" (primitive_type) "double" ()) ")" ()) ")" (;) ";" (expression_statement) "dvecm(Nfp * K, 1, flux, Js, stemp);" (call_expression) "dvecm(Nfp * K, 1, flux, Js, stemp)" (identifier) "dvecm" (argument_list) "(Nfp * K, 1, flux, Js, stemp)" (() "(" (binary_expression) "Nfp * K" (identifier) "Nfp" (*) "*" (identifier) "K" (,) "," (number_literal) "1" (,) "," (identifier) "flux" (,) "," (identifier) "Js" (,) "," (identifier) "stemp" ()) ")" (;) ";" (declaration) "char *chn = "N";" (primitive_type) "char" (init_declarator) "*chn = "N"" (pointer_declarator) "*chn" (*) "*" (identifier) "chn" (=) "=" (string_literal) ""N"" (") """ (string_content) "N" (") """ (;) ";" (declaration) "double one = 1.0;" (primitive_type) "double" (init_declarator) "one = 1.0" (identifier) "one" (=) "=" (number_literal) "1.0" (;) ";" (declaration) "mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;" (type_identifier) "mwSignedIndex" (init_declarator) "Np_ = Np" (identifier) "Np_" (=) "=" (identifier) "Np" (,) "," (init_declarator) "K_ = K" (identifier) "K_" (=) "=" (identifier) "K" (,) "," (init_declarator) "Nfp_ = Nfp" (identifier) "Nfp_" (=) "=" (identifier) "Nfp" (;) ";" (expression_statement) "dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_);" (call_expression) "dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_)" (identifier) "dgemm" (argument_list) "(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_)" (() "(" (identifier) "chn" (,) "," (identifier) "chn" (,) "," (pointer_expression) "&Np_" (&) "&" (identifier) "Np_" (,) "," (pointer_expression) "&K_" (&) "&" (identifier) "K_" (,) "," (pointer_expression) "&Nfp_" (&) "&" (identifier) "Nfp_" (,) "," (pointer_expression) "&one" (&) "&" (identifier) "one" (,) "," (identifier) "LIFT" (,) "," (pointer_expression) "&Np_" (&) "&" (identifier) "Np_" (,) "," (identifier) "stemp" (,) "," (pointer_expression) "&Nfp_" (&) "&" (identifier) "Nfp_" (,) "," (pointer_expression) "&one" (&) "&" (identifier) "one" (,) "," (identifier) "rhs" (,) "," (pointer_expression) "&Np_" (&) "&" (identifier) "Np_" ()) ")" (;) ";" (expression_statement) "free(flux);" (call_expression) "free(flux)" (identifier) "free" (argument_list) "(flux)" (() "(" (identifier) "flux" ()) ")" (;) ";" (expression_statement) "free(stemp);" (call_expression) "free(stemp)" (identifier) "free" (argument_list) "(stemp)" (() "(" (identifier) "stemp" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (comment) "/*\n * @brief calculate the sub-cell discretization by finite volume scheme.\n * Usages: \n * [ rhsQ ] = rhs_fv_term(f_Q, f_ext, u, v, Nedge, v1, v2, nx, ny, ds, ...\n * eidM, eidP, nxM, nyM, Js, LIFT, vol, ...\n * eidtype, EToR)\n */" (function_definition) "void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])\n{\n /* check input */\n if (nrhs != 19)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }\n\n double *f_Q = mxGetPr(prhs[0]);\n double *f_extQ = mxGetPr(prhs[1]);\n double *u = mxGetPr(prhs[2]);\n double *v = mxGetPr(prhs[3]);\n double Nedge = mxGetScalar(prhs[4]);\n double *v1 = mxGetPr(prhs[5]);\n double *v2 = mxGetPr(prhs[6]);\n double *nx = mxGetPr(prhs[7]);\n double *ny = mxGetPr(prhs[8]);\n double *ds = mxGetPr(prhs[9]);\n double *eidM = mxGetPr(prhs[10]);\n double *eidP = mxGetPr(prhs[11]);\n double *nxM = mxGetPr(prhs[12]);\n double *nyM = mxGetPr(prhs[13]);\n double *Js = mxGetPr(prhs[14]);\n double *LIFT = mxGetPr(prhs[15]);\n double *vol = mxGetPr(prhs[16]);\n signed char *eidtype = (signed char *)mxGetData(prhs[17]);\n signed char *EToR = (signed char *)mxGetData(prhs[18]);\n\n /* get dimensions */\n size_t Np = mxGetM(prhs[0]);\n size_t K = mxGetN(prhs[0]);\n size_t Nfp = mxGetM(prhs[10]);\n\n /* allocate output array */\n plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL);\n double *rhsQ = mxGetPr(plhs[0]);\n\n double *vtemp = calloc(Np * K, sizeof(double));\n inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp);\n\n surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp);\n\n dvecd(Np * K, 1, vtemp, vol, rhsQ);\n\n free(vtemp);\n return;\n}" (primitive_type) "void" (function_declarator) "mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])" (identifier) "mexFunction" (parameter_list) "(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])" (() "(" (parameter_declaration) "int nlhs" (primitive_type) "int" (identifier) "nlhs" (,) "," (parameter_declaration) "mxArray *plhs[]" (type_identifier) "mxArray" (pointer_declarator) "*plhs[]" (*) "*" (array_declarator) "plhs[]" (identifier) "plhs" ([) "[" (]) "]" (,) "," (parameter_declaration) "int nrhs" (primitive_type) "int" (identifier) "nrhs" (,) "," (parameter_declaration) "const mxArray *prhs[]" (type_qualifier) "const" (const) "const" (type_identifier) "mxArray" (pointer_declarator) "*prhs[]" (*) "*" (array_declarator) "prhs[]" (identifier) "prhs" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n /* check input */\n if (nrhs != 19)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }\n\n double *f_Q = mxGetPr(prhs[0]);\n double *f_extQ = mxGetPr(prhs[1]);\n double *u = mxGetPr(prhs[2]);\n double *v = mxGetPr(prhs[3]);\n double Nedge = mxGetScalar(prhs[4]);\n double *v1 = mxGetPr(prhs[5]);\n double *v2 = mxGetPr(prhs[6]);\n double *nx = mxGetPr(prhs[7]);\n double *ny = mxGetPr(prhs[8]);\n double *ds = mxGetPr(prhs[9]);\n double *eidM = mxGetPr(prhs[10]);\n double *eidP = mxGetPr(prhs[11]);\n double *nxM = mxGetPr(prhs[12]);\n double *nyM = mxGetPr(prhs[13]);\n double *Js = mxGetPr(prhs[14]);\n double *LIFT = mxGetPr(prhs[15]);\n double *vol = mxGetPr(prhs[16]);\n signed char *eidtype = (signed char *)mxGetData(prhs[17]);\n signed char *EToR = (signed char *)mxGetData(prhs[18]);\n\n /* get dimensions */\n size_t Np = mxGetM(prhs[0]);\n size_t K = mxGetN(prhs[0]);\n size_t Nfp = mxGetM(prhs[10]);\n\n /* allocate output array */\n plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL);\n double *rhsQ = mxGetPr(plhs[0]);\n\n double *vtemp = calloc(Np * K, sizeof(double));\n inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp);\n\n surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp);\n\n dvecd(Np * K, 1, vtemp, vol, rhsQ);\n\n free(vtemp);\n return;\n}" ({) "{" (comment) "/* check input */" (if_statement) "if (nrhs != 19)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }" (if) "if" (parenthesized_expression) "(nrhs != 19)" (() "(" (binary_expression) "nrhs != 19" (identifier) "nrhs" (!=) "!=" (number_literal) "19" ()) ")" (compound_statement) "{\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.");\n }" ({) "{" (expression_statement) "mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.");" (call_expression) "mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.")" (identifier) "mexErrMsgIdAndTxt" (argument_list) "("MATLAB:rhs_fv_term:invalidNumInputs",\n "20 input required.")" (() "(" (string_literal) ""MATLAB:rhs_fv_term:invalidNumInputs"" (") """ (string_content) "MATLAB:rhs_fv_term:invalidNumInputs" (") """ (,) "," (string_literal) ""20 input required."" (") """ (string_content) "20 input required." (") """ ()) ")" (;) ";" (}) "}" (else_clause) "else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }" (else) "else" (if_statement) "if (nlhs > 1)\n {\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }" (if) "if" (parenthesized_expression) "(nlhs > 1)" (() "(" (binary_expression) "nlhs > 1" (identifier) "nlhs" (>) ">" (number_literal) "1" ()) ")" (compound_statement) "{\n mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");\n }" ({) "{" (expression_statement) "mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.");" (call_expression) "mexErrMsgIdAndTxt("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.")" (identifier) "mexErrMsgIdAndTxt" (argument_list) "("MATLAB:rhs_fv_term:maxlhs",\n "Too many output arguments.")" (() "(" (string_literal) ""MATLAB:rhs_fv_term:maxlhs"" (") """ (string_content) "MATLAB:rhs_fv_term:maxlhs" (") """ (,) "," (string_literal) ""Too many output arguments."" (") """ (string_content) "Too many output arguments." (") """ ()) ")" (;) ";" (}) "}" (declaration) "double *f_Q = mxGetPr(prhs[0]);" (primitive_type) "double" (init_declarator) "*f_Q = mxGetPr(prhs[0])" (pointer_declarator) "*f_Q" (*) "*" (identifier) "f_Q" (=) "=" (call_expression) "mxGetPr(prhs[0])" (identifier) "mxGetPr" (argument_list) "(prhs[0])" (() "(" (subscript_expression) "prhs[0]" (identifier) "prhs" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (declaration) "double *f_extQ = mxGetPr(prhs[1]);" (primitive_type) "double" (init_declarator) "*f_extQ = mxGetPr(prhs[1])" (pointer_declarator) "*f_extQ" (*) "*" (identifier) "f_extQ" (=) "=" (call_expression) "mxGetPr(prhs[1])" (identifier) "mxGetPr" (argument_list) "(prhs[1])" (() "(" (subscript_expression) "prhs[1]" (identifier) "prhs" ([) "[" (number_literal) "1" (]) "]" ()) ")" (;) ";" (declaration) "double *u = mxGetPr(prhs[2]);" (primitive_type) "double" (init_declarator) "*u = mxGetPr(prhs[2])" (pointer_declarator) "*u" (*) "*" (identifier) "u" (=) "=" (call_expression) "mxGetPr(prhs[2])" (identifier) "mxGetPr" (argument_list) "(prhs[2])" (() "(" (subscript_expression) "prhs[2]" (identifier) "prhs" ([) "[" (number_literal) "2" (]) "]" ()) ")" (;) ";" (declaration) "double *v = mxGetPr(prhs[3]);" (primitive_type) "double" (init_declarator) "*v = mxGetPr(prhs[3])" (pointer_declarator) "*v" (*) "*" (identifier) "v" (=) "=" (call_expression) "mxGetPr(prhs[3])" (identifier) "mxGetPr" (argument_list) "(prhs[3])" (() "(" (subscript_expression) "prhs[3]" (identifier) "prhs" ([) "[" (number_literal) "3" (]) "]" ()) ")" (;) ";" (declaration) "double Nedge = mxGetScalar(prhs[4]);" (primitive_type) "double" (init_declarator) "Nedge = mxGetScalar(prhs[4])" (identifier) "Nedge" (=) "=" (call_expression) "mxGetScalar(prhs[4])" (identifier) "mxGetScalar" (argument_list) "(prhs[4])" (() "(" (subscript_expression) "prhs[4]" (identifier) "prhs" ([) "[" (number_literal) "4" (]) "]" ()) ")" (;) ";" (declaration) "double *v1 = mxGetPr(prhs[5]);" (primitive_type) "double" (init_declarator) "*v1 = mxGetPr(prhs[5])" (pointer_declarator) "*v1" (*) "*" (identifier) "v1" (=) "=" (call_expression) "mxGetPr(prhs[5])" (identifier) "mxGetPr" (argument_list) "(prhs[5])" (() "(" (subscript_expression) "prhs[5]" (identifier) "prhs" ([) "[" (number_literal) "5" (]) "]" ()) ")" (;) ";" (declaration) "double *v2 = mxGetPr(prhs[6]);" (primitive_type) "double" (init_declarator) "*v2 = mxGetPr(prhs[6])" (pointer_declarator) "*v2" (*) "*" (identifier) "v2" (=) "=" (call_expression) "mxGetPr(prhs[6])" (identifier) "mxGetPr" (argument_list) "(prhs[6])" (() "(" (subscript_expression) "prhs[6]" (identifier) "prhs" ([) "[" (number_literal) "6" (]) "]" ()) ")" (;) ";" (declaration) "double *nx = mxGetPr(prhs[7]);" (primitive_type) "double" (init_declarator) "*nx = mxGetPr(prhs[7])" (pointer_declarator) "*nx" (*) "*" (identifier) "nx" (=) "=" (call_expression) "mxGetPr(prhs[7])" (identifier) "mxGetPr" (argument_list) "(prhs[7])" (() "(" (subscript_expression) "prhs[7]" (identifier) "prhs" ([) "[" (number_literal) "7" (]) "]" ()) ")" (;) ";" (declaration) "double *ny = mxGetPr(prhs[8]);" (primitive_type) "double" (init_declarator) "*ny = mxGetPr(prhs[8])" (pointer_declarator) "*ny" (*) "*" (identifier) "ny" (=) "=" (call_expression) "mxGetPr(prhs[8])" (identifier) "mxGetPr" (argument_list) "(prhs[8])" (() "(" (subscript_expression) "prhs[8]" (identifier) "prhs" ([) "[" (number_literal) "8" (]) "]" ()) ")" (;) ";" (declaration) "double *ds = mxGetPr(prhs[9]);" (primitive_type) "double" (init_declarator) "*ds = mxGetPr(prhs[9])" (pointer_declarator) "*ds" (*) "*" (identifier) "ds" (=) "=" (call_expression) "mxGetPr(prhs[9])" (identifier) "mxGetPr" (argument_list) "(prhs[9])" (() "(" (subscript_expression) "prhs[9]" (identifier) "prhs" ([) "[" (number_literal) "9" (]) "]" ()) ")" (;) ";" (declaration) "double *eidM = mxGetPr(prhs[10]);" (primitive_type) "double" (init_declarator) "*eidM = mxGetPr(prhs[10])" (pointer_declarator) "*eidM" (*) "*" (identifier) "eidM" (=) "=" (call_expression) "mxGetPr(prhs[10])" (identifier) "mxGetPr" (argument_list) "(prhs[10])" (() "(" (subscript_expression) "prhs[10]" (identifier) "prhs" ([) "[" (number_literal) "10" (]) "]" ()) ")" (;) ";" (declaration) "double *eidP = mxGetPr(prhs[11]);" (primitive_type) "double" (init_declarator) "*eidP = mxGetPr(prhs[11])" (pointer_declarator) "*eidP" (*) "*" (identifier) "eidP" (=) "=" (call_expression) "mxGetPr(prhs[11])" (identifier) "mxGetPr" (argument_list) "(prhs[11])" (() "(" (subscript_expression) "prhs[11]" (identifier) "prhs" ([) "[" (number_literal) "11" (]) "]" ()) ")" (;) ";" (declaration) "double *nxM = mxGetPr(prhs[12]);" (primitive_type) "double" (init_declarator) "*nxM = mxGetPr(prhs[12])" (pointer_declarator) "*nxM" (*) "*" (identifier) "nxM" (=) "=" (call_expression) "mxGetPr(prhs[12])" (identifier) "mxGetPr" (argument_list) "(prhs[12])" (() "(" (subscript_expression) "prhs[12]" (identifier) "prhs" ([) "[" (number_literal) "12" (]) "]" ()) ")" (;) ";" (declaration) "double *nyM = mxGetPr(prhs[13]);" (primitive_type) "double" (init_declarator) "*nyM = mxGetPr(prhs[13])" (pointer_declarator) "*nyM" (*) "*" (identifier) "nyM" (=) "=" (call_expression) "mxGetPr(prhs[13])" (identifier) "mxGetPr" (argument_list) "(prhs[13])" (() "(" (subscript_expression) "prhs[13]" (identifier) "prhs" ([) "[" (number_literal) "13" (]) "]" ()) ")" (;) ";" (declaration) "double *Js = mxGetPr(prhs[14]);" (primitive_type) "double" (init_declarator) "*Js = mxGetPr(prhs[14])" (pointer_declarator) "*Js" (*) "*" (identifier) "Js" (=) "=" (call_expression) "mxGetPr(prhs[14])" (identifier) "mxGetPr" (argument_list) "(prhs[14])" (() "(" (subscript_expression) "prhs[14]" (identifier) "prhs" ([) "[" (number_literal) "14" (]) "]" ()) ")" (;) ";" (declaration) "double *LIFT = mxGetPr(prhs[15]);" (primitive_type) "double" (init_declarator) "*LIFT = mxGetPr(prhs[15])" (pointer_declarator) "*LIFT" (*) "*" (identifier) "LIFT" (=) "=" (call_expression) "mxGetPr(prhs[15])" (identifier) "mxGetPr" (argument_list) "(prhs[15])" (() "(" (subscript_expression) "prhs[15]" (identifier) "prhs" ([) "[" (number_literal) "15" (]) "]" ()) ")" (;) ";" (declaration) "double *vol = mxGetPr(prhs[16]);" (primitive_type) "double" (init_declarator) "*vol = mxGetPr(prhs[16])" (pointer_declarator) "*vol" (*) "*" (identifier) "vol" (=) "=" (call_expression) "mxGetPr(prhs[16])" (identifier) "mxGetPr" (argument_list) "(prhs[16])" (() "(" (subscript_expression) "prhs[16]" (identifier) "prhs" ([) "[" (number_literal) "16" (]) "]" ()) ")" (;) ";" (declaration) "signed char *eidtype = (signed char *)mxGetData(prhs[17]);" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (init_declarator) "*eidtype = (signed char *)mxGetData(prhs[17])" (pointer_declarator) "*eidtype" (*) "*" (identifier) "eidtype" (=) "=" (cast_expression) "(signed char *)mxGetData(prhs[17])" (() "(" (type_descriptor) "signed char *" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "mxGetData(prhs[17])" (identifier) "mxGetData" (argument_list) "(prhs[17])" (() "(" (subscript_expression) "prhs[17]" (identifier) "prhs" ([) "[" (number_literal) "17" (]) "]" ()) ")" (;) ";" (declaration) "signed char *EToR = (signed char *)mxGetData(prhs[18]);" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (init_declarator) "*EToR = (signed char *)mxGetData(prhs[18])" (pointer_declarator) "*EToR" (*) "*" (identifier) "EToR" (=) "=" (cast_expression) "(signed char *)mxGetData(prhs[18])" (() "(" (type_descriptor) "signed char *" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "mxGetData(prhs[18])" (identifier) "mxGetData" (argument_list) "(prhs[18])" (() "(" (subscript_expression) "prhs[18]" (identifier) "prhs" ([) "[" (number_literal) "18" (]) "]" ()) ")" (;) ";" (comment) "/* get dimensions */" (declaration) "size_t Np = mxGetM(prhs[0]);" (primitive_type) "size_t" (init_declarator) "Np = mxGetM(prhs[0])" (identifier) "Np" (=) "=" (call_expression) "mxGetM(prhs[0])" (identifier) "mxGetM" (argument_list) "(prhs[0])" (() "(" (subscript_expression) "prhs[0]" (identifier) "prhs" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (declaration) "size_t K = mxGetN(prhs[0]);" (primitive_type) "size_t" (init_declarator) "K = mxGetN(prhs[0])" (identifier) "K" (=) "=" (call_expression) "mxGetN(prhs[0])" (identifier) "mxGetN" (argument_list) "(prhs[0])" (() "(" (subscript_expression) "prhs[0]" (identifier) "prhs" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (declaration) "size_t Nfp = mxGetM(prhs[10]);" (primitive_type) "size_t" (init_declarator) "Nfp = mxGetM(prhs[10])" (identifier) "Nfp" (=) "=" (call_expression) "mxGetM(prhs[10])" (identifier) "mxGetM" (argument_list) "(prhs[10])" (() "(" (subscript_expression) "prhs[10]" (identifier) "prhs" ([) "[" (number_literal) "10" (]) "]" ()) ")" (;) ";" (comment) "/* allocate output array */" (expression_statement) "plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL);" (assignment_expression) "plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL)" (subscript_expression) "plhs[0]" (identifier) "plhs" ([) "[" (number_literal) "0" (]) "]" (=) "=" (call_expression) "mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL)" (identifier) "mxCreateDoubleMatrix" (argument_list) "((mwSize)Np, (mwSize)K, mxREAL)" (() "(" (cast_expression) "(mwSize)Np" (() "(" (type_descriptor) "mwSize" (type_identifier) "mwSize" ()) ")" (identifier) "Np" (,) "," (cast_expression) "(mwSize)K" (() "(" (type_descriptor) "mwSize" (type_identifier) "mwSize" ()) ")" (identifier) "K" (,) "," (identifier) "mxREAL" ()) ")" (;) ";" (declaration) "double *rhsQ = mxGetPr(plhs[0]);" (primitive_type) "double" (init_declarator) "*rhsQ = mxGetPr(plhs[0])" (pointer_declarator) "*rhsQ" (*) "*" (identifier) "rhsQ" (=) "=" (call_expression) "mxGetPr(plhs[0])" (identifier) "mxGetPr" (argument_list) "(plhs[0])" (() "(" (subscript_expression) "plhs[0]" (identifier) "plhs" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (declaration) "double *vtemp = calloc(Np * K, sizeof(double));" (primitive_type) "double" (init_declarator) "*vtemp = calloc(Np * K, sizeof(double))" (pointer_declarator) "*vtemp" (*) "*" (identifier) "vtemp" (=) "=" (call_expression) "calloc(Np * K, sizeof(double))" (identifier) "calloc" (argument_list) "(Np * K, sizeof(double))" (() "(" (binary_expression) "Np * K" (identifier) "Np" (*) "*" (identifier) "K" (,) "," (sizeof_expression) "sizeof(double)" (sizeof) "sizeof" (() "(" (type_descriptor) "double" (primitive_type) "double" ()) ")" ()) ")" (;) ";" (expression_statement) "inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp);" (call_expression) "inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp)" (identifier) "inner_fv_term" (argument_list) "(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp)" (() "(" (identifier) "Np" (,) "," (identifier) "K" (,) "," (identifier) "f_Q" (,) "," (identifier) "u" (,) "," (identifier) "v" (,) "," (cast_expression) "(int)Nedge" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "Nedge" (,) "," (identifier) "v1" (,) "," (identifier) "v2" (,) "," (identifier) "nx" (,) "," (identifier) "ny" (,) "," (identifier) "ds" (,) "," (identifier) "EToR" (,) "," (identifier) "vtemp" ()) ")" (;) ";" (expression_statement) "surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp);" (call_expression) "surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp)" (identifier) "surface_fv_term" (argument_list) "(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp)" (() "(" (identifier) "Np" (,) "," (identifier) "Nfp" (,) "," (identifier) "K" (,) "," (identifier) "f_Q" (,) "," (identifier) "f_extQ" (,) "," (identifier) "u" (,) "," (identifier) "v" (,) "," (identifier) "EToR" (,) "," (identifier) "eidtype" (,) "," (identifier) "eidM" (,) "," (identifier) "eidP" (,) "," (identifier) "nxM" (,) "," (identifier) "nyM" (,) "," (identifier) "Js" (,) "," (identifier) "LIFT" (,) "," (identifier) "vtemp" ()) ")" (;) ";" (expression_statement) "dvecd(Np * K, 1, vtemp, vol, rhsQ);" (call_expression) "dvecd(Np * K, 1, vtemp, vol, rhsQ)" (identifier) "dvecd" (argument_list) "(Np * K, 1, vtemp, vol, rhsQ)" (() "(" (binary_expression) "Np * K" (identifier) "Np" (*) "*" (identifier) "K" (,) "," (number_literal) "1" (,) "," (identifier) "vtemp" (,) "," (identifier) "vol" (,) "," (identifier) "rhsQ" ()) ")" (;) ";" (expression_statement) "free(vtemp);" (call_expression) "free(vtemp)" (identifier) "free" (argument_list) "(vtemp)" (() "(" (identifier) "vtemp" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}"
1,857
0
{"language": "c", "success": true, "metadata": {"lines": 169, "avg_line_length": 32.59, "nodes": 1209, "errors": 0, "source_hash": "1d44d210c31144883dad875ee8dab30078cc6a9eebc09ec12a1c48d3715f7d93", "categorized_nodes": 762}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"mex.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": "\"mex.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_include", "text": "#include \"blas.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": "\"blas.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include \"conv2d.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": "\"conv2d.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 9, "type": "preproc_def", "text": "#define DEBUG 0\n", "parent": null, "children": [10, 11, 12], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 11, "type": "identifier", "text": "DEBUG", "parent": 9, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 13}}, {"id": 12, "type": "preproc_arg", "text": "0", "parent": 9, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 15}}, {"id": 13, "type": "function_definition", "text": "void inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)\n{\n#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif\n for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }\n\n#if DEBUG\n mexPrintf(\"inner_rhs = \\n\");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", rhs[k * Np + n]);\n }\n mexPrintf(\"\\n\");\n }\n#endif\n return;\n}", "parent": null, "children": [14, 15], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"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": "inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)", "parent": 13, "children": [16, 17], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 9, "column": 50}}, {"id": 16, "type": "identifier", "text": "inner_fv_term", "parent": 15, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 18}}, {"id": 17, "type": "parameter_list", "text": "(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)", "parent": 15, "children": [18, 21, 24, 29, 34, 39, 42, 47, 52, 57, 62, 67, 74], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 9, "column": 50}}, {"id": 18, "type": "parameter_declaration", "text": "int Np", "parent": 17, "children": [19, 20], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 25}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 22}}, {"id": 20, "type": "identifier", "text": "Np", "parent": 18, "children": [], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 25}}, {"id": 21, "type": "parameter_declaration", "text": "int K", "parent": 17, "children": [22, 23], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 32}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 30}}, {"id": 23, "type": "identifier", "text": "K", "parent": 21, "children": [], "start_point": {"row": 6, "column": 31}, "end_point": {"row": 6, "column": 32}}, {"id": 24, "type": "parameter_declaration", "text": "double *h", "parent": 17, "children": [25, 26], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 43}}, {"id": 25, "type": "primitive_type", "text": "double", "parent": 24, "children": [], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 40}}, {"id": 26, "type": "pointer_declarator", "text": "*h", "parent": 24, "children": [27, 28], "start_point": {"row": 6, "column": 41}, "end_point": {"row": 6, "column": 43}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 6, "column": 41}, "end_point": {"row": 6, "column": 42}}, {"id": 28, "type": "identifier", "text": "h", "parent": 26, "children": [], "start_point": {"row": 6, "column": 42}, "end_point": {"row": 6, "column": 43}}, {"id": 29, "type": "parameter_declaration", "text": "double *u", "parent": 17, "children": [30, 31], "start_point": {"row": 6, "column": 45}, "end_point": {"row": 6, "column": 54}}, {"id": 30, "type": "primitive_type", "text": "double", "parent": 29, "children": [], "start_point": {"row": 6, "column": 45}, "end_point": {"row": 6, "column": 51}}, {"id": 31, "type": "pointer_declarator", "text": "*u", "parent": 29, "children": [32, 33], "start_point": {"row": 6, "column": 52}, "end_point": {"row": 6, "column": 54}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 6, "column": 52}, "end_point": {"row": 6, "column": 53}}, {"id": 33, "type": "identifier", "text": "u", "parent": 31, "children": [], "start_point": {"row": 6, "column": 53}, "end_point": {"row": 6, "column": 54}}, {"id": 34, "type": "parameter_declaration", "text": "double *v", "parent": 17, "children": [35, 36], "start_point": {"row": 6, "column": 56}, "end_point": {"row": 6, "column": 65}}, {"id": 35, "type": "primitive_type", "text": "double", "parent": 34, "children": [], "start_point": {"row": 6, "column": 56}, "end_point": {"row": 6, "column": 62}}, {"id": 36, "type": "pointer_declarator", "text": "*v", "parent": 34, "children": [37, 38], "start_point": {"row": 6, "column": 63}, "end_point": {"row": 6, "column": 65}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 6, "column": 63}, "end_point": {"row": 6, "column": 64}}, {"id": 38, "type": "identifier", "text": "v", "parent": 36, "children": [], "start_point": {"row": 6, "column": 64}, "end_point": {"row": 6, "column": 65}}, {"id": 39, "type": "parameter_declaration", "text": "int Nedge", "parent": 17, "children": [40, 41], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 28}}, {"id": 40, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 22}}, {"id": 41, "type": "identifier", "text": "Nedge", "parent": 39, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 28}}, {"id": 42, "type": "parameter_declaration", "text": "double *v1", "parent": 17, "children": [43, 44], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 40}}, {"id": 43, "type": "primitive_type", "text": "double", "parent": 42, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 36}}, {"id": 44, "type": "pointer_declarator", "text": "*v1", "parent": 42, "children": [45, 46], "start_point": {"row": 7, "column": 37}, "end_point": {"row": 7, "column": 40}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 7, "column": 37}, "end_point": {"row": 7, "column": 38}}, {"id": 46, "type": "identifier", "text": "v1", "parent": 44, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 7, "column": 40}}, {"id": 47, "type": "parameter_declaration", "text": "double *v2", "parent": 17, "children": [48, 49], "start_point": {"row": 7, "column": 42}, "end_point": {"row": 7, "column": 52}}, {"id": 48, "type": "primitive_type", "text": "double", "parent": 47, "children": [], "start_point": {"row": 7, "column": 42}, "end_point": {"row": 7, "column": 48}}, {"id": 49, "type": "pointer_declarator", "text": "*v2", "parent": 47, "children": [50, 51], "start_point": {"row": 7, "column": 49}, "end_point": {"row": 7, "column": 52}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 7, "column": 49}, "end_point": {"row": 7, "column": 50}}, {"id": 51, "type": "identifier", "text": "v2", "parent": 49, "children": [], "start_point": {"row": 7, "column": 50}, "end_point": {"row": 7, "column": 52}}, {"id": 52, "type": "parameter_declaration", "text": "double *nx", "parent": 17, "children": [53, 54], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 29}}, {"id": 53, "type": "primitive_type", "text": "double", "parent": 52, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 25}}, {"id": 54, "type": "pointer_declarator", "text": "*nx", "parent": 52, "children": [55, 56], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 29}}, {"id": 55, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 27}}, {"id": 56, "type": "identifier", "text": "nx", "parent": 54, "children": [], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 29}}, {"id": 57, "type": "parameter_declaration", "text": "double *ny", "parent": 17, "children": [58, 59], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 41}}, {"id": 58, "type": "primitive_type", "text": "double", "parent": 57, "children": [], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 37}}, {"id": 59, "type": "pointer_declarator", "text": "*ny", "parent": 57, "children": [60, 61], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 41}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 39}}, {"id": 61, "type": "identifier", "text": "ny", "parent": 59, "children": [], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 41}}, {"id": 62, "type": "parameter_declaration", "text": "double *ds", "parent": 17, "children": [63, 64], "start_point": {"row": 8, "column": 43}, "end_point": {"row": 8, "column": 53}}, {"id": 63, "type": "primitive_type", "text": "double", "parent": 62, "children": [], "start_point": {"row": 8, "column": 43}, "end_point": {"row": 8, "column": 49}}, {"id": 64, "type": "pointer_declarator", "text": "*ds", "parent": 62, "children": [65, 66], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 53}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 51}}, {"id": 66, "type": "identifier", "text": "ds", "parent": 64, "children": [], "start_point": {"row": 8, "column": 51}, "end_point": {"row": 8, "column": 53}}, {"id": 67, "type": "parameter_declaration", "text": "signed char *EToR", "parent": 17, "children": [68, 71], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 36}}, {"id": 68, "type": "sized_type_specifier", "text": "signed char", "parent": 67, "children": [69, 70], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 30}}, {"id": 69, "type": "signed", "text": "signed", "parent": 68, "children": [], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 25}}, {"id": 70, "type": "primitive_type", "text": "char", "parent": 68, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 30}}, {"id": 71, "type": "pointer_declarator", "text": "*EToR", "parent": 67, "children": [72, 73], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 36}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 32}}, {"id": 73, "type": "identifier", "text": "EToR", "parent": 71, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 36}}, {"id": 74, "type": "parameter_declaration", "text": "double *rhs", "parent": 17, "children": [75, 76], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 49}}, {"id": 75, "type": "primitive_type", "text": "double", "parent": 74, "children": [], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 44}}, {"id": 76, "type": "pointer_declarator", "text": "*rhs", "parent": 74, "children": [77, 78], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 49}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 46}}, {"id": 78, "type": "identifier", "text": "rhs", "parent": 76, "children": [], "start_point": {"row": 9, "column": 46}, "end_point": {"row": 9, "column": 49}}, {"id": 79, "type": "preproc_ifdef", "text": "#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif", "parent": 13, "children": [80, 81, 82, 85], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 80, "type": "#ifdef", "text": "#ifdef", "parent": 79, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 81, "type": "identifier", "text": "_OPENMP", "parent": 79, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 14}}, {"id": 82, "type": "preproc_call", "text": "#pragma omp parallel for num_threads(DG_THREADS)\n", "parent": 79, "children": [83, 84], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 83, "type": "preproc_directive", "text": "#pragma", "parent": 82, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 84, "type": "preproc_arg", "text": "omp parallel for num_threads(DG_THREADS)", "parent": 82, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 48}}, {"id": 85, "type": "#endif", "text": "#endif", "parent": 79, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 86, "type": "for_statement", "text": "for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }", "parent": 13, "children": [87, 93, 97], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 39, "column": 5}}, {"id": 87, "type": "declaration", "text": "int k = 0;", "parent": 86, "children": [88, 89], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 88, "type": "primitive_type", "text": "int", "parent": 87, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 12}}, {"id": 89, "type": "init_declarator", "text": "k = 0", "parent": 87, "children": [90, 91, 92], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 18}}, {"id": 90, "type": "identifier", "text": "k", "parent": 89, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 14}}, {"id": 91, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 16}}, {"id": 92, "type": "number_literal", "text": "0", "parent": 89, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 18}}, {"id": 93, "type": "binary_expression", "text": "k < K", "parent": 86, "children": [94, 95, 96], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 25}}, {"id": 94, "type": "identifier", "text": "k", "parent": 93, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 21}}, {"id": 95, "type": "<", "text": "<", "parent": 93, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 23}}, {"id": 96, "type": "identifier", "text": "K", "parent": 93, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 97, "type": "update_expression", "text": "k++", "parent": 86, "children": [98, 99], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 30}}, {"id": 98, "type": "identifier", "text": "k", "parent": 97, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 28}}, {"id": 99, "type": "++", "text": "++", "parent": 97, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 30}}, {"id": 100, "type": "if_statement", "text": "if ((cell_type)EToR[k] != REFINE)\n continue;", "parent": 86, "children": [101, 111], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 17, "column": 21}}, {"id": 101, "type": "parenthesized_expression", "text": "((cell_type)EToR[k] != REFINE)", "parent": 100, "children": [102], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 41}}, {"id": 102, "type": "binary_expression", "text": "(cell_type)EToR[k] != REFINE", "parent": 101, "children": [103, 109, 110], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 40}}, {"id": 103, "type": "cast_expression", "text": "(cell_type)EToR[k]", "parent": 102, "children": [104, 106], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 30}}, {"id": 104, "type": "type_descriptor", "text": "cell_type", "parent": 103, "children": [105], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 22}}, {"id": 105, "type": "type_identifier", "text": "cell_type", "parent": 104, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 22}}, {"id": 106, "type": "subscript_expression", "text": "EToR[k]", "parent": 103, "children": [107, 108], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 30}}, {"id": 107, "type": "identifier", "text": "EToR", "parent": 106, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 27}}, {"id": 108, "type": "identifier", "text": "k", "parent": 106, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 29}}, {"id": 109, "type": "!=", "text": "!=", "parent": 102, "children": [], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 33}}, {"id": 110, "type": "identifier", "text": "REFINE", "parent": 102, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 40}}, {"id": 111, "type": "continue_statement", "text": "continue;", "parent": 100, "children": [112], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 21}}, {"id": 112, "type": "continue", "text": "continue", "parent": 111, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 20}}, {"id": 113, "type": "declaration", "text": "int n, ind = k * Nedge;", "parent": 86, "children": [114, 115, 116], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 31}}, {"id": 114, "type": "primitive_type", "text": "int", "parent": 113, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 11}}, {"id": 115, "type": "identifier", "text": "n", "parent": 113, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 13}}, {"id": 116, "type": "init_declarator", "text": "ind = k * Nedge", "parent": 113, "children": [117, 118, 119], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 30}}, {"id": 117, "type": "identifier", "text": "ind", "parent": 116, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 18}}, {"id": 118, "type": "=", "text": "=", "parent": 116, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 20}}, {"id": 119, "type": "binary_expression", "text": "k * Nedge", "parent": 116, "children": [120, 121, 122], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 30}}, {"id": 120, "type": "identifier", "text": "k", "parent": 119, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 22}}, {"id": 121, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 24}}, {"id": 122, "type": "identifier", "text": "Nedge", "parent": 119, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 30}}, {"id": 123, "type": "for_statement", "text": "for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }", "parent": 86, "children": [124, 128, 132], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 38, "column": 9}}, {"id": 124, "type": "assignment_expression", "text": "n = 0", "parent": 123, "children": [125, 126, 127], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 18}}, {"id": 125, "type": "identifier", "text": "n", "parent": 124, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 126, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 16}}, {"id": 127, "type": "number_literal", "text": "0", "parent": 124, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 18}}, {"id": 128, "type": "binary_expression", "text": "n < Nedge", "parent": 123, "children": [129, 130, 131], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 29}}, {"id": 129, "type": "identifier", "text": "n", "parent": 128, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 21}}, {"id": 130, "type": "<", "text": "<", "parent": 128, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 23}}, {"id": 131, "type": "identifier", "text": "Nedge", "parent": 128, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 29}}, {"id": 132, "type": "update_expression", "text": "n++", "parent": 123, "children": [133, 134], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 34}}, {"id": 133, "type": "identifier", "text": "n", "parent": 132, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 32}}, {"id": 134, "type": "++", "text": "++", "parent": 132, "children": [], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 34}}, {"id": 135, "type": "declaration", "text": "int n1 = (int)v1[n] + k*Np - 1;", "parent": 123, "children": [136, 137], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 43}}, {"id": 136, "type": "primitive_type", "text": "int", "parent": 135, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 15}}, {"id": 137, "type": "init_declarator", "text": "n1 = (int)v1[n] + k*Np - 1", "parent": 135, "children": [138, 139, 140], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 42}}, {"id": 138, "type": "identifier", "text": "n1", "parent": 137, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 18}}, {"id": 139, "type": "=", "text": "=", "parent": 137, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 140, "type": "binary_expression", "text": "(int)v1[n] + k*Np - 1", "parent": 137, "children": [141, 153, 154], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 42}}, {"id": 141, "type": "binary_expression", "text": "(int)v1[n] + k*Np", "parent": 140, "children": [142, 148, 149], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 38}}, {"id": 142, "type": "cast_expression", "text": "(int)v1[n]", "parent": 141, "children": [143, 145], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 31}}, {"id": 143, "type": "type_descriptor", "text": "int", "parent": 142, "children": [144], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 25}}, {"id": 144, "type": "primitive_type", "text": "int", "parent": 143, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 25}}, {"id": 145, "type": "subscript_expression", "text": "v1[n]", "parent": 142, "children": [146, 147], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 31}}, {"id": 146, "type": "identifier", "text": "v1", "parent": 145, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 28}}, {"id": 147, "type": "identifier", "text": "n", "parent": 145, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 30}}, {"id": 148, "type": "+", "text": "+", "parent": 141, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 33}}, {"id": 149, "type": "binary_expression", "text": "k*Np", "parent": 141, "children": [150, 151, 152], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 38}}, {"id": 150, "type": "identifier", "text": "k", "parent": 149, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 35}}, {"id": 151, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 36}}, {"id": 152, "type": "identifier", "text": "Np", "parent": 149, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 38}}, {"id": 153, "type": "-", "text": "-", "parent": 140, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 40}}, {"id": 154, "type": "number_literal", "text": "1", "parent": 140, "children": [], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 42}}, {"id": 155, "type": "declaration", "text": "int n2 = (int)v2[n] + k*Np - 1;", "parent": 123, "children": [156, 157], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 43}}, {"id": 156, "type": "primitive_type", "text": "int", "parent": 155, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 15}}, {"id": 157, "type": "init_declarator", "text": "n2 = (int)v2[n] + k*Np - 1", "parent": 155, "children": [158, 159, 160], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 42}}, {"id": 158, "type": "identifier", "text": "n2", "parent": 157, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 18}}, {"id": 159, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 20}}, {"id": 160, "type": "binary_expression", "text": "(int)v2[n] + k*Np - 1", "parent": 157, "children": [161, 173, 174], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 42}}, {"id": 161, "type": "binary_expression", "text": "(int)v2[n] + k*Np", "parent": 160, "children": [162, 168, 169], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 38}}, {"id": 162, "type": "cast_expression", "text": "(int)v2[n]", "parent": 161, "children": [163, 165], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 31}}, {"id": 163, "type": "type_descriptor", "text": "int", "parent": 162, "children": [164], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 25}}, {"id": 164, "type": "primitive_type", "text": "int", "parent": 163, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 25}}, {"id": 165, "type": "subscript_expression", "text": "v2[n]", "parent": 162, "children": [166, 167], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 31}}, {"id": 166, "type": "identifier", "text": "v2", "parent": 165, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 28}}, {"id": 167, "type": "identifier", "text": "n", "parent": 165, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 30}}, {"id": 168, "type": "+", "text": "+", "parent": 161, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 33}}, {"id": 169, "type": "binary_expression", "text": "k*Np", "parent": 161, "children": [170, 171, 172], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 38}}, {"id": 170, "type": "identifier", "text": "k", "parent": 169, "children": [], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 35}}, {"id": 171, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 36}}, {"id": 172, "type": "identifier", "text": "Np", "parent": 169, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 38}}, {"id": 173, "type": "-", "text": "-", "parent": 160, "children": [], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 40}}, {"id": 174, "type": "number_literal", "text": "1", "parent": 160, "children": [], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 42}}, {"id": 175, "type": "declaration", "text": "double nx_ = nx[ind];", "parent": 123, "children": [176, 177], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 33}}, {"id": 176, "type": "primitive_type", "text": "double", "parent": 175, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 18}}, {"id": 177, "type": "init_declarator", "text": "nx_ = nx[ind]", "parent": 175, "children": [178, 179, 180], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 32}}, {"id": 178, "type": "identifier", "text": "nx_", "parent": 177, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 22}}, {"id": 179, "type": "=", "text": "=", "parent": 177, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 24}}, {"id": 180, "type": "subscript_expression", "text": "nx[ind]", "parent": 177, "children": [181, 182], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 32}}, {"id": 181, "type": "identifier", "text": "nx", "parent": 180, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 27}}, {"id": 182, "type": "identifier", "text": "ind", "parent": 180, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 31}}, {"id": 183, "type": "declaration", "text": "double ny_ = ny[ind];", "parent": 123, "children": [184, 185], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 33}}, {"id": 184, "type": "primitive_type", "text": "double", "parent": 183, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 18}}, {"id": 185, "type": "init_declarator", "text": "ny_ = ny[ind]", "parent": 183, "children": [186, 187, 188], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 32}}, {"id": 186, "type": "identifier", "text": "ny_", "parent": 185, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 22}}, {"id": 187, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 24}}, {"id": 188, "type": "subscript_expression", "text": "ny[ind]", "parent": 185, "children": [189, 190], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 32}}, {"id": 189, "type": "identifier", "text": "ny", "parent": 188, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 27}}, {"id": 190, "type": "identifier", "text": "ind", "parent": 188, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 31}}, {"id": 191, "type": "declaration", "text": "double delta_s = ds[ind];", "parent": 123, "children": [192, 193], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 37}}, {"id": 192, "type": "primitive_type", "text": "double", "parent": 191, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 18}}, {"id": 193, "type": "init_declarator", "text": "delta_s = ds[ind]", "parent": 191, "children": [194, 195, 196], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 36}}, {"id": 194, "type": "identifier", "text": "delta_s", "parent": 193, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 26}}, {"id": 195, "type": "=", "text": "=", "parent": 193, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 28}}, {"id": 196, "type": "subscript_expression", "text": "ds[ind]", "parent": 193, "children": [197, 198], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 36}}, {"id": 197, "type": "identifier", "text": "ds", "parent": 196, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 31}}, {"id": 198, "type": "identifier", "text": "ind", "parent": 196, "children": [], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 26, "column": 35}}, {"id": 199, "type": "declaration", "text": "double num_flux;", "parent": 123, "children": [200, 201], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 28}}, {"id": 200, "type": "primitive_type", "text": "double", "parent": 199, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 18}}, {"id": 201, "type": "identifier", "text": "num_flux", "parent": 199, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 27}}, {"id": 202, "type": "call_expression", "text": "upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux)", "parent": 123, "children": [203, 204], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 72}}, {"id": 203, "type": "identifier", "text": "upwind_flux", "parent": 202, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 23}}, {"id": 204, "type": "argument_list", "text": "(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux)", "parent": 202, "children": [205, 208, 211, 214, 217, 218, 219], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 72}}, {"id": 205, "type": "subscript_expression", "text": "h[n1]", "parent": 204, "children": [206, 207], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 29}}, {"id": 206, "type": "identifier", "text": "h", "parent": 205, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 25}}, {"id": 207, "type": "identifier", "text": "n1", "parent": 205, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 28}}, {"id": 208, "type": "subscript_expression", "text": "h[n2]", "parent": 204, "children": [209, 210], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 36}}, {"id": 209, "type": "identifier", "text": "h", "parent": 208, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 32}}, {"id": 210, "type": "identifier", "text": "n2", "parent": 208, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 35}}, {"id": 211, "type": "subscript_expression", "text": "u[n1]", "parent": 204, "children": [212, 213], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 43}}, {"id": 212, "type": "identifier", "text": "u", "parent": 211, "children": [], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 39}}, {"id": 213, "type": "identifier", "text": "n1", "parent": 211, "children": [], "start_point": {"row": 29, "column": 40}, "end_point": {"row": 29, "column": 42}}, {"id": 214, "type": "subscript_expression", "text": "v[n1]", "parent": 204, "children": [215, 216], "start_point": {"row": 29, "column": 45}, "end_point": {"row": 29, "column": 50}}, {"id": 215, "type": "identifier", "text": "v", "parent": 214, "children": [], "start_point": {"row": 29, "column": 45}, "end_point": {"row": 29, "column": 46}}, {"id": 216, "type": "identifier", "text": "n1", "parent": 214, "children": [], "start_point": {"row": 29, "column": 47}, "end_point": {"row": 29, "column": 49}}, {"id": 217, "type": "identifier", "text": "nx_", "parent": 204, "children": [], "start_point": {"row": 29, "column": 52}, "end_point": {"row": 29, "column": 55}}, {"id": 218, "type": "identifier", "text": "ny_", "parent": 204, "children": [], "start_point": {"row": 29, "column": 57}, "end_point": {"row": 29, "column": 60}}, {"id": 219, "type": "pointer_expression", "text": "&num_flux", "parent": 204, "children": [220], "start_point": {"row": 29, "column": 62}, "end_point": {"row": 29, "column": 71}}, {"id": 220, "type": "identifier", "text": "num_flux", "parent": 219, "children": [], "start_point": {"row": 29, "column": 63}, "end_point": {"row": 29, "column": 71}}, {"id": 221, "type": "assignment_expression", "text": "rhs[n1] -= num_flux * delta_s", "parent": 123, "children": [222, 225, 226], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 41}}, {"id": 222, "type": "subscript_expression", "text": "rhs[n1]", "parent": 221, "children": [223, 224], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 19}}, {"id": 223, "type": "identifier", "text": "rhs", "parent": 222, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 15}}, {"id": 224, "type": "identifier", "text": "n1", "parent": 222, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 18}}, {"id": 225, "type": "-=", "text": "-=", "parent": 221, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 22}}, {"id": 226, "type": "binary_expression", "text": "num_flux * delta_s", "parent": 221, "children": [227, 228, 229], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 41}}, {"id": 227, "type": "identifier", "text": "num_flux", "parent": 226, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 31}}, {"id": 228, "type": "*", "text": "*", "parent": 226, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 33}}, {"id": 229, "type": "identifier", "text": "delta_s", "parent": 226, "children": [], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 41}}, {"id": 230, "type": "assignment_expression", "text": "rhs[n2] += num_flux * delta_s", "parent": 123, "children": [231, 234, 235], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 41}}, {"id": 231, "type": "subscript_expression", "text": "rhs[n2]", "parent": 230, "children": [232, 233], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 19}}, {"id": 232, "type": "identifier", "text": "rhs", "parent": 231, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 15}}, {"id": 233, "type": "identifier", "text": "n2", "parent": 231, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 18}}, {"id": 234, "type": "+=", "text": "+=", "parent": 230, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 22}}, {"id": 235, "type": "binary_expression", "text": "num_flux * delta_s", "parent": 230, "children": [236, 237, 238], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 41}}, {"id": 236, "type": "identifier", "text": "num_flux", "parent": 235, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 31}}, {"id": 237, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 32, "column": 32}, "end_point": {"row": 32, "column": 33}}, {"id": 238, "type": "identifier", "text": "delta_s", "parent": 235, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 41}}, {"id": 239, "type": "preproc_if", "text": "#if DEBUG\n mexPrintf(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif", "parent": 123, "children": [240, 241, 242, 262], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 240, "type": "#if", "text": "#if", "parent": 239, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 3}}, {"id": 241, "type": "identifier", "text": "DEBUG", "parent": 239, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 9}}, {"id": 242, "type": "\n", "text": "\n", "parent": 239, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 34, "column": 0}}, {"id": 243, "type": "call_expression", "text": "mexPrintf(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2])", "parent": 239, "children": [244, 245], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 35, "column": 82}}, {"id": 244, "type": "identifier", "text": "mexPrintf", "parent": 243, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 21}}, {"id": 245, "type": "argument_list", "text": "(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2])", "parent": 243, "children": [246, 248, 249, 250, 251, 252, 253, 254, 255, 256, 259], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 35, "column": 82}}, {"id": 246, "type": "string_literal", "text": "\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\"", "parent": 245, "children": [247], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 101}}, {"id": 247, "type": "escape_sequence", "text": "\\n", "parent": 246, "children": [], "start_point": {"row": 34, "column": 98}, "end_point": {"row": 34, "column": 100}}, {"id": 248, "type": "identifier", "text": "k", "parent": 245, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 23}}, {"id": 249, "type": "identifier", "text": "n", "parent": 245, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 26}}, {"id": 250, "type": "identifier", "text": "n1", "parent": 245, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 30}}, {"id": 251, "type": "identifier", "text": "n2", "parent": 245, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 34}}, {"id": 252, "type": "identifier", "text": "nx_", "parent": 245, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 39}}, {"id": 253, "type": "identifier", "text": "ny_", "parent": 245, "children": [], "start_point": {"row": 35, "column": 41}, "end_point": {"row": 35, "column": 44}}, {"id": 254, "type": "identifier", "text": "delta_s", "parent": 245, "children": [], "start_point": {"row": 35, "column": 46}, "end_point": {"row": 35, "column": 53}}, {"id": 255, "type": "identifier", "text": "num_flux", "parent": 245, "children": [], "start_point": {"row": 35, "column": 55}, "end_point": {"row": 35, "column": 63}}, {"id": 256, "type": "subscript_expression", "text": "rhs[n1]", "parent": 245, "children": [257, 258], "start_point": {"row": 35, "column": 65}, "end_point": {"row": 35, "column": 72}}, {"id": 257, "type": "identifier", "text": "rhs", "parent": 256, "children": [], "start_point": {"row": 35, "column": 65}, "end_point": {"row": 35, "column": 68}}, {"id": 258, "type": "identifier", "text": "n1", "parent": 256, "children": [], "start_point": {"row": 35, "column": 69}, "end_point": {"row": 35, "column": 71}}, {"id": 259, "type": "subscript_expression", "text": "rhs[n2]", "parent": 245, "children": [260, 261], "start_point": {"row": 35, "column": 74}, "end_point": {"row": 35, "column": 81}}, {"id": 260, "type": "identifier", "text": "rhs", "parent": 259, "children": [], "start_point": {"row": 35, "column": 74}, "end_point": {"row": 35, "column": 77}}, {"id": 261, "type": "identifier", "text": "n2", "parent": 259, "children": [], "start_point": {"row": 35, "column": 78}, "end_point": {"row": 35, "column": 80}}, {"id": 262, "type": "#endif", "text": "#endif", "parent": 239, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 263, "type": "update_expression", "text": "ind++", "parent": 123, "children": [264, 265], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 17}}, {"id": 264, "type": "identifier", "text": "ind", "parent": 263, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 15}}, {"id": 265, "type": "++", "text": "++", "parent": 263, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 17}}, {"id": 266, "type": "preproc_if", "text": "#if DEBUG\n mexPrintf(\"inner_rhs = \\n\");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", rhs[k * Np + n]);\n }\n mexPrintf(\"\\n\");\n }\n#endif", "parent": 13, "children": [267, 268, 269, 275, 278, 326], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 267, "type": "#if", "text": "#if", "parent": 266, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 3}}, {"id": 268, "type": "identifier", "text": "DEBUG", "parent": 266, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 9}}, {"id": 269, "type": "\n", "text": "\n", "parent": 266, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 42, "column": 0}}, {"id": 270, "type": "call_expression", "text": "mexPrintf(\"inner_rhs = \\n\")", "parent": 266, "children": [271, 272], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 31}}, {"id": 271, "type": "identifier", "text": "mexPrintf", "parent": 270, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 13}}, {"id": 272, "type": "argument_list", "text": "(\"inner_rhs = \\n\")", "parent": 270, "children": [273], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 31}}, {"id": 273, "type": "string_literal", "text": "\"inner_rhs = \\n\"", "parent": 272, "children": [274], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 30}}, {"id": 274, "type": "escape_sequence", "text": "\\n", "parent": 273, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 29}}, {"id": 275, "type": "declaration", "text": "int n;", "parent": 266, "children": [276, 277], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 10}}, {"id": 276, "type": "primitive_type", "text": "int", "parent": 275, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 7}}, {"id": 277, "type": "identifier", "text": "n", "parent": 275, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 9}}, {"id": 278, "type": "for_statement", "text": "for (n = 0; n < Np; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", rhs[k * Np + n]);\n }\n mexPrintf(\"\\n\");\n }", "parent": 266, "children": [279, 283, 287], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 52, "column": 5}}, {"id": 279, "type": "assignment_expression", "text": "n = 0", "parent": 278, "children": [280, 281, 282], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 14}}, {"id": 280, "type": "identifier", "text": "n", "parent": 279, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 10}}, {"id": 281, "type": "=", "text": "=", "parent": 279, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 12}}, {"id": 282, "type": "number_literal", "text": "0", "parent": 279, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 14}}, {"id": 283, "type": "binary_expression", "text": "n < Np", "parent": 278, "children": [284, 285, 286], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 22}}, {"id": 284, "type": "identifier", "text": "n", "parent": 283, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 17}}, {"id": 285, "type": "<", "text": "<", "parent": 283, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 19}}, {"id": 286, "type": "identifier", "text": "Np", "parent": 283, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 22}}, {"id": 287, "type": "update_expression", "text": "n++", "parent": 278, "children": [288, 289], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 27}}, {"id": 288, "type": "identifier", "text": "n", "parent": 287, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 25}}, {"id": 289, "type": "++", "text": "++", "parent": 287, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 27}}, {"id": 290, "type": "call_expression", "text": "mexPrintf(\"\\t\")", "parent": 278, "children": [291, 292], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 23}}, {"id": 291, "type": "identifier", "text": "mexPrintf", "parent": 290, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 17}}, {"id": 292, "type": "argument_list", "text": "(\"\\t\")", "parent": 290, "children": [293], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 23}}, {"id": 293, "type": "string_literal", "text": "\"\\t\"", "parent": 292, "children": [294], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 22}}, {"id": 294, "type": "escape_sequence", "text": "\\t", "parent": 293, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 21}}, {"id": 295, "type": "for_statement", "text": "for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", rhs[k * Np + n]);\n }", "parent": 278, "children": [296, 300, 304], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 50, "column": 9}}, {"id": 296, "type": "assignment_expression", "text": "k = 0", "parent": 295, "children": [297, 298, 299], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 18}}, {"id": 297, "type": "identifier", "text": "k", "parent": 296, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 14}}, {"id": 298, "type": "=", "text": "=", "parent": 296, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 16}}, {"id": 299, "type": "number_literal", "text": "0", "parent": 296, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 18}}, {"id": 300, "type": "binary_expression", "text": "k < K", "parent": 295, "children": [301, 302, 303], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 25}}, {"id": 301, "type": "identifier", "text": "k", "parent": 300, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 21}}, {"id": 302, "type": "<", "text": "<", "parent": 300, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 23}}, {"id": 303, "type": "identifier", "text": "K", "parent": 300, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 25}}, {"id": 304, "type": "update_expression", "text": "k++", "parent": 295, "children": [305, 306], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 30}}, {"id": 305, "type": "identifier", "text": "k", "parent": 304, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 28}}, {"id": 306, "type": "++", "text": "++", "parent": 304, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 30}}, {"id": 307, "type": "call_expression", "text": "mexPrintf(\"%e\\t\", rhs[k * Np + n])", "parent": 295, "children": [308, 309], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 46}}, {"id": 308, "type": "identifier", "text": "mexPrintf", "parent": 307, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 21}}, {"id": 309, "type": "argument_list", "text": "(\"%e\\t\", rhs[k * Np + n])", "parent": 307, "children": [310, 312], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 46}}, {"id": 310, "type": "string_literal", "text": "\"%e\\t\"", "parent": 309, "children": [311], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 28}}, {"id": 311, "type": "escape_sequence", "text": "\\t", "parent": 310, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 27}}, {"id": 312, "type": "subscript_expression", "text": "rhs[k * Np + n]", "parent": 309, "children": [313, 314], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 45}}, {"id": 313, "type": "identifier", "text": "rhs", "parent": 312, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 33}}, {"id": 314, "type": "binary_expression", "text": "k * Np + n", "parent": 312, "children": [315, 319, 320], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 44}}, {"id": 315, "type": "binary_expression", "text": "k * Np", "parent": 314, "children": [316, 317, 318], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 40}}, {"id": 316, "type": "identifier", "text": "k", "parent": 315, "children": [], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 35}}, {"id": 317, "type": "*", "text": "*", "parent": 315, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 37}}, {"id": 318, "type": "identifier", "text": "Np", "parent": 315, "children": [], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 40}}, {"id": 319, "type": "+", "text": "+", "parent": 314, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 42}}, {"id": 320, "type": "identifier", "text": "n", "parent": 314, "children": [], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 44}}, {"id": 321, "type": "call_expression", "text": "mexPrintf(\"\\n\")", "parent": 278, "children": [322, 323], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 23}}, {"id": 322, "type": "identifier", "text": "mexPrintf", "parent": 321, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 17}}, {"id": 323, "type": "argument_list", "text": "(\"\\n\")", "parent": 321, "children": [324], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 23}}, {"id": 324, "type": "string_literal", "text": "\"\\n\"", "parent": 323, "children": [325], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 22}}, {"id": 325, "type": "escape_sequence", "text": "\\n", "parent": 324, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 21}}, {"id": 326, "type": "#endif", "text": "#endif", "parent": 266, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 327, "type": "return_statement", "text": "return;", "parent": 13, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 11}}, {"id": 328, "type": "function_definition", "text": "void surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)\n{\n\n int k;\n double *flux = calloc(Nfp * K, sizeof(double));\n // #ifdef _OPENMP\n // #pragma omp parallel for num_threads(DG_THREADS)\n // #endif\n for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt(\"Unknown boundary conditions.\");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }\n#if DEBUG\n mexPrintf(\"flux = \\n\");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", flux[k * Nfp + n]);\n }\n mexPrintf(\"\\n\");\n }\n#endif\n double *stemp = calloc(Nfp * K, sizeof(double));\n dvecm(Nfp * K, 1, flux, Js, stemp);\n char *chn = \"N\";\n double one = 1.0;\n mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;\n dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_);\n free(flux);\n free(stemp);\n return;\n}", "parent": null, "children": [329, 330], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 123, "column": 1}}, {"id": 329, "type": "primitive_type", "text": "void", "parent": 328, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 4}}, {"id": 330, "type": "function_declarator", "text": "surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)", "parent": 328, "children": [331, 332], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 62, "column": 33}}, {"id": 331, "type": "identifier", "text": "surface_fv_term", "parent": 330, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 20}}, {"id": 332, "type": "parameter_list", "text": "(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)", "parent": 330, "children": [333, 336, 339, 342, 347, 352, 357, 362, 369, 376, 381, 386, 391, 396, 401, 406], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 62, "column": 33}}, {"id": 333, "type": "parameter_declaration", "text": "size_t Np", "parent": 332, "children": [334, 335], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 30}}, {"id": 334, "type": "primitive_type", "text": "size_t", "parent": 333, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 27}}, {"id": 335, "type": "identifier", "text": "Np", "parent": 333, "children": [], "start_point": {"row": 57, "column": 28}, "end_point": {"row": 57, "column": 30}}, {"id": 336, "type": "parameter_declaration", "text": "size_t Nfp", "parent": 332, "children": [337, 338], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 42}}, {"id": 337, "type": "primitive_type", "text": "size_t", "parent": 336, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 38}}, {"id": 338, "type": "identifier", "text": "Nfp", "parent": 336, "children": [], "start_point": {"row": 57, "column": 39}, "end_point": {"row": 57, "column": 42}}, {"id": 339, "type": "parameter_declaration", "text": "size_t K", "parent": 332, "children": [340, 341], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 52}}, {"id": 340, "type": "primitive_type", "text": "size_t", "parent": 339, "children": [], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 50}}, {"id": 341, "type": "identifier", "text": "K", "parent": 339, "children": [], "start_point": {"row": 57, "column": 51}, "end_point": {"row": 57, "column": 52}}, {"id": 342, "type": "parameter_declaration", "text": "double *h", "parent": 332, "children": [343, 344], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 30}}, {"id": 343, "type": "primitive_type", "text": "double", "parent": 342, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 27}}, {"id": 344, "type": "pointer_declarator", "text": "*h", "parent": 342, "children": [345, 346], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 30}}, {"id": 345, "type": "*", "text": "*", "parent": 344, "children": [], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 29}}, {"id": 346, "type": "identifier", "text": "h", "parent": 344, "children": [], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 30}}, {"id": 347, "type": "parameter_declaration", "text": "double *h_ext", "parent": 332, "children": [348, 349], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 45}}, {"id": 348, "type": "primitive_type", "text": "double", "parent": 347, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 38}}, {"id": 349, "type": "pointer_declarator", "text": "*h_ext", "parent": 347, "children": [350, 351], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 45}}, {"id": 350, "type": "*", "text": "*", "parent": 349, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 40}}, {"id": 351, "type": "identifier", "text": "h_ext", "parent": 349, "children": [], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 45}}, {"id": 352, "type": "parameter_declaration", "text": "double *u", "parent": 332, "children": [353, 354], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 56}}, {"id": 353, "type": "primitive_type", "text": "double", "parent": 352, "children": [], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 53}}, {"id": 354, "type": "pointer_declarator", "text": "*u", "parent": 352, "children": [355, 356], "start_point": {"row": 58, "column": 54}, "end_point": {"row": 58, "column": 56}}, {"id": 355, "type": "*", "text": "*", "parent": 354, "children": [], "start_point": {"row": 58, "column": 54}, "end_point": {"row": 58, "column": 55}}, {"id": 356, "type": "identifier", "text": "u", "parent": 354, "children": [], "start_point": {"row": 58, "column": 55}, "end_point": {"row": 58, "column": 56}}, {"id": 357, "type": "parameter_declaration", "text": "double *v", "parent": 332, "children": [358, 359], "start_point": {"row": 58, "column": 58}, "end_point": {"row": 58, "column": 67}}, {"id": 358, "type": "primitive_type", "text": "double", "parent": 357, "children": [], "start_point": {"row": 58, "column": 58}, "end_point": {"row": 58, "column": 64}}, {"id": 359, "type": "pointer_declarator", "text": "*v", "parent": 357, "children": [360, 361], "start_point": {"row": 58, "column": 65}, "end_point": {"row": 58, "column": 67}}, {"id": 360, "type": "*", "text": "*", "parent": 359, "children": [], "start_point": {"row": 58, "column": 65}, "end_point": {"row": 58, "column": 66}}, {"id": 361, "type": "identifier", "text": "v", "parent": 359, "children": [], "start_point": {"row": 58, "column": 66}, "end_point": {"row": 58, "column": 67}}, {"id": 362, "type": "parameter_declaration", "text": "signed char *EToR", "parent": 332, "children": [363, 366], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 38}}, {"id": 363, "type": "sized_type_specifier", "text": "signed char", "parent": 362, "children": [364, 365], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 32}}, {"id": 364, "type": "signed", "text": "signed", "parent": 363, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 27}}, {"id": 365, "type": "primitive_type", "text": "char", "parent": 363, "children": [], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 32}}, {"id": 366, "type": "pointer_declarator", "text": "*EToR", "parent": 362, "children": [367, 368], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 38}}, {"id": 367, "type": "*", "text": "*", "parent": 366, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 34}}, {"id": 368, "type": "identifier", "text": "EToR", "parent": 366, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 38}}, {"id": 369, "type": "parameter_declaration", "text": "signed char *eidtype", "parent": 332, "children": [370, 373], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 60}}, {"id": 370, "type": "sized_type_specifier", "text": "signed char", "parent": 369, "children": [371, 372], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 51}}, {"id": 371, "type": "signed", "text": "signed", "parent": 370, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 46}}, {"id": 372, "type": "primitive_type", "text": "char", "parent": 370, "children": [], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 51}}, {"id": 373, "type": "pointer_declarator", "text": "*eidtype", "parent": 369, "children": [374, 375], "start_point": {"row": 59, "column": 52}, "end_point": {"row": 59, "column": 60}}, {"id": 374, "type": "*", "text": "*", "parent": 373, "children": [], "start_point": {"row": 59, "column": 52}, "end_point": {"row": 59, "column": 53}}, {"id": 375, "type": "identifier", "text": "eidtype", "parent": 373, "children": [], "start_point": {"row": 59, "column": 53}, "end_point": {"row": 59, "column": 60}}, {"id": 376, "type": "parameter_declaration", "text": "double *eidM", "parent": 332, "children": [377, 378], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 33}}, {"id": 377, "type": "primitive_type", "text": "double", "parent": 376, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 27}}, {"id": 378, "type": "pointer_declarator", "text": "*eidM", "parent": 376, "children": [379, 380], "start_point": {"row": 60, "column": 28}, "end_point": {"row": 60, "column": 33}}, {"id": 379, "type": "*", "text": "*", "parent": 378, "children": [], "start_point": {"row": 60, "column": 28}, "end_point": {"row": 60, "column": 29}}, {"id": 380, "type": "identifier", "text": "eidM", "parent": 378, "children": [], "start_point": {"row": 60, "column": 29}, "end_point": {"row": 60, "column": 33}}, {"id": 381, "type": "parameter_declaration", "text": "double *eidP", "parent": 332, "children": [382, 383], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 47}}, {"id": 382, "type": "primitive_type", "text": "double", "parent": 381, "children": [], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 41}}, {"id": 383, "type": "pointer_declarator", "text": "*eidP", "parent": 381, "children": [384, 385], "start_point": {"row": 60, "column": 42}, "end_point": {"row": 60, "column": 47}}, {"id": 384, "type": "*", "text": "*", "parent": 383, "children": [], "start_point": {"row": 60, "column": 42}, "end_point": {"row": 60, "column": 43}}, {"id": 385, "type": "identifier", "text": "eidP", "parent": 383, "children": [], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 47}}, {"id": 386, "type": "parameter_declaration", "text": "double *nx", "parent": 332, "children": [387, 388], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 31}}, {"id": 387, "type": "primitive_type", "text": "double", "parent": 386, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 27}}, {"id": 388, "type": "pointer_declarator", "text": "*nx", "parent": 386, "children": [389, 390], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 31}}, {"id": 389, "type": "*", "text": "*", "parent": 388, "children": [], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 29}}, {"id": 390, "type": "identifier", "text": "nx", "parent": 388, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 31}}, {"id": 391, "type": "parameter_declaration", "text": "double *ny", "parent": 332, "children": [392, 393], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 43}}, {"id": 392, "type": "primitive_type", "text": "double", "parent": 391, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 39}}, {"id": 393, "type": "pointer_declarator", "text": "*ny", "parent": 391, "children": [394, 395], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 43}}, {"id": 394, "type": "*", "text": "*", "parent": 393, "children": [], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 41}}, {"id": 395, "type": "identifier", "text": "ny", "parent": 393, "children": [], "start_point": {"row": 61, "column": 41}, "end_point": {"row": 61, "column": 43}}, {"id": 396, "type": "parameter_declaration", "text": "double *Js", "parent": 332, "children": [397, 398], "start_point": {"row": 61, "column": 45}, "end_point": {"row": 61, "column": 55}}, {"id": 397, "type": "primitive_type", "text": "double", "parent": 396, "children": [], "start_point": {"row": 61, "column": 45}, "end_point": {"row": 61, "column": 51}}, {"id": 398, "type": "pointer_declarator", "text": "*Js", "parent": 396, "children": [399, 400], "start_point": {"row": 61, "column": 52}, "end_point": {"row": 61, "column": 55}}, {"id": 399, "type": "*", "text": "*", "parent": 398, "children": [], "start_point": {"row": 61, "column": 52}, "end_point": {"row": 61, "column": 53}}, {"id": 400, "type": "identifier", "text": "Js", "parent": 398, "children": [], "start_point": {"row": 61, "column": 53}, "end_point": {"row": 61, "column": 55}}, {"id": 401, "type": "parameter_declaration", "text": "double *LIFT", "parent": 332, "children": [402, 403], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 69}}, {"id": 402, "type": "primitive_type", "text": "double", "parent": 401, "children": [], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 63}}, {"id": 403, "type": "pointer_declarator", "text": "*LIFT", "parent": 401, "children": [404, 405], "start_point": {"row": 61, "column": 64}, "end_point": {"row": 61, "column": 69}}, {"id": 404, "type": "*", "text": "*", "parent": 403, "children": [], "start_point": {"row": 61, "column": 64}, "end_point": {"row": 61, "column": 65}}, {"id": 405, "type": "identifier", "text": "LIFT", "parent": 403, "children": [], "start_point": {"row": 61, "column": 65}, "end_point": {"row": 61, "column": 69}}, {"id": 406, "type": "parameter_declaration", "text": "double *rhs", "parent": 332, "children": [407, 408], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 32}}, {"id": 407, "type": "primitive_type", "text": "double", "parent": 406, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 27}}, {"id": 408, "type": "pointer_declarator", "text": "*rhs", "parent": 406, "children": [409, 410], "start_point": {"row": 62, "column": 28}, "end_point": {"row": 62, "column": 32}}, {"id": 409, "type": "*", "text": "*", "parent": 408, "children": [], "start_point": {"row": 62, "column": 28}, "end_point": {"row": 62, "column": 29}}, {"id": 410, "type": "identifier", "text": "rhs", "parent": 408, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 32}}, {"id": 411, "type": "declaration", "text": "int k;", "parent": 328, "children": [412, 413], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 10}}, {"id": 412, "type": "primitive_type", "text": "int", "parent": 411, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 7}}, {"id": 413, "type": "identifier", "text": "k", "parent": 411, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 9}}, {"id": 414, "type": "declaration", "text": "double *flux = calloc(Nfp * K, sizeof(double));", "parent": 328, "children": [415, 416], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 51}}, {"id": 415, "type": "primitive_type", "text": "double", "parent": 414, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 10}}, {"id": 416, "type": "init_declarator", "text": "*flux = calloc(Nfp * K, sizeof(double))", "parent": 414, "children": [417, 420, 421], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 50}}, {"id": 417, "type": "pointer_declarator", "text": "*flux", "parent": 416, "children": [418, 419], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 16}}, {"id": 418, "type": "*", "text": "*", "parent": 417, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 12}}, {"id": 419, "type": "identifier", "text": "flux", "parent": 417, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 16}}, {"id": 420, "type": "=", "text": "=", "parent": 416, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 18}}, {"id": 421, "type": "call_expression", "text": "calloc(Nfp * K, sizeof(double))", "parent": 416, "children": [422, 423], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 50}}, {"id": 422, "type": "identifier", "text": "calloc", "parent": 421, "children": [], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 25}}, {"id": 423, "type": "argument_list", "text": "(Nfp * K, sizeof(double))", "parent": 421, "children": [424, 428], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 50}}, {"id": 424, "type": "binary_expression", "text": "Nfp * K", "parent": 423, "children": [425, 426, 427], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 33}}, {"id": 425, "type": "identifier", "text": "Nfp", "parent": 424, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 29}}, {"id": 426, "type": "*", "text": "*", "parent": 424, "children": [], "start_point": {"row": 66, "column": 30}, "end_point": {"row": 66, "column": 31}}, {"id": 427, "type": "identifier", "text": "K", "parent": 424, "children": [], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 33}}, {"id": 428, "type": "sizeof_expression", "text": "sizeof(double)", "parent": 423, "children": [429], "start_point": {"row": 66, "column": 35}, "end_point": {"row": 66, "column": 49}}, {"id": 429, "type": "type_descriptor", "text": "double", "parent": 428, "children": [430], "start_point": {"row": 66, "column": 42}, "end_point": {"row": 66, "column": 48}}, {"id": 430, "type": "primitive_type", "text": "double", "parent": 429, "children": [], "start_point": {"row": 66, "column": 42}, "end_point": {"row": 66, "column": 48}}, {"id": 431, "type": "for_statement", "text": "for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt(\"Unknown boundary conditions.\");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }", "parent": 328, "children": [432, 436, 440], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 100, "column": 5}}, {"id": 432, "type": "assignment_expression", "text": "k = 0", "parent": 431, "children": [433, 434, 435], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 14}}, {"id": 433, "type": "identifier", "text": "k", "parent": 432, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 10}}, {"id": 434, "type": "=", "text": "=", "parent": 432, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 12}}, {"id": 435, "type": "number_literal", "text": "0", "parent": 432, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 14}}, {"id": 436, "type": "binary_expression", "text": "k < K", "parent": 431, "children": [437, 438, 439], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 21}}, {"id": 437, "type": "identifier", "text": "k", "parent": 436, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 17}}, {"id": 438, "type": "<", "text": "<", "parent": 436, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 19}}, {"id": 439, "type": "identifier", "text": "K", "parent": 436, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 21}}, {"id": 440, "type": "update_expression", "text": "k++", "parent": 431, "children": [441, 442], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 26}}, {"id": 441, "type": "identifier", "text": "k", "parent": 440, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 24}}, {"id": 442, "type": "++", "text": "++", "parent": 440, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 26}}, {"id": 443, "type": "if_statement", "text": "if ((cell_type)EToR[k] != REFINE)\n continue;", "parent": 431, "children": [444, 454], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 73, "column": 21}}, {"id": 444, "type": "parenthesized_expression", "text": "((cell_type)EToR[k] != REFINE)", "parent": 443, "children": [445], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 41}}, {"id": 445, "type": "binary_expression", "text": "(cell_type)EToR[k] != REFINE", "parent": 444, "children": [446, 452, 453], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 40}}, {"id": 446, "type": "cast_expression", "text": "(cell_type)EToR[k]", "parent": 445, "children": [447, 449], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 30}}, {"id": 447, "type": "type_descriptor", "text": "cell_type", "parent": 446, "children": [448], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 22}}, {"id": 448, "type": "type_identifier", "text": "cell_type", "parent": 447, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 22}}, {"id": 449, "type": "subscript_expression", "text": "EToR[k]", "parent": 446, "children": [450, 451], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 30}}, {"id": 450, "type": "identifier", "text": "EToR", "parent": 449, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 27}}, {"id": 451, "type": "identifier", "text": "k", "parent": 449, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 29}}, {"id": 452, "type": "!=", "text": "!=", "parent": 445, "children": [], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 33}}, {"id": 453, "type": "identifier", "text": "REFINE", "parent": 445, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 40}}, {"id": 454, "type": "continue_statement", "text": "continue;", "parent": 443, "children": [455], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 21}}, {"id": 455, "type": "continue", "text": "continue", "parent": 454, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 20}}, {"id": 456, "type": "declaration", "text": "int j, ind = k * Nfp;", "parent": 431, "children": [457, 458, 459], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 29}}, {"id": 457, "type": "primitive_type", "text": "int", "parent": 456, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 11}}, {"id": 458, "type": "identifier", "text": "j", "parent": 456, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 13}}, {"id": 459, "type": "init_declarator", "text": "ind = k * Nfp", "parent": 456, "children": [460, 461, 462], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 28}}, {"id": 460, "type": "identifier", "text": "ind", "parent": 459, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 18}}, {"id": 461, "type": "=", "text": "=", "parent": 459, "children": [], "start_point": {"row": 75, "column": 19}, "end_point": {"row": 75, "column": 20}}, {"id": 462, "type": "binary_expression", "text": "k * Nfp", "parent": 459, "children": [463, 464, 465], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 28}}, {"id": 463, "type": "identifier", "text": "k", "parent": 462, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 22}}, {"id": 464, "type": "*", "text": "*", "parent": 462, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 24}}, {"id": 465, "type": "identifier", "text": "Nfp", "parent": 462, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 28}}, {"id": 466, "type": "for_statement", "text": "for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt(\"Unknown boundary conditions.\");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }", "parent": 431, "children": [467, 471, 475], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 99, "column": 9}}, {"id": 467, "type": "assignment_expression", "text": "j = 0", "parent": 466, "children": [468, 469, 470], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 18}}, {"id": 468, "type": "identifier", "text": "j", "parent": 467, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 14}}, {"id": 469, "type": "=", "text": "=", "parent": 467, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 16}}, {"id": 470, "type": "number_literal", "text": "0", "parent": 467, "children": [], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 18}}, {"id": 471, "type": "binary_expression", "text": "j < Nfp", "parent": 466, "children": [472, 473, 474], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 27}}, {"id": 472, "type": "identifier", "text": "j", "parent": 471, "children": [], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 21}}, {"id": 473, "type": "<", "text": "<", "parent": 471, "children": [], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 23}}, {"id": 474, "type": "identifier", "text": "Nfp", "parent": 471, "children": [], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 27}}, {"id": 475, "type": "update_expression", "text": "j++", "parent": 466, "children": [476, 477], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 32}}, {"id": 476, "type": "identifier", "text": "j", "parent": 475, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 30}}, {"id": 477, "type": "++", "text": "++", "parent": 475, "children": [], "start_point": {"row": 76, "column": 30}, "end_point": {"row": 76, "column": 32}}, {"id": 478, "type": "declaration", "text": "int iM = (int)eidM[ind] - 1;", "parent": 466, "children": [479, 480], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 40}}, {"id": 479, "type": "primitive_type", "text": "int", "parent": 478, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 15}}, {"id": 480, "type": "init_declarator", "text": "iM = (int)eidM[ind] - 1", "parent": 478, "children": [481, 482, 483], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 39}}, {"id": 481, "type": "identifier", "text": "iM", "parent": 480, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 18}}, {"id": 482, "type": "=", "text": "=", "parent": 480, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 20}}, {"id": 483, "type": "binary_expression", "text": "(int)eidM[ind] - 1", "parent": 480, "children": [484, 490, 491], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 39}}, {"id": 484, "type": "cast_expression", "text": "(int)eidM[ind]", "parent": 483, "children": [485, 487], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 35}}, {"id": 485, "type": "type_descriptor", "text": "int", "parent": 484, "children": [486], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 25}}, {"id": 486, "type": "primitive_type", "text": "int", "parent": 485, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 25}}, {"id": 487, "type": "subscript_expression", "text": "eidM[ind]", "parent": 484, "children": [488, 489], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 35}}, {"id": 488, "type": "identifier", "text": "eidM", "parent": 487, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 30}}, {"id": 489, "type": "identifier", "text": "ind", "parent": 487, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 34}}, {"id": 490, "type": "-", "text": "-", "parent": 483, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 37}}, {"id": 491, "type": "number_literal", "text": "1", "parent": 483, "children": [], "start_point": {"row": 78, "column": 38}, "end_point": {"row": 78, "column": 39}}, {"id": 492, "type": "declaration", "text": "int iP = (int)eidP[ind] - 1;", "parent": 466, "children": [493, 494], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 40}}, {"id": 493, "type": "primitive_type", "text": "int", "parent": 492, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 15}}, {"id": 494, "type": "init_declarator", "text": "iP = (int)eidP[ind] - 1", "parent": 492, "children": [495, 496, 497], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 39}}, {"id": 495, "type": "identifier", "text": "iP", "parent": 494, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 18}}, {"id": 496, "type": "=", "text": "=", "parent": 494, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 20}}, {"id": 497, "type": "binary_expression", "text": "(int)eidP[ind] - 1", "parent": 494, "children": [498, 504, 505], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 39}}, {"id": 498, "type": "cast_expression", "text": "(int)eidP[ind]", "parent": 497, "children": [499, 501], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 35}}, {"id": 499, "type": "type_descriptor", "text": "int", "parent": 498, "children": [500], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 25}}, {"id": 500, "type": "primitive_type", "text": "int", "parent": 499, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 25}}, {"id": 501, "type": "subscript_expression", "text": "eidP[ind]", "parent": 498, "children": [502, 503], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 35}}, {"id": 502, "type": "identifier", "text": "eidP", "parent": 501, "children": [], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 30}}, {"id": 503, "type": "identifier", "text": "ind", "parent": 501, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 34}}, {"id": 504, "type": "-", "text": "-", "parent": 497, "children": [], "start_point": {"row": 79, "column": 36}, "end_point": {"row": 79, "column": 37}}, {"id": 505, "type": "number_literal", "text": "1", "parent": 497, "children": [], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 39}}, {"id": 506, "type": "declaration", "text": "double f_M = h[iM];", "parent": 466, "children": [507, 508], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 31}}, {"id": 507, "type": "primitive_type", "text": "double", "parent": 506, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 18}}, {"id": 508, "type": "init_declarator", "text": "f_M = h[iM]", "parent": 506, "children": [509, 510, 511], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 30}}, {"id": 509, "type": "identifier", "text": "f_M", "parent": 508, "children": [], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 22}}, {"id": 510, "type": "=", "text": "=", "parent": 508, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 24}}, {"id": 511, "type": "subscript_expression", "text": "h[iM]", "parent": 508, "children": [512, 513], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 30}}, {"id": 512, "type": "identifier", "text": "h", "parent": 511, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 26}}, {"id": 513, "type": "identifier", "text": "iM", "parent": 511, "children": [], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 29}}, {"id": 514, "type": "declaration", "text": "double hP = h[iP];", "parent": 466, "children": [515, 516], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 30}}, {"id": 515, "type": "primitive_type", "text": "double", "parent": 514, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 18}}, {"id": 516, "type": "init_declarator", "text": "hP = h[iP]", "parent": 514, "children": [517, 518, 519], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 29}}, {"id": 517, "type": "identifier", "text": "hP", "parent": 516, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 21}}, {"id": 518, "type": "=", "text": "=", "parent": 516, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 23}}, {"id": 519, "type": "subscript_expression", "text": "h[iP]", "parent": 516, "children": [520, 521], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 29}}, {"id": 520, "type": "identifier", "text": "h", "parent": 519, "children": [], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 25}}, {"id": 521, "type": "identifier", "text": "iP", "parent": 519, "children": [], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 28}}, {"id": 522, "type": "declaration", "text": "double uM = u[iM], vM = v[iM];", "parent": 466, "children": [523, 524, 530], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 42}}, {"id": 523, "type": "primitive_type", "text": "double", "parent": 522, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 18}}, {"id": 524, "type": "init_declarator", "text": "uM = u[iM]", "parent": 522, "children": [525, 526, 527], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 29}}, {"id": 525, "type": "identifier", "text": "uM", "parent": 524, "children": [], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 21}}, {"id": 526, "type": "=", "text": "=", "parent": 524, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 23}}, {"id": 527, "type": "subscript_expression", "text": "u[iM]", "parent": 524, "children": [528, 529], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 29}}, {"id": 528, "type": "identifier", "text": "u", "parent": 527, "children": [], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 25}}, {"id": 529, "type": "identifier", "text": "iM", "parent": 527, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 28}}, {"id": 530, "type": "init_declarator", "text": "vM = v[iM]", "parent": 522, "children": [531, 532, 533], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 41}}, {"id": 531, "type": "identifier", "text": "vM", "parent": 530, "children": [], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 33}}, {"id": 532, "type": "=", "text": "=", "parent": 530, "children": [], "start_point": {"row": 82, "column": 34}, "end_point": {"row": 82, "column": 35}}, {"id": 533, "type": "subscript_expression", "text": "v[iM]", "parent": 530, "children": [534, 535], "start_point": {"row": 82, "column": 36}, "end_point": {"row": 82, "column": 41}}, {"id": 534, "type": "identifier", "text": "v", "parent": 533, "children": [], "start_point": {"row": 82, "column": 36}, "end_point": {"row": 82, "column": 37}}, {"id": 535, "type": "identifier", "text": "iM", "parent": 533, "children": [], "start_point": {"row": 82, "column": 38}, "end_point": {"row": 82, "column": 40}}, {"id": 536, "type": "declaration", "text": "double nx_ = nx[ind];", "parent": 466, "children": [537, 538], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 33}}, {"id": 537, "type": "primitive_type", "text": "double", "parent": 536, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 18}}, {"id": 538, "type": "init_declarator", "text": "nx_ = nx[ind]", "parent": 536, "children": [539, 540, 541], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 32}}, {"id": 539, "type": "identifier", "text": "nx_", "parent": 538, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 22}}, {"id": 540, "type": "=", "text": "=", "parent": 538, "children": [], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 24}}, {"id": 541, "type": "subscript_expression", "text": "nx[ind]", "parent": 538, "children": [542, 543], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 32}}, {"id": 542, "type": "identifier", "text": "nx", "parent": 541, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 27}}, {"id": 543, "type": "identifier", "text": "ind", "parent": 541, "children": [], "start_point": {"row": 84, "column": 28}, "end_point": {"row": 84, "column": 31}}, {"id": 544, "type": "declaration", "text": "double ny_ = ny[ind];", "parent": 466, "children": [545, 546], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 33}}, {"id": 545, "type": "primitive_type", "text": "double", "parent": 544, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 18}}, {"id": 546, "type": "init_declarator", "text": "ny_ = ny[ind]", "parent": 544, "children": [547, 548, 549], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 32}}, {"id": 547, "type": "identifier", "text": "ny_", "parent": 546, "children": [], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 22}}, {"id": 548, "type": "=", "text": "=", "parent": 546, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 24}}, {"id": 549, "type": "subscript_expression", "text": "ny[ind]", "parent": 546, "children": [550, 551], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 32}}, {"id": 550, "type": "identifier", "text": "ny", "parent": 549, "children": [], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 27}}, {"id": 551, "type": "identifier", "text": "ind", "parent": 549, "children": [], "start_point": {"row": 85, "column": 28}, "end_point": {"row": 85, "column": 31}}, {"id": 552, "type": "declaration", "text": "double f_ext;", "parent": 466, "children": [553, 554], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 25}}, {"id": 553, "type": "primitive_type", "text": "double", "parent": 552, "children": [], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 18}}, {"id": 554, "type": "identifier", "text": "f_ext", "parent": 552, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 24}}, {"id": 555, "type": "assignment_expression", "text": "f_ext = h_ext[iM]", "parent": 466, "children": [556, 557, 558], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 29}}, {"id": 556, "type": "identifier", "text": "f_ext", "parent": 555, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 17}}, {"id": 557, "type": "=", "text": "=", "parent": 555, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 19}}, {"id": 558, "type": "subscript_expression", "text": "h_ext[iM]", "parent": 555, "children": [559, 560], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 29}}, {"id": 559, "type": "identifier", "text": "h_ext", "parent": 558, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 25}}, {"id": 560, "type": "identifier", "text": "iM", "parent": 558, "children": [], "start_point": {"row": 87, "column": 26}, "end_point": {"row": 87, "column": 28}}, {"id": 561, "type": "declaration", "text": "bc_type type = (bc_type)eidtype[ind];", "parent": 466, "children": [562, 563], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 49}}, {"id": 562, "type": "type_identifier", "text": "bc_type", "parent": 561, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 19}}, {"id": 563, "type": "init_declarator", "text": "type = (bc_type)eidtype[ind]", "parent": 561, "children": [564, 565, 566], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 48}}, {"id": 564, "type": "identifier", "text": "type", "parent": 563, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 24}}, {"id": 565, "type": "=", "text": "=", "parent": 563, "children": [], "start_point": {"row": 88, "column": 25}, "end_point": {"row": 88, "column": 26}}, {"id": 566, "type": "cast_expression", "text": "(bc_type)eidtype[ind]", "parent": 563, "children": [567, 569], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 48}}, {"id": 567, "type": "type_descriptor", "text": "bc_type", "parent": 566, "children": [568], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 35}}, {"id": 568, "type": "type_identifier", "text": "bc_type", "parent": 567, "children": [], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 35}}, {"id": 569, "type": "subscript_expression", "text": "eidtype[ind]", "parent": 566, "children": [570, 571], "start_point": {"row": 88, "column": 36}, "end_point": {"row": 88, "column": 48}}, {"id": 570, "type": "identifier", "text": "eidtype", "parent": 569, "children": [], "start_point": {"row": 88, "column": 36}, "end_point": {"row": 88, "column": 43}}, {"id": 571, "type": "identifier", "text": "ind", "parent": 569, "children": [], "start_point": {"row": 88, "column": 44}, "end_point": {"row": 88, "column": 47}}, {"id": 572, "type": "declaration", "text": "double f_P;", "parent": 466, "children": [573, 574], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 23}}, {"id": 573, "type": "primitive_type", "text": "double", "parent": 572, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 18}}, {"id": 574, "type": "identifier", "text": "f_P", "parent": 572, "children": [], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 22}}, {"id": 575, "type": "declaration", "text": "int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);", "parent": 466, "children": [576, 577], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 72}}, {"id": 576, "type": "primitive_type", "text": "int", "parent": 575, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 15}}, {"id": 577, "type": "init_declarator", "text": "info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P)", "parent": 575, "children": [578, 579, 580], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 71}}, {"id": 578, "type": "identifier", "text": "info", "parent": 577, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 20}}, {"id": 579, "type": "=", "text": "=", "parent": 577, "children": [], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 22}}, {"id": 580, "type": "call_expression", "text": "bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P)", "parent": 577, "children": [581, 582], "start_point": {"row": 92, "column": 23}, "end_point": {"row": 92, "column": 71}}, {"id": 581, "type": "identifier", "text": "bound_cond", "parent": 580, "children": [], "start_point": {"row": 92, "column": 23}, "end_point": {"row": 92, "column": 33}}, {"id": 582, "type": "argument_list", "text": "(f_M, hP, f_ext, nx_, ny_, type, &f_P)", "parent": 580, "children": [583, 584, 585, 586, 587, 588, 589], "start_point": {"row": 92, "column": 33}, "end_point": {"row": 92, "column": 71}}, {"id": 583, "type": "identifier", "text": "f_M", "parent": 582, "children": [], "start_point": {"row": 92, "column": 34}, "end_point": {"row": 92, "column": 37}}, {"id": 584, "type": "identifier", "text": "hP", "parent": 582, "children": [], "start_point": {"row": 92, "column": 39}, "end_point": {"row": 92, "column": 41}}, {"id": 585, "type": "identifier", "text": "f_ext", "parent": 582, "children": [], "start_point": {"row": 92, "column": 43}, "end_point": {"row": 92, "column": 48}}, {"id": 586, "type": "identifier", "text": "nx_", "parent": 582, "children": [], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 53}}, {"id": 587, "type": "identifier", "text": "ny_", "parent": 582, "children": [], "start_point": {"row": 92, "column": 55}, "end_point": {"row": 92, "column": 58}}, {"id": 588, "type": "identifier", "text": "type", "parent": 582, "children": [], "start_point": {"row": 92, "column": 60}, "end_point": {"row": 92, "column": 64}}, {"id": 589, "type": "pointer_expression", "text": "&f_P", "parent": 582, "children": [590], "start_point": {"row": 92, "column": 66}, "end_point": {"row": 92, "column": 70}}, {"id": 590, "type": "identifier", "text": "f_P", "parent": 589, "children": [], "start_point": {"row": 92, "column": 67}, "end_point": {"row": 92, "column": 70}}, {"id": 591, "type": "declaration", "text": "double numflux;", "parent": 466, "children": [592, 593], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 27}}, {"id": 592, "type": "primitive_type", "text": "double", "parent": 591, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 18}}, {"id": 593, "type": "identifier", "text": "numflux", "parent": 591, "children": [], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 26}}, {"id": 594, "type": "call_expression", "text": "upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux)", "parent": 466, "children": [595, 596], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 61}}, {"id": 595, "type": "identifier", "text": "upwind_flux", "parent": 594, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 23}}, {"id": 596, "type": "argument_list", "text": "(f_M, f_P, uM, vM, nx_, ny_, &numflux)", "parent": 594, "children": [597, 598, 599, 600, 601, 602, 603], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 61}}, {"id": 597, "type": "identifier", "text": "f_M", "parent": 596, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 95, "column": 27}}, {"id": 598, "type": "identifier", "text": "f_P", "parent": 596, "children": [], "start_point": {"row": 95, "column": 29}, "end_point": {"row": 95, "column": 32}}, {"id": 599, "type": "identifier", "text": "uM", "parent": 596, "children": [], "start_point": {"row": 95, "column": 34}, "end_point": {"row": 95, "column": 36}}, {"id": 600, "type": "identifier", "text": "vM", "parent": 596, "children": [], "start_point": {"row": 95, "column": 38}, "end_point": {"row": 95, "column": 40}}, {"id": 601, "type": "identifier", "text": "nx_", "parent": 596, "children": [], "start_point": {"row": 95, "column": 42}, "end_point": {"row": 95, "column": 45}}, {"id": 602, "type": "identifier", "text": "ny_", "parent": 596, "children": [], "start_point": {"row": 95, "column": 47}, "end_point": {"row": 95, "column": 50}}, {"id": 603, "type": "pointer_expression", "text": "&numflux", "parent": 596, "children": [604], "start_point": {"row": 95, "column": 52}, "end_point": {"row": 95, "column": 60}}, {"id": 604, "type": "identifier", "text": "numflux", "parent": 603, "children": [], "start_point": {"row": 95, "column": 53}, "end_point": {"row": 95, "column": 60}}, {"id": 605, "type": "assignment_expression", "text": "flux[ind] = -numflux", "parent": 466, "children": [606, 609, 610], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 32}}, {"id": 606, "type": "subscript_expression", "text": "flux[ind]", "parent": 605, "children": [607, 608], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 21}}, {"id": 607, "type": "identifier", "text": "flux", "parent": 606, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 16}}, {"id": 608, "type": "identifier", "text": "ind", "parent": 606, "children": [], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 20}}, {"id": 609, "type": "=", "text": "=", "parent": 605, "children": [], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 23}}, {"id": 610, "type": "unary_expression", "text": "-numflux", "parent": 605, "children": [611, 612], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 32}}, {"id": 611, "type": "-", "text": "-", "parent": 610, "children": [], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 97, "column": 25}}, {"id": 612, "type": "identifier", "text": "numflux", "parent": 610, "children": [], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 32}}, {"id": 613, "type": "update_expression", "text": "ind++", "parent": 466, "children": [614, 615], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 17}}, {"id": 614, "type": "identifier", "text": "ind", "parent": 613, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 15}}, {"id": 615, "type": "++", "text": "++", "parent": 613, "children": [], "start_point": {"row": 98, "column": 15}, "end_point": {"row": 98, "column": 17}}, {"id": 616, "type": "preproc_if", "text": "#if DEBUG\n mexPrintf(\"flux = \\n\");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", flux[k * Nfp + n]);\n }\n mexPrintf(\"\\n\");\n }\n#endif", "parent": 328, "children": [617, 618, 619, 625, 628, 676], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 113, "column": 6}}, {"id": 617, "type": "#if", "text": "#if", "parent": 616, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 3}}, {"id": 618, "type": "identifier", "text": "DEBUG", "parent": 616, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 9}}, {"id": 619, "type": "\n", "text": "\n", "parent": 616, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 102, "column": 0}}, {"id": 620, "type": "call_expression", "text": "mexPrintf(\"flux = \\n\")", "parent": 616, "children": [621, 622], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 26}}, {"id": 621, "type": "identifier", "text": "mexPrintf", "parent": 620, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 13}}, {"id": 622, "type": "argument_list", "text": "(\"flux = \\n\")", "parent": 620, "children": [623], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 26}}, {"id": 623, "type": "string_literal", "text": "\"flux = \\n\"", "parent": 622, "children": [624], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 25}}, {"id": 624, "type": "escape_sequence", "text": "\\n", "parent": 623, "children": [], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 24}}, {"id": 625, "type": "declaration", "text": "int n;", "parent": 616, "children": [626, 627], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 10}}, {"id": 626, "type": "primitive_type", "text": "int", "parent": 625, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 7}}, {"id": 627, "type": "identifier", "text": "n", "parent": 625, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 9}}, {"id": 628, "type": "for_statement", "text": "for (n = 0; n < Nfp; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", flux[k * Nfp + n]);\n }\n mexPrintf(\"\\n\");\n }", "parent": 616, "children": [629, 633, 637], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 112, "column": 5}}, {"id": 629, "type": "assignment_expression", "text": "n = 0", "parent": 628, "children": [630, 631, 632], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 14}}, {"id": 630, "type": "identifier", "text": "n", "parent": 629, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 10}}, {"id": 631, "type": "=", "text": "=", "parent": 629, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 12}}, {"id": 632, "type": "number_literal", "text": "0", "parent": 629, "children": [], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 14}}, {"id": 633, "type": "binary_expression", "text": "n < Nfp", "parent": 628, "children": [634, 635, 636], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 23}}, {"id": 634, "type": "identifier", "text": "n", "parent": 633, "children": [], "start_point": {"row": 104, "column": 16}, "end_point": {"row": 104, "column": 17}}, {"id": 635, "type": "<", "text": "<", "parent": 633, "children": [], "start_point": {"row": 104, "column": 18}, "end_point": {"row": 104, "column": 19}}, {"id": 636, "type": "identifier", "text": "Nfp", "parent": 633, "children": [], "start_point": {"row": 104, "column": 20}, "end_point": {"row": 104, "column": 23}}, {"id": 637, "type": "update_expression", "text": "n++", "parent": 628, "children": [638, 639], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 28}}, {"id": 638, "type": "identifier", "text": "n", "parent": 637, "children": [], "start_point": {"row": 104, "column": 25}, "end_point": {"row": 104, "column": 26}}, {"id": 639, "type": "++", "text": "++", "parent": 637, "children": [], "start_point": {"row": 104, "column": 26}, "end_point": {"row": 104, "column": 28}}, {"id": 640, "type": "call_expression", "text": "mexPrintf(\"\\t\")", "parent": 628, "children": [641, 642], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 23}}, {"id": 641, "type": "identifier", "text": "mexPrintf", "parent": 640, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 17}}, {"id": 642, "type": "argument_list", "text": "(\"\\t\")", "parent": 640, "children": [643], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 23}}, {"id": 643, "type": "string_literal", "text": "\"\\t\"", "parent": 642, "children": [644], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 22}}, {"id": 644, "type": "escape_sequence", "text": "\\t", "parent": 643, "children": [], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 21}}, {"id": 645, "type": "for_statement", "text": "for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", flux[k * Nfp + n]);\n }", "parent": 628, "children": [646, 650, 654], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 110, "column": 9}}, {"id": 646, "type": "assignment_expression", "text": "k = 0", "parent": 645, "children": [647, 648, 649], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 18}}, {"id": 647, "type": "identifier", "text": "k", "parent": 646, "children": [], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 14}}, {"id": 648, "type": "=", "text": "=", "parent": 646, "children": [], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 107, "column": 16}}, {"id": 649, "type": "number_literal", "text": "0", "parent": 646, "children": [], "start_point": {"row": 107, "column": 17}, "end_point": {"row": 107, "column": 18}}, {"id": 650, "type": "binary_expression", "text": "k < K", "parent": 645, "children": [651, 652, 653], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 25}}, {"id": 651, "type": "identifier", "text": "k", "parent": 650, "children": [], "start_point": {"row": 107, "column": 20}, "end_point": {"row": 107, "column": 21}}, {"id": 652, "type": "<", "text": "<", "parent": 650, "children": [], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 23}}, {"id": 653, "type": "identifier", "text": "K", "parent": 650, "children": [], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 25}}, {"id": 654, "type": "update_expression", "text": "k++", "parent": 645, "children": [655, 656], "start_point": {"row": 107, "column": 27}, "end_point": {"row": 107, "column": 30}}, {"id": 655, "type": "identifier", "text": "k", "parent": 654, "children": [], "start_point": {"row": 107, "column": 27}, "end_point": {"row": 107, "column": 28}}, {"id": 656, "type": "++", "text": "++", "parent": 654, "children": [], "start_point": {"row": 107, "column": 28}, "end_point": {"row": 107, "column": 30}}, {"id": 657, "type": "call_expression", "text": "mexPrintf(\"%e\\t\", flux[k * Nfp + n])", "parent": 645, "children": [658, 659], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 48}}, {"id": 658, "type": "identifier", "text": "mexPrintf", "parent": 657, "children": [], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 21}}, {"id": 659, "type": "argument_list", "text": "(\"%e\\t\", flux[k * Nfp + n])", "parent": 657, "children": [660, 662], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 48}}, {"id": 660, "type": "string_literal", "text": "\"%e\\t\"", "parent": 659, "children": [661], "start_point": {"row": 109, "column": 22}, "end_point": {"row": 109, "column": 28}}, {"id": 661, "type": "escape_sequence", "text": "\\t", "parent": 660, "children": [], "start_point": {"row": 109, "column": 25}, "end_point": {"row": 109, "column": 27}}, {"id": 662, "type": "subscript_expression", "text": "flux[k * Nfp + n]", "parent": 659, "children": [663, 664], "start_point": {"row": 109, "column": 30}, "end_point": {"row": 109, "column": 47}}, {"id": 663, "type": "identifier", "text": "flux", "parent": 662, "children": [], "start_point": {"row": 109, "column": 30}, "end_point": {"row": 109, "column": 34}}, {"id": 664, "type": "binary_expression", "text": "k * Nfp + n", "parent": 662, "children": [665, 669, 670], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 46}}, {"id": 665, "type": "binary_expression", "text": "k * Nfp", "parent": 664, "children": [666, 667, 668], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 42}}, {"id": 666, "type": "identifier", "text": "k", "parent": 665, "children": [], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 36}}, {"id": 667, "type": "*", "text": "*", "parent": 665, "children": [], "start_point": {"row": 109, "column": 37}, "end_point": {"row": 109, "column": 38}}, {"id": 668, "type": "identifier", "text": "Nfp", "parent": 665, "children": [], "start_point": {"row": 109, "column": 39}, "end_point": {"row": 109, "column": 42}}, {"id": 669, "type": "+", "text": "+", "parent": 664, "children": [], "start_point": {"row": 109, "column": 43}, "end_point": {"row": 109, "column": 44}}, {"id": 670, "type": "identifier", "text": "n", "parent": 664, "children": [], "start_point": {"row": 109, "column": 45}, "end_point": {"row": 109, "column": 46}}, {"id": 671, "type": "call_expression", "text": "mexPrintf(\"\\n\")", "parent": 628, "children": [672, 673], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 23}}, {"id": 672, "type": "identifier", "text": "mexPrintf", "parent": 671, "children": [], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 17}}, {"id": 673, "type": "argument_list", "text": "(\"\\n\")", "parent": 671, "children": [674], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 23}}, {"id": 674, "type": "string_literal", "text": "\"\\n\"", "parent": 673, "children": [675], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 22}}, {"id": 675, "type": "escape_sequence", "text": "\\n", "parent": 674, "children": [], "start_point": {"row": 111, "column": 19}, "end_point": {"row": 111, "column": 21}}, {"id": 676, "type": "#endif", "text": "#endif", "parent": 616, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 6}}, {"id": 677, "type": "declaration", "text": "double *stemp = calloc(Nfp * K, sizeof(double));", "parent": 328, "children": [678, 679], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 52}}, {"id": 678, "type": "primitive_type", "text": "double", "parent": 677, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 10}}, {"id": 679, "type": "init_declarator", "text": "*stemp = calloc(Nfp * K, sizeof(double))", "parent": 677, "children": [680, 683, 684], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 51}}, {"id": 680, "type": "pointer_declarator", "text": "*stemp", "parent": 679, "children": [681, 682], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 17}}, {"id": 681, "type": "*", "text": "*", "parent": 680, "children": [], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 12}}, {"id": 682, "type": "identifier", "text": "stemp", "parent": 680, "children": [], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 17}}, {"id": 683, "type": "=", "text": "=", "parent": 679, "children": [], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 19}}, {"id": 684, "type": "call_expression", "text": "calloc(Nfp * K, sizeof(double))", "parent": 679, "children": [685, 686], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 51}}, {"id": 685, "type": "identifier", "text": "calloc", "parent": 684, "children": [], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 26}}, {"id": 686, "type": "argument_list", "text": "(Nfp * K, sizeof(double))", "parent": 684, "children": [687, 691], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 51}}, {"id": 687, "type": "binary_expression", "text": "Nfp * K", "parent": 686, "children": [688, 689, 690], "start_point": {"row": 114, "column": 27}, "end_point": {"row": 114, "column": 34}}, {"id": 688, "type": "identifier", "text": "Nfp", "parent": 687, "children": [], "start_point": {"row": 114, "column": 27}, "end_point": {"row": 114, "column": 30}}, {"id": 689, "type": "*", "text": "*", "parent": 687, "children": [], "start_point": {"row": 114, "column": 31}, "end_point": {"row": 114, "column": 32}}, {"id": 690, "type": "identifier", "text": "K", "parent": 687, "children": [], "start_point": {"row": 114, "column": 33}, "end_point": {"row": 114, "column": 34}}, {"id": 691, "type": "sizeof_expression", "text": "sizeof(double)", "parent": 686, "children": [692], "start_point": {"row": 114, "column": 36}, "end_point": {"row": 114, "column": 50}}, {"id": 692, "type": "type_descriptor", "text": "double", "parent": 691, "children": [693], "start_point": {"row": 114, "column": 43}, "end_point": {"row": 114, "column": 49}}, {"id": 693, "type": "primitive_type", "text": "double", "parent": 692, "children": [], "start_point": {"row": 114, "column": 43}, "end_point": {"row": 114, "column": 49}}, {"id": 694, "type": "call_expression", "text": "dvecm(Nfp * K, 1, flux, Js, stemp)", "parent": 328, "children": [695, 696], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 38}}, {"id": 695, "type": "identifier", "text": "dvecm", "parent": 694, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 9}}, {"id": 696, "type": "argument_list", "text": "(Nfp * K, 1, flux, Js, stemp)", "parent": 694, "children": [697, 701, 702, 703, 704], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 38}}, {"id": 697, "type": "binary_expression", "text": "Nfp * K", "parent": 696, "children": [698, 699, 700], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 17}}, {"id": 698, "type": "identifier", "text": "Nfp", "parent": 697, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 13}}, {"id": 699, "type": "*", "text": "*", "parent": 697, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 15}}, {"id": 700, "type": "identifier", "text": "K", "parent": 697, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 17}}, {"id": 701, "type": "number_literal", "text": "1", "parent": 696, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 20}}, {"id": 702, "type": "identifier", "text": "flux", "parent": 696, "children": [], "start_point": {"row": 115, "column": 22}, "end_point": {"row": 115, "column": 26}}, {"id": 703, "type": "identifier", "text": "Js", "parent": 696, "children": [], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 30}}, {"id": 704, "type": "identifier", "text": "stemp", "parent": 696, "children": [], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 37}}, {"id": 705, "type": "declaration", "text": "char *chn = \"N\";", "parent": 328, "children": [706, 707], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 20}}, {"id": 706, "type": "primitive_type", "text": "char", "parent": 705, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 8}}, {"id": 707, "type": "init_declarator", "text": "*chn = \"N\"", "parent": 705, "children": [708, 711, 712], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 19}}, {"id": 708, "type": "pointer_declarator", "text": "*chn", "parent": 707, "children": [709, 710], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 13}}, {"id": 709, "type": "*", "text": "*", "parent": 708, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 10}}, {"id": 710, "type": "identifier", "text": "chn", "parent": 708, "children": [], "start_point": {"row": 116, "column": 10}, "end_point": {"row": 116, "column": 13}}, {"id": 711, "type": "=", "text": "=", "parent": 707, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 15}}, {"id": 712, "type": "string_literal", "text": "\"N\"", "parent": 707, "children": [], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 19}}, {"id": 713, "type": "declaration", "text": "double one = 1.0;", "parent": 328, "children": [714, 715], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 21}}, {"id": 714, "type": "primitive_type", "text": "double", "parent": 713, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 10}}, {"id": 715, "type": "init_declarator", "text": "one = 1.0", "parent": 713, "children": [716, 717, 718], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 20}}, {"id": 716, "type": "identifier", "text": "one", "parent": 715, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 14}}, {"id": 717, "type": "=", "text": "=", "parent": 715, "children": [], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 16}}, {"id": 718, "type": "number_literal", "text": "1.0", "parent": 715, "children": [], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 20}}, {"id": 719, "type": "declaration", "text": "mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;", "parent": 328, "children": [720, 721, 725, 729], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 47}}, {"id": 720, "type": "type_identifier", "text": "mwSignedIndex", "parent": 719, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 17}}, {"id": 721, "type": "init_declarator", "text": "Np_ = Np", "parent": 719, "children": [722, 723, 724], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 26}}, {"id": 722, "type": "identifier", "text": "Np_", "parent": 721, "children": [], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 21}}, {"id": 723, "type": "=", "text": "=", "parent": 721, "children": [], "start_point": {"row": 118, "column": 22}, "end_point": {"row": 118, "column": 23}}, {"id": 724, "type": "identifier", "text": "Np", "parent": 721, "children": [], "start_point": {"row": 118, "column": 24}, "end_point": {"row": 118, "column": 26}}, {"id": 725, "type": "init_declarator", "text": "K_ = K", "parent": 719, "children": [726, 727, 728], "start_point": {"row": 118, "column": 28}, "end_point": {"row": 118, "column": 34}}, {"id": 726, "type": "identifier", "text": "K_", "parent": 725, "children": [], "start_point": {"row": 118, "column": 28}, "end_point": {"row": 118, "column": 30}}, {"id": 727, "type": "=", "text": "=", "parent": 725, "children": [], "start_point": {"row": 118, "column": 31}, "end_point": {"row": 118, "column": 32}}, {"id": 728, "type": "identifier", "text": "K", "parent": 725, "children": [], "start_point": {"row": 118, "column": 33}, "end_point": {"row": 118, "column": 34}}, {"id": 729, "type": "init_declarator", "text": "Nfp_ = Nfp", "parent": 719, "children": [730, 731, 732], "start_point": {"row": 118, "column": 36}, "end_point": {"row": 118, "column": 46}}, {"id": 730, "type": "identifier", "text": "Nfp_", "parent": 729, "children": [], "start_point": {"row": 118, "column": 36}, "end_point": {"row": 118, "column": 40}}, {"id": 731, "type": "=", "text": "=", "parent": 729, "children": [], "start_point": {"row": 118, "column": 41}, "end_point": {"row": 118, "column": 42}}, {"id": 732, "type": "identifier", "text": "Nfp", "parent": 729, "children": [], "start_point": {"row": 118, "column": 43}, "end_point": {"row": 118, "column": 46}}, {"id": 733, "type": "call_expression", "text": "dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_)", "parent": 328, "children": [734, 735], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 86}}, {"id": 734, "type": "identifier", "text": "dgemm", "parent": 733, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 9}}, {"id": 735, "type": "argument_list", "text": "(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_)", "parent": 733, "children": [736, 737, 738, 740, 742, 744, 746, 747, 749, 750, 752, 754, 755], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 86}}, {"id": 736, "type": "identifier", "text": "chn", "parent": 735, "children": [], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 13}}, {"id": 737, "type": "identifier", "text": "chn", "parent": 735, "children": [], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 18}}, {"id": 738, "type": "pointer_expression", "text": "&Np_", "parent": 735, "children": [739], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 24}}, {"id": 739, "type": "identifier", "text": "Np_", "parent": 738, "children": [], "start_point": {"row": 119, "column": 21}, "end_point": {"row": 119, "column": 24}}, {"id": 740, "type": "pointer_expression", "text": "&K_", "parent": 735, "children": [741], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 29}}, {"id": 741, "type": "identifier", "text": "K_", "parent": 740, "children": [], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 29}}, {"id": 742, "type": "pointer_expression", "text": "&Nfp_", "parent": 735, "children": [743], "start_point": {"row": 119, "column": 31}, "end_point": {"row": 119, "column": 36}}, {"id": 743, "type": "identifier", "text": "Nfp_", "parent": 742, "children": [], "start_point": {"row": 119, "column": 32}, "end_point": {"row": 119, "column": 36}}, {"id": 744, "type": "pointer_expression", "text": "&one", "parent": 735, "children": [745], "start_point": {"row": 119, "column": 38}, "end_point": {"row": 119, "column": 42}}, {"id": 745, "type": "identifier", "text": "one", "parent": 744, "children": [], "start_point": {"row": 119, "column": 39}, "end_point": {"row": 119, "column": 42}}, {"id": 746, "type": "identifier", "text": "LIFT", "parent": 735, "children": [], "start_point": {"row": 119, "column": 44}, "end_point": {"row": 119, "column": 48}}, {"id": 747, "type": "pointer_expression", "text": "&Np_", "parent": 735, "children": [748], "start_point": {"row": 119, "column": 50}, "end_point": {"row": 119, "column": 54}}, {"id": 748, "type": "identifier", "text": "Np_", "parent": 747, "children": [], "start_point": {"row": 119, "column": 51}, "end_point": {"row": 119, "column": 54}}, {"id": 749, "type": "identifier", "text": "stemp", "parent": 735, "children": [], "start_point": {"row": 119, "column": 56}, "end_point": {"row": 119, "column": 61}}, {"id": 750, "type": "pointer_expression", "text": "&Nfp_", "parent": 735, "children": [751], "start_point": {"row": 119, "column": 63}, "end_point": {"row": 119, "column": 68}}, {"id": 751, "type": "identifier", "text": "Nfp_", "parent": 750, "children": [], "start_point": {"row": 119, "column": 64}, "end_point": {"row": 119, "column": 68}}, {"id": 752, "type": "pointer_expression", "text": "&one", "parent": 735, "children": [753], "start_point": {"row": 119, "column": 70}, "end_point": {"row": 119, "column": 74}}, {"id": 753, "type": "identifier", "text": "one", "parent": 752, "children": [], "start_point": {"row": 119, "column": 71}, "end_point": {"row": 119, "column": 74}}, {"id": 754, "type": "identifier", "text": "rhs", "parent": 735, "children": [], "start_point": {"row": 119, "column": 76}, "end_point": {"row": 119, "column": 79}}, {"id": 755, "type": "pointer_expression", "text": "&Np_", "parent": 735, "children": [756], "start_point": {"row": 119, "column": 81}, "end_point": {"row": 119, "column": 85}}, {"id": 756, "type": "identifier", "text": "Np_", "parent": 755, "children": [], "start_point": {"row": 119, "column": 82}, "end_point": {"row": 119, "column": 85}}, {"id": 757, "type": "call_expression", "text": "free(flux)", "parent": 328, "children": [758, 759], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 14}}, {"id": 758, "type": "identifier", "text": "free", "parent": 757, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 8}}, {"id": 759, "type": "argument_list", "text": "(flux)", "parent": 757, "children": [760], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 14}}, {"id": 760, "type": "identifier", "text": "flux", "parent": 759, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 13}}, {"id": 761, "type": "call_expression", "text": "free(stemp)", "parent": 328, "children": [762, 763], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 15}}, {"id": 762, "type": "identifier", "text": "free", "parent": 761, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 8}}, {"id": 763, "type": "argument_list", "text": "(stemp)", "parent": 761, "children": [764], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 15}}, {"id": 764, "type": "identifier", "text": "stemp", "parent": 763, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 14}}, {"id": 765, "type": "return_statement", "text": "return;", "parent": 328, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 11}}, {"id": 766, "type": "function_definition", "text": "void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])\n{\n /* check input */\n if (nrhs != 19)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:invalidNumInputs\",\n \"20 input required.\");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\");\n }\n\n double *f_Q = mxGetPr(prhs[0]);\n double *f_extQ = mxGetPr(prhs[1]);\n double *u = mxGetPr(prhs[2]);\n double *v = mxGetPr(prhs[3]);\n double Nedge = mxGetScalar(prhs[4]);\n double *v1 = mxGetPr(prhs[5]);\n double *v2 = mxGetPr(prhs[6]);\n double *nx = mxGetPr(prhs[7]);\n double *ny = mxGetPr(prhs[8]);\n double *ds = mxGetPr(prhs[9]);\n double *eidM = mxGetPr(prhs[10]);\n double *eidP = mxGetPr(prhs[11]);\n double *nxM = mxGetPr(prhs[12]);\n double *nyM = mxGetPr(prhs[13]);\n double *Js = mxGetPr(prhs[14]);\n double *LIFT = mxGetPr(prhs[15]);\n double *vol = mxGetPr(prhs[16]);\n signed char *eidtype = (signed char *)mxGetData(prhs[17]);\n signed char *EToR = (signed char *)mxGetData(prhs[18]);\n\n /* get dimensions */\n size_t Np = mxGetM(prhs[0]);\n size_t K = mxGetN(prhs[0]);\n size_t Nfp = mxGetM(prhs[10]);\n\n /* allocate output array */\n plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL);\n double *rhsQ = mxGetPr(plhs[0]);\n\n double *vtemp = calloc(Np * K, sizeof(double));\n inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp);\n\n surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp);\n\n dvecd(Np * K, 1, vtemp, vol, rhsQ);\n\n free(vtemp);\n return;\n}", "parent": null, "children": [767, 768], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 186, "column": 1}}, {"id": 767, "type": "primitive_type", "text": "void", "parent": 766, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 4}}, {"id": 768, "type": "function_declarator", "text": "mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])", "parent": 766, "children": [769, 770], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 76}}, {"id": 769, "type": "identifier", "text": "mexFunction", "parent": 768, "children": [], "start_point": {"row": 132, "column": 5}, "end_point": {"row": 132, "column": 16}}, {"id": 770, "type": "parameter_list", "text": "(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])", "parent": 768, "children": [771, 774, 780, 783], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 76}}, {"id": 771, "type": "parameter_declaration", "text": "int nlhs", "parent": 770, "children": [772, 773], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 25}}, {"id": 772, "type": "primitive_type", "text": "int", "parent": 771, "children": [], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 20}}, {"id": 773, "type": "identifier", "text": "nlhs", "parent": 771, "children": [], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 25}}, {"id": 774, "type": "parameter_declaration", "text": "mxArray *plhs[]", "parent": 770, "children": [775, 776], "start_point": {"row": 132, "column": 27}, "end_point": {"row": 132, "column": 42}}, {"id": 775, "type": "type_identifier", "text": "mxArray", "parent": 774, "children": [], "start_point": {"row": 132, "column": 27}, "end_point": {"row": 132, "column": 34}}, {"id": 776, "type": "pointer_declarator", "text": "*plhs[]", "parent": 774, "children": [777, 778], "start_point": {"row": 132, "column": 35}, "end_point": {"row": 132, "column": 42}}, {"id": 777, "type": "*", "text": "*", "parent": 776, "children": [], "start_point": {"row": 132, "column": 35}, "end_point": {"row": 132, "column": 36}}, {"id": 778, "type": "array_declarator", "text": "plhs[]", "parent": 776, "children": [779], "start_point": {"row": 132, "column": 36}, "end_point": {"row": 132, "column": 42}}, {"id": 779, "type": "identifier", "text": "plhs", "parent": 778, "children": [], "start_point": {"row": 132, "column": 36}, "end_point": {"row": 132, "column": 40}}, {"id": 780, "type": "parameter_declaration", "text": "int nrhs", "parent": 770, "children": [781, 782], "start_point": {"row": 132, "column": 44}, "end_point": {"row": 132, "column": 52}}, {"id": 781, "type": "primitive_type", "text": "int", "parent": 780, "children": [], "start_point": {"row": 132, "column": 44}, "end_point": {"row": 132, "column": 47}}, {"id": 782, "type": "identifier", "text": "nrhs", "parent": 780, "children": [], "start_point": {"row": 132, "column": 48}, "end_point": {"row": 132, "column": 52}}, {"id": 783, "type": "parameter_declaration", "text": "const mxArray *prhs[]", "parent": 770, "children": [784, 785], "start_point": {"row": 132, "column": 54}, "end_point": {"row": 132, "column": 75}}, {"id": 784, "type": "type_identifier", "text": "mxArray", "parent": 783, "children": [], "start_point": {"row": 132, "column": 60}, "end_point": {"row": 132, "column": 67}}, {"id": 785, "type": "pointer_declarator", "text": "*prhs[]", "parent": 783, "children": [786, 787], "start_point": {"row": 132, "column": 68}, "end_point": {"row": 132, "column": 75}}, {"id": 786, "type": "*", "text": "*", "parent": 785, "children": [], "start_point": {"row": 132, "column": 68}, "end_point": {"row": 132, "column": 69}}, {"id": 787, "type": "array_declarator", "text": "prhs[]", "parent": 785, "children": [788], "start_point": {"row": 132, "column": 69}, "end_point": {"row": 132, "column": 75}}, {"id": 788, "type": "identifier", "text": "prhs", "parent": 787, "children": [], "start_point": {"row": 132, "column": 69}, "end_point": {"row": 132, "column": 73}}, {"id": 789, "type": "if_statement", "text": "if (nrhs != 19)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:invalidNumInputs\",\n \"20 input required.\");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\");\n }", "parent": 766, "children": [790, 800], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 144, "column": 5}}, {"id": 790, "type": "parenthesized_expression", "text": "(nrhs != 19)", "parent": 789, "children": [791], "start_point": {"row": 135, "column": 7}, "end_point": {"row": 135, "column": 19}}, {"id": 791, "type": "binary_expression", "text": "nrhs != 19", "parent": 790, "children": [792, 793, 794], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 18}}, {"id": 792, "type": "identifier", "text": "nrhs", "parent": 791, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 12}}, {"id": 793, "type": "!=", "text": "!=", "parent": 791, "children": [], "start_point": {"row": 135, "column": 13}, "end_point": {"row": 135, "column": 15}}, {"id": 794, "type": "number_literal", "text": "19", "parent": 791, "children": [], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 18}}, {"id": 795, "type": "call_expression", "text": "mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:invalidNumInputs\",\n \"20 input required.\")", "parent": 789, "children": [796, 797], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 138, "column": 47}}, {"id": 796, "type": "identifier", "text": "mexErrMsgIdAndTxt", "parent": 795, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 25}}, {"id": 797, "type": "argument_list", "text": "(\"MATLAB:rhs_fv_term:invalidNumInputs\",\n \"20 input required.\")", "parent": 795, "children": [798, 799], "start_point": {"row": 137, "column": 25}, "end_point": {"row": 138, "column": 47}}, {"id": 798, "type": "string_literal", "text": "\"MATLAB:rhs_fv_term:invalidNumInputs\"", "parent": 797, "children": [], "start_point": {"row": 137, "column": 26}, "end_point": {"row": 137, "column": 63}}, {"id": 799, "type": "string_literal", "text": "\"20 input required.\"", "parent": 797, "children": [], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 46}}, {"id": 800, "type": "else_clause", "text": "else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\");\n }", "parent": 789, "children": [801], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 144, "column": 5}}, {"id": 801, "type": "if_statement", "text": "if (nlhs > 1)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\");\n }", "parent": 800, "children": [802], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 144, "column": 5}}, {"id": 802, "type": "parenthesized_expression", "text": "(nlhs > 1)", "parent": 801, "children": [803], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 22}}, {"id": 803, "type": "binary_expression", "text": "nlhs > 1", "parent": 802, "children": [804, 805, 806], "start_point": {"row": 140, "column": 13}, "end_point": {"row": 140, "column": 21}}, {"id": 804, "type": "identifier", "text": "nlhs", "parent": 803, "children": [], "start_point": {"row": 140, "column": 13}, "end_point": {"row": 140, "column": 17}}, {"id": 805, "type": ">", "text": ">", "parent": 803, "children": [], "start_point": {"row": 140, "column": 18}, "end_point": {"row": 140, "column": 19}}, {"id": 806, "type": "number_literal", "text": "1", "parent": 803, "children": [], "start_point": {"row": 140, "column": 20}, "end_point": {"row": 140, "column": 21}}, {"id": 807, "type": "call_expression", "text": "mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\")", "parent": 801, "children": [808, 809], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 143, "column": 55}}, {"id": 808, "type": "identifier", "text": "mexErrMsgIdAndTxt", "parent": 807, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 25}}, {"id": 809, "type": "argument_list", "text": "(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\")", "parent": 807, "children": [810, 811], "start_point": {"row": 142, "column": 25}, "end_point": {"row": 143, "column": 55}}, {"id": 810, "type": "string_literal", "text": "\"MATLAB:rhs_fv_term:maxlhs\"", "parent": 809, "children": [], "start_point": {"row": 142, "column": 26}, "end_point": {"row": 142, "column": 53}}, {"id": 811, "type": "string_literal", "text": "\"Too many output arguments.\"", "parent": 809, "children": [], "start_point": {"row": 143, "column": 26}, "end_point": {"row": 143, "column": 54}}, {"id": 812, "type": "declaration", "text": "double *f_Q = mxGetPr(prhs[0]);", "parent": 766, "children": [813, 814], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 35}}, {"id": 813, "type": "primitive_type", "text": "double", "parent": 812, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 10}}, {"id": 814, "type": "init_declarator", "text": "*f_Q = mxGetPr(prhs[0])", "parent": 812, "children": [815, 818, 819], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 34}}, {"id": 815, "type": "pointer_declarator", "text": "*f_Q", "parent": 814, "children": [816, 817], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 15}}, {"id": 816, "type": "*", "text": "*", "parent": 815, "children": [], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 12}}, {"id": 817, "type": "identifier", "text": "f_Q", "parent": 815, "children": [], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 15}}, {"id": 818, "type": "=", "text": "=", "parent": 814, "children": [], "start_point": {"row": 146, "column": 16}, "end_point": {"row": 146, "column": 17}}, {"id": 819, "type": "call_expression", "text": "mxGetPr(prhs[0])", "parent": 814, "children": [820, 821], "start_point": {"row": 146, "column": 18}, "end_point": {"row": 146, "column": 34}}, {"id": 820, "type": "identifier", "text": "mxGetPr", "parent": 819, "children": [], "start_point": {"row": 146, "column": 18}, "end_point": {"row": 146, "column": 25}}, {"id": 821, "type": "argument_list", "text": "(prhs[0])", "parent": 819, "children": [822], "start_point": {"row": 146, "column": 25}, "end_point": {"row": 146, "column": 34}}, {"id": 822, "type": "subscript_expression", "text": "prhs[0]", "parent": 821, "children": [823, 824], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 33}}, {"id": 823, "type": "identifier", "text": "prhs", "parent": 822, "children": [], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 30}}, {"id": 824, "type": "number_literal", "text": "0", "parent": 822, "children": [], "start_point": {"row": 146, "column": 31}, "end_point": {"row": 146, "column": 32}}, {"id": 825, "type": "declaration", "text": "double *f_extQ = mxGetPr(prhs[1]);", "parent": 766, "children": [826, 827], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 38}}, {"id": 826, "type": "primitive_type", "text": "double", "parent": 825, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 10}}, {"id": 827, "type": "init_declarator", "text": "*f_extQ = mxGetPr(prhs[1])", "parent": 825, "children": [828, 831, 832], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 37}}, {"id": 828, "type": "pointer_declarator", "text": "*f_extQ", "parent": 827, "children": [829, 830], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 18}}, {"id": 829, "type": "*", "text": "*", "parent": 828, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 12}}, {"id": 830, "type": "identifier", "text": "f_extQ", "parent": 828, "children": [], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 18}}, {"id": 831, "type": "=", "text": "=", "parent": 827, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 20}}, {"id": 832, "type": "call_expression", "text": "mxGetPr(prhs[1])", "parent": 827, "children": [833, 834], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 37}}, {"id": 833, "type": "identifier", "text": "mxGetPr", "parent": 832, "children": [], "start_point": {"row": 147, "column": 21}, "end_point": {"row": 147, "column": 28}}, {"id": 834, "type": "argument_list", "text": "(prhs[1])", "parent": 832, "children": [835], "start_point": {"row": 147, "column": 28}, "end_point": {"row": 147, "column": 37}}, {"id": 835, "type": "subscript_expression", "text": "prhs[1]", "parent": 834, "children": [836, 837], "start_point": {"row": 147, "column": 29}, "end_point": {"row": 147, "column": 36}}, {"id": 836, "type": "identifier", "text": "prhs", "parent": 835, "children": [], "start_point": {"row": 147, "column": 29}, "end_point": {"row": 147, "column": 33}}, {"id": 837, "type": "number_literal", "text": "1", "parent": 835, "children": [], "start_point": {"row": 147, "column": 34}, "end_point": {"row": 147, "column": 35}}, {"id": 838, "type": "declaration", "text": "double *u = mxGetPr(prhs[2]);", "parent": 766, "children": [839, 840], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 33}}, {"id": 839, "type": "primitive_type", "text": "double", "parent": 838, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 10}}, {"id": 840, "type": "init_declarator", "text": "*u = mxGetPr(prhs[2])", "parent": 838, "children": [841, 844, 845], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 32}}, {"id": 841, "type": "pointer_declarator", "text": "*u", "parent": 840, "children": [842, 843], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 13}}, {"id": 842, "type": "*", "text": "*", "parent": 841, "children": [], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 12}}, {"id": 843, "type": "identifier", "text": "u", "parent": 841, "children": [], "start_point": {"row": 148, "column": 12}, "end_point": {"row": 148, "column": 13}}, {"id": 844, "type": "=", "text": "=", "parent": 840, "children": [], "start_point": {"row": 148, "column": 14}, "end_point": {"row": 148, "column": 15}}, {"id": 845, "type": "call_expression", "text": "mxGetPr(prhs[2])", "parent": 840, "children": [846, 847], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 32}}, {"id": 846, "type": "identifier", "text": "mxGetPr", "parent": 845, "children": [], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 23}}, {"id": 847, "type": "argument_list", "text": "(prhs[2])", "parent": 845, "children": [848], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 148, "column": 32}}, {"id": 848, "type": "subscript_expression", "text": "prhs[2]", "parent": 847, "children": [849, 850], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 31}}, {"id": 849, "type": "identifier", "text": "prhs", "parent": 848, "children": [], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 28}}, {"id": 850, "type": "number_literal", "text": "2", "parent": 848, "children": [], "start_point": {"row": 148, "column": 29}, "end_point": {"row": 148, "column": 30}}, {"id": 851, "type": "declaration", "text": "double *v = mxGetPr(prhs[3]);", "parent": 766, "children": [852, 853], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 33}}, {"id": 852, "type": "primitive_type", "text": "double", "parent": 851, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 10}}, {"id": 853, "type": "init_declarator", "text": "*v = mxGetPr(prhs[3])", "parent": 851, "children": [854, 857, 858], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 32}}, {"id": 854, "type": "pointer_declarator", "text": "*v", "parent": 853, "children": [855, 856], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 13}}, {"id": 855, "type": "*", "text": "*", "parent": 854, "children": [], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 12}}, {"id": 856, "type": "identifier", "text": "v", "parent": 854, "children": [], "start_point": {"row": 149, "column": 12}, "end_point": {"row": 149, "column": 13}}, {"id": 857, "type": "=", "text": "=", "parent": 853, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 15}}, {"id": 858, "type": "call_expression", "text": "mxGetPr(prhs[3])", "parent": 853, "children": [859, 860], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 32}}, {"id": 859, "type": "identifier", "text": "mxGetPr", "parent": 858, "children": [], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 23}}, {"id": 860, "type": "argument_list", "text": "(prhs[3])", "parent": 858, "children": [861], "start_point": {"row": 149, "column": 23}, "end_point": {"row": 149, "column": 32}}, {"id": 861, "type": "subscript_expression", "text": "prhs[3]", "parent": 860, "children": [862, 863], "start_point": {"row": 149, "column": 24}, "end_point": {"row": 149, "column": 31}}, {"id": 862, "type": "identifier", "text": "prhs", "parent": 861, "children": [], "start_point": {"row": 149, "column": 24}, "end_point": {"row": 149, "column": 28}}, {"id": 863, "type": "number_literal", "text": "3", "parent": 861, "children": [], "start_point": {"row": 149, "column": 29}, "end_point": {"row": 149, "column": 30}}, {"id": 864, "type": "declaration", "text": "double Nedge = mxGetScalar(prhs[4]);", "parent": 766, "children": [865, 866], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 40}}, {"id": 865, "type": "primitive_type", "text": "double", "parent": 864, "children": [], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 10}}, {"id": 866, "type": "init_declarator", "text": "Nedge = mxGetScalar(prhs[4])", "parent": 864, "children": [867, 868, 869], "start_point": {"row": 150, "column": 11}, "end_point": {"row": 150, "column": 39}}, {"id": 867, "type": "identifier", "text": "Nedge", "parent": 866, "children": [], "start_point": {"row": 150, "column": 11}, "end_point": {"row": 150, "column": 16}}, {"id": 868, "type": "=", "text": "=", "parent": 866, "children": [], "start_point": {"row": 150, "column": 17}, "end_point": {"row": 150, "column": 18}}, {"id": 869, "type": "call_expression", "text": "mxGetScalar(prhs[4])", "parent": 866, "children": [870, 871], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 39}}, {"id": 870, "type": "identifier", "text": "mxGetScalar", "parent": 869, "children": [], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 30}}, {"id": 871, "type": "argument_list", "text": "(prhs[4])", "parent": 869, "children": [872], "start_point": {"row": 150, "column": 30}, "end_point": {"row": 150, "column": 39}}, {"id": 872, "type": "subscript_expression", "text": "prhs[4]", "parent": 871, "children": [873, 874], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 38}}, {"id": 873, "type": "identifier", "text": "prhs", "parent": 872, "children": [], "start_point": {"row": 150, "column": 31}, "end_point": {"row": 150, "column": 35}}, {"id": 874, "type": "number_literal", "text": "4", "parent": 872, "children": [], "start_point": {"row": 150, "column": 36}, "end_point": {"row": 150, "column": 37}}, {"id": 875, "type": "declaration", "text": "double *v1 = mxGetPr(prhs[5]);", "parent": 766, "children": [876, 877], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 34}}, {"id": 876, "type": "primitive_type", "text": "double", "parent": 875, "children": [], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 10}}, {"id": 877, "type": "init_declarator", "text": "*v1 = mxGetPr(prhs[5])", "parent": 875, "children": [878, 881, 882], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 33}}, {"id": 878, "type": "pointer_declarator", "text": "*v1", "parent": 877, "children": [879, 880], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 14}}, {"id": 879, "type": "*", "text": "*", "parent": 878, "children": [], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 12}}, {"id": 880, "type": "identifier", "text": "v1", "parent": 878, "children": [], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 151, "column": 14}}, {"id": 881, "type": "=", "text": "=", "parent": 877, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 16}}, {"id": 882, "type": "call_expression", "text": "mxGetPr(prhs[5])", "parent": 877, "children": [883, 884], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 33}}, {"id": 883, "type": "identifier", "text": "mxGetPr", "parent": 882, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 24}}, {"id": 884, "type": "argument_list", "text": "(prhs[5])", "parent": 882, "children": [885], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 33}}, {"id": 885, "type": "subscript_expression", "text": "prhs[5]", "parent": 884, "children": [886, 887], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 32}}, {"id": 886, "type": "identifier", "text": "prhs", "parent": 885, "children": [], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 29}}, {"id": 887, "type": "number_literal", "text": "5", "parent": 885, "children": [], "start_point": {"row": 151, "column": 30}, "end_point": {"row": 151, "column": 31}}, {"id": 888, "type": "declaration", "text": "double *v2 = mxGetPr(prhs[6]);", "parent": 766, "children": [889, 890], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 34}}, {"id": 889, "type": "primitive_type", "text": "double", "parent": 888, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 10}}, {"id": 890, "type": "init_declarator", "text": "*v2 = mxGetPr(prhs[6])", "parent": 888, "children": [891, 894, 895], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 33}}, {"id": 891, "type": "pointer_declarator", "text": "*v2", "parent": 890, "children": [892, 893], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 14}}, {"id": 892, "type": "*", "text": "*", "parent": 891, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 12}}, {"id": 893, "type": "identifier", "text": "v2", "parent": 891, "children": [], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 14}}, {"id": 894, "type": "=", "text": "=", "parent": 890, "children": [], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 16}}, {"id": 895, "type": "call_expression", "text": "mxGetPr(prhs[6])", "parent": 890, "children": [896, 897], "start_point": {"row": 152, "column": 17}, "end_point": {"row": 152, "column": 33}}, {"id": 896, "type": "identifier", "text": "mxGetPr", "parent": 895, "children": [], "start_point": {"row": 152, "column": 17}, "end_point": {"row": 152, "column": 24}}, {"id": 897, "type": "argument_list", "text": "(prhs[6])", "parent": 895, "children": [898], "start_point": {"row": 152, "column": 24}, "end_point": {"row": 152, "column": 33}}, {"id": 898, "type": "subscript_expression", "text": "prhs[6]", "parent": 897, "children": [899, 900], "start_point": {"row": 152, "column": 25}, "end_point": {"row": 152, "column": 32}}, {"id": 899, "type": "identifier", "text": "prhs", "parent": 898, "children": [], "start_point": {"row": 152, "column": 25}, "end_point": {"row": 152, "column": 29}}, {"id": 900, "type": "number_literal", "text": "6", "parent": 898, "children": [], "start_point": {"row": 152, "column": 30}, "end_point": {"row": 152, "column": 31}}, {"id": 901, "type": "declaration", "text": "double *nx = mxGetPr(prhs[7]);", "parent": 766, "children": [902, 903], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 34}}, {"id": 902, "type": "primitive_type", "text": "double", "parent": 901, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 10}}, {"id": 903, "type": "init_declarator", "text": "*nx = mxGetPr(prhs[7])", "parent": 901, "children": [904, 907, 908], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 33}}, {"id": 904, "type": "pointer_declarator", "text": "*nx", "parent": 903, "children": [905, 906], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 14}}, {"id": 905, "type": "*", "text": "*", "parent": 904, "children": [], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 12}}, {"id": 906, "type": "identifier", "text": "nx", "parent": 904, "children": [], "start_point": {"row": 153, "column": 12}, "end_point": {"row": 153, "column": 14}}, {"id": 907, "type": "=", "text": "=", "parent": 903, "children": [], "start_point": {"row": 153, "column": 15}, "end_point": {"row": 153, "column": 16}}, {"id": 908, "type": "call_expression", "text": "mxGetPr(prhs[7])", "parent": 903, "children": [909, 910], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 33}}, {"id": 909, "type": "identifier", "text": "mxGetPr", "parent": 908, "children": [], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 24}}, {"id": 910, "type": "argument_list", "text": "(prhs[7])", "parent": 908, "children": [911], "start_point": {"row": 153, "column": 24}, "end_point": {"row": 153, "column": 33}}, {"id": 911, "type": "subscript_expression", "text": "prhs[7]", "parent": 910, "children": [912, 913], "start_point": {"row": 153, "column": 25}, "end_point": {"row": 153, "column": 32}}, {"id": 912, "type": "identifier", "text": "prhs", "parent": 911, "children": [], "start_point": {"row": 153, "column": 25}, "end_point": {"row": 153, "column": 29}}, {"id": 913, "type": "number_literal", "text": "7", "parent": 911, "children": [], "start_point": {"row": 153, "column": 30}, "end_point": {"row": 153, "column": 31}}, {"id": 914, "type": "declaration", "text": "double *ny = mxGetPr(prhs[8]);", "parent": 766, "children": [915, 916], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 34}}, {"id": 915, "type": "primitive_type", "text": "double", "parent": 914, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 10}}, {"id": 916, "type": "init_declarator", "text": "*ny = mxGetPr(prhs[8])", "parent": 914, "children": [917, 920, 921], "start_point": {"row": 154, "column": 11}, "end_point": {"row": 154, "column": 33}}, {"id": 917, "type": "pointer_declarator", "text": "*ny", "parent": 916, "children": [918, 919], "start_point": {"row": 154, "column": 11}, "end_point": {"row": 154, "column": 14}}, {"id": 918, "type": "*", "text": "*", "parent": 917, "children": [], "start_point": {"row": 154, "column": 11}, "end_point": {"row": 154, "column": 12}}, {"id": 919, "type": "identifier", "text": "ny", "parent": 917, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 14}}, {"id": 920, "type": "=", "text": "=", "parent": 916, "children": [], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 16}}, {"id": 921, "type": "call_expression", "text": "mxGetPr(prhs[8])", "parent": 916, "children": [922, 923], "start_point": {"row": 154, "column": 17}, "end_point": {"row": 154, "column": 33}}, {"id": 922, "type": "identifier", "text": "mxGetPr", "parent": 921, "children": [], "start_point": {"row": 154, "column": 17}, "end_point": {"row": 154, "column": 24}}, {"id": 923, "type": "argument_list", "text": "(prhs[8])", "parent": 921, "children": [924], "start_point": {"row": 154, "column": 24}, "end_point": {"row": 154, "column": 33}}, {"id": 924, "type": "subscript_expression", "text": "prhs[8]", "parent": 923, "children": [925, 926], "start_point": {"row": 154, "column": 25}, "end_point": {"row": 154, "column": 32}}, {"id": 925, "type": "identifier", "text": "prhs", "parent": 924, "children": [], "start_point": {"row": 154, "column": 25}, "end_point": {"row": 154, "column": 29}}, {"id": 926, "type": "number_literal", "text": "8", "parent": 924, "children": [], "start_point": {"row": 154, "column": 30}, "end_point": {"row": 154, "column": 31}}, {"id": 927, "type": "declaration", "text": "double *ds = mxGetPr(prhs[9]);", "parent": 766, "children": [928, 929], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 34}}, {"id": 928, "type": "primitive_type", "text": "double", "parent": 927, "children": [], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 10}}, {"id": 929, "type": "init_declarator", "text": "*ds = mxGetPr(prhs[9])", "parent": 927, "children": [930, 933, 934], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 33}}, {"id": 930, "type": "pointer_declarator", "text": "*ds", "parent": 929, "children": [931, 932], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 14}}, {"id": 931, "type": "*", "text": "*", "parent": 930, "children": [], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 12}}, {"id": 932, "type": "identifier", "text": "ds", "parent": 930, "children": [], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 14}}, {"id": 933, "type": "=", "text": "=", "parent": 929, "children": [], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 16}}, {"id": 934, "type": "call_expression", "text": "mxGetPr(prhs[9])", "parent": 929, "children": [935, 936], "start_point": {"row": 155, "column": 17}, "end_point": {"row": 155, "column": 33}}, {"id": 935, "type": "identifier", "text": "mxGetPr", "parent": 934, "children": [], "start_point": {"row": 155, "column": 17}, "end_point": {"row": 155, "column": 24}}, {"id": 936, "type": "argument_list", "text": "(prhs[9])", "parent": 934, "children": [937], "start_point": {"row": 155, "column": 24}, "end_point": {"row": 155, "column": 33}}, {"id": 937, "type": "subscript_expression", "text": "prhs[9]", "parent": 936, "children": [938, 939], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 32}}, {"id": 938, "type": "identifier", "text": "prhs", "parent": 937, "children": [], "start_point": {"row": 155, "column": 25}, "end_point": {"row": 155, "column": 29}}, {"id": 939, "type": "number_literal", "text": "9", "parent": 937, "children": [], "start_point": {"row": 155, "column": 30}, "end_point": {"row": 155, "column": 31}}, {"id": 940, "type": "declaration", "text": "double *eidM = mxGetPr(prhs[10]);", "parent": 766, "children": [941, 942], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 37}}, {"id": 941, "type": "primitive_type", "text": "double", "parent": 940, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 10}}, {"id": 942, "type": "init_declarator", "text": "*eidM = mxGetPr(prhs[10])", "parent": 940, "children": [943, 946, 947], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 36}}, {"id": 943, "type": "pointer_declarator", "text": "*eidM", "parent": 942, "children": [944, 945], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 16}}, {"id": 944, "type": "*", "text": "*", "parent": 943, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 12}}, {"id": 945, "type": "identifier", "text": "eidM", "parent": 943, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 16}}, {"id": 946, "type": "=", "text": "=", "parent": 942, "children": [], "start_point": {"row": 156, "column": 17}, "end_point": {"row": 156, "column": 18}}, {"id": 947, "type": "call_expression", "text": "mxGetPr(prhs[10])", "parent": 942, "children": [948, 949], "start_point": {"row": 156, "column": 19}, "end_point": {"row": 156, "column": 36}}, {"id": 948, "type": "identifier", "text": "mxGetPr", "parent": 947, "children": [], "start_point": {"row": 156, "column": 19}, "end_point": {"row": 156, "column": 26}}, {"id": 949, "type": "argument_list", "text": "(prhs[10])", "parent": 947, "children": [950], "start_point": {"row": 156, "column": 26}, "end_point": {"row": 156, "column": 36}}, {"id": 950, "type": "subscript_expression", "text": "prhs[10]", "parent": 949, "children": [951, 952], "start_point": {"row": 156, "column": 27}, "end_point": {"row": 156, "column": 35}}, {"id": 951, "type": "identifier", "text": "prhs", "parent": 950, "children": [], "start_point": {"row": 156, "column": 27}, "end_point": {"row": 156, "column": 31}}, {"id": 952, "type": "number_literal", "text": "10", "parent": 950, "children": [], "start_point": {"row": 156, "column": 32}, "end_point": {"row": 156, "column": 34}}, {"id": 953, "type": "declaration", "text": "double *eidP = mxGetPr(prhs[11]);", "parent": 766, "children": [954, 955], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 37}}, {"id": 954, "type": "primitive_type", "text": "double", "parent": 953, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 10}}, {"id": 955, "type": "init_declarator", "text": "*eidP = mxGetPr(prhs[11])", "parent": 953, "children": [956, 959, 960], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 36}}, {"id": 956, "type": "pointer_declarator", "text": "*eidP", "parent": 955, "children": [957, 958], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 16}}, {"id": 957, "type": "*", "text": "*", "parent": 956, "children": [], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 12}}, {"id": 958, "type": "identifier", "text": "eidP", "parent": 956, "children": [], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 16}}, {"id": 959, "type": "=", "text": "=", "parent": 955, "children": [], "start_point": {"row": 157, "column": 17}, "end_point": {"row": 157, "column": 18}}, {"id": 960, "type": "call_expression", "text": "mxGetPr(prhs[11])", "parent": 955, "children": [961, 962], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 36}}, {"id": 961, "type": "identifier", "text": "mxGetPr", "parent": 960, "children": [], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 26}}, {"id": 962, "type": "argument_list", "text": "(prhs[11])", "parent": 960, "children": [963], "start_point": {"row": 157, "column": 26}, "end_point": {"row": 157, "column": 36}}, {"id": 963, "type": "subscript_expression", "text": "prhs[11]", "parent": 962, "children": [964, 965], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 35}}, {"id": 964, "type": "identifier", "text": "prhs", "parent": 963, "children": [], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 31}}, {"id": 965, "type": "number_literal", "text": "11", "parent": 963, "children": [], "start_point": {"row": 157, "column": 32}, "end_point": {"row": 157, "column": 34}}, {"id": 966, "type": "declaration", "text": "double *nxM = mxGetPr(prhs[12]);", "parent": 766, "children": [967, 968], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 36}}, {"id": 967, "type": "primitive_type", "text": "double", "parent": 966, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 10}}, {"id": 968, "type": "init_declarator", "text": "*nxM = mxGetPr(prhs[12])", "parent": 966, "children": [969, 972, 973], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 35}}, {"id": 969, "type": "pointer_declarator", "text": "*nxM", "parent": 968, "children": [970, 971], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 15}}, {"id": 970, "type": "*", "text": "*", "parent": 969, "children": [], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 12}}, {"id": 971, "type": "identifier", "text": "nxM", "parent": 969, "children": [], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 15}}, {"id": 972, "type": "=", "text": "=", "parent": 968, "children": [], "start_point": {"row": 158, "column": 16}, "end_point": {"row": 158, "column": 17}}, {"id": 973, "type": "call_expression", "text": "mxGetPr(prhs[12])", "parent": 968, "children": [974, 975], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 35}}, {"id": 974, "type": "identifier", "text": "mxGetPr", "parent": 973, "children": [], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 25}}, {"id": 975, "type": "argument_list", "text": "(prhs[12])", "parent": 973, "children": [976], "start_point": {"row": 158, "column": 25}, "end_point": {"row": 158, "column": 35}}, {"id": 976, "type": "subscript_expression", "text": "prhs[12]", "parent": 975, "children": [977, 978], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 34}}, {"id": 977, "type": "identifier", "text": "prhs", "parent": 976, "children": [], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 30}}, {"id": 978, "type": "number_literal", "text": "12", "parent": 976, "children": [], "start_point": {"row": 158, "column": 31}, "end_point": {"row": 158, "column": 33}}, {"id": 979, "type": "declaration", "text": "double *nyM = mxGetPr(prhs[13]);", "parent": 766, "children": [980, 981], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 36}}, {"id": 980, "type": "primitive_type", "text": "double", "parent": 979, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 10}}, {"id": 981, "type": "init_declarator", "text": "*nyM = mxGetPr(prhs[13])", "parent": 979, "children": [982, 985, 986], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 35}}, {"id": 982, "type": "pointer_declarator", "text": "*nyM", "parent": 981, "children": [983, 984], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 15}}, {"id": 983, "type": "*", "text": "*", "parent": 982, "children": [], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 12}}, {"id": 984, "type": "identifier", "text": "nyM", "parent": 982, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 15}}, {"id": 985, "type": "=", "text": "=", "parent": 981, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 17}}, {"id": 986, "type": "call_expression", "text": "mxGetPr(prhs[13])", "parent": 981, "children": [987, 988], "start_point": {"row": 159, "column": 18}, "end_point": {"row": 159, "column": 35}}, {"id": 987, "type": "identifier", "text": "mxGetPr", "parent": 986, "children": [], "start_point": {"row": 159, "column": 18}, "end_point": {"row": 159, "column": 25}}, {"id": 988, "type": "argument_list", "text": "(prhs[13])", "parent": 986, "children": [989], "start_point": {"row": 159, "column": 25}, "end_point": {"row": 159, "column": 35}}, {"id": 989, "type": "subscript_expression", "text": "prhs[13]", "parent": 988, "children": [990, 991], "start_point": {"row": 159, "column": 26}, "end_point": {"row": 159, "column": 34}}, {"id": 990, "type": "identifier", "text": "prhs", "parent": 989, "children": [], "start_point": {"row": 159, "column": 26}, "end_point": {"row": 159, "column": 30}}, {"id": 991, "type": "number_literal", "text": "13", "parent": 989, "children": [], "start_point": {"row": 159, "column": 31}, "end_point": {"row": 159, "column": 33}}, {"id": 992, "type": "declaration", "text": "double *Js = mxGetPr(prhs[14]);", "parent": 766, "children": [993, 994], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 35}}, {"id": 993, "type": "primitive_type", "text": "double", "parent": 992, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 10}}, {"id": 994, "type": "init_declarator", "text": "*Js = mxGetPr(prhs[14])", "parent": 992, "children": [995, 998, 999], "start_point": {"row": 160, "column": 11}, "end_point": {"row": 160, "column": 34}}, {"id": 995, "type": "pointer_declarator", "text": "*Js", "parent": 994, "children": [996, 997], "start_point": {"row": 160, "column": 11}, "end_point": {"row": 160, "column": 14}}, {"id": 996, "type": "*", "text": "*", "parent": 995, "children": [], "start_point": {"row": 160, "column": 11}, "end_point": {"row": 160, "column": 12}}, {"id": 997, "type": "identifier", "text": "Js", "parent": 995, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 14}}, {"id": 998, "type": "=", "text": "=", "parent": 994, "children": [], "start_point": {"row": 160, "column": 15}, "end_point": {"row": 160, "column": 16}}, {"id": 999, "type": "call_expression", "text": "mxGetPr(prhs[14])", "parent": 994, "children": [1000, 1001], "start_point": {"row": 160, "column": 17}, "end_point": {"row": 160, "column": 34}}, {"id": 1000, "type": "identifier", "text": "mxGetPr", "parent": 999, "children": [], "start_point": {"row": 160, "column": 17}, "end_point": {"row": 160, "column": 24}}, {"id": 1001, "type": "argument_list", "text": "(prhs[14])", "parent": 999, "children": [1002], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 34}}, {"id": 1002, "type": "subscript_expression", "text": "prhs[14]", "parent": 1001, "children": [1003, 1004], "start_point": {"row": 160, "column": 25}, "end_point": {"row": 160, "column": 33}}, {"id": 1003, "type": "identifier", "text": "prhs", "parent": 1002, "children": [], "start_point": {"row": 160, "column": 25}, "end_point": {"row": 160, "column": 29}}, {"id": 1004, "type": "number_literal", "text": "14", "parent": 1002, "children": [], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 32}}, {"id": 1005, "type": "declaration", "text": "double *LIFT = mxGetPr(prhs[15]);", "parent": 766, "children": [1006, 1007], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 37}}, {"id": 1006, "type": "primitive_type", "text": "double", "parent": 1005, "children": [], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 10}}, {"id": 1007, "type": "init_declarator", "text": "*LIFT = mxGetPr(prhs[15])", "parent": 1005, "children": [1008, 1011, 1012], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 36}}, {"id": 1008, "type": "pointer_declarator", "text": "*LIFT", "parent": 1007, "children": [1009, 1010], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 16}}, {"id": 1009, "type": "*", "text": "*", "parent": 1008, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 12}}, {"id": 1010, "type": "identifier", "text": "LIFT", "parent": 1008, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 16}}, {"id": 1011, "type": "=", "text": "=", "parent": 1007, "children": [], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 18}}, {"id": 1012, "type": "call_expression", "text": "mxGetPr(prhs[15])", "parent": 1007, "children": [1013, 1014], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 36}}, {"id": 1013, "type": "identifier", "text": "mxGetPr", "parent": 1012, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 26}}, {"id": 1014, "type": "argument_list", "text": "(prhs[15])", "parent": 1012, "children": [1015], "start_point": {"row": 161, "column": 26}, "end_point": {"row": 161, "column": 36}}, {"id": 1015, "type": "subscript_expression", "text": "prhs[15]", "parent": 1014, "children": [1016, 1017], "start_point": {"row": 161, "column": 27}, "end_point": {"row": 161, "column": 35}}, {"id": 1016, "type": "identifier", "text": "prhs", "parent": 1015, "children": [], "start_point": {"row": 161, "column": 27}, "end_point": {"row": 161, "column": 31}}, {"id": 1017, "type": "number_literal", "text": "15", "parent": 1015, "children": [], "start_point": {"row": 161, "column": 32}, "end_point": {"row": 161, "column": 34}}, {"id": 1018, "type": "declaration", "text": "double *vol = mxGetPr(prhs[16]);", "parent": 766, "children": [1019, 1020], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 36}}, {"id": 1019, "type": "primitive_type", "text": "double", "parent": 1018, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 10}}, {"id": 1020, "type": "init_declarator", "text": "*vol = mxGetPr(prhs[16])", "parent": 1018, "children": [1021, 1024, 1025], "start_point": {"row": 162, "column": 11}, "end_point": {"row": 162, "column": 35}}, {"id": 1021, "type": "pointer_declarator", "text": "*vol", "parent": 1020, "children": [1022, 1023], "start_point": {"row": 162, "column": 11}, "end_point": {"row": 162, "column": 15}}, {"id": 1022, "type": "*", "text": "*", "parent": 1021, "children": [], "start_point": {"row": 162, "column": 11}, "end_point": {"row": 162, "column": 12}}, {"id": 1023, "type": "identifier", "text": "vol", "parent": 1021, "children": [], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 15}}, {"id": 1024, "type": "=", "text": "=", "parent": 1020, "children": [], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 17}}, {"id": 1025, "type": "call_expression", "text": "mxGetPr(prhs[16])", "parent": 1020, "children": [1026, 1027], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 35}}, {"id": 1026, "type": "identifier", "text": "mxGetPr", "parent": 1025, "children": [], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 25}}, {"id": 1027, "type": "argument_list", "text": "(prhs[16])", "parent": 1025, "children": [1028], "start_point": {"row": 162, "column": 25}, "end_point": {"row": 162, "column": 35}}, {"id": 1028, "type": "subscript_expression", "text": "prhs[16]", "parent": 1027, "children": [1029, 1030], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 34}}, {"id": 1029, "type": "identifier", "text": "prhs", "parent": 1028, "children": [], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 30}}, {"id": 1030, "type": "number_literal", "text": "16", "parent": 1028, "children": [], "start_point": {"row": 162, "column": 31}, "end_point": {"row": 162, "column": 33}}, {"id": 1031, "type": "declaration", "text": "signed char *eidtype = (signed char *)mxGetData(prhs[17]);", "parent": 766, "children": [1032, 1035], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 163, "column": 62}}, {"id": 1032, "type": "sized_type_specifier", "text": "signed char", "parent": 1031, "children": [1033, 1034], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 163, "column": 15}}, {"id": 1033, "type": "signed", "text": "signed", "parent": 1032, "children": [], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 163, "column": 10}}, {"id": 1034, "type": "primitive_type", "text": "char", "parent": 1032, "children": [], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 15}}, {"id": 1035, "type": "init_declarator", "text": "*eidtype = (signed char *)mxGetData(prhs[17])", "parent": 1031, "children": [1036, 1039, 1040], "start_point": {"row": 163, "column": 16}, "end_point": {"row": 163, "column": 61}}, {"id": 1036, "type": "pointer_declarator", "text": "*eidtype", "parent": 1035, "children": [1037, 1038], "start_point": {"row": 163, "column": 16}, "end_point": {"row": 163, "column": 24}}, {"id": 1037, "type": "*", "text": "*", "parent": 1036, "children": [], "start_point": {"row": 163, "column": 16}, "end_point": {"row": 163, "column": 17}}, {"id": 1038, "type": "identifier", "text": "eidtype", "parent": 1036, "children": [], "start_point": {"row": 163, "column": 17}, "end_point": {"row": 163, "column": 24}}, {"id": 1039, "type": "=", "text": "=", "parent": 1035, "children": [], "start_point": {"row": 163, "column": 25}, "end_point": {"row": 163, "column": 26}}, {"id": 1040, "type": "cast_expression", "text": "(signed char *)mxGetData(prhs[17])", "parent": 1035, "children": [1041, 1047], "start_point": {"row": 163, "column": 27}, "end_point": {"row": 163, "column": 61}}, {"id": 1041, "type": "type_descriptor", "text": "signed char *", "parent": 1040, "children": [1042, 1045], "start_point": {"row": 163, "column": 28}, "end_point": {"row": 163, "column": 41}}, {"id": 1042, "type": "sized_type_specifier", "text": "signed char", "parent": 1041, "children": [1043, 1044], "start_point": {"row": 163, "column": 28}, "end_point": {"row": 163, "column": 39}}, {"id": 1043, "type": "signed", "text": "signed", "parent": 1042, "children": [], "start_point": {"row": 163, "column": 28}, "end_point": {"row": 163, "column": 34}}, {"id": 1044, "type": "primitive_type", "text": "char", "parent": 1042, "children": [], "start_point": {"row": 163, "column": 35}, "end_point": {"row": 163, "column": 39}}, {"id": 1045, "type": "abstract_pointer_declarator", "text": "*", "parent": 1041, "children": [1046], "start_point": {"row": 163, "column": 40}, "end_point": {"row": 163, "column": 41}}, {"id": 1046, "type": "*", "text": "*", "parent": 1045, "children": [], "start_point": {"row": 163, "column": 40}, "end_point": {"row": 163, "column": 41}}, {"id": 1047, "type": "call_expression", "text": "mxGetData(prhs[17])", "parent": 1040, "children": [1048, 1049], "start_point": {"row": 163, "column": 42}, "end_point": {"row": 163, "column": 61}}, {"id": 1048, "type": "identifier", "text": "mxGetData", "parent": 1047, "children": [], "start_point": {"row": 163, "column": 42}, "end_point": {"row": 163, "column": 51}}, {"id": 1049, "type": "argument_list", "text": "(prhs[17])", "parent": 1047, "children": [1050], "start_point": {"row": 163, "column": 51}, "end_point": {"row": 163, "column": 61}}, {"id": 1050, "type": "subscript_expression", "text": "prhs[17]", "parent": 1049, "children": [1051, 1052], "start_point": {"row": 163, "column": 52}, "end_point": {"row": 163, "column": 60}}, {"id": 1051, "type": "identifier", "text": "prhs", "parent": 1050, "children": [], "start_point": {"row": 163, "column": 52}, "end_point": {"row": 163, "column": 56}}, {"id": 1052, "type": "number_literal", "text": "17", "parent": 1050, "children": [], "start_point": {"row": 163, "column": 57}, "end_point": {"row": 163, "column": 59}}, {"id": 1053, "type": "declaration", "text": "signed char *EToR = (signed char *)mxGetData(prhs[18]);", "parent": 766, "children": [1054, 1057], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 59}}, {"id": 1054, "type": "sized_type_specifier", "text": "signed char", "parent": 1053, "children": [1055, 1056], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 15}}, {"id": 1055, "type": "signed", "text": "signed", "parent": 1054, "children": [], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 10}}, {"id": 1056, "type": "primitive_type", "text": "char", "parent": 1054, "children": [], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 15}}, {"id": 1057, "type": "init_declarator", "text": "*EToR = (signed char *)mxGetData(prhs[18])", "parent": 1053, "children": [1058, 1061, 1062], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 58}}, {"id": 1058, "type": "pointer_declarator", "text": "*EToR", "parent": 1057, "children": [1059, 1060], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 21}}, {"id": 1059, "type": "*", "text": "*", "parent": 1058, "children": [], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 17}}, {"id": 1060, "type": "identifier", "text": "EToR", "parent": 1058, "children": [], "start_point": {"row": 164, "column": 17}, "end_point": {"row": 164, "column": 21}}, {"id": 1061, "type": "=", "text": "=", "parent": 1057, "children": [], "start_point": {"row": 164, "column": 22}, "end_point": {"row": 164, "column": 23}}, {"id": 1062, "type": "cast_expression", "text": "(signed char *)mxGetData(prhs[18])", "parent": 1057, "children": [1063, 1069], "start_point": {"row": 164, "column": 24}, "end_point": {"row": 164, "column": 58}}, {"id": 1063, "type": "type_descriptor", "text": "signed char *", "parent": 1062, "children": [1064, 1067], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 38}}, {"id": 1064, "type": "sized_type_specifier", "text": "signed char", "parent": 1063, "children": [1065, 1066], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 36}}, {"id": 1065, "type": "signed", "text": "signed", "parent": 1064, "children": [], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 31}}, {"id": 1066, "type": "primitive_type", "text": "char", "parent": 1064, "children": [], "start_point": {"row": 164, "column": 32}, "end_point": {"row": 164, "column": 36}}, {"id": 1067, "type": "abstract_pointer_declarator", "text": "*", "parent": 1063, "children": [1068], "start_point": {"row": 164, "column": 37}, "end_point": {"row": 164, "column": 38}}, {"id": 1068, "type": "*", "text": "*", "parent": 1067, "children": [], "start_point": {"row": 164, "column": 37}, "end_point": {"row": 164, "column": 38}}, {"id": 1069, "type": "call_expression", "text": "mxGetData(prhs[18])", "parent": 1062, "children": [1070, 1071], "start_point": {"row": 164, "column": 39}, "end_point": {"row": 164, "column": 58}}, {"id": 1070, "type": "identifier", "text": "mxGetData", "parent": 1069, "children": [], "start_point": {"row": 164, "column": 39}, "end_point": {"row": 164, "column": 48}}, {"id": 1071, "type": "argument_list", "text": "(prhs[18])", "parent": 1069, "children": [1072], "start_point": {"row": 164, "column": 48}, "end_point": {"row": 164, "column": 58}}, {"id": 1072, "type": "subscript_expression", "text": "prhs[18]", "parent": 1071, "children": [1073, 1074], "start_point": {"row": 164, "column": 49}, "end_point": {"row": 164, "column": 57}}, {"id": 1073, "type": "identifier", "text": "prhs", "parent": 1072, "children": [], "start_point": {"row": 164, "column": 49}, "end_point": {"row": 164, "column": 53}}, {"id": 1074, "type": "number_literal", "text": "18", "parent": 1072, "children": [], "start_point": {"row": 164, "column": 54}, "end_point": {"row": 164, "column": 56}}, {"id": 1075, "type": "declaration", "text": "size_t Np = mxGetM(prhs[0]);", "parent": 766, "children": [1076, 1077], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 32}}, {"id": 1076, "type": "primitive_type", "text": "size_t", "parent": 1075, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 10}}, {"id": 1077, "type": "init_declarator", "text": "Np = mxGetM(prhs[0])", "parent": 1075, "children": [1078, 1079, 1080], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 31}}, {"id": 1078, "type": "identifier", "text": "Np", "parent": 1077, "children": [], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 13}}, {"id": 1079, "type": "=", "text": "=", "parent": 1077, "children": [], "start_point": {"row": 167, "column": 14}, "end_point": {"row": 167, "column": 15}}, {"id": 1080, "type": "call_expression", "text": "mxGetM(prhs[0])", "parent": 1077, "children": [1081, 1082], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 31}}, {"id": 1081, "type": "identifier", "text": "mxGetM", "parent": 1080, "children": [], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 22}}, {"id": 1082, "type": "argument_list", "text": "(prhs[0])", "parent": 1080, "children": [1083], "start_point": {"row": 167, "column": 22}, "end_point": {"row": 167, "column": 31}}, {"id": 1083, "type": "subscript_expression", "text": "prhs[0]", "parent": 1082, "children": [1084, 1085], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 30}}, {"id": 1084, "type": "identifier", "text": "prhs", "parent": 1083, "children": [], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 27}}, {"id": 1085, "type": "number_literal", "text": "0", "parent": 1083, "children": [], "start_point": {"row": 167, "column": 28}, "end_point": {"row": 167, "column": 29}}, {"id": 1086, "type": "declaration", "text": "size_t K = mxGetN(prhs[0]);", "parent": 766, "children": [1087, 1088], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 31}}, {"id": 1087, "type": "primitive_type", "text": "size_t", "parent": 1086, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 10}}, {"id": 1088, "type": "init_declarator", "text": "K = mxGetN(prhs[0])", "parent": 1086, "children": [1089, 1090, 1091], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 30}}, {"id": 1089, "type": "identifier", "text": "K", "parent": 1088, "children": [], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 12}}, {"id": 1090, "type": "=", "text": "=", "parent": 1088, "children": [], "start_point": {"row": 168, "column": 13}, "end_point": {"row": 168, "column": 14}}, {"id": 1091, "type": "call_expression", "text": "mxGetN(prhs[0])", "parent": 1088, "children": [1092, 1093], "start_point": {"row": 168, "column": 15}, "end_point": {"row": 168, "column": 30}}, {"id": 1092, "type": "identifier", "text": "mxGetN", "parent": 1091, "children": [], "start_point": {"row": 168, "column": 15}, "end_point": {"row": 168, "column": 21}}, {"id": 1093, "type": "argument_list", "text": "(prhs[0])", "parent": 1091, "children": [1094], "start_point": {"row": 168, "column": 21}, "end_point": {"row": 168, "column": 30}}, {"id": 1094, "type": "subscript_expression", "text": "prhs[0]", "parent": 1093, "children": [1095, 1096], "start_point": {"row": 168, "column": 22}, "end_point": {"row": 168, "column": 29}}, {"id": 1095, "type": "identifier", "text": "prhs", "parent": 1094, "children": [], "start_point": {"row": 168, "column": 22}, "end_point": {"row": 168, "column": 26}}, {"id": 1096, "type": "number_literal", "text": "0", "parent": 1094, "children": [], "start_point": {"row": 168, "column": 27}, "end_point": {"row": 168, "column": 28}}, {"id": 1097, "type": "declaration", "text": "size_t Nfp = mxGetM(prhs[10]);", "parent": 766, "children": [1098, 1099], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 34}}, {"id": 1098, "type": "primitive_type", "text": "size_t", "parent": 1097, "children": [], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 10}}, {"id": 1099, "type": "init_declarator", "text": "Nfp = mxGetM(prhs[10])", "parent": 1097, "children": [1100, 1101, 1102], "start_point": {"row": 169, "column": 11}, "end_point": {"row": 169, "column": 33}}, {"id": 1100, "type": "identifier", "text": "Nfp", "parent": 1099, "children": [], "start_point": {"row": 169, "column": 11}, "end_point": {"row": 169, "column": 14}}, {"id": 1101, "type": "=", "text": "=", "parent": 1099, "children": [], "start_point": {"row": 169, "column": 15}, "end_point": {"row": 169, "column": 16}}, {"id": 1102, "type": "call_expression", "text": "mxGetM(prhs[10])", "parent": 1099, "children": [1103, 1104], "start_point": {"row": 169, "column": 17}, "end_point": {"row": 169, "column": 33}}, {"id": 1103, "type": "identifier", "text": "mxGetM", "parent": 1102, "children": [], "start_point": {"row": 169, "column": 17}, "end_point": {"row": 169, "column": 23}}, {"id": 1104, "type": "argument_list", "text": "(prhs[10])", "parent": 1102, "children": [1105], "start_point": {"row": 169, "column": 23}, "end_point": {"row": 169, "column": 33}}, {"id": 1105, "type": "subscript_expression", "text": "prhs[10]", "parent": 1104, "children": [1106, 1107], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 32}}, {"id": 1106, "type": "identifier", "text": "prhs", "parent": 1105, "children": [], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 28}}, {"id": 1107, "type": "number_literal", "text": "10", "parent": 1105, "children": [], "start_point": {"row": 169, "column": 29}, "end_point": {"row": 169, "column": 31}}, {"id": 1108, "type": "assignment_expression", "text": "plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL)", "parent": 766, "children": [1109, 1112, 1113], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 65}}, {"id": 1109, "type": "subscript_expression", "text": "plhs[0]", "parent": 1108, "children": [1110, 1111], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 11}}, {"id": 1110, "type": "identifier", "text": "plhs", "parent": 1109, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 8}}, {"id": 1111, "type": "number_literal", "text": "0", "parent": 1109, "children": [], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 10}}, {"id": 1112, "type": "=", "text": "=", "parent": 1108, "children": [], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 13}}, {"id": 1113, "type": "call_expression", "text": "mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL)", "parent": 1108, "children": [1114, 1115], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 65}}, {"id": 1114, "type": "identifier", "text": "mxCreateDoubleMatrix", "parent": 1113, "children": [], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 34}}, {"id": 1115, "type": "argument_list", "text": "((mwSize)Np, (mwSize)K, mxREAL)", "parent": 1113, "children": [1116, 1120, 1124], "start_point": {"row": 172, "column": 34}, "end_point": {"row": 172, "column": 65}}, {"id": 1116, "type": "cast_expression", "text": "(mwSize)Np", "parent": 1115, "children": [1117, 1119], "start_point": {"row": 172, "column": 35}, "end_point": {"row": 172, "column": 45}}, {"id": 1117, "type": "type_descriptor", "text": "mwSize", "parent": 1116, "children": [1118], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 42}}, {"id": 1118, "type": "type_identifier", "text": "mwSize", "parent": 1117, "children": [], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 42}}, {"id": 1119, "type": "identifier", "text": "Np", "parent": 1116, "children": [], "start_point": {"row": 172, "column": 43}, "end_point": {"row": 172, "column": 45}}, {"id": 1120, "type": "cast_expression", "text": "(mwSize)K", "parent": 1115, "children": [1121, 1123], "start_point": {"row": 172, "column": 47}, "end_point": {"row": 172, "column": 56}}, {"id": 1121, "type": "type_descriptor", "text": "mwSize", "parent": 1120, "children": [1122], "start_point": {"row": 172, "column": 48}, "end_point": {"row": 172, "column": 54}}, {"id": 1122, "type": "type_identifier", "text": "mwSize", "parent": 1121, "children": [], "start_point": {"row": 172, "column": 48}, "end_point": {"row": 172, "column": 54}}, {"id": 1123, "type": "identifier", "text": "K", "parent": 1120, "children": [], "start_point": {"row": 172, "column": 55}, "end_point": {"row": 172, "column": 56}}, {"id": 1124, "type": "identifier", "text": "mxREAL", "parent": 1115, "children": [], "start_point": {"row": 172, "column": 58}, "end_point": {"row": 172, "column": 64}}, {"id": 1125, "type": "declaration", "text": "double *rhsQ = mxGetPr(plhs[0]);", "parent": 766, "children": [1126, 1127], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 36}}, {"id": 1126, "type": "primitive_type", "text": "double", "parent": 1125, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 10}}, {"id": 1127, "type": "init_declarator", "text": "*rhsQ = mxGetPr(plhs[0])", "parent": 1125, "children": [1128, 1131, 1132], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 35}}, {"id": 1128, "type": "pointer_declarator", "text": "*rhsQ", "parent": 1127, "children": [1129, 1130], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 16}}, {"id": 1129, "type": "*", "text": "*", "parent": 1128, "children": [], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 12}}, {"id": 1130, "type": "identifier", "text": "rhsQ", "parent": 1128, "children": [], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 16}}, {"id": 1131, "type": "=", "text": "=", "parent": 1127, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 18}}, {"id": 1132, "type": "call_expression", "text": "mxGetPr(plhs[0])", "parent": 1127, "children": [1133, 1134], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 35}}, {"id": 1133, "type": "identifier", "text": "mxGetPr", "parent": 1132, "children": [], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 26}}, {"id": 1134, "type": "argument_list", "text": "(plhs[0])", "parent": 1132, "children": [1135], "start_point": {"row": 173, "column": 26}, "end_point": {"row": 173, "column": 35}}, {"id": 1135, "type": "subscript_expression", "text": "plhs[0]", "parent": 1134, "children": [1136, 1137], "start_point": {"row": 173, "column": 27}, "end_point": {"row": 173, "column": 34}}, {"id": 1136, "type": "identifier", "text": "plhs", "parent": 1135, "children": [], "start_point": {"row": 173, "column": 27}, "end_point": {"row": 173, "column": 31}}, {"id": 1137, "type": "number_literal", "text": "0", "parent": 1135, "children": [], "start_point": {"row": 173, "column": 32}, "end_point": {"row": 173, "column": 33}}, {"id": 1138, "type": "declaration", "text": "double *vtemp = calloc(Np * K, sizeof(double));", "parent": 766, "children": [1139, 1140], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 51}}, {"id": 1139, "type": "primitive_type", "text": "double", "parent": 1138, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 10}}, {"id": 1140, "type": "init_declarator", "text": "*vtemp = calloc(Np * K, sizeof(double))", "parent": 1138, "children": [1141, 1144, 1145], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 50}}, {"id": 1141, "type": "pointer_declarator", "text": "*vtemp", "parent": 1140, "children": [1142, 1143], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 17}}, {"id": 1142, "type": "*", "text": "*", "parent": 1141, "children": [], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 12}}, {"id": 1143, "type": "identifier", "text": "vtemp", "parent": 1141, "children": [], "start_point": {"row": 175, "column": 12}, "end_point": {"row": 175, "column": 17}}, {"id": 1144, "type": "=", "text": "=", "parent": 1140, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 19}}, {"id": 1145, "type": "call_expression", "text": "calloc(Np * K, sizeof(double))", "parent": 1140, "children": [1146, 1147], "start_point": {"row": 175, "column": 20}, "end_point": {"row": 175, "column": 50}}, {"id": 1146, "type": "identifier", "text": "calloc", "parent": 1145, "children": [], "start_point": {"row": 175, "column": 20}, "end_point": {"row": 175, "column": 26}}, {"id": 1147, "type": "argument_list", "text": "(Np * K, sizeof(double))", "parent": 1145, "children": [1148, 1152], "start_point": {"row": 175, "column": 26}, "end_point": {"row": 175, "column": 50}}, {"id": 1148, "type": "binary_expression", "text": "Np * K", "parent": 1147, "children": [1149, 1150, 1151], "start_point": {"row": 175, "column": 27}, "end_point": {"row": 175, "column": 33}}, {"id": 1149, "type": "identifier", "text": "Np", "parent": 1148, "children": [], "start_point": {"row": 175, "column": 27}, "end_point": {"row": 175, "column": 29}}, {"id": 1150, "type": "*", "text": "*", "parent": 1148, "children": [], "start_point": {"row": 175, "column": 30}, "end_point": {"row": 175, "column": 31}}, {"id": 1151, "type": "identifier", "text": "K", "parent": 1148, "children": [], "start_point": {"row": 175, "column": 32}, "end_point": {"row": 175, "column": 33}}, {"id": 1152, "type": "sizeof_expression", "text": "sizeof(double)", "parent": 1147, "children": [1153], "start_point": {"row": 175, "column": 35}, "end_point": {"row": 175, "column": 49}}, {"id": 1153, "type": "type_descriptor", "text": "double", "parent": 1152, "children": [1154], "start_point": {"row": 175, "column": 42}, "end_point": {"row": 175, "column": 48}}, {"id": 1154, "type": "primitive_type", "text": "double", "parent": 1153, "children": [], "start_point": {"row": 175, "column": 42}, "end_point": {"row": 175, "column": 48}}, {"id": 1155, "type": "call_expression", "text": "inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp)", "parent": 766, "children": [1156, 1157], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 177, "column": 62}}, {"id": 1156, "type": "identifier", "text": "inner_fv_term", "parent": 1155, "children": [], "start_point": {"row": 176, "column": 4}, "end_point": {"row": 176, "column": 17}}, {"id": 1157, "type": "argument_list", "text": "(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp)", "parent": 1155, "children": [1158, 1159, 1160, 1161, 1162, 1163, 1167, 1168, 1169, 1170, 1171, 1172, 1173], "start_point": {"row": 176, "column": 17}, "end_point": {"row": 177, "column": 62}}, {"id": 1158, "type": "identifier", "text": "Np", "parent": 1157, "children": [], "start_point": {"row": 176, "column": 18}, "end_point": {"row": 176, "column": 20}}, {"id": 1159, "type": "identifier", "text": "K", "parent": 1157, "children": [], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 23}}, {"id": 1160, "type": "identifier", "text": "f_Q", "parent": 1157, "children": [], "start_point": {"row": 176, "column": 25}, "end_point": {"row": 176, "column": 28}}, {"id": 1161, "type": "identifier", "text": "u", "parent": 1157, "children": [], "start_point": {"row": 176, "column": 30}, "end_point": {"row": 176, "column": 31}}, {"id": 1162, "type": "identifier", "text": "v", "parent": 1157, "children": [], "start_point": {"row": 176, "column": 33}, "end_point": {"row": 176, "column": 34}}, {"id": 1163, "type": "cast_expression", "text": "(int)Nedge", "parent": 1157, "children": [1164, 1166], "start_point": {"row": 177, "column": 18}, "end_point": {"row": 177, "column": 28}}, {"id": 1164, "type": "type_descriptor", "text": "int", "parent": 1163, "children": [1165], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 22}}, {"id": 1165, "type": "primitive_type", "text": "int", "parent": 1164, "children": [], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 22}}, {"id": 1166, "type": "identifier", "text": "Nedge", "parent": 1163, "children": [], "start_point": {"row": 177, "column": 23}, "end_point": {"row": 177, "column": 28}}, {"id": 1167, "type": "identifier", "text": "v1", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 30}, "end_point": {"row": 177, "column": 32}}, {"id": 1168, "type": "identifier", "text": "v2", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 34}, "end_point": {"row": 177, "column": 36}}, {"id": 1169, "type": "identifier", "text": "nx", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 38}, "end_point": {"row": 177, "column": 40}}, {"id": 1170, "type": "identifier", "text": "ny", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 42}, "end_point": {"row": 177, "column": 44}}, {"id": 1171, "type": "identifier", "text": "ds", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 46}, "end_point": {"row": 177, "column": 48}}, {"id": 1172, "type": "identifier", "text": "EToR", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 50}, "end_point": {"row": 177, "column": 54}}, {"id": 1173, "type": "identifier", "text": "vtemp", "parent": 1157, "children": [], "start_point": {"row": 177, "column": 56}, "end_point": {"row": 177, "column": 61}}, {"id": 1174, "type": "call_expression", "text": "surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp)", "parent": 766, "children": [1175, 1176], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 180, "column": 73}}, {"id": 1175, "type": "identifier", "text": "surface_fv_term", "parent": 1174, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 19}}, {"id": 1176, "type": "argument_list", "text": "(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp)", "parent": 1174, "children": [1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192], "start_point": {"row": 179, "column": 19}, "end_point": {"row": 180, "column": 73}}, {"id": 1177, "type": "identifier", "text": "Np", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 20}, "end_point": {"row": 179, "column": 22}}, {"id": 1178, "type": "identifier", "text": "Nfp", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 24}, "end_point": {"row": 179, "column": 27}}, {"id": 1179, "type": "identifier", "text": "K", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 29}, "end_point": {"row": 179, "column": 30}}, {"id": 1180, "type": "identifier", "text": "f_Q", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 32}, "end_point": {"row": 179, "column": 35}}, {"id": 1181, "type": "identifier", "text": "f_extQ", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 37}, "end_point": {"row": 179, "column": 43}}, {"id": 1182, "type": "identifier", "text": "u", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 45}, "end_point": {"row": 179, "column": 46}}, {"id": 1183, "type": "identifier", "text": "v", "parent": 1176, "children": [], "start_point": {"row": 179, "column": 48}, "end_point": {"row": 179, "column": 49}}, {"id": 1184, "type": "identifier", "text": "EToR", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 20}, "end_point": {"row": 180, "column": 24}}, {"id": 1185, "type": "identifier", "text": "eidtype", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 26}, "end_point": {"row": 180, "column": 33}}, {"id": 1186, "type": "identifier", "text": "eidM", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 35}, "end_point": {"row": 180, "column": 39}}, {"id": 1187, "type": "identifier", "text": "eidP", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 41}, "end_point": {"row": 180, "column": 45}}, {"id": 1188, "type": "identifier", "text": "nxM", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 47}, "end_point": {"row": 180, "column": 50}}, {"id": 1189, "type": "identifier", "text": "nyM", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 52}, "end_point": {"row": 180, "column": 55}}, {"id": 1190, "type": "identifier", "text": "Js", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 57}, "end_point": {"row": 180, "column": 59}}, {"id": 1191, "type": "identifier", "text": "LIFT", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 61}, "end_point": {"row": 180, "column": 65}}, {"id": 1192, "type": "identifier", "text": "vtemp", "parent": 1176, "children": [], "start_point": {"row": 180, "column": 67}, "end_point": {"row": 180, "column": 72}}, {"id": 1193, "type": "call_expression", "text": "dvecd(Np * K, 1, vtemp, vol, rhsQ)", "parent": 766, "children": [1194, 1195], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 38}}, {"id": 1194, "type": "identifier", "text": "dvecd", "parent": 1193, "children": [], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 9}}, {"id": 1195, "type": "argument_list", "text": "(Np * K, 1, vtemp, vol, rhsQ)", "parent": 1193, "children": [1196, 1200, 1201, 1202, 1203], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 38}}, {"id": 1196, "type": "binary_expression", "text": "Np * K", "parent": 1195, "children": [1197, 1198, 1199], "start_point": {"row": 182, "column": 10}, "end_point": {"row": 182, "column": 16}}, {"id": 1197, "type": "identifier", "text": "Np", "parent": 1196, "children": [], "start_point": {"row": 182, "column": 10}, "end_point": {"row": 182, "column": 12}}, {"id": 1198, "type": "*", "text": "*", "parent": 1196, "children": [], "start_point": {"row": 182, "column": 13}, "end_point": {"row": 182, "column": 14}}, {"id": 1199, "type": "identifier", "text": "K", "parent": 1196, "children": [], "start_point": {"row": 182, "column": 15}, "end_point": {"row": 182, "column": 16}}, {"id": 1200, "type": "number_literal", "text": "1", "parent": 1195, "children": [], "start_point": {"row": 182, "column": 18}, "end_point": {"row": 182, "column": 19}}, {"id": 1201, "type": "identifier", "text": "vtemp", "parent": 1195, "children": [], "start_point": {"row": 182, "column": 21}, "end_point": {"row": 182, "column": 26}}, {"id": 1202, "type": "identifier", "text": "vol", "parent": 1195, "children": [], "start_point": {"row": 182, "column": 28}, "end_point": {"row": 182, "column": 31}}, {"id": 1203, "type": "identifier", "text": "rhsQ", "parent": 1195, "children": [], "start_point": {"row": 182, "column": 33}, "end_point": {"row": 182, "column": 37}}, {"id": 1204, "type": "call_expression", "text": "free(vtemp)", "parent": 766, "children": [1205, 1206], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 15}}, {"id": 1205, "type": "identifier", "text": "free", "parent": 1204, "children": [], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 8}}, {"id": 1206, "type": "argument_list", "text": "(vtemp)", "parent": 1204, "children": [1207], "start_point": {"row": 184, "column": 8}, "end_point": {"row": 184, "column": 15}}, {"id": 1207, "type": "identifier", "text": "vtemp", "parent": 1206, "children": [], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 14}}, {"id": 1208, "type": "return_statement", "text": "return;", "parent": 766, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 11}}]}, "node_categories": {"declarations": {"functions": [13, 15, 328, 330, 766, 768], "variables": [18, 21, 24, 29, 34, 39, 42, 47, 52, 57, 62, 67, 74, 87, 113, 135, 155, 175, 183, 191, 199, 275, 333, 336, 339, 342, 347, 352, 357, 362, 369, 376, 381, 386, 391, 396, 401, 406, 411, 414, 456, 478, 492, 506, 514, 522, 536, 544, 552, 561, 572, 575, 591, 625, 677, 705, 713, 719, 771, 774, 780, 783, 812, 825, 838, 851, 864, 875, 888, 901, 914, 927, 940, 953, 966, 979, 992, 1005, 1018, 1031, 1053, 1075, 1086, 1097, 1125, 1138], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [93, 97, 101, 102, 103, 106, 119, 128, 132, 140, 141, 142, 145, 149, 160, 161, 162, 165, 169, 180, 188, 196, 202, 205, 208, 211, 214, 219, 222, 226, 231, 235, 243, 256, 259, 263, 270, 283, 287, 290, 300, 304, 307, 312, 314, 315, 321, 421, 424, 428, 436, 440, 444, 445, 446, 449, 462, 471, 475, 483, 484, 487, 497, 498, 501, 511, 519, 527, 533, 541, 549, 558, 566, 569, 580, 589, 594, 603, 606, 610, 613, 620, 633, 637, 640, 650, 654, 657, 662, 664, 665, 671, 684, 687, 691, 694, 697, 733, 738, 740, 742, 744, 747, 750, 752, 755, 757, 761, 790, 791, 795, 802, 803, 807, 819, 822, 832, 835, 845, 848, 858, 861, 869, 872, 882, 885, 895, 898, 908, 911, 921, 924, 934, 937, 947, 950, 960, 963, 973, 976, 986, 989, 999, 1002, 1012, 1015, 1025, 1028, 1040, 1047, 1050, 1062, 1069, 1072, 1080, 1083, 1091, 1094, 1102, 1105, 1109, 1113, 1116, 1120, 1132, 1135, 1145, 1148, 1152, 1155, 1163, 1174, 1193, 1196, 1204], "assignments": [124, 221, 230, 279, 296, 432, 467, 555, 605, 629, 646, 1108], "loops": [86, 123, 278, 295, 431, 466, 628, 645], "conditionals": [11, 16, 20, 23, 28, 33, 38, 41, 46, 51, 56, 61, 66, 68, 73, 78, 79, 80, 81, 85, 90, 94, 96, 98, 100, 105, 107, 108, 110, 115, 117, 120, 122, 125, 129, 131, 133, 138, 146, 147, 150, 152, 158, 166, 167, 170, 172, 178, 181, 182, 186, 189, 190, 194, 197, 198, 201, 203, 206, 207, 209, 210, 212, 213, 215, 216, 217, 218, 220, 223, 224, 227, 229, 232, 233, 236, 238, 239, 240, 241, 244, 248, 249, 250, 251, 252, 253, 254, 255, 257, 258, 260, 261, 262, 264, 266, 267, 268, 271, 277, 280, 284, 286, 288, 291, 297, 301, 303, 305, 308, 313, 316, 318, 320, 322, 326, 331, 335, 338, 341, 346, 351, 356, 361, 363, 368, 370, 375, 380, 385, 390, 395, 400, 405, 410, 413, 419, 422, 425, 427, 433, 437, 439, 441, 443, 448, 450, 451, 453, 458, 460, 463, 465, 468, 472, 474, 476, 481, 488, 489, 495, 502, 503, 509, 512, 513, 517, 520, 521, 525, 528, 529, 531, 534, 535, 539, 542, 543, 547, 550, 551, 554, 556, 559, 560, 562, 564, 568, 570, 571, 574, 578, 581, 583, 584, 585, 586, 587, 588, 590, 593, 595, 597, 598, 599, 600, 601, 602, 604, 607, 608, 612, 614, 616, 617, 618, 621, 627, 630, 634, 636, 638, 641, 647, 651, 653, 655, 658, 663, 666, 668, 670, 672, 676, 682, 685, 688, 690, 695, 698, 700, 702, 703, 704, 710, 716, 720, 722, 724, 726, 728, 730, 732, 734, 736, 737, 739, 741, 743, 745, 746, 748, 749, 751, 753, 754, 756, 758, 760, 762, 764, 769, 773, 775, 779, 782, 784, 788, 789, 792, 796, 801, 804, 808, 817, 820, 823, 830, 833, 836, 843, 846, 849, 856, 859, 862, 867, 870, 873, 880, 883, 886, 893, 896, 899, 906, 909, 912, 919, 922, 925, 932, 935, 938, 945, 948, 951, 958, 961, 964, 971, 974, 977, 984, 987, 990, 997, 1000, 1003, 1010, 1013, 1016, 1023, 1026, 1029, 1032, 1038, 1042, 1048, 1051, 1054, 1060, 1064, 1070, 1073, 1078, 1081, 1084, 1089, 1092, 1095, 1100, 1103, 1106, 1110, 1114, 1118, 1119, 1122, 1123, 1124, 1130, 1133, 1136, 1143, 1146, 1149, 1151, 1156, 1158, 1159, 1160, 1161, 1162, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1175, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1194, 1197, 1199, 1201, 1202, 1203, 1205, 1207], "returns": [327, 765, 1208], "exceptions": []}, "expressions": {"calls": [82], "literals": [2, 5, 8, 92, 127, 154, 174, 246, 273, 282, 293, 299, 310, 324, 435, 470, 491, 505, 623, 632, 643, 649, 660, 674, 701, 712, 718, 794, 798, 799, 806, 810, 811, 824, 837, 850, 863, 874, 887, 900, 913, 926, 939, 952, 965, 978, 991, 1004, 1017, 1030, 1052, 1074, 1085, 1096, 1107, 1111, 1137, 1200], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 13, "universal_type": "function", "name": "inner_fv_term", "text_snippet": "void inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, dou"}, {"node_id": 15, "universal_type": "function", "name": "K,", "text_snippet": "inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *"}, {"node_id": 328, "universal_type": "function", "name": "surface_fv_term", "text_snippet": "void surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext,"}, {"node_id": 330, "universal_type": "function", "name": "unknown", "text_snippet": "surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, doub"}, {"node_id": 766, "universal_type": "function", "name": "mexFunction", "text_snippet": "void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])\n{\n /* check input */"}, {"node_id": 768, "universal_type": "function", "name": "nrhs,", "text_snippet": "mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"mex.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"blas.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"conv2d.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#include \"mex.h\"\n#include \"blas.h\"\n#include \"conv2d.h\"\n\n#define DEBUG 0\n\nvoid inner_fv_term(int Np, int K, double *h, double *u, double *v,\n int Nedge, double *v1, double *v2,\n double *nx, double *ny, double *ds,\n signed char *EToR, double *rhs)\n{\n#ifdef _OPENMP\n#pragma omp parallel for num_threads(DG_THREADS)\n#endif\n for (int k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int n, ind = k * Nedge;\n for (n = 0; n < Nedge; n++)\n {\n int n1 = (int)v1[n] + k*Np - 1; // change to C type\n int n2 = (int)v2[n] + k*Np - 1;\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double delta_s = ds[ind];\n\n double num_flux;\n upwind_flux(h[n1], h[n2], u[n1], v[n1], nx_, ny_, &num_flux);\n\n rhs[n1] -= num_flux * delta_s;\n rhs[n2] += num_flux * delta_s;\n#if DEBUG\n mexPrintf(\"k=%d, n=%d, n1=%d, n2=%d, nx=%e, ny=%e, delta=%e, flux=%e, rhs1=%e, rhs2=%e\\n\",\n k, n, n1, n2, nx_, ny_, delta_s, num_flux, rhs[n1], rhs[n2]);\n#endif\n ind++;\n }\n }\n\n#if DEBUG\n mexPrintf(\"inner_rhs = \\n\");\n int n;\n for (n = 0; n < Np; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", rhs[k * Np + n]);\n }\n mexPrintf(\"\\n\");\n }\n#endif\n return;\n}\n\nvoid surface_fv_term(size_t Np, size_t Nfp, size_t K,\n double *h, double *h_ext, double *u, double *v,\n signed char *EToR, signed char *eidtype,\n double *eidM, double *eidP,\n double *nx, double *ny, double *Js, double *LIFT,\n double *rhs)\n{\n\n int k;\n double *flux = calloc(Nfp * K, sizeof(double));\n // #ifdef _OPENMP\n // #pragma omp parallel for num_threads(DG_THREADS)\n // #endif\n for (k = 0; k < K; k++)\n {\n if ((cell_type)EToR[k] != REFINE)\n continue;\n\n int j, ind = k * Nfp;\n for (j = 0; j < Nfp; j++)\n {\n int iM = (int)eidM[ind] - 1; // change index to C type\n int iP = (int)eidP[ind] - 1;\n double f_M = h[iM]; // local and adjacent node values\n double hP = h[iP];\n double uM = u[iM], vM = v[iM];\n // outward normal vector of local element\n double nx_ = nx[ind];\n double ny_ = ny[ind];\n double f_ext; // external values on local nodes\n f_ext = h_ext[iM];\n bc_type type = (bc_type)eidtype[ind];\n // get adjacent values hP, qxP, qyP, considering\n // various boudnary conditions\n double f_P;\n int info = bound_cond(f_M, hP, f_ext, nx_, ny_, type, &f_P);\n // if(info) mexErrMsgTxt(\"Unknown boundary conditions.\");\n double numflux;\n upwind_flux(f_M, f_P, uM, vM, nx_, ny_, &numflux);\n\n flux[ind] = -numflux;\n ind++;\n }\n }\n#if DEBUG\n mexPrintf(\"flux = \\n\");\n int n;\n for (n = 0; n < Nfp; n++)\n {\n mexPrintf(\"\\t\");\n for (k = 0; k < K; k++)\n {\n mexPrintf(\"%e\\t\", flux[k * Nfp + n]);\n }\n mexPrintf(\"\\n\");\n }\n#endif\n double *stemp = calloc(Nfp * K, sizeof(double));\n dvecm(Nfp * K, 1, flux, Js, stemp);\n char *chn = \"N\";\n double one = 1.0;\n mwSignedIndex Np_ = Np, K_ = K, Nfp_ = Nfp;\n dgemm(chn, chn, &Np_, &K_, &Nfp_, &one, LIFT, &Np_, stemp, &Nfp_, &one, rhs, &Np_);\n free(flux);\n free(stemp);\n return;\n}\n\n/*\n * @brief calculate the sub-cell discretization by finite volume scheme.\n * Usages: \n * [ rhsQ ] = rhs_fv_term(f_Q, f_ext, u, v, Nedge, v1, v2, nx, ny, ds, ...\n * eidM, eidP, nxM, nyM, Js, LIFT, vol, ...\n * eidtype, EToR)\n */\nvoid mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])\n{\n /* check input */\n if (nrhs != 19)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:invalidNumInputs\",\n \"20 input required.\");\n }\n else if (nlhs > 1)\n {\n mexErrMsgIdAndTxt(\"MATLAB:rhs_fv_term:maxlhs\",\n \"Too many output arguments.\");\n }\n\n double *f_Q = mxGetPr(prhs[0]);\n double *f_extQ = mxGetPr(prhs[1]);\n double *u = mxGetPr(prhs[2]);\n double *v = mxGetPr(prhs[3]);\n double Nedge = mxGetScalar(prhs[4]);\n double *v1 = mxGetPr(prhs[5]);\n double *v2 = mxGetPr(prhs[6]);\n double *nx = mxGetPr(prhs[7]);\n double *ny = mxGetPr(prhs[8]);\n double *ds = mxGetPr(prhs[9]);\n double *eidM = mxGetPr(prhs[10]);\n double *eidP = mxGetPr(prhs[11]);\n double *nxM = mxGetPr(prhs[12]);\n double *nyM = mxGetPr(prhs[13]);\n double *Js = mxGetPr(prhs[14]);\n double *LIFT = mxGetPr(prhs[15]);\n double *vol = mxGetPr(prhs[16]);\n signed char *eidtype = (signed char *)mxGetData(prhs[17]);\n signed char *EToR = (signed char *)mxGetData(prhs[18]);\n\n /* get dimensions */\n size_t Np = mxGetM(prhs[0]);\n size_t K = mxGetN(prhs[0]);\n size_t Nfp = mxGetM(prhs[10]);\n\n /* allocate output array */\n plhs[0] = mxCreateDoubleMatrix((mwSize)Np, (mwSize)K, mxREAL);\n double *rhsQ = mxGetPr(plhs[0]);\n\n double *vtemp = calloc(Np * K, sizeof(double));\n inner_fv_term(Np, K, f_Q, u, v,\n (int)Nedge, v1, v2, nx, ny, ds, EToR, vtemp);\n\n surface_fv_term(Np, Nfp, K, f_Q, f_extQ, u, v,\n EToR, eidtype, eidM, eidP, nxM, nyM, Js, LIFT, vtemp);\n\n dvecd(Np * K, 1, vtemp, vol, rhsQ);\n\n free(vtemp);\n return;\n}"}
257
c
#pragma once #include <vector> #include "RuntimeLoader.h" #include "InterpreterCommon.h" namespace RolLang { class InterpreterStacktracer { struct StacktracerFrameInfo { RuntimeFunction* Function; std::size_t PC; std::size_t StackBase; NativeFunction Native; }; public: InterpreterStacktracer(RuntimeLoader* loader) : _loader(loader) { } public: void BeginFrameInterpreted(RuntimeFunction* func) { _stack.push_back({ func, 0, 0, nullptr }); } void EndFrameInterpreted() { _stack.pop_back(); } void BeginNativeFrame(RuntimeFunction* func, NativeFunction n) { _stack.push_back({ func, SIZE_MAX, 0, n }); } void EndNativeFrame() { _stack.pop_back(); } void SetReturnAddress(std::size_t pc, std::size_t stack) { _stack[_stack.size() - 1].PC = pc; _stack[_stack.size() - 1].StackBase = stack; } void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack) { *f = _stack.back().Function; *pc = _stack.back().PC; *stack = _stack.back().StackBase; } StacktraceInfo GetStacktrace() { StacktraceInfo ret; for (auto& f : _stack) { ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC }); } return std::move(ret); } private: RuntimeLoader* _loader; std::vector<StacktracerFrameInfo> _stack; }; }
20.05
61
(translation_unit) "#pragma once\n#include <vector>\n#include "RuntimeLoader.h"\n#include "InterpreterCommon.h"\n\nnamespace RolLang {\n\nclass InterpreterStacktracer\n{\n struct StacktracerFrameInfo\n {\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n };\n\npublic:\n InterpreterStacktracer(RuntimeLoader* loader)\n : _loader(loader)\n {\n }\n\npublic:\n void BeginFrameInterpreted(RuntimeFunction* func)\n {\n _stack.push_back({ func, 0, 0, nullptr });\n }\n\n void EndFrameInterpreted()\n {\n _stack.pop_back();\n }\n\n void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n {\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }\n\n void EndNativeFrame()\n {\n _stack.pop_back();\n }\n\n void SetReturnAddress(std::size_t pc, std::size_t stack)\n {\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }\n\n void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n {\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }\n\n StacktraceInfo GetStacktrace()\n {\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n};\n\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include "RuntimeLoader.h"\n" (#include) "#include" (string_literal) ""RuntimeLoader.h"" (") """ (string_content) "RuntimeLoader.h" (") """ (preproc_include) "#include "InterpreterCommon.h"\n" (#include) "#include" (string_literal) ""InterpreterCommon.h"" (") """ (string_content) "InterpreterCommon.h" (") """ (function_definition) "namespace RolLang {\n\nclass InterpreterStacktracer\n{\n struct StacktracerFrameInfo\n {\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n };\n\npublic:\n InterpreterStacktracer(RuntimeLoader* loader)\n : _loader(loader)\n {\n }\n\npublic:\n void BeginFrameInterpreted(RuntimeFunction* func)\n {\n _stack.push_back({ func, 0, 0, nullptr });\n }\n\n void EndFrameInterpreted()\n {\n _stack.pop_back();\n }\n\n void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n {\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }\n\n void EndNativeFrame()\n {\n _stack.pop_back();\n }\n\n void SetReturnAddress(std::size_t pc, std::size_t stack)\n {\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }\n\n void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n {\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }\n\n StacktraceInfo GetStacktrace()\n {\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n};\n\n}" (type_identifier) "namespace" (identifier) "RolLang" (compound_statement) "{\n\nclass InterpreterStacktracer\n{\n struct StacktracerFrameInfo\n {\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n };\n\npublic:\n InterpreterStacktracer(RuntimeLoader* loader)\n : _loader(loader)\n {\n }\n\npublic:\n void BeginFrameInterpreted(RuntimeFunction* func)\n {\n _stack.push_back({ func, 0, 0, nullptr });\n }\n\n void EndFrameInterpreted()\n {\n _stack.pop_back();\n }\n\n void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n {\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }\n\n void EndNativeFrame()\n {\n _stack.pop_back();\n }\n\n void SetReturnAddress(std::size_t pc, std::size_t stack)\n {\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }\n\n void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n {\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }\n\n StacktraceInfo GetStacktrace()\n {\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n};\n\n}" ({) "{" (function_definition) "class InterpreterStacktracer\n{\n struct StacktracerFrameInfo\n {\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n };\n\npublic:\n InterpreterStacktracer(RuntimeLoader* loader)\n : _loader(loader)\n {\n }\n\npublic:\n void BeginFrameInterpreted(RuntimeFunction* func)\n {\n _stack.push_back({ func, 0, 0, nullptr });\n }\n\n void EndFrameInterpreted()\n {\n _stack.pop_back();\n }\n\n void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n {\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }\n\n void EndNativeFrame()\n {\n _stack.pop_back();\n }\n\n void SetReturnAddress(std::size_t pc, std::size_t stack)\n {\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }\n\n void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n {\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }\n\n StacktraceInfo GetStacktrace()\n {\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n};\n\n}" (type_identifier) "class" (identifier) "InterpreterStacktracer" (compound_statement) "{\n struct StacktracerFrameInfo\n {\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n };\n\npublic:\n InterpreterStacktracer(RuntimeLoader* loader)\n : _loader(loader)\n {\n }\n\npublic:\n void BeginFrameInterpreted(RuntimeFunction* func)\n {\n _stack.push_back({ func, 0, 0, nullptr });\n }\n\n void EndFrameInterpreted()\n {\n _stack.pop_back();\n }\n\n void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n {\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }\n\n void EndNativeFrame()\n {\n _stack.pop_back();\n }\n\n void SetReturnAddress(std::size_t pc, std::size_t stack)\n {\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }\n\n void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n {\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }\n\n StacktraceInfo GetStacktrace()\n {\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n};\n\n}" ({) "{" (struct_specifier) "struct StacktracerFrameInfo\n {\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n }" (struct) "struct" (type_identifier) "StacktracerFrameInfo" (field_declaration_list) "{\n RuntimeFunction* Function;\n std::size_t PC;\n std::size_t StackBase;\n NativeFunction Native;\n }" ({) "{" (field_declaration) "RuntimeFunction* Function;" (type_identifier) "RuntimeFunction" (pointer_declarator) "* Function" (*) "*" (field_identifier) "Function" (;) ";" (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (field_declaration) "size_t PC;" (primitive_type) "size_t" (field_identifier) "PC" (;) ";" (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (field_declaration) "size_t StackBase;" (primitive_type) "size_t" (field_identifier) "StackBase" (;) ";" (field_declaration) "NativeFunction Native;" (type_identifier) "NativeFunction" (field_identifier) "Native" (;) ";" (}) "}" (;) ";" (labeled_statement) "public:\n InterpreterStacktracer(RuntimeLoader* loader)\n : _loader(loader)\n {\n }" (statement_identifier) "public" (ERROR) ":\n InterpreterStacktracer(RuntimeLoader* loader)" (:) ":" (call_expression) "InterpreterStacktracer(RuntimeLoader* loader)" (identifier) "InterpreterStacktracer" (argument_list) "(RuntimeLoader* loader)" (() "(" (binary_expression) "RuntimeLoader* loader" (identifier) "RuntimeLoader" (*) "*" (identifier) "loader" ()) ")" (:) ":" (ERROR) "_loader(loader)" (macro_type_specifier) "_loader(loader)" (identifier) "_loader" (() "(" (type_descriptor) "loader" (type_identifier) "loader" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (labeled_statement) "public:\n void BeginFrameInterpreted(RuntimeFunction* func)\n {\n _stack.push_back({ func, 0, 0, nullptr });\n }" (statement_identifier) "public" (:) ":" (ERROR) "void BeginFrameInterpreted(RuntimeFunction* func)" (primitive_type) "void" (function_declarator) "BeginFrameInterpreted(RuntimeFunction* func)" (identifier) "BeginFrameInterpreted" (parameter_list) "(RuntimeFunction* func)" (() "(" (parameter_declaration) "RuntimeFunction* func" (type_identifier) "RuntimeFunction" (pointer_declarator) "* func" (*) "*" (identifier) "func" ()) ")" (compound_statement) "{\n _stack.push_back({ func, 0, 0, nullptr });\n }" ({) "{" (expression_statement) "_stack.push_back({ func, 0, 0, nullptr });" (call_expression) "_stack.push_back({ func, 0, 0, nullptr })" (field_expression) "_stack.push_back" (identifier) "_stack" (.) "." (field_identifier) "push_back" (argument_list) "({ func, 0, 0, nullptr })" (() "(" (compound_statement) "{ func, 0, 0, nullptr }" ({) "{" (expression_statement) "func, 0, 0, nullptr" (comma_expression) "func, 0, 0, nullptr" (identifier) "func" (,) "," (comma_expression) "0, 0, nullptr" (number_literal) "0" (,) "," (comma_expression) "0, nullptr" (number_literal) "0" (,) "," (null) "nullptr" (nullptr) "nullptr" (;) "" (}) "}" ()) ")" (;) ";" (}) "}" (function_definition) "void EndFrameInterpreted()\n {\n _stack.pop_back();\n }" (primitive_type) "void" (function_declarator) "EndFrameInterpreted()" (identifier) "EndFrameInterpreted" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n _stack.pop_back();\n }" ({) "{" (expression_statement) "_stack.pop_back();" (call_expression) "_stack.pop_back()" (field_expression) "_stack.pop_back" (identifier) "_stack" (.) "." (field_identifier) "pop_back" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n {\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }" (primitive_type) "void" (function_declarator) "BeginNativeFrame(RuntimeFunction* func, NativeFunction n)" (identifier) "BeginNativeFrame" (parameter_list) "(RuntimeFunction* func, NativeFunction n)" (() "(" (parameter_declaration) "RuntimeFunction* func" (type_identifier) "RuntimeFunction" (pointer_declarator) "* func" (*) "*" (identifier) "func" (,) "," (parameter_declaration) "NativeFunction n" (type_identifier) "NativeFunction" (identifier) "n" ()) ")" (compound_statement) "{\n _stack.push_back({ func, SIZE_MAX, 0, n });\n }" ({) "{" (expression_statement) "_stack.push_back({ func, SIZE_MAX, 0, n });" (call_expression) "_stack.push_back({ func, SIZE_MAX, 0, n })" (field_expression) "_stack.push_back" (identifier) "_stack" (.) "." (field_identifier) "push_back" (argument_list) "({ func, SIZE_MAX, 0, n })" (() "(" (compound_statement) "{ func, SIZE_MAX, 0, n }" ({) "{" (expression_statement) "func, SIZE_MAX, 0, n" (comma_expression) "func, SIZE_MAX, 0, n" (identifier) "func" (,) "," (comma_expression) "SIZE_MAX, 0, n" (identifier) "SIZE_MAX" (,) "," (comma_expression) "0, n" (number_literal) "0" (,) "," (identifier) "n" (;) "" (}) "}" ()) ")" (;) ";" (}) "}" (function_definition) "void EndNativeFrame()\n {\n _stack.pop_back();\n }" (primitive_type) "void" (function_declarator) "EndNativeFrame()" (identifier) "EndNativeFrame" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n _stack.pop_back();\n }" ({) "{" (expression_statement) "_stack.pop_back();" (call_expression) "_stack.pop_back()" (field_expression) "_stack.pop_back" (identifier) "_stack" (.) "." (field_identifier) "pop_back" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void SetReturnAddress(std::size_t pc, std::size_t stack)\n {\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }" (primitive_type) "void" (function_declarator) "SetReturnAddress(std::size_t pc, std::size_t stack)" (identifier) "SetReturnAddress" (parameter_list) "(std::size_t pc, std::size_t stack)" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (parameter_declaration) "size_t pc" (primitive_type) "size_t" (identifier) "pc" (,) "," (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (parameter_declaration) "size_t stack" (primitive_type) "size_t" (identifier) "stack" ()) ")" (compound_statement) "{\n _stack[_stack.size() - 1].PC = pc;\n _stack[_stack.size() - 1].StackBase = stack;\n }" ({) "{" (expression_statement) "_stack[_stack.size() - 1].PC = pc;" (assignment_expression) "_stack[_stack.size() - 1].PC = pc" (field_expression) "_stack[_stack.size() - 1].PC" (subscript_expression) "_stack[_stack.size() - 1]" (identifier) "_stack" ([) "[" (binary_expression) "_stack.size() - 1" (call_expression) "_stack.size()" (field_expression) "_stack.size" (identifier) "_stack" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (-) "-" (number_literal) "1" (]) "]" (.) "." (field_identifier) "PC" (=) "=" (identifier) "pc" (;) ";" (expression_statement) "_stack[_stack.size() - 1].StackBase = stack;" (assignment_expression) "_stack[_stack.size() - 1].StackBase = stack" (field_expression) "_stack[_stack.size() - 1].StackBase" (subscript_expression) "_stack[_stack.size() - 1]" (identifier) "_stack" ([) "[" (binary_expression) "_stack.size() - 1" (call_expression) "_stack.size()" (field_expression) "_stack.size" (identifier) "_stack" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (-) "-" (number_literal) "1" (]) "]" (.) "." (field_identifier) "StackBase" (=) "=" (identifier) "stack" (;) ";" (}) "}" (function_definition) "void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n {\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }" (primitive_type) "void" (function_declarator) "GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)" (identifier) "GetReturnAddress" (parameter_list) "(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)" (() "(" (parameter_declaration) "RuntimeFunction** f" (type_identifier) "RuntimeFunction" (pointer_declarator) "** f" (*) "*" (pointer_declarator) "* f" (*) "*" (identifier) "f" (,) "," (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (parameter_declaration) "size_t* pc" (primitive_type) "size_t" (pointer_declarator) "* pc" (*) "*" (identifier) "pc" (,) "," (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (parameter_declaration) "size_t* stack" (primitive_type) "size_t" (pointer_declarator) "* stack" (*) "*" (identifier) "stack" ()) ")" (compound_statement) "{\n *f = _stack.back().Function;\n *pc = _stack.back().PC;\n *stack = _stack.back().StackBase;\n }" ({) "{" (expression_statement) "*f = _stack.back().Function;" (assignment_expression) "*f = _stack.back().Function" (pointer_expression) "*f" (*) "*" (identifier) "f" (=) "=" (field_expression) "_stack.back().Function" (call_expression) "_stack.back()" (field_expression) "_stack.back" (identifier) "_stack" (.) "." (field_identifier) "back" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "Function" (;) ";" (expression_statement) "*pc = _stack.back().PC;" (assignment_expression) "*pc = _stack.back().PC" (pointer_expression) "*pc" (*) "*" (identifier) "pc" (=) "=" (field_expression) "_stack.back().PC" (call_expression) "_stack.back()" (field_expression) "_stack.back" (identifier) "_stack" (.) "." (field_identifier) "back" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "PC" (;) ";" (expression_statement) "*stack = _stack.back().StackBase;" (assignment_expression) "*stack = _stack.back().StackBase" (pointer_expression) "*stack" (*) "*" (identifier) "stack" (=) "=" (field_expression) "_stack.back().StackBase" (call_expression) "_stack.back()" (field_expression) "_stack.back" (identifier) "_stack" (.) "." (field_identifier) "back" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "StackBase" (;) ";" (}) "}" (function_definition) "StacktraceInfo GetStacktrace()\n {\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n}" (type_identifier) "StacktraceInfo" (function_declarator) "GetStacktrace()" (identifier) "GetStacktrace" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n StacktraceInfo ret;\n for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;\n}" ({) "{" (declaration) "StacktraceInfo ret;" (type_identifier) "StacktraceInfo" (identifier) "ret" (;) ";" (ERROR) "for (auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n }\n return std::move(ret);\n }\n\nprivate:\n RuntimeLoader* _loader;\n std::vector<StacktracerFrameInfo> _stack;" (for) "for" (() "(" (declaration) "auto& f : _stack)\n {\n ret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });" (storage_class_specifier) "auto" (auto) "auto" (ERROR) "&" (&) "&" (type_identifier) "f" (ERROR) ": _stack)\n {\n ret." (:) ":" (identifier) "_stack" ()) ")" ({) "{" (identifier) "ret" (.) "." (function_declarator) "push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC })" (identifier) "push_back" (parameter_list) "({ f.Function->Args.ConvertToSymbol(_loader), f.PC })" (() "(" (compound_statement) "{ f.Function->Args.ConvertToSymbol(_loader), f.PC }" ({) "{" (expression_statement) "f.Function->Args.ConvertToSymbol(_loader), f.PC" (comma_expression) "f.Function->Args.ConvertToSymbol(_loader), f.PC" (call_expression) "f.Function->Args.ConvertToSymbol(_loader)" (field_expression) "f.Function->Args.ConvertToSymbol" (field_expression) "f.Function->Args" (field_expression) "f.Function" (identifier) "f" (.) "." (field_identifier) "Function" (->) "->" (field_identifier) "Args" (.) "." (field_identifier) "ConvertToSymbol" (argument_list) "(_loader)" (() "(" (identifier) "_loader" ()) ")" (,) "," (field_expression) "f.PC" (identifier) "f" (.) "." (field_identifier) "PC" (;) "" (}) "}" ()) ")" (;) ";" (ERROR) "}\n return std::" (}) "}" (return) "return" (identifier) "std" (:) ":" (:) ":" (call_expression) "move(ret)" (identifier) "move" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" (;) ";" (ERROR) "}\n\nprivate:\n RuntimeLoader* _loader;\n std::" (}) "}" (identifier) "private" (:) ":" (binary_expression) "RuntimeLoader* _loader" (identifier) "RuntimeLoader" (*) "*" (identifier) "_loader" (;) ";" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<StacktracerFrameInfo> _stack" (binary_expression) "vector<StacktracerFrameInfo" (identifier) "vector" (<) "<" (identifier) "StacktracerFrameInfo" (>) ">" (identifier) "_stack" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) ""
475
14
{"language": "c", "success": true, "metadata": {"lines": 61, "avg_line_length": 20.05, "nodes": 280, "errors": 0, "source_hash": "55565dd52a06fdaba1a7529e63a04d4d12c924e088e11c8bdfd4dc90f9f9df57", "categorized_nodes": 199}, "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 <vector>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<vector>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include \"RuntimeLoader.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": "\"RuntimeLoader.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 26}}, {"id": 9, "type": "preproc_include", "text": "#include \"InterpreterCommon.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"InterpreterCommon.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 30}}, {"id": 12, "type": "function_definition", "text": "namespace RolLang {\n\nclass InterpreterStacktracer\n{\n\tstruct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunction* Function;\n\t\tstd::size_t PC;\n\t\tstd::size_t StackBase;\n\t\tNativeFunction Native;\n\t};\n\npublic:\n\tInterpreterStacktracer(RuntimeLoader* loader)\n\t\t: _loader(loader)\n\t{\n\t}\n\npublic:\n\tvoid BeginFrameInterpreted(RuntimeFunction* func)\n\t{\n\t\t_stack.push_back({ func, 0, 0, nullptr });\n\t}\n\n\tvoid EndFrameInterpreted()\n\t{\n\t\t_stack.pop_back();\n\t}\n\n\tvoid BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n\t{\n\t\t_stack.push_back({ func, SIZE_MAX, 0, n });\n\t}\n\n\tvoid EndNativeFrame()\n\t{\n\t\t_stack.pop_back();\n\t}\n\n\tvoid SetReturnAddress(std::size_t pc, std::size_t stack)\n\t{\n\t\t_stack[_stack.size() - 1].PC = pc;\n\t\t_stack[_stack.size() - 1].StackBase = stack;\n\t}\n\n\tvoid GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n\t{\n\t\t*f = _stack.back().Function;\n\t\t*pc = _stack.back().PC;\n\t\t*stack = _stack.back().StackBase;\n\t}\n\n\tStacktraceInfo GetStacktrace()\n\t{\n\t\tStacktraceInfo ret;\n\t\tfor (auto& f : _stack)\n\t\t{\n\t\t\tret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n\t\t}\n\t\treturn std::move(ret);\n\t}\n\nprivate:\n\tRuntimeLoader* _loader;\n\tstd::vector<StacktracerFrameInfo> _stack;\n};\n\n}", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 72, "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": "RolLang", "parent": 12, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 17}}, {"id": 15, "type": "function_definition", "text": "class InterpreterStacktracer\n{\n\tstruct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunction* Function;\n\t\tstd::size_t PC;\n\t\tstd::size_t StackBase;\n\t\tNativeFunction Native;\n\t};\n\npublic:\n\tInterpreterStacktracer(RuntimeLoader* loader)\n\t\t: _loader(loader)\n\t{\n\t}\n\npublic:\n\tvoid BeginFrameInterpreted(RuntimeFunction* func)\n\t{\n\t\t_stack.push_back({ func, 0, 0, nullptr });\n\t}\n\n\tvoid EndFrameInterpreted()\n\t{\n\t\t_stack.pop_back();\n\t}\n\n\tvoid BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n\t{\n\t\t_stack.push_back({ func, SIZE_MAX, 0, n });\n\t}\n\n\tvoid EndNativeFrame()\n\t{\n\t\t_stack.pop_back();\n\t}\n\n\tvoid SetReturnAddress(std::size_t pc, std::size_t stack)\n\t{\n\t\t_stack[_stack.size() - 1].PC = pc;\n\t\t_stack[_stack.size() - 1].StackBase = stack;\n\t}\n\n\tvoid GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n\t{\n\t\t*f = _stack.back().Function;\n\t\t*pc = _stack.back().PC;\n\t\t*stack = _stack.back().StackBase;\n\t}\n\n\tStacktraceInfo GetStacktrace()\n\t{\n\t\tStacktraceInfo ret;\n\t\tfor (auto& f : _stack)\n\t\t{\n\t\t\tret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n\t\t}\n\t\treturn std::move(ret);\n\t}\n\nprivate:\n\tRuntimeLoader* _loader;\n\tstd::vector<StacktracerFrameInfo> _stack;\n};\n\n}", "parent": 12, "children": [16], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 16, "type": "identifier", "text": "InterpreterStacktracer", "parent": 15, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 28}}, {"id": 17, "type": "struct_specifier", "text": "struct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunction* Function;\n\t\tstd::size_t PC;\n\t\tstd::size_t StackBase;\n\t\tNativeFunction Native;\n\t}", "parent": 15, "children": [18, 19], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 15, "column": 2}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 7}}, {"id": 19, "type": "type_identifier", "text": "StacktracerFrameInfo", "parent": 17, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 28}}, {"id": 20, "type": "field_declaration", "text": "RuntimeFunction* Function;", "parent": 17, "children": [21, 22], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 28}}, {"id": 21, "type": "type_identifier", "text": "RuntimeFunction", "parent": 20, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 17}}, {"id": 22, "type": "pointer_declarator", "text": "* Function", "parent": 20, "children": [23, 24], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 27}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 24, "type": "field_identifier", "text": "Function", "parent": 22, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 27}}, {"id": 25, "type": "ERROR", "text": "std::", "parent": 17, "children": [26], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 7}}, {"id": 26, "type": "type_identifier", "text": "std", "parent": 25, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 5}}, {"id": 27, "type": "field_declaration", "text": "size_t PC;", "parent": 17, "children": [28, 29], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 17}}, {"id": 28, "type": "primitive_type", "text": "size_t", "parent": 27, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 13}}, {"id": 29, "type": "field_identifier", "text": "PC", "parent": 27, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 16}}, {"id": 30, "type": "ERROR", "text": "std::", "parent": 17, "children": [31], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 7}}, {"id": 31, "type": "type_identifier", "text": "std", "parent": 30, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 5}}, {"id": 32, "type": "field_declaration", "text": "size_t StackBase;", "parent": 17, "children": [33, 34], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 24}}, {"id": 33, "type": "primitive_type", "text": "size_t", "parent": 32, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 13}}, {"id": 34, "type": "field_identifier", "text": "StackBase", "parent": 32, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 23}}, {"id": 35, "type": "field_declaration", "text": "NativeFunction Native;", "parent": 17, "children": [36, 37], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 24}}, {"id": 36, "type": "type_identifier", "text": "NativeFunction", "parent": 35, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 16}}, {"id": 37, "type": "field_identifier", "text": "Native", "parent": 35, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 23}}, {"id": 38, "type": "labeled_statement", "text": "public:\n\tInterpreterStacktracer(RuntimeLoader* loader)\n\t\t: _loader(loader)\n\t{\n\t}", "parent": 15, "children": [39, 47], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 21, "column": 2}}, {"id": 39, "type": "ERROR", "text": ":\n\tInterpreterStacktracer(RuntimeLoader* loader)", "parent": 38, "children": [40], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 18, "column": 46}}, {"id": 40, "type": "call_expression", "text": "InterpreterStacktracer(RuntimeLoader* loader)", "parent": 39, "children": [41, 42], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 46}}, {"id": 41, "type": "identifier", "text": "InterpreterStacktracer", "parent": 40, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 23}}, {"id": 42, "type": "argument_list", "text": "(RuntimeLoader* loader)", "parent": 40, "children": [43], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 46}}, {"id": 43, "type": "binary_expression", "text": "RuntimeLoader* loader", "parent": 42, "children": [44, 45, 46], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 45}}, {"id": 44, "type": "identifier", "text": "RuntimeLoader", "parent": 43, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 37}}, {"id": 45, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 38}}, {"id": 46, "type": "identifier", "text": "loader", "parent": 43, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 45}}, {"id": 47, "type": "ERROR", "text": "_loader(loader)", "parent": 38, "children": [48], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 19}}, {"id": 48, "type": "macro_type_specifier", "text": "_loader(loader)", "parent": 47, "children": [49, 50], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 19}}, {"id": 49, "type": "identifier", "text": "_loader", "parent": 48, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 11}}, {"id": 50, "type": "type_descriptor", "text": "loader", "parent": 48, "children": [51], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 18}}, {"id": 51, "type": "type_identifier", "text": "loader", "parent": 50, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 18}}, {"id": 52, "type": "labeled_statement", "text": "public:\n\tvoid BeginFrameInterpreted(RuntimeFunction* func)\n\t{\n\t\t_stack.push_back({ func, 0, 0, nullptr });\n\t}", "parent": 15, "children": [53], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 27, "column": 2}}, {"id": 53, "type": "ERROR", "text": "void BeginFrameInterpreted(RuntimeFunction* func)", "parent": 52, "children": [54, 55], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 50}}, {"id": 54, "type": "primitive_type", "text": "void", "parent": 53, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 55, "type": "function_declarator", "text": "BeginFrameInterpreted(RuntimeFunction* func)", "parent": 53, "children": [56, 57], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 50}}, {"id": 56, "type": "identifier", "text": "BeginFrameInterpreted", "parent": 55, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 27}}, {"id": 57, "type": "parameter_list", "text": "(RuntimeFunction* func)", "parent": 55, "children": [58], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 50}}, {"id": 58, "type": "parameter_declaration", "text": "RuntimeFunction* func", "parent": 57, "children": [59, 60], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 49}}, {"id": 59, "type": "type_identifier", "text": "RuntimeFunction", "parent": 58, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 43}}, {"id": 60, "type": "pointer_declarator", "text": "* func", "parent": 58, "children": [61, 62], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 49}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 44}}, {"id": 62, "type": "identifier", "text": "func", "parent": 60, "children": [], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 49}}, {"id": 63, "type": "call_expression", "text": "_stack.push_back({ func, 0, 0, nullptr })", "parent": 52, "children": [64, 67], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 43}}, {"id": 64, "type": "field_expression", "text": "_stack.push_back", "parent": 63, "children": [65, 66], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 18}}, {"id": 65, "type": "identifier", "text": "_stack", "parent": 64, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 8}}, {"id": 66, "type": "field_identifier", "text": "push_back", "parent": 64, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 18}}, {"id": 67, "type": "argument_list", "text": "({ func, 0, 0, nullptr })", "parent": 63, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 43}}, {"id": 68, "type": "comma_expression", "text": "func, 0, 0, nullptr", "parent": 67, "children": [69, 70], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 40}}, {"id": 69, "type": "identifier", "text": "func", "parent": 68, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 25}}, {"id": 70, "type": "comma_expression", "text": "0, 0, nullptr", "parent": 68, "children": [71, 72], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 40}}, {"id": 71, "type": "number_literal", "text": "0", "parent": 70, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 28}}, {"id": 72, "type": "comma_expression", "text": "0, nullptr", "parent": 70, "children": [73, 74], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 40}}, {"id": 73, "type": "number_literal", "text": "0", "parent": 72, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 31}}, {"id": 74, "type": "null", "text": "nullptr", "parent": 72, "children": [75], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 40}}, {"id": 75, "type": "nullptr", "text": "nullptr", "parent": 74, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 40}}, {"id": 76, "type": "function_definition", "text": "void EndFrameInterpreted()\n\t{\n\t\t_stack.pop_back();\n\t}", "parent": 15, "children": [77, 78], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 32, "column": 2}}, {"id": 77, "type": "primitive_type", "text": "void", "parent": 76, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 78, "type": "function_declarator", "text": "EndFrameInterpreted()", "parent": 76, "children": [79, 80], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 27}}, {"id": 79, "type": "identifier", "text": "EndFrameInterpreted", "parent": 78, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 25}}, {"id": 80, "type": "parameter_list", "text": "()", "parent": 78, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 27}}, {"id": 81, "type": "call_expression", "text": "_stack.pop_back()", "parent": 76, "children": [82, 85], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 19}}, {"id": 82, "type": "field_expression", "text": "_stack.pop_back", "parent": 81, "children": [83, 84], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 17}}, {"id": 83, "type": "identifier", "text": "_stack", "parent": 82, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 8}}, {"id": 84, "type": "field_identifier", "text": "pop_back", "parent": 82, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 17}}, {"id": 85, "type": "argument_list", "text": "()", "parent": 81, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 19}}, {"id": 86, "type": "function_definition", "text": "void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n\t{\n\t\t_stack.push_back({ func, SIZE_MAX, 0, n });\n\t}", "parent": 15, "children": [87, 88], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 37, "column": 2}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 5}}, {"id": 88, "type": "function_declarator", "text": "BeginNativeFrame(RuntimeFunction* func, NativeFunction n)", "parent": 86, "children": [89, 90], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 63}}, {"id": 89, "type": "identifier", "text": "BeginNativeFrame", "parent": 88, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 22}}, {"id": 90, "type": "parameter_list", "text": "(RuntimeFunction* func, NativeFunction n)", "parent": 88, "children": [91, 96], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 63}}, {"id": 91, "type": "parameter_declaration", "text": "RuntimeFunction* func", "parent": 90, "children": [92, 93], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 44}}, {"id": 92, "type": "type_identifier", "text": "RuntimeFunction", "parent": 91, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 38}}, {"id": 93, "type": "pointer_declarator", "text": "* func", "parent": 91, "children": [94, 95], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 44}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 39}}, {"id": 95, "type": "identifier", "text": "func", "parent": 93, "children": [], "start_point": {"row": 34, "column": 40}, "end_point": {"row": 34, "column": 44}}, {"id": 96, "type": "parameter_declaration", "text": "NativeFunction n", "parent": 90, "children": [97, 98], "start_point": {"row": 34, "column": 46}, "end_point": {"row": 34, "column": 62}}, {"id": 97, "type": "type_identifier", "text": "NativeFunction", "parent": 96, "children": [], "start_point": {"row": 34, "column": 46}, "end_point": {"row": 34, "column": 60}}, {"id": 98, "type": "identifier", "text": "n", "parent": 96, "children": [], "start_point": {"row": 34, "column": 61}, "end_point": {"row": 34, "column": 62}}, {"id": 99, "type": "call_expression", "text": "_stack.push_back({ func, SIZE_MAX, 0, n })", "parent": 86, "children": [100, 103], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 44}}, {"id": 100, "type": "field_expression", "text": "_stack.push_back", "parent": 99, "children": [101, 102], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 18}}, {"id": 101, "type": "identifier", "text": "_stack", "parent": 100, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 8}}, {"id": 102, "type": "field_identifier", "text": "push_back", "parent": 100, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 18}}, {"id": 103, "type": "argument_list", "text": "({ func, SIZE_MAX, 0, n })", "parent": 99, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 44}}, {"id": 104, "type": "comma_expression", "text": "func, SIZE_MAX, 0, n", "parent": 103, "children": [105, 106], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 41}}, {"id": 105, "type": "identifier", "text": "func", "parent": 104, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 25}}, {"id": 106, "type": "comma_expression", "text": "SIZE_MAX, 0, n", "parent": 104, "children": [107, 108], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 41}}, {"id": 107, "type": "identifier", "text": "SIZE_MAX", "parent": 106, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 35}}, {"id": 108, "type": "comma_expression", "text": "0, n", "parent": 106, "children": [109, 110], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 41}}, {"id": 109, "type": "number_literal", "text": "0", "parent": 108, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 38}}, {"id": 110, "type": "identifier", "text": "n", "parent": 108, "children": [], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 41}}, {"id": 111, "type": "function_definition", "text": "void EndNativeFrame()\n\t{\n\t\t_stack.pop_back();\n\t}", "parent": 15, "children": [112, 113], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 42, "column": 2}}, {"id": 112, "type": "primitive_type", "text": "void", "parent": 111, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 113, "type": "function_declarator", "text": "EndNativeFrame()", "parent": 111, "children": [114, 115], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 22}}, {"id": 114, "type": "identifier", "text": "EndNativeFrame", "parent": 113, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 20}}, {"id": 115, "type": "parameter_list", "text": "()", "parent": 113, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 22}}, {"id": 116, "type": "call_expression", "text": "_stack.pop_back()", "parent": 111, "children": [117, 120], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 19}}, {"id": 117, "type": "field_expression", "text": "_stack.pop_back", "parent": 116, "children": [118, 119], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 17}}, {"id": 118, "type": "identifier", "text": "_stack", "parent": 117, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 8}}, {"id": 119, "type": "field_identifier", "text": "pop_back", "parent": 117, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 17}}, {"id": 120, "type": "argument_list", "text": "()", "parent": 116, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 19}}, {"id": 121, "type": "function_definition", "text": "void SetReturnAddress(std::size_t pc, std::size_t stack)\n\t{\n\t\t_stack[_stack.size() - 1].PC = pc;\n\t\t_stack[_stack.size() - 1].StackBase = stack;\n\t}", "parent": 15, "children": [122, 123], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 48, "column": 2}}, {"id": 122, "type": "primitive_type", "text": "void", "parent": 121, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 123, "type": "function_declarator", "text": "SetReturnAddress(std::size_t pc, std::size_t stack)", "parent": 121, "children": [124, 125], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 57}}, {"id": 124, "type": "identifier", "text": "SetReturnAddress", "parent": 123, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 22}}, {"id": 125, "type": "parameter_list", "text": "(std::size_t pc, std::size_t stack)", "parent": 123, "children": [126, 128, 131, 133], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 57}}, {"id": 126, "type": "ERROR", "text": "std::", "parent": 125, "children": [127], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 28}}, {"id": 127, "type": "identifier", "text": "std", "parent": 126, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 26}}, {"id": 128, "type": "parameter_declaration", "text": "size_t pc", "parent": 125, "children": [129, 130], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 37}}, {"id": 129, "type": "primitive_type", "text": "size_t", "parent": 128, "children": [], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 34}}, {"id": 130, "type": "identifier", "text": "pc", "parent": 128, "children": [], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 37}}, {"id": 131, "type": "ERROR", "text": "std::", "parent": 125, "children": [132], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 44}}, {"id": 132, "type": "type_identifier", "text": "std", "parent": 131, "children": [], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 42}}, {"id": 133, "type": "parameter_declaration", "text": "size_t stack", "parent": 125, "children": [134, 135], "start_point": {"row": 44, "column": 44}, "end_point": {"row": 44, "column": 56}}, {"id": 134, "type": "primitive_type", "text": "size_t", "parent": 133, "children": [], "start_point": {"row": 44, "column": 44}, "end_point": {"row": 44, "column": 50}}, {"id": 135, "type": "identifier", "text": "stack", "parent": 133, "children": [], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 56}}, {"id": 136, "type": "assignment_expression", "text": "_stack[_stack.size() - 1].PC = pc", "parent": 121, "children": [137, 149, 150], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 35}}, {"id": 137, "type": "field_expression", "text": "_stack[_stack.size() - 1].PC", "parent": 136, "children": [138, 148], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 30}}, {"id": 138, "type": "subscript_expression", "text": "_stack[_stack.size() - 1]", "parent": 137, "children": [139, 140], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 27}}, {"id": 139, "type": "identifier", "text": "_stack", "parent": 138, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 8}}, {"id": 140, "type": "binary_expression", "text": "_stack.size() - 1", "parent": 138, "children": [141, 146, 147], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 26}}, {"id": 141, "type": "call_expression", "text": "_stack.size()", "parent": 140, "children": [142, 145], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 22}}, {"id": 142, "type": "field_expression", "text": "_stack.size", "parent": 141, "children": [143, 144], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 20}}, {"id": 143, "type": "identifier", "text": "_stack", "parent": 142, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 15}}, {"id": 144, "type": "field_identifier", "text": "size", "parent": 142, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 20}}, {"id": 145, "type": "argument_list", "text": "()", "parent": 141, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 22}}, {"id": 146, "type": "-", "text": "-", "parent": 140, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 24}}, {"id": 147, "type": "number_literal", "text": "1", "parent": 140, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 26}}, {"id": 148, "type": "field_identifier", "text": "PC", "parent": 137, "children": [], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 30}}, {"id": 149, "type": "=", "text": "=", "parent": 136, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 32}}, {"id": 150, "type": "identifier", "text": "pc", "parent": 136, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 35}}, {"id": 151, "type": "assignment_expression", "text": "_stack[_stack.size() - 1].StackBase = stack", "parent": 121, "children": [152, 164, 165], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 45}}, {"id": 152, "type": "field_expression", "text": "_stack[_stack.size() - 1].StackBase", "parent": 151, "children": [153, 163], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 37}}, {"id": 153, "type": "subscript_expression", "text": "_stack[_stack.size() - 1]", "parent": 152, "children": [154, 155], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 27}}, {"id": 154, "type": "identifier", "text": "_stack", "parent": 153, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 8}}, {"id": 155, "type": "binary_expression", "text": "_stack.size() - 1", "parent": 153, "children": [156, 161, 162], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 26}}, {"id": 156, "type": "call_expression", "text": "_stack.size()", "parent": 155, "children": [157, 160], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 22}}, {"id": 157, "type": "field_expression", "text": "_stack.size", "parent": 156, "children": [158, 159], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 20}}, {"id": 158, "type": "identifier", "text": "_stack", "parent": 157, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 15}}, {"id": 159, "type": "field_identifier", "text": "size", "parent": 157, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 20}}, {"id": 160, "type": "argument_list", "text": "()", "parent": 156, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 22}}, {"id": 161, "type": "-", "text": "-", "parent": 155, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 24}}, {"id": 162, "type": "number_literal", "text": "1", "parent": 155, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 26}}, {"id": 163, "type": "field_identifier", "text": "StackBase", "parent": 152, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 37}}, {"id": 164, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 39}}, {"id": 165, "type": "identifier", "text": "stack", "parent": 151, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 45}}, {"id": 166, "type": "function_definition", "text": "void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n\t{\n\t\t*f = _stack.back().Function;\n\t\t*pc = _stack.back().PC;\n\t\t*stack = _stack.back().StackBase;\n\t}", "parent": 15, "children": [167, 168], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 55, "column": 2}}, {"id": 167, "type": "primitive_type", "text": "void", "parent": 166, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 5}}, {"id": 168, "type": "function_declarator", "text": "GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)", "parent": 166, "children": [169, 170], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 80}}, {"id": 169, "type": "identifier", "text": "GetReturnAddress", "parent": 168, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 22}}, {"id": 170, "type": "parameter_list", "text": "(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)", "parent": 168, "children": [171, 178, 180, 185, 187], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 80}}, {"id": 171, "type": "parameter_declaration", "text": "RuntimeFunction** f", "parent": 170, "children": [172, 173], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 42}}, {"id": 172, "type": "type_identifier", "text": "RuntimeFunction", "parent": 171, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 38}}, {"id": 173, "type": "pointer_declarator", "text": "** f", "parent": 171, "children": [174, 175], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 42}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 39}}, {"id": 175, "type": "pointer_declarator", "text": "* f", "parent": 173, "children": [176, 177], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 42}}, {"id": 176, "type": "*", "text": "*", "parent": 175, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 177, "type": "identifier", "text": "f", "parent": 175, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 42}}, {"id": 178, "type": "ERROR", "text": "std::", "parent": 170, "children": [179], "start_point": {"row": 50, "column": 44}, "end_point": {"row": 50, "column": 49}}, {"id": 179, "type": "type_identifier", "text": "std", "parent": 178, "children": [], "start_point": {"row": 50, "column": 44}, "end_point": {"row": 50, "column": 47}}, {"id": 180, "type": "parameter_declaration", "text": "size_t* pc", "parent": 170, "children": [181, 182], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 59}}, {"id": 181, "type": "primitive_type", "text": "size_t", "parent": 180, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 55}}, {"id": 182, "type": "pointer_declarator", "text": "* pc", "parent": 180, "children": [183, 184], "start_point": {"row": 50, "column": 55}, "end_point": {"row": 50, "column": 59}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 50, "column": 55}, "end_point": {"row": 50, "column": 56}}, {"id": 184, "type": "identifier", "text": "pc", "parent": 182, "children": [], "start_point": {"row": 50, "column": 57}, "end_point": {"row": 50, "column": 59}}, {"id": 185, "type": "ERROR", "text": "std::", "parent": 170, "children": [186], "start_point": {"row": 50, "column": 61}, "end_point": {"row": 50, "column": 66}}, {"id": 186, "type": "type_identifier", "text": "std", "parent": 185, "children": [], "start_point": {"row": 50, "column": 61}, "end_point": {"row": 50, "column": 64}}, {"id": 187, "type": "parameter_declaration", "text": "size_t* stack", "parent": 170, "children": [188, 189], "start_point": {"row": 50, "column": 66}, "end_point": {"row": 50, "column": 79}}, {"id": 188, "type": "primitive_type", "text": "size_t", "parent": 187, "children": [], "start_point": {"row": 50, "column": 66}, "end_point": {"row": 50, "column": 72}}, {"id": 189, "type": "pointer_declarator", "text": "* stack", "parent": 187, "children": [190, 191], "start_point": {"row": 50, "column": 72}, "end_point": {"row": 50, "column": 79}}, {"id": 190, "type": "*", "text": "*", "parent": 189, "children": [], "start_point": {"row": 50, "column": 72}, "end_point": {"row": 50, "column": 73}}, {"id": 191, "type": "identifier", "text": "stack", "parent": 189, "children": [], "start_point": {"row": 50, "column": 74}, "end_point": {"row": 50, "column": 79}}, {"id": 192, "type": "assignment_expression", "text": "*f = _stack.back().Function", "parent": 166, "children": [193, 196, 197], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 29}}, {"id": 193, "type": "pointer_expression", "text": "*f", "parent": 192, "children": [194, 195], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 4}}, {"id": 194, "type": "*", "text": "*", "parent": 193, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 3}}, {"id": 195, "type": "identifier", "text": "f", "parent": 193, "children": [], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 52, "column": 4}}, {"id": 196, "type": "=", "text": "=", "parent": 192, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 6}}, {"id": 197, "type": "field_expression", "text": "_stack.back().Function", "parent": 192, "children": [198, 203], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 29}}, {"id": 198, "type": "call_expression", "text": "_stack.back()", "parent": 197, "children": [199, 202], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 20}}, {"id": 199, "type": "field_expression", "text": "_stack.back", "parent": 198, "children": [200, 201], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 18}}, {"id": 200, "type": "identifier", "text": "_stack", "parent": 199, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 13}}, {"id": 201, "type": "field_identifier", "text": "back", "parent": 199, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 18}}, {"id": 202, "type": "argument_list", "text": "()", "parent": 198, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 20}}, {"id": 203, "type": "field_identifier", "text": "Function", "parent": 197, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 29}}, {"id": 204, "type": "assignment_expression", "text": "*pc = _stack.back().PC", "parent": 166, "children": [205, 208, 209], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 24}}, {"id": 205, "type": "pointer_expression", "text": "*pc", "parent": 204, "children": [206, 207], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 5}}, {"id": 206, "type": "*", "text": "*", "parent": 205, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 3}}, {"id": 207, "type": "identifier", "text": "pc", "parent": 205, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 5}}, {"id": 208, "type": "=", "text": "=", "parent": 204, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 7}}, {"id": 209, "type": "field_expression", "text": "_stack.back().PC", "parent": 204, "children": [210, 215], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 24}}, {"id": 210, "type": "call_expression", "text": "_stack.back()", "parent": 209, "children": [211, 214], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 21}}, {"id": 211, "type": "field_expression", "text": "_stack.back", "parent": 210, "children": [212, 213], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 19}}, {"id": 212, "type": "identifier", "text": "_stack", "parent": 211, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 14}}, {"id": 213, "type": "field_identifier", "text": "back", "parent": 211, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 19}}, {"id": 214, "type": "argument_list", "text": "()", "parent": 210, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 21}}, {"id": 215, "type": "field_identifier", "text": "PC", "parent": 209, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 24}}, {"id": 216, "type": "assignment_expression", "text": "*stack = _stack.back().StackBase", "parent": 166, "children": [217, 220, 221], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 34}}, {"id": 217, "type": "pointer_expression", "text": "*stack", "parent": 216, "children": [218, 219], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 8}}, {"id": 218, "type": "*", "text": "*", "parent": 217, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 3}}, {"id": 219, "type": "identifier", "text": "stack", "parent": 217, "children": [], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 8}}, {"id": 220, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 10}}, {"id": 221, "type": "field_expression", "text": "_stack.back().StackBase", "parent": 216, "children": [222, 227], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 34}}, {"id": 222, "type": "call_expression", "text": "_stack.back()", "parent": 221, "children": [223, 226], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 24}}, {"id": 223, "type": "field_expression", "text": "_stack.back", "parent": 222, "children": [224, 225], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 22}}, {"id": 224, "type": "identifier", "text": "_stack", "parent": 223, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 17}}, {"id": 225, "type": "field_identifier", "text": "back", "parent": 223, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 22}}, {"id": 226, "type": "argument_list", "text": "()", "parent": 222, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 24}}, {"id": 227, "type": "field_identifier", "text": "StackBase", "parent": 221, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 34}}, {"id": 228, "type": "function_definition", "text": "StacktraceInfo GetStacktrace()\n\t{\n\t\tStacktraceInfo ret;\n\t\tfor (auto& f : _stack)\n\t\t{\n\t\t\tret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n\t\t}\n\t\treturn std::move(ret);\n\t}\n\nprivate:\n\tRuntimeLoader* _loader;\n\tstd::vector<StacktracerFrameInfo> _stack;\n}", "parent": 15, "children": [229, 230], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 70, "column": 1}}, {"id": 229, "type": "type_identifier", "text": "StacktraceInfo", "parent": 228, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 15}}, {"id": 230, "type": "function_declarator", "text": "GetStacktrace()", "parent": 228, "children": [231, 232], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 31}}, {"id": 231, "type": "identifier", "text": "GetStacktrace", "parent": 230, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 29}}, {"id": 232, "type": "parameter_list", "text": "()", "parent": 230, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 31}}, {"id": 233, "type": "declaration", "text": "StacktraceInfo ret;", "parent": 228, "children": [234, 235], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 21}}, {"id": 234, "type": "type_identifier", "text": "StacktraceInfo", "parent": 233, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 16}}, {"id": 235, "type": "identifier", "text": "ret", "parent": 233, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 20}}, {"id": 236, "type": "ERROR", "text": "for (auto& f : _stack)\n\t\t{\n\t\t\tret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n\t\t}\n\t\treturn std::move(ret);\n\t}\n\nprivate:\n\tRuntimeLoader* _loader;\n\tstd::vector<StacktracerFrameInfo> _stack;", "parent": 228, "children": [237, 261, 263, 267, 273], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 69, "column": 42}}, {"id": 237, "type": "declaration", "text": "auto& f : _stack)\n\t\t{\n\t\t\tret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });", "parent": 236, "children": [238, 240, 241, 244], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 62, "column": 70}}, {"id": 238, "type": "storage_class_specifier", "text": "auto", "parent": 237, "children": [239], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 11}}, {"id": 239, "type": "auto", "text": "auto", "parent": 238, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 11}}, {"id": 240, "type": "type_identifier", "text": "f", "parent": 237, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 14}}, {"id": 241, "type": "ERROR", "text": ": _stack)\n\t\t{\n\t\t\tret.", "parent": 237, "children": [242, 243], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 62, "column": 7}}, {"id": 242, "type": "identifier", "text": "_stack", "parent": 241, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 23}}, {"id": 243, "type": "identifier", "text": "ret", "parent": 241, "children": [], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 6}}, {"id": 244, "type": "function_declarator", "text": "push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC })", "parent": 237, "children": [245, 246], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 69}}, {"id": 245, "type": "identifier", "text": "push_back", "parent": 244, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 16}}, {"id": 246, "type": "parameter_list", "text": "({ f.Function->Args.ConvertToSymbol(_loader), f.PC })", "parent": 244, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 69}}, {"id": 247, "type": "comma_expression", "text": "f.Function->Args.ConvertToSymbol(_loader), f.PC", "parent": 246, "children": [248, 258], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 66}}, {"id": 248, "type": "call_expression", "text": "f.Function->Args.ConvertToSymbol(_loader)", "parent": 247, "children": [249, 256], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 60}}, {"id": 249, "type": "field_expression", "text": "f.Function->Args.ConvertToSymbol", "parent": 248, "children": [250, 255], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 51}}, {"id": 250, "type": "field_expression", "text": "f.Function->Args", "parent": 249, "children": [251, 254], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 35}}, {"id": 251, "type": "field_expression", "text": "f.Function", "parent": 250, "children": [252, 253], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 29}}, {"id": 252, "type": "identifier", "text": "f", "parent": 251, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 253, "type": "field_identifier", "text": "Function", "parent": 251, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 29}}, {"id": 254, "type": "field_identifier", "text": "Args", "parent": 250, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 35}}, {"id": 255, "type": "field_identifier", "text": "ConvertToSymbol", "parent": 249, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 51}}, {"id": 256, "type": "argument_list", "text": "(_loader)", "parent": 248, "children": [257], "start_point": {"row": 62, "column": 51}, "end_point": {"row": 62, "column": 60}}, {"id": 257, "type": "identifier", "text": "_loader", "parent": 256, "children": [], "start_point": {"row": 62, "column": 52}, "end_point": {"row": 62, "column": 59}}, {"id": 258, "type": "field_expression", "text": "f.PC", "parent": 247, "children": [259, 260], "start_point": {"row": 62, "column": 62}, "end_point": {"row": 62, "column": 66}}, {"id": 259, "type": "identifier", "text": "f", "parent": 258, "children": [], "start_point": {"row": 62, "column": 62}, "end_point": {"row": 62, "column": 63}}, {"id": 260, "type": "field_identifier", "text": "PC", "parent": 258, "children": [], "start_point": {"row": 62, "column": 64}, "end_point": {"row": 62, "column": 66}}, {"id": 261, "type": "ERROR", "text": "}\n\t\treturn std::", "parent": 236, "children": [262], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 64, "column": 14}}, {"id": 262, "type": "identifier", "text": "std", "parent": 261, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 12}}, {"id": 263, "type": "call_expression", "text": "move(ret)", "parent": 236, "children": [264, 265], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 23}}, {"id": 264, "type": "identifier", "text": "move", "parent": 263, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 18}}, {"id": 265, "type": "argument_list", "text": "(ret)", "parent": 263, "children": [266], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 23}}, {"id": 266, "type": "identifier", "text": "ret", "parent": 265, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 22}}, {"id": 267, "type": "ERROR", "text": "}\n\nprivate:\n\tRuntimeLoader* _loader;\n\tstd::", "parent": 236, "children": [268, 272], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 69, "column": 6}}, {"id": 268, "type": "binary_expression", "text": "RuntimeLoader* _loader", "parent": 267, "children": [269, 270, 271], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 23}}, {"id": 269, "type": "identifier", "text": "RuntimeLoader", "parent": 268, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 14}}, {"id": 270, "type": "*", "text": "*", "parent": 268, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 15}}, {"id": 271, "type": "identifier", "text": "_loader", "parent": 268, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 23}}, {"id": 272, "type": "identifier", "text": "std", "parent": 267, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 4}}, {"id": 273, "type": "binary_expression", "text": "vector<StacktracerFrameInfo> _stack", "parent": 236, "children": [274, 278, 279], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 41}}, {"id": 274, "type": "binary_expression", "text": "vector<StacktracerFrameInfo", "parent": 273, "children": [275, 276, 277], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 33}}, {"id": 275, "type": "identifier", "text": "vector", "parent": 274, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 12}}, {"id": 276, "type": "<", "text": "<", "parent": 274, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 13}}, {"id": 277, "type": "identifier", "text": "StacktracerFrameInfo", "parent": 274, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 33}}, {"id": 278, "type": ">", "text": ">", "parent": 273, "children": [], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 34}}, {"id": 279, "type": "identifier", "text": "_stack", "parent": 273, "children": [], "start_point": {"row": 69, "column": 35}, "end_point": {"row": 69, "column": 41}}]}, "node_categories": {"declarations": {"functions": [12, 15, 55, 76, 78, 86, 88, 111, 113, 121, 123, 166, 168, 228, 230, 244], "variables": [20, 27, 32, 35, 58, 91, 96, 128, 133, 171, 180, 187, 233, 237], "classes": [17, 18, 238], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [40, 43, 63, 64, 68, 70, 72, 81, 82, 99, 100, 104, 106, 108, 116, 117, 137, 138, 140, 141, 142, 152, 153, 155, 156, 157, 193, 197, 198, 199, 205, 209, 210, 211, 217, 221, 222, 223, 247, 248, 249, 250, 251, 258, 263, 268, 273, 274], "assignments": [136, 151, 192, 204, 216], "loops": [], "conditionals": [13, 14, 16, 19, 21, 24, 26, 29, 31, 34, 36, 37, 41, 44, 46, 48, 49, 51, 56, 59, 62, 65, 66, 69, 79, 83, 84, 89, 92, 95, 97, 98, 101, 102, 105, 107, 110, 114, 118, 119, 124, 127, 130, 132, 135, 139, 143, 144, 148, 150, 154, 158, 159, 163, 165, 169, 172, 177, 179, 184, 186, 191, 195, 200, 201, 203, 207, 212, 213, 215, 219, 224, 225, 227, 229, 231, 234, 235, 240, 242, 243, 245, 252, 253, 254, 255, 257, 259, 260, 262, 264, 266, 269, 271, 272, 275, 277, 279], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 71, 73, 109, 147, 162], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "InterpreterStacktracer", "text_snippet": "namespace RolLang {\n\nclass InterpreterStacktracer\n{\n\tstruct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunctio"}, {"node_id": 15, "universal_type": "function", "name": "InterpreterStacktracer", "text_snippet": "class InterpreterStacktracer\n{\n\tstruct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunction* Function;\n\t\tstd::s"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "BeginFrameInterpreted(RuntimeFunction* func)"}, {"node_id": 76, "universal_type": "function", "name": "EndFrameInterpreted", "text_snippet": "void EndFrameInterpreted()\n\t{\n\t\t_stack.pop_back();\n\t}"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "EndFrameInterpreted()"}, {"node_id": 86, "universal_type": "function", "name": "BeginNativeFrame", "text_snippet": "void BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n\t{\n\t\t_stack.push_back({ func, SIZE_MA"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "BeginNativeFrame(RuntimeFunction* func, NativeFunction n)"}, {"node_id": 111, "universal_type": "function", "name": "EndNativeFrame", "text_snippet": "void EndNativeFrame()\n\t{\n\t\t_stack.pop_back();\n\t}"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "EndNativeFrame()"}, {"node_id": 121, "universal_type": "function", "name": "SetReturnAddress", "text_snippet": "void SetReturnAddress(std::size_t pc, std::size_t stack)\n\t{\n\t\t_stack[_stack.size() - 1].PC = pc;\n\t\t_"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "SetReturnAddress(std::size_t pc, std::size_t stack)"}, {"node_id": 166, "universal_type": "function", "name": "GetReturnAddress", "text_snippet": "void GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n\t{\n\t\t*f = _stack.bac"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "StacktraceInfo GetStacktrace()\n\t{\n\t\tStacktraceInfo ret;\n\t\tfor (auto& f : _stack)\n\t\t{\n\t\t\tret.push_bac"}, {"node_id": 230, "universal_type": "function", "name": "unknown", "text_snippet": "GetStacktrace()"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC })"}], "class_declarations": [{"node_id": 17, "universal_type": "class", "name": "StacktracerFrameInfo", "text_snippet": "struct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunction* Function;\n\t\tstd::size_t PC;\n\t\tstd::size_t StackBas"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 238, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 3, "text": "#include <vector>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"RuntimeLoader.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"InterpreterCommon.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n#include <vector>\n#include \"RuntimeLoader.h\"\n#include \"InterpreterCommon.h\"\n\nnamespace RolLang {\n\nclass InterpreterStacktracer\n{\n\tstruct StacktracerFrameInfo\n\t{\n\t\tRuntimeFunction* Function;\n\t\tstd::size_t PC;\n\t\tstd::size_t StackBase;\n\t\tNativeFunction Native;\n\t};\n\npublic:\n\tInterpreterStacktracer(RuntimeLoader* loader)\n\t\t: _loader(loader)\n\t{\n\t}\n\npublic:\n\tvoid BeginFrameInterpreted(RuntimeFunction* func)\n\t{\n\t\t_stack.push_back({ func, 0, 0, nullptr });\n\t}\n\n\tvoid EndFrameInterpreted()\n\t{\n\t\t_stack.pop_back();\n\t}\n\n\tvoid BeginNativeFrame(RuntimeFunction* func, NativeFunction n)\n\t{\n\t\t_stack.push_back({ func, SIZE_MAX, 0, n });\n\t}\n\n\tvoid EndNativeFrame()\n\t{\n\t\t_stack.pop_back();\n\t}\n\n\tvoid SetReturnAddress(std::size_t pc, std::size_t stack)\n\t{\n\t\t_stack[_stack.size() - 1].PC = pc;\n\t\t_stack[_stack.size() - 1].StackBase = stack;\n\t}\n\n\tvoid GetReturnAddress(RuntimeFunction** f, std::size_t* pc, std::size_t* stack)\n\t{\n\t\t*f = _stack.back().Function;\n\t\t*pc = _stack.back().PC;\n\t\t*stack = _stack.back().StackBase;\n\t}\n\n\tStacktraceInfo GetStacktrace()\n\t{\n\t\tStacktraceInfo ret;\n\t\tfor (auto& f : _stack)\n\t\t{\n\t\t\tret.push_back({ f.Function->Args.ConvertToSymbol(_loader), f.PC });\n\t\t}\n\t\treturn std::move(ret);\n\t}\n\nprivate:\n\tRuntimeLoader* _loader;\n\tstd::vector<StacktracerFrameInfo> _stack;\n};\n\n}\n"}
258
c
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class com_crickettechnology_audio_Mixer */ #ifndef _Included_com_crickettechnology_audio_Mixer #define _Included_com_crickettechnology_audio_Mixer #ifdef __cplusplus extern "C" { #endif /* * Class: com_crickettechnology_audio_Mixer * Method: nativeSetName * Signature: (JLjava/lang/String;)V */ JNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName (JNIEnv *, jclass, jlong, jstring); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeGetName * Signature: (J)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName (JNIEnv *, jclass, jlong); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeSetVolume * Signature: (JF)V */ JNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume (JNIEnv *, jclass, jlong, jfloat); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeGetVolume * Signature: (J)F */ JNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume (JNIEnv *, jclass, jlong); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeGetMixedVolume * Signature: (J)F */ JNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume (JNIEnv *, jclass, jlong); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeSetParent * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent (JNIEnv *, jclass, jlong, jlong); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeGetParent * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent (JNIEnv *, jclass, jlong); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeGetMaster * Signature: ()J */ JNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster (JNIEnv *, jclass); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeNewMixer * Signature: (Ljava/lang/String;J)J */ JNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer (JNIEnv *, jclass, jstring, jlong); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeFind * Signature: (Ljava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind (JNIEnv *, jclass, jstring); /* * Class: com_crickettechnology_audio_Mixer * Method: nativeDestroy * Signature: (J)V */ JNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy (JNIEnv *, jclass, jlong); #ifdef __cplusplus } #endif #endif
29.6
89
(translation_unit) "/* DO NOT EDIT THIS FILE - it is machine generated */\n#include <jni.h>\n/* Header for class com_crickettechnology_audio_Mixer */\n\n#ifndef _Included_com_crickettechnology_audio_Mixer\n#define _Included_com_crickettechnology_audio_Mixer\n#ifdef __cplusplus\nextern "C" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n" (comment) "/* DO NOT EDIT THIS FILE - it is machine generated */" (preproc_include) "#include <jni.h>\n" (#include) "#include" (system_lib_string) "<jni.h>" (comment) "/* Header for class com_crickettechnology_audio_Mixer */" (preproc_ifdef) "#ifndef _Included_com_crickettechnology_audio_Mixer\n#define _Included_com_crickettechnology_audio_Mixer\n#ifdef __cplusplus\nextern "C" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}\n#endif\n#endif" (#ifndef) "#ifndef" (identifier) "_Included_com_crickettechnology_audio_Mixer" (preproc_def) "#define _Included_com_crickettechnology_audio_Mixer\n" (#define) "#define" (identifier) "_Included_com_crickettechnology_audio_Mixer" (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */" (declaration) "JNIEXPORT void" (type_identifier) "JNIEXPORT" (identifier) "void" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeSetName" (parameter_list) "(JNIEnv *, jclass, jlong, jstring)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" (,) "," (parameter_declaration) "jstring" (type_identifier) "jstring" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */" (declaration) "JNIEXPORT jstring" (type_identifier) "JNIEXPORT" (identifier) "jstring" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeGetName" (parameter_list) "(JNIEnv *, jclass, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */" (declaration) "JNIEXPORT void" (type_identifier) "JNIEXPORT" (identifier) "void" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeSetVolume" (parameter_list) "(JNIEnv *, jclass, jlong, jfloat)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" (,) "," (parameter_declaration) "jfloat" (type_identifier) "jfloat" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */" (declaration) "JNIEXPORT jfloat" (type_identifier) "JNIEXPORT" (identifier) "jfloat" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeGetVolume" (parameter_list) "(JNIEnv *, jclass, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */" (declaration) "JNIEXPORT jfloat" (type_identifier) "JNIEXPORT" (identifier) "jfloat" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume" (parameter_list) "(JNIEnv *, jclass, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */" (declaration) "JNIEXPORT void" (type_identifier) "JNIEXPORT" (identifier) "void" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeSetParent" (parameter_list) "(JNIEnv *, jclass, jlong, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */" (declaration) "JNIEXPORT jlong" (type_identifier) "JNIEXPORT" (identifier) "jlong" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeGetParent" (parameter_list) "(JNIEnv *, jclass, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */" (declaration) "JNIEXPORT jlong" (type_identifier) "JNIEXPORT" (identifier) "jlong" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeGetMaster" (parameter_list) "(JNIEnv *, jclass)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */" (declaration) "JNIEXPORT jlong" (type_identifier) "JNIEXPORT" (identifier) "jlong" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeNewMixer" (parameter_list) "(JNIEnv *, jclass, jstring, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jstring" (type_identifier) "jstring" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */" (declaration) "JNIEXPORT jlong" (type_identifier) "JNIEXPORT" (identifier) "jlong" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeFind" (parameter_list) "(JNIEnv *, jclass, jstring)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jstring" (type_identifier) "jstring" ()) ")" (;) ";" (comment) "/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */" (declaration) "JNIEXPORT void" (type_identifier) "JNIEXPORT" (identifier) "void" (;) "" (declaration) "JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);" (type_identifier) "JNICALL" (function_declarator) "Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong)" (identifier) "Java_com_crickettechnology_audio_Mixer_nativeDestroy" (parameter_list) "(JNIEnv *, jclass, jlong)" (() "(" (parameter_declaration) "JNIEnv *" (type_identifier) "JNIEnv" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "jclass" (type_identifier) "jclass" (,) "," (parameter_declaration) "jlong" (type_identifier) "jlong" ()) ")" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif" (#endif) "#endif"
294
0
{"language": "c", "success": true, "metadata": {"lines": 89, "avg_line_length": 29.6, "nodes": 205, "errors": 0, "source_hash": "0f7503981ba03cb5e90896f06d0558549d1baa3c65b6f6a8c7beec87d169e189", "categorized_nodes": 168}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <jni.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": "<jni.h>", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 16}}, {"id": 3, "type": "preproc_ifdef", "text": "#ifndef _Included_com_crickettechnology_audio_Mixer\n#define _Included_com_crickettechnology_audio_Mixer\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}\n#endif\n#endif", "parent": null, "children": [4, 5, 6, 9, 204], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 4, "type": "#ifndef", "text": "#ifndef", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 5, "type": "identifier", "text": "_Included_com_crickettechnology_audio_Mixer", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 51}}, {"id": 6, "type": "preproc_def", "text": "#define _Included_com_crickettechnology_audio_Mixer\n", "parent": 3, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 8, "type": "identifier", "text": "_Included_com_crickettechnology_audio_Mixer", "parent": 6, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 51}}, {"id": 9, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}\n#endif", "parent": 3, "children": [10, 11, 12, 203], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 99, "column": 6}}, {"id": 10, "type": "#ifdef", "text": "#ifdef", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 11, "type": "identifier", "text": "__cplusplus", "parent": 9, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 18}}, {"id": 12, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 13, "type": "extern", "text": "extern", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 6}}, {"id": 14, "type": "string_literal", "text": "\"C\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 10}}, {"id": 15, "type": "preproc_call", "text": "#endif\n", "parent": 12, "children": [16], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 16, "type": "preproc_directive", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 17, "type": "declaration", "text": "JNIEXPORT void", "parent": 12, "children": [18, 19], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 14}}, {"id": 18, "type": "type_identifier", "text": "JNIEXPORT", "parent": 17, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 9}}, {"id": 19, "type": "identifier", "text": "void", "parent": 17, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 14}}, {"id": 20, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);", "parent": 12, "children": [21, 22], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 15, "column": 37}}, {"id": 21, "type": "type_identifier", "text": "JNICALL", "parent": 20, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 22}}, {"id": 22, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring)", "parent": 20, "children": [23, 24], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 15, "column": 36}}, {"id": 23, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeSetName", "parent": 22, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 75}}, {"id": 24, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong, jstring)", "parent": 22, "children": [25, 29, 31, 33], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 36}}, {"id": 25, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 24, "children": [26, 27], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 11}}, {"id": 26, "type": "type_identifier", "text": "JNIEnv", "parent": 25, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 9}}, {"id": 27, "type": "abstract_pointer_declarator", "text": "*", "parent": 25, "children": [28], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 11}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 11}}, {"id": 29, "type": "parameter_declaration", "text": "jclass", "parent": 24, "children": [30], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 19}}, {"id": 30, "type": "type_identifier", "text": "jclass", "parent": 29, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 19}}, {"id": 31, "type": "parameter_declaration", "text": "jlong", "parent": 24, "children": [32], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 26}}, {"id": 32, "type": "type_identifier", "text": "jlong", "parent": 31, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 26}}, {"id": 33, "type": "parameter_declaration", "text": "jstring", "parent": 24, "children": [34], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 35}}, {"id": 34, "type": "type_identifier", "text": "jstring", "parent": 33, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 35}}, {"id": 35, "type": "declaration", "text": "JNIEXPORT jstring", "parent": 12, "children": [36, 37], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 17}}, {"id": 36, "type": "type_identifier", "text": "JNIEXPORT", "parent": 35, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 9}}, {"id": 37, "type": "identifier", "text": "jstring", "parent": 35, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 17}}, {"id": 38, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);", "parent": 12, "children": [39, 40], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 23, "column": 28}}, {"id": 39, "type": "type_identifier", "text": "JNICALL", "parent": 38, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 25}}, {"id": 40, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong)", "parent": 38, "children": [41, 42], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 23, "column": 27}}, {"id": 41, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetName", "parent": 40, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 78}}, {"id": 42, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong)", "parent": 40, "children": [43, 47, 49], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 27}}, {"id": 43, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 42, "children": [44, 45], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 11}}, {"id": 44, "type": "type_identifier", "text": "JNIEnv", "parent": 43, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 9}}, {"id": 45, "type": "abstract_pointer_declarator", "text": "*", "parent": 43, "children": [46], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 47, "type": "parameter_declaration", "text": "jclass", "parent": 42, "children": [48], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 19}}, {"id": 48, "type": "type_identifier", "text": "jclass", "parent": 47, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 19}}, {"id": 49, "type": "parameter_declaration", "text": "jlong", "parent": 42, "children": [50], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 26}}, {"id": 50, "type": "type_identifier", "text": "jlong", "parent": 49, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 26}}, {"id": 51, "type": "declaration", "text": "JNIEXPORT void", "parent": 12, "children": [52, 53], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 14}}, {"id": 52, "type": "type_identifier", "text": "JNIEXPORT", "parent": 51, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 9}}, {"id": 53, "type": "identifier", "text": "void", "parent": 51, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 14}}, {"id": 54, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);", "parent": 12, "children": [55, 56], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 31, "column": 36}}, {"id": 55, "type": "type_identifier", "text": "JNICALL", "parent": 54, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 22}}, {"id": 56, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat)", "parent": 54, "children": [57, 58], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 31, "column": 35}}, {"id": 57, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeSetVolume", "parent": 56, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 77}}, {"id": 58, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong, jfloat)", "parent": 56, "children": [59, 63, 65, 67], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 35}}, {"id": 59, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 58, "children": [60, 61], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 11}}, {"id": 60, "type": "type_identifier", "text": "JNIEnv", "parent": 59, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 9}}, {"id": 61, "type": "abstract_pointer_declarator", "text": "*", "parent": 59, "children": [62], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 63, "type": "parameter_declaration", "text": "jclass", "parent": 58, "children": [64], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 19}}, {"id": 64, "type": "type_identifier", "text": "jclass", "parent": 63, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 19}}, {"id": 65, "type": "parameter_declaration", "text": "jlong", "parent": 58, "children": [66], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 26}}, {"id": 66, "type": "type_identifier", "text": "jlong", "parent": 65, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 26}}, {"id": 67, "type": "parameter_declaration", "text": "jfloat", "parent": 58, "children": [68], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 34}}, {"id": 68, "type": "type_identifier", "text": "jfloat", "parent": 67, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 34}}, {"id": 69, "type": "declaration", "text": "JNIEXPORT jfloat", "parent": 12, "children": [70, 71], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 16}}, {"id": 70, "type": "type_identifier", "text": "JNIEXPORT", "parent": 69, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 9}}, {"id": 71, "type": "identifier", "text": "jfloat", "parent": 69, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 16}}, {"id": 72, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);", "parent": 12, "children": [73, 74], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 39, "column": 28}}, {"id": 73, "type": "type_identifier", "text": "JNICALL", "parent": 72, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 24}}, {"id": 74, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong)", "parent": 72, "children": [75, 76], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 39, "column": 27}}, {"id": 75, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetVolume", "parent": 74, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 79}}, {"id": 76, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong)", "parent": 74, "children": [77, 81, 83], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 27}}, {"id": 77, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 76, "children": [78, 79], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 11}}, {"id": 78, "type": "type_identifier", "text": "JNIEnv", "parent": 77, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 9}}, {"id": 79, "type": "abstract_pointer_declarator", "text": "*", "parent": 77, "children": [80], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 11}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 11}}, {"id": 81, "type": "parameter_declaration", "text": "jclass", "parent": 76, "children": [82], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 19}}, {"id": 82, "type": "type_identifier", "text": "jclass", "parent": 81, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 19}}, {"id": 83, "type": "parameter_declaration", "text": "jlong", "parent": 76, "children": [84], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 26}}, {"id": 84, "type": "type_identifier", "text": "jlong", "parent": 83, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 26}}, {"id": 85, "type": "declaration", "text": "JNIEXPORT jfloat", "parent": 12, "children": [86, 87], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 16}}, {"id": 86, "type": "type_identifier", "text": "JNIEXPORT", "parent": 85, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 9}}, {"id": 87, "type": "identifier", "text": "jfloat", "parent": 85, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 16}}, {"id": 88, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);", "parent": 12, "children": [89, 90], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 47, "column": 28}}, {"id": 89, "type": "type_identifier", "text": "JNICALL", "parent": 88, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 24}}, {"id": 90, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong)", "parent": 88, "children": [91, 92], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 47, "column": 27}}, {"id": 91, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume", "parent": 90, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 84}}, {"id": 92, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong)", "parent": 90, "children": [93, 97, 99], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 27}}, {"id": 93, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 92, "children": [94, 95], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 11}}, {"id": 94, "type": "type_identifier", "text": "JNIEnv", "parent": 93, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 9}}, {"id": 95, "type": "abstract_pointer_declarator", "text": "*", "parent": 93, "children": [96], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 97, "type": "parameter_declaration", "text": "jclass", "parent": 92, "children": [98], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 19}}, {"id": 98, "type": "type_identifier", "text": "jclass", "parent": 97, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 19}}, {"id": 99, "type": "parameter_declaration", "text": "jlong", "parent": 92, "children": [100], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 26}}, {"id": 100, "type": "type_identifier", "text": "jlong", "parent": 99, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 26}}, {"id": 101, "type": "declaration", "text": "JNIEXPORT void", "parent": 12, "children": [102, 103], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 14}}, {"id": 102, "type": "type_identifier", "text": "JNIEXPORT", "parent": 101, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 9}}, {"id": 103, "type": "identifier", "text": "void", "parent": 101, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 14}}, {"id": 104, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);", "parent": 12, "children": [105, 106], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 55, "column": 35}}, {"id": 105, "type": "type_identifier", "text": "JNICALL", "parent": 104, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 22}}, {"id": 106, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong)", "parent": 104, "children": [107, 108], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 55, "column": 34}}, {"id": 107, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeSetParent", "parent": 106, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 77}}, {"id": 108, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong, jlong)", "parent": 106, "children": [109, 113, 115, 117], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 34}}, {"id": 109, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 108, "children": [110, 111], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 11}}, {"id": 110, "type": "type_identifier", "text": "JNIEnv", "parent": 109, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 9}}, {"id": 111, "type": "abstract_pointer_declarator", "text": "*", "parent": 109, "children": [112], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 11}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 11}}, {"id": 113, "type": "parameter_declaration", "text": "jclass", "parent": 108, "children": [114], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 19}}, {"id": 114, "type": "type_identifier", "text": "jclass", "parent": 113, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 19}}, {"id": 115, "type": "parameter_declaration", "text": "jlong", "parent": 108, "children": [116], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 26}}, {"id": 116, "type": "type_identifier", "text": "jlong", "parent": 115, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 26}}, {"id": 117, "type": "parameter_declaration", "text": "jlong", "parent": 108, "children": [118], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 33}}, {"id": 118, "type": "type_identifier", "text": "jlong", "parent": 117, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 33}}, {"id": 119, "type": "declaration", "text": "JNIEXPORT jlong", "parent": 12, "children": [120, 121], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 15}}, {"id": 120, "type": "type_identifier", "text": "JNIEXPORT", "parent": 119, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 9}}, {"id": 121, "type": "identifier", "text": "jlong", "parent": 119, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 15}}, {"id": 122, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);", "parent": 12, "children": [123, 124], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 63, "column": 28}}, {"id": 123, "type": "type_identifier", "text": "JNICALL", "parent": 122, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 23}}, {"id": 124, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong)", "parent": 122, "children": [125, 126], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 63, "column": 27}}, {"id": 125, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetParent", "parent": 124, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 78}}, {"id": 126, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong)", "parent": 124, "children": [127, 131, 133], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 27}}, {"id": 127, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 126, "children": [128, 129], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 11}}, {"id": 128, "type": "type_identifier", "text": "JNIEnv", "parent": 127, "children": [], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 9}}, {"id": 129, "type": "abstract_pointer_declarator", "text": "*", "parent": 127, "children": [130], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 11}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 11}}, {"id": 131, "type": "parameter_declaration", "text": "jclass", "parent": 126, "children": [132], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 19}}, {"id": 132, "type": "type_identifier", "text": "jclass", "parent": 131, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 19}}, {"id": 133, "type": "parameter_declaration", "text": "jlong", "parent": 126, "children": [134], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 26}}, {"id": 134, "type": "type_identifier", "text": "jlong", "parent": 133, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 26}}, {"id": 135, "type": "declaration", "text": "JNIEXPORT jlong", "parent": 12, "children": [136, 137], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 15}}, {"id": 136, "type": "type_identifier", "text": "JNIEXPORT", "parent": 135, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 9}}, {"id": 137, "type": "identifier", "text": "jlong", "parent": 135, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 15}}, {"id": 138, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);", "parent": 12, "children": [139, 140], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 71, "column": 21}}, {"id": 139, "type": "type_identifier", "text": "JNICALL", "parent": 138, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 23}}, {"id": 140, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass)", "parent": 138, "children": [141, 142], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 71, "column": 20}}, {"id": 141, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeGetMaster", "parent": 140, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 78}}, {"id": 142, "type": "parameter_list", "text": "(JNIEnv *, jclass)", "parent": 140, "children": [143, 147], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 20}}, {"id": 143, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 142, "children": [144, 145], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 71, "column": 11}}, {"id": 144, "type": "type_identifier", "text": "JNIEnv", "parent": 143, "children": [], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 71, "column": 9}}, {"id": 145, "type": "abstract_pointer_declarator", "text": "*", "parent": 143, "children": [146], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 11}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 11}}, {"id": 147, "type": "parameter_declaration", "text": "jclass", "parent": 142, "children": [148], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 19}}, {"id": 148, "type": "type_identifier", "text": "jclass", "parent": 147, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 19}}, {"id": 149, "type": "declaration", "text": "JNIEXPORT jlong", "parent": 12, "children": [150, 151], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 15}}, {"id": 150, "type": "type_identifier", "text": "JNIEXPORT", "parent": 149, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 9}}, {"id": 151, "type": "identifier", "text": "jlong", "parent": 149, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 15}}, {"id": 152, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);", "parent": 12, "children": [153, 154], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 79, "column": 37}}, {"id": 153, "type": "type_identifier", "text": "JNICALL", "parent": 152, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 23}}, {"id": 154, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong)", "parent": 152, "children": [155, 156], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 79, "column": 36}}, {"id": 155, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeNewMixer", "parent": 154, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 77}}, {"id": 156, "type": "parameter_list", "text": "(JNIEnv *, jclass, jstring, jlong)", "parent": 154, "children": [157, 161, 163, 165], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 36}}, {"id": 157, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 156, "children": [158, 159], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 11}}, {"id": 158, "type": "type_identifier", "text": "JNIEnv", "parent": 157, "children": [], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 9}}, {"id": 159, "type": "abstract_pointer_declarator", "text": "*", "parent": 157, "children": [160], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 11}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 11}}, {"id": 161, "type": "parameter_declaration", "text": "jclass", "parent": 156, "children": [162], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 19}}, {"id": 162, "type": "type_identifier", "text": "jclass", "parent": 161, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 19}}, {"id": 163, "type": "parameter_declaration", "text": "jstring", "parent": 156, "children": [164], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 28}}, {"id": 164, "type": "type_identifier", "text": "jstring", "parent": 163, "children": [], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 28}}, {"id": 165, "type": "parameter_declaration", "text": "jlong", "parent": 156, "children": [166], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 35}}, {"id": 166, "type": "type_identifier", "text": "jlong", "parent": 165, "children": [], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 35}}, {"id": 167, "type": "declaration", "text": "JNIEXPORT jlong", "parent": 12, "children": [168, 169], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 15}}, {"id": 168, "type": "type_identifier", "text": "JNIEXPORT", "parent": 167, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 9}}, {"id": 169, "type": "identifier", "text": "jlong", "parent": 167, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 15}}, {"id": 170, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);", "parent": 12, "children": [171, 172], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 87, "column": 30}}, {"id": 171, "type": "type_identifier", "text": "JNICALL", "parent": 170, "children": [], "start_point": {"row": 86, "column": 16}, "end_point": {"row": 86, "column": 23}}, {"id": 172, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring)", "parent": 170, "children": [173, 174], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 87, "column": 29}}, {"id": 173, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeFind", "parent": 172, "children": [], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 73}}, {"id": 174, "type": "parameter_list", "text": "(JNIEnv *, jclass, jstring)", "parent": 172, "children": [175, 179, 181], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 29}}, {"id": 175, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 174, "children": [176, 177], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 11}}, {"id": 176, "type": "type_identifier", "text": "JNIEnv", "parent": 175, "children": [], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 9}}, {"id": 177, "type": "abstract_pointer_declarator", "text": "*", "parent": 175, "children": [178], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 11}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 11}}, {"id": 179, "type": "parameter_declaration", "text": "jclass", "parent": 174, "children": [180], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 19}}, {"id": 180, "type": "type_identifier", "text": "jclass", "parent": 179, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 19}}, {"id": 181, "type": "parameter_declaration", "text": "jstring", "parent": 174, "children": [182], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 28}}, {"id": 182, "type": "type_identifier", "text": "jstring", "parent": 181, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 28}}, {"id": 183, "type": "declaration", "text": "JNIEXPORT void", "parent": 12, "children": [184, 185], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 14}}, {"id": 184, "type": "type_identifier", "text": "JNIEXPORT", "parent": 183, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 9}}, {"id": 185, "type": "identifier", "text": "void", "parent": 183, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 14}}, {"id": 186, "type": "declaration", "text": "JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);", "parent": 12, "children": [187, 188], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 95, "column": 28}}, {"id": 187, "type": "type_identifier", "text": "JNICALL", "parent": 186, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 22}}, {"id": 188, "type": "function_declarator", "text": "Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong)", "parent": 186, "children": [189, 190], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 95, "column": 27}}, {"id": 189, "type": "identifier", "text": "Java_com_crickettechnology_audio_Mixer_nativeDestroy", "parent": 188, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 75}}, {"id": 190, "type": "parameter_list", "text": "(JNIEnv *, jclass, jlong)", "parent": 188, "children": [191, 195, 197], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 27}}, {"id": 191, "type": "parameter_declaration", "text": "JNIEnv *", "parent": 190, "children": [192, 193], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 11}}, {"id": 192, "type": "type_identifier", "text": "JNIEnv", "parent": 191, "children": [], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 9}}, {"id": 193, "type": "abstract_pointer_declarator", "text": "*", "parent": 191, "children": [194], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 11}}, {"id": 194, "type": "*", "text": "*", "parent": 193, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 11}}, {"id": 195, "type": "parameter_declaration", "text": "jclass", "parent": 190, "children": [196], "start_point": {"row": 95, "column": 13}, "end_point": {"row": 95, "column": 19}}, {"id": 196, "type": "type_identifier", "text": "jclass", "parent": 195, "children": [], "start_point": {"row": 95, "column": 13}, "end_point": {"row": 95, "column": 19}}, {"id": 197, "type": "parameter_declaration", "text": "jlong", "parent": 190, "children": [198], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 26}}, {"id": 198, "type": "type_identifier", "text": "jlong", "parent": 197, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 26}}, {"id": 199, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 12, "children": [200, 201, 202], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 18}}, {"id": 200, "type": "#ifdef", "text": "#ifdef", "parent": 199, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 6}}, {"id": 201, "type": "identifier", "text": "__cplusplus", "parent": 199, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 18}}, {"id": 202, "type": "#endif", "text": "", "parent": 199, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 18}}, {"id": 203, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 6}}, {"id": 204, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 6}}]}, "node_categories": {"declarations": {"functions": [22, 40, 56, 74, 90, 106, 124, 140, 154, 172, 188], "variables": [17, 20, 25, 29, 31, 33, 35, 38, 43, 47, 49, 51, 54, 59, 63, 65, 67, 69, 72, 77, 81, 83, 85, 88, 93, 97, 99, 101, 104, 109, 113, 115, 117, 119, 122, 127, 131, 133, 135, 138, 143, 147, 149, 152, 157, 161, 163, 165, 167, 170, 175, 179, 181, 183, 186, 191, 195, 197], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 4, 5, 8, 9, 10, 11, 12, 18, 19, 21, 23, 26, 30, 32, 34, 36, 37, 39, 41, 44, 48, 50, 52, 53, 55, 57, 60, 64, 66, 68, 70, 71, 73, 75, 78, 82, 84, 86, 87, 89, 91, 94, 98, 100, 102, 103, 105, 107, 110, 114, 116, 118, 120, 121, 123, 125, 128, 132, 134, 136, 137, 139, 141, 144, 148, 150, 151, 153, 155, 158, 162, 164, 166, 168, 169, 171, 173, 176, 180, 182, 184, 185, 187, 189, 192, 196, 198, 199, 200, 201, 202, 203, 204], "returns": [], "exceptions": []}, "expressions": {"calls": [15], "literals": [2, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring)"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong)"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat)"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong)"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong)"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong)"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong)"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring)"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <jni.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* DO NOT EDIT THIS FILE - it is machine generated */\n#include <jni.h>\n/* Header for class com_crickettechnology_audio_Mixer */\n\n#ifndef _Included_com_crickettechnology_audio_Mixer\n#define _Included_com_crickettechnology_audio_Mixer\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetName\n * Signature: (JLjava/lang/String;)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetName\n (JNIEnv *, jclass, jlong, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetName\n * Signature: (J)Ljava/lang/String;\n */\nJNIEXPORT jstring JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetName\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetVolume\n * Signature: (JF)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetVolume\n (JNIEnv *, jclass, jlong, jfloat);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMixedVolume\n * Signature: (J)F\n */\nJNIEXPORT jfloat JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMixedVolume\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeSetParent\n * Signature: (JJ)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeSetParent\n (JNIEnv *, jclass, jlong, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetParent\n * Signature: (J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetParent\n (JNIEnv *, jclass, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeGetMaster\n * Signature: ()J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeGetMaster\n (JNIEnv *, jclass);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeNewMixer\n * Signature: (Ljava/lang/String;J)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeNewMixer\n (JNIEnv *, jclass, jstring, jlong);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeFind\n * Signature: (Ljava/lang/String;)J\n */\nJNIEXPORT jlong JNICALL Java_com_crickettechnology_audio_Mixer_nativeFind\n (JNIEnv *, jclass, jstring);\n\n/*\n * Class: com_crickettechnology_audio_Mixer\n * Method: nativeDestroy\n * Signature: (J)V\n */\nJNIEXPORT void JNICALL Java_com_crickettechnology_audio_Mixer_nativeDestroy\n (JNIEnv *, jclass, jlong);\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"}
259
c
// // HYTopBottomClosePortalTransitionAnimationDirection.h // HYKit // // Created by ocean on 2017/8/9. // Copyright © 2017年 wuhaiyang. All rights reserved. // #import "HYPortalTransitionAnimation.h" @interface HYTopBottomClosePortalTransitionAnimationDirection : HYPortalTransitionAnimation @end
29.1
10
(translation_unit) "//\n// HYTopBottomClosePortalTransitionAnimationDirection.h\n// HYKit\n//\n// Created by ocean on 2017/8/9.\n// Copyright © 2017年 wuhaiyang. All rights reserved.\n//\n\n#import "HYPortalTransitionAnimation.h"\n\n@interface HYTopBottomClosePortalTransitionAnimationDirection : HYPortalTransitionAnimation\n\n@end\n" (comment) "//" (comment) "// HYTopBottomClosePortalTransitionAnimationDirection.h" (comment) "// HYKit" (comment) "//" (comment) "// Created by ocean on 2017/8/9." (comment) "// Copyright © 2017年 wuhaiyang. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port "HYPortalTransitionAnimation.h"\n\n@i" (preproc_directive) "port "H" (preproc_arg) "PortalTransitionAnimation.h"\n\n@" (ERROR) "terface HYTopBottomClosePortalTransitionAnimationDirection : HYPortalTransitionAnimation\n\n@end\n" (ERROR) "t" (type_identifier) "erface HY" (identifier) "opBottomClosePortalTransitionAnimationDirection : " (:) "Y" (identifier) "ortalTransitionAnimation\n\n@" (ERROR) "d" (identifier) "\n"
19
3
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 29.1, "nodes": 10, "errors": 0, "source_hash": "a05d3b71d7f1c76872168d5dff9f34aee01f696f5cce1fa75871e036305b0651", "categorized_nodes": 5}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port \"HYPortalTransitionAnimation.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 \"H", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "PortalTransitionAnimation.h\"\n\n@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 39}}, {"id": 3, "type": "ERROR", "text": "terface HYTopBottomClosePortalTransitionAnimationDirection : HYPortalTransitionAnimation\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 HY", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": "opBottomClosePortalTransitionAnimationDirection : ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 61}}, {"id": 7, "type": "identifier", "text": "ortalTransitionAnimation\n\n@", "parent": 3, "children": [], "start_point": {"row": 10, "column": 64}, "end_point": {"row": 10, "column": 91}}, {"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// HYTopBottomClosePortalTransitionAnimationDirection.h\n// HYKit\n//\n// Created by ocean on 2017/8/9.\n// Copyright \u00a9 2017\u5e74 wuhaiyang. All rights reserved.\n//\n\n#import \"HYPortalTransitionAnimation.h\"\n\n@interface HYTopBottomClosePortalTransitionAnimationDirection : HYPortalTransitionAnimation\n\n@end\n"}
260
c
#ifndef PLUGIN_EXPORT_H #define PLUGIN_EXPORT_H #include <QtUiPlugin/QDesignerExportWidget> #include <QtDesigner/QDesignerFormWindowInterface> #include <QtDesigner/QDesignerFormEditorInterface> #include <QtDesigner/QDesignerPropertySheetExtension> #include <QtDesigner/QExtensionManager> #ifdef QT_PLUGIN #define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT #else #define PLUGIN_EXPORT #endif // QT_PLUGIN #endif // PLUGIN_EXPORT_H
31.69
13
(translation_unit) "#ifndef PLUGIN_EXPORT_H\n#define PLUGIN_EXPORT_H\n\n#include <QtUiPlugin/QDesignerExportWidget>\n\n#include <QtDesigner/QDesignerFormWindowInterface>\n#include <QtDesigner/QDesignerFormEditorInterface>\n#include <QtDesigner/QDesignerPropertySheetExtension>\n#include <QtDesigner/QExtensionManager>\n\n#ifdef QT_PLUGIN\n#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n#else\n#define PLUGIN_EXPORT\n#endif // QT_PLUGIN\n\n#endif // PLUGIN_EXPORT_H\n" (preproc_ifdef) "#ifndef PLUGIN_EXPORT_H\n#define PLUGIN_EXPORT_H\n\n#include <QtUiPlugin/QDesignerExportWidget>\n\n#include <QtDesigner/QDesignerFormWindowInterface>\n#include <QtDesigner/QDesignerFormEditorInterface>\n#include <QtDesigner/QDesignerPropertySheetExtension>\n#include <QtDesigner/QExtensionManager>\n\n#ifdef QT_PLUGIN\n#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n#else\n#define PLUGIN_EXPORT\n#endif // QT_PLUGIN\n\n#endif" (#ifndef) "#ifndef" (identifier) "PLUGIN_EXPORT_H" (preproc_def) "#define PLUGIN_EXPORT_H\n" (#define) "#define" (identifier) "PLUGIN_EXPORT_H" (preproc_include) "#include <QtUiPlugin/QDesignerExportWidget>\n" (#include) "#include" (system_lib_string) "<QtUiPlugin/QDesignerExportWidget>" (preproc_include) "#include <QtDesigner/QDesignerFormWindowInterface>\n" (#include) "#include" (system_lib_string) "<QtDesigner/QDesignerFormWindowInterface>" (preproc_include) "#include <QtDesigner/QDesignerFormEditorInterface>\n" (#include) "#include" (system_lib_string) "<QtDesigner/QDesignerFormEditorInterface>" (preproc_include) "#include <QtDesigner/QDesignerPropertySheetExtension>\n" (#include) "#include" (system_lib_string) "<QtDesigner/QDesignerPropertySheetExtension>" (preproc_include) "#include <QtDesigner/QExtensionManager>\n" (#include) "#include" (system_lib_string) "<QtDesigner/QExtensionManager>" (preproc_ifdef) "#ifdef QT_PLUGIN\n#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n#else\n#define PLUGIN_EXPORT\n#endif" (#ifdef) "#ifdef" (identifier) "QT_PLUGIN" (preproc_def) "#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n" (#define) "#define" (identifier) "PLUGIN_EXPORT" (preproc_arg) "QDESIGNER_WIDGET_EXPORT" (preproc_else) "#else\n#define PLUGIN_EXPORT\n" (#else) "#else" (preproc_def) "#define PLUGIN_EXPORT\n" (#define) "#define" (identifier) "PLUGIN_EXPORT" (#endif) "#endif" (comment) "// QT_PLUGIN" (#endif) "#endif" (comment) "// PLUGIN_EXPORT_H"
38
0
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 31.69, "nodes": 35, "errors": 0, "source_hash": "c56e22a4b5e6349c8bb513e7d1124e0481ca78ccd4d37252ee9b12c9570376a4", "categorized_nodes": 26}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PLUGIN_EXPORT_H\n#define PLUGIN_EXPORT_H\n\n#include <QtUiPlugin/QDesignerExportWidget>\n\n#include <QtDesigner/QDesignerFormWindowInterface>\n#include <QtDesigner/QDesignerFormEditorInterface>\n#include <QtDesigner/QDesignerPropertySheetExtension>\n#include <QtDesigner/QExtensionManager>\n\n#ifdef QT_PLUGIN\n#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n#else\n#define PLUGIN_EXPORT\n#endif // QT_PLUGIN\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 34], "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": "PLUGIN_EXPORT_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define PLUGIN_EXPORT_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": "PLUGIN_EXPORT_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <QtUiPlugin/QDesignerExportWidget>\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": "<QtUiPlugin/QDesignerExportWidget>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 43}}, {"id": 9, "type": "preproc_include", "text": "#include <QtDesigner/QDesignerFormWindowInterface>\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": "<QtDesigner/QDesignerFormWindowInterface>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 50}}, {"id": 12, "type": "preproc_include", "text": "#include <QtDesigner/QDesignerFormEditorInterface>\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": "<QtDesigner/QDesignerFormEditorInterface>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 50}}, {"id": 15, "type": "preproc_include", "text": "#include <QtDesigner/QDesignerPropertySheetExtension>\n", "parent": 0, "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": "system_lib_string", "text": "<QtDesigner/QDesignerPropertySheetExtension>", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 53}}, {"id": 18, "type": "preproc_include", "text": "#include <QtDesigner/QExtensionManager>\n", "parent": 0, "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": "system_lib_string", "text": "<QtDesigner/QExtensionManager>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 39}}, {"id": 21, "type": "preproc_ifdef", "text": "#ifdef QT_PLUGIN\n#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n#else\n#define PLUGIN_EXPORT\n#endif", "parent": 0, "children": [22, 23, 24, 28, 33], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 22, "type": "#ifdef", "text": "#ifdef", "parent": 21, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 23, "type": "identifier", "text": "QT_PLUGIN", "parent": 21, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 16}}, {"id": 24, "type": "preproc_def", "text": "#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n", "parent": 21, "children": [25, 26, 27], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 26, "type": "identifier", "text": "PLUGIN_EXPORT", "parent": 24, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 21}}, {"id": 27, "type": "preproc_arg", "text": "QDESIGNER_WIDGET_EXPORT", "parent": 24, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 45}}, {"id": 28, "type": "preproc_else", "text": "#else\n#define PLUGIN_EXPORT\n", "parent": 21, "children": [29, 30], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 29, "type": "#else", "text": "#else", "parent": 28, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 5}}, {"id": 30, "type": "preproc_def", "text": "#define PLUGIN_EXPORT\n", "parent": 28, "children": [31, 32], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 32, "type": "identifier", "text": "PLUGIN_EXPORT", "parent": 30, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 21}}, {"id": 33, "type": "#endif", "text": "#endif", "parent": 21, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 34, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "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, 32, 33, 34], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QtUiPlugin/QDesignerExportWidget>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <QtDesigner/QDesignerFormWindowInterface>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <QtDesigner/QDesignerFormEditorInterface>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <QtDesigner/QDesignerPropertySheetExtension>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <QtDesigner/QExtensionManager>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef PLUGIN_EXPORT_H\n#define PLUGIN_EXPORT_H\n\n#include <QtUiPlugin/QDesignerExportWidget>\n\n#include <QtDesigner/QDesignerFormWindowInterface>\n#include <QtDesigner/QDesignerFormEditorInterface>\n#include <QtDesigner/QDesignerPropertySheetExtension>\n#include <QtDesigner/QExtensionManager>\n\n#ifdef QT_PLUGIN\n#define PLUGIN_EXPORT QDESIGNER_WIDGET_EXPORT\n#else\n#define PLUGIN_EXPORT\n#endif // QT_PLUGIN\n\n#endif // PLUGIN_EXPORT_H\n"}
261
c
long a; long b[10]; void func() { a = 2; b[3] = 5; commit; } void watcher_func() { a = 0; b[3] = 0; commitd; } void main() { runner func() using a, b[0,, 10]; runner watcher_func() watching a, b[0,, 10]; commit; }
10.95
19
(translation_unit) "long a;\nlong b[10];\n\nvoid func() {\n a = 2;\n b[3] = 5;\n commit;\n}\n\nvoid watcher_func() {\n a = 0;\n b[3] = 0;\n commitd;\n}\n\nvoid main() {\n runner func()\n using a, b[0,, 10];\n runner watcher_func()\n watching a, b[0,, 10];\n commit;\n}\n" (declaration) "long a;" (sized_type_specifier) "long" (long) "long" (identifier) "a" (;) ";" (declaration) "long b[10];" (sized_type_specifier) "long" (long) "long" (array_declarator) "b[10]" (identifier) "b" ([) "[" (number_literal) "10" (]) "]" (;) ";" (function_definition) "void func() {\n a = 2;\n b[3] = 5;\n commit;\n}" (primitive_type) "void" (function_declarator) "func()" (identifier) "func" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n a = 2;\n b[3] = 5;\n commit;\n}" ({) "{" (expression_statement) "a = 2;" (assignment_expression) "a = 2" (identifier) "a" (=) "=" (number_literal) "2" (;) ";" (expression_statement) "b[3] = 5;" (assignment_expression) "b[3] = 5" (subscript_expression) "b[3]" (identifier) "b" ([) "[" (number_literal) "3" (]) "]" (=) "=" (number_literal) "5" (;) ";" (expression_statement) "commit;" (identifier) "commit" (;) ";" (}) "}" (function_definition) "void watcher_func() {\n a = 0;\n b[3] = 0;\n commitd;\n}" (primitive_type) "void" (function_declarator) "watcher_func()" (identifier) "watcher_func" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n a = 0;\n b[3] = 0;\n commitd;\n}" ({) "{" (expression_statement) "a = 0;" (assignment_expression) "a = 0" (identifier) "a" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "b[3] = 0;" (assignment_expression) "b[3] = 0" (subscript_expression) "b[3]" (identifier) "b" ([) "[" (number_literal) "3" (]) "]" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "commitd;" (identifier) "commitd" (;) ";" (}) "}" (function_definition) "void main() {\n runner func()\n using a, b[0,, 10];\n runner watcher_func()\n watching a, b[0,, 10];\n commit;\n}" (primitive_type) "void" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n runner func()\n using a, b[0,, 10];\n runner watcher_func()\n watching a, b[0,, 10];\n commit;\n}" ({) "{" (ERROR) "runner func()\n using a, b[0,, 10];\n runner watcher_func()\n watching a, b[0,, 10];\n commit" (type_identifier) "runner" (function_declarator) "func()" (identifier) "func" (parameter_list) "()" (() "(" ()) ")" (declaration) "using a, b[0,, 10];" (type_identifier) "using" (identifier) "a" (,) "," (array_declarator) "b[0,, 10]" (identifier) "b" ([) "[" (ERROR) "0,," (number_literal) "0" (,) "," (,) "," (number_literal) "10" (]) "]" (;) ";" (declaration) "runner watcher_func()\n watching a, b[0,, 10];" (type_identifier) "runner" (array_declarator) "watcher_func()\n watching a, b[0,, 10]" (function_declarator) "watcher_func()\n watching a" (identifier) "watcher_func" (parameter_list) "()" (() "(" ()) ")" (identifier) "watching" (identifier) "a" (ERROR) ", b" (,) "," (identifier) "b" ([) "[" (ERROR) "0,," (number_literal) "0" (,) "," (,) "," (number_literal) "10" (]) "]" (;) ";" (type_identifier) "commit" (expression_statement) ";" (;) ";" (}) "}"
128
4
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 10.95, "nodes": 74, "errors": 0, "source_hash": "9393d39e4cc4269187dbf2ab87d0fb7df62d704d4b2704edc1502f7ac4983648", "categorized_nodes": 53}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "declaration", "text": "long a;", "parent": null, "children": [1, 3], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 1, "type": "sized_type_specifier", "text": "long", "parent": 0, "children": [2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 4}}, {"id": 2, "type": "long", "text": "long", "parent": 1, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 4}}, {"id": 3, "type": "identifier", "text": "a", "parent": 0, "children": [], "start_point": {"row": 0, "column": 5}, "end_point": {"row": 0, "column": 6}}, {"id": 4, "type": "declaration", "text": "long b[10];", "parent": null, "children": [5, 7], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 11}}, {"id": 5, "type": "sized_type_specifier", "text": "long", "parent": 4, "children": [6], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 4}}, {"id": 6, "type": "long", "text": "long", "parent": 5, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 4}}, {"id": 7, "type": "array_declarator", "text": "b[10]", "parent": 4, "children": [8, 9], "start_point": {"row": 1, "column": 5}, "end_point": {"row": 1, "column": 10}}, {"id": 8, "type": "identifier", "text": "b", "parent": 7, "children": [], "start_point": {"row": 1, "column": 5}, "end_point": {"row": 1, "column": 6}}, {"id": 9, "type": "number_literal", "text": "10", "parent": 7, "children": [], "start_point": {"row": 1, "column": 7}, "end_point": {"row": 1, "column": 9}}, {"id": 10, "type": "function_definition", "text": "void func() {\n\ta = 2;\n\tb[3] = 5;\n\tcommit;\n}", "parent": null, "children": [11, 12], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 11, "type": "primitive_type", "text": "void", "parent": 10, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 12, "type": "function_declarator", "text": "func()", "parent": 10, "children": [13, 14], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 11}}, {"id": 13, "type": "identifier", "text": "func", "parent": 12, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 9}}, {"id": 14, "type": "parameter_list", "text": "()", "parent": 12, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 11}}, {"id": 15, "type": "assignment_expression", "text": "a = 2", "parent": 10, "children": [16, 17, 18], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 6}}, {"id": 16, "type": "identifier", "text": "a", "parent": 15, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 2}}, {"id": 17, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 4, "column": 3}, "end_point": {"row": 4, "column": 4}}, {"id": 18, "type": "number_literal", "text": "2", "parent": 15, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 6}}, {"id": 19, "type": "assignment_expression", "text": "b[3] = 5", "parent": 10, "children": [20, 23, 24], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 9}}, {"id": 20, "type": "subscript_expression", "text": "b[3]", "parent": 19, "children": [21, 22], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 5}}, {"id": 21, "type": "identifier", "text": "b", "parent": 20, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 2}}, {"id": 22, "type": "number_literal", "text": "3", "parent": 20, "children": [], "start_point": {"row": 5, "column": 3}, "end_point": {"row": 5, "column": 4}}, {"id": 23, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 7}}, {"id": 24, "type": "number_literal", "text": "5", "parent": 19, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 9}}, {"id": 25, "type": "identifier", "text": "commit", "parent": 10, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 7}}, {"id": 26, "type": "function_definition", "text": "void watcher_func() {\n\ta = 0;\n\tb[3] = 0;\n\tcommitd;\n}", "parent": null, "children": [27, 28], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 27, "type": "primitive_type", "text": "void", "parent": 26, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 28, "type": "function_declarator", "text": "watcher_func()", "parent": 26, "children": [29, 30], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 19}}, {"id": 29, "type": "identifier", "text": "watcher_func", "parent": 28, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 17}}, {"id": 30, "type": "parameter_list", "text": "()", "parent": 28, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 19}}, {"id": 31, "type": "assignment_expression", "text": "a = 0", "parent": 26, "children": [32, 33, 34], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 6}}, {"id": 32, "type": "identifier", "text": "a", "parent": 31, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 2}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 4}}, {"id": 34, "type": "number_literal", "text": "0", "parent": 31, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 6}}, {"id": 35, "type": "assignment_expression", "text": "b[3] = 0", "parent": 26, "children": [36, 39, 40], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 36, "type": "subscript_expression", "text": "b[3]", "parent": 35, "children": [37, 38], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 37, "type": "identifier", "text": "b", "parent": 36, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 2}}, {"id": 38, "type": "number_literal", "text": "3", "parent": 36, "children": [], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 4}}, {"id": 39, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 7}}, {"id": 40, "type": "number_literal", "text": "0", "parent": 35, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 41, "type": "identifier", "text": "commitd", "parent": 26, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 42, "type": "function_definition", "text": "void main() {\n\trunner func()\n\t\tusing a, b[0,, 10];\n\trunner watcher_func()\n\t\twatching a, b[0,, 10];\n\tcommit;\n}", "parent": null, "children": [43, 44], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 44, "type": "function_declarator", "text": "main()", "parent": 42, "children": [45, 46], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 11}}, {"id": 45, "type": "identifier", "text": "main", "parent": 44, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 9}}, {"id": 46, "type": "parameter_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 11}}, {"id": 47, "type": "ERROR", "text": "runner func()\n\t\tusing a, b[0,, 10];\n\trunner watcher_func()\n\t\twatching a, b[0,, 10];\n\tcommit", "parent": 42, "children": [48, 49, 52, 60, 73], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 20, "column": 7}}, {"id": 48, "type": "type_identifier", "text": "runner", "parent": 47, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 7}}, {"id": 49, "type": "function_declarator", "text": "func()", "parent": 47, "children": [50, 51], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 50, "type": "identifier", "text": "func", "parent": 49, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 12}}, {"id": 51, "type": "parameter_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 14}}, {"id": 52, "type": "declaration", "text": "using a, b[0,, 10];", "parent": 47, "children": [53, 54, 55], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 21}}, {"id": 53, "type": "type_identifier", "text": "using", "parent": 52, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 7}}, {"id": 54, "type": "identifier", "text": "a", "parent": 52, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 9}}, {"id": 55, "type": "array_declarator", "text": "b[0,, 10]", "parent": 52, "children": [56, 57, 59], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 56, "type": "identifier", "text": "b", "parent": 55, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 57, "type": "ERROR", "text": "0,,", "parent": 55, "children": [58], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 16}}, {"id": 58, "type": "number_literal", "text": "0", "parent": 57, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 14}}, {"id": 59, "type": "number_literal", "text": "10", "parent": 55, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 19}}, {"id": 60, "type": "declaration", "text": "runner watcher_func()\n\t\twatching a, b[0,, 10];", "parent": 47, "children": [61, 62], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 19, "column": 24}}, {"id": 61, "type": "type_identifier", "text": "runner", "parent": 60, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 7}}, {"id": 62, "type": "array_declarator", "text": "watcher_func()\n\t\twatching a, b[0,, 10]", "parent": 60, "children": [63, 68, 70, 72], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 19, "column": 23}}, {"id": 63, "type": "function_declarator", "text": "watcher_func()\n\t\twatching a", "parent": 62, "children": [64, 65, 66, 67], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 19, "column": 12}}, {"id": 64, "type": "identifier", "text": "watcher_func", "parent": 63, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 20}}, {"id": 65, "type": "parameter_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 22}}, {"id": 66, "type": "identifier", "text": "watching", "parent": 63, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 10}}, {"id": 67, "type": "identifier", "text": "a", "parent": 63, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 12}}, {"id": 68, "type": "ERROR", "text": ", b", "parent": 62, "children": [69], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 15}}, {"id": 69, "type": "identifier", "text": "b", "parent": 68, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 15}}, {"id": 70, "type": "ERROR", "text": "0,,", "parent": 62, "children": [71], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 19}}, {"id": 71, "type": "number_literal", "text": "0", "parent": 70, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 17}}, {"id": 72, "type": "number_literal", "text": "10", "parent": 62, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 22}}, {"id": 73, "type": "type_identifier", "text": "commit", "parent": 47, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 7}}]}, "node_categories": {"declarations": {"functions": [10, 12, 26, 28, 42, 44, 49, 63], "variables": [0, 4, 52, 60], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [20, 36], "assignments": [15, 19, 31, 35], "loops": [], "conditionals": [1, 3, 5, 8, 13, 16, 21, 25, 29, 32, 37, 41, 45, 48, 50, 53, 54, 56, 61, 64, 66, 67, 69, 73], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [9, 18, 22, 24, 34, 38, 40, 58, 59, 71, 72], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 10, "universal_type": "function", "name": "func", "text_snippet": "void func() {\n\ta = 2;\n\tb[3] = 5;\n\tcommit;\n}"}, {"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "func()"}, {"node_id": 26, "universal_type": "function", "name": "watcher_func", "text_snippet": "void watcher_func() {\n\ta = 0;\n\tb[3] = 0;\n\tcommitd;\n}"}, {"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "watcher_func()"}, {"node_id": 42, "universal_type": "function", "name": "main", "text_snippet": "void main() {\n\trunner func()\n\t\tusing a, b[0,, 10];\n\trunner watcher_func()\n\t\twatching a, b[0,, 10];\n\t"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "func()"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "watcher_func()\n\t\twatching a"}], "class_declarations": [], "import_statements": []}, "original_source_code": "long a;\nlong b[10];\n\nvoid func() {\n\ta = 2;\n\tb[3] = 5;\n\tcommit;\n}\n\nvoid watcher_func() {\n\ta = 0;\n\tb[3] = 0;\n\tcommitd;\n}\n\nvoid main() {\n\trunner func()\n\t\tusing a, b[0,, 10];\n\trunner watcher_func()\n\t\twatching a, b[0,, 10];\n\tcommit;\n}\n"}
262
c
#pragma once namespace Ubpa::UECS { class World; class SystemMngr; class System; class EntityMngr; class Entity; class CmptPtr; class IListener { public: virtual void EnterWorld(const World*) = 0; virtual void ExistWorld(const World*) = 0; virtual void EnterSystemMngr(const SystemMngr*) = 0; virtual void ExistSystemMngr(const SystemMngr*) = 0; virtual void EnterSystem(const System*) = 0; virtual void ExistSystem(const System*) = 0; virtual void EnterEntityMngr(const EntityMngr*) = 0; virtual void ExistEntityMngr(const EntityMngr*) = 0; virtual void EnterEntity(const Entity*) = 0; virtual void ExistEntity(const Entity*) = 0; virtual void EnterCmptPtr(const CmptPtr*) = 0; virtual void ExistCmptPtr(const CmptPtr*) = 0; }; }
30.83
24
(translation_unit) "#pragma once\n\nnamespace Ubpa::UECS {\n class World;\n class SystemMngr;\n class System;\n class EntityMngr;\n class Entity;\n class CmptPtr;\n\n class IListener {\n public:\n virtual void EnterWorld(const World*) = 0;\n virtual void ExistWorld(const World*) = 0;\n\n virtual void EnterSystemMngr(const SystemMngr*) = 0;\n virtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n virtual void EnterSystem(const System*) = 0;\n virtual void ExistSystem(const System*) = 0;\n\n virtual void EnterEntityMngr(const EntityMngr*) = 0;\n virtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n virtual void EnterEntity(const Entity*) = 0;\n virtual void ExistEntity(const Entity*) = 0;\n\n virtual void EnterCmptPtr(const CmptPtr*) = 0;\n virtual void ExistCmptPtr(const CmptPtr*) = 0;\n };\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "namespace Ubpa::UECS {\n class World;\n class SystemMngr;\n class System;\n class EntityMngr;\n class Entity;\n class CmptPtr;\n\n class IListener {\n public:\n virtual void EnterWorld(const World*) = 0;\n virtual void ExistWorld(const World*) = 0;\n\n virtual void EnterSystemMngr(const SystemMngr*) = 0;\n virtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n virtual void EnterSystem(const System*) = 0;\n virtual void ExistSystem(const System*) = 0;\n\n virtual void EnterEntityMngr(const EntityMngr*) = 0;\n virtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n virtual void EnterEntity(const Entity*) = 0;\n virtual void ExistEntity(const Entity*) = 0;\n\n virtual void EnterCmptPtr(const CmptPtr*) = 0;\n virtual void ExistCmptPtr(const CmptPtr*) = 0;\n };\n}" (type_identifier) "namespace" (identifier) "Ubpa" (ERROR) "::UECS" (:) ":" (:) ":" (identifier) "UECS" (compound_statement) "{\n class World;\n class SystemMngr;\n class System;\n class EntityMngr;\n class Entity;\n class CmptPtr;\n\n class IListener {\n public:\n virtual void EnterWorld(const World*) = 0;\n virtual void ExistWorld(const World*) = 0;\n\n virtual void EnterSystemMngr(const SystemMngr*) = 0;\n virtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n virtual void EnterSystem(const System*) = 0;\n virtual void ExistSystem(const System*) = 0;\n\n virtual void EnterEntityMngr(const EntityMngr*) = 0;\n virtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n virtual void EnterEntity(const Entity*) = 0;\n virtual void ExistEntity(const Entity*) = 0;\n\n virtual void EnterCmptPtr(const CmptPtr*) = 0;\n virtual void ExistCmptPtr(const CmptPtr*) = 0;\n };\n}" ({) "{" (declaration) "class World;" (type_identifier) "class" (identifier) "World" (;) ";" (declaration) "class SystemMngr;" (type_identifier) "class" (identifier) "SystemMngr" (;) ";" (declaration) "class System;" (type_identifier) "class" (identifier) "System" (;) ";" (declaration) "class EntityMngr;" (type_identifier) "class" (identifier) "EntityMngr" (;) ";" (declaration) "class Entity;" (type_identifier) "class" (identifier) "Entity" (;) ";" (declaration) "class CmptPtr;" (type_identifier) "class" (identifier) "CmptPtr" (;) ";" (function_definition) "class IListener {\n public:\n virtual void EnterWorld(const World*) = 0;\n virtual void ExistWorld(const World*) = 0;\n\n virtual void EnterSystemMngr(const SystemMngr*) = 0;\n virtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n virtual void EnterSystem(const System*) = 0;\n virtual void ExistSystem(const System*) = 0;\n\n virtual void EnterEntityMngr(const EntityMngr*) = 0;\n virtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n virtual void EnterEntity(const Entity*) = 0;\n virtual void ExistEntity(const Entity*) = 0;\n\n virtual void EnterCmptPtr(const CmptPtr*) = 0;\n virtual void ExistCmptPtr(const CmptPtr*) = 0;\n }" (type_identifier) "class" (identifier) "IListener" (compound_statement) "{\n public:\n virtual void EnterWorld(const World*) = 0;\n virtual void ExistWorld(const World*) = 0;\n\n virtual void EnterSystemMngr(const SystemMngr*) = 0;\n virtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n virtual void EnterSystem(const System*) = 0;\n virtual void ExistSystem(const System*) = 0;\n\n virtual void EnterEntityMngr(const EntityMngr*) = 0;\n virtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n virtual void EnterEntity(const Entity*) = 0;\n virtual void ExistEntity(const Entity*) = 0;\n\n virtual void EnterCmptPtr(const CmptPtr*) = 0;\n virtual void ExistCmptPtr(const CmptPtr*) = 0;\n }" ({) "{" (labeled_statement) "public:\n virtual void EnterWorld(const World*) = 0;" (statement_identifier) "public" (:) ":" (declaration) "virtual void EnterWorld(const World*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "EnterWorld(const World*) = 0" (function_declarator) "EnterWorld(const World*)" (identifier) "EnterWorld" (parameter_list) "(const World*)" (() "(" (parameter_declaration) "const World*" (type_qualifier) "const" (const) "const" (type_identifier) "World" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void ExistWorld(const World*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "ExistWorld(const World*) = 0" (function_declarator) "ExistWorld(const World*)" (identifier) "ExistWorld" (parameter_list) "(const World*)" (() "(" (parameter_declaration) "const World*" (type_qualifier) "const" (const) "const" (type_identifier) "World" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void EnterSystemMngr(const SystemMngr*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "EnterSystemMngr(const SystemMngr*) = 0" (function_declarator) "EnterSystemMngr(const SystemMngr*)" (identifier) "EnterSystemMngr" (parameter_list) "(const SystemMngr*)" (() "(" (parameter_declaration) "const SystemMngr*" (type_qualifier) "const" (const) "const" (type_identifier) "SystemMngr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void ExistSystemMngr(const SystemMngr*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "ExistSystemMngr(const SystemMngr*) = 0" (function_declarator) "ExistSystemMngr(const SystemMngr*)" (identifier) "ExistSystemMngr" (parameter_list) "(const SystemMngr*)" (() "(" (parameter_declaration) "const SystemMngr*" (type_qualifier) "const" (const) "const" (type_identifier) "SystemMngr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void EnterSystem(const System*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "EnterSystem(const System*) = 0" (function_declarator) "EnterSystem(const System*)" (identifier) "EnterSystem" (parameter_list) "(const System*)" (() "(" (parameter_declaration) "const System*" (type_qualifier) "const" (const) "const" (type_identifier) "System" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void ExistSystem(const System*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "ExistSystem(const System*) = 0" (function_declarator) "ExistSystem(const System*)" (identifier) "ExistSystem" (parameter_list) "(const System*)" (() "(" (parameter_declaration) "const System*" (type_qualifier) "const" (const) "const" (type_identifier) "System" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void EnterEntityMngr(const EntityMngr*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "EnterEntityMngr(const EntityMngr*) = 0" (function_declarator) "EnterEntityMngr(const EntityMngr*)" (identifier) "EnterEntityMngr" (parameter_list) "(const EntityMngr*)" (() "(" (parameter_declaration) "const EntityMngr*" (type_qualifier) "const" (const) "const" (type_identifier) "EntityMngr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void ExistEntityMngr(const EntityMngr*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "ExistEntityMngr(const EntityMngr*) = 0" (function_declarator) "ExistEntityMngr(const EntityMngr*)" (identifier) "ExistEntityMngr" (parameter_list) "(const EntityMngr*)" (() "(" (parameter_declaration) "const EntityMngr*" (type_qualifier) "const" (const) "const" (type_identifier) "EntityMngr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void EnterEntity(const Entity*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "EnterEntity(const Entity*) = 0" (function_declarator) "EnterEntity(const Entity*)" (identifier) "EnterEntity" (parameter_list) "(const Entity*)" (() "(" (parameter_declaration) "const Entity*" (type_qualifier) "const" (const) "const" (type_identifier) "Entity" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void ExistEntity(const Entity*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "ExistEntity(const Entity*) = 0" (function_declarator) "ExistEntity(const Entity*)" (identifier) "ExistEntity" (parameter_list) "(const Entity*)" (() "(" (parameter_declaration) "const Entity*" (type_qualifier) "const" (const) "const" (type_identifier) "Entity" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void EnterCmptPtr(const CmptPtr*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "EnterCmptPtr(const CmptPtr*) = 0" (function_declarator) "EnterCmptPtr(const CmptPtr*)" (identifier) "EnterCmptPtr" (parameter_list) "(const CmptPtr*)" (() "(" (parameter_declaration) "const CmptPtr*" (type_qualifier) "const" (const) "const" (type_identifier) "CmptPtr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void ExistCmptPtr(const CmptPtr*) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "ExistCmptPtr(const CmptPtr*) = 0" (function_declarator) "ExistCmptPtr(const CmptPtr*)" (identifier) "ExistCmptPtr" (parameter_list) "(const CmptPtr*)" (() "(" (parameter_declaration) "const CmptPtr*" (type_qualifier) "const" (const) "const" (type_identifier) "CmptPtr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
277
13
{"language": "c", "success": true, "metadata": {"lines": 24, "avg_line_length": 30.83, "nodes": 191, "errors": 0, "source_hash": "e45760593c67ef3a3871232bbc4103232bb7881ea577e98fca4871e640ee2f74", "categorized_nodes": 115}, "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 Ubpa::UECS {\n\tclass World;\n\tclass SystemMngr;\n\tclass System;\n\tclass EntityMngr;\n\tclass Entity;\n\tclass CmptPtr;\n\n\tclass IListener {\n\tpublic:\n\t\tvirtual void EnterWorld(const World*) = 0;\n\t\tvirtual void ExistWorld(const World*) = 0;\n\n\t\tvirtual void EnterSystemMngr(const SystemMngr*) = 0;\n\t\tvirtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n\t\tvirtual void EnterSystem(const System*) = 0;\n\t\tvirtual void ExistSystem(const System*) = 0;\n\n\t\tvirtual void EnterEntityMngr(const EntityMngr*) = 0;\n\t\tvirtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n\t\tvirtual void EnterEntity(const Entity*) = 0;\n\t\tvirtual void ExistEntity(const Entity*) = 0;\n\n\t\tvirtual void EnterCmptPtr(const CmptPtr*) = 0;\n\t\tvirtual void ExistCmptPtr(const CmptPtr*) = 0;\n\t};\n}", "parent": null, "children": [4, 5, 6], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "namespace", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 9}}, {"id": 5, "type": "identifier", "text": "Ubpa", "parent": 3, "children": [], "start_point": {"row": 2, "column": 10}, "end_point": {"row": 2, "column": 14}}, {"id": 6, "type": "ERROR", "text": "::UECS", "parent": 3, "children": [7], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 20}}, {"id": 7, "type": "identifier", "text": "UECS", "parent": 6, "children": [], "start_point": {"row": 2, "column": 16}, "end_point": {"row": 2, "column": 20}}, {"id": 8, "type": "declaration", "text": "class World;", "parent": 3, "children": [9], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 13}}, {"id": 9, "type": "identifier", "text": "World", "parent": 8, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 12}}, {"id": 10, "type": "declaration", "text": "class SystemMngr;", "parent": 3, "children": [11], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 18}}, {"id": 11, "type": "identifier", "text": "SystemMngr", "parent": 10, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 17}}, {"id": 12, "type": "declaration", "text": "class System;", "parent": 3, "children": [13], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 14}}, {"id": 13, "type": "identifier", "text": "System", "parent": 12, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 13}}, {"id": 14, "type": "declaration", "text": "class EntityMngr;", "parent": 3, "children": [15], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 18}}, {"id": 15, "type": "identifier", "text": "EntityMngr", "parent": 14, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 17}}, {"id": 16, "type": "declaration", "text": "class Entity;", "parent": 3, "children": [17], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 14}}, {"id": 17, "type": "identifier", "text": "Entity", "parent": 16, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 13}}, {"id": 18, "type": "declaration", "text": "class CmptPtr;", "parent": 3, "children": [19], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 15}}, {"id": 19, "type": "identifier", "text": "CmptPtr", "parent": 18, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 14}}, {"id": 20, "type": "function_definition", "text": "class IListener {\n\tpublic:\n\t\tvirtual void EnterWorld(const World*) = 0;\n\t\tvirtual void ExistWorld(const World*) = 0;\n\n\t\tvirtual void EnterSystemMngr(const SystemMngr*) = 0;\n\t\tvirtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n\t\tvirtual void EnterSystem(const System*) = 0;\n\t\tvirtual void ExistSystem(const System*) = 0;\n\n\t\tvirtual void EnterEntityMngr(const EntityMngr*) = 0;\n\t\tvirtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n\t\tvirtual void EnterEntity(const Entity*) = 0;\n\t\tvirtual void ExistEntity(const Entity*) = 0;\n\n\t\tvirtual void EnterCmptPtr(const CmptPtr*) = 0;\n\t\tvirtual void ExistCmptPtr(const CmptPtr*) = 0;\n\t}", "parent": 3, "children": [21], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 29, "column": 2}}, {"id": 21, "type": "identifier", "text": "IListener", "parent": 20, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 16}}, {"id": 22, "type": "labeled_statement", "text": "public:\n\t\tvirtual void EnterWorld(const World*) = 0;", "parent": 20, "children": [23], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 12, "column": 44}}, {"id": 23, "type": "declaration", "text": "virtual void EnterWorld(const World*) = 0;", "parent": 22, "children": [24, 25, 27], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 44}}, {"id": 24, "type": "type_identifier", "text": "virtual", "parent": 23, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 9}}, {"id": 25, "type": "ERROR", "text": "void", "parent": 23, "children": [26], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 26, "type": "identifier", "text": "void", "parent": 25, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 27, "type": "init_declarator", "text": "EnterWorld(const World*) = 0", "parent": 23, "children": [28, 35, 36], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 43}}, {"id": 28, "type": "function_declarator", "text": "EnterWorld(const World*)", "parent": 27, "children": [29, 30], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 39}}, {"id": 29, "type": "identifier", "text": "EnterWorld", "parent": 28, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 25}}, {"id": 30, "type": "parameter_list", "text": "(const World*)", "parent": 28, "children": [31], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 39}}, {"id": 31, "type": "parameter_declaration", "text": "const World*", "parent": 30, "children": [32, 33], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 38}}, {"id": 32, "type": "type_identifier", "text": "World", "parent": 31, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 37}}, {"id": 33, "type": "abstract_pointer_declarator", "text": "*", "parent": 31, "children": [34], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 38}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 38}}, {"id": 35, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 41}}, {"id": 36, "type": "number_literal", "text": "0", "parent": 27, "children": [], "start_point": {"row": 12, "column": 42}, "end_point": {"row": 12, "column": 43}}, {"id": 37, "type": "declaration", "text": "virtual void ExistWorld(const World*) = 0;", "parent": 20, "children": [38, 39, 41], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 44}}, {"id": 38, "type": "type_identifier", "text": "virtual", "parent": 37, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 9}}, {"id": 39, "type": "ERROR", "text": "void", "parent": 37, "children": [40], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 14}}, {"id": 40, "type": "identifier", "text": "void", "parent": 39, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 14}}, {"id": 41, "type": "init_declarator", "text": "ExistWorld(const World*) = 0", "parent": 37, "children": [42, 49, 50], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 43}}, {"id": 42, "type": "function_declarator", "text": "ExistWorld(const World*)", "parent": 41, "children": [43, 44], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 39}}, {"id": 43, "type": "identifier", "text": "ExistWorld", "parent": 42, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 25}}, {"id": 44, "type": "parameter_list", "text": "(const World*)", "parent": 42, "children": [45], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 39}}, {"id": 45, "type": "parameter_declaration", "text": "const World*", "parent": 44, "children": [46, 47], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 38}}, {"id": 46, "type": "type_identifier", "text": "World", "parent": 45, "children": [], "start_point": {"row": 13, "column": 32}, "end_point": {"row": 13, "column": 37}}, {"id": 47, "type": "abstract_pointer_declarator", "text": "*", "parent": 45, "children": [48], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 49, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 41}}, {"id": 50, "type": "number_literal", "text": "0", "parent": 41, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 43}}, {"id": 51, "type": "declaration", "text": "virtual void EnterSystemMngr(const SystemMngr*) = 0;", "parent": 20, "children": [52, 53, 55], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 54}}, {"id": 52, "type": "type_identifier", "text": "virtual", "parent": 51, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 9}}, {"id": 53, "type": "ERROR", "text": "void", "parent": 51, "children": [54], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 54, "type": "identifier", "text": "void", "parent": 53, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 55, "type": "init_declarator", "text": "EnterSystemMngr(const SystemMngr*) = 0", "parent": 51, "children": [56, 63, 64], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 53}}, {"id": 56, "type": "function_declarator", "text": "EnterSystemMngr(const SystemMngr*)", "parent": 55, "children": [57, 58], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 49}}, {"id": 57, "type": "identifier", "text": "EnterSystemMngr", "parent": 56, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 30}}, {"id": 58, "type": "parameter_list", "text": "(const SystemMngr*)", "parent": 56, "children": [59], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 49}}, {"id": 59, "type": "parameter_declaration", "text": "const SystemMngr*", "parent": 58, "children": [60, 61], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 48}}, {"id": 60, "type": "type_identifier", "text": "SystemMngr", "parent": 59, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 47}}, {"id": 61, "type": "abstract_pointer_declarator", "text": "*", "parent": 59, "children": [62], "start_point": {"row": 15, "column": 47}, "end_point": {"row": 15, "column": 48}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 15, "column": 47}, "end_point": {"row": 15, "column": 48}}, {"id": 63, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 15, "column": 50}, "end_point": {"row": 15, "column": 51}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 55, "children": [], "start_point": {"row": 15, "column": 52}, "end_point": {"row": 15, "column": 53}}, {"id": 65, "type": "declaration", "text": "virtual void ExistSystemMngr(const SystemMngr*) = 0;", "parent": 20, "children": [66, 67, 69], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 54}}, {"id": 66, "type": "type_identifier", "text": "virtual", "parent": 65, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 9}}, {"id": 67, "type": "ERROR", "text": "void", "parent": 65, "children": [68], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 14}}, {"id": 68, "type": "identifier", "text": "void", "parent": 67, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 14}}, {"id": 69, "type": "init_declarator", "text": "ExistSystemMngr(const SystemMngr*) = 0", "parent": 65, "children": [70, 77, 78], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 53}}, {"id": 70, "type": "function_declarator", "text": "ExistSystemMngr(const SystemMngr*)", "parent": 69, "children": [71, 72], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 49}}, {"id": 71, "type": "identifier", "text": "ExistSystemMngr", "parent": 70, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 30}}, {"id": 72, "type": "parameter_list", "text": "(const SystemMngr*)", "parent": 70, "children": [73], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 49}}, {"id": 73, "type": "parameter_declaration", "text": "const SystemMngr*", "parent": 72, "children": [74, 75], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 48}}, {"id": 74, "type": "type_identifier", "text": "SystemMngr", "parent": 73, "children": [], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 47}}, {"id": 75, "type": "abstract_pointer_declarator", "text": "*", "parent": 73, "children": [76], "start_point": {"row": 16, "column": 47}, "end_point": {"row": 16, "column": 48}}, {"id": 76, "type": "*", "text": "*", "parent": 75, "children": [], "start_point": {"row": 16, "column": 47}, "end_point": {"row": 16, "column": 48}}, {"id": 77, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 16, "column": 50}, "end_point": {"row": 16, "column": 51}}, {"id": 78, "type": "number_literal", "text": "0", "parent": 69, "children": [], "start_point": {"row": 16, "column": 52}, "end_point": {"row": 16, "column": 53}}, {"id": 79, "type": "declaration", "text": "virtual void EnterSystem(const System*) = 0;", "parent": 20, "children": [80, 81, 83], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 46}}, {"id": 80, "type": "type_identifier", "text": "virtual", "parent": 79, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 9}}, {"id": 81, "type": "ERROR", "text": "void", "parent": 79, "children": [82], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 82, "type": "identifier", "text": "void", "parent": 81, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 83, "type": "init_declarator", "text": "EnterSystem(const System*) = 0", "parent": 79, "children": [84, 91, 92], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 45}}, {"id": 84, "type": "function_declarator", "text": "EnterSystem(const System*)", "parent": 83, "children": [85, 86], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 41}}, {"id": 85, "type": "identifier", "text": "EnterSystem", "parent": 84, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 26}}, {"id": 86, "type": "parameter_list", "text": "(const System*)", "parent": 84, "children": [87], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 41}}, {"id": 87, "type": "parameter_declaration", "text": "const System*", "parent": 86, "children": [88, 89], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 40}}, {"id": 88, "type": "type_identifier", "text": "System", "parent": 87, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 39}}, {"id": 89, "type": "abstract_pointer_declarator", "text": "*", "parent": 87, "children": [90], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 40}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 40}}, {"id": 91, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 43}}, {"id": 92, "type": "number_literal", "text": "0", "parent": 83, "children": [], "start_point": {"row": 18, "column": 44}, "end_point": {"row": 18, "column": 45}}, {"id": 93, "type": "declaration", "text": "virtual void ExistSystem(const System*) = 0;", "parent": 20, "children": [94, 95, 97], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 46}}, {"id": 94, "type": "type_identifier", "text": "virtual", "parent": 93, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 9}}, {"id": 95, "type": "ERROR", "text": "void", "parent": 93, "children": [96], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 14}}, {"id": 96, "type": "identifier", "text": "void", "parent": 95, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 14}}, {"id": 97, "type": "init_declarator", "text": "ExistSystem(const System*) = 0", "parent": 93, "children": [98, 105, 106], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 45}}, {"id": 98, "type": "function_declarator", "text": "ExistSystem(const System*)", "parent": 97, "children": [99, 100], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 41}}, {"id": 99, "type": "identifier", "text": "ExistSystem", "parent": 98, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 26}}, {"id": 100, "type": "parameter_list", "text": "(const System*)", "parent": 98, "children": [101], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 41}}, {"id": 101, "type": "parameter_declaration", "text": "const System*", "parent": 100, "children": [102, 103], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 40}}, {"id": 102, "type": "type_identifier", "text": "System", "parent": 101, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 39}}, {"id": 103, "type": "abstract_pointer_declarator", "text": "*", "parent": 101, "children": [104], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 40}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 40}}, {"id": 105, "type": "=", "text": "=", "parent": 97, "children": [], "start_point": {"row": 19, "column": 42}, "end_point": {"row": 19, "column": 43}}, {"id": 106, "type": "number_literal", "text": "0", "parent": 97, "children": [], "start_point": {"row": 19, "column": 44}, "end_point": {"row": 19, "column": 45}}, {"id": 107, "type": "declaration", "text": "virtual void EnterEntityMngr(const EntityMngr*) = 0;", "parent": 20, "children": [108, 109, 111], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 54}}, {"id": 108, "type": "type_identifier", "text": "virtual", "parent": 107, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 9}}, {"id": 109, "type": "ERROR", "text": "void", "parent": 107, "children": [110], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 14}}, {"id": 110, "type": "identifier", "text": "void", "parent": 109, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 14}}, {"id": 111, "type": "init_declarator", "text": "EnterEntityMngr(const EntityMngr*) = 0", "parent": 107, "children": [112, 119, 120], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 53}}, {"id": 112, "type": "function_declarator", "text": "EnterEntityMngr(const EntityMngr*)", "parent": 111, "children": [113, 114], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 49}}, {"id": 113, "type": "identifier", "text": "EnterEntityMngr", "parent": 112, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 30}}, {"id": 114, "type": "parameter_list", "text": "(const EntityMngr*)", "parent": 112, "children": [115], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 49}}, {"id": 115, "type": "parameter_declaration", "text": "const EntityMngr*", "parent": 114, "children": [116, 117], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 48}}, {"id": 116, "type": "type_identifier", "text": "EntityMngr", "parent": 115, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 47}}, {"id": 117, "type": "abstract_pointer_declarator", "text": "*", "parent": 115, "children": [118], "start_point": {"row": 21, "column": 47}, "end_point": {"row": 21, "column": 48}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 21, "column": 47}, "end_point": {"row": 21, "column": 48}}, {"id": 119, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 51}}, {"id": 120, "type": "number_literal", "text": "0", "parent": 111, "children": [], "start_point": {"row": 21, "column": 52}, "end_point": {"row": 21, "column": 53}}, {"id": 121, "type": "declaration", "text": "virtual void ExistEntityMngr(const EntityMngr*) = 0;", "parent": 20, "children": [122, 123, 125], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 54}}, {"id": 122, "type": "type_identifier", "text": "virtual", "parent": 121, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 9}}, {"id": 123, "type": "ERROR", "text": "void", "parent": 121, "children": [124], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 124, "type": "identifier", "text": "void", "parent": 123, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 125, "type": "init_declarator", "text": "ExistEntityMngr(const EntityMngr*) = 0", "parent": 121, "children": [126, 133, 134], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 53}}, {"id": 126, "type": "function_declarator", "text": "ExistEntityMngr(const EntityMngr*)", "parent": 125, "children": [127, 128], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 49}}, {"id": 127, "type": "identifier", "text": "ExistEntityMngr", "parent": 126, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 30}}, {"id": 128, "type": "parameter_list", "text": "(const EntityMngr*)", "parent": 126, "children": [129], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 49}}, {"id": 129, "type": "parameter_declaration", "text": "const EntityMngr*", "parent": 128, "children": [130, 131], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 48}}, {"id": 130, "type": "type_identifier", "text": "EntityMngr", "parent": 129, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 47}}, {"id": 131, "type": "abstract_pointer_declarator", "text": "*", "parent": 129, "children": [132], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 48}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 48}}, {"id": 133, "type": "=", "text": "=", "parent": 125, "children": [], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 51}}, {"id": 134, "type": "number_literal", "text": "0", "parent": 125, "children": [], "start_point": {"row": 22, "column": 52}, "end_point": {"row": 22, "column": 53}}, {"id": 135, "type": "declaration", "text": "virtual void EnterEntity(const Entity*) = 0;", "parent": 20, "children": [136, 137, 139], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 46}}, {"id": 136, "type": "type_identifier", "text": "virtual", "parent": 135, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 9}}, {"id": 137, "type": "ERROR", "text": "void", "parent": 135, "children": [138], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 14}}, {"id": 138, "type": "identifier", "text": "void", "parent": 137, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 14}}, {"id": 139, "type": "init_declarator", "text": "EnterEntity(const Entity*) = 0", "parent": 135, "children": [140, 147, 148], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 45}}, {"id": 140, "type": "function_declarator", "text": "EnterEntity(const Entity*)", "parent": 139, "children": [141, 142], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 41}}, {"id": 141, "type": "identifier", "text": "EnterEntity", "parent": 140, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 26}}, {"id": 142, "type": "parameter_list", "text": "(const Entity*)", "parent": 140, "children": [143], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 41}}, {"id": 143, "type": "parameter_declaration", "text": "const Entity*", "parent": 142, "children": [144, 145], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 40}}, {"id": 144, "type": "type_identifier", "text": "Entity", "parent": 143, "children": [], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 39}}, {"id": 145, "type": "abstract_pointer_declarator", "text": "*", "parent": 143, "children": [146], "start_point": {"row": 24, "column": 39}, "end_point": {"row": 24, "column": 40}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 24, "column": 39}, "end_point": {"row": 24, "column": 40}}, {"id": 147, "type": "=", "text": "=", "parent": 139, "children": [], "start_point": {"row": 24, "column": 42}, "end_point": {"row": 24, "column": 43}}, {"id": 148, "type": "number_literal", "text": "0", "parent": 139, "children": [], "start_point": {"row": 24, "column": 44}, "end_point": {"row": 24, "column": 45}}, {"id": 149, "type": "declaration", "text": "virtual void ExistEntity(const Entity*) = 0;", "parent": 20, "children": [150, 151, 153], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 46}}, {"id": 150, "type": "type_identifier", "text": "virtual", "parent": 149, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 9}}, {"id": 151, "type": "ERROR", "text": "void", "parent": 149, "children": [152], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 152, "type": "identifier", "text": "void", "parent": 151, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 153, "type": "init_declarator", "text": "ExistEntity(const Entity*) = 0", "parent": 149, "children": [154, 161, 162], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 45}}, {"id": 154, "type": "function_declarator", "text": "ExistEntity(const Entity*)", "parent": 153, "children": [155, 156], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 41}}, {"id": 155, "type": "identifier", "text": "ExistEntity", "parent": 154, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 26}}, {"id": 156, "type": "parameter_list", "text": "(const Entity*)", "parent": 154, "children": [157], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 41}}, {"id": 157, "type": "parameter_declaration", "text": "const Entity*", "parent": 156, "children": [158, 159], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 40}}, {"id": 158, "type": "type_identifier", "text": "Entity", "parent": 157, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 39}}, {"id": 159, "type": "abstract_pointer_declarator", "text": "*", "parent": 157, "children": [160], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 40}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 40}}, {"id": 161, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 43}}, {"id": 162, "type": "number_literal", "text": "0", "parent": 153, "children": [], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 45}}, {"id": 163, "type": "declaration", "text": "virtual void EnterCmptPtr(const CmptPtr*) = 0;", "parent": 20, "children": [164, 165, 167], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 48}}, {"id": 164, "type": "type_identifier", "text": "virtual", "parent": 163, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 9}}, {"id": 165, "type": "ERROR", "text": "void", "parent": 163, "children": [166], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 14}}, {"id": 166, "type": "identifier", "text": "void", "parent": 165, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 14}}, {"id": 167, "type": "init_declarator", "text": "EnterCmptPtr(const CmptPtr*) = 0", "parent": 163, "children": [168, 175, 176], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 47}}, {"id": 168, "type": "function_declarator", "text": "EnterCmptPtr(const CmptPtr*)", "parent": 167, "children": [169, 170], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 43}}, {"id": 169, "type": "identifier", "text": "EnterCmptPtr", "parent": 168, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 27}}, {"id": 170, "type": "parameter_list", "text": "(const CmptPtr*)", "parent": 168, "children": [171], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 43}}, {"id": 171, "type": "parameter_declaration", "text": "const CmptPtr*", "parent": 170, "children": [172, 173], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 42}}, {"id": 172, "type": "type_identifier", "text": "CmptPtr", "parent": 171, "children": [], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 41}}, {"id": 173, "type": "abstract_pointer_declarator", "text": "*", "parent": 171, "children": [174], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 42}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 42}}, {"id": 175, "type": "=", "text": "=", "parent": 167, "children": [], "start_point": {"row": 27, "column": 44}, "end_point": {"row": 27, "column": 45}}, {"id": 176, "type": "number_literal", "text": "0", "parent": 167, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 47}}, {"id": 177, "type": "declaration", "text": "virtual void ExistCmptPtr(const CmptPtr*) = 0;", "parent": 20, "children": [178, 179, 181], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 48}}, {"id": 178, "type": "type_identifier", "text": "virtual", "parent": 177, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 9}}, {"id": 179, "type": "ERROR", "text": "void", "parent": 177, "children": [180], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 14}}, {"id": 180, "type": "identifier", "text": "void", "parent": 179, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 14}}, {"id": 181, "type": "init_declarator", "text": "ExistCmptPtr(const CmptPtr*) = 0", "parent": 177, "children": [182, 189, 190], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 47}}, {"id": 182, "type": "function_declarator", "text": "ExistCmptPtr(const CmptPtr*)", "parent": 181, "children": [183, 184], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 43}}, {"id": 183, "type": "identifier", "text": "ExistCmptPtr", "parent": 182, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 27}}, {"id": 184, "type": "parameter_list", "text": "(const CmptPtr*)", "parent": 182, "children": [185], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 43}}, {"id": 185, "type": "parameter_declaration", "text": "const CmptPtr*", "parent": 184, "children": [186, 187], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 42}}, {"id": 186, "type": "type_identifier", "text": "CmptPtr", "parent": 185, "children": [], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 41}}, {"id": 187, "type": "abstract_pointer_declarator", "text": "*", "parent": 185, "children": [188], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 42}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 42}}, {"id": 189, "type": "=", "text": "=", "parent": 181, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 45}}, {"id": 190, "type": "number_literal", "text": "0", "parent": 181, "children": [], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 47}}]}, "node_categories": {"declarations": {"functions": [3, 20, 28, 42, 56, 70, 84, 98, 112, 126, 140, 154, 168, 182], "variables": [8, 10, 12, 14, 16, 18, 23, 31, 37, 45, 51, 59, 65, 73, 79, 87, 93, 101, 107, 115, 121, 129, 135, 143, 149, 157, 163, 171, 177, 185], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [4, 5, 7, 9, 11, 13, 15, 17, 19, 21, 24, 26, 29, 32, 38, 40, 43, 46, 52, 54, 57, 60, 66, 68, 71, 74, 80, 82, 85, 88, 94, 96, 99, 102, 108, 110, 113, 116, 122, 124, 127, 130, 136, 138, 141, 144, 150, 152, 155, 158, 164, 166, 169, 172, 178, 180, 183, 186], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [36, 50, 64, 78, 92, 106, 120, 134, 148, 162, 176, 190], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "World;", "text_snippet": "namespace Ubpa::UECS {\n\tclass World;\n\tclass SystemMngr;\n\tclass System;\n\tclass EntityMngr;\n\tclass Ent"}, {"node_id": 20, "universal_type": "function", "name": "IListener", "text_snippet": "class IListener {\n\tpublic:\n\t\tvirtual void EnterWorld(const World*) = 0;\n\t\tvirtual void ExistWorld(co"}, {"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "EnterWorld(const World*)"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "ExistWorld(const World*)"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "EnterSystemMngr(const SystemMngr*)"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "ExistSystemMngr(const SystemMngr*)"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "EnterSystem(const System*)"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "ExistSystem(const System*)"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "EnterEntityMngr(const EntityMngr*)"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "ExistEntityMngr(const EntityMngr*)"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "EnterEntity(const Entity*)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "ExistEntity(const Entity*)"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "EnterCmptPtr(const CmptPtr*)"}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": "ExistCmptPtr(const CmptPtr*)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#pragma once\n\nnamespace Ubpa::UECS {\n\tclass World;\n\tclass SystemMngr;\n\tclass System;\n\tclass EntityMngr;\n\tclass Entity;\n\tclass CmptPtr;\n\n\tclass IListener {\n\tpublic:\n\t\tvirtual void EnterWorld(const World*) = 0;\n\t\tvirtual void ExistWorld(const World*) = 0;\n\n\t\tvirtual void EnterSystemMngr(const SystemMngr*) = 0;\n\t\tvirtual void ExistSystemMngr(const SystemMngr*) = 0;\n\n\t\tvirtual void EnterSystem(const System*) = 0;\n\t\tvirtual void ExistSystem(const System*) = 0;\n\n\t\tvirtual void EnterEntityMngr(const EntityMngr*) = 0;\n\t\tvirtual void ExistEntityMngr(const EntityMngr*) = 0;\n\n\t\tvirtual void EnterEntity(const Entity*) = 0;\n\t\tvirtual void ExistEntity(const Entity*) = 0;\n\n\t\tvirtual void EnterCmptPtr(const CmptPtr*) = 0;\n\t\tvirtual void ExistCmptPtr(const CmptPtr*) = 0;\n\t};\n}\n"}
263
c
// // UIImage+KMUtilities.h // Tun2Web // // Created by kevinma on 2016/10/20. // Copyright © 2016年 kevinma. All rights reserved. // #import <UIKit/UIKit.h> @interface UIImage (KMUtilities) + (UIImage *)bundleImageNamed:(NSString *)name; + (UIImage *)fixOrientation:(UIImage *)srcImg; - (UIImage *)normalizedImage ; @end
24
13
(translation_unit) "//\n// UIImage+KMUtilities.h\n// Tun2Web\n//\n// Created by kevinma on 2016/10/20.\n// Copyright © 2016年 kevinma. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIImage (KMUtilities)\n\n+ (UIImage *)bundleImageNamed:(NSString *)name;\n+ (UIImage *)fixOrientation:(UIImage *)srcImg;\n- (UIImage *)normalizedImage ;\n\n@end\n" (comment) "//" (comment) "// UIImage+KMUtilities.h" (comment) "// Tun2Web" (comment) "//" (comment) "// Created by kevinma on 2016/10/20." (comment) "// Copyright © 2016年 kevinma. 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 UIImage (KMUtilities)\n\n+ (UIImage *)bundleImageNamed:(NSString *)name;\n+" (ERROR) "t" (type_identifier) "erface UI" (function_declarator) "mage (KMUtilities)\n\n+" (identifier) "mage (K" (parameter_list) "Utilities)\n\n+" (() "U" (identifier) "tilities)\n\n" ()) "+" (unary_expression) "UIImage *)bundleImageNamed:(N" (+) "U" (cast_expression) "Image *)bundleImageNamed:(N" (() "I" (type_descriptor) "mage *)bu" (type_identifier) "mage *)" (abstract_pointer_declarator) "u" (*) "u" ()) "n" (identifier) "dleImageNamed:(N" (:) "S" (() "S" (binary_expression) "tring *)name;\n+" (identifier) "tring *)" (*) "a" (ERROR) "m" ()) "m" (identifier) "e;\n+" (expression_statement) " " (;) " " (expression_statement) "UIImage *)fixOrientation:(UIImage *)srcImg;\n- " (update_expression) "UIImage *)fixOrientation:(UIImage *)srcImg;\n-" (binary_expression) "UIImage *)fixOrientation:(UIImage *)srcImg;\n-" (unary_expression) "UIImage *)fixOrientation:(U" (+) "U" (cast_expression) "Image *)fixOrientation:(U" (() "I" (type_descriptor) "mage *)fi" (type_identifier) "mage *)" (abstract_pointer_declarator) "i" (*) "i" ()) "x" (identifier) "Orientation:(U" (ERROR) "IImage *)" (:) "I" (() "I" (identifier) "mage *)" (*) "r" (ERROR) "c" ()) "c" (identifier) "Img;\n-" (--) "" (;) " " (expression_statement) "UIImage *)normalizedImage ;\n\n@" (unary_expression) "UIImage *)normalizedImage ;\n" (-) "U" (cast_expression) "Image *)normalizedImage ;\n" (() "I" (type_descriptor) "mage *)no" (type_identifier) "mage *)" (abstract_pointer_declarator) "o" (*) "o" ()) "r" (identifier) "malizedImage ;\n" (;) "@" (ERROR) "d" (ERROR) "d" (expression_statement) "\n" (identifier) "\n" (;) ""
80
7
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 24.0, "nodes": 50, "errors": 0, "source_hash": "931dd9d8265bcb9cc1e07c834a929d917c11211940bb20976f6188d9d463b63e", "categorized_nodes": 25}, "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 UIImage (KMUtilities)\n\n+ (UIImage *)bundleImageNamed:(NSString *)name;\n+", "parent": null, "children": [4, 5, 6, 10, 18], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 46}}, {"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 UI", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "function_declarator", "text": "mage (KMUtilities)\n\n+", "parent": 3, "children": [7, 8], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 32}}, {"id": 7, "type": "identifier", "text": "mage (K", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 18}}, {"id": 8, "type": "parameter_list", "text": "Utilities)\n\n+", "parent": 6, "children": [9], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 32}}, {"id": 9, "type": "identifier", "text": "tilities)\n\n", "parent": 8, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 31}}, {"id": 10, "type": "unary_expression", "text": "UIImage *)bundleImageNamed:(N", "parent": 3, "children": [11, 12], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 29}}, {"id": 11, "type": "+", "text": "U", "parent": 10, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 12, "type": "cast_expression", "text": "Image *)bundleImageNamed:(N", "parent": 10, "children": [13, 17], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 29}}, {"id": 13, "type": "type_descriptor", "text": "mage *)bu", "parent": 12, "children": [14, 15], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 12}}, {"id": 14, "type": "type_identifier", "text": "mage *)", "parent": 13, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 10}}, {"id": 15, "type": "abstract_pointer_declarator", "text": "u", "parent": 13, "children": [16], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 12}}, {"id": 16, "type": "*", "text": "u", "parent": 15, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 12}}, {"id": 17, "type": "identifier", "text": "dleImageNamed:(N", "parent": 12, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 29}}, {"id": 18, "type": "binary_expression", "text": "tring *)name;\n+", "parent": 3, "children": [19, 20, 21, 22], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 46}}, {"id": 19, "type": "identifier", "text": "tring *)", "parent": 18, "children": [], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 39}}, {"id": 20, "type": "*", "text": "a", "parent": 18, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 41}}, {"id": 21, "type": "ERROR", "text": "m", "parent": 18, "children": [], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 42}}, {"id": 22, "type": "identifier", "text": "e;\n+", "parent": 18, "children": [], "start_point": {"row": 12, "column": 42}, "end_point": {"row": 12, "column": 46}}, {"id": 23, "type": "update_expression", "text": "UIImage *)fixOrientation:(UIImage *)srcImg;\n-", "parent": null, "children": [24, 38], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 45}}, {"id": 24, "type": "binary_expression", "text": "UIImage *)fixOrientation:(UIImage *)srcImg;\n-", "parent": 23, "children": [25, 33, 35, 36, 37], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 45}}, {"id": 25, "type": "unary_expression", "text": "UIImage *)fixOrientation:(U", "parent": 24, "children": [26, 27], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 27}}, {"id": 26, "type": "+", "text": "U", "parent": 25, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 27, "type": "cast_expression", "text": "Image *)fixOrientation:(U", "parent": 25, "children": [28, 32], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 27}}, {"id": 28, "type": "type_descriptor", "text": "mage *)fi", "parent": 27, "children": [29, 30], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 12}}, {"id": 29, "type": "type_identifier", "text": "mage *)", "parent": 28, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 10}}, {"id": 30, "type": "abstract_pointer_declarator", "text": "i", "parent": 28, "children": [31], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 31, "type": "*", "text": "i", "parent": 30, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 12}}, {"id": 32, "type": "identifier", "text": "Orientation:(U", "parent": 27, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 27}}, {"id": 33, "type": "ERROR", "text": "IImage *)", "parent": 24, "children": [34], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 36}}, {"id": 34, "type": "identifier", "text": "mage *)", "parent": 33, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 36}}, {"id": 35, "type": "*", "text": "r", "parent": 24, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 36, "type": "ERROR", "text": "c", "parent": 24, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 39}}, {"id": 37, "type": "identifier", "text": "Img;\n-", "parent": 24, "children": [], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 45}}, {"id": 38, "type": "--", "text": "", "parent": 23, "children": [], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 45}}, {"id": 39, "type": "unary_expression", "text": "UIImage *)normalizedImage ;\n", "parent": null, "children": [40, 41], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 28}}, {"id": 40, "type": "-", "text": "U", "parent": 39, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 41, "type": "cast_expression", "text": "Image *)normalizedImage ;\n", "parent": 39, "children": [42, 46], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 28}}, {"id": 42, "type": "type_descriptor", "text": "mage *)no", "parent": 41, "children": [43, 44], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 12}}, {"id": 43, "type": "type_identifier", "text": "mage *)", "parent": 42, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 10}}, {"id": 44, "type": "abstract_pointer_declarator", "text": "o", "parent": 42, "children": [45], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 12}}, {"id": 45, "type": "*", "text": "o", "parent": 44, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 12}}, {"id": 46, "type": "identifier", "text": "malizedImage ;\n", "parent": 41, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 28}}, {"id": 47, "type": "ERROR", "text": "d", "parent": null, "children": [48], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 48, "type": "ERROR", "text": "d", "parent": 47, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 49, "type": "identifier", "text": "\n", "parent": null, "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, 12, 18, 23, 24, 25, 27, 39, 41], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 14, 17, 19, 22, 29, 32, 34, 37, 43, 46, 49], "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": "mage (KMUtilities)\n\n+"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// UIImage+KMUtilities.h\n// Tun2Web\n//\n// Created by kevinma on 2016/10/20.\n// Copyright \u00a9 2016\u5e74 kevinma. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIImage (KMUtilities)\n\n+ (UIImage *)bundleImageNamed:(NSString *)name;\n+ (UIImage *)fixOrientation:(UIImage *)srcImg;\n- (UIImage *)normalizedImage ;\n\n@end\n"}
264
c
/**************************************************************************** * * Copyright 2017 Samsung Electronics 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. * ****************************************************************************/ /** * @file command.c */ #include "command.h" #include <stdio.h> #include <string.h> void usage(const char *command_base, const struct command *commands) { const struct command *cmd = commands; fprintf(stderr, "usage:\n"); while (cmd->fn) { fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage); cmd++; } } int commands_parser(int argc, char **argv, const struct command *commands) { const struct command *cmd = commands; if (argc < 2) { usage(argv[0], commands); return -1; } while (cmd->fn) { if (!strcmp(argv[1], (const char *)cmd->name)) { if (cmd->fn) { char tname[32]; snprintf(tname, 32, "%s_command", cmd->name); task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv); } break; } cmd++; } if (!cmd->fn) { fprintf(stderr, "Unknown command\n"); usage(argv[0], commands); return -1; } return 0; }
27.17
59
(translation_unit) "/****************************************************************************\n *\n * Copyright 2017 Samsung Electronics All Rights 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,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n ****************************************************************************/\n\n/**\n * @file command.c\n */\n\n\n#include "command.h"\n\n#include <stdio.h>\n#include <string.h>\n\nvoid usage(const char *command_base, const struct command *commands)\n{\n const struct command *cmd = commands;\n\n fprintf(stderr, "usage:\n");\n\n while (cmd->fn) {\n fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage);\n cmd++;\n }\n}\n\n\nint commands_parser(int argc, char **argv, const struct command *commands)\n{\n const struct command *cmd = commands;\n\n if (argc < 2) {\n usage(argv[0], commands);\n return -1;\n }\n\n while (cmd->fn) {\n if (!strcmp(argv[1], (const char *)cmd->name)) {\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }\n\n cmd++;\n }\n\n if (!cmd->fn) {\n fprintf(stderr, "Unknown command\n");\n usage(argv[0], commands);\n return -1;\n }\n\n return 0;\n}\n" (comment) "/****************************************************************************\n *\n * Copyright 2017 Samsung Electronics All Rights 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,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n ****************************************************************************/" (comment) "/**\n * @file command.c\n */" (preproc_include) "#include "command.h"\n" (#include) "#include" (string_literal) ""command.h"" (") """ (string_content) "command.h" (") """ (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (function_definition) "void usage(const char *command_base, const struct command *commands)\n{\n const struct command *cmd = commands;\n\n fprintf(stderr, "usage:\n");\n\n while (cmd->fn) {\n fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage);\n cmd++;\n }\n}" (primitive_type) "void" (function_declarator) "usage(const char *command_base, const struct command *commands)" (identifier) "usage" (parameter_list) "(const char *command_base, const struct command *commands)" (() "(" (parameter_declaration) "const char *command_base" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*command_base" (*) "*" (identifier) "command_base" (,) "," (parameter_declaration) "const struct command *commands" (type_qualifier) "const" (const) "const" (struct_specifier) "struct command" (struct) "struct" (type_identifier) "command" (pointer_declarator) "*commands" (*) "*" (identifier) "commands" ()) ")" (compound_statement) "{\n const struct command *cmd = commands;\n\n fprintf(stderr, "usage:\n");\n\n while (cmd->fn) {\n fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage);\n cmd++;\n }\n}" ({) "{" (declaration) "const struct command *cmd = commands;" (type_qualifier) "const" (const) "const" (struct_specifier) "struct command" (struct) "struct" (type_identifier) "command" (init_declarator) "*cmd = commands" (pointer_declarator) "*cmd" (*) "*" (identifier) "cmd" (=) "=" (identifier) "commands" (;) ";" (expression_statement) "fprintf(stderr, "usage:\n");" (call_expression) "fprintf(stderr, "usage:\n")" (identifier) "fprintf" (argument_list) "(stderr, "usage:\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""usage:\n"" (") """ (string_content) "usage:" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (while_statement) "while (cmd->fn) {\n fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage);\n cmd++;\n }" (while) "while" (parenthesized_expression) "(cmd->fn)" (() "(" (field_expression) "cmd->fn" (identifier) "cmd" (->) "->" (field_identifier) "fn" ()) ")" (compound_statement) "{\n fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage);\n cmd++;\n }" ({) "{" (expression_statement) "fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage);" (call_expression) "fprintf(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage)" (identifier) "fprintf" (argument_list) "(stderr, "\t%s %s - %s\n", command_base, cmd->name, cmd->usage)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t%s %s - %s\n"" (") """ (escape_sequence) "\t" (string_content) "%s %s - %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "command_base" (,) "," (field_expression) "cmd->name" (identifier) "cmd" (->) "->" (field_identifier) "name" (,) "," (field_expression) "cmd->usage" (identifier) "cmd" (->) "->" (field_identifier) "usage" ()) ")" (;) ";" (expression_statement) "cmd++;" (update_expression) "cmd++" (identifier) "cmd" (++) "++" (;) ";" (}) "}" (}) "}" (function_definition) "int commands_parser(int argc, char **argv, const struct command *commands)\n{\n const struct command *cmd = commands;\n\n if (argc < 2) {\n usage(argv[0], commands);\n return -1;\n }\n\n while (cmd->fn) {\n if (!strcmp(argv[1], (const char *)cmd->name)) {\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }\n\n cmd++;\n }\n\n if (!cmd->fn) {\n fprintf(stderr, "Unknown command\n");\n usage(argv[0], commands);\n return -1;\n }\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "commands_parser(int argc, char **argv, const struct command *commands)" (identifier) "commands_parser" (parameter_list) "(int argc, char **argv, const struct command *commands)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char **argv" (primitive_type) "char" (pointer_declarator) "**argv" (*) "*" (pointer_declarator) "*argv" (*) "*" (identifier) "argv" (,) "," (parameter_declaration) "const struct command *commands" (type_qualifier) "const" (const) "const" (struct_specifier) "struct command" (struct) "struct" (type_identifier) "command" (pointer_declarator) "*commands" (*) "*" (identifier) "commands" ()) ")" (compound_statement) "{\n const struct command *cmd = commands;\n\n if (argc < 2) {\n usage(argv[0], commands);\n return -1;\n }\n\n while (cmd->fn) {\n if (!strcmp(argv[1], (const char *)cmd->name)) {\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }\n\n cmd++;\n }\n\n if (!cmd->fn) {\n fprintf(stderr, "Unknown command\n");\n usage(argv[0], commands);\n return -1;\n }\n\n return 0;\n}" ({) "{" (declaration) "const struct command *cmd = commands;" (type_qualifier) "const" (const) "const" (struct_specifier) "struct command" (struct) "struct" (type_identifier) "command" (init_declarator) "*cmd = commands" (pointer_declarator) "*cmd" (*) "*" (identifier) "cmd" (=) "=" (identifier) "commands" (;) ";" (if_statement) "if (argc < 2) {\n usage(argv[0], commands);\n return -1;\n }" (if) "if" (parenthesized_expression) "(argc < 2)" (() "(" (binary_expression) "argc < 2" (identifier) "argc" (<) "<" (number_literal) "2" ()) ")" (compound_statement) "{\n usage(argv[0], commands);\n return -1;\n }" ({) "{" (expression_statement) "usage(argv[0], commands);" (call_expression) "usage(argv[0], commands)" (identifier) "usage" (argument_list) "(argv[0], commands)" (() "(" (subscript_expression) "argv[0]" (identifier) "argv" ([) "[" (number_literal) "0" (]) "]" (,) "," (identifier) "commands" ()) ")" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (while_statement) "while (cmd->fn) {\n if (!strcmp(argv[1], (const char *)cmd->name)) {\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }\n\n cmd++;\n }" (while) "while" (parenthesized_expression) "(cmd->fn)" (() "(" (field_expression) "cmd->fn" (identifier) "cmd" (->) "->" (field_identifier) "fn" ()) ")" (compound_statement) "{\n if (!strcmp(argv[1], (const char *)cmd->name)) {\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }\n\n cmd++;\n }" ({) "{" (if_statement) "if (!strcmp(argv[1], (const char *)cmd->name)) {\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }" (if) "if" (parenthesized_expression) "(!strcmp(argv[1], (const char *)cmd->name))" (() "(" (unary_expression) "!strcmp(argv[1], (const char *)cmd->name)" (!) "!" (call_expression) "strcmp(argv[1], (const char *)cmd->name)" (identifier) "strcmp" (argument_list) "(argv[1], (const char *)cmd->name)" (() "(" (subscript_expression) "argv[1]" (identifier) "argv" ([) "[" (number_literal) "1" (]) "]" (,) "," (cast_expression) "(const char *)cmd->name" (() "(" (type_descriptor) "const char *" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "cmd->name" (identifier) "cmd" (->) "->" (field_identifier) "name" ()) ")" ()) ")" (compound_statement) "{\n if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }\n break;\n }" ({) "{" (if_statement) "if (cmd->fn) {\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }" (if) "if" (parenthesized_expression) "(cmd->fn)" (() "(" (field_expression) "cmd->fn" (identifier) "cmd" (->) "->" (field_identifier) "fn" ()) ")" (compound_statement) "{\n char tname[32];\n\n snprintf(tname, 32, "%s_command", cmd->name);\n task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n }" ({) "{" (declaration) "char tname[32];" (primitive_type) "char" (array_declarator) "tname[32]" (identifier) "tname" ([) "[" (number_literal) "32" (]) "]" (;) ";" (expression_statement) "snprintf(tname, 32, "%s_command", cmd->name);" (call_expression) "snprintf(tname, 32, "%s_command", cmd->name)" (identifier) "snprintf" (argument_list) "(tname, 32, "%s_command", cmd->name)" (() "(" (identifier) "tname" (,) "," (number_literal) "32" (,) "," (string_literal) ""%s_command"" (") """ (string_content) "%s_command" (") """ (,) "," (field_expression) "cmd->name" (identifier) "cmd" (->) "->" (field_identifier) "name" ()) ")" (;) ";" (expression_statement) "task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);" (call_expression) "task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv)" (identifier) "task_create" (argument_list) "(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv)" (() "(" (identifier) "tname" (,) "," (identifier) "SCHED_PRIORITY_DEFAULT" (,) "," (number_literal) "16384" (,) "," (field_expression) "cmd->fn" (identifier) "cmd" (->) "->" (field_identifier) "fn" (,) "," (identifier) "argv" ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "cmd++;" (update_expression) "cmd++" (identifier) "cmd" (++) "++" (;) ";" (}) "}" (if_statement) "if (!cmd->fn) {\n fprintf(stderr, "Unknown command\n");\n usage(argv[0], commands);\n return -1;\n }" (if) "if" (parenthesized_expression) "(!cmd->fn)" (() "(" (unary_expression) "!cmd->fn" (!) "!" (field_expression) "cmd->fn" (identifier) "cmd" (->) "->" (field_identifier) "fn" ()) ")" (compound_statement) "{\n fprintf(stderr, "Unknown command\n");\n usage(argv[0], commands);\n return -1;\n }" ({) "{" (expression_statement) "fprintf(stderr, "Unknown command\n");" (call_expression) "fprintf(stderr, "Unknown command\n")" (identifier) "fprintf" (argument_list) "(stderr, "Unknown command\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Unknown command\n"" (") """ (string_content) "Unknown command" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "usage(argv[0], commands);" (call_expression) "usage(argv[0], commands)" (identifier) "usage" (argument_list) "(argv[0], commands)" (() "(" (subscript_expression) "argv[0]" (identifier) "argv" ([) "[" (number_literal) "0" (]) "]" (,) "," (identifier) "commands" ()) ")" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
350
0
{"language": "c", "success": true, "metadata": {"lines": 59, "avg_line_length": 27.17, "nodes": 192, "errors": 0, "source_hash": "fa4e89dc5aebd23c426625e152bc1bbe126624ae071f2e1867c7147324a1a689", "categorized_nodes": 142}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"command.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"command.h\"", "parent": 0, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 19}}, {"id": 9, "type": "function_definition", "text": "void usage(const char *command_base, const struct command *commands)\n{\n\tconst struct command *cmd = commands;\n\n\tfprintf(stderr, \"usage:\\n\");\n\n\twhile (cmd->fn) {\n\t\tfprintf(stderr, \"\\t%s %s - %s\\n\", command_base, cmd->name, cmd->usage);\n\t\tcmd++;\n\t}\n}", "parent": null, "children": [10, 11], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "usage(const char *command_base, const struct command *commands)", "parent": 9, "children": [12, 13], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 68}}, {"id": 12, "type": "identifier", "text": "usage", "parent": 11, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 10}}, {"id": 13, "type": "parameter_list", "text": "(const char *command_base, const struct command *commands)", "parent": 11, "children": [14, 19], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 68}}, {"id": 14, "type": "parameter_declaration", "text": "const char *command_base", "parent": 13, "children": [15, 16], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 35}}, {"id": 15, "type": "primitive_type", "text": "char", "parent": 14, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 21}}, {"id": 16, "type": "pointer_declarator", "text": "*command_base", "parent": 14, "children": [17, 18], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 35}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 23}}, {"id": 18, "type": "identifier", "text": "command_base", "parent": 16, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 35}}, {"id": 19, "type": "parameter_declaration", "text": "const struct command *commands", "parent": 13, "children": [20, 23], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 67}}, {"id": 20, "type": "struct_specifier", "text": "struct command", "parent": 19, "children": [21, 22], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 57}}, {"id": 21, "type": "struct", "text": "struct", "parent": 20, "children": [], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 49}}, {"id": 22, "type": "type_identifier", "text": "command", "parent": 20, "children": [], "start_point": {"row": 28, "column": 50}, "end_point": {"row": 28, "column": 57}}, {"id": 23, "type": "pointer_declarator", "text": "*commands", "parent": 19, "children": [24, 25], "start_point": {"row": 28, "column": 58}, "end_point": {"row": 28, "column": 67}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 28, "column": 58}, "end_point": {"row": 28, "column": 59}}, {"id": 25, "type": "identifier", "text": "commands", "parent": 23, "children": [], "start_point": {"row": 28, "column": 59}, "end_point": {"row": 28, "column": 67}}, {"id": 26, "type": "declaration", "text": "const struct command *cmd = commands;", "parent": 9, "children": [27, 30], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 38}}, {"id": 27, "type": "struct_specifier", "text": "struct command", "parent": 26, "children": [28, 29], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 21}}, {"id": 28, "type": "struct", "text": "struct", "parent": 27, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 13}}, {"id": 29, "type": "type_identifier", "text": "command", "parent": 27, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 21}}, {"id": 30, "type": "init_declarator", "text": "*cmd = commands", "parent": 26, "children": [31, 34, 35], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 37}}, {"id": 31, "type": "pointer_declarator", "text": "*cmd", "parent": 30, "children": [32, 33], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 26}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 23}}, {"id": 33, "type": "identifier", "text": "cmd", "parent": 31, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 26}}, {"id": 34, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 28}}, {"id": 35, "type": "identifier", "text": "commands", "parent": 30, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 37}}, {"id": 36, "type": "call_expression", "text": "fprintf(stderr, \"usage:\\n\")", "parent": 9, "children": [37, 38], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 28}}, {"id": 37, "type": "identifier", "text": "fprintf", "parent": 36, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 8}}, {"id": 38, "type": "argument_list", "text": "(stderr, \"usage:\\n\")", "parent": 36, "children": [39, 40], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 28}}, {"id": 39, "type": "identifier", "text": "stderr", "parent": 38, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 15}}, {"id": 40, "type": "string_literal", "text": "\"usage:\\n\"", "parent": 38, "children": [41], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 27}}, {"id": 41, "type": "escape_sequence", "text": "\\n", "parent": 40, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 26}}, {"id": 42, "type": "while_statement", "text": "while (cmd->fn) {\n\t\tfprintf(stderr, \"\\t%s %s - %s\\n\", command_base, cmd->name, cmd->usage);\n\t\tcmd++;\n\t}", "parent": 9, "children": [43], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 37, "column": 2}}, {"id": 43, "type": "parenthesized_expression", "text": "(cmd->fn)", "parent": 42, "children": [44], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 16}}, {"id": 44, "type": "field_expression", "text": "cmd->fn", "parent": 43, "children": [45, 46], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 15}}, {"id": 45, "type": "identifier", "text": "cmd", "parent": 44, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 11}}, {"id": 46, "type": "field_identifier", "text": "fn", "parent": 44, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 15}}, {"id": 47, "type": "call_expression", "text": "fprintf(stderr, \"\\t%s %s - %s\\n\", command_base, cmd->name, cmd->usage)", "parent": 42, "children": [48, 49], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 72}}, {"id": 48, "type": "identifier", "text": "fprintf", "parent": 47, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 9}}, {"id": 49, "type": "argument_list", "text": "(stderr, \"\\t%s %s - %s\\n\", command_base, cmd->name, cmd->usage)", "parent": 47, "children": [50, 51, 54, 55, 58], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 72}}, {"id": 50, "type": "identifier", "text": "stderr", "parent": 49, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 16}}, {"id": 51, "type": "string_literal", "text": "\"\\t%s %s - %s\\n\"", "parent": 49, "children": [52, 53], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 34}}, {"id": 52, "type": "escape_sequence", "text": "\\t", "parent": 51, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 21}}, {"id": 53, "type": "escape_sequence", "text": "\\n", "parent": 51, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 33}}, {"id": 54, "type": "identifier", "text": "command_base", "parent": 49, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 48}}, {"id": 55, "type": "field_expression", "text": "cmd->name", "parent": 49, "children": [56, 57], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 59}}, {"id": 56, "type": "identifier", "text": "cmd", "parent": 55, "children": [], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 53}}, {"id": 57, "type": "field_identifier", "text": "name", "parent": 55, "children": [], "start_point": {"row": 35, "column": 55}, "end_point": {"row": 35, "column": 59}}, {"id": 58, "type": "field_expression", "text": "cmd->usage", "parent": 49, "children": [59, 60], "start_point": {"row": 35, "column": 61}, "end_point": {"row": 35, "column": 71}}, {"id": 59, "type": "identifier", "text": "cmd", "parent": 58, "children": [], "start_point": {"row": 35, "column": 61}, "end_point": {"row": 35, "column": 64}}, {"id": 60, "type": "field_identifier", "text": "usage", "parent": 58, "children": [], "start_point": {"row": 35, "column": 66}, "end_point": {"row": 35, "column": 71}}, {"id": 61, "type": "update_expression", "text": "cmd++", "parent": 42, "children": [62, 63], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 7}}, {"id": 62, "type": "identifier", "text": "cmd", "parent": 61, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 5}}, {"id": 63, "type": "++", "text": "++", "parent": 61, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 7}}, {"id": 64, "type": "function_definition", "text": "int commands_parser(int argc, char **argv, const struct command *commands)\n{\n\tconst struct command *cmd = commands;\n\n\tif (argc < 2) {\n\t\tusage(argv[0], commands);\n\t\treturn -1;\n\t}\n\n\twhile (cmd->fn) {\n\t\tif (!strcmp(argv[1], (const char *)cmd->name)) {\n\t\t\tif (cmd->fn) {\n\t\t\t\tchar tname[32];\n\n\t\t\t\tsnprintf(tname, 32, \"%s_command\", cmd->name);\n\t\t\t\ttask_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcmd++;\n\t}\n\n\tif (!cmd->fn) {\n\t\tfprintf(stderr, \"Unknown command\\n\");\n\t\tusage(argv[0], commands);\n\t\treturn -1;\n\t}\n\n\treturn 0;\n}", "parent": null, "children": [65, 66], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 65, "type": "primitive_type", "text": "int", "parent": 64, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 3}}, {"id": 66, "type": "function_declarator", "text": "commands_parser(int argc, char **argv, const struct command *commands)", "parent": 64, "children": [67, 68], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 74}}, {"id": 67, "type": "identifier", "text": "commands_parser", "parent": 66, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 19}}, {"id": 68, "type": "parameter_list", "text": "(int argc, char **argv, const struct command *commands)", "parent": 66, "children": [69, 72, 79], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 74}}, {"id": 69, "type": "parameter_declaration", "text": "int argc", "parent": 68, "children": [70, 71], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 28}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 23}}, {"id": 71, "type": "identifier", "text": "argc", "parent": 69, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 28}}, {"id": 72, "type": "parameter_declaration", "text": "char **argv", "parent": 68, "children": [73, 74], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 41}}, {"id": 73, "type": "primitive_type", "text": "char", "parent": 72, "children": [], "start_point": {"row": 41, "column": 30}, "end_point": {"row": 41, "column": 34}}, {"id": 74, "type": "pointer_declarator", "text": "**argv", "parent": 72, "children": [75, 76], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 41}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 36}}, {"id": 76, "type": "pointer_declarator", "text": "*argv", "parent": 74, "children": [77, 78], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 41}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 37}}, {"id": 78, "type": "identifier", "text": "argv", "parent": 76, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 41}}, {"id": 79, "type": "parameter_declaration", "text": "const struct command *commands", "parent": 68, "children": [80, 83], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 73}}, {"id": 80, "type": "struct_specifier", "text": "struct command", "parent": 79, "children": [81, 82], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 63}}, {"id": 81, "type": "struct", "text": "struct", "parent": 80, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 55}}, {"id": 82, "type": "type_identifier", "text": "command", "parent": 80, "children": [], "start_point": {"row": 41, "column": 56}, "end_point": {"row": 41, "column": 63}}, {"id": 83, "type": "pointer_declarator", "text": "*commands", "parent": 79, "children": [84, 85], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 41, "column": 73}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 41, "column": 65}}, {"id": 85, "type": "identifier", "text": "commands", "parent": 83, "children": [], "start_point": {"row": 41, "column": 65}, "end_point": {"row": 41, "column": 73}}, {"id": 86, "type": "declaration", "text": "const struct command *cmd = commands;", "parent": 64, "children": [87, 90], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 38}}, {"id": 87, "type": "struct_specifier", "text": "struct command", "parent": 86, "children": [88, 89], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 21}}, {"id": 88, "type": "struct", "text": "struct", "parent": 87, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 13}}, {"id": 89, "type": "type_identifier", "text": "command", "parent": 87, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 21}}, {"id": 90, "type": "init_declarator", "text": "*cmd = commands", "parent": 86, "children": [91, 94, 95], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 37}}, {"id": 91, "type": "pointer_declarator", "text": "*cmd", "parent": 90, "children": [92, 93], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 26}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 93, "type": "identifier", "text": "cmd", "parent": 91, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 26}}, {"id": 94, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 28}}, {"id": 95, "type": "identifier", "text": "commands", "parent": 90, "children": [], "start_point": {"row": 43, "column": 29}, "end_point": {"row": 43, "column": 37}}, {"id": 96, "type": "if_statement", "text": "if (argc < 2) {\n\t\tusage(argv[0], commands);\n\t\treturn -1;\n\t}", "parent": 64, "children": [97], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 48, "column": 2}}, {"id": 97, "type": "parenthesized_expression", "text": "(argc < 2)", "parent": 96, "children": [98], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 14}}, {"id": 98, "type": "binary_expression", "text": "argc < 2", "parent": 97, "children": [99, 100, 101], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 13}}, {"id": 99, "type": "identifier", "text": "argc", "parent": 98, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 9}}, {"id": 100, "type": "<", "text": "<", "parent": 98, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 11}}, {"id": 101, "type": "number_literal", "text": "2", "parent": 98, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 13}}, {"id": 102, "type": "call_expression", "text": "usage(argv[0], commands)", "parent": 96, "children": [103, 104], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 26}}, {"id": 103, "type": "identifier", "text": "usage", "parent": 102, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 7}}, {"id": 104, "type": "argument_list", "text": "(argv[0], commands)", "parent": 102, "children": [105, 108], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 26}}, {"id": 105, "type": "subscript_expression", "text": "argv[0]", "parent": 104, "children": [106, 107], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 15}}, {"id": 106, "type": "identifier", "text": "argv", "parent": 105, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 12}}, {"id": 107, "type": "number_literal", "text": "0", "parent": 105, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 14}}, {"id": 108, "type": "identifier", "text": "commands", "parent": 104, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 25}}, {"id": 109, "type": "return_statement", "text": "return -1;", "parent": 96, "children": [110], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 12}}, {"id": 110, "type": "number_literal", "text": "-1", "parent": 109, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 11}}, {"id": 111, "type": "while_statement", "text": "while (cmd->fn) {\n\t\tif (!strcmp(argv[1], (const char *)cmd->name)) {\n\t\t\tif (cmd->fn) {\n\t\t\t\tchar tname[32];\n\n\t\t\t\tsnprintf(tname, 32, \"%s_command\", cmd->name);\n\t\t\t\ttask_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcmd++;\n\t}", "parent": 64, "children": [112], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 62, "column": 2}}, {"id": 112, "type": "parenthesized_expression", "text": "(cmd->fn)", "parent": 111, "children": [113], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 16}}, {"id": 113, "type": "field_expression", "text": "cmd->fn", "parent": 112, "children": [114, 115], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 15}}, {"id": 114, "type": "identifier", "text": "cmd", "parent": 113, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 11}}, {"id": 115, "type": "field_identifier", "text": "fn", "parent": 113, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 15}}, {"id": 116, "type": "if_statement", "text": "if (!strcmp(argv[1], (const char *)cmd->name)) {\n\t\t\tif (cmd->fn) {\n\t\t\t\tchar tname[32];\n\n\t\t\t\tsnprintf(tname, 32, \"%s_command\", cmd->name);\n\t\t\t\ttask_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n\t\t\t}\n\t\t\tbreak;\n\t\t}", "parent": 111, "children": [117], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 59, "column": 3}}, {"id": 117, "type": "parenthesized_expression", "text": "(!strcmp(argv[1], (const char *)cmd->name))", "parent": 116, "children": [118], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 48}}, {"id": 118, "type": "unary_expression", "text": "!strcmp(argv[1], (const char *)cmd->name)", "parent": 117, "children": [119, 120], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 47}}, {"id": 119, "type": "!", "text": "!", "parent": 118, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 7}}, {"id": 120, "type": "call_expression", "text": "strcmp(argv[1], (const char *)cmd->name)", "parent": 118, "children": [121, 122], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 47}}, {"id": 121, "type": "identifier", "text": "strcmp", "parent": 120, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 13}}, {"id": 122, "type": "argument_list", "text": "(argv[1], (const char *)cmd->name)", "parent": 120, "children": [123, 126], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 47}}, {"id": 123, "type": "subscript_expression", "text": "argv[1]", "parent": 122, "children": [124, 125], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 21}}, {"id": 124, "type": "identifier", "text": "argv", "parent": 123, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 18}}, {"id": 125, "type": "number_literal", "text": "1", "parent": 123, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 20}}, {"id": 126, "type": "cast_expression", "text": "(const char *)cmd->name", "parent": 122, "children": [127, 131], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 46}}, {"id": 127, "type": "type_descriptor", "text": "const char *", "parent": 126, "children": [128, 129], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 36}}, {"id": 128, "type": "primitive_type", "text": "char", "parent": 127, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 34}}, {"id": 129, "type": "abstract_pointer_declarator", "text": "*", "parent": 127, "children": [130], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 36}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 36}}, {"id": 131, "type": "field_expression", "text": "cmd->name", "parent": 126, "children": [132, 133], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 46}}, {"id": 132, "type": "identifier", "text": "cmd", "parent": 131, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 40}}, {"id": 133, "type": "field_identifier", "text": "name", "parent": 131, "children": [], "start_point": {"row": 51, "column": 42}, "end_point": {"row": 51, "column": 46}}, {"id": 134, "type": "if_statement", "text": "if (cmd->fn) {\n\t\t\t\tchar tname[32];\n\n\t\t\t\tsnprintf(tname, 32, \"%s_command\", cmd->name);\n\t\t\t\ttask_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n\t\t\t}", "parent": 116, "children": [135], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 57, "column": 4}}, {"id": 135, "type": "parenthesized_expression", "text": "(cmd->fn)", "parent": 134, "children": [136], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 15}}, {"id": 136, "type": "field_expression", "text": "cmd->fn", "parent": 135, "children": [137, 138], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 14}}, {"id": 137, "type": "identifier", "text": "cmd", "parent": 136, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 10}}, {"id": 138, "type": "field_identifier", "text": "fn", "parent": 136, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 14}}, {"id": 139, "type": "declaration", "text": "char tname[32];", "parent": 134, "children": [140, 141], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 19}}, {"id": 140, "type": "primitive_type", "text": "char", "parent": 139, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 8}}, {"id": 141, "type": "array_declarator", "text": "tname[32]", "parent": 139, "children": [142, 143], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 18}}, {"id": 142, "type": "identifier", "text": "tname", "parent": 141, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 14}}, {"id": 143, "type": "number_literal", "text": "32", "parent": 141, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 17}}, {"id": 144, "type": "call_expression", "text": "snprintf(tname, 32, \"%s_command\", cmd->name)", "parent": 134, "children": [145, 146], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 48}}, {"id": 145, "type": "identifier", "text": "snprintf", "parent": 144, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 12}}, {"id": 146, "type": "argument_list", "text": "(tname, 32, \"%s_command\", cmd->name)", "parent": 144, "children": [147, 148, 149, 150], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 48}}, {"id": 147, "type": "identifier", "text": "tname", "parent": 146, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 18}}, {"id": 148, "type": "number_literal", "text": "32", "parent": 146, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 22}}, {"id": 149, "type": "string_literal", "text": "\"%s_command\"", "parent": 146, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 36}}, {"id": 150, "type": "field_expression", "text": "cmd->name", "parent": 146, "children": [151, 152], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 47}}, {"id": 151, "type": "identifier", "text": "cmd", "parent": 150, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 41}}, {"id": 152, "type": "field_identifier", "text": "name", "parent": 150, "children": [], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 47}}, {"id": 153, "type": "call_expression", "text": "task_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv)", "parent": 134, "children": [154, 155], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 68}}, {"id": 154, "type": "identifier", "text": "task_create", "parent": 153, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 15}}, {"id": 155, "type": "argument_list", "text": "(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv)", "parent": 153, "children": [156, 157, 158, 159, 162], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 68}}, {"id": 156, "type": "identifier", "text": "tname", "parent": 155, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 21}}, {"id": 157, "type": "identifier", "text": "SCHED_PRIORITY_DEFAULT", "parent": 155, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 45}}, {"id": 158, "type": "number_literal", "text": "16384", "parent": 155, "children": [], "start_point": {"row": 56, "column": 47}, "end_point": {"row": 56, "column": 52}}, {"id": 159, "type": "field_expression", "text": "cmd->fn", "parent": 155, "children": [160, 161], "start_point": {"row": 56, "column": 54}, "end_point": {"row": 56, "column": 61}}, {"id": 160, "type": "identifier", "text": "cmd", "parent": 159, "children": [], "start_point": {"row": 56, "column": 54}, "end_point": {"row": 56, "column": 57}}, {"id": 161, "type": "field_identifier", "text": "fn", "parent": 159, "children": [], "start_point": {"row": 56, "column": 59}, "end_point": {"row": 56, "column": 61}}, {"id": 162, "type": "identifier", "text": "argv", "parent": 155, "children": [], "start_point": {"row": 56, "column": 63}, "end_point": {"row": 56, "column": 67}}, {"id": 163, "type": "break_statement", "text": "break;", "parent": 116, "children": [164], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 9}}, {"id": 164, "type": "break", "text": "break", "parent": 163, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 8}}, {"id": 165, "type": "update_expression", "text": "cmd++", "parent": 111, "children": [166, 167], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 7}}, {"id": 166, "type": "identifier", "text": "cmd", "parent": 165, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 5}}, {"id": 167, "type": "++", "text": "++", "parent": 165, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 7}}, {"id": 168, "type": "if_statement", "text": "if (!cmd->fn) {\n\t\tfprintf(stderr, \"Unknown command\\n\");\n\t\tusage(argv[0], commands);\n\t\treturn -1;\n\t}", "parent": 64, "children": [169], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 68, "column": 2}}, {"id": 169, "type": "parenthesized_expression", "text": "(!cmd->fn)", "parent": 168, "children": [170], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 14}}, {"id": 170, "type": "unary_expression", "text": "!cmd->fn", "parent": 169, "children": [171, 172], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 13}}, {"id": 171, "type": "!", "text": "!", "parent": 170, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 6}}, {"id": 172, "type": "field_expression", "text": "cmd->fn", "parent": 170, "children": [173, 174], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 13}}, {"id": 173, "type": "identifier", "text": "cmd", "parent": 172, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 9}}, {"id": 174, "type": "field_identifier", "text": "fn", "parent": 172, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 13}}, {"id": 175, "type": "call_expression", "text": "fprintf(stderr, \"Unknown command\\n\")", "parent": 168, "children": [176, 177], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 38}}, {"id": 176, "type": "identifier", "text": "fprintf", "parent": 175, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 9}}, {"id": 177, "type": "argument_list", "text": "(stderr, \"Unknown command\\n\")", "parent": 175, "children": [178, 179], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 38}}, {"id": 178, "type": "identifier", "text": "stderr", "parent": 177, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 16}}, {"id": 179, "type": "string_literal", "text": "\"Unknown command\\n\"", "parent": 177, "children": [180], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 37}}, {"id": 180, "type": "escape_sequence", "text": "\\n", "parent": 179, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 36}}, {"id": 181, "type": "call_expression", "text": "usage(argv[0], commands)", "parent": 168, "children": [182, 183], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 26}}, {"id": 182, "type": "identifier", "text": "usage", "parent": 181, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 7}}, {"id": 183, "type": "argument_list", "text": "(argv[0], commands)", "parent": 181, "children": [184, 187], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 26}}, {"id": 184, "type": "subscript_expression", "text": "argv[0]", "parent": 183, "children": [185, 186], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 15}}, {"id": 185, "type": "identifier", "text": "argv", "parent": 184, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 12}}, {"id": 186, "type": "number_literal", "text": "0", "parent": 184, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 14}}, {"id": 187, "type": "identifier", "text": "commands", "parent": 183, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 25}}, {"id": 188, "type": "return_statement", "text": "return -1;", "parent": 168, "children": [189], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 12}}, {"id": 189, "type": "number_literal", "text": "-1", "parent": 188, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 11}}, {"id": 190, "type": "return_statement", "text": "return 0;", "parent": 64, "children": [191], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 10}}, {"id": 191, "type": "number_literal", "text": "0", "parent": 190, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 9}}]}, "node_categories": {"declarations": {"functions": [9, 11, 64, 66], "variables": [14, 19, 26, 69, 72, 79, 86, 139], "classes": [20, 21, 27, 28, 80, 81, 87, 88], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [36, 43, 44, 47, 55, 58, 61, 97, 98, 102, 105, 112, 113, 117, 118, 120, 123, 126, 131, 135, 136, 144, 150, 153, 159, 165, 169, 170, 172, 175, 181, 184], "assignments": [], "loops": [42, 111], "conditionals": [12, 18, 22, 25, 29, 33, 35, 37, 39, 45, 46, 48, 50, 54, 56, 57, 59, 60, 62, 67, 71, 78, 82, 85, 89, 93, 95, 96, 99, 103, 106, 108, 114, 115, 116, 121, 124, 132, 133, 134, 137, 138, 142, 145, 147, 151, 152, 154, 156, 157, 160, 161, 162, 166, 168, 173, 174, 176, 178, 182, 185, 187], "returns": [109, 188, 190], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 40, 51, 101, 107, 110, 125, 143, 148, 149, 158, 179, 186, 189, 191], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "usage", "text_snippet": "void usage(const char *command_base, const struct command *commands)\n{\n\tconst struct command *cmd = "}, {"node_id": 11, "universal_type": "function", "name": "command", "text_snippet": "usage(const char *command_base, const struct command *commands)"}, {"node_id": 64, "universal_type": "function", "name": "commands_parser", "text_snippet": "int commands_parser(int argc, char **argv, const struct command *commands)\n{\n\tconst struct command *"}, {"node_id": 66, "universal_type": "function", "name": "command", "text_snippet": "commands_parser(int argc, char **argv, const struct command *commands)"}], "class_declarations": [{"node_id": 20, "universal_type": "class", "name": "command", "text_snippet": "struct command"}, {"node_id": 21, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 27, "universal_type": "class", "name": "command", "text_snippet": "struct command"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 80, "universal_type": "class", "name": "command", "text_snippet": "struct command"}, {"node_id": 81, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 87, "universal_type": "class", "name": "command", "text_snippet": "struct command"}, {"node_id": 88, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"command.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 <string.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/****************************************************************************\n *\n * Copyright 2017 Samsung Electronics All Rights 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,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n * either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n *\n ****************************************************************************/\n\n/**\n * @file command.c\n */\n\n\n#include \"command.h\"\n\n#include <stdio.h>\n#include <string.h>\n\nvoid usage(const char *command_base, const struct command *commands)\n{\n\tconst struct command *cmd = commands;\n\n\tfprintf(stderr, \"usage:\\n\");\n\n\twhile (cmd->fn) {\n\t\tfprintf(stderr, \"\\t%s %s - %s\\n\", command_base, cmd->name, cmd->usage);\n\t\tcmd++;\n\t}\n}\n\n\nint commands_parser(int argc, char **argv, const struct command *commands)\n{\n\tconst struct command *cmd = commands;\n\n\tif (argc < 2) {\n\t\tusage(argv[0], commands);\n\t\treturn -1;\n\t}\n\n\twhile (cmd->fn) {\n\t\tif (!strcmp(argv[1], (const char *)cmd->name)) {\n\t\t\tif (cmd->fn) {\n\t\t\t\tchar tname[32];\n\n\t\t\t\tsnprintf(tname, 32, \"%s_command\", cmd->name);\n\t\t\t\ttask_create(tname, SCHED_PRIORITY_DEFAULT, 16384, cmd->fn, argv);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcmd++;\n\t}\n\n\tif (!cmd->fn) {\n\t\tfprintf(stderr, \"Unknown command\\n\");\n\t\tusage(argv[0], commands);\n\t\treturn -1;\n\t}\n\n\treturn 0;\n}\n"}
265
c
// // CBL_Shared.h // CouchbaseLite // // Created by <NAME> on 3/20/13. // Copyright (c) 2013 Couchbase, Inc. All rights reserved. // // #import <Foundation/Foundation.h> @class CBL_Server, MYReadWriteLock; /** Container for shared state between CBLDatabase instances that represent the same database file. API is thread-safe. */ @interface CBL_Shared : NSObject - (void) setValue: (id)value forType: (NSString*)type name: (NSString*)name inDatabaseNamed: (NSString*)dbName; - (id) valueForType: (NSString*)type name: (NSString*)name inDatabaseNamed: (NSString*)dbName; - (bool) hasValuesOfType: (NSString*)type inDatabaseNamed: (NSString*)dbName; - (NSDictionary*) valuesOfType: (NSString*)type inDatabaseNamed: (NSString*)dbName; - (MYReadWriteLock*) lockForDatabaseNamed: (NSString*)dbName; - (void) openedDatabase: (NSString*)dbName; - (void) closedDatabase: (NSString*)dbName; - (BOOL) isDatabaseOpened: (NSString*)dbName; // Blocks till everyone who opened the database has closed it - (void) forgetDatabaseNamed: (NSString*)name; @property CBL_Server* backgroundServer; #if DEBUG - (NSUInteger) countForOpenedDatabase: (NSString*)dbName; #endif @end
34.14
35
(ERROR) "//\n// CBL_Shared.h\n// CouchbaseLite\n//\n// Created by <NAME> on 3/20/13.\n// Copyright (c) 2013 Couchbase, Inc. All rights reserved.\n//\n//\n\n#import <Foundation/Foundation.h>\n@class CBL_Server, MYReadWriteLock;\n\n\n/** Container for shared state between CBLDatabase instances that represent the same database file. API is thread-safe. */\n@interface CBL_Shared : NSObject\n\n- (void) setValue: (id)value\n forType: (NSString*)type\n name: (NSString*)name\n inDatabaseNamed: (NSString*)dbName;\n\n- (id) valueForType: (NSString*)type\n name: (NSString*)name\n inDatabaseNamed: (NSString*)dbName;\n\n- (bool) hasValuesOfType: (NSString*)type\n inDatabaseNamed: (NSString*)dbName;\n\n- (NSDictionary*) valuesOfType: (NSString*)type\n inDatabaseNamed: (NSString*)dbName;\n\n- (MYReadWriteLock*) lockForDatabaseNamed: (NSString*)dbName;\n\n- (void) openedDatabase: (NSString*)dbName;\n- (void) closedDatabase: (NSString*)dbName;\n- (BOOL) isDatabaseOpened: (NSString*)dbName;\n\n// Blocks till everyone who opened the database has closed it\n- (void) forgetDatabaseNamed: (NSString*)name;\n\n@property CBL_Server* backgroundServer;\n\n#if DEBUG\n- (NSUInteger) countForOpenedDatabase: (NSString*)dbName;\n#endif\n\n@end\n" (comment) "//" (comment) "// CBL_Shared.h" (comment) "// CouchbaseLite" (comment) "//" (comment) "// Created by <NAME> on 3/20/13." (comment) "// Copyright (c) 2013 Couchbase, Inc. All rights reserved." (comment) "//" (comment) "//" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (ERROR) "@" (ERROR) "@" (declaration) "class CBL_Server, MYReadWriteLock;" (type_identifier) "class" (identifier) "CBL_Server" (,) "," (identifier) "MYReadWriteLock" (;) ";" (comment) "/** Container for shared state between CBLDatabase instances that represent the same database file. API is thread-safe. */" (ERROR) "@interface CBL_Shared : NSObject\n\n- (void) setValue: (id)value" (ERROR) "@" (type_identifier) "interface" (identifier) "CBL_Shared" (:) ":" (identifier) "NSObject" (call_expression) "- (void) setValue: (id)" (unary_expression) "- (void) setValue" (-) "-" (cast_expression) "(void) setValue" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setValue" (ERROR) ":" (:) ":" (argument_list) "(id)" (() "(" (identifier) "id" ()) ")" (identifier) "value" (labeled_statement) "forType: (NSString*)type" (statement_identifier) "forType" (:) ":" (expression_statement) "(NSString*)type" (cast_expression) "(NSString*)type" (() "(" (type_descriptor) "NSString*" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "type" (;) "" (labeled_statement) "name: (NSString*)name" (statement_identifier) "name" (:) ":" (expression_statement) "(NSString*)name" (cast_expression) "(NSString*)name" (() "(" (type_descriptor) "NSString*" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "name" (;) "" (labeled_statement) "inDatabaseNamed: (NSString*)dbName;" (statement_identifier) "inDatabaseNamed" (:) ":" (expression_statement) "(NSString*)dbName;" (cast_expression) "(NSString*)dbName" (() "(" (type_descriptor) "NSString*" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "dbName" (;) ";" (unary_expression) "- (id) valueForType" (-) "-" (cast_expression) "(id) valueForType" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "valueForType" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)type\n name" (identifier) "NSString" (*) "*" (ERROR) ")type" ()) ")" (identifier) "type" (identifier) "name" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)name\n inDatabaseNamed" (identifier) "NSString" (*) "*" (ERROR) ")name" ()) ")" (identifier) "name" (identifier) "inDatabaseNamed" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n\n- (bool) hasValuesOfType" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(bool) hasValuesOfType" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "hasValuesOfType" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)type\n inDatabaseNamed" (identifier) "NSString" (*) "*" (ERROR) ")type" ()) ")" (identifier) "type" (identifier) "inDatabaseNamed" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n\n- (NSDictionary*) valuesOfType" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(NSDictionary*) valuesOfType" (() "(" (type_descriptor) "NSDictionary*" (type_identifier) "NSDictionary" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "valuesOfType" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)type\n inDatabaseNamed" (identifier) "NSString" (*) "*" (ERROR) ")type" ()) ")" (identifier) "type" (identifier) "inDatabaseNamed" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n\n- (MYReadWriteLock*) lockForDatabaseNamed" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(MYReadWriteLock*) lockForDatabaseNamed" (() "(" (type_descriptor) "MYReadWriteLock*" (type_identifier) "MYReadWriteLock" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "lockForDatabaseNamed" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n\n- (void) openedDatabase" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void) openedDatabase" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "openedDatabase" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n- (void) closedDatabase" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void) closedDatabase" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "closedDatabase" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n- (BOOL) isDatabaseOpened" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(BOOL) isDatabaseOpened" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isDatabaseOpened" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName;\n\n// Blocks till everyone who opened the database has closed it\n- (void) forgetDatabaseNamed" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (ERROR) ";" (;) ";" (comment) "// Blocks till everyone who opened the database has closed it" (-) "-" (cast_expression) "(void) forgetDatabaseNamed" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "forgetDatabaseNamed" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)name;\n\n@property CBL_Server* backgroundServer;\n\n#if DEBUG\n- (NSUInteger) countForOpenedDatabase" (binary_expression) "NSString*)name;\n\n@property CBL_Server* backgroundServer" (binary_expression) "NSString*)name" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "name" (ERROR) ";\n\n@property CBL_Server" (;) ";" (ERROR) "@" (identifier) "property" (identifier) "CBL_Server" (*) "*" (identifier) "backgroundServer" (ERROR) ";\n\n#if DEBUG" (;) ";" (#if) "#if" (identifier) "DEBUG" (-) "-" (cast_expression) "(NSUInteger) countForOpenedDatabase" (() "(" (type_descriptor) "NSUInteger" (type_identifier) "NSUInteger" ()) ")" (identifier) "countForOpenedDatabase" (ERROR) ":" (:) ":" (() "(" (binary_expression) "NSString*)dbName" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "dbName" (;) ";" (#endif) "#endif" (ERROR) "@" (identifier) "end"
310
43
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 34.14, "nodes": 178, "errors": 0, "source_hash": "483b5e744b63c79f94e182987b857ef19b8bdffe49c6071067f0fbea157a1896", "categorized_nodes": 107}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "//\n// CBL_Shared.h\n// CouchbaseLite\n//\n// Created by <NAME> on 3/20/13.\n// Copyright (c) 2013 Couchbase, Inc. All rights reserved.\n//\n//\n\n#import <Foundation/Foundation.h>\n@class CBL_Server, MYReadWriteLock;\n\n\n/** Container for shared state between CBLDatabase instances that represent the same database file. API is thread-safe. */\n@interface CBL_Shared : NSObject\n\n- (void) setValue: (id)value\n forType: (NSString*)type\n name: (NSString*)name\n inDatabaseNamed: (NSString*)dbName;\n\n- (id) valueForType: (NSString*)type\n name: (NSString*)name\n inDatabaseNamed: (NSString*)dbName;\n\n- (bool) hasValuesOfType: (NSString*)type\n inDatabaseNamed: (NSString*)dbName;\n\n- (NSDictionary*) valuesOfType: (NSString*)type\n inDatabaseNamed: (NSString*)dbName;\n\n- (MYReadWriteLock*) lockForDatabaseNamed: (NSString*)dbName;\n\n- (void) openedDatabase: (NSString*)dbName;\n- (void) closedDatabase: (NSString*)dbName;\n- (BOOL) isDatabaseOpened: (NSString*)dbName;\n\n// Blocks till everyone who opened the database has closed it\n- (void) forgetDatabaseNamed: (NSString*)name;\n\n@property CBL_Server* backgroundServer;\n\n#if DEBUG\n- (NSUInteger) countForOpenedDatabase: (NSString*)dbName;\n#endif\n\n@end\n", "parent": null, "children": [1, 4, 6, 9, 24, 32, 40, 48, 54, 60, 66, 76, 82, 94, 100, 112, 122, 132, 142, 152, 172, 176, 177], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "#import <Foundation/Foundation.h>\n", "parent": 0, "children": [2, 3], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 2, "type": "preproc_directive", "text": "#import", "parent": 1, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "<Foundation/Foundation.h>", "parent": 1, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 33}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 0, "children": [5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "ERROR", "text": "@", "parent": 4, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 6, "type": "declaration", "text": "class CBL_Server, MYReadWriteLock;", "parent": 0, "children": [7, 8], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 35}}, {"id": 7, "type": "identifier", "text": "CBL_Server", "parent": 6, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 17}}, {"id": 8, "type": "identifier", "text": "MYReadWriteLock", "parent": 6, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 34}}, {"id": 9, "type": "ERROR", "text": "@interface CBL_Shared : NSObject\n\n- (void) setValue: (id)value", "parent": 0, "children": [10, 11, 12, 13, 14, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 16, "column": 28}}, {"id": 10, "type": "ERROR", "text": "@", "parent": 9, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 11, "type": "type_identifier", "text": "interface", "parent": 9, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 10}}, {"id": 12, "type": "identifier", "text": "CBL_Shared", "parent": 9, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 21}}, {"id": 13, "type": "identifier", "text": "NSObject", "parent": 9, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 32}}, {"id": 14, "type": "call_expression", "text": "- (void) setValue: (id)", "parent": 9, "children": [15, 21], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 23}}, {"id": 15, "type": "unary_expression", "text": "- (void) setValue", "parent": 14, "children": [16, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 17}}, {"id": 16, "type": "-", "text": "-", "parent": 15, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 17, "type": "cast_expression", "text": "(void) setValue", "parent": 15, "children": [18, 20], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 17}}, {"id": 18, "type": "type_descriptor", "text": "void", "parent": 17, "children": [19], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 20, "type": "identifier", "text": "setValue", "parent": 17, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 17}}, {"id": 21, "type": "argument_list", "text": "(id)", "parent": 14, "children": [22], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 23}}, {"id": 22, "type": "identifier", "text": "id", "parent": 21, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 22}}, {"id": 23, "type": "identifier", "text": "value", "parent": 9, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 28}}, {"id": 24, "type": "labeled_statement", "text": "forType: (NSString*)type", "parent": 0, "children": [25], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 34}}, {"id": 25, "type": "statement_identifier", "text": "forType", "parent": 24, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 17}}, {"id": 26, "type": "cast_expression", "text": "(NSString*)type", "parent": 24, "children": [27, 31], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 34}}, {"id": 27, "type": "type_descriptor", "text": "NSString*", "parent": 26, "children": [28, 29], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 29}}, {"id": 28, "type": "type_identifier", "text": "NSString", "parent": 27, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 28}}, {"id": 29, "type": "abstract_pointer_declarator", "text": "*", "parent": 27, "children": [30], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 29}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 29}}, {"id": 31, "type": "identifier", "text": "type", "parent": 26, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 34}}, {"id": 32, "type": "labeled_statement", "text": "name: (NSString*)name", "parent": 0, "children": [33], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 34}}, {"id": 33, "type": "statement_identifier", "text": "name", "parent": 32, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 17}}, {"id": 34, "type": "cast_expression", "text": "(NSString*)name", "parent": 32, "children": [35, 39], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 34}}, {"id": 35, "type": "type_descriptor", "text": "NSString*", "parent": 34, "children": [36, 37], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 29}}, {"id": 36, "type": "type_identifier", "text": "NSString", "parent": 35, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 28}}, {"id": 37, "type": "abstract_pointer_declarator", "text": "*", "parent": 35, "children": [38], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 29}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 29}}, {"id": 39, "type": "identifier", "text": "name", "parent": 34, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 34}}, {"id": 40, "type": "labeled_statement", "text": "inDatabaseNamed: (NSString*)dbName;", "parent": 0, "children": [41], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 37}}, {"id": 41, "type": "statement_identifier", "text": "inDatabaseNamed", "parent": 40, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 17}}, {"id": 42, "type": "cast_expression", "text": "(NSString*)dbName", "parent": 40, "children": [43, 47], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 36}}, {"id": 43, "type": "type_descriptor", "text": "NSString*", "parent": 42, "children": [44, 45], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 29}}, {"id": 44, "type": "type_identifier", "text": "NSString", "parent": 43, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 28}}, {"id": 45, "type": "abstract_pointer_declarator", "text": "*", "parent": 43, "children": [46], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 29}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 29}}, {"id": 47, "type": "identifier", "text": "dbName", "parent": 42, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 36}}, {"id": 48, "type": "unary_expression", "text": "- (id) valueForType", "parent": 0, "children": [49, 50], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 19}}, {"id": 49, "type": "-", "text": "-", "parent": 48, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 50, "type": "cast_expression", "text": "(id) valueForType", "parent": 48, "children": [51, 53], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 19}}, {"id": 51, "type": "type_descriptor", "text": "id", "parent": 50, "children": [52], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 5}}, {"id": 52, "type": "type_identifier", "text": "id", "parent": 51, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 5}}, {"id": 53, "type": "identifier", "text": "valueForType", "parent": 50, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 19}}, {"id": 54, "type": "binary_expression", "text": "NSString*)type\n name", "parent": 0, "children": [55, 56, 57, 59], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 22, "column": 19}}, {"id": 55, "type": "identifier", "text": "NSString", "parent": 54, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 30}}, {"id": 56, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 31}}, {"id": 57, "type": "ERROR", "text": ")type", "parent": 54, "children": [58], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 36}}, {"id": 58, "type": "identifier", "text": "type", "parent": 57, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 36}}, {"id": 59, "type": "identifier", "text": "name", "parent": 54, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 19}}, {"id": 60, "type": "binary_expression", "text": "NSString*)name\n inDatabaseNamed", "parent": 0, "children": [61, 62, 63, 65], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 23, "column": 19}}, {"id": 61, "type": "identifier", "text": "NSString", "parent": 60, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 30}}, {"id": 62, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 63, "type": "ERROR", "text": ")name", "parent": 60, "children": [64], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 36}}, {"id": 64, "type": "identifier", "text": "name", "parent": 63, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 36}}, {"id": 65, "type": "identifier", "text": "inDatabaseNamed", "parent": 60, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 19}}, {"id": 66, "type": "binary_expression", "text": "NSString*)dbName;\n\n- (bool) hasValuesOfType", "parent": 0, "children": [67, 71, 72], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 25, "column": 24}}, {"id": 67, "type": "binary_expression", "text": "NSString*)dbName", "parent": 66, "children": [68, 69, 70], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 38}}, {"id": 68, "type": "identifier", "text": "NSString", "parent": 67, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 30}}, {"id": 69, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 31}}, {"id": 70, "type": "identifier", "text": "dbName", "parent": 67, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 38}}, {"id": 71, "type": "-", "text": "-", "parent": 66, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 72, "type": "cast_expression", "text": "(bool) hasValuesOfType", "parent": 66, "children": [73, 75], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 24}}, {"id": 73, "type": "type_descriptor", "text": "bool", "parent": 72, "children": [74], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 74, "type": "primitive_type", "text": "bool", "parent": 73, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 75, "type": "identifier", "text": "hasValuesOfType", "parent": 72, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 24}}, {"id": 76, "type": "binary_expression", "text": "NSString*)type\n inDatabaseNamed", "parent": 0, "children": [77, 78, 79, 81], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 26, "column": 24}}, {"id": 77, "type": "identifier", "text": "NSString", "parent": 76, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 35}}, {"id": 78, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 36}}, {"id": 79, "type": "ERROR", "text": ")type", "parent": 76, "children": [80], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 41}}, {"id": 80, "type": "identifier", "text": "type", "parent": 79, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 41}}, {"id": 81, "type": "identifier", "text": "inDatabaseNamed", "parent": 76, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 24}}, {"id": 82, "type": "binary_expression", "text": "NSString*)dbName;\n\n- (NSDictionary*) valuesOfType", "parent": 0, "children": [83, 87, 88], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 28, "column": 30}}, {"id": 83, "type": "binary_expression", "text": "NSString*)dbName", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 43}}, {"id": 84, "type": "identifier", "text": "NSString", "parent": 83, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 35}}, {"id": 85, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 36}}, {"id": 86, "type": "identifier", "text": "dbName", "parent": 83, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 43}}, {"id": 87, "type": "-", "text": "-", "parent": 82, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 88, "type": "cast_expression", "text": "(NSDictionary*) valuesOfType", "parent": 82, "children": [89, 93], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 30}}, {"id": 89, "type": "type_descriptor", "text": "NSDictionary*", "parent": 88, "children": [90, 91], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 16}}, {"id": 90, "type": "type_identifier", "text": "NSDictionary", "parent": 89, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 15}}, {"id": 91, "type": "abstract_pointer_declarator", "text": "*", "parent": 89, "children": [92], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 93, "type": "identifier", "text": "valuesOfType", "parent": 88, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 30}}, {"id": 94, "type": "binary_expression", "text": "NSString*)type\n inDatabaseNamed", "parent": 0, "children": [95, 96, 97, 99], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 29, "column": 30}}, {"id": 95, "type": "identifier", "text": "NSString", "parent": 94, "children": [], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 41}}, {"id": 96, "type": "*", "text": "*", "parent": 94, "children": [], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 42}}, {"id": 97, "type": "ERROR", "text": ")type", "parent": 94, "children": [98], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 47}}, {"id": 98, "type": "identifier", "text": "type", "parent": 97, "children": [], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 47}}, {"id": 99, "type": "identifier", "text": "inDatabaseNamed", "parent": 94, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 30}}, {"id": 100, "type": "binary_expression", "text": "NSString*)dbName;\n\n- (MYReadWriteLock*) lockForDatabaseNamed", "parent": 0, "children": [101, 105, 106], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 31, "column": 41}}, {"id": 101, "type": "binary_expression", "text": "NSString*)dbName", "parent": 100, "children": [102, 103, 104], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 49}}, {"id": 102, "type": "identifier", "text": "NSString", "parent": 101, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 41}}, {"id": 103, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 42}}, {"id": 104, "type": "identifier", "text": "dbName", "parent": 101, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 49}}, {"id": 105, "type": "-", "text": "-", "parent": 100, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 106, "type": "cast_expression", "text": "(MYReadWriteLock*) lockForDatabaseNamed", "parent": 100, "children": [107, 111], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 41}}, {"id": 107, "type": "type_descriptor", "text": "MYReadWriteLock*", "parent": 106, "children": [108, 109], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 19}}, {"id": 108, "type": "type_identifier", "text": "MYReadWriteLock", "parent": 107, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 18}}, {"id": 109, "type": "abstract_pointer_declarator", "text": "*", "parent": 107, "children": [110], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 110, "type": "*", "text": "*", "parent": 109, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 111, "type": "identifier", "text": "lockForDatabaseNamed", "parent": 106, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 41}}, {"id": 112, "type": "binary_expression", "text": "NSString*)dbName;\n\n- (void) openedDatabase", "parent": 0, "children": [113, 117, 118], "start_point": {"row": 31, "column": 44}, "end_point": {"row": 33, "column": 23}}, {"id": 113, "type": "binary_expression", "text": "NSString*)dbName", "parent": 112, "children": [114, 115, 116], "start_point": {"row": 31, "column": 44}, "end_point": {"row": 31, "column": 60}}, {"id": 114, "type": "identifier", "text": "NSString", "parent": 113, "children": [], "start_point": {"row": 31, "column": 44}, "end_point": {"row": 31, "column": 52}}, {"id": 115, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 53}}, {"id": 116, "type": "identifier", "text": "dbName", "parent": 113, "children": [], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 60}}, {"id": 117, "type": "-", "text": "-", "parent": 112, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 118, "type": "cast_expression", "text": "(void) openedDatabase", "parent": 112, "children": [119, 121], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 23}}, {"id": 119, "type": "type_descriptor", "text": "void", "parent": 118, "children": [120], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 7}}, {"id": 120, "type": "primitive_type", "text": "void", "parent": 119, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 7}}, {"id": 121, "type": "identifier", "text": "openedDatabase", "parent": 118, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 23}}, {"id": 122, "type": "binary_expression", "text": "NSString*)dbName;\n- (void) closedDatabase", "parent": 0, "children": [123, 127, 128], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 34, "column": 23}}, {"id": 123, "type": "binary_expression", "text": "NSString*)dbName", "parent": 122, "children": [124, 125, 126], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 42}}, {"id": 124, "type": "identifier", "text": "NSString", "parent": 123, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 34}}, {"id": 125, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 35}}, {"id": 126, "type": "identifier", "text": "dbName", "parent": 123, "children": [], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 42}}, {"id": 127, "type": "-", "text": "-", "parent": 122, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 128, "type": "cast_expression", "text": "(void) closedDatabase", "parent": 122, "children": [129, 131], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 23}}, {"id": 129, "type": "type_descriptor", "text": "void", "parent": 128, "children": [130], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 7}}, {"id": 130, "type": "primitive_type", "text": "void", "parent": 129, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 7}}, {"id": 131, "type": "identifier", "text": "closedDatabase", "parent": 128, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 23}}, {"id": 132, "type": "binary_expression", "text": "NSString*)dbName;\n- (BOOL) isDatabaseOpened", "parent": 0, "children": [133, 137, 138], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 35, "column": 25}}, {"id": 133, "type": "binary_expression", "text": "NSString*)dbName", "parent": 132, "children": [134, 135, 136], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 42}}, {"id": 134, "type": "identifier", "text": "NSString", "parent": 133, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 34}}, {"id": 135, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 35}}, {"id": 136, "type": "identifier", "text": "dbName", "parent": 133, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 42}}, {"id": 137, "type": "-", "text": "-", "parent": 132, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 138, "type": "cast_expression", "text": "(BOOL) isDatabaseOpened", "parent": 132, "children": [139, 141], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 25}}, {"id": 139, "type": "type_descriptor", "text": "BOOL", "parent": 138, "children": [140], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 7}}, {"id": 140, "type": "type_identifier", "text": "BOOL", "parent": 139, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 7}}, {"id": 141, "type": "identifier", "text": "isDatabaseOpened", "parent": 138, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 25}}, {"id": 142, "type": "binary_expression", "text": "NSString*)dbName;\n\n// Blocks till everyone who opened the database has closed it\n- (void) forgetDatabaseNamed", "parent": 0, "children": [143, 147, 148], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 38, "column": 28}}, {"id": 143, "type": "binary_expression", "text": "NSString*)dbName", "parent": 142, "children": [144, 145, 146], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 44}}, {"id": 144, "type": "identifier", "text": "NSString", "parent": 143, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 36}}, {"id": 145, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 37}}, {"id": 146, "type": "identifier", "text": "dbName", "parent": 143, "children": [], "start_point": {"row": 35, "column": 38}, "end_point": {"row": 35, "column": 44}}, {"id": 147, "type": "-", "text": "-", "parent": 142, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 148, "type": "cast_expression", "text": "(void) forgetDatabaseNamed", "parent": 142, "children": [149, 151], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 28}}, {"id": 149, "type": "type_descriptor", "text": "void", "parent": 148, "children": [150], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 7}}, {"id": 150, "type": "primitive_type", "text": "void", "parent": 149, "children": [], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 7}}, {"id": 151, "type": "identifier", "text": "forgetDatabaseNamed", "parent": 148, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 28}}, {"id": 152, "type": "binary_expression", "text": "NSString*)name;\n\n@property CBL_Server* backgroundServer;\n\n#if DEBUG\n- (NSUInteger) countForOpenedDatabase", "parent": 0, "children": [153, 164, 167, 168], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 43, "column": 37}}, {"id": 153, "type": "binary_expression", "text": "NSString*)name;\n\n@property CBL_Server* backgroundServer", "parent": 152, "children": [154, 158, 162, 163], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 40, "column": 38}}, {"id": 154, "type": "binary_expression", "text": "NSString*)name", "parent": 153, "children": [155, 156, 157], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 38, "column": 45}}, {"id": 155, "type": "identifier", "text": "NSString", "parent": 154, "children": [], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 38, "column": 39}}, {"id": 156, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 38, "column": 39}, "end_point": {"row": 38, "column": 40}}, {"id": 157, "type": "identifier", "text": "name", "parent": 154, "children": [], "start_point": {"row": 38, "column": 41}, "end_point": {"row": 38, "column": 45}}, {"id": 158, "type": "ERROR", "text": ";\n\n@property CBL_Server", "parent": 153, "children": [159, 160, 161], "start_point": {"row": 38, "column": 45}, "end_point": {"row": 40, "column": 20}}, {"id": 159, "type": "ERROR", "text": "@", "parent": 158, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 160, "type": "identifier", "text": "property", "parent": 158, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 9}}, {"id": 161, "type": "identifier", "text": "CBL_Server", "parent": 158, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 20}}, {"id": 162, "type": "*", "text": "*", "parent": 153, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 163, "type": "identifier", "text": "backgroundServer", "parent": 153, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 38}}, {"id": 164, "type": "ERROR", "text": ";\n\n#if DEBUG", "parent": 152, "children": [165, 166], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 42, "column": 9}}, {"id": 165, "type": "#if", "text": "#if", "parent": 164, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 3}}, {"id": 166, "type": "identifier", "text": "DEBUG", "parent": 164, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 9}}, {"id": 167, "type": "-", "text": "-", "parent": 152, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 168, "type": "cast_expression", "text": "(NSUInteger) countForOpenedDatabase", "parent": 152, "children": [169, 171], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 37}}, {"id": 169, "type": "type_descriptor", "text": "NSUInteger", "parent": 168, "children": [170], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 13}}, {"id": 170, "type": "type_identifier", "text": "NSUInteger", "parent": 169, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 13}}, {"id": 171, "type": "identifier", "text": "countForOpenedDatabase", "parent": 168, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 37}}, {"id": 172, "type": "binary_expression", "text": "NSString*)dbName", "parent": 0, "children": [173, 174, 175], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 56}}, {"id": 173, "type": "identifier", "text": "NSString", "parent": 172, "children": [], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 48}}, {"id": 174, "type": "*", "text": "*", "parent": 172, "children": [], "start_point": {"row": 43, "column": 48}, "end_point": {"row": 43, "column": 49}}, {"id": 175, "type": "identifier", "text": "dbName", "parent": 172, "children": [], "start_point": {"row": 43, "column": 50}, "end_point": {"row": 43, "column": 56}}, {"id": 176, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 177, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [6], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [14, 15, 17, 26, 34, 42, 48, 50, 54, 60, 66, 67, 72, 76, 82, 83, 88, 94, 100, 101, 106, 112, 113, 118, 122, 123, 128, 132, 133, 138, 142, 143, 148, 152, 153, 154, 168, 172], "assignments": [], "loops": [], "conditionals": [7, 8, 11, 12, 13, 20, 22, 23, 25, 28, 31, 33, 36, 39, 41, 44, 47, 52, 53, 55, 58, 59, 61, 64, 65, 68, 70, 75, 77, 80, 81, 84, 86, 90, 93, 95, 98, 99, 102, 104, 108, 111, 114, 116, 121, 124, 126, 131, 134, 136, 140, 141, 144, 146, 151, 155, 157, 160, 161, 163, 165, 166, 170, 171, 173, 175, 176], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// CBL_Shared.h\n// CouchbaseLite\n//\n// Created by <NAME> on 3/20/13.\n// Copyright (c) 2013 Couchbase, Inc. All rights reserved.\n//\n//\n\n#import <Foundation/Foundation.h>\n@class CBL_Server, MYReadWriteLock;\n\n\n/** Container for shared state between CBLDatabase instances that represent the same database file. API is thread-safe. */\n@interface CBL_Shared : NSObject\n\n- (void) setValue: (id)value\n forType: (NSString*)type\n name: (NSString*)name\n inDatabaseNamed: (NSString*)dbName;\n\n- (id) valueForType: (NSString*)type\n name: (NSString*)name\n inDatabaseNamed: (NSString*)dbName;\n\n- (bool) hasValuesOfType: (NSString*)type\n inDatabaseNamed: (NSString*)dbName;\n\n- (NSDictionary*) valuesOfType: (NSString*)type\n inDatabaseNamed: (NSString*)dbName;\n\n- (MYReadWriteLock*) lockForDatabaseNamed: (NSString*)dbName;\n\n- (void) openedDatabase: (NSString*)dbName;\n- (void) closedDatabase: (NSString*)dbName;\n- (BOOL) isDatabaseOpened: (NSString*)dbName;\n\n// Blocks till everyone who opened the database has closed it\n- (void) forgetDatabaseNamed: (NSString*)name;\n\n@property CBL_Server* backgroundServer;\n\n#if DEBUG\n- (NSUInteger) countForOpenedDatabase: (NSString*)dbName;\n#endif\n\n@end\n"}
266
c
#include "Problem.h" #include <stdio.h> #include <stdlib.h> void initQueenProblem(Problem* p,int newn ) { p->d=newDomain(newn); p->n = newn; p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n)); int compte = 0; for(int i = 0; i<p->n; i++) { for(int j=0; j<p->n; j++) { if(i!=j) { Constraint cl, cdm, cdd; initConstraint(&cl,0,0,i,j); initConstraint(&cdm,i,j,i,j); initConstraint(&cdd,-i,-j,i,j); //afficherConstraint(cl); (p->c)[compte]=cl; compte++; (p->c)[compte]=cdm; compte++; (p->c)[compte]=cdd; compte++; // effacerConstraint(cl); } } } p->m += compte; } Problem* newProblem(int newn) { Problem* p=malloc(sizeof(Problem)); initQueenProblem(p, newn); return p; } void destroyProblemContent(Problem * p) { destroyDomain(p->d); free(p->d); free(p->c); return; } void afficherProblem(Problem p) { printf("afficherProblem: n = %d m = %d\n",p.n,p.m); afficherDomain(*(p.d)); //afficherConstraint(); return; } bool isSolution(Domain d, Problem p) { for(int i=0; i<d.n; i++) { if(Length(d.LDomain[i])>1) { //printf("taille pas bonne\n"); return false; } } for(int i=0; i<p.m; i++) { if(!validationContrainte(p.c[i],d)) { printf("Contrainte pas bonne\n"); return false; } } return true; } bool verifCtes(Problem p, Domain d) { for(int i=0; i<p.m; i++) { if(!validationContrainte(p.c[i],d)) { return false; } } return true; }
24.72
69
(translation_unit) "#include "Problem.h"\n#include <stdio.h>\n#include <stdlib.h>\n\n\nvoid initQueenProblem(Problem* p,int newn ) {\n p->d=newDomain(newn);\n p->n = newn;\n p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n));\n int compte = 0;\n for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }\n p->m += compte;\n}\n\nProblem* newProblem(int newn) {\n Problem* p=malloc(sizeof(Problem));\n initQueenProblem(p, newn);\n return p;\n}\n\nvoid destroyProblemContent(Problem * p) {\n destroyDomain(p->d);\n free(p->d);\n free(p->c);\n return;\n}\n\nvoid afficherProblem(Problem p) {\n printf("afficherProblem: n = %d m = %d\n",p.n,p.m);\n afficherDomain(*(p.d));\n //afficherConstraint();\n return;\n}\n\nbool isSolution(Domain d, Problem p) {\n for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf("taille pas bonne\n");\n return false;\n }\n }\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf("Contrainte pas bonne\n");\n return false;\n }\n }\n return true;\n}\n\nbool verifCtes(Problem p, Domain d) {\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }\n return true;\n}\n" (preproc_include) "#include "Problem.h"\n" (#include) "#include" (string_literal) ""Problem.h"" (") """ (string_content) "Problem.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>" (function_definition) "void initQueenProblem(Problem* p,int newn ) {\n p->d=newDomain(newn);\n p->n = newn;\n p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n));\n int compte = 0;\n for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }\n p->m += compte;\n}" (primitive_type) "void" (function_declarator) "initQueenProblem(Problem* p,int newn )" (identifier) "initQueenProblem" (parameter_list) "(Problem* p,int newn )" (() "(" (parameter_declaration) "Problem* p" (type_identifier) "Problem" (pointer_declarator) "* p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "int newn" (primitive_type) "int" (identifier) "newn" ()) ")" (compound_statement) "{\n p->d=newDomain(newn);\n p->n = newn;\n p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n));\n int compte = 0;\n for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }\n p->m += compte;\n}" ({) "{" (expression_statement) "p->d=newDomain(newn);" (assignment_expression) "p->d=newDomain(newn)" (field_expression) "p->d" (identifier) "p" (->) "->" (field_identifier) "d" (=) "=" (call_expression) "newDomain(newn)" (identifier) "newDomain" (argument_list) "(newn)" (() "(" (identifier) "newn" ()) ")" (;) ";" (expression_statement) "p->n = newn;" (assignment_expression) "p->n = newn" (field_expression) "p->n" (identifier) "p" (->) "->" (field_identifier) "n" (=) "=" (identifier) "newn" (;) ";" (expression_statement) "p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n));" (assignment_expression) "p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n))" (field_expression) "p->c" (identifier) "p" (->) "->" (field_identifier) "c" (=) "=" (call_expression) "malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n))" (identifier) "malloc" (argument_list) "(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n))" (() "(" (binary_expression) "sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n)" (binary_expression) "sizeof(Constraint)*3*(p->n)*(p->n)" (binary_expression) "sizeof(Constraint)*3*(p->n)" (binary_expression) "sizeof(Constraint)*3" (sizeof_expression) "sizeof(Constraint)" (sizeof) "sizeof" (parenthesized_expression) "(Constraint)" (() "(" (identifier) "Constraint" ()) ")" (*) "*" (number_literal) "3" (*) "*" (parenthesized_expression) "(p->n)" (() "(" (field_expression) "p->n" (identifier) "p" (->) "->" (field_identifier) "n" ()) ")" (*) "*" (parenthesized_expression) "(p->n)" (() "(" (field_expression) "p->n" (identifier) "p" (->) "->" (field_identifier) "n" ()) ")" (-) "-" (binary_expression) "3*(p->n)" (number_literal) "3" (*) "*" (parenthesized_expression) "(p->n)" (() "(" (field_expression) "p->n" (identifier) "p" (->) "->" (field_identifier) "n" ()) ")" ()) ")" (;) ";" (declaration) "int compte = 0;" (primitive_type) "int" (init_declarator) "compte = 0" (identifier) "compte" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<p->n" (identifier) "i" (<) "<" (field_expression) "p->n" (identifier) "p" (->) "->" (field_identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }" ({) "{" (for_statement) "for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }" (for) "for" (() "(" (declaration) "int j=0;" (primitive_type) "int" (init_declarator) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<p->n" (identifier) "j" (<) "<" (field_expression) "p->n" (identifier) "p" (->) "->" (field_identifier) "n" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }" ({) "{" (if_statement) "if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }" (if) "if" (parenthesized_expression) "(i!=j)" (() "(" (binary_expression) "i!=j" (identifier) "i" (!=) "!=" (identifier) "j" ()) ")" (compound_statement) "{\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }" ({) "{" (declaration) "Constraint cl, cdm, cdd;" (type_identifier) "Constraint" (identifier) "cl" (,) "," (identifier) "cdm" (,) "," (identifier) "cdd" (;) ";" (expression_statement) "initConstraint(&cl,0,0,i,j);" (call_expression) "initConstraint(&cl,0,0,i,j)" (identifier) "initConstraint" (argument_list) "(&cl,0,0,i,j)" (() "(" (pointer_expression) "&cl" (&) "&" (identifier) "cl" (,) "," (number_literal) "0" (,) "," (number_literal) "0" (,) "," (identifier) "i" (,) "," (identifier) "j" ()) ")" (;) ";" (expression_statement) "initConstraint(&cdm,i,j,i,j);" (call_expression) "initConstraint(&cdm,i,j,i,j)" (identifier) "initConstraint" (argument_list) "(&cdm,i,j,i,j)" (() "(" (pointer_expression) "&cdm" (&) "&" (identifier) "cdm" (,) "," (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "i" (,) "," (identifier) "j" ()) ")" (;) ";" (expression_statement) "initConstraint(&cdd,-i,-j,i,j);" (call_expression) "initConstraint(&cdd,-i,-j,i,j)" (identifier) "initConstraint" (argument_list) "(&cdd,-i,-j,i,j)" (() "(" (pointer_expression) "&cdd" (&) "&" (identifier) "cdd" (,) "," (unary_expression) "-i" (-) "-" (identifier) "i" (,) "," (unary_expression) "-j" (-) "-" (identifier) "j" (,) "," (identifier) "i" (,) "," (identifier) "j" ()) ")" (;) ";" (comment) "//afficherConstraint(cl);" (expression_statement) "(p->c)[compte]=cl;" (assignment_expression) "(p->c)[compte]=cl" (subscript_expression) "(p->c)[compte]" (parenthesized_expression) "(p->c)" (() "(" (field_expression) "p->c" (identifier) "p" (->) "->" (field_identifier) "c" ()) ")" ([) "[" (identifier) "compte" (]) "]" (=) "=" (identifier) "cl" (;) ";" (expression_statement) "compte++;" (update_expression) "compte++" (identifier) "compte" (++) "++" (;) ";" (expression_statement) "(p->c)[compte]=cdm;" (assignment_expression) "(p->c)[compte]=cdm" (subscript_expression) "(p->c)[compte]" (parenthesized_expression) "(p->c)" (() "(" (field_expression) "p->c" (identifier) "p" (->) "->" (field_identifier) "c" ()) ")" ([) "[" (identifier) "compte" (]) "]" (=) "=" (identifier) "cdm" (;) ";" (expression_statement) "compte++;" (update_expression) "compte++" (identifier) "compte" (++) "++" (;) ";" (expression_statement) "(p->c)[compte]=cdd;" (assignment_expression) "(p->c)[compte]=cdd" (subscript_expression) "(p->c)[compte]" (parenthesized_expression) "(p->c)" (() "(" (field_expression) "p->c" (identifier) "p" (->) "->" (field_identifier) "c" ()) ")" ([) "[" (identifier) "compte" (]) "]" (=) "=" (identifier) "cdd" (;) ";" (expression_statement) "compte++;" (update_expression) "compte++" (identifier) "compte" (++) "++" (;) ";" (comment) "// effacerConstraint(cl);" (}) "}" (}) "}" (}) "}" (expression_statement) "p->m += compte;" (assignment_expression) "p->m += compte" (field_expression) "p->m" (identifier) "p" (->) "->" (field_identifier) "m" (+=) "+=" (identifier) "compte" (;) ";" (}) "}" (function_definition) "Problem* newProblem(int newn) {\n Problem* p=malloc(sizeof(Problem));\n initQueenProblem(p, newn);\n return p;\n}" (type_identifier) "Problem" (pointer_declarator) "* newProblem(int newn)" (*) "*" (function_declarator) "newProblem(int newn)" (identifier) "newProblem" (parameter_list) "(int newn)" (() "(" (parameter_declaration) "int newn" (primitive_type) "int" (identifier) "newn" ()) ")" (compound_statement) "{\n Problem* p=malloc(sizeof(Problem));\n initQueenProblem(p, newn);\n return p;\n}" ({) "{" (declaration) "Problem* p=malloc(sizeof(Problem));" (type_identifier) "Problem" (init_declarator) "* p=malloc(sizeof(Problem))" (pointer_declarator) "* p" (*) "*" (identifier) "p" (=) "=" (call_expression) "malloc(sizeof(Problem))" (identifier) "malloc" (argument_list) "(sizeof(Problem))" (() "(" (sizeof_expression) "sizeof(Problem)" (sizeof) "sizeof" (parenthesized_expression) "(Problem)" (() "(" (identifier) "Problem" ()) ")" ()) ")" (;) ";" (expression_statement) "initQueenProblem(p, newn);" (call_expression) "initQueenProblem(p, newn)" (identifier) "initQueenProblem" (argument_list) "(p, newn)" (() "(" (identifier) "p" (,) "," (identifier) "newn" ()) ")" (;) ";" (return_statement) "return p;" (return) "return" (identifier) "p" (;) ";" (}) "}" (function_definition) "void destroyProblemContent(Problem * p) {\n destroyDomain(p->d);\n free(p->d);\n free(p->c);\n return;\n}" (primitive_type) "void" (function_declarator) "destroyProblemContent(Problem * p)" (identifier) "destroyProblemContent" (parameter_list) "(Problem * p)" (() "(" (parameter_declaration) "Problem * p" (type_identifier) "Problem" (pointer_declarator) "* p" (*) "*" (identifier) "p" ()) ")" (compound_statement) "{\n destroyDomain(p->d);\n free(p->d);\n free(p->c);\n return;\n}" ({) "{" (expression_statement) "destroyDomain(p->d);" (call_expression) "destroyDomain(p->d)" (identifier) "destroyDomain" (argument_list) "(p->d)" (() "(" (field_expression) "p->d" (identifier) "p" (->) "->" (field_identifier) "d" ()) ")" (;) ";" (expression_statement) "free(p->d);" (call_expression) "free(p->d)" (identifier) "free" (argument_list) "(p->d)" (() "(" (field_expression) "p->d" (identifier) "p" (->) "->" (field_identifier) "d" ()) ")" (;) ";" (expression_statement) "free(p->c);" (call_expression) "free(p->c)" (identifier) "free" (argument_list) "(p->c)" (() "(" (field_expression) "p->c" (identifier) "p" (->) "->" (field_identifier) "c" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (function_definition) "void afficherProblem(Problem p) {\n printf("afficherProblem: n = %d m = %d\n",p.n,p.m);\n afficherDomain(*(p.d));\n //afficherConstraint();\n return;\n}" (primitive_type) "void" (function_declarator) "afficherProblem(Problem p)" (identifier) "afficherProblem" (parameter_list) "(Problem p)" (() "(" (parameter_declaration) "Problem p" (type_identifier) "Problem" (identifier) "p" ()) ")" (compound_statement) "{\n printf("afficherProblem: n = %d m = %d\n",p.n,p.m);\n afficherDomain(*(p.d));\n //afficherConstraint();\n return;\n}" ({) "{" (expression_statement) "printf("afficherProblem: n = %d m = %d\n",p.n,p.m);" (call_expression) "printf("afficherProblem: n = %d m = %d\n",p.n,p.m)" (identifier) "printf" (argument_list) "("afficherProblem: n = %d m = %d\n",p.n,p.m)" (() "(" (string_literal) ""afficherProblem: n = %d m = %d\n"" (") """ (string_content) "afficherProblem: n = %d m = %d" (escape_sequence) "\n" (") """ (,) "," (field_expression) "p.n" (identifier) "p" (.) "." (field_identifier) "n" (,) "," (field_expression) "p.m" (identifier) "p" (.) "." (field_identifier) "m" ()) ")" (;) ";" (expression_statement) "afficherDomain(*(p.d));" (call_expression) "afficherDomain(*(p.d))" (identifier) "afficherDomain" (argument_list) "(*(p.d))" (() "(" (pointer_expression) "*(p.d)" (*) "*" (parenthesized_expression) "(p.d)" (() "(" (field_expression) "p.d" (identifier) "p" (.) "." (field_identifier) "d" ()) ")" ()) ")" (;) ";" (comment) "//afficherConstraint();" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (function_definition) "bool isSolution(Domain d, Problem p) {\n for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf("taille pas bonne\n");\n return false;\n }\n }\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf("Contrainte pas bonne\n");\n return false;\n }\n }\n return true;\n}" (primitive_type) "bool" (function_declarator) "isSolution(Domain d, Problem p)" (identifier) "isSolution" (parameter_list) "(Domain d, Problem p)" (() "(" (parameter_declaration) "Domain d" (type_identifier) "Domain" (identifier) "d" (,) "," (parameter_declaration) "Problem p" (type_identifier) "Problem" (identifier) "p" ()) ")" (compound_statement) "{\n for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf("taille pas bonne\n");\n return false;\n }\n }\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf("Contrainte pas bonne\n");\n return false;\n }\n }\n return true;\n}" ({) "{" (for_statement) "for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf("taille pas bonne\n");\n return false;\n }\n }" (for) "for" (() "(" (declaration) "int i=0;" (primitive_type) "int" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<d.n" (identifier) "i" (<) "<" (field_expression) "d.n" (identifier) "d" (.) "." (field_identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if(Length(d.LDomain[i])>1) {\n //printf("taille pas bonne\n");\n return false;\n }\n }" ({) "{" (if_statement) "if(Length(d.LDomain[i])>1) {\n //printf("taille pas bonne\n");\n return false;\n }" (if) "if" (parenthesized_expression) "(Length(d.LDomain[i])>1)" (() "(" (binary_expression) "Length(d.LDomain[i])>1" (call_expression) "Length(d.LDomain[i])" (identifier) "Length" (argument_list) "(d.LDomain[i])" (() "(" (subscript_expression) "d.LDomain[i]" (field_expression) "d.LDomain" (identifier) "d" (.) "." (field_identifier) "LDomain" ([) "[" (identifier) "i" (]) "]" ()) ")" (>) ">" (number_literal) "1" ()) ")" (compound_statement) "{\n //printf("taille pas bonne\n");\n return false;\n }" ({) "{" (comment) "//printf("taille pas bonne\n");" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (}) "}" (for_statement) "for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf("Contrainte pas bonne\n");\n return false;\n }\n }" (for) "for" (() "(" (declaration) "int i=0;" (primitive_type) "int" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<p.m" (identifier) "i" (<) "<" (field_expression) "p.m" (identifier) "p" (.) "." (field_identifier) "m" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if(!validationContrainte(p.c[i],d)) {\n printf("Contrainte pas bonne\n");\n return false;\n }\n }" ({) "{" (if_statement) "if(!validationContrainte(p.c[i],d)) {\n printf("Contrainte pas bonne\n");\n return false;\n }" (if) "if" (parenthesized_expression) "(!validationContrainte(p.c[i],d))" (() "(" (unary_expression) "!validationContrainte(p.c[i],d)" (!) "!" (call_expression) "validationContrainte(p.c[i],d)" (identifier) "validationContrainte" (argument_list) "(p.c[i],d)" (() "(" (subscript_expression) "p.c[i]" (field_expression) "p.c" (identifier) "p" (.) "." (field_identifier) "c" ([) "[" (identifier) "i" (]) "]" (,) "," (identifier) "d" ()) ")" ()) ")" (compound_statement) "{\n printf("Contrainte pas bonne\n");\n return false;\n }" ({) "{" (expression_statement) "printf("Contrainte pas bonne\n");" (call_expression) "printf("Contrainte pas bonne\n")" (identifier) "printf" (argument_list) "("Contrainte pas bonne\n")" (() "(" (string_literal) ""Contrainte pas bonne\n"" (") """ (string_content) "Contrainte pas bonne" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (}) "}" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (function_definition) "bool verifCtes(Problem p, Domain d) {\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }\n return true;\n}" (primitive_type) "bool" (function_declarator) "verifCtes(Problem p, Domain d)" (identifier) "verifCtes" (parameter_list) "(Problem p, Domain d)" (() "(" (parameter_declaration) "Problem p" (type_identifier) "Problem" (identifier) "p" (,) "," (parameter_declaration) "Domain d" (type_identifier) "Domain" (identifier) "d" ()) ")" (compound_statement) "{\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }\n return true;\n}" ({) "{" (for_statement) "for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }" (for) "for" (() "(" (declaration) "int i=0;" (primitive_type) "int" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<p.m" (identifier) "i" (<) "<" (field_expression) "p.m" (identifier) "p" (.) "." (field_identifier) "m" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }" ({) "{" (if_statement) "if(!validationContrainte(p.c[i],d)) {\n return false;\n }" (if) "if" (parenthesized_expression) "(!validationContrainte(p.c[i],d))" (() "(" (unary_expression) "!validationContrainte(p.c[i],d)" (!) "!" (call_expression) "validationContrainte(p.c[i],d)" (identifier) "validationContrainte" (argument_list) "(p.c[i],d)" (() "(" (subscript_expression) "p.c[i]" (field_expression) "p.c" (identifier) "p" (.) "." (field_identifier) "c" ([) "[" (identifier) "i" (]) "]" (,) "," (identifier) "d" ()) ")" ()) ")" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (}) "}" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}"
686
0
{"language": "c", "success": true, "metadata": {"lines": 69, "avg_line_length": 24.72, "nodes": 406, "errors": 0, "source_hash": "9abdac15662159a0223cb3a77c75c8d298bd13c6f8e79fdf4ee65baac52e1589", "categorized_nodes": 310}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"Problem.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": "\"Problem.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <stdlib.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": "<stdlib.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 9, "type": "function_definition", "text": "void initQueenProblem(Problem* p,int newn ) {\n p->d=newDomain(newn);\n p->n = newn;\n p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n));\n int compte = 0;\n for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }\n p->m += compte;\n}", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "initQueenProblem(Problem* p,int newn )", "parent": 9, "children": [12, 13], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 43}}, {"id": 12, "type": "identifier", "text": "initQueenProblem", "parent": 11, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 21}}, {"id": 13, "type": "parameter_list", "text": "(Problem* p,int newn )", "parent": 11, "children": [14, 19], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 43}}, {"id": 14, "type": "parameter_declaration", "text": "Problem* p", "parent": 13, "children": [15, 16], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 32}}, {"id": 15, "type": "type_identifier", "text": "Problem", "parent": 14, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 29}}, {"id": 16, "type": "pointer_declarator", "text": "* p", "parent": 14, "children": [17, 18], "start_point": {"row": 5, "column": 29}, "end_point": {"row": 5, "column": 32}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 5, "column": 29}, "end_point": {"row": 5, "column": 30}}, {"id": 18, "type": "identifier", "text": "p", "parent": 16, "children": [], "start_point": {"row": 5, "column": 31}, "end_point": {"row": 5, "column": 32}}, {"id": 19, "type": "parameter_declaration", "text": "int newn", "parent": 13, "children": [20, 21], "start_point": {"row": 5, "column": 33}, "end_point": {"row": 5, "column": 41}}, {"id": 20, "type": "primitive_type", "text": "int", "parent": 19, "children": [], "start_point": {"row": 5, "column": 33}, "end_point": {"row": 5, "column": 36}}, {"id": 21, "type": "identifier", "text": "newn", "parent": 19, "children": [], "start_point": {"row": 5, "column": 37}, "end_point": {"row": 5, "column": 41}}, {"id": 22, "type": "assignment_expression", "text": "p->d=newDomain(newn)", "parent": 9, "children": [23, 26, 27], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 24}}, {"id": 23, "type": "field_expression", "text": "p->d", "parent": 22, "children": [24, 25], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 8}}, {"id": 24, "type": "identifier", "text": "p", "parent": 23, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 5}}, {"id": 25, "type": "field_identifier", "text": "d", "parent": 23, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 8}}, {"id": 26, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 27, "type": "call_expression", "text": "newDomain(newn)", "parent": 22, "children": [28, 29], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 24}}, {"id": 28, "type": "identifier", "text": "newDomain", "parent": 27, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 18}}, {"id": 29, "type": "argument_list", "text": "(newn)", "parent": 27, "children": [30], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 24}}, {"id": 30, "type": "identifier", "text": "newn", "parent": 29, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 23}}, {"id": 31, "type": "assignment_expression", "text": "p->n = newn", "parent": 9, "children": [32, 35, 36], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 15}}, {"id": 32, "type": "field_expression", "text": "p->n", "parent": 31, "children": [33, 34], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 8}}, {"id": 33, "type": "identifier", "text": "p", "parent": 32, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 5}}, {"id": 34, "type": "field_identifier", "text": "n", "parent": 32, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 8}}, {"id": 35, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 10}}, {"id": 36, "type": "identifier", "text": "newn", "parent": 31, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 15}}, {"id": 37, "type": "assignment_expression", "text": "p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n))", "parent": 9, "children": [38, 41, 42], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 60}}, {"id": 38, "type": "field_expression", "text": "p->c", "parent": 37, "children": [39, 40], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 8}}, {"id": 39, "type": "identifier", "text": "p", "parent": 38, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 5}}, {"id": 40, "type": "field_identifier", "text": "c", "parent": 38, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 8}}, {"id": 41, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 9}}, {"id": 42, "type": "call_expression", "text": "malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n))", "parent": 37, "children": [43, 44], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 60}}, {"id": 43, "type": "identifier", "text": "malloc", "parent": 42, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 15}}, {"id": 44, "type": "argument_list", "text": "(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n))", "parent": 42, "children": [45], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 60}}, {"id": 45, "type": "binary_expression", "text": "sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n)", "parent": 44, "children": [46, 64, 65], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 59}}, {"id": 46, "type": "binary_expression", "text": "sizeof(Constraint)*3*(p->n)*(p->n)", "parent": 45, "children": [47, 59, 60], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 50}}, {"id": 47, "type": "binary_expression", "text": "sizeof(Constraint)*3*(p->n)", "parent": 46, "children": [48, 54, 55], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 43}}, {"id": 48, "type": "binary_expression", "text": "sizeof(Constraint)*3", "parent": 47, "children": [49, 52, 53], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 36}}, {"id": 49, "type": "sizeof_expression", "text": "sizeof(Constraint)", "parent": 48, "children": [50], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 34}}, {"id": 50, "type": "parenthesized_expression", "text": "(Constraint)", "parent": 49, "children": [51], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 34}}, {"id": 51, "type": "identifier", "text": "Constraint", "parent": 50, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 33}}, {"id": 52, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 35}}, {"id": 53, "type": "number_literal", "text": "3", "parent": 48, "children": [], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 36}}, {"id": 54, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 8, "column": 36}, "end_point": {"row": 8, "column": 37}}, {"id": 55, "type": "parenthesized_expression", "text": "(p->n)", "parent": 47, "children": [56], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 43}}, {"id": 56, "type": "field_expression", "text": "p->n", "parent": 55, "children": [57, 58], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 42}}, {"id": 57, "type": "identifier", "text": "p", "parent": 56, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 39}}, {"id": 58, "type": "field_identifier", "text": "n", "parent": 56, "children": [], "start_point": {"row": 8, "column": 41}, "end_point": {"row": 8, "column": 42}}, {"id": 59, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 8, "column": 43}, "end_point": {"row": 8, "column": 44}}, {"id": 60, "type": "parenthesized_expression", "text": "(p->n)", "parent": 46, "children": [61], "start_point": {"row": 8, "column": 44}, "end_point": {"row": 8, "column": 50}}, {"id": 61, "type": "field_expression", "text": "p->n", "parent": 60, "children": [62, 63], "start_point": {"row": 8, "column": 45}, "end_point": {"row": 8, "column": 49}}, {"id": 62, "type": "identifier", "text": "p", "parent": 61, "children": [], "start_point": {"row": 8, "column": 45}, "end_point": {"row": 8, "column": 46}}, {"id": 63, "type": "field_identifier", "text": "n", "parent": 61, "children": [], "start_point": {"row": 8, "column": 48}, "end_point": {"row": 8, "column": 49}}, {"id": 64, "type": "-", "text": "-", "parent": 45, "children": [], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 51}}, {"id": 65, "type": "binary_expression", "text": "3*(p->n)", "parent": 45, "children": [66, 67, 68], "start_point": {"row": 8, "column": 51}, "end_point": {"row": 8, "column": 59}}, {"id": 66, "type": "number_literal", "text": "3", "parent": 65, "children": [], "start_point": {"row": 8, "column": 51}, "end_point": {"row": 8, "column": 52}}, {"id": 67, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 8, "column": 52}, "end_point": {"row": 8, "column": 53}}, {"id": 68, "type": "parenthesized_expression", "text": "(p->n)", "parent": 65, "children": [69], "start_point": {"row": 8, "column": 53}, "end_point": {"row": 8, "column": 59}}, {"id": 69, "type": "field_expression", "text": "p->n", "parent": 68, "children": [70, 71], "start_point": {"row": 8, "column": 54}, "end_point": {"row": 8, "column": 58}}, {"id": 70, "type": "identifier", "text": "p", "parent": 69, "children": [], "start_point": {"row": 8, "column": 54}, "end_point": {"row": 8, "column": 55}}, {"id": 71, "type": "field_identifier", "text": "n", "parent": 69, "children": [], "start_point": {"row": 8, "column": 57}, "end_point": {"row": 8, "column": 58}}, {"id": 72, "type": "declaration", "text": "int compte = 0;", "parent": 9, "children": [73, 74], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 19}}, {"id": 73, "type": "primitive_type", "text": "int", "parent": 72, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 7}}, {"id": 74, "type": "init_declarator", "text": "compte = 0", "parent": 72, "children": [75, 76, 77], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 18}}, {"id": 75, "type": "identifier", "text": "compte", "parent": 74, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 14}}, {"id": 76, "type": "=", "text": "=", "parent": 74, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 16}}, {"id": 77, "type": "number_literal", "text": "0", "parent": 74, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 78, "type": "for_statement", "text": "for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }", "parent": 9, "children": [79, 85, 91], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 27, "column": 5}}, {"id": 79, "type": "declaration", "text": "int i = 0;", "parent": 78, "children": [80, 81], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 18}}, {"id": 80, "type": "primitive_type", "text": "int", "parent": 79, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 11}}, {"id": 81, "type": "init_declarator", "text": "i = 0", "parent": 79, "children": [82, 83, 84], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 17}}, {"id": 82, "type": "identifier", "text": "i", "parent": 81, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 13}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 84, "type": "number_literal", "text": "0", "parent": 81, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 17}}, {"id": 85, "type": "binary_expression", "text": "i<p->n", "parent": 78, "children": [86, 87, 88], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 25}}, {"id": 86, "type": "identifier", "text": "i", "parent": 85, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 20}}, {"id": 87, "type": "<", "text": "<", "parent": 85, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 21}}, {"id": 88, "type": "field_expression", "text": "p->n", "parent": 85, "children": [89, 90], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 25}}, {"id": 89, "type": "identifier", "text": "p", "parent": 88, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 22}}, {"id": 90, "type": "field_identifier", "text": "n", "parent": 88, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 25}}, {"id": 91, "type": "update_expression", "text": "i++", "parent": 78, "children": [92, 93], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 30}}, {"id": 92, "type": "identifier", "text": "i", "parent": 91, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 28}}, {"id": 93, "type": "++", "text": "++", "parent": 91, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 30}}, {"id": 94, "type": "for_statement", "text": "for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }", "parent": 78, "children": [95, 101, 107], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 26, "column": 9}}, {"id": 95, "type": "declaration", "text": "int j=0;", "parent": 94, "children": [96, 97], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 20}}, {"id": 96, "type": "primitive_type", "text": "int", "parent": 95, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 15}}, {"id": 97, "type": "init_declarator", "text": "j=0", "parent": 95, "children": [98, 99, 100], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 19}}, {"id": 98, "type": "identifier", "text": "j", "parent": 97, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 99, "type": "=", "text": "=", "parent": 97, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 100, "type": "number_literal", "text": "0", "parent": 97, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 19}}, {"id": 101, "type": "binary_expression", "text": "j<p->n", "parent": 94, "children": [102, 103, 104], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 27}}, {"id": 102, "type": "identifier", "text": "j", "parent": 101, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 22}}, {"id": 103, "type": "<", "text": "<", "parent": 101, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 23}}, {"id": 104, "type": "field_expression", "text": "p->n", "parent": 101, "children": [105, 106], "start_point": {"row": 11, "column": 23}, "end_point": {"row": 11, "column": 27}}, {"id": 105, "type": "identifier", "text": "p", "parent": 104, "children": [], "start_point": {"row": 11, "column": 23}, "end_point": {"row": 11, "column": 24}}, {"id": 106, "type": "field_identifier", "text": "n", "parent": 104, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 27}}, {"id": 107, "type": "update_expression", "text": "j++", "parent": 94, "children": [108, 109], "start_point": {"row": 11, "column": 29}, "end_point": {"row": 11, "column": 32}}, {"id": 108, "type": "identifier", "text": "j", "parent": 107, "children": [], "start_point": {"row": 11, "column": 29}, "end_point": {"row": 11, "column": 30}}, {"id": 109, "type": "++", "text": "++", "parent": 107, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 32}}, {"id": 110, "type": "if_statement", "text": "if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }", "parent": 94, "children": [111], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 111, "type": "parenthesized_expression", "text": "(i!=j)", "parent": 110, "children": [112], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 20}}, {"id": 112, "type": "binary_expression", "text": "i!=j", "parent": 111, "children": [113, 114, 115], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 19}}, {"id": 113, "type": "identifier", "text": "i", "parent": 112, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 114, "type": "!=", "text": "!=", "parent": 112, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 18}}, {"id": 115, "type": "identifier", "text": "j", "parent": 112, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 116, "type": "declaration", "text": "Constraint cl, cdm, cdd;", "parent": 110, "children": [117, 118, 119, 120], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 40}}, {"id": 117, "type": "type_identifier", "text": "Constraint", "parent": 116, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 26}}, {"id": 118, "type": "identifier", "text": "cl", "parent": 116, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 29}}, {"id": 119, "type": "identifier", "text": "cdm", "parent": 116, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 34}}, {"id": 120, "type": "identifier", "text": "cdd", "parent": 116, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 39}}, {"id": 121, "type": "call_expression", "text": "initConstraint(&cl,0,0,i,j)", "parent": 110, "children": [122, 123], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 43}}, {"id": 122, "type": "identifier", "text": "initConstraint", "parent": 121, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 30}}, {"id": 123, "type": "argument_list", "text": "(&cl,0,0,i,j)", "parent": 121, "children": [124, 126, 127, 128, 129], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 43}}, {"id": 124, "type": "pointer_expression", "text": "&cl", "parent": 123, "children": [125], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 34}}, {"id": 125, "type": "identifier", "text": "cl", "parent": 124, "children": [], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 34}}, {"id": 126, "type": "number_literal", "text": "0", "parent": 123, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 36}}, {"id": 127, "type": "number_literal", "text": "0", "parent": 123, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 38}}, {"id": 128, "type": "identifier", "text": "i", "parent": 123, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 40}}, {"id": 129, "type": "identifier", "text": "j", "parent": 123, "children": [], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 42}}, {"id": 130, "type": "call_expression", "text": "initConstraint(&cdm,i,j,i,j)", "parent": 110, "children": [131, 132], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 44}}, {"id": 131, "type": "identifier", "text": "initConstraint", "parent": 130, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 30}}, {"id": 132, "type": "argument_list", "text": "(&cdm,i,j,i,j)", "parent": 130, "children": [133, 135, 136, 137, 138], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 44}}, {"id": 133, "type": "pointer_expression", "text": "&cdm", "parent": 132, "children": [134], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 35}}, {"id": 134, "type": "identifier", "text": "cdm", "parent": 133, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 35}}, {"id": 135, "type": "identifier", "text": "i", "parent": 132, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 37}}, {"id": 136, "type": "identifier", "text": "j", "parent": 132, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 39}}, {"id": 137, "type": "identifier", "text": "i", "parent": 132, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 41}}, {"id": 138, "type": "identifier", "text": "j", "parent": 132, "children": [], "start_point": {"row": 15, "column": 42}, "end_point": {"row": 15, "column": 43}}, {"id": 139, "type": "call_expression", "text": "initConstraint(&cdd,-i,-j,i,j)", "parent": 110, "children": [140, 141], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 46}}, {"id": 140, "type": "identifier", "text": "initConstraint", "parent": 139, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 30}}, {"id": 141, "type": "argument_list", "text": "(&cdd,-i,-j,i,j)", "parent": 139, "children": [142, 144, 147, 150, 151], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 46}}, {"id": 142, "type": "pointer_expression", "text": "&cdd", "parent": 141, "children": [143], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 35}}, {"id": 143, "type": "identifier", "text": "cdd", "parent": 142, "children": [], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 35}}, {"id": 144, "type": "unary_expression", "text": "-i", "parent": 141, "children": [145, 146], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 38}}, {"id": 145, "type": "-", "text": "-", "parent": 144, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 37}}, {"id": 146, "type": "identifier", "text": "i", "parent": 144, "children": [], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 38}}, {"id": 147, "type": "unary_expression", "text": "-j", "parent": 141, "children": [148, 149], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 41}}, {"id": 148, "type": "-", "text": "-", "parent": 147, "children": [], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 40}}, {"id": 149, "type": "identifier", "text": "j", "parent": 147, "children": [], "start_point": {"row": 16, "column": 40}, "end_point": {"row": 16, "column": 41}}, {"id": 150, "type": "identifier", "text": "i", "parent": 141, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 43}}, {"id": 151, "type": "identifier", "text": "j", "parent": 141, "children": [], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 45}}, {"id": 152, "type": "assignment_expression", "text": "(p->c)[compte]=cl", "parent": 110, "children": [153, 159, 160], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 33}}, {"id": 153, "type": "subscript_expression", "text": "(p->c)[compte]", "parent": 152, "children": [154, 158], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 30}}, {"id": 154, "type": "parenthesized_expression", "text": "(p->c)", "parent": 153, "children": [155], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 22}}, {"id": 155, "type": "field_expression", "text": "p->c", "parent": 154, "children": [156, 157], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 21}}, {"id": 156, "type": "identifier", "text": "p", "parent": 155, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 18}}, {"id": 157, "type": "field_identifier", "text": "c", "parent": 155, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 21}}, {"id": 158, "type": "identifier", "text": "compte", "parent": 153, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 29}}, {"id": 159, "type": "=", "text": "=", "parent": 152, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 31}}, {"id": 160, "type": "identifier", "text": "cl", "parent": 152, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 33}}, {"id": 161, "type": "update_expression", "text": "compte++", "parent": 110, "children": [162, 163], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 24}}, {"id": 162, "type": "identifier", "text": "compte", "parent": 161, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 22}}, {"id": 163, "type": "++", "text": "++", "parent": 161, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 24}}, {"id": 164, "type": "assignment_expression", "text": "(p->c)[compte]=cdm", "parent": 110, "children": [165, 171, 172], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 34}}, {"id": 165, "type": "subscript_expression", "text": "(p->c)[compte]", "parent": 164, "children": [166, 170], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 30}}, {"id": 166, "type": "parenthesized_expression", "text": "(p->c)", "parent": 165, "children": [167], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 22}}, {"id": 167, "type": "field_expression", "text": "p->c", "parent": 166, "children": [168, 169], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 21}}, {"id": 168, "type": "identifier", "text": "p", "parent": 167, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 18}}, {"id": 169, "type": "field_identifier", "text": "c", "parent": 167, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 21}}, {"id": 170, "type": "identifier", "text": "compte", "parent": 165, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 29}}, {"id": 171, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 31}}, {"id": 172, "type": "identifier", "text": "cdm", "parent": 164, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 34}}, {"id": 173, "type": "update_expression", "text": "compte++", "parent": 110, "children": [174, 175], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 24}}, {"id": 174, "type": "identifier", "text": "compte", "parent": 173, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 22}}, {"id": 175, "type": "++", "text": "++", "parent": 173, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 24}}, {"id": 176, "type": "assignment_expression", "text": "(p->c)[compte]=cdd", "parent": 110, "children": [177, 183, 184], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 34}}, {"id": 177, "type": "subscript_expression", "text": "(p->c)[compte]", "parent": 176, "children": [178, 182], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 30}}, {"id": 178, "type": "parenthesized_expression", "text": "(p->c)", "parent": 177, "children": [179], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 22}}, {"id": 179, "type": "field_expression", "text": "p->c", "parent": 178, "children": [180, 181], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 21}}, {"id": 180, "type": "identifier", "text": "p", "parent": 179, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 18}}, {"id": 181, "type": "field_identifier", "text": "c", "parent": 179, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 21}}, {"id": 182, "type": "identifier", "text": "compte", "parent": 177, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 29}}, {"id": 183, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 184, "type": "identifier", "text": "cdd", "parent": 176, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 34}}, {"id": 185, "type": "update_expression", "text": "compte++", "parent": 110, "children": [186, 187], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 24}}, {"id": 186, "type": "identifier", "text": "compte", "parent": 185, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 22}}, {"id": 187, "type": "++", "text": "++", "parent": 185, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 24}}, {"id": 188, "type": "assignment_expression", "text": "p->m += compte", "parent": 9, "children": [189, 192, 193], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 18}}, {"id": 189, "type": "field_expression", "text": "p->m", "parent": 188, "children": [190, 191], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 190, "type": "identifier", "text": "p", "parent": 189, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 191, "type": "field_identifier", "text": "m", "parent": 189, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 8}}, {"id": 192, "type": "+=", "text": "+=", "parent": 188, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 11}}, {"id": 193, "type": "identifier", "text": "compte", "parent": 188, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 18}}, {"id": 194, "type": "function_definition", "text": "Problem* newProblem(int newn) {\n Problem* p=malloc(sizeof(Problem));\n initQueenProblem(p, newn);\n return p;\n}", "parent": null, "children": [195, 196], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 195, "type": "type_identifier", "text": "Problem", "parent": 194, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 196, "type": "pointer_declarator", "text": "* newProblem(int newn)", "parent": 194, "children": [197, 198], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 29}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 8}}, {"id": 198, "type": "function_declarator", "text": "newProblem(int newn)", "parent": 196, "children": [199, 200], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 29}}, {"id": 199, "type": "identifier", "text": "newProblem", "parent": 198, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 19}}, {"id": 200, "type": "parameter_list", "text": "(int newn)", "parent": 198, "children": [201], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 29}}, {"id": 201, "type": "parameter_declaration", "text": "int newn", "parent": 200, "children": [202, 203], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 28}}, {"id": 202, "type": "primitive_type", "text": "int", "parent": 201, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 23}}, {"id": 203, "type": "identifier", "text": "newn", "parent": 201, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 28}}, {"id": 204, "type": "declaration", "text": "Problem* p=malloc(sizeof(Problem));", "parent": 194, "children": [205, 206], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 39}}, {"id": 205, "type": "type_identifier", "text": "Problem", "parent": 204, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 11}}, {"id": 206, "type": "init_declarator", "text": "* p=malloc(sizeof(Problem))", "parent": 204, "children": [207, 210, 211], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 38}}, {"id": 207, "type": "pointer_declarator", "text": "* p", "parent": 206, "children": [208, 209], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 14}}, {"id": 208, "type": "*", "text": "*", "parent": 207, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 12}}, {"id": 209, "type": "identifier", "text": "p", "parent": 207, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 14}}, {"id": 210, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 211, "type": "call_expression", "text": "malloc(sizeof(Problem))", "parent": 206, "children": [212, 213], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 38}}, {"id": 212, "type": "identifier", "text": "malloc", "parent": 211, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 21}}, {"id": 213, "type": "argument_list", "text": "(sizeof(Problem))", "parent": 211, "children": [214], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 38}}, {"id": 214, "type": "sizeof_expression", "text": "sizeof(Problem)", "parent": 213, "children": [215], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 37}}, {"id": 215, "type": "parenthesized_expression", "text": "(Problem)", "parent": 214, "children": [216], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 37}}, {"id": 216, "type": "identifier", "text": "Problem", "parent": 215, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 36}}, {"id": 217, "type": "call_expression", "text": "initQueenProblem(p, newn)", "parent": 194, "children": [218, 219], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 29}}, {"id": 218, "type": "identifier", "text": "initQueenProblem", "parent": 217, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 20}}, {"id": 219, "type": "argument_list", "text": "(p, newn)", "parent": 217, "children": [220, 221], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 29}}, {"id": 220, "type": "identifier", "text": "p", "parent": 219, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 22}}, {"id": 221, "type": "identifier", "text": "newn", "parent": 219, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 28}}, {"id": 222, "type": "return_statement", "text": "return p;", "parent": 194, "children": [223], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 13}}, {"id": 223, "type": "identifier", "text": "p", "parent": 222, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 12}}, {"id": 224, "type": "function_definition", "text": "void destroyProblemContent(Problem * p) {\n destroyDomain(p->d);\n free(p->d);\n free(p->c);\n return;\n}", "parent": null, "children": [225, 226], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 225, "type": "primitive_type", "text": "void", "parent": 224, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 4}}, {"id": 226, "type": "function_declarator", "text": "destroyProblemContent(Problem * p)", "parent": 224, "children": [227, 228], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 39}}, {"id": 227, "type": "identifier", "text": "destroyProblemContent", "parent": 226, "children": [], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 26}}, {"id": 228, "type": "parameter_list", "text": "(Problem * p)", "parent": 226, "children": [229], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 39}}, {"id": 229, "type": "parameter_declaration", "text": "Problem * p", "parent": 228, "children": [230, 231], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 38}}, {"id": 230, "type": "type_identifier", "text": "Problem", "parent": 229, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 34}}, {"id": 231, "type": "pointer_declarator", "text": "* p", "parent": 229, "children": [232, 233], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 38}}, {"id": 232, "type": "*", "text": "*", "parent": 231, "children": [], "start_point": {"row": 37, "column": 35}, "end_point": {"row": 37, "column": 36}}, {"id": 233, "type": "identifier", "text": "p", "parent": 231, "children": [], "start_point": {"row": 37, "column": 37}, "end_point": {"row": 37, "column": 38}}, {"id": 234, "type": "call_expression", "text": "destroyDomain(p->d)", "parent": 224, "children": [235, 236], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 23}}, {"id": 235, "type": "identifier", "text": "destroyDomain", "parent": 234, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 17}}, {"id": 236, "type": "argument_list", "text": "(p->d)", "parent": 234, "children": [237], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 23}}, {"id": 237, "type": "field_expression", "text": "p->d", "parent": 236, "children": [238, 239], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 22}}, {"id": 238, "type": "identifier", "text": "p", "parent": 237, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 239, "type": "field_identifier", "text": "d", "parent": 237, "children": [], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 22}}, {"id": 240, "type": "call_expression", "text": "free(p->d)", "parent": 224, "children": [241, 242], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 14}}, {"id": 241, "type": "identifier", "text": "free", "parent": 240, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 8}}, {"id": 242, "type": "argument_list", "text": "(p->d)", "parent": 240, "children": [243], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 243, "type": "field_expression", "text": "p->d", "parent": 242, "children": [244, 245], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 13}}, {"id": 244, "type": "identifier", "text": "p", "parent": 243, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 10}}, {"id": 245, "type": "field_identifier", "text": "d", "parent": 243, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 13}}, {"id": 246, "type": "call_expression", "text": "free(p->c)", "parent": 224, "children": [247, 248], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 14}}, {"id": 247, "type": "identifier", "text": "free", "parent": 246, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 248, "type": "argument_list", "text": "(p->c)", "parent": 246, "children": [249], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 14}}, {"id": 249, "type": "field_expression", "text": "p->c", "parent": 248, "children": [250, 251], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 13}}, {"id": 250, "type": "identifier", "text": "p", "parent": 249, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 10}}, {"id": 251, "type": "field_identifier", "text": "c", "parent": 249, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 13}}, {"id": 252, "type": "return_statement", "text": "return;", "parent": 224, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 11}}, {"id": 253, "type": "function_definition", "text": "void afficherProblem(Problem p) {\n printf(\"afficherProblem: n = %d m = %d\\n\",p.n,p.m);\n afficherDomain(*(p.d));\n //afficherConstraint();\n return;\n}", "parent": null, "children": [254, 255], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 254, "type": "primitive_type", "text": "void", "parent": 253, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 255, "type": "function_declarator", "text": "afficherProblem(Problem p)", "parent": 253, "children": [256, 257], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 31}}, {"id": 256, "type": "identifier", "text": "afficherProblem", "parent": 255, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 20}}, {"id": 257, "type": "parameter_list", "text": "(Problem p)", "parent": 255, "children": [258], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 31}}, {"id": 258, "type": "parameter_declaration", "text": "Problem p", "parent": 257, "children": [259, 260], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 30}}, {"id": 259, "type": "type_identifier", "text": "Problem", "parent": 258, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 28}}, {"id": 260, "type": "identifier", "text": "p", "parent": 258, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 261, "type": "call_expression", "text": "printf(\"afficherProblem: n = %d m = %d\\n\",p.n,p.m)", "parent": 253, "children": [262, 263], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 57}}, {"id": 262, "type": "identifier", "text": "printf", "parent": 261, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 10}}, {"id": 263, "type": "argument_list", "text": "(\"afficherProblem: n = %d m = %d\\n\",p.n,p.m)", "parent": 261, "children": [264, 266, 269], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 57}}, {"id": 264, "type": "string_literal", "text": "\"afficherProblem: n = %d m = %d\\n\"", "parent": 263, "children": [265], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 48}}, {"id": 265, "type": "escape_sequence", "text": "\\n", "parent": 264, "children": [], "start_point": {"row": 45, "column": 45}, "end_point": {"row": 45, "column": 47}}, {"id": 266, "type": "field_expression", "text": "p.n", "parent": 263, "children": [267, 268], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 52}}, {"id": 267, "type": "identifier", "text": "p", "parent": 266, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 50}}, {"id": 268, "type": "field_identifier", "text": "n", "parent": 266, "children": [], "start_point": {"row": 45, "column": 51}, "end_point": {"row": 45, "column": 52}}, {"id": 269, "type": "field_expression", "text": "p.m", "parent": 263, "children": [270, 271], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 56}}, {"id": 270, "type": "identifier", "text": "p", "parent": 269, "children": [], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 54}}, {"id": 271, "type": "field_identifier", "text": "m", "parent": 269, "children": [], "start_point": {"row": 45, "column": 55}, "end_point": {"row": 45, "column": 56}}, {"id": 272, "type": "call_expression", "text": "afficherDomain(*(p.d))", "parent": 253, "children": [273, 274], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 26}}, {"id": 273, "type": "identifier", "text": "afficherDomain", "parent": 272, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 18}}, {"id": 274, "type": "argument_list", "text": "(*(p.d))", "parent": 272, "children": [275], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 26}}, {"id": 275, "type": "pointer_expression", "text": "*(p.d)", "parent": 274, "children": [276, 277], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 25}}, {"id": 276, "type": "*", "text": "*", "parent": 275, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 277, "type": "parenthesized_expression", "text": "(p.d)", "parent": 275, "children": [278], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 25}}, {"id": 278, "type": "field_expression", "text": "p.d", "parent": 277, "children": [279, 280], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 24}}, {"id": 279, "type": "identifier", "text": "p", "parent": 278, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 280, "type": "field_identifier", "text": "d", "parent": 278, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 24}}, {"id": 281, "type": "return_statement", "text": "return;", "parent": 253, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 11}}, {"id": 282, "type": "function_definition", "text": "bool isSolution(Domain d, Problem p) {\n for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf(\"taille pas bonne\\n\");\n return false;\n }\n }\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf(\"Contrainte pas bonne\\n\");\n return false;\n }\n }\n return true;\n}", "parent": null, "children": [283, 284], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 283, "type": "primitive_type", "text": "bool", "parent": 282, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 4}}, {"id": 284, "type": "function_declarator", "text": "isSolution(Domain d, Problem p)", "parent": 282, "children": [285, 286], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 36}}, {"id": 285, "type": "identifier", "text": "isSolution", "parent": 284, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 15}}, {"id": 286, "type": "parameter_list", "text": "(Domain d, Problem p)", "parent": 284, "children": [287, 290], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 36}}, {"id": 287, "type": "parameter_declaration", "text": "Domain d", "parent": 286, "children": [288, 289], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 24}}, {"id": 288, "type": "type_identifier", "text": "Domain", "parent": 287, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 22}}, {"id": 289, "type": "identifier", "text": "d", "parent": 287, "children": [], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 24}}, {"id": 290, "type": "parameter_declaration", "text": "Problem p", "parent": 286, "children": [291, 292], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 35}}, {"id": 291, "type": "type_identifier", "text": "Problem", "parent": 290, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 33}}, {"id": 292, "type": "identifier", "text": "p", "parent": 290, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 35}}, {"id": 293, "type": "for_statement", "text": "for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf(\"taille pas bonne\\n\");\n return false;\n }\n }", "parent": 282, "children": [294, 300, 306], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 57, "column": 5}}, {"id": 294, "type": "declaration", "text": "int i=0;", "parent": 293, "children": [295, 296], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 16}}, {"id": 295, "type": "primitive_type", "text": "int", "parent": 294, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 11}}, {"id": 296, "type": "init_declarator", "text": "i=0", "parent": 294, "children": [297, 298, 299], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 15}}, {"id": 297, "type": "identifier", "text": "i", "parent": 296, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 13}}, {"id": 298, "type": "=", "text": "=", "parent": 296, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 14}}, {"id": 299, "type": "number_literal", "text": "0", "parent": 296, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 15}}, {"id": 300, "type": "binary_expression", "text": "i<d.n", "parent": 293, "children": [301, 302, 303], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 22}}, {"id": 301, "type": "identifier", "text": "i", "parent": 300, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 18}}, {"id": 302, "type": "<", "text": "<", "parent": 300, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 19}}, {"id": 303, "type": "field_expression", "text": "d.n", "parent": 300, "children": [304, 305], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 22}}, {"id": 304, "type": "identifier", "text": "d", "parent": 303, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 20}}, {"id": 305, "type": "field_identifier", "text": "n", "parent": 303, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 22}}, {"id": 306, "type": "update_expression", "text": "i++", "parent": 293, "children": [307, 308], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 27}}, {"id": 307, "type": "identifier", "text": "i", "parent": 306, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 308, "type": "++", "text": "++", "parent": 306, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 27}}, {"id": 309, "type": "if_statement", "text": "if(Length(d.LDomain[i])>1) {\n //printf(\"taille pas bonne\\n\");\n return false;\n }", "parent": 293, "children": [310], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 56, "column": 9}}, {"id": 310, "type": "parenthesized_expression", "text": "(Length(d.LDomain[i])>1)", "parent": 309, "children": [311], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 34}}, {"id": 311, "type": "binary_expression", "text": "Length(d.LDomain[i])>1", "parent": 310, "children": [312, 320, 321], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 33}}, {"id": 312, "type": "call_expression", "text": "Length(d.LDomain[i])", "parent": 311, "children": [313, 314], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 31}}, {"id": 313, "type": "identifier", "text": "Length", "parent": 312, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 17}}, {"id": 314, "type": "argument_list", "text": "(d.LDomain[i])", "parent": 312, "children": [315], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 31}}, {"id": 315, "type": "subscript_expression", "text": "d.LDomain[i]", "parent": 314, "children": [316, 319], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 30}}, {"id": 316, "type": "field_expression", "text": "d.LDomain", "parent": 315, "children": [317, 318], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 27}}, {"id": 317, "type": "identifier", "text": "d", "parent": 316, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 19}}, {"id": 318, "type": "field_identifier", "text": "LDomain", "parent": 316, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 27}}, {"id": 319, "type": "identifier", "text": "i", "parent": 315, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 29}}, {"id": 320, "type": ">", "text": ">", "parent": 311, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 32}}, {"id": 321, "type": "number_literal", "text": "1", "parent": 311, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 33}}, {"id": 322, "type": "return_statement", "text": "return false;", "parent": 309, "children": [323], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 25}}, {"id": 323, "type": "false", "text": "false", "parent": 322, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 24}}, {"id": 324, "type": "for_statement", "text": "for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf(\"Contrainte pas bonne\\n\");\n return false;\n }\n }", "parent": 282, "children": [325, 331, 337], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 63, "column": 5}}, {"id": 325, "type": "declaration", "text": "int i=0;", "parent": 324, "children": [326, 327], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 16}}, {"id": 326, "type": "primitive_type", "text": "int", "parent": 325, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 11}}, {"id": 327, "type": "init_declarator", "text": "i=0", "parent": 325, "children": [328, 329, 330], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 15}}, {"id": 328, "type": "identifier", "text": "i", "parent": 327, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 13}}, {"id": 329, "type": "=", "text": "=", "parent": 327, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 14}}, {"id": 330, "type": "number_literal", "text": "0", "parent": 327, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 15}}, {"id": 331, "type": "binary_expression", "text": "i<p.m", "parent": 324, "children": [332, 333, 334], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 22}}, {"id": 332, "type": "identifier", "text": "i", "parent": 331, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 18}}, {"id": 333, "type": "<", "text": "<", "parent": 331, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 19}}, {"id": 334, "type": "field_expression", "text": "p.m", "parent": 331, "children": [335, 336], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 22}}, {"id": 335, "type": "identifier", "text": "p", "parent": 334, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 20}}, {"id": 336, "type": "field_identifier", "text": "m", "parent": 334, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 22}}, {"id": 337, "type": "update_expression", "text": "i++", "parent": 324, "children": [338, 339], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 27}}, {"id": 338, "type": "identifier", "text": "i", "parent": 337, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 25}}, {"id": 339, "type": "++", "text": "++", "parent": 337, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 27}}, {"id": 340, "type": "if_statement", "text": "if(!validationContrainte(p.c[i],d)) {\n printf(\"Contrainte pas bonne\\n\");\n return false;\n }", "parent": 324, "children": [341], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 62, "column": 9}}, {"id": 341, "type": "parenthesized_expression", "text": "(!validationContrainte(p.c[i],d))", "parent": 340, "children": [342], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 43}}, {"id": 342, "type": "unary_expression", "text": "!validationContrainte(p.c[i],d)", "parent": 341, "children": [343, 344], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 42}}, {"id": 343, "type": "!", "text": "!", "parent": 342, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 12}}, {"id": 344, "type": "call_expression", "text": "validationContrainte(p.c[i],d)", "parent": 342, "children": [345, 346], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 42}}, {"id": 345, "type": "identifier", "text": "validationContrainte", "parent": 344, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 32}}, {"id": 346, "type": "argument_list", "text": "(p.c[i],d)", "parent": 344, "children": [347, 352], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 42}}, {"id": 347, "type": "subscript_expression", "text": "p.c[i]", "parent": 346, "children": [348, 351], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 39}}, {"id": 348, "type": "field_expression", "text": "p.c", "parent": 347, "children": [349, 350], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 36}}, {"id": 349, "type": "identifier", "text": "p", "parent": 348, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 34}}, {"id": 350, "type": "field_identifier", "text": "c", "parent": 348, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 36}}, {"id": 351, "type": "identifier", "text": "i", "parent": 347, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 38}}, {"id": 352, "type": "identifier", "text": "d", "parent": 346, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 41}}, {"id": 353, "type": "call_expression", "text": "printf(\"Contrainte pas bonne\\n\")", "parent": 340, "children": [354, 355], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 44}}, {"id": 354, "type": "identifier", "text": "printf", "parent": 353, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 18}}, {"id": 355, "type": "argument_list", "text": "(\"Contrainte pas bonne\\n\")", "parent": 353, "children": [356], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 44}}, {"id": 356, "type": "string_literal", "text": "\"Contrainte pas bonne\\n\"", "parent": 355, "children": [357], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 43}}, {"id": 357, "type": "escape_sequence", "text": "\\n", "parent": 356, "children": [], "start_point": {"row": 60, "column": 40}, "end_point": {"row": 60, "column": 42}}, {"id": 358, "type": "return_statement", "text": "return false;", "parent": 340, "children": [359], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 25}}, {"id": 359, "type": "false", "text": "false", "parent": 358, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 24}}, {"id": 360, "type": "return_statement", "text": "return true;", "parent": 282, "children": [361], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 16}}, {"id": 361, "type": "true", "text": "true", "parent": 360, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 15}}, {"id": 362, "type": "function_definition", "text": "bool verifCtes(Problem p, Domain d) {\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }\n return true;\n}", "parent": null, "children": [363, 364], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 363, "type": "primitive_type", "text": "bool", "parent": 362, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 4}}, {"id": 364, "type": "function_declarator", "text": "verifCtes(Problem p, Domain d)", "parent": 362, "children": [365, 366], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 35}}, {"id": 365, "type": "identifier", "text": "verifCtes", "parent": 364, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 14}}, {"id": 366, "type": "parameter_list", "text": "(Problem p, Domain d)", "parent": 364, "children": [367, 370], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 35}}, {"id": 367, "type": "parameter_declaration", "text": "Problem p", "parent": 366, "children": [368, 369], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 24}}, {"id": 368, "type": "type_identifier", "text": "Problem", "parent": 367, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 22}}, {"id": 369, "type": "identifier", "text": "p", "parent": 367, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 24}}, {"id": 370, "type": "parameter_declaration", "text": "Domain d", "parent": 366, "children": [371, 372], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 34}}, {"id": 371, "type": "type_identifier", "text": "Domain", "parent": 370, "children": [], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 32}}, {"id": 372, "type": "identifier", "text": "d", "parent": 370, "children": [], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 34}}, {"id": 373, "type": "for_statement", "text": "for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }", "parent": 362, "children": [374, 380, 386], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 72, "column": 5}}, {"id": 374, "type": "declaration", "text": "int i=0;", "parent": 373, "children": [375, 376], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 16}}, {"id": 375, "type": "primitive_type", "text": "int", "parent": 374, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 11}}, {"id": 376, "type": "init_declarator", "text": "i=0", "parent": 374, "children": [377, 378, 379], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 15}}, {"id": 377, "type": "identifier", "text": "i", "parent": 376, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 13}}, {"id": 378, "type": "=", "text": "=", "parent": 376, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 14}}, {"id": 379, "type": "number_literal", "text": "0", "parent": 376, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 15}}, {"id": 380, "type": "binary_expression", "text": "i<p.m", "parent": 373, "children": [381, 382, 383], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 22}}, {"id": 381, "type": "identifier", "text": "i", "parent": 380, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 18}}, {"id": 382, "type": "<", "text": "<", "parent": 380, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 19}}, {"id": 383, "type": "field_expression", "text": "p.m", "parent": 380, "children": [384, 385], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 22}}, {"id": 384, "type": "identifier", "text": "p", "parent": 383, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 20}}, {"id": 385, "type": "field_identifier", "text": "m", "parent": 383, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 22}}, {"id": 386, "type": "update_expression", "text": "i++", "parent": 373, "children": [387, 388], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 27}}, {"id": 387, "type": "identifier", "text": "i", "parent": 386, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 25}}, {"id": 388, "type": "++", "text": "++", "parent": 386, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 27}}, {"id": 389, "type": "if_statement", "text": "if(!validationContrainte(p.c[i],d)) {\n return false;\n }", "parent": 373, "children": [390], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 71, "column": 9}}, {"id": 390, "type": "parenthesized_expression", "text": "(!validationContrainte(p.c[i],d))", "parent": 389, "children": [391], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 43}}, {"id": 391, "type": "unary_expression", "text": "!validationContrainte(p.c[i],d)", "parent": 390, "children": [392, 393], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 42}}, {"id": 392, "type": "!", "text": "!", "parent": 391, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 12}}, {"id": 393, "type": "call_expression", "text": "validationContrainte(p.c[i],d)", "parent": 391, "children": [394, 395], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 42}}, {"id": 394, "type": "identifier", "text": "validationContrainte", "parent": 393, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 32}}, {"id": 395, "type": "argument_list", "text": "(p.c[i],d)", "parent": 393, "children": [396, 401], "start_point": {"row": 69, "column": 32}, "end_point": {"row": 69, "column": 42}}, {"id": 396, "type": "subscript_expression", "text": "p.c[i]", "parent": 395, "children": [397, 400], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 39}}, {"id": 397, "type": "field_expression", "text": "p.c", "parent": 396, "children": [398, 399], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 36}}, {"id": 398, "type": "identifier", "text": "p", "parent": 397, "children": [], "start_point": {"row": 69, "column": 33}, "end_point": {"row": 69, "column": 34}}, {"id": 399, "type": "field_identifier", "text": "c", "parent": 397, "children": [], "start_point": {"row": 69, "column": 35}, "end_point": {"row": 69, "column": 36}}, {"id": 400, "type": "identifier", "text": "i", "parent": 396, "children": [], "start_point": {"row": 69, "column": 37}, "end_point": {"row": 69, "column": 38}}, {"id": 401, "type": "identifier", "text": "d", "parent": 395, "children": [], "start_point": {"row": 69, "column": 40}, "end_point": {"row": 69, "column": 41}}, {"id": 402, "type": "return_statement", "text": "return false;", "parent": 389, "children": [403], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 25}}, {"id": 403, "type": "false", "text": "false", "parent": 402, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 24}}, {"id": 404, "type": "return_statement", "text": "return true;", "parent": 362, "children": [405], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 16}}, {"id": 405, "type": "true", "text": "true", "parent": 404, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 15}}]}, "node_categories": {"declarations": {"functions": [9, 11, 194, 198, 224, 226, 253, 255, 282, 284, 362, 364], "variables": [14, 19, 72, 79, 95, 116, 201, 204, 229, 258, 287, 290, 294, 325, 367, 370, 374], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [23, 27, 32, 38, 42, 45, 46, 47, 48, 49, 50, 55, 56, 60, 61, 65, 68, 69, 85, 88, 91, 101, 104, 107, 111, 112, 121, 124, 130, 133, 139, 142, 144, 147, 153, 154, 155, 161, 165, 166, 167, 173, 177, 178, 179, 185, 189, 211, 214, 215, 217, 234, 237, 240, 243, 246, 249, 261, 266, 269, 272, 275, 277, 278, 300, 303, 306, 310, 311, 312, 315, 316, 331, 334, 337, 341, 342, 344, 347, 348, 353, 380, 383, 386, 390, 391, 393, 396, 397], "assignments": [22, 31, 37, 152, 164, 176, 188], "loops": [78, 94, 293, 324, 373], "conditionals": [12, 15, 18, 21, 24, 25, 28, 30, 33, 34, 36, 39, 40, 43, 51, 57, 58, 62, 63, 70, 71, 75, 82, 86, 89, 90, 92, 98, 102, 105, 106, 108, 110, 113, 115, 117, 118, 119, 120, 122, 125, 128, 129, 131, 134, 135, 136, 137, 138, 140, 143, 146, 149, 150, 151, 156, 157, 158, 160, 162, 168, 169, 170, 172, 174, 180, 181, 182, 184, 186, 190, 191, 193, 195, 199, 203, 205, 209, 212, 216, 218, 220, 221, 223, 227, 230, 233, 235, 238, 239, 241, 244, 245, 247, 250, 251, 256, 259, 260, 262, 267, 268, 270, 271, 273, 279, 280, 285, 288, 289, 291, 292, 297, 301, 304, 305, 307, 309, 313, 317, 318, 319, 328, 332, 335, 336, 338, 340, 345, 349, 350, 351, 352, 354, 365, 368, 369, 371, 372, 377, 381, 384, 385, 387, 389, 394, 398, 399, 400, 401], "returns": [222, 252, 281, 322, 358, 360, 402, 404], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 53, 66, 77, 84, 100, 126, 127, 264, 299, 321, 330, 356, 379], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "initQueenProblem", "text_snippet": "void initQueenProblem(Problem* p,int newn ) {\n p->d=newDomain(newn);\n p->n = newn;\n p->c=ma"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "initQueenProblem(Problem* p,int newn )"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "Problem* newProblem(int newn) {\n Problem* p=malloc(sizeof(Problem));\n initQueenProblem(p, newn"}, {"node_id": 198, "universal_type": "function", "name": "unknown", "text_snippet": "newProblem(int newn)"}, {"node_id": 224, "universal_type": "function", "name": "destroyProblemContent", "text_snippet": "void destroyProblemContent(Problem * p) {\n destroyDomain(p->d);\n free(p->d);\n free(p->c);\n "}, {"node_id": 226, "universal_type": "function", "name": "unknown", "text_snippet": "destroyProblemContent(Problem * p)"}, {"node_id": 253, "universal_type": "function", "name": "afficherProblem", "text_snippet": "void afficherProblem(Problem p) {\n printf(\"afficherProblem: n = %d m = %d\\n\",p.n,p.m);\n aff"}, {"node_id": 255, "universal_type": "function", "name": "unknown", "text_snippet": "afficherProblem(Problem p)"}, {"node_id": 282, "universal_type": "function", "name": "isSolution", "text_snippet": "bool isSolution(Domain d, Problem p) {\n for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i]"}, {"node_id": 284, "universal_type": "function", "name": "unknown", "text_snippet": "isSolution(Domain d, Problem p)"}, {"node_id": 362, "universal_type": "function", "name": "verifCtes", "text_snippet": "bool verifCtes(Problem p, Domain d) {\n for(int i=0; i<p.m; i++) {\n if(!validationContraint"}, {"node_id": 364, "universal_type": "function", "name": "unknown", "text_snippet": "verifCtes(Problem p, Domain d)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"Problem.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"}]}, "original_source_code": "#include \"Problem.h\"\n#include <stdio.h>\n#include <stdlib.h>\n\n\nvoid initQueenProblem(Problem* p,int newn ) {\n p->d=newDomain(newn);\n p->n = newn;\n p->c=malloc(sizeof(Constraint)*3*(p->n)*(p->n)-3*(p->n));\n int compte = 0;\n for(int i = 0; i<p->n; i++) {\n for(int j=0; j<p->n; j++) {\n if(i!=j) {\n Constraint cl, cdm, cdd;\n initConstraint(&cl,0,0,i,j);\n initConstraint(&cdm,i,j,i,j);\n initConstraint(&cdd,-i,-j,i,j);\n //afficherConstraint(cl);\n (p->c)[compte]=cl;\n compte++;\n (p->c)[compte]=cdm;\n compte++;\n (p->c)[compte]=cdd;\n compte++;\n // effacerConstraint(cl);\n }\n }\n }\n p->m += compte;\n}\n\nProblem* newProblem(int newn) {\n Problem* p=malloc(sizeof(Problem));\n initQueenProblem(p, newn);\n return p;\n}\n\nvoid destroyProblemContent(Problem * p) {\n destroyDomain(p->d);\n free(p->d);\n free(p->c);\n return;\n}\n\nvoid afficherProblem(Problem p) {\n printf(\"afficherProblem: n = %d m = %d\\n\",p.n,p.m);\n afficherDomain(*(p.d));\n //afficherConstraint();\n return;\n}\n\nbool isSolution(Domain d, Problem p) {\n for(int i=0; i<d.n; i++) {\n if(Length(d.LDomain[i])>1) {\n //printf(\"taille pas bonne\\n\");\n return false;\n }\n }\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n printf(\"Contrainte pas bonne\\n\");\n return false;\n }\n }\n return true;\n}\n\nbool verifCtes(Problem p, Domain d) {\n for(int i=0; i<p.m; i++) {\n if(!validationContrainte(p.c[i],d)) {\n return false;\n }\n }\n return true;\n}\n"}
267
c
/* * errorHandling.c * * Created on: 22 dic 2018 * Author: ugo */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include "errorHandling.h" void report_error(const char *msg, const char *file, int line_no, int use_perror) { fprintf(stderr,"[%s:%d] ",file,line_no); if(use_perror != 0) { perror(msg); } else { fprintf(stderr, "%s\n",msg); } } void report_error_q(const char *msg, const char *file, int line_no, int use_perror) { report_error(msg, file, line_no, use_perror); exit(EXIT_FAILURE); }
18.07
28
(translation_unit) "/*\n * errorHandling.c\n *\n * Created on: 22 dic 2018\n * Author: ugo\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <pthread.h>\n#include "errorHandling.h"\n\n\nvoid report_error(const char *msg, const char *file, int line_no, int use_perror)\n{\n fprintf(stderr,"[%s:%d] ",file,line_no);\n\n if(use_perror != 0)\n {\n perror(msg);\n }\n else\n {\n fprintf(stderr, "%s\n",msg);\n }\n}\n\nvoid report_error_q(const char *msg, const char *file, int line_no, int use_perror)\n{\n report_error(msg, file, line_no, use_perror);\n exit(EXIT_FAILURE);\n}\n" (comment) "/*\n * errorHandling.c\n *\n * Created on: 22 dic 2018\n * Author: ugo\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <pthread.h>\n" (#include) "#include" (system_lib_string) "<pthread.h>" (preproc_include) "#include "errorHandling.h"\n" (#include) "#include" (string_literal) ""errorHandling.h"" (") """ (string_content) "errorHandling.h" (") """ (function_definition) "void report_error(const char *msg, const char *file, int line_no, int use_perror)\n{\n fprintf(stderr,"[%s:%d] ",file,line_no);\n\n if(use_perror != 0)\n {\n perror(msg);\n }\n else\n {\n fprintf(stderr, "%s\n",msg);\n }\n}" (primitive_type) "void" (function_declarator) "report_error(const char *msg, const char *file, int line_no, int use_perror)" (identifier) "report_error" (parameter_list) "(const char *msg, const char *file, int line_no, int use_perror)" (() "(" (parameter_declaration) "const char *msg" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" (,) "," (parameter_declaration) "const char *file" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*file" (*) "*" (identifier) "file" (,) "," (parameter_declaration) "int line_no" (primitive_type) "int" (identifier) "line_no" (,) "," (parameter_declaration) "int use_perror" (primitive_type) "int" (identifier) "use_perror" ()) ")" (compound_statement) "{\n fprintf(stderr,"[%s:%d] ",file,line_no);\n\n if(use_perror != 0)\n {\n perror(msg);\n }\n else\n {\n fprintf(stderr, "%s\n",msg);\n }\n}" ({) "{" (expression_statement) "fprintf(stderr,"[%s:%d] ",file,line_no);" (call_expression) "fprintf(stderr,"[%s:%d] ",file,line_no)" (identifier) "fprintf" (argument_list) "(stderr,"[%s:%d] ",file,line_no)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""[%s:%d] "" (") """ (string_content) "[%s:%d] " (") """ (,) "," (identifier) "file" (,) "," (identifier) "line_no" ()) ")" (;) ";" (if_statement) "if(use_perror != 0)\n {\n perror(msg);\n }\n else\n {\n fprintf(stderr, "%s\n",msg);\n }" (if) "if" (parenthesized_expression) "(use_perror != 0)" (() "(" (binary_expression) "use_perror != 0" (identifier) "use_perror" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n perror(msg);\n }" ({) "{" (expression_statement) "perror(msg);" (call_expression) "perror(msg)" (identifier) "perror" (argument_list) "(msg)" (() "(" (identifier) "msg" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n fprintf(stderr, "%s\n",msg);\n }" (else) "else" (compound_statement) "{\n fprintf(stderr, "%s\n",msg);\n }" ({) "{" (expression_statement) "fprintf(stderr, "%s\n",msg);" (call_expression) "fprintf(stderr, "%s\n",msg)" (identifier) "fprintf" (argument_list) "(stderr, "%s\n",msg)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""%s\n"" (") """ (string_content) "%s" (escape_sequence) "\n" (") """ (,) "," (identifier) "msg" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "void report_error_q(const char *msg, const char *file, int line_no, int use_perror)\n{\n report_error(msg, file, line_no, use_perror);\n exit(EXIT_FAILURE);\n}" (primitive_type) "void" (function_declarator) "report_error_q(const char *msg, const char *file, int line_no, int use_perror)" (identifier) "report_error_q" (parameter_list) "(const char *msg, const char *file, int line_no, int use_perror)" (() "(" (parameter_declaration) "const char *msg" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" (,) "," (parameter_declaration) "const char *file" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*file" (*) "*" (identifier) "file" (,) "," (parameter_declaration) "int line_no" (primitive_type) "int" (identifier) "line_no" (,) "," (parameter_declaration) "int use_perror" (primitive_type) "int" (identifier) "use_perror" ()) ")" (compound_statement) "{\n report_error(msg, file, line_no, use_perror);\n exit(EXIT_FAILURE);\n}" ({) "{" (expression_statement) "report_error(msg, file, line_no, use_perror);" (call_expression) "report_error(msg, file, line_no, use_perror)" (identifier) "report_error" (argument_list) "(msg, file, line_no, use_perror)" (() "(" (identifier) "msg" (,) "," (identifier) "file" (,) "," (identifier) "line_no" (,) "," (identifier) "use_perror" ()) ")" (;) ";" (expression_statement) "exit(EXIT_FAILURE);" (call_expression) "exit(EXIT_FAILURE)" (identifier) "exit" (argument_list) "(EXIT_FAILURE)" (() "(" (identifier) "EXIT_FAILURE" ()) ")" (;) ";" (}) "}"
163
0
{"language": "c", "success": true, "metadata": {"lines": 28, "avg_line_length": 18.07, "nodes": 90, "errors": 0, "source_hash": "359b56a8ab60d1d97ee5c96f7e42fb8cc17eed35a454d08ae378fce3cf3cf2d6", "categorized_nodes": 62}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <pthread.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<pthread.h>", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include \"errorHandling.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"errorHandling.h\"", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 26}}, {"id": 12, "type": "function_definition", "text": "void report_error(const char *msg, const char *file, int line_no, int use_perror)\n{\n\tfprintf(stderr,\"[%s:%d] \",file,line_no);\n\n\tif(use_perror != 0)\n\t{\n\t\tperror(msg);\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, \"%s\\n\",msg);\n\t}\n}", "parent": null, "children": [13, 14], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 13, "type": "primitive_type", "text": "void", "parent": 12, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 14, "type": "function_declarator", "text": "report_error(const char *msg, const char *file, int line_no, int use_perror)", "parent": 12, "children": [15, 16], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 81}}, {"id": 15, "type": "identifier", "text": "report_error", "parent": 14, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 17}}, {"id": 16, "type": "parameter_list", "text": "(const char *msg, const char *file, int line_no, int use_perror)", "parent": 14, "children": [17, 22, 27, 30], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 81}}, {"id": 17, "type": "parameter_declaration", "text": "const char *msg", "parent": 16, "children": [18, 19], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 33}}, {"id": 18, "type": "primitive_type", "text": "char", "parent": 17, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 28}}, {"id": 19, "type": "pointer_declarator", "text": "*msg", "parent": 17, "children": [20, 21], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 33}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 30}}, {"id": 21, "type": "identifier", "text": "msg", "parent": 19, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 33}}, {"id": 22, "type": "parameter_declaration", "text": "const char *file", "parent": 16, "children": [23, 24], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 51}}, {"id": 23, "type": "primitive_type", "text": "char", "parent": 22, "children": [], "start_point": {"row": 13, "column": 41}, "end_point": {"row": 13, "column": 45}}, {"id": 24, "type": "pointer_declarator", "text": "*file", "parent": 22, "children": [25, 26], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 51}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 47}}, {"id": 26, "type": "identifier", "text": "file", "parent": 24, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 51}}, {"id": 27, "type": "parameter_declaration", "text": "int line_no", "parent": 16, "children": [28, 29], "start_point": {"row": 13, "column": 53}, "end_point": {"row": 13, "column": 64}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 13, "column": 53}, "end_point": {"row": 13, "column": 56}}, {"id": 29, "type": "identifier", "text": "line_no", "parent": 27, "children": [], "start_point": {"row": 13, "column": 57}, "end_point": {"row": 13, "column": 64}}, {"id": 30, "type": "parameter_declaration", "text": "int use_perror", "parent": 16, "children": [31, 32], "start_point": {"row": 13, "column": 66}, "end_point": {"row": 13, "column": 80}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 13, "column": 66}, "end_point": {"row": 13, "column": 69}}, {"id": 32, "type": "identifier", "text": "use_perror", "parent": 30, "children": [], "start_point": {"row": 13, "column": 70}, "end_point": {"row": 13, "column": 80}}, {"id": 33, "type": "call_expression", "text": "fprintf(stderr,\"[%s:%d] \",file,line_no)", "parent": 12, "children": [34, 35], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 40}}, {"id": 34, "type": "identifier", "text": "fprintf", "parent": 33, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 8}}, {"id": 35, "type": "argument_list", "text": "(stderr,\"[%s:%d] \",file,line_no)", "parent": 33, "children": [36, 37, 38, 39], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 40}}, {"id": 36, "type": "identifier", "text": "stderr", "parent": 35, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 15}}, {"id": 37, "type": "string_literal", "text": "\"[%s:%d] \"", "parent": 35, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 26}}, {"id": 38, "type": "identifier", "text": "file", "parent": 35, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 31}}, {"id": 39, "type": "identifier", "text": "line_no", "parent": 35, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 39}}, {"id": 40, "type": "if_statement", "text": "if(use_perror != 0)\n\t{\n\t\tperror(msg);\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, \"%s\\n\",msg);\n\t}", "parent": 12, "children": [41, 50], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 24, "column": 2}}, {"id": 41, "type": "parenthesized_expression", "text": "(use_perror != 0)", "parent": 40, "children": [42], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 20}}, {"id": 42, "type": "binary_expression", "text": "use_perror != 0", "parent": 41, "children": [43, 44, 45], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 19}}, {"id": 43, "type": "identifier", "text": "use_perror", "parent": 42, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 14}}, {"id": 44, "type": "!=", "text": "!=", "parent": 42, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 17}}, {"id": 45, "type": "number_literal", "text": "0", "parent": 42, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 19}}, {"id": 46, "type": "call_expression", "text": "perror(msg)", "parent": 40, "children": [47, 48], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 13}}, {"id": 47, "type": "identifier", "text": "perror", "parent": 46, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 8}}, {"id": 48, "type": "argument_list", "text": "(msg)", "parent": 46, "children": [49], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 13}}, {"id": 49, "type": "identifier", "text": "msg", "parent": 48, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 12}}, {"id": 50, "type": "else_clause", "text": "else\n\t{\n\t\tfprintf(stderr, \"%s\\n\",msg);\n\t}", "parent": 40, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 24, "column": 2}}, {"id": 51, "type": "call_expression", "text": "fprintf(stderr, \"%s\\n\",msg)", "parent": 50, "children": [52, 53], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 29}}, {"id": 52, "type": "identifier", "text": "fprintf", "parent": 51, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 9}}, {"id": 53, "type": "argument_list", "text": "(stderr, \"%s\\n\",msg)", "parent": 51, "children": [54, 55, 57], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 29}}, {"id": 54, "type": "identifier", "text": "stderr", "parent": 53, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 16}}, {"id": 55, "type": "string_literal", "text": "\"%s\\n\"", "parent": 53, "children": [56], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 24}}, {"id": 56, "type": "escape_sequence", "text": "\\n", "parent": 55, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 23}}, {"id": 57, "type": "identifier", "text": "msg", "parent": 53, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 28}}, {"id": 58, "type": "function_definition", "text": "void report_error_q(const char *msg, const char *file, int line_no, int use_perror)\n{\n\treport_error(msg, file, line_no, use_perror);\n\texit(EXIT_FAILURE);\n}", "parent": null, "children": [59, 60], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 4}}, {"id": 60, "type": "function_declarator", "text": "report_error_q(const char *msg, const char *file, int line_no, int use_perror)", "parent": 58, "children": [61, 62], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 83}}, {"id": 61, "type": "identifier", "text": "report_error_q", "parent": 60, "children": [], "start_point": {"row": 27, "column": 5}, "end_point": {"row": 27, "column": 19}}, {"id": 62, "type": "parameter_list", "text": "(const char *msg, const char *file, int line_no, int use_perror)", "parent": 60, "children": [63, 68, 73, 76], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 83}}, {"id": 63, "type": "parameter_declaration", "text": "const char *msg", "parent": 62, "children": [64, 65], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 35}}, {"id": 64, "type": "primitive_type", "text": "char", "parent": 63, "children": [], "start_point": {"row": 27, "column": 26}, "end_point": {"row": 27, "column": 30}}, {"id": 65, "type": "pointer_declarator", "text": "*msg", "parent": 63, "children": [66, 67], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 35}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 32}}, {"id": 67, "type": "identifier", "text": "msg", "parent": 65, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 35}}, {"id": 68, "type": "parameter_declaration", "text": "const char *file", "parent": 62, "children": [69, 70], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 53}}, {"id": 69, "type": "primitive_type", "text": "char", "parent": 68, "children": [], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 47}}, {"id": 70, "type": "pointer_declarator", "text": "*file", "parent": 68, "children": [71, 72], "start_point": {"row": 27, "column": 48}, "end_point": {"row": 27, "column": 53}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 27, "column": 48}, "end_point": {"row": 27, "column": 49}}, {"id": 72, "type": "identifier", "text": "file", "parent": 70, "children": [], "start_point": {"row": 27, "column": 49}, "end_point": {"row": 27, "column": 53}}, {"id": 73, "type": "parameter_declaration", "text": "int line_no", "parent": 62, "children": [74, 75], "start_point": {"row": 27, "column": 55}, "end_point": {"row": 27, "column": 66}}, {"id": 74, "type": "primitive_type", "text": "int", "parent": 73, "children": [], "start_point": {"row": 27, "column": 55}, "end_point": {"row": 27, "column": 58}}, {"id": 75, "type": "identifier", "text": "line_no", "parent": 73, "children": [], "start_point": {"row": 27, "column": 59}, "end_point": {"row": 27, "column": 66}}, {"id": 76, "type": "parameter_declaration", "text": "int use_perror", "parent": 62, "children": [77, 78], "start_point": {"row": 27, "column": 68}, "end_point": {"row": 27, "column": 82}}, {"id": 77, "type": "primitive_type", "text": "int", "parent": 76, "children": [], "start_point": {"row": 27, "column": 68}, "end_point": {"row": 27, "column": 71}}, {"id": 78, "type": "identifier", "text": "use_perror", "parent": 76, "children": [], "start_point": {"row": 27, "column": 72}, "end_point": {"row": 27, "column": 82}}, {"id": 79, "type": "call_expression", "text": "report_error(msg, file, line_no, use_perror)", "parent": 58, "children": [80, 81], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 45}}, {"id": 80, "type": "identifier", "text": "report_error", "parent": 79, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 13}}, {"id": 81, "type": "argument_list", "text": "(msg, file, line_no, use_perror)", "parent": 79, "children": [82, 83, 84, 85], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 45}}, {"id": 82, "type": "identifier", "text": "msg", "parent": 81, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 17}}, {"id": 83, "type": "identifier", "text": "file", "parent": 81, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 23}}, {"id": 84, "type": "identifier", "text": "line_no", "parent": 81, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 32}}, {"id": 85, "type": "identifier", "text": "use_perror", "parent": 81, "children": [], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 44}}, {"id": 86, "type": "call_expression", "text": "exit(EXIT_FAILURE)", "parent": 58, "children": [87, 88], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 19}}, {"id": 87, "type": "identifier", "text": "exit", "parent": 86, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 5}}, {"id": 88, "type": "argument_list", "text": "(EXIT_FAILURE)", "parent": 86, "children": [89], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 19}}, {"id": 89, "type": "identifier", "text": "EXIT_FAILURE", "parent": 88, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 18}}]}, "node_categories": {"declarations": {"functions": [12, 14, 58, 60], "variables": [17, 22, 27, 30, 63, 68, 73, 76], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [33, 41, 42, 46, 51, 79, 86], "assignments": [], "loops": [], "conditionals": [15, 21, 26, 29, 32, 34, 36, 38, 39, 40, 43, 47, 49, 52, 54, 57, 61, 67, 72, 75, 78, 80, 82, 83, 84, 85, 87, 89], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 37, 45, 55], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "report_error", "text_snippet": "void report_error(const char *msg, const char *file, int line_no, int use_perror)\n{\n\tfprintf(stderr,"}, {"node_id": 14, "universal_type": "function", "name": "line_no,", "text_snippet": "report_error(const char *msg, const char *file, int line_no, int use_perror)"}, {"node_id": 58, "universal_type": "function", "name": "report_error_q", "text_snippet": "void report_error_q(const char *msg, const char *file, int line_no, int use_perror)\n{\n\treport_error("}, {"node_id": 60, "universal_type": "function", "name": "line_no,", "text_snippet": "report_error_q(const char *msg, const char *file, int line_no, int use_perror)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <pthread.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"errorHandling.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * errorHandling.c\n *\n * Created on: 22 dic 2018\n * Author: ugo\n */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <pthread.h>\n#include \"errorHandling.h\"\n\n\nvoid report_error(const char *msg, const char *file, int line_no, int use_perror)\n{\n\tfprintf(stderr,\"[%s:%d] \",file,line_no);\n\n\tif(use_perror != 0)\n\t{\n\t\tperror(msg);\n\t}\n\telse\n\t{\n\t\tfprintf(stderr, \"%s\\n\",msg);\n\t}\n}\n\nvoid report_error_q(const char *msg, const char *file, int line_no, int use_perror)\n{\n\treport_error(msg, file, line_no, use_perror);\n\texit(EXIT_FAILURE);\n}\n"}
268
c
#ifndef RANGE_SUM_OF_BST_H_ #define RANGE_SUM_OF_BST_H_ #include <stack> #include "tree-node.h" namespace solution { int rangeSumBST(TreeNode* root, int low, int high) { // direct // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST. // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST. // std::stack<TreeNode*> s; auto current = root; while (current != nullptr) { s.push(current); current = current->right; } if (s.top()->val < low) return 0; s = std::stack<TreeNode*>{}; current = root; while (current != nullptr) { s.push(current); current = current->left; } if (s.top()->val > high) return 0; auto result{0}; s = std::stack<TreeNode*>{}; s.push(root); while (!s.empty()) { current = s.top(); s.pop(); if (current->val >= low && current->val <= high) { result += current->val; } if (current->val > low && current->left != nullptr) s.push(current->left); if (current->val < high && current->right != nullptr) s.push(current->right); } return result; } } #endif // RANGE_SUM_OF_BST_H_
27.07
41
(translation_unit) "#ifndef RANGE_SUM_OF_BST_H_\n#define RANGE_SUM_OF_BST_H_\n\n#include <stack>\n\n#include "tree-node.h"\n\nnamespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}\n\n#endif // RANGE_SUM_OF_BST_H_\n" (preproc_ifdef) "#ifndef RANGE_SUM_OF_BST_H_\n#define RANGE_SUM_OF_BST_H_\n\n#include <stack>\n\n#include "tree-node.h"\n\nnamespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "RANGE_SUM_OF_BST_H_" (preproc_def) "#define RANGE_SUM_OF_BST_H_\n" (#define) "#define" (identifier) "RANGE_SUM_OF_BST_H_" (preproc_include) "#include <stack>\n" (#include) "#include" (system_lib_string) "<stack>" (preproc_include) "#include "tree-node.h"\n" (#include) "#include" (string_literal) ""tree-node.h"" (") """ (string_content) "tree-node.h" (") """ (function_definition) "namespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}" (type_identifier) "namespace" (identifier) "solution" (compound_statement) "{\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}" ({) "{" (function_definition) "int rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}" (primitive_type) "int" (function_declarator) "rangeSumBST(TreeNode* root, int low, int high)" (identifier) "rangeSumBST" (parameter_list) "(TreeNode* root, int low, int high)" (() "(" (parameter_declaration) "TreeNode* root" (type_identifier) "TreeNode" (pointer_declarator) "* root" (*) "*" (identifier) "root" (,) "," (parameter_declaration) "int low" (primitive_type) "int" (identifier) "low" (,) "," (parameter_declaration) "int high" (primitive_type) "int" (identifier) "high" ()) ")" (compound_statement) "{\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}" ({) "{" (comment) "// direct" (comment) "// Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST." (comment) "// Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST." (comment) "//" (labeled_statement) "std::stack<TreeNode*> s;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "stack<TreeNode*> s;" (binary_expression) "stack<TreeNode*> s" (binary_expression) "stack<TreeNode" (identifier) "stack" (<) "<" (identifier) "TreeNode" (ERROR) "*" (*) "*" (>) ">" (identifier) "s" (;) ";" (declaration) "auto current = root;" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "current" (ERROR) "=" (=) "=" (identifier) "root" (;) ";" (while_statement) "while (current != nullptr) {\n s.push(current);\n current = current->right;\n }" (while) "while" (parenthesized_expression) "(current != nullptr)" (() "(" (binary_expression) "current != nullptr" (identifier) "current" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" ()) ")" (compound_statement) "{\n s.push(current);\n current = current->right;\n }" ({) "{" (expression_statement) "s.push(current);" (call_expression) "s.push(current)" (field_expression) "s.push" (identifier) "s" (.) "." (field_identifier) "push" (argument_list) "(current)" (() "(" (identifier) "current" ()) ")" (;) ";" (expression_statement) "current = current->right;" (assignment_expression) "current = current->right" (identifier) "current" (=) "=" (field_expression) "current->right" (identifier) "current" (->) "->" (field_identifier) "right" (;) ";" (}) "}" (if_statement) "if (s.top()->val < low) return 0;" (if) "if" (parenthesized_expression) "(s.top()->val < low)" (() "(" (binary_expression) "s.top()->val < low" (field_expression) "s.top()->val" (call_expression) "s.top()" (field_expression) "s.top" (identifier) "s" (.) "." (field_identifier) "top" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "val" (<) "<" (identifier) "low" ()) ")" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (expression_statement) "s = std::stack<TreeNode*>{};\n current = root;" (binary_expression) "s = std::stack<TreeNode*>{};\n current = root" (assignment_expression) "s = std" (identifier) "s" (=) "=" (identifier) "std" (ERROR) "::stack" (:) ":" (:) ":" (identifier) "stack" (<) "<" (binary_expression) "TreeNode*>{};\n current = root" (identifier) "TreeNode" (*) "*" (ERROR) ">{};" (>) ">" ({) "{" (}) "}" (;) ";" (assignment_expression) "current = root" (identifier) "current" (=) "=" (identifier) "root" (;) ";" (while_statement) "while (current != nullptr) {\n s.push(current);\n current = current->left;\n }" (while) "while" (parenthesized_expression) "(current != nullptr)" (() "(" (binary_expression) "current != nullptr" (identifier) "current" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" ()) ")" (compound_statement) "{\n s.push(current);\n current = current->left;\n }" ({) "{" (expression_statement) "s.push(current);" (call_expression) "s.push(current)" (field_expression) "s.push" (identifier) "s" (.) "." (field_identifier) "push" (argument_list) "(current)" (() "(" (identifier) "current" ()) ")" (;) ";" (expression_statement) "current = current->left;" (assignment_expression) "current = current->left" (identifier) "current" (=) "=" (field_expression) "current->left" (identifier) "current" (->) "->" (field_identifier) "left" (;) ";" (}) "}" (if_statement) "if (s.top()->val > high) return 0;" (if) "if" (parenthesized_expression) "(s.top()->val > high)" (() "(" (binary_expression) "s.top()->val > high" (field_expression) "s.top()->val" (call_expression) "s.top()" (field_expression) "s.top" (identifier) "s" (.) "." (field_identifier) "top" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "val" (>) ">" (identifier) "high" ()) ")" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (function_definition) "auto result{0}" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "result" (identifier) "" (compound_statement) "{0}" ({) "{" (ERROR) "0" (number_literal) "0" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "s = std::stack<TreeNode*>{};\n s.push(root);" (binary_expression) "s = std::stack<TreeNode*>{};\n s.push(root)" (assignment_expression) "s = std" (identifier) "s" (=) "=" (identifier) "std" (ERROR) "::stack" (:) ":" (:) ":" (identifier) "stack" (<) "<" (binary_expression) "TreeNode*>{};\n s.push(root)" (identifier) "TreeNode" (*) "*" (ERROR) ">{};" (>) ">" ({) "{" (}) "}" (;) ";" (call_expression) "s.push(root)" (field_expression) "s.push" (identifier) "s" (.) "." (field_identifier) "push" (argument_list) "(root)" (() "(" (identifier) "root" ()) ")" (;) ";" (while_statement) "while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }" (while) "while" (parenthesized_expression) "(!s.empty())" (() "(" (unary_expression) "!s.empty()" (!) "!" (call_expression) "s.empty()" (field_expression) "s.empty" (identifier) "s" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }" ({) "{" (expression_statement) "current = s.top();" (assignment_expression) "current = s.top()" (identifier) "current" (=) "=" (call_expression) "s.top()" (field_expression) "s.top" (identifier) "s" (.) "." (field_identifier) "top" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "s.pop();" (call_expression) "s.pop()" (field_expression) "s.pop" (identifier) "s" (.) "." (field_identifier) "pop" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (current->val >= low && current->val <= high) {\n result += current->val;\n }" (if) "if" (parenthesized_expression) "(current->val >= low && current->val <= high)" (() "(" (binary_expression) "current->val >= low && current->val <= high" (binary_expression) "current->val >= low" (field_expression) "current->val" (identifier) "current" (->) "->" (field_identifier) "val" (>=) ">=" (identifier) "low" (&&) "&&" (binary_expression) "current->val <= high" (field_expression) "current->val" (identifier) "current" (->) "->" (field_identifier) "val" (<=) "<=" (identifier) "high" ()) ")" (compound_statement) "{\n result += current->val;\n }" ({) "{" (expression_statement) "result += current->val;" (assignment_expression) "result += current->val" (identifier) "result" (+=) "+=" (field_expression) "current->val" (identifier) "current" (->) "->" (field_identifier) "val" (;) ";" (}) "}" (if_statement) "if (current->val > low && current->left != nullptr) s.push(current->left);" (if) "if" (parenthesized_expression) "(current->val > low && current->left != nullptr)" (() "(" (binary_expression) "current->val > low && current->left != nullptr" (binary_expression) "current->val > low" (field_expression) "current->val" (identifier) "current" (->) "->" (field_identifier) "val" (>) ">" (identifier) "low" (&&) "&&" (binary_expression) "current->left != nullptr" (field_expression) "current->left" (identifier) "current" (->) "->" (field_identifier) "left" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" ()) ")" (expression_statement) "s.push(current->left);" (call_expression) "s.push(current->left)" (field_expression) "s.push" (identifier) "s" (.) "." (field_identifier) "push" (argument_list) "(current->left)" (() "(" (field_expression) "current->left" (identifier) "current" (->) "->" (field_identifier) "left" ()) ")" (;) ";" (if_statement) "if (current->val < high && current->right != nullptr)\n s.push(current->right);" (if) "if" (parenthesized_expression) "(current->val < high && current->right != nullptr)" (() "(" (binary_expression) "current->val < high && current->right != nullptr" (binary_expression) "current->val < high" (field_expression) "current->val" (identifier) "current" (->) "->" (field_identifier) "val" (<) "<" (identifier) "high" (&&) "&&" (binary_expression) "current->right != nullptr" (field_expression) "current->right" (identifier) "current" (->) "->" (field_identifier) "right" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" ()) ")" (expression_statement) "s.push(current->right);" (call_expression) "s.push(current->right)" (field_expression) "s.push" (identifier) "s" (.) "." (field_identifier) "push" (argument_list) "(current->right)" (() "(" (field_expression) "current->right" (identifier) "current" (->) "->" (field_identifier) "right" ()) ")" (;) ";" (}) "}" (return_statement) "return result;" (return) "return" (identifier) "result" (;) ";" (}) "}" (}) "}" (#endif) "#endif" (comment) "// RANGE_SUM_OF_BST_H_"
402
8
{"language": "c", "success": true, "metadata": {"lines": 41, "avg_line_length": 27.07, "nodes": 255, "errors": 0, "source_hash": "7d730f34a6559eafbce75c6e609edb135fe5b39e17f99586327e9dbe1ca4d087", "categorized_nodes": 188}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef RANGE_SUM_OF_BST_H_\n#define RANGE_SUM_OF_BST_H_\n\n#include <stack>\n\n#include \"tree-node.h\"\n\nnamespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 254], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 52, "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": "RANGE_SUM_OF_BST_H_", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 27}}, {"id": 3, "type": "preproc_def", "text": "#define RANGE_SUM_OF_BST_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": "RANGE_SUM_OF_BST_H_", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include <stack>\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": "<stack>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 16}}, {"id": 9, "type": "preproc_include", "text": "#include \"tree-node.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": "string_literal", "text": "\"tree-node.h\"", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 22}}, {"id": 12, "type": "function_definition", "text": "namespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}", "parent": 0, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 14, "type": "identifier", "text": "solution", "parent": 12, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 18}}, {"id": 15, "type": "function_definition", "text": "int rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}", "parent": 12, "children": [16, 17], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 16, "type": "primitive_type", "text": "int", "parent": 15, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 3}}, {"id": 17, "type": "function_declarator", "text": "rangeSumBST(TreeNode* root, int low, int high)", "parent": 15, "children": [18, 19], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 50}}, {"id": 18, "type": "identifier", "text": "rangeSumBST", "parent": 17, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 15}}, {"id": 19, "type": "parameter_list", "text": "(TreeNode* root, int low, int high)", "parent": 17, "children": [20, 25, 28], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 50}}, {"id": 20, "type": "parameter_declaration", "text": "TreeNode* root", "parent": 19, "children": [21, 22], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 30}}, {"id": 21, "type": "type_identifier", "text": "TreeNode", "parent": 20, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 24}}, {"id": 22, "type": "pointer_declarator", "text": "* root", "parent": 20, "children": [23, 24], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 30}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 25}}, {"id": 24, "type": "identifier", "text": "root", "parent": 22, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 30}}, {"id": 25, "type": "parameter_declaration", "text": "int low", "parent": 19, "children": [26, 27], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 39}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 35}}, {"id": 27, "type": "identifier", "text": "low", "parent": 25, "children": [], "start_point": {"row": 9, "column": 36}, "end_point": {"row": 9, "column": 39}}, {"id": 28, "type": "parameter_declaration", "text": "int high", "parent": 19, "children": [29, 30], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 49}}, {"id": 29, "type": "primitive_type", "text": "int", "parent": 28, "children": [], "start_point": {"row": 9, "column": 41}, "end_point": {"row": 9, "column": 44}}, {"id": 30, "type": "identifier", "text": "high", "parent": 28, "children": [], "start_point": {"row": 9, "column": 45}, "end_point": {"row": 9, "column": 49}}, {"id": 31, "type": "labeled_statement", "text": "std::stack<TreeNode*> s;", "parent": 15, "children": [32], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 26}}, {"id": 32, "type": "statement_identifier", "text": "std", "parent": 31, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 5}}, {"id": 33, "type": "binary_expression", "text": "stack<TreeNode*> s", "parent": 31, "children": [34, 38, 40, 41], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 25}}, {"id": 34, "type": "binary_expression", "text": "stack<TreeNode", "parent": 33, "children": [35, 36, 37], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 21}}, {"id": 35, "type": "identifier", "text": "stack", "parent": 34, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 12}}, {"id": 36, "type": "<", "text": "<", "parent": 34, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 37, "type": "identifier", "text": "TreeNode", "parent": 34, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 21}}, {"id": 38, "type": "ERROR", "text": "*", "parent": 33, "children": [39], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 22}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 22}}, {"id": 40, "type": ">", "text": ">", "parent": 33, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 23}}, {"id": 41, "type": "identifier", "text": "s", "parent": 33, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 42, "type": "declaration", "text": "auto current = root;", "parent": 15, "children": [43, 45, 46, 48], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 22}}, {"id": 43, "type": "storage_class_specifier", "text": "auto", "parent": 42, "children": [44], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 6}}, {"id": 44, "type": "auto", "text": "auto", "parent": 43, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 6}}, {"id": 45, "type": "type_identifier", "text": "current", "parent": 42, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 14}}, {"id": 46, "type": "ERROR", "text": "=", "parent": 42, "children": [47], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 47, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 48, "type": "identifier", "text": "root", "parent": 42, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 21}}, {"id": 49, "type": "while_statement", "text": "while (current != nullptr) {\n s.push(current);\n current = current->right;\n }", "parent": 15, "children": [50], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 19, "column": 3}}, {"id": 50, "type": "parenthesized_expression", "text": "(current != nullptr)", "parent": 49, "children": [51], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 28}}, {"id": 51, "type": "binary_expression", "text": "current != nullptr", "parent": 50, "children": [52, 53, 54], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 27}}, {"id": 52, "type": "identifier", "text": "current", "parent": 51, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 16}}, {"id": 53, "type": "!=", "text": "!=", "parent": 51, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 19}}, {"id": 54, "type": "null", "text": "nullptr", "parent": 51, "children": [55], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 27}}, {"id": 55, "type": "nullptr", "text": "nullptr", "parent": 54, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 27}}, {"id": 56, "type": "call_expression", "text": "s.push(current)", "parent": 49, "children": [57, 60], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 19}}, {"id": 57, "type": "field_expression", "text": "s.push", "parent": 56, "children": [58, 59], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 10}}, {"id": 58, "type": "identifier", "text": "s", "parent": 57, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 5}}, {"id": 59, "type": "field_identifier", "text": "push", "parent": 57, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 10}}, {"id": 60, "type": "argument_list", "text": "(current)", "parent": 56, "children": [61], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 19}}, {"id": 61, "type": "identifier", "text": "current", "parent": 60, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 18}}, {"id": 62, "type": "assignment_expression", "text": "current = current->right", "parent": 49, "children": [63, 64, 65], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 28}}, {"id": 63, "type": "identifier", "text": "current", "parent": 62, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 11}}, {"id": 64, "type": "=", "text": "=", "parent": 62, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 13}}, {"id": 65, "type": "field_expression", "text": "current->right", "parent": 62, "children": [66, 67], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 28}}, {"id": 66, "type": "identifier", "text": "current", "parent": 65, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 21}}, {"id": 67, "type": "field_identifier", "text": "right", "parent": 65, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 28}}, {"id": 68, "type": "if_statement", "text": "if (s.top()->val < low) return 0;", "parent": 15, "children": [69, 80], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 35}}, {"id": 69, "type": "parenthesized_expression", "text": "(s.top()->val < low)", "parent": 68, "children": [70], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 25}}, {"id": 70, "type": "binary_expression", "text": "s.top()->val < low", "parent": 69, "children": [71, 78, 79], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 24}}, {"id": 71, "type": "field_expression", "text": "s.top()->val", "parent": 70, "children": [72, 77], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 18}}, {"id": 72, "type": "call_expression", "text": "s.top()", "parent": 71, "children": [73, 76], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 13}}, {"id": 73, "type": "field_expression", "text": "s.top", "parent": 72, "children": [74, 75], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 11}}, {"id": 74, "type": "identifier", "text": "s", "parent": 73, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 7}}, {"id": 75, "type": "field_identifier", "text": "top", "parent": 73, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 11}}, {"id": 76, "type": "argument_list", "text": "()", "parent": 72, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 13}}, {"id": 77, "type": "field_identifier", "text": "val", "parent": 71, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 18}}, {"id": 78, "type": "<", "text": "<", "parent": 70, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 20}}, {"id": 79, "type": "identifier", "text": "low", "parent": 70, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 24}}, {"id": 80, "type": "return_statement", "text": "return 0;", "parent": 68, "children": [81], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 35}}, {"id": 81, "type": "number_literal", "text": "0", "parent": 80, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 34}}, {"id": 82, "type": "binary_expression", "text": "s = std::stack<TreeNode*>{};\n current = root", "parent": 15, "children": [83, 87, 89, 90], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 23, "column": 16}}, {"id": 83, "type": "assignment_expression", "text": "s = std", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 9}}, {"id": 84, "type": "identifier", "text": "s", "parent": 83, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 3}}, {"id": 85, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 5}}, {"id": 86, "type": "identifier", "text": "std", "parent": 83, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 9}}, {"id": 87, "type": "ERROR", "text": "::stack", "parent": 82, "children": [88], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 16}}, {"id": 88, "type": "identifier", "text": "stack", "parent": 87, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 16}}, {"id": 89, "type": "<", "text": "<", "parent": 82, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 17}}, {"id": 90, "type": "binary_expression", "text": "TreeNode*>{};\n current = root", "parent": 82, "children": [91, 92, 93, 95], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 23, "column": 16}}, {"id": 91, "type": "identifier", "text": "TreeNode", "parent": 90, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 25}}, {"id": 92, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 26}}, {"id": 93, "type": "ERROR", "text": ">{};", "parent": 90, "children": [94], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 30}}, {"id": 94, "type": ">", "text": ">", "parent": 93, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 27}}, {"id": 95, "type": "assignment_expression", "text": "current = root", "parent": 90, "children": [96, 97, 98], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 16}}, {"id": 96, "type": "identifier", "text": "current", "parent": 95, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 9}}, {"id": 97, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 98, "type": "identifier", "text": "root", "parent": 95, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 16}}, {"id": 99, "type": "while_statement", "text": "while (current != nullptr) {\n s.push(current);\n current = current->left;\n }", "parent": 15, "children": [100], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 28, "column": 3}}, {"id": 100, "type": "parenthesized_expression", "text": "(current != nullptr)", "parent": 99, "children": [101], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 28}}, {"id": 101, "type": "binary_expression", "text": "current != nullptr", "parent": 100, "children": [102, 103, 104], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 27}}, {"id": 102, "type": "identifier", "text": "current", "parent": 101, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 16}}, {"id": 103, "type": "!=", "text": "!=", "parent": 101, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 19}}, {"id": 104, "type": "null", "text": "nullptr", "parent": 101, "children": [105], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 27}}, {"id": 105, "type": "nullptr", "text": "nullptr", "parent": 104, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 27}}, {"id": 106, "type": "call_expression", "text": "s.push(current)", "parent": 99, "children": [107, 110], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 19}}, {"id": 107, "type": "field_expression", "text": "s.push", "parent": 106, "children": [108, 109], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 10}}, {"id": 108, "type": "identifier", "text": "s", "parent": 107, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 5}}, {"id": 109, "type": "field_identifier", "text": "push", "parent": 107, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 10}}, {"id": 110, "type": "argument_list", "text": "(current)", "parent": 106, "children": [111], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 19}}, {"id": 111, "type": "identifier", "text": "current", "parent": 110, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 18}}, {"id": 112, "type": "assignment_expression", "text": "current = current->left", "parent": 99, "children": [113, 114, 115], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 27}}, {"id": 113, "type": "identifier", "text": "current", "parent": 112, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 11}}, {"id": 114, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 13}}, {"id": 115, "type": "field_expression", "text": "current->left", "parent": 112, "children": [116, 117], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 27}}, {"id": 116, "type": "identifier", "text": "current", "parent": 115, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 21}}, {"id": 117, "type": "field_identifier", "text": "left", "parent": 115, "children": [], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 27}}, {"id": 118, "type": "if_statement", "text": "if (s.top()->val > high) return 0;", "parent": 15, "children": [119, 130], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 36}}, {"id": 119, "type": "parenthesized_expression", "text": "(s.top()->val > high)", "parent": 118, "children": [120], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 26}}, {"id": 120, "type": "binary_expression", "text": "s.top()->val > high", "parent": 119, "children": [121, 128, 129], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 25}}, {"id": 121, "type": "field_expression", "text": "s.top()->val", "parent": 120, "children": [122, 127], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 18}}, {"id": 122, "type": "call_expression", "text": "s.top()", "parent": 121, "children": [123, 126], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 13}}, {"id": 123, "type": "field_expression", "text": "s.top", "parent": 122, "children": [124, 125], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 11}}, {"id": 124, "type": "identifier", "text": "s", "parent": 123, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 7}}, {"id": 125, "type": "field_identifier", "text": "top", "parent": 123, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 11}}, {"id": 126, "type": "argument_list", "text": "()", "parent": 122, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 13}}, {"id": 127, "type": "field_identifier", "text": "val", "parent": 121, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 18}}, {"id": 128, "type": ">", "text": ">", "parent": 120, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 129, "type": "identifier", "text": "high", "parent": 120, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 25}}, {"id": 130, "type": "return_statement", "text": "return 0;", "parent": 118, "children": [131], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 36}}, {"id": 131, "type": "number_literal", "text": "0", "parent": 130, "children": [], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 35}}, {"id": 132, "type": "function_definition", "text": "auto result{0}", "parent": 15, "children": [133, 135, 136], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 16}}, {"id": 133, "type": "storage_class_specifier", "text": "auto", "parent": 132, "children": [134], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 134, "type": "auto", "text": "auto", "parent": 133, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 135, "type": "type_identifier", "text": "result", "parent": 132, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 13}}, {"id": 136, "type": "identifier", "text": "", "parent": 132, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 13}}, {"id": 137, "type": "ERROR", "text": "0", "parent": 132, "children": [138], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 138, "type": "number_literal", "text": "0", "parent": 137, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 139, "type": "binary_expression", "text": "s = std::stack<TreeNode*>{};\n s.push(root)", "parent": 15, "children": [140, 144, 146, 147], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 33, "column": 14}}, {"id": 140, "type": "assignment_expression", "text": "s = std", "parent": 139, "children": [141, 142, 143], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 9}}, {"id": 141, "type": "identifier", "text": "s", "parent": 140, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 3}}, {"id": 142, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 143, "type": "identifier", "text": "std", "parent": 140, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 9}}, {"id": 144, "type": "ERROR", "text": "::stack", "parent": 139, "children": [145], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 16}}, {"id": 145, "type": "identifier", "text": "stack", "parent": 144, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 16}}, {"id": 146, "type": "<", "text": "<", "parent": 139, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 17}}, {"id": 147, "type": "binary_expression", "text": "TreeNode*>{};\n s.push(root)", "parent": 139, "children": [148, 149, 150, 152], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 33, "column": 14}}, {"id": 148, "type": "identifier", "text": "TreeNode", "parent": 147, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 25}}, {"id": 149, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 26}}, {"id": 150, "type": "ERROR", "text": ">{};", "parent": 147, "children": [151], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 30}}, {"id": 151, "type": ">", "text": ">", "parent": 150, "children": [], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 27}}, {"id": 152, "type": "call_expression", "text": "s.push(root)", "parent": 147, "children": [153, 156], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 14}}, {"id": 153, "type": "field_expression", "text": "s.push", "parent": 152, "children": [154, 155], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 8}}, {"id": 154, "type": "identifier", "text": "s", "parent": 153, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 3}}, {"id": 155, "type": "field_identifier", "text": "push", "parent": 153, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 156, "type": "argument_list", "text": "(root)", "parent": 152, "children": [157], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 14}}, {"id": 157, "type": "identifier", "text": "root", "parent": 156, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 13}}, {"id": 158, "type": "while_statement", "text": "while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }", "parent": 15, "children": [159], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 46, "column": 3}}, {"id": 159, "type": "parenthesized_expression", "text": "(!s.empty())", "parent": 158, "children": [160], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 20}}, {"id": 160, "type": "unary_expression", "text": "!s.empty()", "parent": 159, "children": [161, 162], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 19}}, {"id": 161, "type": "!", "text": "!", "parent": 160, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 10}}, {"id": 162, "type": "call_expression", "text": "s.empty()", "parent": 160, "children": [163, 166], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 19}}, {"id": 163, "type": "field_expression", "text": "s.empty", "parent": 162, "children": [164, 165], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 17}}, {"id": 164, "type": "identifier", "text": "s", "parent": 163, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 11}}, {"id": 165, "type": "field_identifier", "text": "empty", "parent": 163, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 17}}, {"id": 166, "type": "argument_list", "text": "()", "parent": 162, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 19}}, {"id": 167, "type": "assignment_expression", "text": "current = s.top()", "parent": 158, "children": [168, 169, 170], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 21}}, {"id": 168, "type": "identifier", "text": "current", "parent": 167, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 11}}, {"id": 169, "type": "=", "text": "=", "parent": 167, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 13}}, {"id": 170, "type": "call_expression", "text": "s.top()", "parent": 167, "children": [171, 174], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 21}}, {"id": 171, "type": "field_expression", "text": "s.top", "parent": 170, "children": [172, 173], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 19}}, {"id": 172, "type": "identifier", "text": "s", "parent": 171, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 15}}, {"id": 173, "type": "field_identifier", "text": "top", "parent": 171, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 19}}, {"id": 174, "type": "argument_list", "text": "()", "parent": 170, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 21}}, {"id": 175, "type": "call_expression", "text": "s.pop()", "parent": 158, "children": [176, 179], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 11}}, {"id": 176, "type": "field_expression", "text": "s.pop", "parent": 175, "children": [177, 178], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 9}}, {"id": 177, "type": "identifier", "text": "s", "parent": 176, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 178, "type": "field_identifier", "text": "pop", "parent": 176, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 9}}, {"id": 179, "type": "argument_list", "text": "()", "parent": 175, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 11}}, {"id": 180, "type": "if_statement", "text": "if (current->val >= low && current->val <= high) {\n result += current->val;\n }", "parent": 158, "children": [181], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 41, "column": 5}}, {"id": 181, "type": "parenthesized_expression", "text": "(current->val >= low && current->val <= high)", "parent": 180, "children": [182], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 52}}, {"id": 182, "type": "binary_expression", "text": "current->val >= low && current->val <= high", "parent": 181, "children": [183, 189, 190], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 51}}, {"id": 183, "type": "binary_expression", "text": "current->val >= low", "parent": 182, "children": [184, 187, 188], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 27}}, {"id": 184, "type": "field_expression", "text": "current->val", "parent": 183, "children": [185, 186], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 20}}, {"id": 185, "type": "identifier", "text": "current", "parent": 184, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 15}}, {"id": 186, "type": "field_identifier", "text": "val", "parent": 184, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 20}}, {"id": 187, "type": ">=", "text": ">=", "parent": 183, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 23}}, {"id": 188, "type": "identifier", "text": "low", "parent": 183, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 27}}, {"id": 189, "type": "&&", "text": "&&", "parent": 182, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 30}}, {"id": 190, "type": "binary_expression", "text": "current->val <= high", "parent": 182, "children": [191, 194, 195], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 51}}, {"id": 191, "type": "field_expression", "text": "current->val", "parent": 190, "children": [192, 193], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 43}}, {"id": 192, "type": "identifier", "text": "current", "parent": 191, "children": [], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 38}}, {"id": 193, "type": "field_identifier", "text": "val", "parent": 191, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 43}}, {"id": 194, "type": "<=", "text": "<=", "parent": 190, "children": [], "start_point": {"row": 39, "column": 44}, "end_point": {"row": 39, "column": 46}}, {"id": 195, "type": "identifier", "text": "high", "parent": 190, "children": [], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 51}}, {"id": 196, "type": "assignment_expression", "text": "result += current->val", "parent": 180, "children": [197, 198, 199], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 28}}, {"id": 197, "type": "identifier", "text": "result", "parent": 196, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 12}}, {"id": 198, "type": "+=", "text": "+=", "parent": 196, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 15}}, {"id": 199, "type": "field_expression", "text": "current->val", "parent": 196, "children": [200, 201], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 28}}, {"id": 200, "type": "identifier", "text": "current", "parent": 199, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 23}}, {"id": 201, "type": "field_identifier", "text": "val", "parent": 199, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 28}}, {"id": 202, "type": "if_statement", "text": "if (current->val > low && current->left != nullptr) s.push(current->left);", "parent": 158, "children": [203], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 78}}, {"id": 203, "type": "parenthesized_expression", "text": "(current->val > low && current->left != nullptr)", "parent": 202, "children": [204], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 55}}, {"id": 204, "type": "binary_expression", "text": "current->val > low && current->left != nullptr", "parent": 203, "children": [205, 211, 212], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 54}}, {"id": 205, "type": "binary_expression", "text": "current->val > low", "parent": 204, "children": [206, 209, 210], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 26}}, {"id": 206, "type": "field_expression", "text": "current->val", "parent": 205, "children": [207, 208], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 20}}, {"id": 207, "type": "identifier", "text": "current", "parent": 206, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 15}}, {"id": 208, "type": "field_identifier", "text": "val", "parent": 206, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 20}}, {"id": 209, "type": ">", "text": ">", "parent": 205, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 22}}, {"id": 210, "type": "identifier", "text": "low", "parent": 205, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 26}}, {"id": 211, "type": "&&", "text": "&&", "parent": 204, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 29}}, {"id": 212, "type": "binary_expression", "text": "current->left != nullptr", "parent": 204, "children": [213, 216, 217], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 54}}, {"id": 213, "type": "field_expression", "text": "current->left", "parent": 212, "children": [214, 215], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 43}}, {"id": 214, "type": "identifier", "text": "current", "parent": 213, "children": [], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 37}}, {"id": 215, "type": "field_identifier", "text": "left", "parent": 213, "children": [], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 43}}, {"id": 216, "type": "!=", "text": "!=", "parent": 212, "children": [], "start_point": {"row": 43, "column": 44}, "end_point": {"row": 43, "column": 46}}, {"id": 217, "type": "null", "text": "nullptr", "parent": 212, "children": [218], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 54}}, {"id": 218, "type": "nullptr", "text": "nullptr", "parent": 217, "children": [], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 54}}, {"id": 219, "type": "call_expression", "text": "s.push(current->left)", "parent": 202, "children": [220, 223], "start_point": {"row": 43, "column": 56}, "end_point": {"row": 43, "column": 77}}, {"id": 220, "type": "field_expression", "text": "s.push", "parent": 219, "children": [221, 222], "start_point": {"row": 43, "column": 56}, "end_point": {"row": 43, "column": 62}}, {"id": 221, "type": "identifier", "text": "s", "parent": 220, "children": [], "start_point": {"row": 43, "column": 56}, "end_point": {"row": 43, "column": 57}}, {"id": 222, "type": "field_identifier", "text": "push", "parent": 220, "children": [], "start_point": {"row": 43, "column": 58}, "end_point": {"row": 43, "column": 62}}, {"id": 223, "type": "argument_list", "text": "(current->left)", "parent": 219, "children": [224], "start_point": {"row": 43, "column": 62}, "end_point": {"row": 43, "column": 77}}, {"id": 224, "type": "field_expression", "text": "current->left", "parent": 223, "children": [225, 226], "start_point": {"row": 43, "column": 63}, "end_point": {"row": 43, "column": 76}}, {"id": 225, "type": "identifier", "text": "current", "parent": 224, "children": [], "start_point": {"row": 43, "column": 63}, "end_point": {"row": 43, "column": 70}}, {"id": 226, "type": "field_identifier", "text": "left", "parent": 224, "children": [], "start_point": {"row": 43, "column": 72}, "end_point": {"row": 43, "column": 76}}, {"id": 227, "type": "if_statement", "text": "if (current->val < high && current->right != nullptr)\n s.push(current->right);", "parent": 158, "children": [228], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 45, "column": 29}}, {"id": 228, "type": "parenthesized_expression", "text": "(current->val < high && current->right != nullptr)", "parent": 227, "children": [229], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 57}}, {"id": 229, "type": "binary_expression", "text": "current->val < high && current->right != nullptr", "parent": 228, "children": [230, 236, 237], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 56}}, {"id": 230, "type": "binary_expression", "text": "current->val < high", "parent": 229, "children": [231, 234, 235], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 27}}, {"id": 231, "type": "field_expression", "text": "current->val", "parent": 230, "children": [232, 233], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 20}}, {"id": 232, "type": "identifier", "text": "current", "parent": 231, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 15}}, {"id": 233, "type": "field_identifier", "text": "val", "parent": 231, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 20}}, {"id": 234, "type": "<", "text": "<", "parent": 230, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 22}}, {"id": 235, "type": "identifier", "text": "high", "parent": 230, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 27}}, {"id": 236, "type": "&&", "text": "&&", "parent": 229, "children": [], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 30}}, {"id": 237, "type": "binary_expression", "text": "current->right != nullptr", "parent": 229, "children": [238, 241, 242], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 56}}, {"id": 238, "type": "field_expression", "text": "current->right", "parent": 237, "children": [239, 240], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 45}}, {"id": 239, "type": "identifier", "text": "current", "parent": 238, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 38}}, {"id": 240, "type": "field_identifier", "text": "right", "parent": 238, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 45}}, {"id": 241, "type": "!=", "text": "!=", "parent": 237, "children": [], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 48}}, {"id": 242, "type": "null", "text": "nullptr", "parent": 237, "children": [243], "start_point": {"row": 44, "column": 49}, "end_point": {"row": 44, "column": 56}}, {"id": 243, "type": "nullptr", "text": "nullptr", "parent": 242, "children": [], "start_point": {"row": 44, "column": 49}, "end_point": {"row": 44, "column": 56}}, {"id": 244, "type": "call_expression", "text": "s.push(current->right)", "parent": 227, "children": [245, 248], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 28}}, {"id": 245, "type": "field_expression", "text": "s.push", "parent": 244, "children": [246, 247], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 12}}, {"id": 246, "type": "identifier", "text": "s", "parent": 245, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 7}}, {"id": 247, "type": "field_identifier", "text": "push", "parent": 245, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 12}}, {"id": 248, "type": "argument_list", "text": "(current->right)", "parent": 244, "children": [249], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 28}}, {"id": 249, "type": "field_expression", "text": "current->right", "parent": 248, "children": [250, 251], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 27}}, {"id": 250, "type": "identifier", "text": "current", "parent": 249, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 20}}, {"id": 251, "type": "field_identifier", "text": "right", "parent": 249, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 27}}, {"id": 252, "type": "return_statement", "text": "return result;", "parent": 15, "children": [253], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 16}}, {"id": 253, "type": "identifier", "text": "result", "parent": 252, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 15}}, {"id": 254, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 15, 17, 132], "variables": [20, 25, 28, 42], "classes": [43, 133], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [33, 34, 50, 51, 56, 57, 65, 69, 70, 71, 72, 73, 82, 90, 100, 101, 106, 107, 115, 119, 120, 121, 122, 123, 139, 147, 152, 153, 159, 160, 162, 163, 170, 171, 175, 176, 181, 182, 183, 184, 190, 191, 199, 203, 204, 205, 206, 212, 213, 219, 220, 224, 228, 229, 230, 231, 237, 238, 244, 245, 249], "assignments": [62, 83, 95, 112, 140, 167, 196], "loops": [49, 99, 158], "conditionals": [0, 1, 2, 5, 13, 14, 18, 21, 24, 27, 30, 32, 35, 37, 41, 45, 48, 52, 58, 59, 61, 63, 66, 67, 68, 74, 75, 77, 79, 84, 86, 88, 91, 96, 98, 102, 108, 109, 111, 113, 116, 117, 118, 124, 125, 127, 129, 135, 136, 141, 143, 145, 148, 154, 155, 157, 164, 165, 168, 172, 173, 177, 178, 180, 185, 186, 188, 192, 193, 195, 197, 200, 201, 202, 207, 208, 210, 214, 215, 221, 222, 225, 226, 227, 232, 233, 235, 239, 240, 246, 247, 250, 251, 253, 254], "returns": [80, 130, 252], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 81, 131, 138], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "rangeSumBST", "text_snippet": "namespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime:"}, {"node_id": 15, "universal_type": "function", "name": "rangeSumBST", "text_snippet": "int rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 4"}, {"node_id": 17, "universal_type": "function", "name": "low,", "text_snippet": "rangeSumBST(TreeNode* root, int low, int high)"}, {"node_id": 132, "universal_type": "function", "name": "unknown", "text_snippet": "auto result{0}"}], "class_declarations": [{"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 133, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 6, "text": "#include <stack>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"tree-node.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef RANGE_SUM_OF_BST_H_\n#define RANGE_SUM_OF_BST_H_\n\n#include <stack>\n\n#include \"tree-node.h\"\n\nnamespace solution {\n\nint rangeSumBST(TreeNode* root, int low, int high) {\n // direct\n // Runtime: 128 ms, faster than 42.77% of C++ online submissions for Range Sum of BST.\n // Memory Usage: 64.8 MB, less than 15.65% of C++ online submissions for Range Sum of BST.\n //\n std::stack<TreeNode*> s;\n auto current = root;\n while (current != nullptr) {\n s.push(current);\n current = current->right;\n }\n if (s.top()->val < low) return 0;\n\n s = std::stack<TreeNode*>{};\n current = root;\n\n while (current != nullptr) {\n s.push(current);\n current = current->left;\n }\n if (s.top()->val > high) return 0;\n\n auto result{0};\n s = std::stack<TreeNode*>{};\n s.push(root);\n\n while (!s.empty()) {\n current = s.top();\n s.pop();\n\n if (current->val >= low && current->val <= high) {\n result += current->val;\n } \n\n if (current->val > low && current->left != nullptr) s.push(current->left);\n if (current->val < high && current->right != nullptr)\n s.push(current->right);\n }\n return result;\n}\n\n}\n\n#endif // RANGE_SUM_OF_BST_H_\n"}
269
c
/** ************************************************************************* \fn ADM_inttype.h \brief Defint plaform agnostic var type copyright : (C) 2008 by mean ***************************************************************************/ #pragma once #include "ADM_coreConfig.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* The maximum width/height is MAXIMUM_SIZE 768*768 for now */ #define MAXIMUM_SIZE 4096 typedef unsigned char ADM_filename; #if defined( HAVE_STDINT_H) || defined(_MSC_VER) // We do have stdint , heck it is embedded #define __STDC_CONSTANT_MACROS #define __STDC_LIMIT_MACROS #include <stdint.h> #define GOT_TYPES #endif #ifdef NEED_STDINT_GCC #include <stdint-gcc.h> #endif //NEED_STDINT_GCC #ifdef HAVE_INTTYPES_H #define __STDC_FORMAT_MACROS #include <inttypes.h> #define GOT_TYPES #ifndef SCNu8 #define SCNu8 "u" #endif #endif #ifndef GOT_TYPES #ifdef ADM_CPU_64BIT #define int32_t signed int #define int64_t signed long int #define uint64_t unsigned long int #else #define int32_t signed long int #define int64_t signed long long #define uint64_t unsigned long long #endif // ADM_CPU_64BIT #define uint8_t unsigned char #define int8_t signed char #define int16_t signed short int #define uint16_t unsigned short int #define uint32_t unsigned long int #endif // GOT_TYPES #define UNUSED_ARG(a) (void)a #define MKFCC(a,b,c,d) ((d<<24)+(c<<16)+(b<<8)+a) #define MKFCCR(a,b,c,d) ((a<<24)+(b<<16)+(c<<8)+d) // 0 means error, 1 means ok, 2 means ignore // 2 is seldom used #define ADM_ERR 0 #define ADM_OK 1 #define ADM_IGN 2
27.56
59
(translation_unit) "/** *************************************************************************\n \fn ADM_inttype.h\n \brief Defint plaform agnostic var type\n \n copyright : (C) 2008 by mean\n \n ***************************************************************************/\n\n#pragma once\n#include "ADM_coreConfig.h"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n/*\n The maximum width/height is MAXIMUM_SIZE 768*768 for now\n*/\n#define MAXIMUM_SIZE 4096\n\ntypedef unsigned char ADM_filename;\n\n#if defined( HAVE_STDINT_H) || defined(_MSC_VER) // We do have stdint , heck it is embedded\n #define __STDC_CONSTANT_MACROS\n #define __STDC_LIMIT_MACROS\n #include <stdint.h>\n #define GOT_TYPES\n#endif\n #ifdef NEED_STDINT_GCC\n #include <stdint-gcc.h>\n #endif //NEED_STDINT_GCC\n #ifdef HAVE_INTTYPES_H\n #define __STDC_FORMAT_MACROS\n #include <inttypes.h>\n #define GOT_TYPES\n #ifndef SCNu8\n #define SCNu8 "u"\n #endif\n#endif\n\n#ifndef GOT_TYPES\n#ifdef ADM_CPU_64BIT\n#define int32_t signed int\n#define int64_t signed long int \n#define uint64_t unsigned long int\n#else\n#define int32_t signed long int\n#define int64_t signed long long\n#define uint64_t unsigned long long\n#endif // ADM_CPU_64BIT\n\n#define uint8_t unsigned char\n#define int8_t signed char\n#define int16_t signed short int\n#define uint16_t unsigned short int\n#define uint32_t unsigned long int\n#endif // GOT_TYPES\n\n#define UNUSED_ARG(a) (void)a\n\n\n#define MKFCC(a,b,c,d) ((d<<24)+(c<<16)+(b<<8)+a)\n#define MKFCCR(a,b,c,d) ((a<<24)+(b<<16)+(c<<8)+d)\n\n// 0 means error, 1 means ok, 2 means ignore\n// 2 is seldom used\n\n#define ADM_ERR 0\n#define ADM_OK 1\n#define ADM_IGN 2\n\n" (comment) "/** *************************************************************************\n \fn ADM_inttype.h\n \brief Defint plaform agnostic var type\n \n copyright : (C) 2008 by mean\n \n ***************************************************************************/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "ADM_coreConfig.h"\n" (#include) "#include" (string_literal) ""ADM_coreConfig.h"" (") """ (string_content) "ADM_coreConfig.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 <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (comment) "/*\n The maximum width/height is MAXIMUM_SIZE 768*768 for now\n*/" (preproc_def) "#define MAXIMUM_SIZE 4096\n" (#define) "#define" (identifier) "MAXIMUM_SIZE" (preproc_arg) "4096" (type_definition) "typedef unsigned char ADM_filename;" (typedef) "typedef" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (type_identifier) "ADM_filename" (;) ";" (preproc_if) "#if defined( HAVE_STDINT_H) || defined(_MSC_VER) // We do have stdint , heck it is embedded\n #define __STDC_CONSTANT_MACROS\n #define __STDC_LIMIT_MACROS\n #include <stdint.h>\n #define GOT_TYPES\n#endif" (#if) "#if" (binary_expression) "defined( HAVE_STDINT_H) || defined(_MSC_VER)" (preproc_defined) "defined( HAVE_STDINT_H)" (defined) "defined" (() "(" (identifier) "HAVE_STDINT_H" ()) ")" (||) "||" (preproc_defined) "defined(_MSC_VER)" (defined) "defined" (() "(" (identifier) "_MSC_VER" ()) ")" (comment) "// We do have stdint , heck it is embedded" ( ) "\n" (preproc_def) "#define __STDC_CONSTANT_MACROS\n" (#define) "#define" (identifier) "__STDC_CONSTANT_MACROS" (preproc_def) "#define __STDC_LIMIT_MACROS\n" (#define) "#define" (identifier) "__STDC_LIMIT_MACROS" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_def) "#define GOT_TYPES\n" (#define) "#define" (identifier) "GOT_TYPES" (#endif) "#endif" (preproc_ifdef) "#ifdef NEED_STDINT_GCC\n #include <stdint-gcc.h>\n #endif" (#ifdef) "#ifdef" (identifier) "NEED_STDINT_GCC" (preproc_include) "#include <stdint-gcc.h>\n" (#include) "#include" (system_lib_string) "<stdint-gcc.h>" (#endif) "#endif" (comment) "//NEED_STDINT_GCC" (preproc_ifdef) "#ifdef HAVE_INTTYPES_H\n #define __STDC_FORMAT_MACROS\n #include <inttypes.h>\n #define GOT_TYPES\n #ifndef SCNu8\n #define SCNu8 "u"\n #endif\n#endif" (#ifdef) "#ifdef" (identifier) "HAVE_INTTYPES_H" (preproc_def) "#define __STDC_FORMAT_MACROS\n" (#define) "#define" (identifier) "__STDC_FORMAT_MACROS" (preproc_include) "#include <inttypes.h>\n" (#include) "#include" (system_lib_string) "<inttypes.h>" (preproc_def) "#define GOT_TYPES\n" (#define) "#define" (identifier) "GOT_TYPES" (preproc_ifdef) "#ifndef SCNu8\n #define SCNu8 "u"\n #endif" (#ifndef) "#ifndef" (identifier) "SCNu8" (preproc_def) "#define SCNu8 "u"\n" (#define) "#define" (identifier) "SCNu8" (preproc_arg) ""u"" (#endif) "#endif" (#endif) "#endif" (preproc_ifdef) "#ifndef GOT_TYPES\n#ifdef ADM_CPU_64BIT\n#define int32_t signed int\n#define int64_t signed long int \n#define uint64_t unsigned long int\n#else\n#define int32_t signed long int\n#define int64_t signed long long\n#define uint64_t unsigned long long\n#endif // ADM_CPU_64BIT\n\n#define uint8_t unsigned char\n#define int8_t signed char\n#define int16_t signed short int\n#define uint16_t unsigned short int\n#define uint32_t unsigned long int\n#endif" (#ifndef) "#ifndef" (identifier) "GOT_TYPES" (preproc_ifdef) "#ifdef ADM_CPU_64BIT\n#define int32_t signed int\n#define int64_t signed long int \n#define uint64_t unsigned long int\n#else\n#define int32_t signed long int\n#define int64_t signed long long\n#define uint64_t unsigned long long\n#endif" (#ifdef) "#ifdef" (identifier) "ADM_CPU_64BIT" (preproc_def) "#define int32_t signed int\n" (#define) "#define" (identifier) "int32_t" (preproc_arg) "signed int" (preproc_def) "#define int64_t signed long int \n" (#define) "#define" (identifier) "int64_t" (preproc_arg) "signed long int " (preproc_def) "#define uint64_t unsigned long int\n" (#define) "#define" (identifier) "uint64_t" (preproc_arg) "unsigned long int" (preproc_else) "#else\n#define int32_t signed long int\n#define int64_t signed long long\n#define uint64_t unsigned long long\n" (#else) "#else" (preproc_def) "#define int32_t signed long int\n" (#define) "#define" (identifier) "int32_t" (preproc_arg) "signed long int" (preproc_def) "#define int64_t signed long long\n" (#define) "#define" (identifier) "int64_t" (preproc_arg) "signed long long" (preproc_def) "#define uint64_t unsigned long long\n" (#define) "#define" (identifier) "uint64_t" (preproc_arg) "unsigned long long" (#endif) "#endif" (comment) "// ADM_CPU_64BIT" (preproc_def) "#define uint8_t unsigned char\n" (#define) "#define" (identifier) "uint8_t" (preproc_arg) "unsigned char" (preproc_def) "#define int8_t signed char\n" (#define) "#define" (identifier) "int8_t" (preproc_arg) "signed char" (preproc_def) "#define int16_t signed short int\n" (#define) "#define" (identifier) "int16_t" (preproc_arg) "signed short int" (preproc_def) "#define uint16_t unsigned short int\n" (#define) "#define" (identifier) "uint16_t" (preproc_arg) "unsigned short int" (preproc_def) "#define uint32_t unsigned long int\n" (#define) "#define" (identifier) "uint32_t" (preproc_arg) "unsigned long int" (#endif) "#endif" (comment) "// GOT_TYPES" (preproc_function_def) "#define UNUSED_ARG(a) (void)a\n" (#define) "#define" (identifier) "UNUSED_ARG" (preproc_params) "(a)" (() "(" (identifier) "a" ()) ")" (preproc_arg) "(void)a" (preproc_function_def) "#define MKFCC(a,b,c,d) ((d<<24)+(c<<16)+(b<<8)+a)\n" (#define) "#define" (identifier) "MKFCC" (preproc_params) "(a,b,c,d)" (() "(" (identifier) "a" (,) "," (identifier) "b" (,) "," (identifier) "c" (,) "," (identifier) "d" ()) ")" (preproc_arg) "((d<<24)+(c<<16)+(b<<8)+a)" (preproc_function_def) "#define MKFCCR(a,b,c,d) ((a<<24)+(b<<16)+(c<<8)+d)\n" (#define) "#define" (identifier) "MKFCCR" (preproc_params) "(a,b,c,d)" (() "(" (identifier) "a" (,) "," (identifier) "b" (,) "," (identifier) "c" (,) "," (identifier) "d" ()) ")" (preproc_arg) "((a<<24)+(b<<16)+(c<<8)+d)" (comment) "// 0 means error, 1 means ok, 2 means ignore" (comment) "// 2 is seldom used" (preproc_def) "#define ADM_ERR 0\n" (#define) "#define" (identifier) "ADM_ERR" (preproc_arg) "0" (preproc_def) "#define ADM_OK 1\n" (#define) "#define" (identifier) "ADM_OK" (preproc_arg) "1" (preproc_def) "#define ADM_IGN 2\n" (#define) "#define" (identifier) "ADM_IGN" (preproc_arg) "2"
196
0
{"language": "c", "success": true, "metadata": {"lines": 59, "avg_line_length": 27.56, "nodes": 167, "errors": 0, "source_hash": "766797e53aa5e233f600367724a4221c7becefaf384b6fb5f0fb8f1c90fccaa2", "categorized_nodes": 87}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"ADM_coreConfig.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": "\"ADM_coreConfig.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<string.h>", "parent": 12, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 15, "type": "preproc_def", "text": "#define MAXIMUM_SIZE 4096\n", "parent": null, "children": [16, 17, 18], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 17, "type": "identifier", "text": "MAXIMUM_SIZE", "parent": 15, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 20}}, {"id": 18, "type": "preproc_arg", "text": "4096", "parent": 15, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 25}}, {"id": 19, "type": "type_definition", "text": "typedef unsigned char ADM_filename;", "parent": null, "children": [20, 21, 24], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 35}}, {"id": 20, "type": "typedef", "text": "typedef", "parent": 19, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 21, "type": "sized_type_specifier", "text": "unsigned char", "parent": 19, "children": [22, 23], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 21}}, {"id": 22, "type": "unsigned", "text": "unsigned", "parent": 21, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 16}}, {"id": 23, "type": "primitive_type", "text": "char", "parent": 21, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 21}}, {"id": 24, "type": "type_identifier", "text": "ADM_filename", "parent": 19, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 34}}, {"id": 25, "type": "preproc_if", "text": "#if defined( HAVE_STDINT_H) || defined(_MSC_VER) // We do have stdint , heck it is embedded\n #define __STDC_CONSTANT_MACROS\n #define __STDC_LIMIT_MACROS\n #include <stdint.h>\n #define GOT_TYPES\n#endif", "parent": null, "children": [26, 27, 35, 36, 39, 42, 45, 48], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 26, "type": "#if", "text": "#if", "parent": 25, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 3}}, {"id": 27, "type": "binary_expression", "text": "defined( HAVE_STDINT_H) || defined(_MSC_VER)", "parent": 25, "children": [28, 31, 32], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 48}}, {"id": 28, "type": "preproc_defined", "text": "defined( HAVE_STDINT_H)", "parent": 27, "children": [29, 30], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 27}}, {"id": 29, "type": "defined", "text": "defined", "parent": 28, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 11}}, {"id": 30, "type": "identifier", "text": "HAVE_STDINT_H", "parent": 28, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 26}}, {"id": 31, "type": "||", "text": "||", "parent": 27, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 30}}, {"id": 32, "type": "preproc_defined", "text": "defined(_MSC_VER)", "parent": 27, "children": [33, 34], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 48}}, {"id": 33, "type": "defined", "text": "defined", "parent": 32, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 38}}, {"id": 34, "type": "identifier", "text": "_MSC_VER", "parent": 32, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 47}}, {"id": 35, "type": "\n", "text": "\n", "parent": 25, "children": [], "start_point": {"row": 22, "column": 92}, "end_point": {"row": 23, "column": 0}}, {"id": 36, "type": "preproc_def", "text": "#define __STDC_CONSTANT_MACROS\n", "parent": 25, "children": [37, 38], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 24, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 9}}, {"id": 38, "type": "identifier", "text": "__STDC_CONSTANT_MACROS", "parent": 36, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 32}}, {"id": 39, "type": "preproc_def", "text": "#define __STDC_LIMIT_MACROS\n", "parent": 25, "children": [40, 41], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 25, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 9}}, {"id": 41, "type": "identifier", "text": "__STDC_LIMIT_MACROS", "parent": 39, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 29}}, {"id": 42, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 25, "children": [43, 44], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 26, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 10}}, {"id": 44, "type": "system_lib_string", "text": "<stdint.h>", "parent": 42, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 21}}, {"id": 45, "type": "preproc_def", "text": "#define GOT_TYPES\n", "parent": 25, "children": [46, 47], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 27, "column": 0}}, {"id": 46, "type": "#define", "text": "#define", "parent": 45, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 9}}, {"id": 47, "type": "identifier", "text": "GOT_TYPES", "parent": 45, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 19}}, {"id": 48, "type": "#endif", "text": "#endif", "parent": 25, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 49, "type": "preproc_ifdef", "text": "#ifdef NEED_STDINT_GCC\n #include <stdint-gcc.h>\n #endif", "parent": null, "children": [50, 51, 52, 55], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 30, "column": 10}}, {"id": 50, "type": "#ifdef", "text": "#ifdef", "parent": 49, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 8}}, {"id": 51, "type": "identifier", "text": "NEED_STDINT_GCC", "parent": 49, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 24}}, {"id": 52, "type": "preproc_include", "text": "#include <stdint-gcc.h>\n", "parent": 49, "children": [53, 54], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 30, "column": 0}}, {"id": 53, "type": "#include", "text": "#include", "parent": 52, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 12}}, {"id": 54, "type": "system_lib_string", "text": "<stdint-gcc.h>", "parent": 52, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 27}}, {"id": 55, "type": "#endif", "text": "#endif", "parent": 49, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 10}}, {"id": 56, "type": "preproc_ifdef", "text": "#ifdef HAVE_INTTYPES_H\n\t#define __STDC_FORMAT_MACROS\n\t#include <inttypes.h>\n\t#define GOT_TYPES\n #ifndef SCNu8\n #define SCNu8 \"u\"\n #endif\n#endif", "parent": null, "children": [57, 58, 59, 62, 65, 68, 76], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 38, "column": 6}}, {"id": 57, "type": "#ifdef", "text": "#ifdef", "parent": 56, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 10}}, {"id": 58, "type": "identifier", "text": "HAVE_INTTYPES_H", "parent": 56, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 26}}, {"id": 59, "type": "preproc_def", "text": "#define __STDC_FORMAT_MACROS\n", "parent": 56, "children": [60, 61], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 33, "column": 0}}, {"id": 60, "type": "#define", "text": "#define", "parent": 59, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 8}}, {"id": 61, "type": "identifier", "text": "__STDC_FORMAT_MACROS", "parent": 59, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 29}}, {"id": 62, "type": "preproc_include", "text": "#include <inttypes.h>\n", "parent": 56, "children": [63, 64], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 34, "column": 0}}, {"id": 63, "type": "#include", "text": "#include", "parent": 62, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 64, "type": "system_lib_string", "text": "<inttypes.h>", "parent": 62, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 22}}, {"id": 65, "type": "preproc_def", "text": "#define GOT_TYPES\n", "parent": 56, "children": [66, 67], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 35, "column": 0}}, {"id": 66, "type": "#define", "text": "#define", "parent": 65, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 8}}, {"id": 67, "type": "identifier", "text": "GOT_TYPES", "parent": 65, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 18}}, {"id": 68, "type": "preproc_ifdef", "text": "#ifndef SCNu8\n #define SCNu8 \"u\"\n #endif", "parent": 56, "children": [69, 70, 71, 75], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 69, "type": "#ifndef", "text": "#ifndef", "parent": 68, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 11}}, {"id": 70, "type": "identifier", "text": "SCNu8", "parent": 68, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 17}}, {"id": 71, "type": "preproc_def", "text": "#define SCNu8 \"u\"\n", "parent": 68, "children": [72, 73, 74], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 37, "column": 0}}, {"id": 72, "type": "#define", "text": "#define", "parent": 71, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 11}}, {"id": 73, "type": "identifier", "text": "SCNu8", "parent": 71, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 17}}, {"id": 74, "type": "preproc_arg", "text": "\"u\"", "parent": 71, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 21}}, {"id": 75, "type": "#endif", "text": "#endif", "parent": 68, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 8}}, {"id": 76, "type": "#endif", "text": "#endif", "parent": 56, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 77, "type": "preproc_ifdef", "text": "#ifndef GOT_TYPES\n#ifdef ADM_CPU_64BIT\n#define int32_t \tsigned int\n#define int64_t \tsigned long int \n#define uint64_t \tunsigned long int\n#else\n#define int32_t \tsigned long int\n#define int64_t \tsigned long long\n#define uint64_t \tunsigned long long\n#endif\t// ADM_CPU_64BIT\n\n#define uint8_t \tunsigned char\n#define int8_t \tsigned char\n#define int16_t \tsigned short int\n#define uint16_t \tunsigned short int\n#define uint32_t \tunsigned long int\n#endif", "parent": null, "children": [78, 79, 80, 110, 114, 118, 122, 126, 130], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 78, "type": "#ifndef", "text": "#ifndef", "parent": 77, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 79, "type": "identifier", "text": "GOT_TYPES", "parent": 77, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 17}}, {"id": 80, "type": "preproc_ifdef", "text": "#ifdef ADM_CPU_64BIT\n#define int32_t \tsigned int\n#define int64_t \tsigned long int \n#define uint64_t \tunsigned long int\n#else\n#define int32_t \tsigned long int\n#define int64_t \tsigned long long\n#define uint64_t \tunsigned long long\n#endif", "parent": 77, "children": [81, 82, 83, 87, 91, 95, 109], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 81, "type": "#ifdef", "text": "#ifdef", "parent": 80, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 82, "type": "identifier", "text": "ADM_CPU_64BIT", "parent": 80, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 20}}, {"id": 83, "type": "preproc_def", "text": "#define int32_t \tsigned int\n", "parent": 80, "children": [84, 85, 86], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 84, "type": "#define", "text": "#define", "parent": 83, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 85, "type": "identifier", "text": "int32_t", "parent": 83, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 15}}, {"id": 86, "type": "preproc_arg", "text": "signed int", "parent": 83, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 27}}, {"id": 87, "type": "preproc_def", "text": "#define int64_t \tsigned long int \n", "parent": 80, "children": [88, 89, 90], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 88, "type": "#define", "text": "#define", "parent": 87, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 89, "type": "identifier", "text": "int64_t", "parent": 87, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 15}}, {"id": 90, "type": "preproc_arg", "text": "signed long int ", "parent": 87, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 33}}, {"id": 91, "type": "preproc_def", "text": "#define uint64_t \tunsigned long int\n", "parent": 80, "children": [92, 93, 94], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 92, "type": "#define", "text": "#define", "parent": 91, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 93, "type": "identifier", "text": "uint64_t", "parent": 91, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 16}}, {"id": 94, "type": "preproc_arg", "text": "unsigned long int", "parent": 91, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 36}}, {"id": 95, "type": "preproc_else", "text": "#else\n#define int32_t \tsigned long int\n#define int64_t \tsigned long long\n#define uint64_t \tunsigned long long\n", "parent": 80, "children": [96, 97, 101, 105], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 96, "type": "#else", "text": "#else", "parent": 95, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 5}}, {"id": 97, "type": "preproc_def", "text": "#define int32_t \tsigned long int\n", "parent": 95, "children": [98, 99, 100], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 98, "type": "#define", "text": "#define", "parent": 97, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 99, "type": "identifier", "text": "int32_t", "parent": 97, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 15}}, {"id": 100, "type": "preproc_arg", "text": "signed long int", "parent": 97, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 33}}, {"id": 101, "type": "preproc_def", "text": "#define int64_t \tsigned long long\n", "parent": 95, "children": [102, 103, 104], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 102, "type": "#define", "text": "#define", "parent": 101, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 103, "type": "identifier", "text": "int64_t", "parent": 101, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 15}}, {"id": 104, "type": "preproc_arg", "text": "signed long long", "parent": 101, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 34}}, {"id": 105, "type": "preproc_def", "text": "#define uint64_t \tunsigned long long\n", "parent": 95, "children": [106, 107, 108], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 106, "type": "#define", "text": "#define", "parent": 105, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 107, "type": "identifier", "text": "uint64_t", "parent": 105, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 16}}, {"id": 108, "type": "preproc_arg", "text": "unsigned long long", "parent": 105, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 37}}, {"id": 109, "type": "#endif", "text": "#endif", "parent": 80, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 110, "type": "preproc_def", "text": "#define uint8_t \tunsigned char\n", "parent": 77, "children": [111, 112, 113], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 111, "type": "#define", "text": "#define", "parent": 110, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 7}}, {"id": 112, "type": "identifier", "text": "uint8_t", "parent": 110, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 15}}, {"id": 113, "type": "preproc_arg", "text": "unsigned char", "parent": 110, "children": [], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 31}}, {"id": 114, "type": "preproc_def", "text": "#define int8_t \tsigned char\n", "parent": 77, "children": [115, 116, 117], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 115, "type": "#define", "text": "#define", "parent": 114, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 7}}, {"id": 116, "type": "identifier", "text": "int8_t", "parent": 114, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 14}}, {"id": 117, "type": "preproc_arg", "text": "signed char", "parent": 114, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 29}}, {"id": 118, "type": "preproc_def", "text": "#define int16_t \tsigned short int\n", "parent": 77, "children": [119, 120, 121], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 0}}, {"id": 119, "type": "#define", "text": "#define", "parent": 118, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 7}}, {"id": 120, "type": "identifier", "text": "int16_t", "parent": 118, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 15}}, {"id": 121, "type": "preproc_arg", "text": "signed short int", "parent": 118, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 33}}, {"id": 122, "type": "preproc_def", "text": "#define uint16_t \tunsigned short int\n", "parent": 77, "children": [123, 124, 125], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 55, "column": 0}}, {"id": 123, "type": "#define", "text": "#define", "parent": 122, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 7}}, {"id": 124, "type": "identifier", "text": "uint16_t", "parent": 122, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 16}}, {"id": 125, "type": "preproc_arg", "text": "unsigned short int", "parent": 122, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 36}}, {"id": 126, "type": "preproc_def", "text": "#define uint32_t \tunsigned long int\n", "parent": 77, "children": [127, 128, 129], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 127, "type": "#define", "text": "#define", "parent": 126, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 7}}, {"id": 128, "type": "identifier", "text": "uint32_t", "parent": 126, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 16}}, {"id": 129, "type": "preproc_arg", "text": "unsigned long int", "parent": 126, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 36}}, {"id": 130, "type": "#endif", "text": "#endif", "parent": 77, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 131, "type": "preproc_function_def", "text": "#define UNUSED_ARG(a) (void)a\n", "parent": null, "children": [132, 133, 134, 136], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 132, "type": "#define", "text": "#define", "parent": 131, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 133, "type": "identifier", "text": "UNUSED_ARG", "parent": 131, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 18}}, {"id": 134, "type": "preproc_params", "text": "(a)", "parent": 131, "children": [135], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 21}}, {"id": 135, "type": "identifier", "text": "a", "parent": 134, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 20}}, {"id": 136, "type": "preproc_arg", "text": "(void)a", "parent": 131, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 29}}, {"id": 137, "type": "preproc_function_def", "text": "#define MKFCC(a,b,c,d) ((d<<24)+(c<<16)+(b<<8)+a)\n", "parent": null, "children": [138, 139, 140, 145], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 62, "column": 0}}, {"id": 138, "type": "#define", "text": "#define", "parent": 137, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 139, "type": "identifier", "text": "MKFCC", "parent": 137, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 13}}, {"id": 140, "type": "preproc_params", "text": "(a,b,c,d)", "parent": 137, "children": [141, 142, 143, 144], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 22}}, {"id": 141, "type": "identifier", "text": "a", "parent": 140, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 15}}, {"id": 142, "type": "identifier", "text": "b", "parent": 140, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 17}}, {"id": 143, "type": "identifier", "text": "c", "parent": 140, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 19}}, {"id": 144, "type": "identifier", "text": "d", "parent": 140, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 21}}, {"id": 145, "type": "preproc_arg", "text": "((d<<24)+(c<<16)+(b<<8)+a)", "parent": 137, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 51}}, {"id": 146, "type": "preproc_function_def", "text": "#define MKFCCR(a,b,c,d) ((a<<24)+(b<<16)+(c<<8)+d)\n", "parent": null, "children": [147, 148, 149, 154], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 63, "column": 0}}, {"id": 147, "type": "#define", "text": "#define", "parent": 146, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 7}}, {"id": 148, "type": "identifier", "text": "MKFCCR", "parent": 146, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 14}}, {"id": 149, "type": "preproc_params", "text": "(a,b,c,d)", "parent": 146, "children": [150, 151, 152, 153], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 23}}, {"id": 150, "type": "identifier", "text": "a", "parent": 149, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 16}}, {"id": 151, "type": "identifier", "text": "b", "parent": 149, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 18}}, {"id": 152, "type": "identifier", "text": "c", "parent": 149, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 20}}, {"id": 153, "type": "identifier", "text": "d", "parent": 149, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 22}}, {"id": 154, "type": "preproc_arg", "text": "((a<<24)+(b<<16)+(c<<8)+d)", "parent": 146, "children": [], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 52}}, {"id": 155, "type": "preproc_def", "text": "#define ADM_ERR 0\n", "parent": null, "children": [156, 157, 158], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 68, "column": 0}}, {"id": 156, "type": "#define", "text": "#define", "parent": 155, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 7}}, {"id": 157, "type": "identifier", "text": "ADM_ERR", "parent": 155, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 15}}, {"id": 158, "type": "preproc_arg", "text": "0", "parent": 155, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 159, "type": "preproc_def", "text": "#define ADM_OK \t1\n", "parent": null, "children": [160, 161, 162], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 69, "column": 0}}, {"id": 160, "type": "#define", "text": "#define", "parent": 159, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 7}}, {"id": 161, "type": "identifier", "text": "ADM_OK", "parent": 159, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 14}}, {"id": 162, "type": "preproc_arg", "text": "1", "parent": 159, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 17}}, {"id": 163, "type": "preproc_def", "text": "#define ADM_IGN 2\n", "parent": null, "children": [164, 165, 166], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 0}}, {"id": 164, "type": "#define", "text": "#define", "parent": 163, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 7}}, {"id": 165, "type": "identifier", "text": "ADM_IGN", "parent": 163, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 15}}, {"id": 166, "type": "preproc_arg", "text": "2", "parent": 163, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 17}}]}, "node_categories": {"declarations": {"functions": [131, 137, 146], "variables": [19], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 42, 43, 52, 53, 62, 63], "modules": [], "enums": []}, "statements": {"expressions": [27], "assignments": [], "loops": [], "conditionals": [17, 21, 24, 25, 26, 30, 34, 38, 41, 47, 48, 49, 50, 51, 55, 56, 57, 58, 61, 67, 68, 69, 70, 73, 75, 76, 77, 78, 79, 80, 81, 82, 85, 89, 93, 99, 103, 107, 109, 112, 116, 120, 124, 128, 130, 133, 135, 139, 141, 142, 143, 144, 148, 150, 151, 152, 153, 157, 161, 165], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 44, 54, 64], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "#define UNUSED_ARG(a) (void)a\n"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "#define MKFCC(a,b,c,d) ((d<<24)+(c<<16)+(b<<8)+a)\n"}, {"node_id": 146, "universal_type": "function", "name": "unknown", "text_snippet": "#define MKFCCR(a,b,c,d) ((a<<24)+(b<<16)+(c<<8)+d)\n"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"ADM_coreConfig.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 <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <string.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 42, "text": "#include <stdint.h>\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 52, "text": "#include <stdint-gcc.h>\n"}, {"node_id": 53, "text": "#include"}, {"node_id": 62, "text": "#include <inttypes.h>\n"}, {"node_id": 63, "text": "#include"}]}, "original_source_code": "/** *************************************************************************\n \\fn ADM_inttype.h\n \\brief Defint plaform agnostic var type\n \n copyright : (C) 2008 by mean\n \n ***************************************************************************/\n\n#pragma once\n#include \"ADM_coreConfig.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n/*\n \tThe maximum width/height is MAXIMUM_SIZE 768*768 for now\n*/\n#define MAXIMUM_SIZE 4096\n\ntypedef unsigned char ADM_filename;\n\n#if defined( HAVE_STDINT_H) || defined(_MSC_VER) // We do have stdint , heck it is embedded\n #define __STDC_CONSTANT_MACROS\n #define __STDC_LIMIT_MACROS\n #include <stdint.h>\n #define GOT_TYPES\n#endif\n #ifdef NEED_STDINT_GCC\n #include <stdint-gcc.h>\n #endif //NEED_STDINT_GCC\n #ifdef HAVE_INTTYPES_H\n\t#define __STDC_FORMAT_MACROS\n\t#include <inttypes.h>\n\t#define GOT_TYPES\n #ifndef SCNu8\n #define SCNu8 \"u\"\n #endif\n#endif\n\n#ifndef GOT_TYPES\n#ifdef ADM_CPU_64BIT\n#define int32_t \tsigned int\n#define int64_t \tsigned long int \n#define uint64_t \tunsigned long int\n#else\n#define int32_t \tsigned long int\n#define int64_t \tsigned long long\n#define uint64_t \tunsigned long long\n#endif\t// ADM_CPU_64BIT\n\n#define uint8_t \tunsigned char\n#define int8_t \tsigned char\n#define int16_t \tsigned short int\n#define uint16_t \tunsigned short int\n#define uint32_t \tunsigned long int\n#endif\t// GOT_TYPES\n\n#define UNUSED_ARG(a) (void)a\n\n\n#define MKFCC(a,b,c,d) ((d<<24)+(c<<16)+(b<<8)+a)\n#define MKFCCR(a,b,c,d) ((a<<24)+(b<<16)+(c<<8)+d)\n\n// 0 means error, 1 means ok, 2 means ignore\n// 2 is seldom used\n\n#define ADM_ERR 0\n#define ADM_OK \t1\n#define ADM_IGN 2\n\n"}
270
c
/*$ Copyright (c) 2014-2017, Azel 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 <organization> 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 <COPYRIGHT HOLDER> 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. $*/ /******************************** * しおりデータ ********************************/ #ifndef BOOKMARKDAT_H #define BOOKMARKDAT_H #include "mListDef.h" #define BMITEM_G(p) ((BmItemGlobal *)(p)) #define BMITEM_L(p) ((BmItemLocal *)(p)) typedef struct { mListItem i; char *fname; int lineno; }BmItemGlobal; typedef struct { mListItem i; char *comment; //NULL でなし int lineno; }BmItemLocal; #ifdef __cplusplus extern "C" { #endif void BookmarkFree(); BmItemGlobal *BookmarkGlobal_add(); void BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi); void BookmarkGlobal_saveFile(); void BookmarkGlobal_loadFile(); BmItemLocal *BookmarkLocal_add(mStr *strcomment); void BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi); void BookmarkLocal_saveFile(const char *fname); void BookmarkLocal_loadFile(const char *fname); #ifdef __cplusplus } #endif #endif
38.15
60
(translation_unit) "/*$\nCopyright (c) 2014-2017, Azel\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, 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 <organization> 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\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n$*/\n\n/********************************\n * しおりデータ\n ********************************/\n\n#ifndef BOOKMARKDAT_H\n#define BOOKMARKDAT_H\n\n#include "mListDef.h"\n\n#define BMITEM_G(p) ((BmItemGlobal *)(p))\n#define BMITEM_L(p) ((BmItemLocal *)(p))\n\ntypedef struct\n{\n mListItem i;\n char *fname;\n int lineno;\n}BmItemGlobal;\n\ntypedef struct\n{\n mListItem i;\n char *comment; //NULL でなし\n int lineno;\n}BmItemLocal;\n\n#ifdef __cplusplus\nextern "C" {\n#endif\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n" (comment) "/*$\nCopyright (c) 2014-2017, Azel\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, 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 <organization> 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\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n$*/" (comment) "/********************************\n * しおりデータ\n ********************************/\n\n#ifndef BO" (preproc_ifdef) "MARKDAT_H\n#define BOOKMARKDAT_H\n\n#include "mListDef.h"\n\n#define BMITEM_G(p) ((BmItemGlobal *)(p))\n#define BMITEM_L(p) ((BmItemLocal *)(p))\n\ntypedef struct\n{\n mListItem i;\n char *fname;\n int lineno;\n}BmItemGlobal;\n\ntypedef struct\n{\n mListItem i;\n char *comment; //NULL でなし\n int lineno;\n}BmItemLocal;\n\n#ifdef __cplusplus\nextern "C" {\n#endif\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n" (#ifndef) "MARKDAT" (identifier) "H\n#define BOO" (preproc_def) "MARKDAT_H\n\n#include "m" (#define) "MARKDAT" (identifier) "H\n\n#include "" (preproc_include) "istDef.h"\n\n#define BMI" (#include) "istDef.h" (string_literal) "\n\n#define BM" (") "\n" (string_content) "\n#define B" (") "M" (preproc_function_def) "EM_G(p) ((BmItemGlobal *)(p))\n#define BMIT" (#define) "EM_G(p)" (identifier) " ((BmIte" (preproc_params) "mGl" (() "m" (identifier) "G" ()) "l" (preproc_arg) "al *)(p))\n#define BMI" (preproc_function_def) "EM_L(p) ((BmItemLocal *)(p))\n\ntypedef str" (#define) "EM_L(p)" (identifier) " ((BmIte" (preproc_params) "mLo" (() "m" (identifier) "L" ()) "o" (preproc_arg) "l *)(p))\n\ntypedef st" (type_definition) "ct\n{\n mListItem i;\n char *fname;\n int lineno;\n}BmItemGlobal;\n\ntypedef st" (typedef) "ct\n{\n m" (struct_specifier) "istItem i;\n char *fname;\n int lineno;\n}BmItemGlobal" (struct) "istIte" (field_declaration_list) " i;\n char *fname;\n int lineno;\n}BmItemGlobal" ({) " " (field_declaration) "\n char *fnam" (type_identifier) "\n char *f" (field_identifier) "a" (;) "m" (field_declaration) "\n int lineno" (primitive_type) "\n in" (pointer_declarator) " linen" (*) " " (field_identifier) "linen" (;) "o" (field_declaration) "}BmItemGlob" (primitive_type) "}Bm" (field_identifier) "temGlo" (;) "b" (}) "l" (type_identifier) ";\n\ntypedef s" (;) "t" (type_definition) "ct\n{\n mListItem i;\n char *comment; //NULL でなし\n int lineno;\n}BmItemLocal;\n\n#ifdef __cpluspl" (typedef) "ct\n{\n m" (struct_specifier) "istItem i;\n char *comment; //NULL でなし\n int lineno;\n}BmItemLocal;\n\n#ifd" (struct) "istIte" (field_declaration_list) " i;\n char *comment; //NULL でなし\n int lineno;\n}BmItemLocal;\n\n#ifd" ({) " " (field_declaration) "\n char *comm" (type_identifier) "\n char *c" (field_identifier) "m" (;) "m" (field_declaration) "t; //NULL でなし\n" (primitive_type) "t; /" (pointer_declarator) "NULL でなし" (*) "N" (field_identifier) "ULL でなし" (;) "\n" (comment) "int lineno;\n}BmI" (field_declaration) "mLocal;\n\n#i" (primitive_type) "mLo" (field_identifier) "al;\n\n#" (;) "i" (}) "d" (type_identifier) "ef __cplusp" (;) "l" (preproc_ifdef) "\nextern "C" {\n#endif\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n" (#ifdef) "\nexter" (identifier) " "C" {\n#end" (linkage_specification) "f\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n" (extern) "f\nvoid" (string_literal) "Boo" (") "B" (string_content) "o" (") "o" (declaration_list) "markFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n" ({) "m" (preproc_call) "rkFree(" (preproc_directive) "rkFree" (declaration) ");\n\nBmItemGlobal *Bo" (primitive_type) ");\n\n" (function_declarator) "mItemGlobal *B" (identifier) "mItemGlobal " (parameter_list) "*B" (() "*" ()) "B" (;) "o" (declaration) "markGlobal_add();\nvoid BookmarkGlob" (type_identifier) "markGlobal_a" (pointer_declarator) "d();\nvoid BookmarkGlo" (*) "d" (function_declarator) "();\nvoid BookmarkGlo" (identifier) "();\nvoid BookmarkG" (parameter_list) "lo" (() "l" ()) "o" (;) "b" (declaration) "l_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlob" (primitive_type) "l_ge" (function_declarator) "ListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlo" (identifier) "ListStr(mStr *str,BmItemG" (parameter_list) "lobal *pi);\nvoid BookmarkGlo" (() "l" (parameter_declaration) "obal *pi)" (type_identifier) "obal" (pointer_declarator) "*pi)" (*) "*" (identifier) "pi)" (,) ";" (parameter_declaration) "\nvoid BookmarkGl" (type_identifier) "\nvoid Bookma" (pointer_declarator) "kGl" (*) "k" (identifier) "Gl" ()) "o" (;) "b" (declaration) "l_saveFile();\nvoid BookmarkGlob" (primitive_type) "l_sa" (function_declarator) "eFile();\nvoid BookmarkGlo" (identifier) "eFile();\nvoid BookmarkG" (parameter_list) "lo" (() "l" ()) "o" (;) "b" (declaration) "l_loadFile();\n\nBmItemLocal *Boo" (primitive_type) "l_lo" (function_declarator) "dFile();\n\nBmItemLocal *Bo" (identifier) "dFile();\n\nBmItemLocal *" (parameter_list) "Bo" (() "B" ()) "o" (;) "o" (declaration) "arkLocal_add(mStr *strcomment);\nvoid BookmarkLoca" (type_identifier) "arkLocal_ad" (pointer_declarator) "(mStr *strcomment);\nvoid BookmarkLoc" (*) "(" (function_declarator) "mStr *strcomment);\nvoid BookmarkLoc" (identifier) "mStr *strcomment)" (parameter_list) ";\nvoid BookmarkLoc" (() ";" (parameter_declaration) "\nvoid BookmarkLo" (type_identifier) "\nvoi" (pointer_declarator) " BookmarkLo" (*) " " (identifier) "BookmarkLo" ()) "c" (;) "a" (declaration) "_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLoca" (primitive_type) "_get" (function_declarator) "istStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLoc" (identifier) "istStr(mStr *str,BmItemL" (parameter_list) "ocal *pi);\nvoid BookmarkLoc" (() "o" (parameter_declaration) "cal *pi);" (type_identifier) "cal " (pointer_declarator) "pi);" (*) "p" (identifier) "i);" (,) "\n" (parameter_declaration) "void BookmarkLo" (type_identifier) "void Bookma" (pointer_declarator) "kLo" (*) "k" (identifier) "Lo" ()) "c" (;) "a" (declaration) "_saveFile(const char *fname);\nvoid BookmarkLoca" (primitive_type) "_sav" (function_declarator) "File(const char *fname);\nvoid BookmarkLoc" (identifier) "File(const char *fname" (parameter_list) ");\nvoid BookmarkLoc" (() ")" (parameter_declaration) ";\nvoid BookmarkLo" (type_qualifier) ";\nvoi" (const) ";\nvoi" (primitive_type) " Boo" (pointer_declarator) "markLo" (*) "m" (identifier) "arkLo" ()) "c" (;) "a" (declaration) "_loadFile(const char *fname);\n#ifdef __cplusplu" (primitive_type) "_loa" (function_declarator) "File(const char *fname);\n#ifdef __cpluspl" (identifier) "File(const char *fname" (parameter_list) ");\n#ifdef __cpluspl" (() ")" (parameter_declaration) ";\n#ifdef __cplusp" (type_qualifier) ";\n#if" (const) ";\n#if" (primitive_type) "ef _" (pointer_declarator) "cplusp" (*) "c" (identifier) "plusp" ()) "l" (;) "u" (preproc_ifdef) "\n}\n#endif\n#endif\n" (#ifdef) "\n}\n#en" (identifier) "if\n#endif\n" (#endif) "" (}) "" (#endif) "" (#endif) ""
215
0
{"language": "c", "success": true, "metadata": {"lines": 60, "avg_line_length": 38.15, "nodes": 152, "errors": 0, "source_hash": "ffbdaabb8dfe33e21b865e0e7948f77b9506bc7082357deaeccf6aeb59b11026", "categorized_nodes": 97}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "MARKDAT_H\n#define BOOKMARKDAT_H\n\n#include \"mListDef.h\"\n\n#define BMITEM_G(p) ((BmItemGlobal *)(p))\n#define BMITEM_L(p) ((BmItemLocal *)(p))\n\ntypedef struct\n{\n\tmListItem i;\n\tchar *fname;\n\tint lineno;\n}BmItemGlobal;\n\ntypedef struct\n{\n\tmListItem i;\n\tchar *comment; //NULL \u3067\u306a\u3057\n\tint lineno;\n}BmItemLocal;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n", "parent": null, "children": [1, 2, 3, 6, 9, 15, 21, 37, 53, 151], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "MARKDAT", "parent": 0, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 2, "type": "identifier", "text": "H\n#define BOO", "parent": 0, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "MARKDAT_H\n\n#include \"m", "parent": 0, "children": [4, 5], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 4, "type": "#define", "text": "MARKDAT", "parent": 3, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 5, "type": "identifier", "text": "H\n\n#include \"", "parent": 3, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "istDef.h\"\n\n#define BMI", "parent": 0, "children": [7, 8], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 7, "type": "#include", "text": "istDef.h", "parent": 6, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\n\n#define BM", "parent": 6, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 21}}, {"id": 9, "type": "preproc_function_def", "text": "EM_G(p) ((BmItemGlobal *)(p))\n#define BMIT", "parent": 0, "children": [10, 11, 12, 14], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 10, "type": "#define", "text": "EM_G(p)", "parent": 9, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 11, "type": "identifier", "text": " ((BmIte", "parent": 9, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 16}}, {"id": 12, "type": "preproc_params", "text": "mGl", "parent": 9, "children": [13], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 19}}, {"id": 13, "type": "identifier", "text": "G", "parent": 12, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 14, "type": "preproc_arg", "text": "al *)(p))\n#define BMI", "parent": 9, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 42}}, {"id": 15, "type": "preproc_function_def", "text": "EM_L(p) ((BmItemLocal *)(p))\n\ntypedef str", "parent": 0, "children": [16, 17, 18, 20], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 16, "type": "#define", "text": "EM_L(p)", "parent": 15, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 17, "type": "identifier", "text": " ((BmIte", "parent": 15, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 16}}, {"id": 18, "type": "preproc_params", "text": "mLo", "parent": 15, "children": [19], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 19}}, {"id": 19, "type": "identifier", "text": "L", "parent": 18, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 18}}, {"id": 20, "type": "preproc_arg", "text": "l *)(p))\n\ntypedef st", "parent": 15, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 41}}, {"id": 21, "type": "type_definition", "text": "ct\n{\n\tmListItem i;\n\tchar *fname;\n\tint lineno;\n}BmItemGlobal;\n\ntypedef st", "parent": 0, "children": [22, 23, 36], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 44, "column": 14}}, {"id": 22, "type": "typedef", "text": "ct\n{\n\tm", "parent": 21, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 23, "type": "struct_specifier", "text": "istItem i;\n\tchar *fname;\n\tint lineno;\n}BmItemGlobal", "parent": 21, "children": [24], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 44, "column": 1}}, {"id": 24, "type": "struct", "text": "istIte", "parent": 23, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 25, "type": "field_declaration", "text": "\n\tchar *fnam", "parent": 23, "children": [26, 27], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 13}}, {"id": 26, "type": "type_identifier", "text": "\n\tchar *f", "parent": 25, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 10}}, {"id": 27, "type": "field_identifier", "text": "a", "parent": 25, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 12}}, {"id": 28, "type": "field_declaration", "text": "\n\tint lineno", "parent": 23, "children": [29, 30], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 13}}, {"id": 29, "type": "primitive_type", "text": "\n\tin", "parent": 28, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 5}}, {"id": 30, "type": "pointer_declarator", "text": " linen", "parent": 28, "children": [31, 32], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 12}}, {"id": 31, "type": "*", "text": " ", "parent": 30, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 7}}, {"id": 32, "type": "field_identifier", "text": "linen", "parent": 30, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 12}}, {"id": 33, "type": "field_declaration", "text": "}BmItemGlob", "parent": 23, "children": [34, 35], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 12}}, {"id": 34, "type": "primitive_type", "text": "}Bm", "parent": 33, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 4}}, {"id": 35, "type": "field_identifier", "text": "temGlo", "parent": 33, "children": [], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 11}}, {"id": 36, "type": "type_identifier", "text": ";\n\ntypedef s", "parent": 21, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 13}}, {"id": 37, "type": "type_definition", "text": "ct\n{\n\tmListItem i;\n\tchar *comment; //NULL \u3067\u306a\u3057\n\tint lineno;\n}BmItemLocal;\n\n#ifdef __cpluspl", "parent": 0, "children": [38, 39, 52], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 51, "column": 13}}, {"id": 38, "type": "typedef", "text": "ct\n{\n\tm", "parent": 37, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 39, "type": "struct_specifier", "text": "istItem i;\n\tchar *comment; //NULL \u3067\u306a\u3057\n\tint lineno;\n}BmItemLocal;\n\n#ifd", "parent": 37, "children": [40], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 51, "column": 1}}, {"id": 40, "type": "struct", "text": "istIte", "parent": 39, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 14}}, {"id": 41, "type": "field_declaration", "text": "\n\tchar *comm", "parent": 39, "children": [42, 43], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 13}}, {"id": 42, "type": "type_identifier", "text": "\n\tchar *c", "parent": 41, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 10}}, {"id": 43, "type": "field_identifier", "text": "m", "parent": 41, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 44, "type": "field_declaration", "text": "t; //NULL \u3067\u306a\u3057\n", "parent": 39, "children": [45, 46], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 15}}, {"id": 45, "type": "primitive_type", "text": "t; /", "parent": 44, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 46, "type": "pointer_declarator", "text": "NULL \u3067\u306a\u3057", "parent": 44, "children": [47, 48], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 14}}, {"id": 47, "type": "*", "text": "N", "parent": 46, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 7}}, {"id": 48, "type": "field_identifier", "text": "ULL \u3067\u306a\u3057", "parent": 46, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 14}}, {"id": 49, "type": "field_declaration", "text": "mLocal;\n\n#i", "parent": 39, "children": [50, 51], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 12}}, {"id": 50, "type": "primitive_type", "text": "mLo", "parent": 49, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 4}}, {"id": 51, "type": "field_identifier", "text": "al;\n\n#", "parent": 49, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 11}}, {"id": 52, "type": "type_identifier", "text": "ef __cplusp", "parent": 37, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 12}}, {"id": 53, "type": "preproc_ifdef", "text": "\nextern \"C\" {\n#endif\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n", "parent": 0, "children": [54, 55, 56, 150], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 54, "type": "#ifdef", "text": "\nexter", "parent": 53, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 55, "type": "identifier", "text": " \"C\" {\n#end", "parent": 53, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 18}}, {"id": 56, "type": "linkage_specification", "text": "f\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n", "parent": 53, "children": [57, 58], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 57, "type": "extern", "text": "f\nvoid", "parent": 56, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 58, "type": "string_literal", "text": "Boo", "parent": 56, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 10}}, {"id": 59, "type": "preproc_call", "text": "rkFree(", "parent": 56, "children": [60], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 60, "type": "preproc_directive", "text": "rkFree", "parent": 59, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 61, "type": "declaration", "text": ");\n\nBmItemGlobal *Bo", "parent": 56, "children": [62, 63], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 20}}, {"id": 62, "type": "primitive_type", "text": ");\n\n", "parent": 61, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 4}}, {"id": 63, "type": "function_declarator", "text": "mItemGlobal *B", "parent": 61, "children": [64, 65], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 19}}, {"id": 64, "type": "identifier", "text": "mItemGlobal ", "parent": 63, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 17}}, {"id": 65, "type": "parameter_list", "text": "*B", "parent": 63, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 19}}, {"id": 66, "type": "declaration", "text": "markGlobal_add();\nvoid BookmarkGlob", "parent": 56, "children": [67, 68], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 35}}, {"id": 67, "type": "type_identifier", "text": "markGlobal_a", "parent": 66, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 12}}, {"id": 68, "type": "pointer_declarator", "text": "d();\nvoid BookmarkGlo", "parent": 66, "children": [69, 70], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 34}}, {"id": 69, "type": "*", "text": "d", "parent": 68, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 14}}, {"id": 70, "type": "function_declarator", "text": "();\nvoid BookmarkGlo", "parent": 68, "children": [71, 72], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 34}}, {"id": 71, "type": "identifier", "text": "();\nvoid BookmarkG", "parent": 70, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 32}}, {"id": 72, "type": "parameter_list", "text": "lo", "parent": 70, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 34}}, {"id": 73, "type": "declaration", "text": "l_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlob", "parent": 56, "children": [74, 75], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 59}}, {"id": 74, "type": "primitive_type", "text": "l_ge", "parent": 73, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 4}}, {"id": 75, "type": "function_declarator", "text": "ListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlo", "parent": 73, "children": [76, 77], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 58}}, {"id": 76, "type": "identifier", "text": "ListStr(mStr *str,BmItemG", "parent": 75, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 30}}, {"id": 77, "type": "parameter_list", "text": "lobal *pi);\nvoid BookmarkGlo", "parent": 75, "children": [78, 83], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 58}}, {"id": 78, "type": "parameter_declaration", "text": "obal *pi)", "parent": 77, "children": [79, 80], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 40}}, {"id": 79, "type": "type_identifier", "text": "obal", "parent": 78, "children": [], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 35}}, {"id": 80, "type": "pointer_declarator", "text": "*pi)", "parent": 78, "children": [81, 82], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 40}}, {"id": 81, "type": "*", "text": "*", "parent": 80, "children": [], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 37}}, {"id": 82, "type": "identifier", "text": "pi)", "parent": 80, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 40}}, {"id": 83, "type": "parameter_declaration", "text": "\nvoid BookmarkGl", "parent": 77, "children": [84, 85], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 57}}, {"id": 84, "type": "type_identifier", "text": "\nvoid Bookma", "parent": 83, "children": [], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 53}}, {"id": 85, "type": "pointer_declarator", "text": "kGl", "parent": 83, "children": [86, 87], "start_point": {"row": 59, "column": 54}, "end_point": {"row": 59, "column": 57}}, {"id": 86, "type": "*", "text": "k", "parent": 85, "children": [], "start_point": {"row": 59, "column": 54}, "end_point": {"row": 59, "column": 55}}, {"id": 87, "type": "identifier", "text": "Gl", "parent": 85, "children": [], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 57}}, {"id": 88, "type": "declaration", "text": "l_saveFile();\nvoid BookmarkGlob", "parent": 56, "children": [89, 90], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 31}}, {"id": 89, "type": "primitive_type", "text": "l_sa", "parent": 88, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 4}}, {"id": 90, "type": "function_declarator", "text": "eFile();\nvoid BookmarkGlo", "parent": 88, "children": [91, 92], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 30}}, {"id": 91, "type": "identifier", "text": "eFile();\nvoid BookmarkG", "parent": 90, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 28}}, {"id": 92, "type": "parameter_list", "text": "lo", "parent": 90, "children": [], "start_point": {"row": 60, "column": 28}, "end_point": {"row": 60, "column": 30}}, {"id": 93, "type": "declaration", "text": "l_loadFile();\n\nBmItemLocal *Boo", "parent": 56, "children": [94, 95], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 31}}, {"id": 94, "type": "primitive_type", "text": "l_lo", "parent": 93, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 4}}, {"id": 95, "type": "function_declarator", "text": "dFile();\n\nBmItemLocal *Bo", "parent": 93, "children": [96, 97], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 30}}, {"id": 96, "type": "identifier", "text": "dFile();\n\nBmItemLocal *", "parent": 95, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 28}}, {"id": 97, "type": "parameter_list", "text": "Bo", "parent": 95, "children": [], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 30}}, {"id": 98, "type": "declaration", "text": "arkLocal_add(mStr *strcomment);\nvoid BookmarkLoca", "parent": 56, "children": [99, 100], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 49}}, {"id": 99, "type": "type_identifier", "text": "arkLocal_ad", "parent": 98, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 11}}, {"id": 100, "type": "pointer_declarator", "text": "(mStr *strcomment);\nvoid BookmarkLoc", "parent": 98, "children": [101], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 48}}, {"id": 101, "type": "function_declarator", "text": "mStr *strcomment);\nvoid BookmarkLoc", "parent": 100, "children": [102, 103], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 48}}, {"id": 102, "type": "identifier", "text": "mStr *strcomment)", "parent": 101, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 30}}, {"id": 103, "type": "parameter_list", "text": ";\nvoid BookmarkLoc", "parent": 101, "children": [104], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 48}}, {"id": 104, "type": "parameter_declaration", "text": "\nvoid BookmarkLo", "parent": 103, "children": [105, 106], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 47}}, {"id": 105, "type": "type_identifier", "text": "\nvoi", "parent": 104, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 35}}, {"id": 106, "type": "pointer_declarator", "text": " BookmarkLo", "parent": 104, "children": [107, 108], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 47}}, {"id": 107, "type": "*", "text": " ", "parent": 106, "children": [], "start_point": {"row": 63, "column": 36}, "end_point": {"row": 63, "column": 37}}, {"id": 108, "type": "identifier", "text": "BookmarkLo", "parent": 106, "children": [], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 47}}, {"id": 109, "type": "declaration", "text": "_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLoca", "parent": 56, "children": [110, 111], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 57}}, {"id": 110, "type": "primitive_type", "text": "_get", "parent": 109, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 4}}, {"id": 111, "type": "function_declarator", "text": "istStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLoc", "parent": 109, "children": [112, 113], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 56}}, {"id": 112, "type": "identifier", "text": "istStr(mStr *str,BmItemL", "parent": 111, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 29}}, {"id": 113, "type": "parameter_list", "text": "ocal *pi);\nvoid BookmarkLoc", "parent": 111, "children": [114, 119], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 56}}, {"id": 114, "type": "parameter_declaration", "text": "cal *pi);", "parent": 113, "children": [115, 116], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 39}}, {"id": 115, "type": "type_identifier", "text": "cal ", "parent": 114, "children": [], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 34}}, {"id": 116, "type": "pointer_declarator", "text": "pi);", "parent": 114, "children": [117, 118], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 39}}, {"id": 117, "type": "*", "text": "p", "parent": 116, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 36}}, {"id": 118, "type": "identifier", "text": "i);", "parent": 116, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 39}}, {"id": 119, "type": "parameter_declaration", "text": "void BookmarkLo", "parent": 113, "children": [120, 121], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 55}}, {"id": 120, "type": "type_identifier", "text": "void Bookma", "parent": 119, "children": [], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 51}}, {"id": 121, "type": "pointer_declarator", "text": "kLo", "parent": 119, "children": [122, 123], "start_point": {"row": 64, "column": 52}, "end_point": {"row": 64, "column": 55}}, {"id": 122, "type": "*", "text": "k", "parent": 121, "children": [], "start_point": {"row": 64, "column": 52}, "end_point": {"row": 64, "column": 53}}, {"id": 123, "type": "identifier", "text": "Lo", "parent": 121, "children": [], "start_point": {"row": 64, "column": 53}, "end_point": {"row": 64, "column": 55}}, {"id": 124, "type": "declaration", "text": "_saveFile(const char *fname);\nvoid BookmarkLoca", "parent": 56, "children": [125, 126], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 47}}, {"id": 125, "type": "primitive_type", "text": "_sav", "parent": 124, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 4}}, {"id": 126, "type": "function_declarator", "text": "File(const char *fname);\nvoid BookmarkLoc", "parent": 124, "children": [127, 128], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 46}}, {"id": 127, "type": "identifier", "text": "File(const char *fname", "parent": 126, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 27}}, {"id": 128, "type": "parameter_list", "text": ");\nvoid BookmarkLoc", "parent": 126, "children": [129], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 46}}, {"id": 129, "type": "parameter_declaration", "text": ";\nvoid BookmarkLo", "parent": 128, "children": [130, 131, 132], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 45}}, {"id": 130, "type": "type_qualifier", "text": ";\nvoi", "parent": 129, "children": [], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 33}}, {"id": 131, "type": "primitive_type", "text": " Boo", "parent": 129, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 38}}, {"id": 132, "type": "pointer_declarator", "text": "markLo", "parent": 129, "children": [133, 134], "start_point": {"row": 65, "column": 39}, "end_point": {"row": 65, "column": 45}}, {"id": 133, "type": "*", "text": "m", "parent": 132, "children": [], "start_point": {"row": 65, "column": 39}, "end_point": {"row": 65, "column": 40}}, {"id": 134, "type": "identifier", "text": "arkLo", "parent": 132, "children": [], "start_point": {"row": 65, "column": 40}, "end_point": {"row": 65, "column": 45}}, {"id": 135, "type": "declaration", "text": "_loadFile(const char *fname);\n#ifdef __cplusplu", "parent": 56, "children": [136, 137], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 47}}, {"id": 136, "type": "primitive_type", "text": "_loa", "parent": 135, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 4}}, {"id": 137, "type": "function_declarator", "text": "File(const char *fname);\n#ifdef __cpluspl", "parent": 135, "children": [138, 139], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 46}}, {"id": 138, "type": "identifier", "text": "File(const char *fname", "parent": 137, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 27}}, {"id": 139, "type": "parameter_list", "text": ");\n#ifdef __cpluspl", "parent": 137, "children": [140], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 46}}, {"id": 140, "type": "parameter_declaration", "text": ";\n#ifdef __cplusp", "parent": 139, "children": [141, 142, 143], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 45}}, {"id": 141, "type": "type_qualifier", "text": ";\n#if", "parent": 140, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 33}}, {"id": 142, "type": "primitive_type", "text": "ef _", "parent": 140, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 38}}, {"id": 143, "type": "pointer_declarator", "text": "cplusp", "parent": 140, "children": [144, 145], "start_point": {"row": 66, "column": 39}, "end_point": {"row": 66, "column": 45}}, {"id": 144, "type": "*", "text": "c", "parent": 143, "children": [], "start_point": {"row": 66, "column": 39}, "end_point": {"row": 66, "column": 40}}, {"id": 145, "type": "identifier", "text": "plusp", "parent": 143, "children": [], "start_point": {"row": 66, "column": 40}, "end_point": {"row": 66, "column": 45}}, {"id": 146, "type": "preproc_ifdef", "text": "\n}\n#endif\n#endif\n", "parent": 56, "children": [147, 148, 149], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 18}}, {"id": 147, "type": "#ifdef", "text": "\n}\n#en", "parent": 146, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 6}}, {"id": 148, "type": "identifier", "text": "if\n#endif\n", "parent": 146, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 18}}, {"id": 149, "type": "#endif", "text": "", "parent": 146, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 18}}, {"id": 150, "type": "#endif", "text": "", "parent": 53, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 151, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 15, 63, 70, 75, 90, 95, 101, 111, 126, 137], "variables": [21, 25, 28, 33, 37, 41, 44, 49, 61, 66, 73, 78, 83, 88, 93, 98, 104, 109, 114, 119, 124, 129, 135, 140], "classes": [23, 24, 39, 40], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 13, 17, 19, 26, 27, 32, 35, 36, 42, 43, 48, 51, 52, 53, 54, 55, 56, 64, 67, 71, 76, 79, 82, 84, 87, 91, 96, 99, 102, 105, 108, 112, 115, 118, 120, 123, 127, 130, 134, 138, 141, 145, 146, 147, 148, 149, 150, 151], "returns": [], "exceptions": []}, "expressions": {"calls": [59], "literals": [8, 58], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "EM_G(p) ((BmItemGlobal *)(p))\n#define BMIT"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "EM_L(p) ((BmItemLocal *)(p))\n\ntypedef str"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "mItemGlobal *B"}, {"node_id": 70, "universal_type": "function", "name": "BookmarkGlo", "text_snippet": "();\nvoid BookmarkGlo"}, {"node_id": 75, "universal_type": "function", "name": "BookmarkGlo", "text_snippet": "ListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlo"}, {"node_id": 90, "universal_type": "function", "name": "BookmarkGlo", "text_snippet": "eFile();\nvoid BookmarkGlo"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "dFile();\n\nBmItemLocal *Bo"}, {"node_id": 101, "universal_type": "function", "name": "BookmarkLoc", "text_snippet": "mStr *strcomment);\nvoid BookmarkLoc"}, {"node_id": 111, "universal_type": "function", "name": "BookmarkLoc", "text_snippet": "istStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLoc"}, {"node_id": 126, "universal_type": "function", "name": "BookmarkLoc", "text_snippet": "File(const char *fname);\nvoid BookmarkLoc"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "File(const char *fname);\n#ifdef __cpluspl"}], "class_declarations": [{"node_id": 23, "universal_type": "class", "name": "lineno;", "text_snippet": "istItem i;\n\tchar *fname;\n\tint lineno;\n}BmItemGlobal"}, {"node_id": 24, "universal_type": "class", "name": "unknown", "text_snippet": "istIte"}, {"node_id": 39, "universal_type": "class", "name": "lineno;", "text_snippet": "istItem i;\n\tchar *comment; //NULL \u3067\u306a\u3057\n\tint lineno;\n}BmItemLocal;\n\n#ifd"}, {"node_id": 40, "universal_type": "class", "name": "unknown", "text_snippet": "istIte"}], "import_statements": [{"node_id": 6, "text": "istDef.h\"\n\n#define BMI"}, {"node_id": 7, "text": "istDef.h"}]}, "original_source_code": "/*$\nCopyright (c) 2014-2017, Azel\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, 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 <organization> 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\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n$*/\n\n/********************************\n * \u3057\u304a\u308a\u30c7\u30fc\u30bf\n ********************************/\n\n#ifndef BOOKMARKDAT_H\n#define BOOKMARKDAT_H\n\n#include \"mListDef.h\"\n\n#define BMITEM_G(p) ((BmItemGlobal *)(p))\n#define BMITEM_L(p) ((BmItemLocal *)(p))\n\ntypedef struct\n{\n\tmListItem i;\n\tchar *fname;\n\tint lineno;\n}BmItemGlobal;\n\ntypedef struct\n{\n\tmListItem i;\n\tchar *comment; //NULL \u3067\u306a\u3057\n\tint lineno;\n}BmItemLocal;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nvoid BookmarkFree();\n\nBmItemGlobal *BookmarkGlobal_add();\nvoid BookmarkGlobal_getListStr(mStr *str,BmItemGlobal *pi);\nvoid BookmarkGlobal_saveFile();\nvoid BookmarkGlobal_loadFile();\n\nBmItemLocal *BookmarkLocal_add(mStr *strcomment);\nvoid BookmarkLocal_getListStr(mStr *str,BmItemLocal *pi);\nvoid BookmarkLocal_saveFile(const char *fname);\nvoid BookmarkLocal_loadFile(const char *fname);\n#ifdef __cplusplus\n}\n#endif\n#endif\n"}
271
c
// // SlideTransitionAnimator.h // SlideController // // Created by weuse_hao on 2018/9/3. // Copyright © 2018 weuse_hao. All rights reserved. // #import <UIKit/UIKit.h> typedef NS_ENUM(NSUInteger, SlideTransitionType) { SlideTransitionTypeModal, SlideTransitionTypePush, }; NS_ASSUME_NONNULL_BEGIN @interface SlideTransitionAnimator : NSObject <UIViewControllerAnimatedTransitioning> - (instancetype)initWithTargetEdge:(UIRectEdge)targetEdge transitionType:(SlideTransitionType)transitionType; @property (nonatomic, readwrite) UIRectEdge targetEdge; @property (nonatomic, assign) SlideTransitionType transitionType; @end NS_ASSUME_NONNULL_END
33.53
19
(translation_unit) "//\n// SlideTransitionAnimator.h\n// SlideController\n//\n// Created by weuse_hao on 2018/9/3.\n// Copyright © 2018 weuse_hao. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef NS_ENUM(NSUInteger, SlideTransitionType) {\n SlideTransitionTypeModal,\n SlideTransitionTypePush,\n};\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface SlideTransitionAnimator : NSObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:(UIRectEdge)targetEdge transitionType:(SlideTransitionType)transitionType;\n\n@property (nonatomic, readwrite) UIRectEdge targetEdge;\n\n@property (nonatomic, assign) SlideTransitionType transitionType;\n\n@end\n\nNS_ASSUME_NONNULL_END\n" (comment) "//" (comment) "// SlideTransitionAnimator.h" (comment) "// SlideController" (comment) "//" (comment) "// Created by weuse_hao on 2018/9/3." (comment) "// Copyright © 2018 weuse_hao. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <UIKit/UIKit.h>\n\n" (preproc_directive) "import " (preproc_arg) "UIKit/UIKit.h>\n" (type_definition) "ypedef NS_ENUM(NSUInteger, SlideTransitionType) {\n SlideTransitionTypeModal,\n SlideTransitionTypePush,\n};\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface " (typedef) "ypedef " (macro_type_specifier) "S_ENUM(NSUInteger, SlideTransitionType) " (identifier) "S_ENUM(" (() "N" (ERROR) "SUInteger, " (type_descriptor) "SUInteger," (type_identifier) "SUInteger," (,) " " (type_descriptor) "lideTransitionType)" (type_identifier) "lideTransitionType)" ()) " " (ERROR) "\n" ({) "\n" (type_identifier) "lideTransitionTypeModal," (,) "\n" (type_identifier) "lideTransitionTypePush," (,) "\n" (ERROR) ";\n\nNS_ASSUME_NONNULL_BEGIN\n\n@i" (}) ";" (;) "\n" (type_identifier) "S_ASSUME_NONNULL_BEGIN\n" (ERROR) "i" (type_identifier) "nterface " (;) "" (labeled_statement) "lideTransitionAnimator : NSObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:(UIRectEdge)targetEdge " (statement_identifier) "lideTransitionAnimator " (ERROR) " NSObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:" (:) " " (binary_expression) "SObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:" (binary_expression) "SObject <UIViewControllerAnimatedTransitioning>" (identifier) "SObject " (<) "U" (identifier) "IViewControllerAnimatedTransitioning>" (>) "\n" (unary_expression) " (instancetype)initWithTargetEdge:" (-) " " (cast_expression) "instancetype)initWithTargetEdge:" (() "i" (type_descriptor) "nstancetype)" (type_identifier) "nstancetype)" ()) "i" (identifier) "nitWithTargetEdge:" (:) "(" (expression_statement) "UIRectEdge)targetEdge " (cast_expression) "UIRectEdge)targetEdge " (() "U" (type_descriptor) "IRectEdge)" (type_identifier) "IRectEdge)" ()) "t" (identifier) "argetEdge " (;) "" (labeled_statement) "ransitionType:(SlideTransitionType)transitionType;\n" (statement_identifier) "ransitionType:" (:) "(" (expression_statement) "SlideTransitionType)transitionType;\n" (cast_expression) "SlideTransitionType)transitionType;" (() "S" (type_descriptor) "lideTransitionType)" (type_identifier) "lideTransitionType)" ()) "t" (identifier) "ransitionType;" (;) "\n" (ERROR) "property (nonatomic, readwrite) UIRectEdge " (ERROR) "p" (call_expression) "roperty (nonatomic, readwrite) " (identifier) "roperty " (argument_list) "nonatomic, readwrite) " (() "n" (identifier) "onatomic," (,) " " (identifier) "eadwrite)" ()) " " (identifier) "IRectEdge " (expression_statement) "argetEdge;\n" (identifier) "argetEdge;" (;) "\n" (ERROR) "property (nonatomic, assign) SlideTransitionType " (ERROR) "p" (call_expression) "roperty (nonatomic, assign) " (identifier) "roperty " (argument_list) "nonatomic, assign) " (() "n" (identifier) "onatomic," (,) " " (identifier) "ssign)" ()) " " (identifier) "lideTransitionType " (expression_statement) "ransitionType;\n" (identifier) "ransitionType;" (;) "\n" (ERROR) "e" (ERROR) "e" (declaration) "nd\n\nNS_ASSUME_NONNULL_END\n" (type_identifier) "nd\n" (identifier) "S_ASSUME_NONNULL_END\n" (;) ""
108
11
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 33.53, "nodes": 66, "errors": 0, "source_hash": "4754f4a356aeba0a4ff0bb351128b5d0bc3e9ba8eb2e8a42edda5957d2eddce7", "categorized_nodes": 41}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <UIKit/UIKit.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": "UIKit/UIKit.h>\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 2, "type": "type_definition", "text": "ypedef NS_ENUM(NSUInteger, SlideTransitionType) {\n SlideTransitionTypeModal,\n SlideTransitionTypePush,\n};\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface ", "parent": null, "children": [3, 4, 11, 12, 13, 14, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 17, "column": 10}}, {"id": 3, "type": "typedef", "text": "ypedef ", "parent": 2, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 4, "type": "macro_type_specifier", "text": "S_ENUM(NSUInteger, SlideTransitionType) ", "parent": 2, "children": [5, 6, 9], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 48}}, {"id": 5, "type": "identifier", "text": "S_ENUM(", "parent": 4, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 15}}, {"id": 6, "type": "ERROR", "text": "SUInteger, ", "parent": 4, "children": [7], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 27}}, {"id": 7, "type": "type_descriptor", "text": "SUInteger,", "parent": 6, "children": [8], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 26}}, {"id": 8, "type": "type_identifier", "text": "SUInteger,", "parent": 7, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 26}}, {"id": 9, "type": "type_descriptor", "text": "lideTransitionType)", "parent": 4, "children": [10], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 47}}, {"id": 10, "type": "type_identifier", "text": "lideTransitionType)", "parent": 9, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 47}}, {"id": 11, "type": "ERROR", "text": "\n", "parent": 2, "children": [], "start_point": {"row": 10, "column": 49}, "end_point": {"row": 10, "column": 50}}, {"id": 12, "type": "type_identifier", "text": "lideTransitionTypeModal,", "parent": 2, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 28}}, {"id": 13, "type": "type_identifier", "text": "lideTransitionTypePush,", "parent": 2, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 27}}, {"id": 14, "type": "ERROR", "text": ";\n\nNS_ASSUME_NONNULL_BEGIN\n\n@i", "parent": 2, "children": [15, 16], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 15, "type": "type_identifier", "text": "S_ASSUME_NONNULL_BEGIN\n", "parent": 14, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 23}}, {"id": 16, "type": "ERROR", "text": "i", "parent": 14, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 17, "type": "type_identifier", "text": "nterface ", "parent": 2, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 10}}, {"id": 18, "type": "labeled_statement", "text": "lideTransitionAnimator : NSObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:(UIRectEdge)targetEdge ", "parent": null, "children": [19, 20], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 19, "column": 57}}, {"id": 19, "type": "statement_identifier", "text": "lideTransitionAnimator ", "parent": 18, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 34}}, {"id": 20, "type": "ERROR", "text": " NSObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:", "parent": 18, "children": [21], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 19, "column": 34}}, {"id": 21, "type": "binary_expression", "text": "SObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:", "parent": 20, "children": [22, 26, 27], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 19, "column": 34}}, {"id": 22, "type": "binary_expression", "text": "SObject <UIViewControllerAnimatedTransitioning>", "parent": 21, "children": [23, 24, 25], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 84}}, {"id": 23, "type": "identifier", "text": "SObject ", "parent": 22, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 45}}, {"id": 24, "type": "<", "text": "U", "parent": 22, "children": [], "start_point": {"row": 17, "column": 46}, "end_point": {"row": 17, "column": 47}}, {"id": 25, "type": "identifier", "text": "IViewControllerAnimatedTransitioning>", "parent": 22, "children": [], "start_point": {"row": 17, "column": 47}, "end_point": {"row": 17, "column": 84}}, {"id": 26, "type": ">", "text": "\n", "parent": 21, "children": [], "start_point": {"row": 17, "column": 84}, "end_point": {"row": 17, "column": 85}}, {"id": 27, "type": "unary_expression", "text": " (instancetype)initWithTargetEdge:", "parent": 21, "children": [28, 29], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 34}}, {"id": 28, "type": "-", "text": " ", "parent": 27, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 29, "type": "cast_expression", "text": "instancetype)initWithTargetEdge:", "parent": 27, "children": [30, 32], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 34}}, {"id": 30, "type": "type_descriptor", "text": "nstancetype)", "parent": 29, "children": [31], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 15}}, {"id": 31, "type": "type_identifier", "text": "nstancetype)", "parent": 30, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 15}}, {"id": 32, "type": "identifier", "text": "nitWithTargetEdge:", "parent": 29, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 34}}, {"id": 33, "type": "cast_expression", "text": "UIRectEdge)targetEdge ", "parent": 18, "children": [34, 36], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 57}}, {"id": 34, "type": "type_descriptor", "text": "IRectEdge)", "parent": 33, "children": [35], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 46}}, {"id": 35, "type": "type_identifier", "text": "IRectEdge)", "parent": 34, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 46}}, {"id": 36, "type": "identifier", "text": "argetEdge ", "parent": 33, "children": [], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 57}}, {"id": 37, "type": "labeled_statement", "text": "ransitionType:(SlideTransitionType)transitionType;\n", "parent": null, "children": [38], "start_point": {"row": 19, "column": 58}, "end_point": {"row": 19, "column": 109}}, {"id": 38, "type": "statement_identifier", "text": "ransitionType:", "parent": 37, "children": [], "start_point": {"row": 19, "column": 58}, "end_point": {"row": 19, "column": 72}}, {"id": 39, "type": "cast_expression", "text": "SlideTransitionType)transitionType;", "parent": 37, "children": [40, 42], "start_point": {"row": 19, "column": 73}, "end_point": {"row": 19, "column": 108}}, {"id": 40, "type": "type_descriptor", "text": "lideTransitionType)", "parent": 39, "children": [41], "start_point": {"row": 19, "column": 74}, "end_point": {"row": 19, "column": 93}}, {"id": 41, "type": "type_identifier", "text": "lideTransitionType)", "parent": 40, "children": [], "start_point": {"row": 19, "column": 74}, "end_point": {"row": 19, "column": 93}}, {"id": 42, "type": "identifier", "text": "ransitionType;", "parent": 39, "children": [], "start_point": {"row": 19, "column": 94}, "end_point": {"row": 19, "column": 108}}, {"id": 43, "type": "ERROR", "text": "property (nonatomic, readwrite) UIRectEdge ", "parent": null, "children": [44, 45, 50], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 43}}, {"id": 44, "type": "ERROR", "text": "p", "parent": 43, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 45, "type": "call_expression", "text": "roperty (nonatomic, readwrite) ", "parent": 43, "children": [46, 47], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 32}}, {"id": 46, "type": "identifier", "text": "roperty ", "parent": 45, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 47, "type": "argument_list", "text": "nonatomic, readwrite) ", "parent": 45, "children": [48, 49], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 32}}, {"id": 48, "type": "identifier", "text": "onatomic,", "parent": 47, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 20}}, {"id": 49, "type": "identifier", "text": "eadwrite)", "parent": 47, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 31}}, {"id": 50, "type": "identifier", "text": "IRectEdge ", "parent": 43, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 43}}, {"id": 51, "type": "identifier", "text": "argetEdge;", "parent": null, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 54}}, {"id": 52, "type": "ERROR", "text": "property (nonatomic, assign) SlideTransitionType ", "parent": null, "children": [53, 54, 59], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 49}}, {"id": 53, "type": "ERROR", "text": "p", "parent": 52, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 54, "type": "call_expression", "text": "roperty (nonatomic, assign) ", "parent": 52, "children": [55, 56], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 29}}, {"id": 55, "type": "identifier", "text": "roperty ", "parent": 54, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 56, "type": "argument_list", "text": "nonatomic, assign) ", "parent": 54, "children": [57, 58], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 29}}, {"id": 57, "type": "identifier", "text": "onatomic,", "parent": 56, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 20}}, {"id": 58, "type": "identifier", "text": "ssign)", "parent": 56, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 28}}, {"id": 59, "type": "identifier", "text": "lideTransitionType ", "parent": 52, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 49}}, {"id": 60, "type": "identifier", "text": "ransitionType;", "parent": null, "children": [], "start_point": {"row": 23, "column": 50}, "end_point": {"row": 23, "column": 64}}, {"id": 61, "type": "ERROR", "text": "e", "parent": null, "children": [62], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 62, "type": "ERROR", "text": "e", "parent": 61, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 63, "type": "declaration", "text": "nd\n\nNS_ASSUME_NONNULL_END\n", "parent": null, "children": [64, 65], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 27, "column": 21}}, {"id": 64, "type": "type_identifier", "text": "nd\n", "parent": 63, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}, {"id": 65, "type": "identifier", "text": "S_ASSUME_NONNULL_END\n", "parent": 63, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 21}}]}, "node_categories": {"declarations": {"functions": [], "variables": [2, 63], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [21, 22, 27, 29, 33, 39, 45, 54], "assignments": [], "loops": [], "conditionals": [4, 5, 8, 10, 12, 13, 15, 17, 19, 23, 25, 31, 32, 35, 36, 38, 41, 42, 46, 48, 49, 50, 51, 55, 57, 58, 59, 60, 64, 65], "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// SlideTransitionAnimator.h\n// SlideController\n//\n// Created by weuse_hao on 2018/9/3.\n// Copyright \u00a9 2018 weuse_hao. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef NS_ENUM(NSUInteger, SlideTransitionType) {\n SlideTransitionTypeModal,\n SlideTransitionTypePush,\n};\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface SlideTransitionAnimator : NSObject <UIViewControllerAnimatedTransitioning>\n\n- (instancetype)initWithTargetEdge:(UIRectEdge)targetEdge transitionType:(SlideTransitionType)transitionType;\n\n@property (nonatomic, readwrite) UIRectEdge targetEdge;\n\n@property (nonatomic, assign) SlideTransitionType transitionType;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"}
272
c
// StrArray.h: interface for the CStrArray class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_) #define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "sarray.hpp" typedef struct tagSTRING { char *pszBuf; int nLen; }STRING; class CStrArray : public CSArray<STRING> { public: int AddString(const char *pszString,int nLen=-1); void RemoveAll(); CStrArray(); virtual ~CStrArray(); }; typedef struct tagWSTRING { WCHAR *pszBuf; int nLen; }WSTRING; class CWStrArray : public CSArray<WSTRING> { public: int AddString(const WCHAR *pszString,int nLen=-1); void RemoveAll(); CWStrArray(); virtual ~CWStrArray(); }; #endif // !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)
21.57
42
(translation_unit) "// StrArray.h: interface for the CStrArray class. \n// \n////////////////////////////////////////////////////////////////////// \n \n#if !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_) \n#define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_ \n \n#if _MSC_VER > 1000 \n#pragma once \n#endif // _MSC_VER > 1000 \n#include "sarray.hpp" \n \ntypedef struct tagSTRING \n{ \n char *pszBuf; \n int nLen; \n}STRING; \n \nclass CStrArray : public CSArray<STRING> \n{ \npublic: \n int AddString(const char *pszString,int nLen=-1); \n void RemoveAll(); \n CStrArray(); \n virtual ~CStrArray(); \n}; \n \ntypedef struct tagWSTRING \n{ \n WCHAR *pszBuf; \n int nLen; \n}WSTRING; \n \nclass CWStrArray : public CSArray<WSTRING> \n{ \npublic: \n int AddString(const WCHAR *pszString,int nLen=-1); \n void RemoveAll(); \n CWStrArray(); \n virtual ~CWStrArray(); \n}; \n#endif // !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_) \n" (comment) "// StrArray.h: interface for the CStrArray class. " (comment) "// " (comment) "////////////////////////////////////////////////////////////////////// " (preproc_if) "#if !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_) \n#define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_ \n \n#if _MSC_VER > 1000 \n#pragma once \n#endif // _MSC_VER > 1000 \n#include "sarray.hpp" \n \ntypedef struct tagSTRING \n{ \n char *pszBuf; \n int nLen; \n}STRING; \n \nclass CStrArray : public CSArray<STRING> \n{ \npublic: \n int AddString(const char *pszString,int nLen=-1); \n void RemoveAll(); \n CStrArray(); \n virtual ~CStrArray(); \n}; \n \ntypedef struct tagWSTRING \n{ \n WCHAR *pszBuf; \n int nLen; \n}WSTRING; \n \nclass CWStrArray : public CSArray<WSTRING> \n{ \npublic: \n int AddString(const WCHAR *pszString,int nLen=-1); \n void RemoveAll(); \n CWStrArray(); \n virtual ~CWStrArray(); \n}; \n#endif" (#if) "#if" (unary_expression) "!defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)" (!) "!" (preproc_defined) "defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)" (defined) "defined" (() "(" (identifier) "AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_" ()) ")" ( ) "\n" (preproc_def) "#define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_ \n" (#define) "#define" (identifier) "AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_" (preproc_if) "#if _MSC_VER > 1000 \n#pragma once \n#endif" (#if) "#if" (binary_expression) "_MSC_VER > 1000" (identifier) "_MSC_VER" (>) ">" (number_literal) "1000" ( ) "\n" (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (#endif) "#endif" (comment) "// _MSC_VER > 1000 " (preproc_include) "#include "sarray.hpp" \n" (#include) "#include" (string_literal) ""sarray.hpp"" (") """ (string_content) "sarray.hpp" (") """ (type_definition) "typedef struct tagSTRING \n{ \n char *pszBuf; \n int nLen; \n}STRING;" (typedef) "typedef" (struct_specifier) "struct tagSTRING \n{ \n char *pszBuf; \n int nLen; \n}" (struct) "struct" (type_identifier) "tagSTRING" (field_declaration_list) "{ \n char *pszBuf; \n int nLen; \n}" ({) "{" (field_declaration) "char *pszBuf;" (primitive_type) "char" (pointer_declarator) "*pszBuf" (*) "*" (field_identifier) "pszBuf" (;) ";" (field_declaration) "int nLen;" (primitive_type) "int" (field_identifier) "nLen" (;) ";" (}) "}" (type_identifier) "STRING" (;) ";" (function_definition) "class CStrArray : public CSArray<STRING> \n{ \npublic: \n int AddString(const char *pszString,int nLen=-1); \n void RemoveAll(); \n CStrArray(); \n virtual ~CStrArray(); \n}" (type_identifier) "class" (identifier) "CStrArray" (ERROR) ": public CSArray<STRING>" (:) ":" (identifier) "public" (identifier) "CSArray" (<) "<" (identifier) "STRING" (>) ">" (compound_statement) "{ \npublic: \n int AddString(const char *pszString,int nLen=-1); \n void RemoveAll(); \n CStrArray(); \n virtual ~CStrArray(); \n}" ({) "{" (labeled_statement) "public: \n int AddString(const char *pszString,int nLen=-1);" (statement_identifier) "public" (:) ":" (declaration) "int AddString(const char *pszString,int nLen=-1);" (primitive_type) "int" (init_declarator) "AddString(const char *pszString,int nLen=-1" (function_declarator) "AddString(const char *pszString,int nLen" (identifier) "AddString" (parameter_list) "(const char *pszString,int nLen" (() "(" (parameter_declaration) "const char *pszString" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*pszString" (*) "*" (identifier) "pszString" (,) "," (parameter_declaration) "int nLen" (primitive_type) "int" (identifier) "nLen" ()) "" (=) "=" (number_literal) "-1" (ERROR) ")" ()) ")" (;) ";" (declaration) "void RemoveAll();" (primitive_type) "void" (function_declarator) "RemoveAll()" (identifier) "RemoveAll" (parameter_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "CStrArray();" (call_expression) "CStrArray()" (identifier) "CStrArray" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~CStrArray();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CStrArray()" (identifier) "CStrArray" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (type_definition) "typedef struct tagWSTRING \n{ \n WCHAR *pszBuf; \n int nLen; \n}WSTRING;" (typedef) "typedef" (struct_specifier) "struct tagWSTRING \n{ \n WCHAR *pszBuf; \n int nLen; \n}" (struct) "struct" (type_identifier) "tagWSTRING" (field_declaration_list) "{ \n WCHAR *pszBuf; \n int nLen; \n}" ({) "{" (field_declaration) "WCHAR *pszBuf;" (type_identifier) "WCHAR" (pointer_declarator) "*pszBuf" (*) "*" (field_identifier) "pszBuf" (;) ";" (field_declaration) "int nLen;" (primitive_type) "int" (field_identifier) "nLen" (;) ";" (}) "}" (type_identifier) "WSTRING" (;) ";" (function_definition) "class CWStrArray : public CSArray<WSTRING> \n{ \npublic: \n int AddString(const WCHAR *pszString,int nLen=-1); \n void RemoveAll(); \n CWStrArray(); \n virtual ~CWStrArray(); \n}" (type_identifier) "class" (identifier) "CWStrArray" (ERROR) ": public CSArray<WSTRING>" (:) ":" (identifier) "public" (identifier) "CSArray" (<) "<" (identifier) "WSTRING" (>) ">" (compound_statement) "{ \npublic: \n int AddString(const WCHAR *pszString,int nLen=-1); \n void RemoveAll(); \n CWStrArray(); \n virtual ~CWStrArray(); \n}" ({) "{" (labeled_statement) "public: \n int AddString(const WCHAR *pszString,int nLen=-1);" (statement_identifier) "public" (:) ":" (declaration) "int AddString(const WCHAR *pszString,int nLen=-1);" (primitive_type) "int" (init_declarator) "AddString(const WCHAR *pszString,int nLen=-1" (function_declarator) "AddString(const WCHAR *pszString,int nLen" (identifier) "AddString" (parameter_list) "(const WCHAR *pszString,int nLen" (() "(" (parameter_declaration) "const WCHAR *pszString" (type_qualifier) "const" (const) "const" (type_identifier) "WCHAR" (pointer_declarator) "*pszString" (*) "*" (identifier) "pszString" (,) "," (parameter_declaration) "int nLen" (primitive_type) "int" (identifier) "nLen" ()) "" (=) "=" (number_literal) "-1" (ERROR) ")" ()) ")" (;) ";" (declaration) "void RemoveAll();" (primitive_type) "void" (function_declarator) "RemoveAll()" (identifier) "RemoveAll" (parameter_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "CWStrArray();" (call_expression) "CWStrArray()" (identifier) "CWStrArray" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~CWStrArray();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CWStrArray()" (identifier) "CWStrArray" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_) "
211
6
{"language": "c", "success": true, "metadata": {"lines": 42, "avg_line_length": 21.57, "nodes": 132, "errors": 0, "source_hash": "7a3de0264b4b3ee6217ebb18de53cd3f14990abf08027edfa722d7b4c9c9f98c", "categorized_nodes": 78}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_if", "text": "#if !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)\r\n#define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n#include \"sarray.hpp\"\r\n\r\ntypedef struct tagSTRING\r\n{\r\n\tchar *pszBuf;\r\n\tint nLen;\r\n}STRING;\r\n\r\nclass CStrArray : public CSArray<STRING> \r\n{\r\npublic:\r\n\tint AddString(const char *pszString,int nLen=-1);\r\n\tvoid RemoveAll();\r\n\tCStrArray();\r\n\tvirtual ~CStrArray();\r\n};\r\n\r\ntypedef struct tagWSTRING\r\n{\r\n\tWCHAR *pszBuf;\r\n\tint nLen;\r\n}WSTRING;\r\n\r\nclass CWStrArray : public CSArray<WSTRING> \r\n{\r\npublic:\r\n\tint AddString(const WCHAR *pszString,int nLen=-1);\r\n\tvoid RemoveAll();\r\n\tCWStrArray();\r\n\tvirtual ~CWStrArray();\r\n};\r\n#endif", "parent": null, "children": [1, 2, 7, 8, 11, 22, 25, 39, 78, 92, 131], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 1, "type": "#if", "text": "#if", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 3}}, {"id": 2, "type": "unary_expression", "text": "!defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)", "parent": 0, "children": [3, 4], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 77}}, {"id": 3, "type": "!", "text": "!", "parent": 2, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 5}}, {"id": 4, "type": "preproc_defined", "text": "defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)", "parent": 2, "children": [5, 6], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 77}}, {"id": 5, "type": "defined", "text": "defined", "parent": 4, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 12}}, {"id": 6, "type": "identifier", "text": "AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_", "parent": 4, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 76}}, {"id": 7, "type": "\n", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 4, "column": 78}, "end_point": {"row": 5, "column": 0}}, {"id": 8, "type": "preproc_def", "text": "#define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_\r\n", "parent": 0, "children": [9, 10], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 9, "type": "#define", "text": "#define", "parent": 8, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 10, "type": "identifier", "text": "AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_", "parent": 8, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 71}}, {"id": 11, "type": "preproc_if", "text": "#if _MSC_VER > 1000\r\n#pragma once\r\n#endif", "parent": 0, "children": [12, 13, 17, 18, 21], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 12, "type": "#if", "text": "#if", "parent": 11, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 13, "type": "binary_expression", "text": "_MSC_VER > 1000", "parent": 11, "children": [14, 15, 16], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 19}}, {"id": 14, "type": "identifier", "text": "_MSC_VER", "parent": 13, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 12}}, {"id": 15, "type": ">", "text": ">", "parent": 13, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 16, "type": "number_literal", "text": "1000", "parent": 13, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 19}}, {"id": 17, "type": "\n", "text": "\n", "parent": 11, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 8, "column": 0}}, {"id": 18, "type": "preproc_call", "text": "#pragma once\r\n", "parent": 11, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 19, "type": "preproc_directive", "text": "#pragma", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 20, "type": "preproc_arg", "text": "once\r", "parent": 18, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 13}}, {"id": 21, "type": "#endif", "text": "#endif", "parent": 11, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 22, "type": "preproc_include", "text": "#include \"sarray.hpp\"\r\n", "parent": 0, "children": [23, 24], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 23, "type": "#include", "text": "#include", "parent": 22, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 24, "type": "string_literal", "text": "\"sarray.hpp\"", "parent": 22, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 21}}, {"id": 25, "type": "type_definition", "text": "typedef struct tagSTRING\r\n{\r\n\tchar *pszBuf;\r\n\tint nLen;\r\n}STRING;", "parent": 0, "children": [26, 27, 38], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 26, "type": "typedef", "text": "typedef", "parent": 25, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 27, "type": "struct_specifier", "text": "struct tagSTRING\r\n{\r\n\tchar *pszBuf;\r\n\tint nLen;\r\n}", "parent": 25, "children": [28, 29], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 16, "column": 1}}, {"id": 28, "type": "struct", "text": "struct", "parent": 27, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 29, "type": "type_identifier", "text": "tagSTRING", "parent": 27, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 24}}, {"id": 30, "type": "field_declaration", "text": "char *pszBuf;", "parent": 27, "children": [31, 32], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 14}}, {"id": 31, "type": "primitive_type", "text": "char", "parent": 30, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 32, "type": "pointer_declarator", "text": "*pszBuf", "parent": 30, "children": [33, 34], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 13}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 7}}, {"id": 34, "type": "field_identifier", "text": "pszBuf", "parent": 32, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 13}}, {"id": 35, "type": "field_declaration", "text": "int nLen;", "parent": 27, "children": [36, 37], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 12}}, {"id": 36, "type": "primitive_type", "text": "int", "parent": 35, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}, {"id": 37, "type": "field_identifier", "text": "nLen", "parent": 35, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 11}}, {"id": 38, "type": "type_identifier", "text": "STRING", "parent": 25, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 7}}, {"id": 39, "type": "function_definition", "text": "class CStrArray : public CSArray<STRING> \r\n{\r\npublic:\r\n\tint AddString(const char *pszString,int nLen=-1);\r\n\tvoid RemoveAll();\r\n\tCStrArray();\r\n\tvirtual ~CStrArray();\r\n}", "parent": 0, "children": [40, 41], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 40, "type": "identifier", "text": "CStrArray", "parent": 39, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 15}}, {"id": 41, "type": "ERROR", "text": ": public CSArray<STRING>", "parent": 39, "children": [42, 43, 44, 45], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 40}}, {"id": 42, "type": "identifier", "text": "CSArray", "parent": 41, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 32}}, {"id": 43, "type": "<", "text": "<", "parent": 41, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 33}}, {"id": 44, "type": "identifier", "text": "STRING", "parent": 41, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 39}}, {"id": 45, "type": ">", "text": ">", "parent": 41, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 40}}, {"id": 46, "type": "labeled_statement", "text": "public:\r\n\tint AddString(const char *pszString,int nLen=-1);", "parent": 39, "children": [47], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 50}}, {"id": 47, "type": "declaration", "text": "int AddString(const char *pszString,int nLen=-1);", "parent": 46, "children": [48, 49], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 50}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 4}}, {"id": 49, "type": "init_declarator", "text": "AddString(const char *pszString,int nLen=-1", "parent": 47, "children": [50, 61, 62], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 48}}, {"id": 50, "type": "function_declarator", "text": "AddString(const char *pszString,int nLen", "parent": 49, "children": [51, 52], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 45}}, {"id": 51, "type": "identifier", "text": "AddString", "parent": 50, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 14}}, {"id": 52, "type": "parameter_list", "text": "(const char *pszString,int nLen", "parent": 50, "children": [53, 58], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 45}}, {"id": 53, "type": "parameter_declaration", "text": "const char *pszString", "parent": 52, "children": [54, 55], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 36}}, {"id": 54, "type": "primitive_type", "text": "char", "parent": 53, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 25}}, {"id": 55, "type": "pointer_declarator", "text": "*pszString", "parent": 53, "children": [56, 57], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 36}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 27}}, {"id": 57, "type": "identifier", "text": "pszString", "parent": 55, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 36}}, {"id": 58, "type": "parameter_declaration", "text": "int nLen", "parent": 52, "children": [59, 60], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 45}}, {"id": 59, "type": "primitive_type", "text": "int", "parent": 58, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 40}}, {"id": 60, "type": "identifier", "text": "nLen", "parent": 58, "children": [], "start_point": {"row": 21, "column": 41}, "end_point": {"row": 21, "column": 45}}, {"id": 61, "type": "=", "text": "=", "parent": 49, "children": [], "start_point": {"row": 21, "column": 45}, "end_point": {"row": 21, "column": 46}}, {"id": 62, "type": "number_literal", "text": "-1", "parent": 49, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 48}}, {"id": 63, "type": "declaration", "text": "void RemoveAll();", "parent": 39, "children": [64, 65], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 18}}, {"id": 64, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 5}}, {"id": 65, "type": "function_declarator", "text": "RemoveAll()", "parent": 63, "children": [66, 67], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 17}}, {"id": 66, "type": "identifier", "text": "RemoveAll", "parent": 65, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 15}}, {"id": 67, "type": "parameter_list", "text": "()", "parent": 65, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 17}}, {"id": 68, "type": "call_expression", "text": "CStrArray()", "parent": 39, "children": [69, 70], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 12}}, {"id": 69, "type": "identifier", "text": "CStrArray", "parent": 68, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 10}}, {"id": 70, "type": "argument_list", "text": "()", "parent": 68, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 12}}, {"id": 71, "type": "declaration", "text": "virtual ~CStrArray();", "parent": 39, "children": [72, 73, 75], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 22}}, {"id": 72, "type": "type_identifier", "text": "virtual", "parent": 71, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 8}}, {"id": 73, "type": "ERROR", "text": "~", "parent": 71, "children": [74], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 10}}, {"id": 74, "type": "~", "text": "~", "parent": 73, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 10}}, {"id": 75, "type": "function_declarator", "text": "CStrArray()", "parent": 71, "children": [76, 77], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 21}}, {"id": 76, "type": "identifier", "text": "CStrArray", "parent": 75, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 19}}, {"id": 77, "type": "parameter_list", "text": "()", "parent": 75, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 21}}, {"id": 78, "type": "type_definition", "text": "typedef struct tagWSTRING\r\n{\r\n\tWCHAR *pszBuf;\r\n\tint nLen;\r\n}WSTRING;", "parent": 0, "children": [79, 80, 91], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 31, "column": 9}}, {"id": 79, "type": "typedef", "text": "typedef", "parent": 78, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 80, "type": "struct_specifier", "text": "struct tagWSTRING\r\n{\r\n\tWCHAR *pszBuf;\r\n\tint nLen;\r\n}", "parent": 78, "children": [81, 82], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 31, "column": 1}}, {"id": 81, "type": "struct", "text": "struct", "parent": 80, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 14}}, {"id": 82, "type": "type_identifier", "text": "tagWSTRING", "parent": 80, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 25}}, {"id": 83, "type": "field_declaration", "text": "WCHAR *pszBuf;", "parent": 80, "children": [84, 85], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 15}}, {"id": 84, "type": "type_identifier", "text": "WCHAR", "parent": 83, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 6}}, {"id": 85, "type": "pointer_declarator", "text": "*pszBuf", "parent": 83, "children": [86, 87], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 14}}, {"id": 86, "type": "*", "text": "*", "parent": 85, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 8}}, {"id": 87, "type": "field_identifier", "text": "pszBuf", "parent": 85, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 14}}, {"id": 88, "type": "field_declaration", "text": "int nLen;", "parent": 80, "children": [89, 90], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 12}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 4}}, {"id": 90, "type": "field_identifier", "text": "nLen", "parent": 88, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 11}}, {"id": 91, "type": "type_identifier", "text": "WSTRING", "parent": 78, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 8}}, {"id": 92, "type": "function_definition", "text": "class CWStrArray : public CSArray<WSTRING> \r\n{\r\npublic:\r\n\tint AddString(const WCHAR *pszString,int nLen=-1);\r\n\tvoid RemoveAll();\r\n\tCWStrArray();\r\n\tvirtual ~CWStrArray();\r\n}", "parent": 0, "children": [93, 94], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 93, "type": "identifier", "text": "CWStrArray", "parent": 92, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 16}}, {"id": 94, "type": "ERROR", "text": ": public CSArray<WSTRING>", "parent": 92, "children": [95, 96, 97, 98], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 42}}, {"id": 95, "type": "identifier", "text": "CSArray", "parent": 94, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 33}}, {"id": 96, "type": "<", "text": "<", "parent": 94, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 34}}, {"id": 97, "type": "identifier", "text": "WSTRING", "parent": 94, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 41}}, {"id": 98, "type": ">", "text": ">", "parent": 94, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 42}}, {"id": 99, "type": "labeled_statement", "text": "public:\r\n\tint AddString(const WCHAR *pszString,int nLen=-1);", "parent": 92, "children": [100], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 51}}, {"id": 100, "type": "declaration", "text": "int AddString(const WCHAR *pszString,int nLen=-1);", "parent": 99, "children": [101, 102], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 51}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 4}}, {"id": 102, "type": "init_declarator", "text": "AddString(const WCHAR *pszString,int nLen=-1", "parent": 100, "children": [103, 114, 115], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 49}}, {"id": 103, "type": "function_declarator", "text": "AddString(const WCHAR *pszString,int nLen", "parent": 102, "children": [104, 105], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 46}}, {"id": 104, "type": "identifier", "text": "AddString", "parent": 103, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 14}}, {"id": 105, "type": "parameter_list", "text": "(const WCHAR *pszString,int nLen", "parent": 103, "children": [106, 111], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 46}}, {"id": 106, "type": "parameter_declaration", "text": "const WCHAR *pszString", "parent": 105, "children": [107, 108], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 37}}, {"id": 107, "type": "type_identifier", "text": "WCHAR", "parent": 106, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 26}}, {"id": 108, "type": "pointer_declarator", "text": "*pszString", "parent": 106, "children": [109, 110], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 37}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 28}}, {"id": 110, "type": "identifier", "text": "pszString", "parent": 108, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 37}}, {"id": 111, "type": "parameter_declaration", "text": "int nLen", "parent": 105, "children": [112, 113], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 46}}, {"id": 112, "type": "primitive_type", "text": "int", "parent": 111, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 41}}, {"id": 113, "type": "identifier", "text": "nLen", "parent": 111, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 46}}, {"id": 114, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 47}}, {"id": 115, "type": "number_literal", "text": "-1", "parent": 102, "children": [], "start_point": {"row": 36, "column": 47}, "end_point": {"row": 36, "column": 49}}, {"id": 116, "type": "declaration", "text": "void RemoveAll();", "parent": 92, "children": [117, 118], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 18}}, {"id": 117, "type": "primitive_type", "text": "void", "parent": 116, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 5}}, {"id": 118, "type": "function_declarator", "text": "RemoveAll()", "parent": 116, "children": [119, 120], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 17}}, {"id": 119, "type": "identifier", "text": "RemoveAll", "parent": 118, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 15}}, {"id": 120, "type": "parameter_list", "text": "()", "parent": 118, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 17}}, {"id": 121, "type": "call_expression", "text": "CWStrArray()", "parent": 92, "children": [122, 123], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 13}}, {"id": 122, "type": "identifier", "text": "CWStrArray", "parent": 121, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 11}}, {"id": 123, "type": "argument_list", "text": "()", "parent": 121, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 13}}, {"id": 124, "type": "declaration", "text": "virtual ~CWStrArray();", "parent": 92, "children": [125, 126, 128], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 23}}, {"id": 125, "type": "type_identifier", "text": "virtual", "parent": 124, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 8}}, {"id": 126, "type": "ERROR", "text": "~", "parent": 124, "children": [127], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 10}}, {"id": 127, "type": "~", "text": "~", "parent": 126, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 10}}, {"id": 128, "type": "function_declarator", "text": "CWStrArray()", "parent": 124, "children": [129, 130], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 22}}, {"id": 129, "type": "identifier", "text": "CWStrArray", "parent": 128, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 20}}, {"id": 130, "type": "parameter_list", "text": "()", "parent": 128, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 22}}, {"id": 131, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39, 50, 65, 75, 92, 103, 118, 128], "variables": [25, 30, 35, 47, 53, 58, 63, 71, 78, 83, 88, 100, 106, 111, 116, 124], "classes": [27, 28, 80, 81], "imports": [22, 23], "modules": [], "enums": []}, "statements": {"expressions": [2, 13, 68, 121], "assignments": [], "loops": [], "conditionals": [0, 1, 6, 10, 11, 12, 14, 21, 29, 34, 37, 38, 40, 42, 44, 51, 57, 60, 66, 69, 72, 76, 82, 84, 87, 90, 91, 93, 95, 97, 104, 107, 110, 113, 119, 122, 125, 129, 131], "returns": [], "exceptions": []}, "expressions": {"calls": [18], "literals": [16, 24, 62, 115], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "CStrArray", "text_snippet": "class CStrArray : public CSArray<STRING> \r\n{\r\npublic:\r\n\tint AddString(const char *pszString,int nLe"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "AddString(const char *pszString,int nLen"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "RemoveAll()"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "CStrArray()"}, {"node_id": 92, "universal_type": "function", "name": "CWStrArray", "text_snippet": "class CWStrArray : public CSArray<WSTRING> \r\n{\r\npublic:\r\n\tint AddString(const WCHAR *pszString,int "}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "AddString(const WCHAR *pszString,int nLen"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "RemoveAll()"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "CWStrArray()"}], "class_declarations": [{"node_id": 27, "universal_type": "class", "name": "tagSTRING", "text_snippet": "struct tagSTRING\r\n{\r\n\tchar *pszBuf;\r\n\tint nLen;\r\n}"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 80, "universal_type": "class", "name": "tagWSTRING", "text_snippet": "struct tagWSTRING\r\n{\r\n\tWCHAR *pszBuf;\r\n\tint nLen;\r\n}"}, {"node_id": 81, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 22, "text": "#include \"sarray.hpp\"\r\n"}, {"node_id": 23, "text": "#include"}]}, "original_source_code": "// StrArray.h: interface for the CStrArray class.\r\n//\r\n//////////////////////////////////////////////////////////////////////\r\n\r\n#if !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)\r\n#define AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n#include \"sarray.hpp\"\r\n\r\ntypedef struct tagSTRING\r\n{\r\n\tchar *pszBuf;\r\n\tint nLen;\r\n}STRING;\r\n\r\nclass CStrArray : public CSArray<STRING> \r\n{\r\npublic:\r\n\tint AddString(const char *pszString,int nLen=-1);\r\n\tvoid RemoveAll();\r\n\tCStrArray();\r\n\tvirtual ~CStrArray();\r\n};\r\n\r\ntypedef struct tagWSTRING\r\n{\r\n\tWCHAR *pszBuf;\r\n\tint nLen;\r\n}WSTRING;\r\n\r\nclass CWStrArray : public CSArray<WSTRING> \r\n{\r\npublic:\r\n\tint AddString(const WCHAR *pszString,int nLen=-1);\r\n\tvoid RemoveAll();\r\n\tCWStrArray();\r\n\tvirtual ~CWStrArray();\r\n};\r\n#endif // !defined(AFX_STRARRAY_H__9F745161_BBA5_4006_8CA4_3F201B316DED__INCLUDED_)\r\n"}
273
c
#ifndef CATEGORY_BANK_INCLUDED #define CATEGORY_BANK_INCLUDED #include "minorGems/util/SimpleVector.h" typedef struct CategoryRecord { // object ID of parent object int parentID; // true if this category is a pattern // means parendID is a real gameplay object, and that we add // extra transitions only if another pattern matches for // other elements of a transition char isPattern; // true if this category is a set of probability-weighted objects char isProbabilitySet; // child objects that are in this category // none of these should themselves be parent objects SimpleVector<int> objectIDSet; // for probability sets SimpleVector<float> objectWeights; } CategoryRecord; // backwards mapping typedef struct ReverseCategoryRecord { // child object ID int childID; // parent objects whose category this child object is in SimpleVector<int> categoryIDSet; } ReverseCategoryRecord; // loads from categories folder // returns number of categories that need to be loaded int initCategoryBankStart( char *outRebuildingCache ); // returns progress... ready for Finish when progress == 1.0 float initCategoryBankStep(); void initCategoryBankFinish(); void freeCategoryBank(); CategoryRecord *getCategory( int inParentID ); ReverseCategoryRecord *getReverseCategory( int inChildID ); void addCategoryToObject( int inObjectID, int inParentID ); void removeCategoryFromObject( int inObjectID, int inParentID ); void setCategoryIsPattern( int inParentID, char inIsPattern ); void setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet ); void removeObjectFromAllCategories( int inObjectID ); /** NOTE: These functions are currently not implemented in a useful way. They result in a change to RAM records only, and the result is not preserved on disk in the category folder. // move category up/down on object's category list (which categories object // is part of, and which take precedence) void moveCategoryUp( int inObjectID, int inParentID ); void moveCategoryDown( int inObjectID, int inParentID ); */ // move member object up/down in category's member list void moveCategoryMemberUp( int inParentID, int inObjectID ); void moveCategoryMemberDown( int inParentID, int inObjectID ); void setMemberWeight( int inParentID, int inObjectID, float inWeight ); // only works on prob sets void makeWeightUniform( int inParentID ); int getNumCategoriesForObject( int inObjectID ); // return -1 if index does not exist int getCategoryForObject( int inObjectID, int inCategoryIndex ); void deleteCategoryFromBank( int inID ); // used as either parent or child char isObjectUsedInCategories( int inObjectID ); int pickFromProbSet( int inParentID ); char isProbabilitySet( int inParentID ); #endif
33.42
85
(translation_unit) "#ifndef CATEGORY_BANK_INCLUDED\n#define CATEGORY_BANK_INCLUDED\n\n#include "minorGems/util/SimpleVector.h"\n\n\ntypedef struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n } CategoryRecord;\n\n\n\n// backwards mapping\ntypedef struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n } ReverseCategoryRecord;\n\n\n\n// loads from categories folder\n// returns number of categories that need to be loaded\nint initCategoryBankStart( char *outRebuildingCache );\n\n// returns progress... ready for Finish when progress == 1.0\nfloat initCategoryBankStep();\nvoid initCategoryBankFinish();\n\n\nvoid freeCategoryBank();\n\n\nCategoryRecord *getCategory( int inParentID );\nReverseCategoryRecord *getReverseCategory( int inChildID );\n\n\nvoid addCategoryToObject( int inObjectID, int inParentID );\n\nvoid removeCategoryFromObject( int inObjectID, int inParentID );\n\n\nvoid setCategoryIsPattern( int inParentID, char inIsPattern );\nvoid setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet );\n\n\n\nvoid removeObjectFromAllCategories( int inObjectID );\n\n/**\nNOTE:\nThese functions are currently not implemented in a useful way.\nThey result in a change to RAM records only, and the result is not\npreserved on disk in the category folder.\n\n// move category up/down on object's category list (which categories object\n// is part of, and which take precedence)\nvoid moveCategoryUp( int inObjectID, int inParentID );\nvoid moveCategoryDown( int inObjectID, int inParentID );\n*/\n\n// move member object up/down in category's member list\nvoid moveCategoryMemberUp( int inParentID, int inObjectID );\nvoid moveCategoryMemberDown( int inParentID, int inObjectID );\n\nvoid setMemberWeight( int inParentID, int inObjectID, float inWeight );\n\n// only works on prob sets\nvoid makeWeightUniform( int inParentID );\n\n\n\nint getNumCategoriesForObject( int inObjectID );\n\n// return -1 if index does not exist\nint getCategoryForObject( int inObjectID, int inCategoryIndex );\n\n\n\nvoid deleteCategoryFromBank( int inID );\n\n\n// used as either parent or child\nchar isObjectUsedInCategories( int inObjectID );\n\n\n\nint pickFromProbSet( int inParentID );\n\n\nchar isProbabilitySet( int inParentID );\n\n\n#endif\n" (preproc_ifdef) "#ifndef CATEGORY_BANK_INCLUDED\n#define CATEGORY_BANK_INCLUDED\n\n#include "minorGems/util/SimpleVector.h"\n\n\ntypedef struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n } CategoryRecord;\n\n\n\n// backwards mapping\ntypedef struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n } ReverseCategoryRecord;\n\n\n\n// loads from categories folder\n// returns number of categories that need to be loaded\nint initCategoryBankStart( char *outRebuildingCache );\n\n// returns progress... ready for Finish when progress == 1.0\nfloat initCategoryBankStep();\nvoid initCategoryBankFinish();\n\n\nvoid freeCategoryBank();\n\n\nCategoryRecord *getCategory( int inParentID );\nReverseCategoryRecord *getReverseCategory( int inChildID );\n\n\nvoid addCategoryToObject( int inObjectID, int inParentID );\n\nvoid removeCategoryFromObject( int inObjectID, int inParentID );\n\n\nvoid setCategoryIsPattern( int inParentID, char inIsPattern );\nvoid setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet );\n\n\n\nvoid removeObjectFromAllCategories( int inObjectID );\n\n/**\nNOTE:\nThese functions are currently not implemented in a useful way.\nThey result in a change to RAM records only, and the result is not\npreserved on disk in the category folder.\n\n// move category up/down on object's category list (which categories object\n// is part of, and which take precedence)\nvoid moveCategoryUp( int inObjectID, int inParentID );\nvoid moveCategoryDown( int inObjectID, int inParentID );\n*/\n\n// move member object up/down in category's member list\nvoid moveCategoryMemberUp( int inParentID, int inObjectID );\nvoid moveCategoryMemberDown( int inParentID, int inObjectID );\n\nvoid setMemberWeight( int inParentID, int inObjectID, float inWeight );\n\n// only works on prob sets\nvoid makeWeightUniform( int inParentID );\n\n\n\nint getNumCategoriesForObject( int inObjectID );\n\n// return -1 if index does not exist\nint getCategoryForObject( int inObjectID, int inCategoryIndex );\n\n\n\nvoid deleteCategoryFromBank( int inID );\n\n\n// used as either parent or child\nchar isObjectUsedInCategories( int inObjectID );\n\n\n\nint pickFromProbSet( int inParentID );\n\n\nchar isProbabilitySet( int inParentID );\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "CATEGORY_BANK_INCLUDED" (preproc_def) "#define CATEGORY_BANK_INCLUDED\n" (#define) "#define" (identifier) "CATEGORY_BANK_INCLUDED" (preproc_include) "#include "minorGems/util/SimpleVector.h"\n" (#include) "#include" (string_literal) ""minorGems/util/SimpleVector.h"" (") """ (string_content) "minorGems/util/SimpleVector.h" (") """ (type_definition) "typedef struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n } CategoryRecord;" (typedef) "typedef" (struct_specifier) "struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n }" (struct) "struct" (type_identifier) "CategoryRecord" (field_declaration_list) "{\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n }" ({) "{" (comment) "// object ID of parent object" (field_declaration) "int parentID;" (primitive_type) "int" (field_identifier) "parentID" (;) ";" (comment) "// true if this category is a pattern" (comment) "// means parendID is a real gameplay object, and that we add" (comment) "// extra transitions only if another pattern matches for" (comment) "// other elements of a transition" (field_declaration) "char isPattern;" (primitive_type) "char" (field_identifier) "isPattern" (;) ";" (comment) "// true if this category is a set of probability-weighted objects" (field_declaration) "char isProbabilitySet;" (primitive_type) "char" (field_identifier) "isProbabilitySet" (;) ";" (comment) "// child objects that are in this category" (comment) "// none of these should themselves be parent objects" (field_declaration) "SimpleVector<int> objectIDSet;" (type_identifier) "SimpleVector" (ERROR) "<int>" (<) "<" (primitive_type) "int" (>) ">" (field_identifier) "objectIDSet" (;) ";" (comment) "// for probability sets" (field_declaration) "SimpleVector<float> objectWeights;" (type_identifier) "SimpleVector" (ERROR) "<float>" (<) "<" (primitive_type) "float" (>) ">" (field_identifier) "objectWeights" (;) ";" (}) "}" (type_identifier) "CategoryRecord" (;) ";" (comment) "// backwards mapping" (type_definition) "typedef struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n } ReverseCategoryRecord;" (typedef) "typedef" (struct_specifier) "struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n }" (struct) "struct" (type_identifier) "ReverseCategoryRecord" (field_declaration_list) "{\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n }" ({) "{" (comment) "// child object ID" (field_declaration) "int childID;" (primitive_type) "int" (field_identifier) "childID" (;) ";" (comment) "// parent objects whose category this child object is in" (field_declaration) "SimpleVector<int> categoryIDSet;" (type_identifier) "SimpleVector" (ERROR) "<int>" (<) "<" (primitive_type) "int" (>) ">" (field_identifier) "categoryIDSet" (;) ";" (}) "}" (type_identifier) "ReverseCategoryRecord" (;) ";" (comment) "// loads from categories folder" (comment) "// returns number of categories that need to be loaded" (declaration) "int initCategoryBankStart( char *outRebuildingCache );" (primitive_type) "int" (function_declarator) "initCategoryBankStart( char *outRebuildingCache )" (identifier) "initCategoryBankStart" (parameter_list) "( char *outRebuildingCache )" (() "(" (parameter_declaration) "char *outRebuildingCache" (primitive_type) "char" (pointer_declarator) "*outRebuildingCache" (*) "*" (identifier) "outRebuildingCache" ()) ")" (;) ";" (comment) "// returns progress... ready for Finish when progress == 1.0" (declaration) "float initCategoryBankStep();" (primitive_type) "float" (function_declarator) "initCategoryBankStep()" (identifier) "initCategoryBankStep" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void initCategoryBankFinish();" (primitive_type) "void" (function_declarator) "initCategoryBankFinish()" (identifier) "initCategoryBankFinish" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void freeCategoryBank();" (primitive_type) "void" (function_declarator) "freeCategoryBank()" (identifier) "freeCategoryBank" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CategoryRecord *getCategory( int inParentID );" (type_identifier) "CategoryRecord" (pointer_declarator) "*getCategory( int inParentID )" (*) "*" (function_declarator) "getCategory( int inParentID )" (identifier) "getCategory" (parameter_list) "( int inParentID )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" ()) ")" (;) ";" (declaration) "ReverseCategoryRecord *getReverseCategory( int inChildID );" (type_identifier) "ReverseCategoryRecord" (pointer_declarator) "*getReverseCategory( int inChildID )" (*) "*" (function_declarator) "getReverseCategory( int inChildID )" (identifier) "getReverseCategory" (parameter_list) "( int inChildID )" (() "(" (parameter_declaration) "int inChildID" (primitive_type) "int" (identifier) "inChildID" ()) ")" (;) ";" (declaration) "void addCategoryToObject( int inObjectID, int inParentID );" (primitive_type) "void" (function_declarator) "addCategoryToObject( int inObjectID, int inParentID )" (identifier) "addCategoryToObject" (parameter_list) "( int inObjectID, int inParentID )" (() "(" (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" (,) "," (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" ()) ")" (;) ";" (declaration) "void removeCategoryFromObject( int inObjectID, int inParentID );" (primitive_type) "void" (function_declarator) "removeCategoryFromObject( int inObjectID, int inParentID )" (identifier) "removeCategoryFromObject" (parameter_list) "( int inObjectID, int inParentID )" (() "(" (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" (,) "," (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" ()) ")" (;) ";" (declaration) "void setCategoryIsPattern( int inParentID, char inIsPattern );" (primitive_type) "void" (function_declarator) "setCategoryIsPattern( int inParentID, char inIsPattern )" (identifier) "setCategoryIsPattern" (parameter_list) "( int inParentID, char inIsPattern )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" (,) "," (parameter_declaration) "char inIsPattern" (primitive_type) "char" (identifier) "inIsPattern" ()) ")" (;) ";" (declaration) "void setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet );" (primitive_type) "void" (function_declarator) "setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet )" (identifier) "setCategoryIsProbabilitySet" (parameter_list) "( int inParentID, char inIsProbabilitySet )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" (,) "," (parameter_declaration) "char inIsProbabilitySet" (primitive_type) "char" (identifier) "inIsProbabilitySet" ()) ")" (;) ";" (declaration) "void removeObjectFromAllCategories( int inObjectID );" (primitive_type) "void" (function_declarator) "removeObjectFromAllCategories( int inObjectID )" (identifier) "removeObjectFromAllCategories" (parameter_list) "( int inObjectID )" (() "(" (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" ()) ")" (;) ";" (comment) "/**\nNOTE:\nThese functions are currently not implemented in a useful way.\nThey result in a change to RAM records only, and the result is not\npreserved on disk in the category folder.\n\n// move category up/down on object's category list (which categories object\n// is part of, and which take precedence)\nvoid moveCategoryUp( int inObjectID, int inParentID );\nvoid moveCategoryDown( int inObjectID, int inParentID );\n*/" (comment) "// move member object up/down in category's member list" (declaration) "void moveCategoryMemberUp( int inParentID, int inObjectID );" (primitive_type) "void" (function_declarator) "moveCategoryMemberUp( int inParentID, int inObjectID )" (identifier) "moveCategoryMemberUp" (parameter_list) "( int inParentID, int inObjectID )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" (,) "," (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" ()) ")" (;) ";" (declaration) "void moveCategoryMemberDown( int inParentID, int inObjectID );" (primitive_type) "void" (function_declarator) "moveCategoryMemberDown( int inParentID, int inObjectID )" (identifier) "moveCategoryMemberDown" (parameter_list) "( int inParentID, int inObjectID )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" (,) "," (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" ()) ")" (;) ";" (declaration) "void setMemberWeight( int inParentID, int inObjectID, float inWeight );" (primitive_type) "void" (function_declarator) "setMemberWeight( int inParentID, int inObjectID, float inWeight )" (identifier) "setMemberWeight" (parameter_list) "( int inParentID, int inObjectID, float inWeight )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" (,) "," (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" (,) "," (parameter_declaration) "float inWeight" (primitive_type) "float" (identifier) "inWeight" ()) ")" (;) ";" (comment) "// only works on prob sets" (declaration) "void makeWeightUniform( int inParentID );" (primitive_type) "void" (function_declarator) "makeWeightUniform( int inParentID )" (identifier) "makeWeightUniform" (parameter_list) "( int inParentID )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" ()) ")" (;) ";" (declaration) "int getNumCategoriesForObject( int inObjectID );" (primitive_type) "int" (function_declarator) "getNumCategoriesForObject( int inObjectID )" (identifier) "getNumCategoriesForObject" (parameter_list) "( int inObjectID )" (() "(" (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" ()) ")" (;) ";" (comment) "// return -1 if index does not exist" (declaration) "int getCategoryForObject( int inObjectID, int inCategoryIndex );" (primitive_type) "int" (function_declarator) "getCategoryForObject( int inObjectID, int inCategoryIndex )" (identifier) "getCategoryForObject" (parameter_list) "( int inObjectID, int inCategoryIndex )" (() "(" (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" (,) "," (parameter_declaration) "int inCategoryIndex" (primitive_type) "int" (identifier) "inCategoryIndex" ()) ")" (;) ";" (declaration) "void deleteCategoryFromBank( int inID );" (primitive_type) "void" (function_declarator) "deleteCategoryFromBank( int inID )" (identifier) "deleteCategoryFromBank" (parameter_list) "( int inID )" (() "(" (parameter_declaration) "int inID" (primitive_type) "int" (identifier) "inID" ()) ")" (;) ";" (comment) "// used as either parent or child" (declaration) "char isObjectUsedInCategories( int inObjectID );" (primitive_type) "char" (function_declarator) "isObjectUsedInCategories( int inObjectID )" (identifier) "isObjectUsedInCategories" (parameter_list) "( int inObjectID )" (() "(" (parameter_declaration) "int inObjectID" (primitive_type) "int" (identifier) "inObjectID" ()) ")" (;) ";" (declaration) "int pickFromProbSet( int inParentID );" (primitive_type) "int" (function_declarator) "pickFromProbSet( int inParentID )" (identifier) "pickFromProbSet" (parameter_list) "( int inParentID )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" ()) ")" (;) ";" (declaration) "char isProbabilitySet( int inParentID );" (primitive_type) "char" (function_declarator) "isProbabilitySet( int inParentID )" (identifier) "isProbabilitySet" (parameter_list) "( int inParentID )" (() "(" (parameter_declaration) "int inParentID" (primitive_type) "int" (identifier) "inParentID" ()) ")" (;) ";" (#endif) "#endif"
358
3
{"language": "c", "success": true, "metadata": {"lines": 85, "avg_line_length": 33.42, "nodes": 247, "errors": 0, "source_hash": "454ddaee1770c129bbbe6b694fa7501ad760bad3bd169864899496cae0fd4ccb", "categorized_nodes": 154}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CATEGORY_BANK_INCLUDED\n#define CATEGORY_BANK_INCLUDED\n\n#include \"minorGems/util/SimpleVector.h\"\n\n\ntypedef struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n } CategoryRecord;\n\n\n\n// backwards mapping\ntypedef struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n } ReverseCategoryRecord;\n\n\n\n// loads from categories folder\n// returns number of categories that need to be loaded\nint initCategoryBankStart( char *outRebuildingCache );\n\n// returns progress... ready for Finish when progress == 1.0\nfloat initCategoryBankStep();\nvoid initCategoryBankFinish();\n\n\nvoid freeCategoryBank();\n\n\nCategoryRecord *getCategory( int inParentID );\nReverseCategoryRecord *getReverseCategory( int inChildID );\n\n\nvoid addCategoryToObject( int inObjectID, int inParentID );\n\nvoid removeCategoryFromObject( int inObjectID, int inParentID );\n\n\nvoid setCategoryIsPattern( int inParentID, char inIsPattern );\nvoid setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet );\n\n\n\nvoid removeObjectFromAllCategories( int inObjectID );\n\n/**\nNOTE:\nThese functions are currently not implemented in a useful way.\nThey result in a change to RAM records only, and the result is not\npreserved on disk in the category folder.\n\n// move category up/down on object's category list (which categories object\n// is part of, and which take precedence)\nvoid moveCategoryUp( int inObjectID, int inParentID );\nvoid moveCategoryDown( int inObjectID, int inParentID );\n*/\n\n// move member object up/down in category's member list\nvoid moveCategoryMemberUp( int inParentID, int inObjectID );\nvoid moveCategoryMemberDown( int inParentID, int inObjectID );\n\nvoid setMemberWeight( int inParentID, int inObjectID, float inWeight );\n\n// only works on prob sets\nvoid makeWeightUniform( int inParentID );\n\n\n\nint getNumCategoriesForObject( int inObjectID );\n\n// return -1 if index does not exist\nint getCategoryForObject( int inObjectID, int inCategoryIndex );\n\n\n\nvoid deleteCategoryFromBank( int inID );\n\n\n// used as either parent or child\nchar isObjectUsedInCategories( int inObjectID );\n\n\n\nint pickFromProbSet( int inParentID );\n\n\nchar isProbabilitySet( int inParentID );\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 38, 54, 64, 69, 74, 79, 89, 99, 110, 121, 132, 143, 151, 162, 173, 187, 195, 203, 214, 222, 230, 238, 246], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 114, "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": "CATEGORY_BANK_INCLUDED", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 30}}, {"id": 3, "type": "preproc_def", "text": "#define CATEGORY_BANK_INCLUDED\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": "CATEGORY_BANK_INCLUDED", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 30}}, {"id": 6, "type": "preproc_include", "text": "#include \"minorGems/util/SimpleVector.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": "\"minorGems/util/SimpleVector.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 40}}, {"id": 9, "type": "type_definition", "text": "typedef struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n } CategoryRecord;", "parent": 0, "children": [10, 11, 37], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 26, "column": 21}}, {"id": 10, "type": "typedef", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 11, "type": "struct_specifier", "text": "struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n }", "parent": 9, "children": [12, 13], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 26, "column": 5}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 14}}, {"id": 13, "type": "type_identifier", "text": "CategoryRecord", "parent": 11, "children": [], "start_point": {"row": 6, "column": 15}, "end_point": {"row": 6, "column": 29}}, {"id": 14, "type": "field_declaration", "text": "int parentID;", "parent": 11, "children": [15, 16], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 21}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 11}}, {"id": 16, "type": "field_identifier", "text": "parentID", "parent": 14, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 20}}, {"id": 17, "type": "field_declaration", "text": "char isPattern;", "parent": 11, "children": [18, 19], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 23}}, {"id": 18, "type": "primitive_type", "text": "char", "parent": 17, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 12}}, {"id": 19, "type": "field_identifier", "text": "isPattern", "parent": 17, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 22}}, {"id": 20, "type": "field_declaration", "text": "char isProbabilitySet;", "parent": 11, "children": [21, 22], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 30}}, {"id": 21, "type": "primitive_type", "text": "char", "parent": 20, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 12}}, {"id": 22, "type": "field_identifier", "text": "isProbabilitySet", "parent": 20, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 29}}, {"id": 23, "type": "field_declaration", "text": "SimpleVector<int> objectIDSet;", "parent": 11, "children": [24, 25, 29], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 38}}, {"id": 24, "type": "type_identifier", "text": "SimpleVector", "parent": 23, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 20}}, {"id": 25, "type": "ERROR", "text": "<int>", "parent": 23, "children": [26, 27, 28], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 25}}, {"id": 26, "type": "<", "text": "<", "parent": 25, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 21}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 24}}, {"id": 28, "type": ">", "text": ">", "parent": 25, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 29, "type": "field_identifier", "text": "objectIDSet", "parent": 23, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 37}}, {"id": 30, "type": "field_declaration", "text": "SimpleVector<float> objectWeights;", "parent": 11, "children": [31, 32, 36], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 42}}, {"id": 31, "type": "type_identifier", "text": "SimpleVector", "parent": 30, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 20}}, {"id": 32, "type": "ERROR", "text": "<float>", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 27}}, {"id": 33, "type": "<", "text": "<", "parent": 32, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 21}}, {"id": 34, "type": "primitive_type", "text": "float", "parent": 32, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 26}}, {"id": 35, "type": ">", "text": ">", "parent": 32, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 27}}, {"id": 36, "type": "field_identifier", "text": "objectWeights", "parent": 30, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 41}}, {"id": 37, "type": "type_identifier", "text": "CategoryRecord", "parent": 9, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 20}}, {"id": 38, "type": "type_definition", "text": "typedef struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n } ReverseCategoryRecord;", "parent": 0, "children": [39, 40, 53], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 38, "column": 28}}, {"id": 39, "type": "typedef", "text": "typedef", "parent": 38, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 40, "type": "struct_specifier", "text": "struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n }", "parent": 38, "children": [41, 42], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 38, "column": 5}}, {"id": 41, "type": "struct", "text": "struct", "parent": 40, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 14}}, {"id": 42, "type": "type_identifier", "text": "ReverseCategoryRecord", "parent": 40, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 36}}, {"id": 43, "type": "field_declaration", "text": "int childID;", "parent": 40, "children": [44, 45], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 20}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 45, "type": "field_identifier", "text": "childID", "parent": 43, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 19}}, {"id": 46, "type": "field_declaration", "text": "SimpleVector<int> categoryIDSet;", "parent": 40, "children": [47, 48, 52], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 40}}, {"id": 47, "type": "type_identifier", "text": "SimpleVector", "parent": 46, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 20}}, {"id": 48, "type": "ERROR", "text": "<int>", "parent": 46, "children": [49, 50, 51], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 25}}, {"id": 49, "type": "<", "text": "<", "parent": 48, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 21}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 48, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 24}}, {"id": 51, "type": ">", "text": ">", "parent": 48, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 25}}, {"id": 52, "type": "field_identifier", "text": "categoryIDSet", "parent": 46, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 39}}, {"id": 53, "type": "type_identifier", "text": "ReverseCategoryRecord", "parent": 38, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 27}}, {"id": 54, "type": "declaration", "text": "int initCategoryBankStart( char *outRebuildingCache );", "parent": 0, "children": [55, 56], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 54}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 3}}, {"id": 56, "type": "function_declarator", "text": "initCategoryBankStart( char *outRebuildingCache )", "parent": 54, "children": [57, 58], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 53}}, {"id": 57, "type": "identifier", "text": "initCategoryBankStart", "parent": 56, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 25}}, {"id": 58, "type": "parameter_list", "text": "( char *outRebuildingCache )", "parent": 56, "children": [59], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 53}}, {"id": 59, "type": "parameter_declaration", "text": "char *outRebuildingCache", "parent": 58, "children": [60, 61], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 51}}, {"id": 60, "type": "primitive_type", "text": "char", "parent": 59, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 31}}, {"id": 61, "type": "pointer_declarator", "text": "*outRebuildingCache", "parent": 59, "children": [62, 63], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 51}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 33}}, {"id": 63, "type": "identifier", "text": "outRebuildingCache", "parent": 61, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 51}}, {"id": 64, "type": "declaration", "text": "float initCategoryBankStep();", "parent": 0, "children": [65, 66], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 29}}, {"id": 65, "type": "primitive_type", "text": "float", "parent": 64, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 5}}, {"id": 66, "type": "function_declarator", "text": "initCategoryBankStep()", "parent": 64, "children": [67, 68], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 28}}, {"id": 67, "type": "identifier", "text": "initCategoryBankStep", "parent": 66, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 26}}, {"id": 68, "type": "parameter_list", "text": "()", "parent": 66, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 28}}, {"id": 69, "type": "declaration", "text": "void initCategoryBankFinish();", "parent": 0, "children": [70, 71], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 30}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 4}}, {"id": 71, "type": "function_declarator", "text": "initCategoryBankFinish()", "parent": 69, "children": [72, 73], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 29}}, {"id": 72, "type": "identifier", "text": "initCategoryBankFinish", "parent": 71, "children": [], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 27}}, {"id": 73, "type": "parameter_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 29}}, {"id": 74, "type": "declaration", "text": "void freeCategoryBank();", "parent": 0, "children": [75, 76], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 24}}, {"id": 75, "type": "primitive_type", "text": "void", "parent": 74, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 4}}, {"id": 76, "type": "function_declarator", "text": "freeCategoryBank()", "parent": 74, "children": [77, 78], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 23}}, {"id": 77, "type": "identifier", "text": "freeCategoryBank", "parent": 76, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 21}}, {"id": 78, "type": "parameter_list", "text": "()", "parent": 76, "children": [], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 23}}, {"id": 79, "type": "declaration", "text": "CategoryRecord *getCategory( int inParentID );", "parent": 0, "children": [80, 81], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 46}}, {"id": 80, "type": "type_identifier", "text": "CategoryRecord", "parent": 79, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 14}}, {"id": 81, "type": "pointer_declarator", "text": "*getCategory( int inParentID )", "parent": 79, "children": [82, 83], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 45}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 16}}, {"id": 83, "type": "function_declarator", "text": "getCategory( int inParentID )", "parent": 81, "children": [84, 85], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 45}}, {"id": 84, "type": "identifier", "text": "getCategory", "parent": 83, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 27}}, {"id": 85, "type": "parameter_list", "text": "( int inParentID )", "parent": 83, "children": [86], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 45}}, {"id": 86, "type": "parameter_declaration", "text": "int inParentID", "parent": 85, "children": [87, 88], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 43}}, {"id": 87, "type": "primitive_type", "text": "int", "parent": 86, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 32}}, {"id": 88, "type": "identifier", "text": "inParentID", "parent": 86, "children": [], "start_point": {"row": 54, "column": 33}, "end_point": {"row": 54, "column": 43}}, {"id": 89, "type": "declaration", "text": "ReverseCategoryRecord *getReverseCategory( int inChildID );", "parent": 0, "children": [90, 91], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 59}}, {"id": 90, "type": "type_identifier", "text": "ReverseCategoryRecord", "parent": 89, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 21}}, {"id": 91, "type": "pointer_declarator", "text": "*getReverseCategory( int inChildID )", "parent": 89, "children": [92, 93], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 58}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 93, "type": "function_declarator", "text": "getReverseCategory( int inChildID )", "parent": 91, "children": [94, 95], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 58}}, {"id": 94, "type": "identifier", "text": "getReverseCategory", "parent": 93, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 41}}, {"id": 95, "type": "parameter_list", "text": "( int inChildID )", "parent": 93, "children": [96], "start_point": {"row": 55, "column": 41}, "end_point": {"row": 55, "column": 58}}, {"id": 96, "type": "parameter_declaration", "text": "int inChildID", "parent": 95, "children": [97, 98], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 56}}, {"id": 97, "type": "primitive_type", "text": "int", "parent": 96, "children": [], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 46}}, {"id": 98, "type": "identifier", "text": "inChildID", "parent": 96, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 56}}, {"id": 99, "type": "declaration", "text": "void addCategoryToObject( int inObjectID, int inParentID );", "parent": 0, "children": [100, 101], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 59}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 4}}, {"id": 101, "type": "function_declarator", "text": "addCategoryToObject( int inObjectID, int inParentID )", "parent": 99, "children": [102, 103], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 58}}, {"id": 102, "type": "identifier", "text": "addCategoryToObject", "parent": 101, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 24}}, {"id": 103, "type": "parameter_list", "text": "( int inObjectID, int inParentID )", "parent": 101, "children": [104, 107], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 58}}, {"id": 104, "type": "parameter_declaration", "text": "int inObjectID", "parent": 103, "children": [105, 106], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 40}}, {"id": 105, "type": "primitive_type", "text": "int", "parent": 104, "children": [], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 29}}, {"id": 106, "type": "identifier", "text": "inObjectID", "parent": 104, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 40}}, {"id": 107, "type": "parameter_declaration", "text": "int inParentID", "parent": 103, "children": [108, 109], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 56}}, {"id": 108, "type": "primitive_type", "text": "int", "parent": 107, "children": [], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 45}}, {"id": 109, "type": "identifier", "text": "inParentID", "parent": 107, "children": [], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 56}}, {"id": 110, "type": "declaration", "text": "void removeCategoryFromObject( int inObjectID, int inParentID );", "parent": 0, "children": [111, 112], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 64}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 4}}, {"id": 112, "type": "function_declarator", "text": "removeCategoryFromObject( int inObjectID, int inParentID )", "parent": 110, "children": [113, 114], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 63}}, {"id": 113, "type": "identifier", "text": "removeCategoryFromObject", "parent": 112, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 29}}, {"id": 114, "type": "parameter_list", "text": "( int inObjectID, int inParentID )", "parent": 112, "children": [115, 118], "start_point": {"row": 60, "column": 29}, "end_point": {"row": 60, "column": 63}}, {"id": 115, "type": "parameter_declaration", "text": "int inObjectID", "parent": 114, "children": [116, 117], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 45}}, {"id": 116, "type": "primitive_type", "text": "int", "parent": 115, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 34}}, {"id": 117, "type": "identifier", "text": "inObjectID", "parent": 115, "children": [], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 45}}, {"id": 118, "type": "parameter_declaration", "text": "int inParentID", "parent": 114, "children": [119, 120], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 60, "column": 61}}, {"id": 119, "type": "primitive_type", "text": "int", "parent": 118, "children": [], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 60, "column": 50}}, {"id": 120, "type": "identifier", "text": "inParentID", "parent": 118, "children": [], "start_point": {"row": 60, "column": 51}, "end_point": {"row": 60, "column": 61}}, {"id": 121, "type": "declaration", "text": "void setCategoryIsPattern( int inParentID, char inIsPattern );", "parent": 0, "children": [122, 123], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 62}}, {"id": 122, "type": "primitive_type", "text": "void", "parent": 121, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 4}}, {"id": 123, "type": "function_declarator", "text": "setCategoryIsPattern( int inParentID, char inIsPattern )", "parent": 121, "children": [124, 125], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 61}}, {"id": 124, "type": "identifier", "text": "setCategoryIsPattern", "parent": 123, "children": [], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 25}}, {"id": 125, "type": "parameter_list", "text": "( int inParentID, char inIsPattern )", "parent": 123, "children": [126, 129], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 61}}, {"id": 126, "type": "parameter_declaration", "text": "int inParentID", "parent": 125, "children": [127, 128], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 41}}, {"id": 127, "type": "primitive_type", "text": "int", "parent": 126, "children": [], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 30}}, {"id": 128, "type": "identifier", "text": "inParentID", "parent": 126, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 41}}, {"id": 129, "type": "parameter_declaration", "text": "char inIsPattern", "parent": 125, "children": [130, 131], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 59}}, {"id": 130, "type": "primitive_type", "text": "char", "parent": 129, "children": [], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 47}}, {"id": 131, "type": "identifier", "text": "inIsPattern", "parent": 129, "children": [], "start_point": {"row": 63, "column": 48}, "end_point": {"row": 63, "column": 59}}, {"id": 132, "type": "declaration", "text": "void setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet );", "parent": 0, "children": [133, 134], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 76}}, {"id": 133, "type": "primitive_type", "text": "void", "parent": 132, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 4}}, {"id": 134, "type": "function_declarator", "text": "setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet )", "parent": 132, "children": [135, 136], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 75}}, {"id": 135, "type": "identifier", "text": "setCategoryIsProbabilitySet", "parent": 134, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 32}}, {"id": 136, "type": "parameter_list", "text": "( int inParentID, char inIsProbabilitySet )", "parent": 134, "children": [137, 140], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 64, "column": 75}}, {"id": 137, "type": "parameter_declaration", "text": "int inParentID", "parent": 136, "children": [138, 139], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 48}}, {"id": 138, "type": "primitive_type", "text": "int", "parent": 137, "children": [], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 37}}, {"id": 139, "type": "identifier", "text": "inParentID", "parent": 137, "children": [], "start_point": {"row": 64, "column": 38}, "end_point": {"row": 64, "column": 48}}, {"id": 140, "type": "parameter_declaration", "text": "char inIsProbabilitySet", "parent": 136, "children": [141, 142], "start_point": {"row": 64, "column": 50}, "end_point": {"row": 64, "column": 73}}, {"id": 141, "type": "primitive_type", "text": "char", "parent": 140, "children": [], "start_point": {"row": 64, "column": 50}, "end_point": {"row": 64, "column": 54}}, {"id": 142, "type": "identifier", "text": "inIsProbabilitySet", "parent": 140, "children": [], "start_point": {"row": 64, "column": 55}, "end_point": {"row": 64, "column": 73}}, {"id": 143, "type": "declaration", "text": "void removeObjectFromAllCategories( int inObjectID );", "parent": 0, "children": [144, 145], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 53}}, {"id": 144, "type": "primitive_type", "text": "void", "parent": 143, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 4}}, {"id": 145, "type": "function_declarator", "text": "removeObjectFromAllCategories( int inObjectID )", "parent": 143, "children": [146, 147], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 52}}, {"id": 146, "type": "identifier", "text": "removeObjectFromAllCategories", "parent": 145, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 34}}, {"id": 147, "type": "parameter_list", "text": "( int inObjectID )", "parent": 145, "children": [148], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 52}}, {"id": 148, "type": "parameter_declaration", "text": "int inObjectID", "parent": 147, "children": [149, 150], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 50}}, {"id": 149, "type": "primitive_type", "text": "int", "parent": 148, "children": [], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 39}}, {"id": 150, "type": "identifier", "text": "inObjectID", "parent": 148, "children": [], "start_point": {"row": 68, "column": 40}, "end_point": {"row": 68, "column": 50}}, {"id": 151, "type": "declaration", "text": "void moveCategoryMemberUp( int inParentID, int inObjectID );", "parent": 0, "children": [152, 153], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 60}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 4}}, {"id": 153, "type": "function_declarator", "text": "moveCategoryMemberUp( int inParentID, int inObjectID )", "parent": 151, "children": [154, 155], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 59}}, {"id": 154, "type": "identifier", "text": "moveCategoryMemberUp", "parent": 153, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 25}}, {"id": 155, "type": "parameter_list", "text": "( int inParentID, int inObjectID )", "parent": 153, "children": [156, 159], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 59}}, {"id": 156, "type": "parameter_declaration", "text": "int inParentID", "parent": 155, "children": [157, 158], "start_point": {"row": 83, "column": 27}, "end_point": {"row": 83, "column": 41}}, {"id": 157, "type": "primitive_type", "text": "int", "parent": 156, "children": [], "start_point": {"row": 83, "column": 27}, "end_point": {"row": 83, "column": 30}}, {"id": 158, "type": "identifier", "text": "inParentID", "parent": 156, "children": [], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 41}}, {"id": 159, "type": "parameter_declaration", "text": "int inObjectID", "parent": 155, "children": [160, 161], "start_point": {"row": 83, "column": 43}, "end_point": {"row": 83, "column": 57}}, {"id": 160, "type": "primitive_type", "text": "int", "parent": 159, "children": [], "start_point": {"row": 83, "column": 43}, "end_point": {"row": 83, "column": 46}}, {"id": 161, "type": "identifier", "text": "inObjectID", "parent": 159, "children": [], "start_point": {"row": 83, "column": 47}, "end_point": {"row": 83, "column": 57}}, {"id": 162, "type": "declaration", "text": "void moveCategoryMemberDown( int inParentID, int inObjectID );", "parent": 0, "children": [163, 164], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 62}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 4}}, {"id": 164, "type": "function_declarator", "text": "moveCategoryMemberDown( int inParentID, int inObjectID )", "parent": 162, "children": [165, 166], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 61}}, {"id": 165, "type": "identifier", "text": "moveCategoryMemberDown", "parent": 164, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 27}}, {"id": 166, "type": "parameter_list", "text": "( int inParentID, int inObjectID )", "parent": 164, "children": [167, 170], "start_point": {"row": 84, "column": 27}, "end_point": {"row": 84, "column": 61}}, {"id": 167, "type": "parameter_declaration", "text": "int inParentID", "parent": 166, "children": [168, 169], "start_point": {"row": 84, "column": 29}, "end_point": {"row": 84, "column": 43}}, {"id": 168, "type": "primitive_type", "text": "int", "parent": 167, "children": [], "start_point": {"row": 84, "column": 29}, "end_point": {"row": 84, "column": 32}}, {"id": 169, "type": "identifier", "text": "inParentID", "parent": 167, "children": [], "start_point": {"row": 84, "column": 33}, "end_point": {"row": 84, "column": 43}}, {"id": 170, "type": "parameter_declaration", "text": "int inObjectID", "parent": 166, "children": [171, 172], "start_point": {"row": 84, "column": 45}, "end_point": {"row": 84, "column": 59}}, {"id": 171, "type": "primitive_type", "text": "int", "parent": 170, "children": [], "start_point": {"row": 84, "column": 45}, "end_point": {"row": 84, "column": 48}}, {"id": 172, "type": "identifier", "text": "inObjectID", "parent": 170, "children": [], "start_point": {"row": 84, "column": 49}, "end_point": {"row": 84, "column": 59}}, {"id": 173, "type": "declaration", "text": "void setMemberWeight( int inParentID, int inObjectID, float inWeight );", "parent": 0, "children": [174, 175], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 71}}, {"id": 174, "type": "primitive_type", "text": "void", "parent": 173, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 4}}, {"id": 175, "type": "function_declarator", "text": "setMemberWeight( int inParentID, int inObjectID, float inWeight )", "parent": 173, "children": [176, 177], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 70}}, {"id": 176, "type": "identifier", "text": "setMemberWeight", "parent": 175, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 20}}, {"id": 177, "type": "parameter_list", "text": "( int inParentID, int inObjectID, float inWeight )", "parent": 175, "children": [178, 181, 184], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 70}}, {"id": 178, "type": "parameter_declaration", "text": "int inParentID", "parent": 177, "children": [179, 180], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 36}}, {"id": 179, "type": "primitive_type", "text": "int", "parent": 178, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 25}}, {"id": 180, "type": "identifier", "text": "inParentID", "parent": 178, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 36}}, {"id": 181, "type": "parameter_declaration", "text": "int inObjectID", "parent": 177, "children": [182, 183], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 52}}, {"id": 182, "type": "primitive_type", "text": "int", "parent": 181, "children": [], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 41}}, {"id": 183, "type": "identifier", "text": "inObjectID", "parent": 181, "children": [], "start_point": {"row": 86, "column": 42}, "end_point": {"row": 86, "column": 52}}, {"id": 184, "type": "parameter_declaration", "text": "float inWeight", "parent": 177, "children": [185, 186], "start_point": {"row": 86, "column": 54}, "end_point": {"row": 86, "column": 68}}, {"id": 185, "type": "primitive_type", "text": "float", "parent": 184, "children": [], "start_point": {"row": 86, "column": 54}, "end_point": {"row": 86, "column": 59}}, {"id": 186, "type": "identifier", "text": "inWeight", "parent": 184, "children": [], "start_point": {"row": 86, "column": 60}, "end_point": {"row": 86, "column": 68}}, {"id": 187, "type": "declaration", "text": "void makeWeightUniform( int inParentID );", "parent": 0, "children": [188, 189], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 41}}, {"id": 188, "type": "primitive_type", "text": "void", "parent": 187, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 4}}, {"id": 189, "type": "function_declarator", "text": "makeWeightUniform( int inParentID )", "parent": 187, "children": [190, 191], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 40}}, {"id": 190, "type": "identifier", "text": "makeWeightUniform", "parent": 189, "children": [], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 22}}, {"id": 191, "type": "parameter_list", "text": "( int inParentID )", "parent": 189, "children": [192], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 40}}, {"id": 192, "type": "parameter_declaration", "text": "int inParentID", "parent": 191, "children": [193, 194], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 38}}, {"id": 193, "type": "primitive_type", "text": "int", "parent": 192, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 27}}, {"id": 194, "type": "identifier", "text": "inParentID", "parent": 192, "children": [], "start_point": {"row": 89, "column": 28}, "end_point": {"row": 89, "column": 38}}, {"id": 195, "type": "declaration", "text": "int getNumCategoriesForObject( int inObjectID );", "parent": 0, "children": [196, 197], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 48}}, {"id": 196, "type": "primitive_type", "text": "int", "parent": 195, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 3}}, {"id": 197, "type": "function_declarator", "text": "getNumCategoriesForObject( int inObjectID )", "parent": 195, "children": [198, 199], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 47}}, {"id": 198, "type": "identifier", "text": "getNumCategoriesForObject", "parent": 197, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 29}}, {"id": 199, "type": "parameter_list", "text": "( int inObjectID )", "parent": 197, "children": [200], "start_point": {"row": 93, "column": 29}, "end_point": {"row": 93, "column": 47}}, {"id": 200, "type": "parameter_declaration", "text": "int inObjectID", "parent": 199, "children": [201, 202], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 45}}, {"id": 201, "type": "primitive_type", "text": "int", "parent": 200, "children": [], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 34}}, {"id": 202, "type": "identifier", "text": "inObjectID", "parent": 200, "children": [], "start_point": {"row": 93, "column": 35}, "end_point": {"row": 93, "column": 45}}, {"id": 203, "type": "declaration", "text": "int getCategoryForObject( int inObjectID, int inCategoryIndex );", "parent": 0, "children": [204, 205], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 64}}, {"id": 204, "type": "primitive_type", "text": "int", "parent": 203, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 3}}, {"id": 205, "type": "function_declarator", "text": "getCategoryForObject( int inObjectID, int inCategoryIndex )", "parent": 203, "children": [206, 207], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 63}}, {"id": 206, "type": "identifier", "text": "getCategoryForObject", "parent": 205, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 24}}, {"id": 207, "type": "parameter_list", "text": "( int inObjectID, int inCategoryIndex )", "parent": 205, "children": [208, 211], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 63}}, {"id": 208, "type": "parameter_declaration", "text": "int inObjectID", "parent": 207, "children": [209, 210], "start_point": {"row": 96, "column": 26}, "end_point": {"row": 96, "column": 40}}, {"id": 209, "type": "primitive_type", "text": "int", "parent": 208, "children": [], "start_point": {"row": 96, "column": 26}, "end_point": {"row": 96, "column": 29}}, {"id": 210, "type": "identifier", "text": "inObjectID", "parent": 208, "children": [], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 40}}, {"id": 211, "type": "parameter_declaration", "text": "int inCategoryIndex", "parent": 207, "children": [212, 213], "start_point": {"row": 96, "column": 42}, "end_point": {"row": 96, "column": 61}}, {"id": 212, "type": "primitive_type", "text": "int", "parent": 211, "children": [], "start_point": {"row": 96, "column": 42}, "end_point": {"row": 96, "column": 45}}, {"id": 213, "type": "identifier", "text": "inCategoryIndex", "parent": 211, "children": [], "start_point": {"row": 96, "column": 46}, "end_point": {"row": 96, "column": 61}}, {"id": 214, "type": "declaration", "text": "void deleteCategoryFromBank( int inID );", "parent": 0, "children": [215, 216], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 40}}, {"id": 215, "type": "primitive_type", "text": "void", "parent": 214, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 4}}, {"id": 216, "type": "function_declarator", "text": "deleteCategoryFromBank( int inID )", "parent": 214, "children": [217, 218], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 39}}, {"id": 217, "type": "identifier", "text": "deleteCategoryFromBank", "parent": 216, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 27}}, {"id": 218, "type": "parameter_list", "text": "( int inID )", "parent": 216, "children": [219], "start_point": {"row": 100, "column": 27}, "end_point": {"row": 100, "column": 39}}, {"id": 219, "type": "parameter_declaration", "text": "int inID", "parent": 218, "children": [220, 221], "start_point": {"row": 100, "column": 29}, "end_point": {"row": 100, "column": 37}}, {"id": 220, "type": "primitive_type", "text": "int", "parent": 219, "children": [], "start_point": {"row": 100, "column": 29}, "end_point": {"row": 100, "column": 32}}, {"id": 221, "type": "identifier", "text": "inID", "parent": 219, "children": [], "start_point": {"row": 100, "column": 33}, "end_point": {"row": 100, "column": 37}}, {"id": 222, "type": "declaration", "text": "char isObjectUsedInCategories( int inObjectID );", "parent": 0, "children": [223, 224], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 48}}, {"id": 223, "type": "primitive_type", "text": "char", "parent": 222, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 4}}, {"id": 224, "type": "function_declarator", "text": "isObjectUsedInCategories( int inObjectID )", "parent": 222, "children": [225, 226], "start_point": {"row": 104, "column": 5}, "end_point": {"row": 104, "column": 47}}, {"id": 225, "type": "identifier", "text": "isObjectUsedInCategories", "parent": 224, "children": [], "start_point": {"row": 104, "column": 5}, "end_point": {"row": 104, "column": 29}}, {"id": 226, "type": "parameter_list", "text": "( int inObjectID )", "parent": 224, "children": [227], "start_point": {"row": 104, "column": 29}, "end_point": {"row": 104, "column": 47}}, {"id": 227, "type": "parameter_declaration", "text": "int inObjectID", "parent": 226, "children": [228, 229], "start_point": {"row": 104, "column": 31}, "end_point": {"row": 104, "column": 45}}, {"id": 228, "type": "primitive_type", "text": "int", "parent": 227, "children": [], "start_point": {"row": 104, "column": 31}, "end_point": {"row": 104, "column": 34}}, {"id": 229, "type": "identifier", "text": "inObjectID", "parent": 227, "children": [], "start_point": {"row": 104, "column": 35}, "end_point": {"row": 104, "column": 45}}, {"id": 230, "type": "declaration", "text": "int pickFromProbSet( int inParentID );", "parent": 0, "children": [231, 232], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 38}}, {"id": 231, "type": "primitive_type", "text": "int", "parent": 230, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 3}}, {"id": 232, "type": "function_declarator", "text": "pickFromProbSet( int inParentID )", "parent": 230, "children": [233, 234], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 37}}, {"id": 233, "type": "identifier", "text": "pickFromProbSet", "parent": 232, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 19}}, {"id": 234, "type": "parameter_list", "text": "( int inParentID )", "parent": 232, "children": [235], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 37}}, {"id": 235, "type": "parameter_declaration", "text": "int inParentID", "parent": 234, "children": [236, 237], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 35}}, {"id": 236, "type": "primitive_type", "text": "int", "parent": 235, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 24}}, {"id": 237, "type": "identifier", "text": "inParentID", "parent": 235, "children": [], "start_point": {"row": 108, "column": 25}, "end_point": {"row": 108, "column": 35}}, {"id": 238, "type": "declaration", "text": "char isProbabilitySet( int inParentID );", "parent": 0, "children": [239, 240], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 40}}, {"id": 239, "type": "primitive_type", "text": "char", "parent": 238, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 4}}, {"id": 240, "type": "function_declarator", "text": "isProbabilitySet( int inParentID )", "parent": 238, "children": [241, 242], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 39}}, {"id": 241, "type": "identifier", "text": "isProbabilitySet", "parent": 240, "children": [], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 21}}, {"id": 242, "type": "parameter_list", "text": "( int inParentID )", "parent": 240, "children": [243], "start_point": {"row": 111, "column": 21}, "end_point": {"row": 111, "column": 39}}, {"id": 243, "type": "parameter_declaration", "text": "int inParentID", "parent": 242, "children": [244, 245], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 37}}, {"id": 244, "type": "primitive_type", "text": "int", "parent": 243, "children": [], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 26}}, {"id": 245, "type": "identifier", "text": "inParentID", "parent": 243, "children": [], "start_point": {"row": 111, "column": 27}, "end_point": {"row": 111, "column": 37}}, {"id": 246, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 6}}]}, "node_categories": {"declarations": {"functions": [56, 66, 71, 76, 83, 93, 101, 112, 123, 134, 145, 153, 164, 175, 189, 197, 205, 216, 224, 232, 240], "variables": [9, 14, 17, 20, 23, 30, 38, 43, 46, 54, 59, 64, 69, 74, 79, 86, 89, 96, 99, 104, 107, 110, 115, 118, 121, 126, 129, 132, 137, 140, 143, 148, 151, 156, 159, 162, 167, 170, 173, 178, 181, 184, 187, 192, 195, 200, 203, 208, 211, 214, 219, 222, 227, 230, 235, 238, 243], "classes": [11, 12, 40, 41], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 16, 19, 22, 24, 29, 31, 36, 37, 42, 45, 47, 52, 53, 57, 63, 67, 72, 77, 80, 84, 88, 90, 94, 98, 102, 106, 109, 113, 117, 120, 124, 128, 131, 135, 139, 142, 146, 150, 154, 158, 161, 165, 169, 172, 176, 180, 183, 186, 190, 194, 198, 202, 206, 210, 213, 217, 221, 225, 229, 233, 237, 241, 245, 246], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "initCategoryBankStart( char *outRebuildingCache )"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "initCategoryBankStep()"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "initCategoryBankFinish()"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "freeCategoryBank()"}, {"node_id": 83, "universal_type": "function", "name": "inParentID", "text_snippet": "getCategory( int inParentID )"}, {"node_id": 93, "universal_type": "function", "name": "inChildID", "text_snippet": "getReverseCategory( int inChildID )"}, {"node_id": 101, "universal_type": "function", "name": "inObjectID,", "text_snippet": "addCategoryToObject( int inObjectID, int inParentID )"}, {"node_id": 112, "universal_type": "function", "name": "inObjectID,", "text_snippet": "removeCategoryFromObject( int inObjectID, int inParentID )"}, {"node_id": 123, "universal_type": "function", "name": "inParentID,", "text_snippet": "setCategoryIsPattern( int inParentID, char inIsPattern )"}, {"node_id": 134, "universal_type": "function", "name": "inParentID,", "text_snippet": "setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet )"}, {"node_id": 145, "universal_type": "function", "name": "inObjectID", "text_snippet": "removeObjectFromAllCategories( int inObjectID )"}, {"node_id": 153, "universal_type": "function", "name": "inParentID,", "text_snippet": "moveCategoryMemberUp( int inParentID, int inObjectID )"}, {"node_id": 164, "universal_type": "function", "name": "inParentID,", "text_snippet": "moveCategoryMemberDown( int inParentID, int inObjectID )"}, {"node_id": 175, "universal_type": "function", "name": "inParentID,", "text_snippet": "setMemberWeight( int inParentID, int inObjectID, float inWeight )"}, {"node_id": 189, "universal_type": "function", "name": "inParentID", "text_snippet": "makeWeightUniform( int inParentID )"}, {"node_id": 197, "universal_type": "function", "name": "inObjectID", "text_snippet": "getNumCategoriesForObject( int inObjectID )"}, {"node_id": 205, "universal_type": "function", "name": "inObjectID,", "text_snippet": "getCategoryForObject( int inObjectID, int inCategoryIndex )"}, {"node_id": 216, "universal_type": "function", "name": "inID", "text_snippet": "deleteCategoryFromBank( int inID )"}, {"node_id": 224, "universal_type": "function", "name": "inObjectID", "text_snippet": "isObjectUsedInCategories( int inObjectID )"}, {"node_id": 232, "universal_type": "function", "name": "inParentID", "text_snippet": "pickFromProbSet( int inParentID )"}, {"node_id": 240, "universal_type": "function", "name": "inParentID", "text_snippet": "isProbabilitySet( int inParentID )"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "CategoryRecord", "text_snippet": "struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n "}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 40, "universal_type": "class", "name": "ReverseCategoryRecord", "text_snippet": "struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // p"}, {"node_id": 41, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"minorGems/util/SimpleVector.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef CATEGORY_BANK_INCLUDED\n#define CATEGORY_BANK_INCLUDED\n\n#include \"minorGems/util/SimpleVector.h\"\n\n\ntypedef struct CategoryRecord {\n // object ID of parent object\n int parentID;\n \n // true if this category is a pattern\n // means parendID is a real gameplay object, and that we add\n // extra transitions only if another pattern matches for\n // other elements of a transition\n char isPattern;\n \n // true if this category is a set of probability-weighted objects\n char isProbabilitySet;\n \n // child objects that are in this category\n // none of these should themselves be parent objects\n SimpleVector<int> objectIDSet;\n \n // for probability sets\n SimpleVector<float> objectWeights;\n\n } CategoryRecord;\n\n\n\n// backwards mapping\ntypedef struct ReverseCategoryRecord {\n // child object ID\n int childID;\n \n // parent objects whose category this child object is in\n SimpleVector<int> categoryIDSet;\n \n } ReverseCategoryRecord;\n\n\n\n// loads from categories folder\n// returns number of categories that need to be loaded\nint initCategoryBankStart( char *outRebuildingCache );\n\n// returns progress... ready for Finish when progress == 1.0\nfloat initCategoryBankStep();\nvoid initCategoryBankFinish();\n\n\nvoid freeCategoryBank();\n\n\nCategoryRecord *getCategory( int inParentID );\nReverseCategoryRecord *getReverseCategory( int inChildID );\n\n\nvoid addCategoryToObject( int inObjectID, int inParentID );\n\nvoid removeCategoryFromObject( int inObjectID, int inParentID );\n\n\nvoid setCategoryIsPattern( int inParentID, char inIsPattern );\nvoid setCategoryIsProbabilitySet( int inParentID, char inIsProbabilitySet );\n\n\n\nvoid removeObjectFromAllCategories( int inObjectID );\n\n/**\nNOTE:\nThese functions are currently not implemented in a useful way.\nThey result in a change to RAM records only, and the result is not\npreserved on disk in the category folder.\n\n// move category up/down on object's category list (which categories object\n// is part of, and which take precedence)\nvoid moveCategoryUp( int inObjectID, int inParentID );\nvoid moveCategoryDown( int inObjectID, int inParentID );\n*/\n\n// move member object up/down in category's member list\nvoid moveCategoryMemberUp( int inParentID, int inObjectID );\nvoid moveCategoryMemberDown( int inParentID, int inObjectID );\n\nvoid setMemberWeight( int inParentID, int inObjectID, float inWeight );\n\n// only works on prob sets\nvoid makeWeightUniform( int inParentID );\n\n\n\nint getNumCategoriesForObject( int inObjectID );\n\n// return -1 if index does not exist\nint getCategoryForObject( int inObjectID, int inCategoryIndex );\n\n\n\nvoid deleteCategoryFromBank( int inID );\n\n\n// used as either parent or child\nchar isObjectUsedInCategories( int inObjectID );\n\n\n\nint pickFromProbSet( int inParentID );\n\n\nchar isProbabilitySet( int inParentID );\n\n\n#endif\n"}
274
c
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/NeutrinoCore.framework/NeutrinoCore */ @interface NUEnumSetting : NUSetting { NSArray * _values; } @property (readonly) NSString *defaultValue; @property (readonly) NSArray *values; + (id)deserializeFromDictionary:(id)arg1 error:(out id*)arg2; - (void).cxx_destruct; - (id)defaultValue; - (id)description; - (id)init; - (id)initWithAttributes:(id)arg1; - (id)initWithValues:(id)arg1 attributes:(id)arg2; - (bool)isValid:(out id*)arg1; - (bool)serializeIntoDictionary:(id)arg1 error:(out id*)arg2; - (bool)validate:(id)arg1 error:(out id*)arg2; - (bool)validateValues:(out id*)arg1; - (id)values; @end
31.43
21
(translation_unit) "/* Generated by RuntimeBrowser\n Image: /System/Library/PrivateFrameworks/NeutrinoCore.framework/NeutrinoCore\n */\n\n@interface NUEnumSetting : NUSetting {\n NSArray * _values;\n}\n\n@property (readonly) NSString *defaultValue;\n@property (readonly) NSArray *values;\n\n+ (id)deserializeFromDictionary:(id)arg1 error:(out id*)arg2;\n\n- (void).cxx_destruct;\n- (id)defaultValue;\n- (id)description;\n- (id)init;\n- (id)initWithAttributes:(id)arg1;\n- (id)initWithValues:(id)arg1 attributes:(id)arg2;\n- (bool)isValid:(out id*)arg1;\n- (bool)serializeIntoDictionary:(id)arg1 error:(out id*)arg2;\n- (bool)validate:(id)arg1 error:(out id*)arg2;\n- (bool)validateValues:(out id*)arg1;\n- (id)values;\n\n@end\n" (comment) "/* Generated by RuntimeBrowser\n Image: /System/Library/PrivateFrameworks/NeutrinoCore.framework/NeutrinoCore\n */" (ERROR) "@" (ERROR) "@" (function_definition) "interface NUEnumSetting : NUSetting {\n NSArray * _values;\n}" (type_identifier) "interface" (identifier) "NUEnumSetting" (ERROR) ": NUSetting" (:) ":" (identifier) "NUSetting" (compound_statement) "{\n NSArray * _values;\n}" ({) "{" (declaration) "NSArray * _values;" (type_identifier) "NSArray" (pointer_declarator) "* _values" (*) "*" (identifier) "_values" (;) ";" (}) "}" (ERROR) "@" (ERROR) "@" (declaration) "property (readonly) NSString *defaultValue;" (macro_type_specifier) "property (readonly)" (identifier) "property" (() "(" (type_descriptor) "readonly" (type_identifier) "readonly" ()) ")" (ERROR) "NSString" (identifier) "NSString" (pointer_declarator) "*defaultValue" (*) "*" (identifier) "defaultValue" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property (readonly) NSArray *values;" (macro_type_specifier) "property (readonly)" (identifier) "property" (() "(" (type_descriptor) "readonly" (type_identifier) "readonly" ()) ")" (ERROR) "NSArray" (identifier) "NSArray" (pointer_declarator) "*values" (*) "*" (identifier) "values" (;) ";" (ERROR) "+ (id)deserializeFromDictionary:(id)" (unary_expression) "+ (id)deserializeFromDictionary" (+) "+" (cast_expression) "(id)deserializeFromDictionary" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "deserializeFromDictionary" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 error:(out id*)arg2;" (type_identifier) "arg1" (identifier) "error" (ERROR) ":(out id*)arg2" (:) ":" (() "(" (identifier) "out" (identifier) "id" (*) "*" ()) ")" (identifier) "arg2" (;) ";" (expression_statement) "- (void).cxx_destruct;" (unary_expression) "- (void).cxx_destruct" (-) "-" (cast_expression) "(void).cxx_destruct" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (ERROR) "." (.) "." (identifier) "cxx_destruct" (;) ";" (expression_statement) "- (id)defaultValue;" (unary_expression) "- (id)defaultValue" (-) "-" (cast_expression) "(id)defaultValue" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "defaultValue" (;) ";" (expression_statement) "- (id)description;" (unary_expression) "- (id)description" (-) "-" (cast_expression) "(id)description" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "description" (;) ";" (expression_statement) "- (id)init;" (unary_expression) "- (id)init" (-) "-" (cast_expression) "(id)init" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "init" (;) ";" (expression_statement) "- (id)initWithAttributes:(id)arg1;" (unary_expression) "- (id)initWithAttributes" (-) "-" (cast_expression) "(id)initWithAttributes" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "initWithAttributes" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (ERROR) "- (id)initWithValues:(id)" (unary_expression) "- (id)initWithValues" (-) "-" (cast_expression) "(id)initWithValues" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "initWithValues" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 attributes:(id)arg2;" (type_identifier) "arg1" (identifier) "attributes" (ERROR) ":(id)arg2" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg2" (;) ";" (ERROR) "- (bool)isValid:(out id*)arg1" (unary_expression) "- (bool)isValid" (-) "-" (cast_expression) "(bool)isValid" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "isValid" (:) ":" (() "(" (identifier) "out" (binary_expression) "id*)arg1" (identifier) "id" (*) "*" (ERROR) ")" ()) ")" (identifier) "arg1" (expression_statement) ";" (;) ";" (ERROR) "- (bool)serializeIntoDictionary:(id)" (unary_expression) "- (bool)serializeIntoDictionary" (-) "-" (cast_expression) "(bool)serializeIntoDictionary" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "serializeIntoDictionary" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 error:(out id*)arg2;" (type_identifier) "arg1" (identifier) "error" (ERROR) ":(out id*)arg2" (:) ":" (() "(" (identifier) "out" (identifier) "id" (*) "*" ()) ")" (identifier) "arg2" (;) ";" (ERROR) "- (bool)validate:(id)" (unary_expression) "- (bool)validate" (-) "-" (cast_expression) "(bool)validate" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "validate" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 error:(out id*)arg2;" (type_identifier) "arg1" (identifier) "error" (ERROR) ":(out id*)arg2" (:) ":" (() "(" (identifier) "out" (identifier) "id" (*) "*" ()) ")" (identifier) "arg2" (;) ";" (ERROR) "- (bool)validateValues:(out id*)arg1" (unary_expression) "- (bool)validateValues" (-) "-" (cast_expression) "(bool)validateValues" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "validateValues" (:) ":" (() "(" (identifier) "out" (binary_expression) "id*)arg1" (identifier) "id" (*) "*" (ERROR) ")" ()) ")" (identifier) "arg1" (expression_statement) ";" (;) ";" (expression_statement) "- (id)values;" (unary_expression) "- (id)values" (-) "-" (cast_expression) "(id)values" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "values" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
260
25
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 31.43, "nodes": 163, "errors": 0, "source_hash": "84961e0c36a56b512cd2aea3a8367fa0b6eb3505ecaffa348214cd8097100fb0", "categorized_nodes": 99}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "@", "parent": null, "children": [1], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 1, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 2, "type": "function_definition", "text": "interface NUEnumSetting : NUSetting {\n NSArray * _values;\n}", "parent": null, "children": [3, 4, 5], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 6, "column": 1}}, {"id": 3, "type": "type_identifier", "text": "interface", "parent": 2, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 10}}, {"id": 4, "type": "identifier", "text": "NUEnumSetting", "parent": 2, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 24}}, {"id": 5, "type": "ERROR", "text": ": NUSetting", "parent": 2, "children": [6], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 4, "column": 36}}, {"id": 6, "type": "identifier", "text": "NUSetting", "parent": 5, "children": [], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 36}}, {"id": 7, "type": "declaration", "text": "NSArray * _values;", "parent": 2, "children": [8, 9], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 22}}, {"id": 8, "type": "type_identifier", "text": "NSArray", "parent": 7, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 11}}, {"id": 9, "type": "pointer_declarator", "text": "* _values", "parent": 7, "children": [10, 11], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 21}}, {"id": 10, "type": "*", "text": "*", "parent": 9, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 11, "type": "identifier", "text": "_values", "parent": 9, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 21}}, {"id": 12, "type": "ERROR", "text": "@", "parent": null, "children": [13], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 13, "type": "ERROR", "text": "@", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 14, "type": "declaration", "text": "property (readonly) NSString *defaultValue;", "parent": null, "children": [15, 19, 21], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 44}}, {"id": 15, "type": "macro_type_specifier", "text": "property (readonly)", "parent": 14, "children": [16, 17], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 20}}, {"id": 16, "type": "identifier", "text": "property", "parent": 15, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 9}}, {"id": 17, "type": "type_descriptor", "text": "readonly", "parent": 15, "children": [18], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 19}}, {"id": 18, "type": "type_identifier", "text": "readonly", "parent": 17, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 19}}, {"id": 19, "type": "ERROR", "text": "NSString", "parent": 14, "children": [20], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 29}}, {"id": 20, "type": "identifier", "text": "NSString", "parent": 19, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 29}}, {"id": 21, "type": "pointer_declarator", "text": "*defaultValue", "parent": 14, "children": [22, 23], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 43}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 8, "column": 30}, "end_point": {"row": 8, "column": 31}}, {"id": 23, "type": "identifier", "text": "defaultValue", "parent": 21, "children": [], "start_point": {"row": 8, "column": 31}, "end_point": {"row": 8, "column": 43}}, {"id": 24, "type": "ERROR", "text": "@", "parent": null, "children": [25], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 25, "type": "ERROR", "text": "@", "parent": 24, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 26, "type": "declaration", "text": "property (readonly) NSArray *values;", "parent": null, "children": [27, 31, 33], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 37}}, {"id": 27, "type": "macro_type_specifier", "text": "property (readonly)", "parent": 26, "children": [28, 29], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 20}}, {"id": 28, "type": "identifier", "text": "property", "parent": 27, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 9}}, {"id": 29, "type": "type_descriptor", "text": "readonly", "parent": 27, "children": [30], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 19}}, {"id": 30, "type": "type_identifier", "text": "readonly", "parent": 29, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 19}}, {"id": 31, "type": "ERROR", "text": "NSArray", "parent": 26, "children": [32], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 28}}, {"id": 32, "type": "identifier", "text": "NSArray", "parent": 31, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 28}}, {"id": 33, "type": "pointer_declarator", "text": "*values", "parent": 26, "children": [34, 35], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 36}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 9, "column": 29}, "end_point": {"row": 9, "column": 30}}, {"id": 35, "type": "identifier", "text": "values", "parent": 33, "children": [], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 36}}, {"id": 36, "type": "ERROR", "text": "+ (id)deserializeFromDictionary:(id)", "parent": null, "children": [37, 43], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 36}}, {"id": 37, "type": "unary_expression", "text": "+ (id)deserializeFromDictionary", "parent": 36, "children": [38, 39], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 31}}, {"id": 38, "type": "+", "text": "+", "parent": 37, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 39, "type": "cast_expression", "text": "(id)deserializeFromDictionary", "parent": 37, "children": [40, 42], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 31}}, {"id": 40, "type": "type_descriptor", "text": "id", "parent": 39, "children": [41], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 5}}, {"id": 41, "type": "type_identifier", "text": "id", "parent": 40, "children": [], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 5}}, {"id": 42, "type": "identifier", "text": "deserializeFromDictionary", "parent": 39, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 31}}, {"id": 43, "type": "identifier", "text": "id", "parent": 36, "children": [], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 35}}, {"id": 44, "type": "declaration", "text": "arg1 error:(out id*)arg2;", "parent": null, "children": [45, 46, 47], "start_point": {"row": 11, "column": 36}, "end_point": {"row": 11, "column": 61}}, {"id": 45, "type": "type_identifier", "text": "arg1", "parent": 44, "children": [], "start_point": {"row": 11, "column": 36}, "end_point": {"row": 11, "column": 40}}, {"id": 46, "type": "identifier", "text": "error", "parent": 44, "children": [], "start_point": {"row": 11, "column": 41}, "end_point": {"row": 11, "column": 46}}, {"id": 47, "type": "ERROR", "text": ":(out id*)arg2", "parent": 44, "children": [48, 49, 50, 51], "start_point": {"row": 11, "column": 46}, "end_point": {"row": 11, "column": 60}}, {"id": 48, "type": "identifier", "text": "out", "parent": 47, "children": [], "start_point": {"row": 11, "column": 48}, "end_point": {"row": 11, "column": 51}}, {"id": 49, "type": "identifier", "text": "id", "parent": 47, "children": [], "start_point": {"row": 11, "column": 52}, "end_point": {"row": 11, "column": 54}}, {"id": 50, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 11, "column": 54}, "end_point": {"row": 11, "column": 55}}, {"id": 51, "type": "identifier", "text": "arg2", "parent": 47, "children": [], "start_point": {"row": 11, "column": 56}, "end_point": {"row": 11, "column": 60}}, {"id": 52, "type": "unary_expression", "text": "- (void).cxx_destruct", "parent": null, "children": [53, 54], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 21}}, {"id": 53, "type": "-", "text": "-", "parent": 52, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 54, "type": "cast_expression", "text": "(void).cxx_destruct", "parent": 52, "children": [55, 57], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 21}}, {"id": 55, "type": "type_descriptor", "text": "void", "parent": 54, "children": [56], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 57, "type": "identifier", "text": "cxx_destruct", "parent": 54, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 21}}, {"id": 58, "type": "unary_expression", "text": "- (id)defaultValue", "parent": null, "children": [59, 60], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 18}}, {"id": 59, "type": "-", "text": "-", "parent": 58, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 60, "type": "cast_expression", "text": "(id)defaultValue", "parent": 58, "children": [61, 63], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 18}}, {"id": 61, "type": "type_descriptor", "text": "id", "parent": 60, "children": [62], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 5}}, {"id": 62, "type": "type_identifier", "text": "id", "parent": 61, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 5}}, {"id": 63, "type": "identifier", "text": "defaultValue", "parent": 60, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 18}}, {"id": 64, "type": "unary_expression", "text": "- (id)description", "parent": null, "children": [65, 66], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 17}}, {"id": 65, "type": "-", "text": "-", "parent": 64, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 66, "type": "cast_expression", "text": "(id)description", "parent": 64, "children": [67, 69], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 17}}, {"id": 67, "type": "type_descriptor", "text": "id", "parent": 66, "children": [68], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 5}}, {"id": 68, "type": "type_identifier", "text": "id", "parent": 67, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 5}}, {"id": 69, "type": "identifier", "text": "description", "parent": 66, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 17}}, {"id": 70, "type": "unary_expression", "text": "- (id)init", "parent": null, "children": [71, 72], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 10}}, {"id": 71, "type": "-", "text": "-", "parent": 70, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 72, "type": "cast_expression", "text": "(id)init", "parent": 70, "children": [73, 75], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 10}}, {"id": 73, "type": "type_descriptor", "text": "id", "parent": 72, "children": [74], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 5}}, {"id": 74, "type": "type_identifier", "text": "id", "parent": 73, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 5}}, {"id": 75, "type": "identifier", "text": "init", "parent": 72, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 10}}, {"id": 76, "type": "unary_expression", "text": "- (id)initWithAttributes", "parent": null, "children": [77, 78], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 24}}, {"id": 77, "type": "-", "text": "-", "parent": 76, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 78, "type": "cast_expression", "text": "(id)initWithAttributes", "parent": 76, "children": [79, 81], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 24}}, {"id": 79, "type": "type_descriptor", "text": "id", "parent": 78, "children": [80], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 5}}, {"id": 80, "type": "type_identifier", "text": "id", "parent": 79, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 5}}, {"id": 81, "type": "identifier", "text": "initWithAttributes", "parent": 78, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 24}}, {"id": 82, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [83, 84], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 33}}, {"id": 83, "type": "identifier", "text": "id", "parent": 82, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 28}}, {"id": 84, "type": "identifier", "text": "arg1", "parent": 82, "children": [], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 17, "column": 33}}, {"id": 85, "type": "ERROR", "text": "- (id)initWithValues:(id)", "parent": null, "children": [86, 92], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 25}}, {"id": 86, "type": "unary_expression", "text": "- (id)initWithValues", "parent": 85, "children": [87, 88], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 20}}, {"id": 87, "type": "-", "text": "-", "parent": 86, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 88, "type": "cast_expression", "text": "(id)initWithValues", "parent": 86, "children": [89, 91], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 20}}, {"id": 89, "type": "type_descriptor", "text": "id", "parent": 88, "children": [90], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 5}}, {"id": 90, "type": "type_identifier", "text": "id", "parent": 89, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 5}}, {"id": 91, "type": "identifier", "text": "initWithValues", "parent": 88, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 20}}, {"id": 92, "type": "identifier", "text": "id", "parent": 85, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 24}}, {"id": 93, "type": "declaration", "text": "arg1 attributes:(id)arg2;", "parent": null, "children": [94, 95, 96], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 50}}, {"id": 94, "type": "type_identifier", "text": "arg1", "parent": 93, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 29}}, {"id": 95, "type": "identifier", "text": "attributes", "parent": 93, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 40}}, {"id": 96, "type": "ERROR", "text": ":(id)arg2", "parent": 93, "children": [97, 98], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 49}}, {"id": 97, "type": "identifier", "text": "id", "parent": 96, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 44}}, {"id": 98, "type": "identifier", "text": "arg2", "parent": 96, "children": [], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 49}}, {"id": 99, "type": "ERROR", "text": "- (bool)isValid:(out id*)arg1", "parent": null, "children": [100, 106, 107], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 29}}, {"id": 100, "type": "unary_expression", "text": "- (bool)isValid", "parent": 99, "children": [101, 102], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 15}}, {"id": 101, "type": "-", "text": "-", "parent": 100, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 102, "type": "cast_expression", "text": "(bool)isValid", "parent": 100, "children": [103, 105], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 15}}, {"id": 103, "type": "type_descriptor", "text": "bool", "parent": 102, "children": [104], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 104, "type": "primitive_type", "text": "bool", "parent": 103, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 105, "type": "identifier", "text": "isValid", "parent": 102, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 15}}, {"id": 106, "type": "identifier", "text": "out", "parent": 99, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 20}}, {"id": 107, "type": "binary_expression", "text": "id*)arg1", "parent": 99, "children": [108, 109, 110], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 29}}, {"id": 108, "type": "identifier", "text": "id", "parent": 107, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 23}}, {"id": 109, "type": "*", "text": "*", "parent": 107, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 24}}, {"id": 110, "type": "identifier", "text": "arg1", "parent": 107, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 29}}, {"id": 111, "type": "ERROR", "text": "- (bool)serializeIntoDictionary:(id)", "parent": null, "children": [112, 118], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 36}}, {"id": 112, "type": "unary_expression", "text": "- (bool)serializeIntoDictionary", "parent": 111, "children": [113, 114], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 31}}, {"id": 113, "type": "-", "text": "-", "parent": 112, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 114, "type": "cast_expression", "text": "(bool)serializeIntoDictionary", "parent": 112, "children": [115, 117], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 31}}, {"id": 115, "type": "type_descriptor", "text": "bool", "parent": 114, "children": [116], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 116, "type": "primitive_type", "text": "bool", "parent": 115, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 117, "type": "identifier", "text": "serializeIntoDictionary", "parent": 114, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 31}}, {"id": 118, "type": "identifier", "text": "id", "parent": 111, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 35}}, {"id": 119, "type": "declaration", "text": "arg1 error:(out id*)arg2;", "parent": null, "children": [120, 121, 122], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 61}}, {"id": 120, "type": "type_identifier", "text": "arg1", "parent": 119, "children": [], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 40}}, {"id": 121, "type": "identifier", "text": "error", "parent": 119, "children": [], "start_point": {"row": 20, "column": 41}, "end_point": {"row": 20, "column": 46}}, {"id": 122, "type": "ERROR", "text": ":(out id*)arg2", "parent": 119, "children": [123, 124, 125, 126], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 60}}, {"id": 123, "type": "identifier", "text": "out", "parent": 122, "children": [], "start_point": {"row": 20, "column": 48}, "end_point": {"row": 20, "column": 51}}, {"id": 124, "type": "identifier", "text": "id", "parent": 122, "children": [], "start_point": {"row": 20, "column": 52}, "end_point": {"row": 20, "column": 54}}, {"id": 125, "type": "*", "text": "*", "parent": 122, "children": [], "start_point": {"row": 20, "column": 54}, "end_point": {"row": 20, "column": 55}}, {"id": 126, "type": "identifier", "text": "arg2", "parent": 122, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 60}}, {"id": 127, "type": "ERROR", "text": "- (bool)validate:(id)", "parent": null, "children": [128, 134], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 21}}, {"id": 128, "type": "unary_expression", "text": "- (bool)validate", "parent": 127, "children": [129, 130], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 16}}, {"id": 129, "type": "-", "text": "-", "parent": 128, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 130, "type": "cast_expression", "text": "(bool)validate", "parent": 128, "children": [131, 133], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 16}}, {"id": 131, "type": "type_descriptor", "text": "bool", "parent": 130, "children": [132], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 132, "type": "primitive_type", "text": "bool", "parent": 131, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 133, "type": "identifier", "text": "validate", "parent": 130, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 16}}, {"id": 134, "type": "identifier", "text": "id", "parent": 127, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 20}}, {"id": 135, "type": "declaration", "text": "arg1 error:(out id*)arg2;", "parent": null, "children": [136, 137, 138], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 46}}, {"id": 136, "type": "type_identifier", "text": "arg1", "parent": 135, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 25}}, {"id": 137, "type": "identifier", "text": "error", "parent": 135, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 31}}, {"id": 138, "type": "ERROR", "text": ":(out id*)arg2", "parent": 135, "children": [139, 140, 141, 142], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 45}}, {"id": 139, "type": "identifier", "text": "out", "parent": 138, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 36}}, {"id": 140, "type": "identifier", "text": "id", "parent": 138, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 39}}, {"id": 141, "type": "*", "text": "*", "parent": 138, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 40}}, {"id": 142, "type": "identifier", "text": "arg2", "parent": 138, "children": [], "start_point": {"row": 21, "column": 41}, "end_point": {"row": 21, "column": 45}}, {"id": 143, "type": "ERROR", "text": "- (bool)validateValues:(out id*)arg1", "parent": null, "children": [144, 150, 151], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 36}}, {"id": 144, "type": "unary_expression", "text": "- (bool)validateValues", "parent": 143, "children": [145, 146], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 22}}, {"id": 145, "type": "-", "text": "-", "parent": 144, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 146, "type": "cast_expression", "text": "(bool)validateValues", "parent": 144, "children": [147, 149], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 22}}, {"id": 147, "type": "type_descriptor", "text": "bool", "parent": 146, "children": [148], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 148, "type": "primitive_type", "text": "bool", "parent": 147, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 149, "type": "identifier", "text": "validateValues", "parent": 146, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 22}}, {"id": 150, "type": "identifier", "text": "out", "parent": 143, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 27}}, {"id": 151, "type": "binary_expression", "text": "id*)arg1", "parent": 143, "children": [152, 153, 154], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 36}}, {"id": 152, "type": "identifier", "text": "id", "parent": 151, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 30}}, {"id": 153, "type": "*", "text": "*", "parent": 151, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 154, "type": "identifier", "text": "arg1", "parent": 151, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 36}}, {"id": 155, "type": "unary_expression", "text": "- (id)values", "parent": null, "children": [156, 157], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 12}}, {"id": 156, "type": "-", "text": "-", "parent": 155, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 157, "type": "cast_expression", "text": "(id)values", "parent": 155, "children": [158, 160], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 12}}, {"id": 158, "type": "type_descriptor", "text": "id", "parent": 157, "children": [159], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 5}}, {"id": 159, "type": "type_identifier", "text": "id", "parent": 158, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 5}}, {"id": 160, "type": "identifier", "text": "values", "parent": 157, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 12}}, {"id": 161, "type": "ERROR", "text": "@", "parent": null, "children": [162], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 162, "type": "ERROR", "text": "@", "parent": 161, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}]}, "node_categories": {"declarations": {"functions": [2], "variables": [7, 14, 26, 44, 93, 119, 135], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [37, 39, 52, 54, 58, 60, 64, 66, 70, 72, 76, 78, 86, 88, 100, 102, 107, 112, 114, 128, 130, 144, 146, 151, 155, 157], "assignments": [], "loops": [], "conditionals": [3, 4, 6, 8, 11, 15, 16, 18, 20, 23, 27, 28, 30, 32, 35, 41, 42, 43, 45, 46, 48, 49, 51, 57, 62, 63, 68, 69, 74, 75, 80, 81, 83, 84, 90, 91, 92, 94, 95, 97, 98, 105, 106, 108, 110, 117, 118, 120, 121, 123, 124, 126, 133, 134, 136, 137, 139, 140, 142, 149, 150, 152, 154, 159, 160], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 2, "universal_type": "function", "name": "NUEnumSetting", "text_snippet": "interface NUEnumSetting : NUSetting {\n NSArray * _values;\n}"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/* Generated by RuntimeBrowser\n Image: /System/Library/PrivateFrameworks/NeutrinoCore.framework/NeutrinoCore\n */\n\n@interface NUEnumSetting : NUSetting {\n NSArray * _values;\n}\n\n@property (readonly) NSString *defaultValue;\n@property (readonly) NSArray *values;\n\n+ (id)deserializeFromDictionary:(id)arg1 error:(out id*)arg2;\n\n- (void).cxx_destruct;\n- (id)defaultValue;\n- (id)description;\n- (id)init;\n- (id)initWithAttributes:(id)arg1;\n- (id)initWithValues:(id)arg1 attributes:(id)arg2;\n- (bool)isValid:(out id*)arg1;\n- (bool)serializeIntoDictionary:(id)arg1 error:(out id*)arg2;\n- (bool)validate:(id)arg1 error:(out id*)arg2;\n- (bool)validateValues:(out id*)arg1;\n- (id)values;\n\n@end\n"}
275
c
/* * Copyright (c) 2014-2015 <NAME> <<EMAIL>> * * Distributed under the terms of the MIT license. * (See LICENSE.MIT or http://opensource.org/licenses/MIT) */ #ifndef _ZRAM_DATA_TYPES_H_ #define _ZRAM_DATA_TYPES_H_ #include <stdint.h> #include <sys/types.h> #include "globals.h" #include "config.h" enum { ZRAM_COMP_NONE, ZRAM_COMP_LZO, ZRAM_COMP_LZ4, ZRAM_COMP_UNKNOWN, ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION }; extern const char* ZRAM_COMPRESSION_DESC[]; enum { ZRAM_TYPE_NONE = 0x0, ZRAM_TYPE_SWAP = 0x1, ZRAM_TYPE_DISK = 0x2, ZRAM_TYPE_DISK_EXT2 = 0x4, ZRAM_TYPE_DISK_EXT4 = 0x8, ZRAM_TYPE_DISK_BTRFS = 0x10, ZRAM_TYPE__DUMMY, ZRAM_TYPE_FSTYPE_MASK = ( ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS ) }; enum { ZRAM_STATUS_NONE = 0, ZRAM_STATUS_INITIALIZED = 0x1, ZRAM_STATUS_CLAIMED = 0x2, ZRAM_STATUS_INUSE = 0x4, ZRAM_STATUS__DUMMY }; struct zram_dev_info { unsigned type; char* name; char* path; char* devpath; int comp_algorithm; char* fslabel; /* <= 255 identifiers */ uint8_t identifier; size_t size_m; uint_fast8_t status; #if ZRAM_EXPORT_SIZE_B /** size in bytes, only set after allocating the device */ size_t size_b; #endif }; void zram_dev_info_free ( struct zram_dev_info* const p_dev ); __attribute__((warn_unused_result)) struct zram_dev_info* zram_dev_info_new_from_identifier ( const uint8_t identifier ); size_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev ); void zram_dev_set_size_b ( struct zram_dev_info* const p_dev, const size_t size_b ); __attribute__((pure)) const char* zram_get_comp_desc ( const int algi ); const char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev ); __attribute__((warn_unused_result)) char* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev ); void zram_dev_info_set_fstype ( struct zram_dev_info* const p_dev, int fstype ); #endif /* _ZRAM_DATA_TYPES_H_ */
27.11
75
(translation_unit) "/*\n * Copyright (c) 2014-2015 <NAME> <<EMAIL>>\n *\n * Distributed under the terms of the MIT license.\n * (See LICENSE.MIT or http://opensource.org/licenses/MIT)\n */\n\n#ifndef _ZRAM_DATA_TYPES_H_\n#define _ZRAM_DATA_TYPES_H_\n\n#include <stdint.h>\n#include <sys/types.h>\n\n#include "globals.h"\n#include "config.h"\n\n\nenum {\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n};\n\nextern const char* ZRAM_COMPRESSION_DESC[];\n\nenum {\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n};\n\nenum {\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n};\n\nstruct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n};\n\n\nvoid zram_dev_info_free ( struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nstruct zram_dev_info* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n);\n\nsize_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n);\n\n__attribute__((pure))\nconst char* zram_get_comp_desc ( const int algi );\nconst char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nchar* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n);\n\n#endif /* _ZRAM_DATA_TYPES_H_ */\n" (comment) "/*\n * Copyright (c) 2014-2015 <NAME> <<EMAIL>>\n *\n * Distributed under the terms of the MIT license.\n * (See LICENSE.MIT or http://opensource.org/licenses/MIT)\n */" (preproc_ifdef) "#ifndef _ZRAM_DATA_TYPES_H_\n#define _ZRAM_DATA_TYPES_H_\n\n#include <stdint.h>\n#include <sys/types.h>\n\n#include "globals.h"\n#include "config.h"\n\n\nenum {\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n};\n\nextern const char* ZRAM_COMPRESSION_DESC[];\n\nenum {\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n};\n\nenum {\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n};\n\nstruct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n};\n\n\nvoid zram_dev_info_free ( struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nstruct zram_dev_info* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n);\n\nsize_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n);\n\n__attribute__((pure))\nconst char* zram_get_comp_desc ( const int algi );\nconst char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nchar* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n);\n\n#endif" (#ifndef) "#ifndef" (identifier) "_ZRAM_DATA_TYPES_H_" (preproc_def) "#define _ZRAM_DATA_TYPES_H_\n" (#define) "#define" (identifier) "_ZRAM_DATA_TYPES_H_" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.h>" (preproc_include) "#include "globals.h"\n" (#include) "#include" (string_literal) ""globals.h"" (") """ (string_content) "globals.h" (") """ (preproc_include) "#include "config.h"\n" (#include) "#include" (string_literal) ""config.h"" (") """ (string_content) "config.h" (") """ (enum_specifier) "enum {\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n}" (enum) "enum" (enumerator_list) "{\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n}" ({) "{" (enumerator) "ZRAM_COMP_NONE" (identifier) "ZRAM_COMP_NONE" (,) "," (enumerator) "ZRAM_COMP_LZO" (identifier) "ZRAM_COMP_LZO" (,) "," (enumerator) "ZRAM_COMP_LZ4" (identifier) "ZRAM_COMP_LZ4" (,) "," (enumerator) "ZRAM_COMP_UNKNOWN" (identifier) "ZRAM_COMP_UNKNOWN" (,) "," (enumerator) "ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION" (identifier) "ZRAM_COMP_DEFAULT" (=) "=" (identifier) "ZRAM_DEFAULT_COMPRESSION" (}) "}" (;) ";" (declaration) "extern const char* ZRAM_COMPRESSION_DESC[];" (storage_class_specifier) "extern" (extern) "extern" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* ZRAM_COMPRESSION_DESC[]" (*) "*" (array_declarator) "ZRAM_COMPRESSION_DESC[]" (identifier) "ZRAM_COMPRESSION_DESC" ([) "[" (]) "]" (;) ";" (enum_specifier) "enum {\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n}" (enum) "enum" (enumerator_list) "{\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n}" ({) "{" (enumerator) "ZRAM_TYPE_NONE = 0x0" (identifier) "ZRAM_TYPE_NONE" (=) "=" (number_literal) "0x0" (,) "," (enumerator) "ZRAM_TYPE_SWAP = 0x1" (identifier) "ZRAM_TYPE_SWAP" (=) "=" (number_literal) "0x1" (,) "," (enumerator) "ZRAM_TYPE_DISK = 0x2" (identifier) "ZRAM_TYPE_DISK" (=) "=" (number_literal) "0x2" (,) "," (enumerator) "ZRAM_TYPE_DISK_EXT2 = 0x4" (identifier) "ZRAM_TYPE_DISK_EXT2" (=) "=" (number_literal) "0x4" (,) "," (enumerator) "ZRAM_TYPE_DISK_EXT4 = 0x8" (identifier) "ZRAM_TYPE_DISK_EXT4" (=) "=" (number_literal) "0x8" (,) "," (enumerator) "ZRAM_TYPE_DISK_BTRFS = 0x10" (identifier) "ZRAM_TYPE_DISK_BTRFS" (=) "=" (number_literal) "0x10" (,) "," (enumerator) "ZRAM_TYPE__DUMMY" (identifier) "ZRAM_TYPE__DUMMY" (,) "," (enumerator) "ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )" (identifier) "ZRAM_TYPE_FSTYPE_MASK" (=) "=" (parenthesized_expression) "(\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )" (() "(" (binary_expression) "ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS" (binary_expression) "ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4" (identifier) "ZRAM_TYPE_DISK_EXT2" (|) "|" (identifier) "ZRAM_TYPE_DISK_EXT4" (|) "|" (identifier) "ZRAM_TYPE_DISK_BTRFS" ()) ")" (}) "}" (;) ";" (enum_specifier) "enum {\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n}" (enum) "enum" (enumerator_list) "{\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n}" ({) "{" (enumerator) "ZRAM_STATUS_NONE = 0" (identifier) "ZRAM_STATUS_NONE" (=) "=" (number_literal) "0" (,) "," (enumerator) "ZRAM_STATUS_INITIALIZED = 0x1" (identifier) "ZRAM_STATUS_INITIALIZED" (=) "=" (number_literal) "0x1" (,) "," (enumerator) "ZRAM_STATUS_CLAIMED = 0x2" (identifier) "ZRAM_STATUS_CLAIMED" (=) "=" (number_literal) "0x2" (,) "," (enumerator) "ZRAM_STATUS_INUSE = 0x4" (identifier) "ZRAM_STATUS_INUSE" (=) "=" (number_literal) "0x4" (,) "," (enumerator) "ZRAM_STATUS__DUMMY" (identifier) "ZRAM_STATUS__DUMMY" (}) "}" (;) ";" (struct_specifier) "struct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n}" (struct) "struct" (type_identifier) "zram_dev_info" (field_declaration_list) "{\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n}" ({) "{" (field_declaration) "unsigned type;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (field_identifier) "type" (;) ";" (field_declaration) "char* name;" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (field_identifier) "name" (;) ";" (field_declaration) "char* path;" (primitive_type) "char" (pointer_declarator) "* path" (*) "*" (field_identifier) "path" (;) ";" (field_declaration) "char* devpath;" (primitive_type) "char" (pointer_declarator) "* devpath" (*) "*" (field_identifier) "devpath" (;) ";" (field_declaration) "int comp_algorithm;" (primitive_type) "int" (field_identifier) "comp_algorithm" (;) ";" (field_declaration) "char* fslabel;" (primitive_type) "char" (pointer_declarator) "* fslabel" (*) "*" (field_identifier) "fslabel" (;) ";" (comment) "/* <= 255 identifiers */" (field_declaration) "uint8_t identifier;" (primitive_type) "uint8_t" (field_identifier) "identifier" (;) ";" (field_declaration) "size_t size_m;" (primitive_type) "size_t" (field_identifier) "size_m" (;) ";" (field_declaration) "uint_fast8_t status;" (type_identifier) "uint_fast8_t" (field_identifier) "status" (;) ";" (preproc_if) "#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif" (#if) "#if" (identifier) "ZRAM_EXPORT_SIZE_B" ( ) "\n" (comment) "/** size in bytes, only set after allocating the device */" (field_declaration) "size_t size_b;" (primitive_type) "size_t" (field_identifier) "size_b" (;) ";" (#endif) "#endif" (}) "}" (;) ";" (declaration) "void zram_dev_info_free ( struct zram_dev_info* const p_dev );" (primitive_type) "void" (function_declarator) "zram_dev_info_free ( struct zram_dev_info* const p_dev )" (identifier) "zram_dev_info_free" (parameter_list) "( struct zram_dev_info* const p_dev )" (() "(" (parameter_declaration) "struct zram_dev_info* const p_dev" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* const p_dev" (*) "*" (type_qualifier) "const" (const) "const" (identifier) "p_dev" ()) ")" (;) ";" (declaration) "__attribute__((warn_unused_result))\nstruct zram_dev_info* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n);" (attribute_specifier) "__attribute__((warn_unused_result))" (__attribute__) "__attribute__" (() "(" (argument_list) "(warn_unused_result)" (() "(" (identifier) "warn_unused_result" ()) ")" ()) ")" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n)" (*) "*" (function_declarator) "zram_dev_info_new_from_identifier (\n const uint8_t identifier\n)" (identifier) "zram_dev_info_new_from_identifier" (parameter_list) "(\n const uint8_t identifier\n)" (() "(" (parameter_declaration) "const uint8_t identifier" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (identifier) "identifier" ()) ")" (;) ";" (declaration) "size_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev );" (primitive_type) "size_t" (function_declarator) "get_zram_dev_size_b ( const struct zram_dev_info* const p_dev )" (identifier) "get_zram_dev_size_b" (parameter_list) "( const struct zram_dev_info* const p_dev )" (() "(" (parameter_declaration) "const struct zram_dev_info* const p_dev" (type_qualifier) "const" (const) "const" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* const p_dev" (*) "*" (type_qualifier) "const" (const) "const" (identifier) "p_dev" ()) ")" (;) ";" (declaration) "void zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n);" (primitive_type) "void" (function_declarator) "zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n)" (identifier) "zram_dev_set_size_b" (parameter_list) "(\n struct zram_dev_info* const p_dev, const size_t size_b\n)" (() "(" (parameter_declaration) "struct zram_dev_info* const p_dev" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* const p_dev" (*) "*" (type_qualifier) "const" (const) "const" (identifier) "p_dev" (,) "," (parameter_declaration) "const size_t size_b" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (identifier) "size_b" ()) ")" (;) ";" (declaration) "__attribute__((pure))\nconst char* zram_get_comp_desc ( const int algi );" (attribute_specifier) "__attribute__((pure))" (__attribute__) "__attribute__" (() "(" (argument_list) "(pure)" (() "(" (identifier) "pure" ()) ")" ()) ")" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* zram_get_comp_desc ( const int algi )" (*) "*" (function_declarator) "zram_get_comp_desc ( const int algi )" (identifier) "zram_get_comp_desc" (parameter_list) "( const int algi )" (() "(" (parameter_declaration) "const int algi" (type_qualifier) "const" (const) "const" (primitive_type) "int" (identifier) "algi" ()) ")" (;) ";" (declaration) "const char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev );" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev )" (*) "*" (function_declarator) "zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev )" (identifier) "zram_get_comp_desc_of" (parameter_list) "( const struct zram_dev_info* const p_dev )" (() "(" (parameter_declaration) "const struct zram_dev_info* const p_dev" (type_qualifier) "const" (const) "const" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* const p_dev" (*) "*" (type_qualifier) "const" (const) "const" (identifier) "p_dev" ()) ")" (;) ";" (declaration) "__attribute__((warn_unused_result))\nchar* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev );" (attribute_specifier) "__attribute__((warn_unused_result))" (__attribute__) "__attribute__" (() "(" (argument_list) "(warn_unused_result)" (() "(" (identifier) "warn_unused_result" ()) ")" ()) ")" (primitive_type) "char" (pointer_declarator) "* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev )" (*) "*" (function_declarator) "zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev )" (identifier) "zram_get_zdisk_devpath" (parameter_list) "( const struct zram_dev_info* const p_dev )" (() "(" (parameter_declaration) "const struct zram_dev_info* const p_dev" (type_qualifier) "const" (const) "const" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* const p_dev" (*) "*" (type_qualifier) "const" (const) "const" (identifier) "p_dev" ()) ")" (;) ";" (declaration) "void zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n);" (primitive_type) "void" (function_declarator) "zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n)" (identifier) "zram_dev_info_set_fstype" (parameter_list) "(\n struct zram_dev_info* const p_dev, int fstype\n)" (() "(" (parameter_declaration) "struct zram_dev_info* const p_dev" (struct_specifier) "struct zram_dev_info" (struct) "struct" (type_identifier) "zram_dev_info" (pointer_declarator) "* const p_dev" (*) "*" (type_qualifier) "const" (const) "const" (identifier) "p_dev" (,) "," (parameter_declaration) "int fstype" (primitive_type) "int" (identifier) "fstype" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* _ZRAM_DATA_TYPES_H_ */"
388
0
{"language": "c", "success": true, "metadata": {"lines": 75, "avg_line_length": 27.11, "nodes": 264, "errors": 0, "source_hash": "5e4eb14b18ef5c372c8a3e95e9833e84c0f68823a3b4ccbfe6922197a9493a43", "categorized_nodes": 182}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _ZRAM_DATA_TYPES_H_\n#define _ZRAM_DATA_TYPES_H_\n\n#include <stdint.h>\n#include <sys/types.h>\n\n#include \"globals.h\"\n#include \"config.h\"\n\n\nenum {\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n};\n\nextern const char* ZRAM_COMPRESSION_DESC[];\n\nenum {\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n};\n\nenum {\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n};\n\nstruct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n};\n\n\nvoid zram_dev_info_free ( struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nstruct zram_dev_info* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n);\n\nsize_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n);\n\n__attribute__((pure))\nconst char* zram_get_comp_desc ( const int algi );\nconst char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nchar* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 33, 41, 79, 100, 147, 159, 175, 187, 202, 216, 230, 248, 263], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 97, "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": "_ZRAM_DATA_TYPES_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 27}}, {"id": 3, "type": "preproc_def", "text": "#define _ZRAM_DATA_TYPES_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": "_ZRAM_DATA_TYPES_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <sys/types.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<sys/types.h>", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "#include \"globals.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"globals.h\"", "parent": 12, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 15, "type": "preproc_include", "text": "#include \"config.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"config.h\"", "parent": 15, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 18, "type": "enum_specifier", "text": "enum {\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n}", "parent": 0, "children": [19, 20], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 19, "type": "enum", "text": "enum", "parent": 18, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 4}}, {"id": 20, "type": "enumerator_list", "text": "{\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n}", "parent": 18, "children": [21, 23, 25, 27, 29], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 26, "column": 1}}, {"id": 21, "type": "enumerator", "text": "ZRAM_COMP_NONE", "parent": 20, "children": [22], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 17}}, {"id": 22, "type": "identifier", "text": "ZRAM_COMP_NONE", "parent": 21, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 17}}, {"id": 23, "type": "enumerator", "text": "ZRAM_COMP_LZO", "parent": 20, "children": [24], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 16}}, {"id": 24, "type": "identifier", "text": "ZRAM_COMP_LZO", "parent": 23, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 16}}, {"id": 25, "type": "enumerator", "text": "ZRAM_COMP_LZ4", "parent": 20, "children": [26], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 16}}, {"id": 26, "type": "identifier", "text": "ZRAM_COMP_LZ4", "parent": 25, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 16}}, {"id": 27, "type": "enumerator", "text": "ZRAM_COMP_UNKNOWN", "parent": 20, "children": [28], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 20}}, {"id": 28, "type": "identifier", "text": "ZRAM_COMP_UNKNOWN", "parent": 27, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 20}}, {"id": 29, "type": "enumerator", "text": "ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION", "parent": 20, "children": [30, 31, 32], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 47}}, {"id": 30, "type": "identifier", "text": "ZRAM_COMP_DEFAULT", "parent": 29, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 20}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 22}}, {"id": 32, "type": "identifier", "text": "ZRAM_DEFAULT_COMPRESSION", "parent": 29, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 47}}, {"id": 33, "type": "declaration", "text": "extern const char* ZRAM_COMPRESSION_DESC[];", "parent": 0, "children": [34, 36, 37], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 43}}, {"id": 34, "type": "storage_class_specifier", "text": "extern", "parent": 33, "children": [35], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 35, "type": "extern", "text": "extern", "parent": 34, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 36, "type": "primitive_type", "text": "char", "parent": 33, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 17}}, {"id": 37, "type": "pointer_declarator", "text": "* ZRAM_COMPRESSION_DESC[]", "parent": 33, "children": [38, 39], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 42}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 39, "type": "array_declarator", "text": "ZRAM_COMPRESSION_DESC[]", "parent": 37, "children": [40], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 42}}, {"id": 40, "type": "identifier", "text": "ZRAM_COMPRESSION_DESC", "parent": 39, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 40}}, {"id": 41, "type": "enum_specifier", "text": "enum {\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n}", "parent": 0, "children": [42, 43], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 42, "type": "enum", "text": "enum", "parent": 41, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 4}}, {"id": 43, "type": "enumerator_list", "text": "{\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n}", "parent": 41, "children": [44, 48, 52, 56, 60, 64, 68, 70], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 43, "column": 1}}, {"id": 44, "type": "enumerator", "text": "ZRAM_TYPE_NONE = 0x0", "parent": 43, "children": [45, 46, 47], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 29}}, {"id": 45, "type": "identifier", "text": "ZRAM_TYPE_NONE", "parent": 44, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 17}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 25}}, {"id": 47, "type": "number_literal", "text": "0x0", "parent": 44, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 29}}, {"id": 48, "type": "enumerator", "text": "ZRAM_TYPE_SWAP = 0x1", "parent": 43, "children": [49, 50, 51], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 29}}, {"id": 49, "type": "identifier", "text": "ZRAM_TYPE_SWAP", "parent": 48, "children": [], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 17}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 25}}, {"id": 51, "type": "number_literal", "text": "0x1", "parent": 48, "children": [], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 29}}, {"id": 52, "type": "enumerator", "text": "ZRAM_TYPE_DISK = 0x2", "parent": 43, "children": [53, 54, 55], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 29}}, {"id": 53, "type": "identifier", "text": "ZRAM_TYPE_DISK", "parent": 52, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 17}}, {"id": 54, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 25}}, {"id": 55, "type": "number_literal", "text": "0x2", "parent": 52, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 29}}, {"id": 56, "type": "enumerator", "text": "ZRAM_TYPE_DISK_EXT2 = 0x4", "parent": 43, "children": [57, 58, 59], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 29}}, {"id": 57, "type": "identifier", "text": "ZRAM_TYPE_DISK_EXT2", "parent": 56, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 22}}, {"id": 58, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 25}}, {"id": 59, "type": "number_literal", "text": "0x4", "parent": 56, "children": [], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 29}}, {"id": 60, "type": "enumerator", "text": "ZRAM_TYPE_DISK_EXT4 = 0x8", "parent": 43, "children": [61, 62, 63], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 29}}, {"id": 61, "type": "identifier", "text": "ZRAM_TYPE_DISK_EXT4", "parent": 60, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 22}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 25}}, {"id": 63, "type": "number_literal", "text": "0x8", "parent": 60, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 29}}, {"id": 64, "type": "enumerator", "text": "ZRAM_TYPE_DISK_BTRFS = 0x10", "parent": 43, "children": [65, 66, 67], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 30}}, {"id": 65, "type": "identifier", "text": "ZRAM_TYPE_DISK_BTRFS", "parent": 64, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 23}}, {"id": 66, "type": "=", "text": "=", "parent": 64, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 25}}, {"id": 67, "type": "number_literal", "text": "0x10", "parent": 64, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 30}}, {"id": 68, "type": "enumerator", "text": "ZRAM_TYPE__DUMMY", "parent": 43, "children": [69], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 19}}, {"id": 69, "type": "identifier", "text": "ZRAM_TYPE__DUMMY", "parent": 68, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 19}}, {"id": 70, "type": "enumerator", "text": "ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )", "parent": 43, "children": [71, 72, 73], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 42, "column": 4}}, {"id": 71, "type": "identifier", "text": "ZRAM_TYPE_FSTYPE_MASK", "parent": 70, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 24}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 26}}, {"id": 73, "type": "parenthesized_expression", "text": "(\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )", "parent": 70, "children": [74], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 42, "column": 4}}, {"id": 74, "type": "binary_expression", "text": "ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS", "parent": 73, "children": [75, 78], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 70}}, {"id": 75, "type": "binary_expression", "text": "ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4", "parent": 74, "children": [76, 77], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 47}}, {"id": 76, "type": "identifier", "text": "ZRAM_TYPE_DISK_EXT2", "parent": 75, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 25}}, {"id": 77, "type": "identifier", "text": "ZRAM_TYPE_DISK_EXT4", "parent": 75, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 47}}, {"id": 78, "type": "identifier", "text": "ZRAM_TYPE_DISK_BTRFS", "parent": 74, "children": [], "start_point": {"row": 41, "column": 50}, "end_point": {"row": 41, "column": 70}}, {"id": 79, "type": "enum_specifier", "text": "enum {\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n}", "parent": 0, "children": [80, 81], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 80, "type": "enum", "text": "enum", "parent": 79, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 4}}, {"id": 81, "type": "enumerator_list", "text": "{\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n}", "parent": 79, "children": [82, 86, 90, 94, 98], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 52, "column": 1}}, {"id": 82, "type": "enumerator", "text": "ZRAM_STATUS_NONE = 0", "parent": 81, "children": [83, 84, 85], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 30}}, {"id": 83, "type": "identifier", "text": "ZRAM_STATUS_NONE", "parent": 82, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 19}}, {"id": 84, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 28}}, {"id": 85, "type": "number_literal", "text": "0", "parent": 82, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 86, "type": "enumerator", "text": "ZRAM_STATUS_INITIALIZED = 0x1", "parent": 81, "children": [87, 88, 89], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 32}}, {"id": 87, "type": "identifier", "text": "ZRAM_STATUS_INITIALIZED", "parent": 86, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 26}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 28}}, {"id": 89, "type": "number_literal", "text": "0x1", "parent": 86, "children": [], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 32}}, {"id": 90, "type": "enumerator", "text": "ZRAM_STATUS_CLAIMED = 0x2", "parent": 81, "children": [91, 92, 93], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 32}}, {"id": 91, "type": "identifier", "text": "ZRAM_STATUS_CLAIMED", "parent": 90, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 22}}, {"id": 92, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 28}}, {"id": 93, "type": "number_literal", "text": "0x2", "parent": 90, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 32}}, {"id": 94, "type": "enumerator", "text": "ZRAM_STATUS_INUSE = 0x4", "parent": 81, "children": [95, 96, 97], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 32}}, {"id": 95, "type": "identifier", "text": "ZRAM_STATUS_INUSE", "parent": 94, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 20}}, {"id": 96, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 28}}, {"id": 97, "type": "number_literal", "text": "0x4", "parent": 94, "children": [], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 32}}, {"id": 98, "type": "enumerator", "text": "ZRAM_STATUS__DUMMY", "parent": 81, "children": [99], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 21}}, {"id": 99, "type": "identifier", "text": "ZRAM_STATUS__DUMMY", "parent": 98, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 21}}, {"id": 100, "type": "struct_specifier", "text": "struct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n}", "parent": 0, "children": [101, 102], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 101, "type": "struct", "text": "struct", "parent": 100, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 102, "type": "type_identifier", "text": "zram_dev_info", "parent": 100, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 20}}, {"id": 103, "type": "field_declaration", "text": "unsigned type;", "parent": 100, "children": [104, 106], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 22}}, {"id": 104, "type": "sized_type_specifier", "text": "unsigned", "parent": 103, "children": [105], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 11}}, {"id": 105, "type": "unsigned", "text": "unsigned", "parent": 104, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 11}}, {"id": 106, "type": "field_identifier", "text": "type", "parent": 103, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 21}}, {"id": 107, "type": "field_declaration", "text": "char* name;", "parent": 100, "children": [108, 109], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 22}}, {"id": 108, "type": "primitive_type", "text": "char", "parent": 107, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 7}}, {"id": 109, "type": "pointer_declarator", "text": "* name", "parent": 107, "children": [110, 111], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 21}}, {"id": 110, "type": "*", "text": "*", "parent": 109, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 8}}, {"id": 111, "type": "field_identifier", "text": "name", "parent": 109, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 21}}, {"id": 112, "type": "field_declaration", "text": "char* path;", "parent": 100, "children": [113, 114], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 22}}, {"id": 113, "type": "primitive_type", "text": "char", "parent": 112, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 7}}, {"id": 114, "type": "pointer_declarator", "text": "* path", "parent": 112, "children": [115, 116], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 21}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 8}}, {"id": 116, "type": "field_identifier", "text": "path", "parent": 114, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 21}}, {"id": 117, "type": "field_declaration", "text": "char* devpath;", "parent": 100, "children": [118, 119], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 25}}, {"id": 118, "type": "primitive_type", "text": "char", "parent": 117, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 7}}, {"id": 119, "type": "pointer_declarator", "text": "* devpath", "parent": 117, "children": [120, 121], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 24}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 8}}, {"id": 121, "type": "field_identifier", "text": "devpath", "parent": 119, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 24}}, {"id": 122, "type": "field_declaration", "text": "int comp_algorithm;", "parent": 100, "children": [123, 124], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 32}}, {"id": 123, "type": "primitive_type", "text": "int", "parent": 122, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 6}}, {"id": 124, "type": "field_identifier", "text": "comp_algorithm", "parent": 122, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 31}}, {"id": 125, "type": "field_declaration", "text": "char* fslabel;", "parent": 100, "children": [126, 127], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 25}}, {"id": 126, "type": "primitive_type", "text": "char", "parent": 125, "children": [], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 7}}, {"id": 127, "type": "pointer_declarator", "text": "* fslabel", "parent": 125, "children": [128, 129], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 24}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 8}}, {"id": 129, "type": "field_identifier", "text": "fslabel", "parent": 127, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 24}}, {"id": 130, "type": "field_declaration", "text": "uint8_t identifier;", "parent": 100, "children": [131, 132], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 28}}, {"id": 131, "type": "primitive_type", "text": "uint8_t", "parent": 130, "children": [], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 10}}, {"id": 132, "type": "field_identifier", "text": "identifier", "parent": 130, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 27}}, {"id": 133, "type": "field_declaration", "text": "size_t size_m;", "parent": 100, "children": [134, 135], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 24}}, {"id": 134, "type": "primitive_type", "text": "size_t", "parent": 133, "children": [], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 9}}, {"id": 135, "type": "field_identifier", "text": "size_m", "parent": 133, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 23}}, {"id": 136, "type": "field_declaration", "text": "uint_fast8_t status;", "parent": 100, "children": [137, 138], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 24}}, {"id": 137, "type": "type_identifier", "text": "uint_fast8_t", "parent": 136, "children": [], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 15}}, {"id": 138, "type": "field_identifier", "text": "status", "parent": 136, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 23}}, {"id": 139, "type": "preproc_if", "text": "#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif", "parent": 100, "children": [140, 141, 142, 143, 146], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 140, "type": "#if", "text": "#if", "parent": 139, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 3}}, {"id": 141, "type": "identifier", "text": "ZRAM_EXPORT_SIZE_B", "parent": 139, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 22}}, {"id": 142, "type": "\n", "text": "\n", "parent": 139, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 67, "column": 0}}, {"id": 143, "type": "field_declaration", "text": "size_t size_b;", "parent": 139, "children": [144, 145], "start_point": {"row": 68, "column": 3}, "end_point": {"row": 68, "column": 24}}, {"id": 144, "type": "primitive_type", "text": "size_t", "parent": 143, "children": [], "start_point": {"row": 68, "column": 3}, "end_point": {"row": 68, "column": 9}}, {"id": 145, "type": "field_identifier", "text": "size_b", "parent": 143, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 23}}, {"id": 146, "type": "#endif", "text": "#endif", "parent": 139, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 147, "type": "declaration", "text": "void zram_dev_info_free ( struct zram_dev_info* const p_dev );", "parent": 0, "children": [148, 149], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 62}}, {"id": 148, "type": "primitive_type", "text": "void", "parent": 147, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 4}}, {"id": 149, "type": "function_declarator", "text": "zram_dev_info_free ( struct zram_dev_info* const p_dev )", "parent": 147, "children": [150, 151], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 61}}, {"id": 150, "type": "identifier", "text": "zram_dev_info_free", "parent": 149, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 23}}, {"id": 151, "type": "parameter_list", "text": "( struct zram_dev_info* const p_dev )", "parent": 149, "children": [152], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 61}}, {"id": 152, "type": "parameter_declaration", "text": "struct zram_dev_info* const p_dev", "parent": 151, "children": [153, 156], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 59}}, {"id": 153, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 152, "children": [154, 155], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 46}}, {"id": 154, "type": "struct", "text": "struct", "parent": 153, "children": [], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 32}}, {"id": 155, "type": "type_identifier", "text": "zram_dev_info", "parent": 153, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 46}}, {"id": 156, "type": "pointer_declarator", "text": "* const p_dev", "parent": 152, "children": [157, 158], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 59}}, {"id": 157, "type": "*", "text": "*", "parent": 156, "children": [], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 47}}, {"id": 158, "type": "identifier", "text": "p_dev", "parent": 156, "children": [], "start_point": {"row": 73, "column": 54}, "end_point": {"row": 73, "column": 59}}, {"id": 159, "type": "declaration", "text": "__attribute__((warn_unused_result))\nstruct zram_dev_info* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n);", "parent": 0, "children": [160, 164, 167], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 78, "column": 2}}, {"id": 160, "type": "attribute_specifier", "text": "__attribute__((warn_unused_result))", "parent": 159, "children": [161, 162], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 35}}, {"id": 161, "type": "__attribute__", "text": "__attribute__", "parent": 160, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 13}}, {"id": 162, "type": "argument_list", "text": "(warn_unused_result)", "parent": 160, "children": [163], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 34}}, {"id": 163, "type": "identifier", "text": "warn_unused_result", "parent": 162, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 33}}, {"id": 164, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 159, "children": [165, 166], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 20}}, {"id": 165, "type": "struct", "text": "struct", "parent": 164, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 6}}, {"id": 166, "type": "type_identifier", "text": "zram_dev_info", "parent": 164, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 20}}, {"id": 167, "type": "pointer_declarator", "text": "* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n)", "parent": 159, "children": [168, 169], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 78, "column": 1}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 21}}, {"id": 169, "type": "function_declarator", "text": "zram_dev_info_new_from_identifier (\n const uint8_t identifier\n)", "parent": 167, "children": [170, 171], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 78, "column": 1}}, {"id": 170, "type": "identifier", "text": "zram_dev_info_new_from_identifier", "parent": 169, "children": [], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 55}}, {"id": 171, "type": "parameter_list", "text": "(\n const uint8_t identifier\n)", "parent": 169, "children": [172], "start_point": {"row": 76, "column": 56}, "end_point": {"row": 78, "column": 1}}, {"id": 172, "type": "parameter_declaration", "text": "const uint8_t identifier", "parent": 171, "children": [173, 174], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 27}}, {"id": 173, "type": "primitive_type", "text": "uint8_t", "parent": 172, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 16}}, {"id": 174, "type": "identifier", "text": "identifier", "parent": 172, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 27}}, {"id": 175, "type": "declaration", "text": "size_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev );", "parent": 0, "children": [176, 177], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 71}}, {"id": 176, "type": "primitive_type", "text": "size_t", "parent": 175, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 177, "type": "function_declarator", "text": "get_zram_dev_size_b ( const struct zram_dev_info* const p_dev )", "parent": 175, "children": [178, 179], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 70}}, {"id": 178, "type": "identifier", "text": "get_zram_dev_size_b", "parent": 177, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 26}}, {"id": 179, "type": "parameter_list", "text": "( const struct zram_dev_info* const p_dev )", "parent": 177, "children": [180], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 70}}, {"id": 180, "type": "parameter_declaration", "text": "const struct zram_dev_info* const p_dev", "parent": 179, "children": [181, 184], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 68}}, {"id": 181, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 180, "children": [182, 183], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 55}}, {"id": 182, "type": "struct", "text": "struct", "parent": 181, "children": [], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 41}}, {"id": 183, "type": "type_identifier", "text": "zram_dev_info", "parent": 181, "children": [], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 55}}, {"id": 184, "type": "pointer_declarator", "text": "* const p_dev", "parent": 180, "children": [185, 186], "start_point": {"row": 80, "column": 55}, "end_point": {"row": 80, "column": 68}}, {"id": 185, "type": "*", "text": "*", "parent": 184, "children": [], "start_point": {"row": 80, "column": 55}, "end_point": {"row": 80, "column": 56}}, {"id": 186, "type": "identifier", "text": "p_dev", "parent": 184, "children": [], "start_point": {"row": 80, "column": 63}, "end_point": {"row": 80, "column": 68}}, {"id": 187, "type": "declaration", "text": "void zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n);", "parent": 0, "children": [188, 189], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 84, "column": 2}}, {"id": 188, "type": "primitive_type", "text": "void", "parent": 187, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 4}}, {"id": 189, "type": "function_declarator", "text": "zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n)", "parent": 187, "children": [190, 191], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 84, "column": 1}}, {"id": 190, "type": "identifier", "text": "zram_dev_set_size_b", "parent": 189, "children": [], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 24}}, {"id": 191, "type": "parameter_list", "text": "(\n struct zram_dev_info* const p_dev, const size_t size_b\n)", "parent": 189, "children": [192, 199], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 84, "column": 1}}, {"id": 192, "type": "parameter_declaration", "text": "struct zram_dev_info* const p_dev", "parent": 191, "children": [193, 196], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 36}}, {"id": 193, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 192, "children": [194, 195], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 23}}, {"id": 194, "type": "struct", "text": "struct", "parent": 193, "children": [], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 9}}, {"id": 195, "type": "type_identifier", "text": "zram_dev_info", "parent": 193, "children": [], "start_point": {"row": 83, "column": 10}, "end_point": {"row": 83, "column": 23}}, {"id": 196, "type": "pointer_declarator", "text": "* const p_dev", "parent": 192, "children": [197, 198], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 36}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 24}}, {"id": 198, "type": "identifier", "text": "p_dev", "parent": 196, "children": [], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 36}}, {"id": 199, "type": "parameter_declaration", "text": "const size_t size_b", "parent": 191, "children": [200, 201], "start_point": {"row": 83, "column": 38}, "end_point": {"row": 83, "column": 57}}, {"id": 200, "type": "primitive_type", "text": "size_t", "parent": 199, "children": [], "start_point": {"row": 83, "column": 44}, "end_point": {"row": 83, "column": 50}}, {"id": 201, "type": "identifier", "text": "size_b", "parent": 199, "children": [], "start_point": {"row": 83, "column": 51}, "end_point": {"row": 83, "column": 57}}, {"id": 202, "type": "declaration", "text": "__attribute__((pure))\nconst char* zram_get_comp_desc ( const int algi );", "parent": 0, "children": [203, 207, 208], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 87, "column": 53}}, {"id": 203, "type": "attribute_specifier", "text": "__attribute__((pure))", "parent": 202, "children": [204, 205], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 21}}, {"id": 204, "type": "__attribute__", "text": "__attribute__", "parent": 203, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 13}}, {"id": 205, "type": "argument_list", "text": "(pure)", "parent": 203, "children": [206], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 20}}, {"id": 206, "type": "identifier", "text": "pure", "parent": 205, "children": [], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 19}}, {"id": 207, "type": "primitive_type", "text": "char", "parent": 202, "children": [], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 10}}, {"id": 208, "type": "pointer_declarator", "text": "* zram_get_comp_desc ( const int algi )", "parent": 202, "children": [209, 210], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 52}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 11}}, {"id": 210, "type": "function_declarator", "text": "zram_get_comp_desc ( const int algi )", "parent": 208, "children": [211, 212], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 52}}, {"id": 211, "type": "identifier", "text": "zram_get_comp_desc", "parent": 210, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 30}}, {"id": 212, "type": "parameter_list", "text": "( const int algi )", "parent": 210, "children": [213], "start_point": {"row": 87, "column": 34}, "end_point": {"row": 87, "column": 52}}, {"id": 213, "type": "parameter_declaration", "text": "const int algi", "parent": 212, "children": [214, 215], "start_point": {"row": 87, "column": 36}, "end_point": {"row": 87, "column": 50}}, {"id": 214, "type": "primitive_type", "text": "int", "parent": 213, "children": [], "start_point": {"row": 87, "column": 42}, "end_point": {"row": 87, "column": 45}}, {"id": 215, "type": "identifier", "text": "algi", "parent": 213, "children": [], "start_point": {"row": 87, "column": 46}, "end_point": {"row": 87, "column": 50}}, {"id": 216, "type": "declaration", "text": "const char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev );", "parent": 0, "children": [217, 218], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 78}}, {"id": 217, "type": "primitive_type", "text": "char", "parent": 216, "children": [], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 10}}, {"id": 218, "type": "pointer_declarator", "text": "* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev )", "parent": 216, "children": [219, 220], "start_point": {"row": 88, "column": 10}, "end_point": {"row": 88, "column": 77}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 88, "column": 10}, "end_point": {"row": 88, "column": 11}}, {"id": 220, "type": "function_declarator", "text": "zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev )", "parent": 218, "children": [221, 222], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 77}}, {"id": 221, "type": "identifier", "text": "zram_get_comp_desc_of", "parent": 220, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 33}}, {"id": 222, "type": "parameter_list", "text": "( const struct zram_dev_info* const p_dev )", "parent": 220, "children": [223], "start_point": {"row": 88, "column": 34}, "end_point": {"row": 88, "column": 77}}, {"id": 223, "type": "parameter_declaration", "text": "const struct zram_dev_info* const p_dev", "parent": 222, "children": [224, 227], "start_point": {"row": 88, "column": 36}, "end_point": {"row": 88, "column": 75}}, {"id": 224, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 223, "children": [225, 226], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 62}}, {"id": 225, "type": "struct", "text": "struct", "parent": 224, "children": [], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 48}}, {"id": 226, "type": "type_identifier", "text": "zram_dev_info", "parent": 224, "children": [], "start_point": {"row": 88, "column": 49}, "end_point": {"row": 88, "column": 62}}, {"id": 227, "type": "pointer_declarator", "text": "* const p_dev", "parent": 223, "children": [228, 229], "start_point": {"row": 88, "column": 62}, "end_point": {"row": 88, "column": 75}}, {"id": 228, "type": "*", "text": "*", "parent": 227, "children": [], "start_point": {"row": 88, "column": 62}, "end_point": {"row": 88, "column": 63}}, {"id": 229, "type": "identifier", "text": "p_dev", "parent": 227, "children": [], "start_point": {"row": 88, "column": 70}, "end_point": {"row": 88, "column": 75}}, {"id": 230, "type": "declaration", "text": "__attribute__((warn_unused_result))\nchar* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev );", "parent": 0, "children": [231, 235, 236], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 91, "column": 73}}, {"id": 231, "type": "attribute_specifier", "text": "__attribute__((warn_unused_result))", "parent": 230, "children": [232, 233], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 35}}, {"id": 232, "type": "__attribute__", "text": "__attribute__", "parent": 231, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 13}}, {"id": 233, "type": "argument_list", "text": "(warn_unused_result)", "parent": 231, "children": [234], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 34}}, {"id": 234, "type": "identifier", "text": "warn_unused_result", "parent": 233, "children": [], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 33}}, {"id": 235, "type": "primitive_type", "text": "char", "parent": 230, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 4}}, {"id": 236, "type": "pointer_declarator", "text": "* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev )", "parent": 230, "children": [237, 238], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 72}}, {"id": 237, "type": "*", "text": "*", "parent": 236, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 5}}, {"id": 238, "type": "function_declarator", "text": "zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev )", "parent": 236, "children": [239, 240], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 72}}, {"id": 239, "type": "identifier", "text": "zram_get_zdisk_devpath", "parent": 238, "children": [], "start_point": {"row": 91, "column": 6}, "end_point": {"row": 91, "column": 28}}, {"id": 240, "type": "parameter_list", "text": "( const struct zram_dev_info* const p_dev )", "parent": 238, "children": [241], "start_point": {"row": 91, "column": 29}, "end_point": {"row": 91, "column": 72}}, {"id": 241, "type": "parameter_declaration", "text": "const struct zram_dev_info* const p_dev", "parent": 240, "children": [242, 245], "start_point": {"row": 91, "column": 31}, "end_point": {"row": 91, "column": 70}}, {"id": 242, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 241, "children": [243, 244], "start_point": {"row": 91, "column": 37}, "end_point": {"row": 91, "column": 57}}, {"id": 243, "type": "struct", "text": "struct", "parent": 242, "children": [], "start_point": {"row": 91, "column": 37}, "end_point": {"row": 91, "column": 43}}, {"id": 244, "type": "type_identifier", "text": "zram_dev_info", "parent": 242, "children": [], "start_point": {"row": 91, "column": 44}, "end_point": {"row": 91, "column": 57}}, {"id": 245, "type": "pointer_declarator", "text": "* const p_dev", "parent": 241, "children": [246, 247], "start_point": {"row": 91, "column": 57}, "end_point": {"row": 91, "column": 70}}, {"id": 246, "type": "*", "text": "*", "parent": 245, "children": [], "start_point": {"row": 91, "column": 57}, "end_point": {"row": 91, "column": 58}}, {"id": 247, "type": "identifier", "text": "p_dev", "parent": 245, "children": [], "start_point": {"row": 91, "column": 65}, "end_point": {"row": 91, "column": 70}}, {"id": 248, "type": "declaration", "text": "void zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n);", "parent": 0, "children": [249, 250], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 95, "column": 2}}, {"id": 249, "type": "primitive_type", "text": "void", "parent": 248, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 4}}, {"id": 250, "type": "function_declarator", "text": "zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n)", "parent": 248, "children": [251, 252], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 95, "column": 1}}, {"id": 251, "type": "identifier", "text": "zram_dev_info_set_fstype", "parent": 250, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 29}}, {"id": 252, "type": "parameter_list", "text": "(\n struct zram_dev_info* const p_dev, int fstype\n)", "parent": 250, "children": [253, 260], "start_point": {"row": 93, "column": 30}, "end_point": {"row": 95, "column": 1}}, {"id": 253, "type": "parameter_declaration", "text": "struct zram_dev_info* const p_dev", "parent": 252, "children": [254, 257], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 36}}, {"id": 254, "type": "struct_specifier", "text": "struct zram_dev_info", "parent": 253, "children": [255, 256], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 23}}, {"id": 255, "type": "struct", "text": "struct", "parent": 254, "children": [], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 9}}, {"id": 256, "type": "type_identifier", "text": "zram_dev_info", "parent": 254, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 23}}, {"id": 257, "type": "pointer_declarator", "text": "* const p_dev", "parent": 253, "children": [258, 259], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 36}}, {"id": 258, "type": "*", "text": "*", "parent": 257, "children": [], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 24}}, {"id": 259, "type": "identifier", "text": "p_dev", "parent": 257, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 36}}, {"id": 260, "type": "parameter_declaration", "text": "int fstype", "parent": 252, "children": [261, 262], "start_point": {"row": 94, "column": 38}, "end_point": {"row": 94, "column": 48}}, {"id": 261, "type": "primitive_type", "text": "int", "parent": 260, "children": [], "start_point": {"row": 94, "column": 38}, "end_point": {"row": 94, "column": 41}}, {"id": 262, "type": "identifier", "text": "fstype", "parent": 260, "children": [], "start_point": {"row": 94, "column": 42}, "end_point": {"row": 94, "column": 48}}, {"id": 263, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 6}}]}, "node_categories": {"declarations": {"functions": [149, 169, 177, 189, 210, 220, 238, 250], "variables": [33, 103, 107, 112, 117, 122, 125, 130, 133, 136, 143, 147, 152, 159, 172, 175, 180, 187, 192, 199, 202, 213, 216, 223, 230, 241, 248, 253, 260], "classes": [34, 100, 101, 153, 154, 164, 165, 181, 182, 193, 194, 224, 225, 242, 243, 254, 255], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": [18, 19, 20, 21, 23, 25, 27, 29, 41, 42, 43, 44, 48, 52, 56, 60, 64, 68, 70, 79, 80, 81, 82, 86, 90, 94, 98]}, "statements": {"expressions": [73, 74, 75], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 22, 24, 26, 28, 30, 32, 40, 45, 49, 53, 57, 61, 65, 69, 71, 76, 77, 78, 83, 87, 91, 95, 99, 102, 104, 106, 111, 116, 121, 124, 129, 132, 135, 137, 138, 139, 140, 141, 145, 146, 150, 155, 158, 160, 163, 166, 170, 174, 178, 183, 186, 190, 195, 198, 201, 203, 206, 211, 215, 221, 226, 229, 231, 234, 239, 244, 247, 251, 256, 259, 262, 263], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 47, 51, 55, 59, 63, 67, 85, 89, 93, 97], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 149, "universal_type": "function", "name": "zram_dev_info*", "text_snippet": "zram_dev_info_free ( struct zram_dev_info* const p_dev )"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "zram_dev_info_new_from_identifier (\n const uint8_t identifier\n)"}, {"node_id": 177, "universal_type": "function", "name": "zram_dev_info*", "text_snippet": "get_zram_dev_size_b ( const struct zram_dev_info* const p_dev )"}, {"node_id": 189, "universal_type": "function", "name": "zram_dev_info*", "text_snippet": "zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n)"}, {"node_id": 210, "universal_type": "function", "name": "algi", "text_snippet": "zram_get_comp_desc ( const int algi )"}, {"node_id": 220, "universal_type": "function", "name": "zram_dev_info*", "text_snippet": "zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev )"}, {"node_id": 238, "universal_type": "function", "name": "zram_dev_info*", "text_snippet": "zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev )"}, {"node_id": 250, "universal_type": "function", "name": "zram_dev_info*", "text_snippet": "zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n)"}], "class_declarations": [{"node_id": 34, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 100, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char*"}, {"node_id": 101, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 153, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 154, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 164, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 165, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 181, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 182, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 193, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 194, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 224, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 225, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 242, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 243, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 254, "universal_type": "class", "name": "zram_dev_info", "text_snippet": "struct zram_dev_info"}, {"node_id": 255, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <sys/types.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"globals.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"config.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2014-2015 <NAME> <<EMAIL>>\n *\n * Distributed under the terms of the MIT license.\n * (See LICENSE.MIT or http://opensource.org/licenses/MIT)\n */\n\n#ifndef _ZRAM_DATA_TYPES_H_\n#define _ZRAM_DATA_TYPES_H_\n\n#include <stdint.h>\n#include <sys/types.h>\n\n#include \"globals.h\"\n#include \"config.h\"\n\n\nenum {\n ZRAM_COMP_NONE,\n\n ZRAM_COMP_LZO,\n ZRAM_COMP_LZ4,\n\n ZRAM_COMP_UNKNOWN,\n\n ZRAM_COMP_DEFAULT = ZRAM_DEFAULT_COMPRESSION\n};\n\nextern const char* ZRAM_COMPRESSION_DESC[];\n\nenum {\n ZRAM_TYPE_NONE = 0x0,\n ZRAM_TYPE_SWAP = 0x1,\n\n ZRAM_TYPE_DISK = 0x2,\n ZRAM_TYPE_DISK_EXT2 = 0x4,\n ZRAM_TYPE_DISK_EXT4 = 0x8,\n ZRAM_TYPE_DISK_BTRFS = 0x10,\n\n ZRAM_TYPE__DUMMY,\n ZRAM_TYPE_FSTYPE_MASK = (\n ZRAM_TYPE_DISK_EXT2 | ZRAM_TYPE_DISK_EXT4 | ZRAM_TYPE_DISK_BTRFS\n )\n};\n\nenum {\n ZRAM_STATUS_NONE = 0,\n ZRAM_STATUS_INITIALIZED = 0x1,\n ZRAM_STATUS_CLAIMED = 0x2,\n ZRAM_STATUS_INUSE = 0x4,\n\n ZRAM_STATUS__DUMMY\n};\n\nstruct zram_dev_info {\n unsigned type;\n char* name;\n char* path;\n char* devpath;\n int comp_algorithm;\n char* fslabel;\n /* <= 255 identifiers */\n uint8_t identifier;\n size_t size_m;\n uint_fast8_t status;\n\n#if ZRAM_EXPORT_SIZE_B\n /** size in bytes, only set after allocating the device */\n size_t size_b;\n#endif\n};\n\n\nvoid zram_dev_info_free ( struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nstruct zram_dev_info* zram_dev_info_new_from_identifier (\n const uint8_t identifier\n);\n\nsize_t get_zram_dev_size_b ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_set_size_b (\n struct zram_dev_info* const p_dev, const size_t size_b\n);\n\n__attribute__((pure))\nconst char* zram_get_comp_desc ( const int algi );\nconst char* zram_get_comp_desc_of ( const struct zram_dev_info* const p_dev );\n\n__attribute__((warn_unused_result))\nchar* zram_get_zdisk_devpath ( const struct zram_dev_info* const p_dev );\n\nvoid zram_dev_info_set_fstype (\n struct zram_dev_info* const p_dev, int fstype\n);\n\n#endif /* _ZRAM_DATA_TYPES_H_ */\n"}
276
c
/*++ Copyright (c) 2011 Microsoft Corporation Module Name: bit_blaster_rewriter.h Abstract: Bit-blasting rewriter Author: Leonardo (leonardo) 2012-10-04 Notes: --*/ #pragma once #include "ast/ast.h" #include "util/obj_hashtable.h" #include "util/params.h" class bit_blaster_rewriter { struct imp; imp * m_imp; public: bit_blaster_rewriter(ast_manager & m, params_ref const & p); ~bit_blaster_rewriter(); void updt_params(params_ref const & p); ast_manager & m() const; unsigned get_num_steps() const; void cleanup(); void start_rewrite(); void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits); void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits); void operator()(expr * e, expr_ref & result, proof_ref & result_proof); void push(); void pop(unsigned num_scopes); unsigned get_num_scopes() const; private: obj_map<func_decl, expr*> const& const2bits() const; };
28.94
34
(translation_unit) "/*++\nCopyright (c) 2011 Microsoft Corporation\n\nModule Name:\n\n bit_blaster_rewriter.h\n\nAbstract:\n\n Bit-blasting rewriter\n\nAuthor:\n\n Leonardo (leonardo) 2012-10-04\n\nNotes:\n\n--*/\n#pragma once\n\n#include "ast/ast.h"\n#include "util/obj_hashtable.h"\n#include "util/params.h"\n\nclass bit_blaster_rewriter {\n struct imp;\n imp * m_imp;\npublic:\n bit_blaster_rewriter(ast_manager & m, params_ref const & p);\n ~bit_blaster_rewriter();\n void updt_params(params_ref const & p);\n ast_manager & m() const;\n unsigned get_num_steps() const;\n void cleanup();\n void start_rewrite();\n void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void operator()(expr * e, expr_ref & result, proof_ref & result_proof);\n void push();\n void pop(unsigned num_scopes);\n unsigned get_num_scopes() const;\nprivate:\n obj_map<func_decl, expr*> const& const2bits() const; \n\n};\n\n\n" (comment) "/*++\nCopyright (c) 2011 Microsoft Corporation\n\nModule Name:\n\n bit_blaster_rewriter.h\n\nAbstract:\n\n Bit-blasting rewriter\n\nAuthor:\n\n Leonardo (leonardo) 2012-10-04\n\nNotes:\n\n--*/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "ast/ast.h"\n" (#include) "#include" (string_literal) ""ast/ast.h"" (") """ (string_content) "ast/ast.h" (") """ (preproc_include) "#include "util/obj_hashtable.h"\n" (#include) "#include" (string_literal) ""util/obj_hashtable.h"" (") """ (string_content) "util/obj_hashtable.h" (") """ (preproc_include) "#include "util/params.h"\n" (#include) "#include" (string_literal) ""util/params.h"" (") """ (string_content) "util/params.h" (") """ (ERROR) "class bit_blaster_rewriter {\n struct imp;\n imp * m_imp;\npublic:\n bit_blaster_rewriter(ast_manager & m, params_ref const & p);\n ~bit_blaster_rewriter();\n void updt_params(params_ref const & p);\n ast_manager & m() const;\n unsigned get_num_steps() const;\n void cleanup();\n void start_rewrite();\n void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void operator()(expr * e, expr_ref & result, proof_ref & result_proof);\n void push();\n void pop(unsigned num_scopes);\n unsigned get_num_scopes() const;\nprivate:\n obj_map<func_decl, expr*> const& const2bits() const; \n\n};" (type_identifier) "class" (identifier) "bit_blaster_rewriter" ({) "{" (struct_specifier) "struct imp" (struct) "struct" (type_identifier) "imp" (;) ";" (declaration) "imp * m_imp;" (type_identifier) "imp" (pointer_declarator) "* m_imp" (*) "*" (identifier) "m_imp" (;) ";" (labeled_statement) "public:\n bit_blaster_rewriter(ast_manager & m, params_ref const & p);" (statement_identifier) "public" (:) ":" (expression_statement) "bit_blaster_rewriter(ast_manager & m, params_ref const & p);" (call_expression) "bit_blaster_rewriter(ast_manager & m, params_ref const & p)" (identifier) "bit_blaster_rewriter" (argument_list) "(ast_manager & m, params_ref const & p)" (() "(" (binary_expression) "ast_manager & m" (identifier) "ast_manager" (&) "&" (identifier) "m" (,) "," (binary_expression) "params_ref const & p" (identifier) "params_ref" (ERROR) "const" (identifier) "const" (&) "&" (identifier) "p" ()) ")" (;) ";" (expression_statement) "~bit_blaster_rewriter();" (unary_expression) "~bit_blaster_rewriter()" (~) "~" (call_expression) "bit_blaster_rewriter()" (identifier) "bit_blaster_rewriter" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void updt_params(params_ref const & p);" (primitive_type) "void" (function_declarator) "updt_params(params_ref const & p)" (identifier) "updt_params" (parameter_list) "(params_ref const & p)" (() "(" (parameter_declaration) "params_ref const & p" (type_identifier) "params_ref" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "p" ()) ")" (;) ";" (expression_statement) "ast_manager & m() const;" (binary_expression) "ast_manager & m() const" (identifier) "ast_manager" (&) "&" (ERROR) "m()" (call_expression) "m()" (identifier) "m" (argument_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (function_declarator) "get_num_steps()" (identifier) "get_num_steps" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n void cleanup();" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (primitive_type) "void" (function_declarator) "cleanup()" (identifier) "cleanup" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void start_rewrite();" (primitive_type) "void" (function_declarator) "start_rewrite()" (identifier) "start_rewrite" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);" (primitive_type) "void" (function_declarator) "end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)" (identifier) "end_rewrite" (parameter_list) "(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)" (() "(" (parameter_declaration) "obj_map<func_decl" (type_identifier) "obj_map" (ERROR) "<" (<) "<" (identifier) "func_decl" (,) "," (parameter_declaration) "expr*>& const2bits" (type_identifier) "expr" (pointer_declarator) "*>& const2bits" (*) "*" (ERROR) ">&" (>) ">" (&) "&" (identifier) "const2bits" (,) "," (parameter_declaration) "ptr_vector<func_decl> & newbits" (type_identifier) "ptr_vector" (ERROR) "<func_decl> &" (<) "<" (identifier) "func_decl" (>) ">" (&) "&" (identifier) "newbits" ()) ")" (;) ";" (declaration) "void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);" (primitive_type) "void" (function_declarator) "get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)" (identifier) "get_translation" (parameter_list) "(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)" (() "(" (parameter_declaration) "obj_map<func_decl" (type_identifier) "obj_map" (ERROR) "<" (<) "<" (identifier) "func_decl" (,) "," (parameter_declaration) "expr*>& const2bits" (type_identifier) "expr" (pointer_declarator) "*>& const2bits" (*) "*" (ERROR) ">&" (>) ">" (&) "&" (identifier) "const2bits" (,) "," (parameter_declaration) "ptr_vector<func_decl> & newbits" (type_identifier) "ptr_vector" (ERROR) "<func_decl> &" (<) "<" (identifier) "func_decl" (>) ">" (&) "&" (identifier) "newbits" ()) ")" (;) ";" (declaration) "void operator()(expr * e, expr_ref & result, proof_ref & result_proof);" (primitive_type) "void" (function_declarator) "operator()(expr * e, expr_ref & result, proof_ref & result_proof)" (function_declarator) "operator()" (identifier) "operator" (parameter_list) "()" (() "(" ()) ")" (parameter_list) "(expr * e, expr_ref & result, proof_ref & result_proof)" (() "(" (parameter_declaration) "expr * e" (type_identifier) "expr" (pointer_declarator) "* e" (*) "*" (identifier) "e" (,) "," (parameter_declaration) "expr_ref & result" (type_identifier) "expr_ref" (ERROR) "&" (&) "&" (identifier) "result" (,) "," (parameter_declaration) "proof_ref & result_proof" (type_identifier) "proof_ref" (ERROR) "&" (&) "&" (identifier) "result_proof" ()) ")" (;) ";" (declaration) "void push();" (primitive_type) "void" (function_declarator) "push()" (identifier) "push" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void pop(unsigned num_scopes);" (primitive_type) "void" (function_declarator) "pop(unsigned num_scopes)" (identifier) "pop" (parameter_list) "(unsigned num_scopes)" (() "(" (parameter_declaration) "unsigned num_scopes" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "num_scopes" ()) ")" (;) ";" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (ERROR) "get_num_scopes() const;\nprivate:\n obj_map<" (function_declarator) "get_num_scopes() const" (identifier) "get_num_scopes" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (identifier) "private" (:) ":" (identifier) "obj_map" (<) "<" (identifier) "func_decl" (,) "," (ERROR) "expr*> const&" (identifier) "expr" (*) "*" (>) ">" (const) "const" (&) "&" (function_declarator) "const2bits() const" (identifier) "const2bits" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (}) "}" (;) ";"
263
15
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 28.94, "nodes": 162, "errors": 0, "source_hash": "073db41987daafd6babb00be7406bcae4832b4845e8ecad736cbbeac8e743b44", "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": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"ast/ast.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"ast/ast.h\"", "parent": 3, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include \"util/obj_hashtable.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"util/obj_hashtable.h\"", "parent": 6, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 31}}, {"id": 9, "type": "preproc_include", "text": "#include \"util/params.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"util/params.h\"", "parent": 9, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 24}}, {"id": 12, "type": "ERROR", "text": "class bit_blaster_rewriter {\n struct imp;\n imp * m_imp;\npublic:\n bit_blaster_rewriter(ast_manager & m, params_ref const & p);\n ~bit_blaster_rewriter();\n void updt_params(params_ref const & p);\n ast_manager & m() const;\n unsigned get_num_steps() const;\n void cleanup();\n void start_rewrite();\n void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void operator()(expr * e, expr_ref & result, proof_ref & result_proof);\n void push();\n void pop(unsigned num_scopes);\n unsigned get_num_scopes() const;\nprivate:\n obj_map<func_decl, expr*> const& const2bits() const; \n\n};", "parent": null, "children": [13, 14, 17, 22, 37, 51, 53, 56, 61, 66, 90, 114, 132, 137, 146, 148, 154, 155, 159], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 44, "column": 2}}, {"id": 13, "type": "identifier", "text": "bit_blaster_rewriter", "parent": 12, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 26}}, {"id": 14, "type": "struct_specifier", "text": "struct imp", "parent": 12, "children": [15, 16], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 14}}, {"id": 15, "type": "struct", "text": "struct", "parent": 14, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 16, "type": "type_identifier", "text": "imp", "parent": 14, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 14}}, {"id": 17, "type": "declaration", "text": "imp * m_imp;", "parent": 12, "children": [18, 19], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 16}}, {"id": 18, "type": "type_identifier", "text": "imp", "parent": 17, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 7}}, {"id": 19, "type": "pointer_declarator", "text": "* m_imp", "parent": 17, "children": [20, 21], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 15}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 9}}, {"id": 21, "type": "identifier", "text": "m_imp", "parent": 19, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 15}}, {"id": 22, "type": "labeled_statement", "text": "public:\n bit_blaster_rewriter(ast_manager & m, params_ref const & p);", "parent": 12, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 64}}, {"id": 23, "type": "call_expression", "text": "bit_blaster_rewriter(ast_manager & m, params_ref const & p)", "parent": 22, "children": [24, 25], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 63}}, {"id": 24, "type": "identifier", "text": "bit_blaster_rewriter", "parent": 23, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 24}}, {"id": 25, "type": "argument_list", "text": "(ast_manager & m, params_ref const & p)", "parent": 23, "children": [26, 29], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 63}}, {"id": 26, "type": "binary_expression", "text": "ast_manager & m", "parent": 25, "children": [27, 28], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 40}}, {"id": 27, "type": "identifier", "text": "ast_manager", "parent": 26, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 36}}, {"id": 28, "type": "identifier", "text": "m", "parent": 26, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 40}}, {"id": 29, "type": "binary_expression", "text": "params_ref const & p", "parent": 25, "children": [30, 31], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 62}}, {"id": 30, "type": "identifier", "text": "params_ref", "parent": 29, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 52}}, {"id": 31, "type": "identifier", "text": "p", "parent": 29, "children": [], "start_point": {"row": 28, "column": 61}, "end_point": {"row": 28, "column": 62}}, {"id": 32, "type": "unary_expression", "text": "~bit_blaster_rewriter()", "parent": 12, "children": [33, 34], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 27}}, {"id": 33, "type": "~", "text": "~", "parent": 32, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 5}}, {"id": 34, "type": "call_expression", "text": "bit_blaster_rewriter()", "parent": 32, "children": [35, 36], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 27}}, {"id": 35, "type": "identifier", "text": "bit_blaster_rewriter", "parent": 34, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 25}}, {"id": 36, "type": "argument_list", "text": "()", "parent": 34, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 27}}, {"id": 37, "type": "declaration", "text": "void updt_params(params_ref const & p);", "parent": 12, "children": [38, 39], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 43}}, {"id": 38, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 39, "type": "function_declarator", "text": "updt_params(params_ref const & p)", "parent": 37, "children": [40, 41], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 42}}, {"id": 40, "type": "identifier", "text": "updt_params", "parent": 39, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 20}}, {"id": 41, "type": "parameter_list", "text": "(params_ref const & p)", "parent": 39, "children": [42], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 42}}, {"id": 42, "type": "parameter_declaration", "text": "params_ref const & p", "parent": 41, "children": [43, 44], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 41}}, {"id": 43, "type": "type_identifier", "text": "params_ref", "parent": 42, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 31}}, {"id": 44, "type": "identifier", "text": "p", "parent": 42, "children": [], "start_point": {"row": 30, "column": 40}, "end_point": {"row": 30, "column": 41}}, {"id": 45, "type": "binary_expression", "text": "ast_manager & m() const", "parent": 12, "children": [46, 47], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 27}}, {"id": 46, "type": "identifier", "text": "ast_manager", "parent": 45, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 15}}, {"id": 47, "type": "ERROR", "text": "m()", "parent": 45, "children": [48], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 21}}, {"id": 48, "type": "call_expression", "text": "m()", "parent": 47, "children": [49, 50], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 21}}, {"id": 49, "type": "identifier", "text": "m", "parent": 48, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 50, "type": "argument_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 21}}, {"id": 51, "type": "sized_type_specifier", "text": "unsigned", "parent": 12, "children": [52], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 52, "type": "unsigned", "text": "unsigned", "parent": 51, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 53, "type": "function_declarator", "text": "get_num_steps()", "parent": 12, "children": [54, 55], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 28}}, {"id": 54, "type": "identifier", "text": "get_num_steps", "parent": 53, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 26}}, {"id": 55, "type": "parameter_list", "text": "()", "parent": 53, "children": [], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 28}}, {"id": 56, "type": "declaration", "text": "const;\n void cleanup();", "parent": 12, "children": [57, 58], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 33, "column": 19}}, {"id": 57, "type": "primitive_type", "text": "void", "parent": 56, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 58, "type": "function_declarator", "text": "cleanup()", "parent": 56, "children": [59, 60], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 18}}, {"id": 59, "type": "identifier", "text": "cleanup", "parent": 58, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 16}}, {"id": 60, "type": "parameter_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 18}}, {"id": 61, "type": "declaration", "text": "void start_rewrite();", "parent": 12, "children": [62, 63], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 25}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 8}}, {"id": 63, "type": "function_declarator", "text": "start_rewrite()", "parent": 61, "children": [64, 65], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 24}}, {"id": 64, "type": "identifier", "text": "start_rewrite", "parent": 63, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 22}}, {"id": 65, "type": "parameter_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 24}}, {"id": 66, "type": "declaration", "text": "void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);", "parent": 12, "children": [67, 68], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 93}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 66, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 8}}, {"id": 68, "type": "function_declarator", "text": "end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)", "parent": 66, "children": [69, 70], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 92}}, {"id": 69, "type": "identifier", "text": "end_rewrite", "parent": 68, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 20}}, {"id": 70, "type": "parameter_list", "text": "(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)", "parent": 68, "children": [71, 76, 83], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 92}}, {"id": 71, "type": "parameter_declaration", "text": "obj_map<func_decl", "parent": 70, "children": [72, 73, 75], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 38}}, {"id": 72, "type": "type_identifier", "text": "obj_map", "parent": 71, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 28}}, {"id": 73, "type": "ERROR", "text": "<", "parent": 71, "children": [74], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 29}}, {"id": 74, "type": "<", "text": "<", "parent": 73, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 29}}, {"id": 75, "type": "identifier", "text": "func_decl", "parent": 71, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 38}}, {"id": 76, "type": "parameter_declaration", "text": "expr*>& const2bits", "parent": 70, "children": [77, 78], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 58}}, {"id": 77, "type": "type_identifier", "text": "expr", "parent": 76, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 44}}, {"id": 78, "type": "pointer_declarator", "text": "*>& const2bits", "parent": 76, "children": [79, 80, 82], "start_point": {"row": 35, "column": 44}, "end_point": {"row": 35, "column": 58}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 35, "column": 44}, "end_point": {"row": 35, "column": 45}}, {"id": 80, "type": "ERROR", "text": ">&", "parent": 78, "children": [81], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 47}}, {"id": 81, "type": ">", "text": ">", "parent": 80, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 46}}, {"id": 82, "type": "identifier", "text": "const2bits", "parent": 78, "children": [], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 58}}, {"id": 83, "type": "parameter_declaration", "text": "ptr_vector<func_decl> & newbits", "parent": 70, "children": [84, 85, 89], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 91}}, {"id": 84, "type": "type_identifier", "text": "ptr_vector", "parent": 83, "children": [], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 70}}, {"id": 85, "type": "ERROR", "text": "<func_decl> &", "parent": 83, "children": [86, 87, 88], "start_point": {"row": 35, "column": 70}, "end_point": {"row": 35, "column": 83}}, {"id": 86, "type": "<", "text": "<", "parent": 85, "children": [], "start_point": {"row": 35, "column": 70}, "end_point": {"row": 35, "column": 71}}, {"id": 87, "type": "identifier", "text": "func_decl", "parent": 85, "children": [], "start_point": {"row": 35, "column": 71}, "end_point": {"row": 35, "column": 80}}, {"id": 88, "type": ">", "text": ">", "parent": 85, "children": [], "start_point": {"row": 35, "column": 80}, "end_point": {"row": 35, "column": 81}}, {"id": 89, "type": "identifier", "text": "newbits", "parent": 83, "children": [], "start_point": {"row": 35, "column": 84}, "end_point": {"row": 35, "column": 91}}, {"id": 90, "type": "declaration", "text": "void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);", "parent": 12, "children": [91, 92], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 97}}, {"id": 91, "type": "primitive_type", "text": "void", "parent": 90, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 92, "type": "function_declarator", "text": "get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)", "parent": 90, "children": [93, 94], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 96}}, {"id": 93, "type": "identifier", "text": "get_translation", "parent": 92, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 24}}, {"id": 94, "type": "parameter_list", "text": "(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)", "parent": 92, "children": [95, 100, 107], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 96}}, {"id": 95, "type": "parameter_declaration", "text": "obj_map<func_decl", "parent": 94, "children": [96, 97, 99], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 42}}, {"id": 96, "type": "type_identifier", "text": "obj_map", "parent": 95, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 32}}, {"id": 97, "type": "ERROR", "text": "<", "parent": 95, "children": [98], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 33}}, {"id": 98, "type": "<", "text": "<", "parent": 97, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 33}}, {"id": 99, "type": "identifier", "text": "func_decl", "parent": 95, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 42}}, {"id": 100, "type": "parameter_declaration", "text": "expr*>& const2bits", "parent": 94, "children": [101, 102], "start_point": {"row": 36, "column": 44}, "end_point": {"row": 36, "column": 62}}, {"id": 101, "type": "type_identifier", "text": "expr", "parent": 100, "children": [], "start_point": {"row": 36, "column": 44}, "end_point": {"row": 36, "column": 48}}, {"id": 102, "type": "pointer_declarator", "text": "*>& const2bits", "parent": 100, "children": [103, 104, 106], "start_point": {"row": 36, "column": 48}, "end_point": {"row": 36, "column": 62}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 36, "column": 48}, "end_point": {"row": 36, "column": 49}}, {"id": 104, "type": "ERROR", "text": ">&", "parent": 102, "children": [105], "start_point": {"row": 36, "column": 49}, "end_point": {"row": 36, "column": 51}}, {"id": 105, "type": ">", "text": ">", "parent": 104, "children": [], "start_point": {"row": 36, "column": 49}, "end_point": {"row": 36, "column": 50}}, {"id": 106, "type": "identifier", "text": "const2bits", "parent": 102, "children": [], "start_point": {"row": 36, "column": 52}, "end_point": {"row": 36, "column": 62}}, {"id": 107, "type": "parameter_declaration", "text": "ptr_vector<func_decl> & newbits", "parent": 94, "children": [108, 109, 113], "start_point": {"row": 36, "column": 64}, "end_point": {"row": 36, "column": 95}}, {"id": 108, "type": "type_identifier", "text": "ptr_vector", "parent": 107, "children": [], "start_point": {"row": 36, "column": 64}, "end_point": {"row": 36, "column": 74}}, {"id": 109, "type": "ERROR", "text": "<func_decl> &", "parent": 107, "children": [110, 111, 112], "start_point": {"row": 36, "column": 74}, "end_point": {"row": 36, "column": 87}}, {"id": 110, "type": "<", "text": "<", "parent": 109, "children": [], "start_point": {"row": 36, "column": 74}, "end_point": {"row": 36, "column": 75}}, {"id": 111, "type": "identifier", "text": "func_decl", "parent": 109, "children": [], "start_point": {"row": 36, "column": 75}, "end_point": {"row": 36, "column": 84}}, {"id": 112, "type": ">", "text": ">", "parent": 109, "children": [], "start_point": {"row": 36, "column": 84}, "end_point": {"row": 36, "column": 85}}, {"id": 113, "type": "identifier", "text": "newbits", "parent": 107, "children": [], "start_point": {"row": 36, "column": 88}, "end_point": {"row": 36, "column": 95}}, {"id": 114, "type": "declaration", "text": "void operator()(expr * e, expr_ref & result, proof_ref & result_proof);", "parent": 12, "children": [115, 116], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 75}}, {"id": 115, "type": "primitive_type", "text": "void", "parent": 114, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 116, "type": "function_declarator", "text": "operator()(expr * e, expr_ref & result, proof_ref & result_proof)", "parent": 114, "children": [117, 120], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 74}}, {"id": 117, "type": "function_declarator", "text": "operator()", "parent": 116, "children": [118, 119], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 19}}, {"id": 118, "type": "identifier", "text": "operator", "parent": 117, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 17}}, {"id": 119, "type": "parameter_list", "text": "()", "parent": 117, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 19}}, {"id": 120, "type": "parameter_list", "text": "(expr * e, expr_ref & result, proof_ref & result_proof)", "parent": 116, "children": [121, 126, 129], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 74}}, {"id": 121, "type": "parameter_declaration", "text": "expr * e", "parent": 120, "children": [122, 123], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 28}}, {"id": 122, "type": "type_identifier", "text": "expr", "parent": 121, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 24}}, {"id": 123, "type": "pointer_declarator", "text": "* e", "parent": 121, "children": [124, 125], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 28}}, {"id": 124, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 26}}, {"id": 125, "type": "identifier", "text": "e", "parent": 123, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 28}}, {"id": 126, "type": "parameter_declaration", "text": "expr_ref & result", "parent": 120, "children": [127, 128], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 47}}, {"id": 127, "type": "type_identifier", "text": "expr_ref", "parent": 126, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 38}}, {"id": 128, "type": "identifier", "text": "result", "parent": 126, "children": [], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 47}}, {"id": 129, "type": "parameter_declaration", "text": "proof_ref & result_proof", "parent": 120, "children": [130, 131], "start_point": {"row": 37, "column": 49}, "end_point": {"row": 37, "column": 73}}, {"id": 130, "type": "type_identifier", "text": "proof_ref", "parent": 129, "children": [], "start_point": {"row": 37, "column": 49}, "end_point": {"row": 37, "column": 58}}, {"id": 131, "type": "identifier", "text": "result_proof", "parent": 129, "children": [], "start_point": {"row": 37, "column": 61}, "end_point": {"row": 37, "column": 73}}, {"id": 132, "type": "declaration", "text": "void push();", "parent": 12, "children": [133, 134], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 16}}, {"id": 133, "type": "primitive_type", "text": "void", "parent": 132, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 134, "type": "function_declarator", "text": "push()", "parent": 132, "children": [135, 136], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 15}}, {"id": 135, "type": "identifier", "text": "push", "parent": 134, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 13}}, {"id": 136, "type": "parameter_list", "text": "()", "parent": 134, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 15}}, {"id": 137, "type": "declaration", "text": "void pop(unsigned num_scopes);", "parent": 12, "children": [138, 139], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 34}}, {"id": 138, "type": "primitive_type", "text": "void", "parent": 137, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 8}}, {"id": 139, "type": "function_declarator", "text": "pop(unsigned num_scopes)", "parent": 137, "children": [140, 141], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 33}}, {"id": 140, "type": "identifier", "text": "pop", "parent": 139, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 12}}, {"id": 141, "type": "parameter_list", "text": "(unsigned num_scopes)", "parent": 139, "children": [142], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 33}}, {"id": 142, "type": "parameter_declaration", "text": "unsigned num_scopes", "parent": 141, "children": [143, 145], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 32}}, {"id": 143, "type": "sized_type_specifier", "text": "unsigned", "parent": 142, "children": [144], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 21}}, {"id": 144, "type": "unsigned", "text": "unsigned", "parent": 143, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 21}}, {"id": 145, "type": "identifier", "text": "num_scopes", "parent": 142, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 32}}, {"id": 146, "type": "sized_type_specifier", "text": "unsigned", "parent": 12, "children": [147], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 12}}, {"id": 147, "type": "unsigned", "text": "unsigned", "parent": 146, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 12}}, {"id": 148, "type": "ERROR", "text": "get_num_scopes() const;\nprivate:\n obj_map<", "parent": 12, "children": [149, 152, 153], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 42, "column": 12}}, {"id": 149, "type": "function_declarator", "text": "get_num_scopes() const", "parent": 148, "children": [150, 151], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 35}}, {"id": 150, "type": "identifier", "text": "get_num_scopes", "parent": 149, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 27}}, {"id": 151, "type": "parameter_list", "text": "()", "parent": 149, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 29}}, {"id": 152, "type": "identifier", "text": "obj_map", "parent": 148, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 153, "type": "<", "text": "<", "parent": 148, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 12}}, {"id": 154, "type": "identifier", "text": "func_decl", "parent": 12, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 21}}, {"id": 155, "type": "ERROR", "text": "expr*> const&", "parent": 12, "children": [156, 157, 158], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 36}}, {"id": 156, "type": "identifier", "text": "expr", "parent": 155, "children": [], "start_point": {"row": 42, "column": 23}, "end_point": {"row": 42, "column": 27}}, {"id": 157, "type": "*", "text": "*", "parent": 155, "children": [], "start_point": {"row": 42, "column": 27}, "end_point": {"row": 42, "column": 28}}, {"id": 158, "type": ">", "text": ">", "parent": 155, "children": [], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 29}}, {"id": 159, "type": "function_declarator", "text": "const2bits() const", "parent": 12, "children": [160, 161], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 55}}, {"id": 160, "type": "identifier", "text": "const2bits", "parent": 159, "children": [], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 47}}, {"id": 161, "type": "parameter_list", "text": "()", "parent": 159, "children": [], "start_point": {"row": 42, "column": 47}, "end_point": {"row": 42, "column": 49}}]}, "node_categories": {"declarations": {"functions": [39, 53, 58, 63, 68, 92, 116, 117, 134, 139, 149, 159], "variables": [17, 37, 42, 56, 61, 66, 71, 76, 83, 90, 95, 100, 107, 114, 121, 126, 129, 132, 137, 142], "classes": [14, 15], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [23, 26, 29, 32, 34, 45, 48], "assignments": [], "loops": [], "conditionals": [13, 16, 18, 21, 24, 27, 28, 30, 31, 35, 40, 43, 44, 46, 49, 51, 54, 59, 64, 69, 72, 75, 77, 82, 84, 87, 89, 93, 96, 99, 101, 106, 108, 111, 113, 118, 122, 125, 127, 128, 130, 131, 135, 140, 143, 145, 146, 150, 152, 154, 156, 160], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "updt_params(params_ref const & p)"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "get_num_steps()"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "cleanup()"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "start_rewrite()"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits)"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "operator()(expr * e, expr_ref & result, proof_ref & result_proof)"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "operator()"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "push()"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "pop(unsigned num_scopes)"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "get_num_scopes() const"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "const2bits() const"}], "class_declarations": [{"node_id": 14, "universal_type": "class", "name": "imp", "text_snippet": "struct imp"}, {"node_id": 15, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"ast/ast.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"util/obj_hashtable.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"util/params.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*++\nCopyright (c) 2011 Microsoft Corporation\n\nModule Name:\n\n bit_blaster_rewriter.h\n\nAbstract:\n\n Bit-blasting rewriter\n\nAuthor:\n\n Leonardo (leonardo) 2012-10-04\n\nNotes:\n\n--*/\n#pragma once\n\n#include \"ast/ast.h\"\n#include \"util/obj_hashtable.h\"\n#include \"util/params.h\"\n\nclass bit_blaster_rewriter {\n struct imp;\n imp * m_imp;\npublic:\n bit_blaster_rewriter(ast_manager & m, params_ref const & p);\n ~bit_blaster_rewriter();\n void updt_params(params_ref const & p);\n ast_manager & m() const;\n unsigned get_num_steps() const;\n void cleanup();\n void start_rewrite();\n void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);\n void operator()(expr * e, expr_ref & result, proof_ref & result_proof);\n void push();\n void pop(unsigned num_scopes);\n unsigned get_num_scopes() const;\nprivate:\n obj_map<func_decl, expr*> const& const2bits() const; \n\n};\n\n\n"}
277
c
#include "task_led.h" #include "task_environmental.h" #include "ruuvi_driver_error.h" #include "ruuvi_interface_gpio.h" #include <stddef.h> static uint16_t m_activity_led; ruuvi_driver_status_t task_led_init(void) { ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS; if(!ruuvi_interface_gpio_is_init()) { err_code |= ruuvi_interface_gpio_init(); } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-braces" ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST; #pragma GCC diagnostic pop for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++) { ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE); ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE); } m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED; return err_code; } ruuvi_driver_status_t task_led_write(const uint16_t led, const task_led_state_t state) { ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS; ruuvi_interface_gpio_id_t pin = {.pin = led }; err_code |= ruuvi_interface_gpio_write(pin, state); return err_code; } void task_led_activity_indicate(const bool active) { const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE; task_led_write(m_activity_led, state); } void task_led_activity_led_set(uint16_t led) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-braces" ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST; #pragma GCC diagnostic pop m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED; for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++) { if(leds[ii].pin == led) { m_activity_led = led; break; } } }
31.47
53
(translation_unit) "#include "task_led.h"\n#include "task_environmental.h"\n#include "ruuvi_driver_error.h"\n#include "ruuvi_interface_gpio.h"\n#include <stddef.h>\n\nstatic uint16_t m_activity_led;\n\nruuvi_driver_status_t task_led_init(void)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n\n if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored "-Wmissing-braces"\n ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }\n\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n return err_code;\n}\n\nruuvi_driver_status_t task_led_write(const uint16_t led, const task_led_state_t state)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n ruuvi_interface_gpio_id_t pin = {.pin = led };\n err_code |= ruuvi_interface_gpio_write(pin, state);\n return err_code;\n}\n\nvoid task_led_activity_indicate(const bool active)\n{\n const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;\n task_led_write(m_activity_led, state);\n}\n\nvoid task_led_activity_led_set(uint16_t led)\n{\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored "-Wmissing-braces"\n ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }\n}" (preproc_include) "#include "task_led.h"\n" (#include) "#include" (string_literal) ""task_led.h"" (") """ (string_content) "task_led.h" (") """ (preproc_include) "#include "task_environmental.h"\n" (#include) "#include" (string_literal) ""task_environmental.h"" (") """ (string_content) "task_environmental.h" (") """ (preproc_include) "#include "ruuvi_driver_error.h"\n" (#include) "#include" (string_literal) ""ruuvi_driver_error.h"" (") """ (string_content) "ruuvi_driver_error.h" (") """ (preproc_include) "#include "ruuvi_interface_gpio.h"\n" (#include) "#include" (string_literal) ""ruuvi_interface_gpio.h"" (") """ (string_content) "ruuvi_interface_gpio.h" (") """ (preproc_include) "#include <stddef.h>\n" (#include) "#include" (system_lib_string) "<stddef.h>" (declaration) "static uint16_t m_activity_led;" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint16_t" (identifier) "m_activity_led" (;) ";" (function_definition) "ruuvi_driver_status_t task_led_init(void)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n\n if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored "-Wmissing-braces"\n ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }\n\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n return err_code;\n}" (type_identifier) "ruuvi_driver_status_t" (function_declarator) "task_led_init(void)" (identifier) "task_led_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n\n if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored "-Wmissing-braces"\n ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }\n\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n return err_code;\n}" ({) "{" (declaration) "ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;" (type_identifier) "ruuvi_driver_status_t" (init_declarator) "err_code = RUUVI_DRIVER_SUCCESS" (identifier) "err_code" (=) "=" (identifier) "RUUVI_DRIVER_SUCCESS" (;) ";" (if_statement) "if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }" (if) "if" (parenthesized_expression) "(!ruuvi_interface_gpio_is_init())" (() "(" (unary_expression) "!ruuvi_interface_gpio_is_init()" (!) "!" (call_expression) "ruuvi_interface_gpio_is_init()" (identifier) "ruuvi_interface_gpio_is_init" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n err_code |= ruuvi_interface_gpio_init();\n }" ({) "{" (expression_statement) "err_code |= ruuvi_interface_gpio_init();" (assignment_expression) "err_code |= ruuvi_interface_gpio_init()" (identifier) "err_code" (|=) "|=" (call_expression) "ruuvi_interface_gpio_init()" (identifier) "ruuvi_interface_gpio_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (preproc_call) "#pragma GCC diagnostic push\n" (preproc_directive) "#pragma" (preproc_arg) "GCC diagnostic push" (preproc_call) "#pragma GCC diagnostic ignored "-Wmissing-braces"\n" (preproc_directive) "#pragma" (preproc_arg) "GCC diagnostic ignored "-Wmissing-braces"" (declaration) "ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;" (type_identifier) "ruuvi_interface_gpio_id_t" (init_declarator) "leds[] = RUUVI_BOARD_LEDS_LIST" (array_declarator) "leds[]" (identifier) "leds" ([) "[" (]) "]" (=) "=" (identifier) "RUUVI_BOARD_LEDS_LIST" (;) ";" (preproc_call) "#pragma GCC diagnostic pop\n" (preproc_directive) "#pragma" (preproc_arg) "GCC diagnostic pop" (for_statement) "for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }" (for) "for" (() "(" (declaration) "size_t ii = 0;" (primitive_type) "size_t" (init_declarator) "ii = 0" (identifier) "ii" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "ii < RUUVI_BOARD_LEDS_NUMBER" (identifier) "ii" (<) "<" (identifier) "RUUVI_BOARD_LEDS_NUMBER" (;) ";" (update_expression) "ii++" (identifier) "ii" (++) "++" ()) ")" (compound_statement) "{\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }" ({) "{" (expression_statement) "ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);" (call_expression) "ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE)" (identifier) "ruuvi_interface_gpio_configure" (argument_list) "(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE)" (() "(" (subscript_expression) "leds[ii]" (identifier) "leds" ([) "[" (identifier) "ii" (]) "]" (,) "," (identifier) "RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE" ()) ")" (;) ";" (expression_statement) "ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);" (call_expression) "ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE)" (identifier) "ruuvi_interface_gpio_write" (argument_list) "(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE)" (() "(" (subscript_expression) "leds[ii]" (identifier) "leds" ([) "[" (identifier) "ii" (]) "]" (,) "," (unary_expression) "!RUUVI_BOARD_LEDS_ACTIVE_STATE" (!) "!" (identifier) "RUUVI_BOARD_LEDS_ACTIVE_STATE" ()) ")" (;) ";" (}) "}" (expression_statement) "m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;" (assignment_expression) "m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED" (identifier) "m_activity_led" (=) "=" (identifier) "RUUVI_INTERFACE_GPIO_ID_UNUSED" (;) ";" (return_statement) "return err_code;" (return) "return" (identifier) "err_code" (;) ";" (}) "}" (function_definition) "ruuvi_driver_status_t task_led_write(const uint16_t led, const task_led_state_t state)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n ruuvi_interface_gpio_id_t pin = {.pin = led };\n err_code |= ruuvi_interface_gpio_write(pin, state);\n return err_code;\n}" (type_identifier) "ruuvi_driver_status_t" (function_declarator) "task_led_write(const uint16_t led, const task_led_state_t state)" (identifier) "task_led_write" (parameter_list) "(const uint16_t led, const task_led_state_t state)" (() "(" (parameter_declaration) "const uint16_t led" (type_qualifier) "const" (const) "const" (primitive_type) "uint16_t" (identifier) "led" (,) "," (parameter_declaration) "const task_led_state_t state" (type_qualifier) "const" (const) "const" (type_identifier) "task_led_state_t" (identifier) "state" ()) ")" (compound_statement) "{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n ruuvi_interface_gpio_id_t pin = {.pin = led };\n err_code |= ruuvi_interface_gpio_write(pin, state);\n return err_code;\n}" ({) "{" (declaration) "ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;" (type_identifier) "ruuvi_driver_status_t" (init_declarator) "err_code = RUUVI_DRIVER_SUCCESS" (identifier) "err_code" (=) "=" (identifier) "RUUVI_DRIVER_SUCCESS" (;) ";" (declaration) "ruuvi_interface_gpio_id_t pin = {.pin = led };" (type_identifier) "ruuvi_interface_gpio_id_t" (init_declarator) "pin = {.pin = led }" (identifier) "pin" (=) "=" (initializer_list) "{.pin = led }" ({) "{" (initializer_pair) ".pin = led" (field_designator) ".pin" (.) "." (field_identifier) "pin" (=) "=" (identifier) "led" (}) "}" (;) ";" (expression_statement) "err_code |= ruuvi_interface_gpio_write(pin, state);" (assignment_expression) "err_code |= ruuvi_interface_gpio_write(pin, state)" (identifier) "err_code" (|=) "|=" (call_expression) "ruuvi_interface_gpio_write(pin, state)" (identifier) "ruuvi_interface_gpio_write" (argument_list) "(pin, state)" (() "(" (identifier) "pin" (,) "," (identifier) "state" ()) ")" (;) ";" (return_statement) "return err_code;" (return) "return" (identifier) "err_code" (;) ";" (}) "}" (function_definition) "void task_led_activity_indicate(const bool active)\n{\n const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;\n task_led_write(m_activity_led, state);\n}" (primitive_type) "void" (function_declarator) "task_led_activity_indicate(const bool active)" (identifier) "task_led_activity_indicate" (parameter_list) "(const bool active)" (() "(" (parameter_declaration) "const bool active" (type_qualifier) "const" (const) "const" (primitive_type) "bool" (identifier) "active" ()) ")" (compound_statement) "{\n const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;\n task_led_write(m_activity_led, state);\n}" ({) "{" (declaration) "const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;" (type_qualifier) "const" (const) "const" (type_identifier) "task_led_state_t" (init_declarator) "state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE" (identifier) "state" (=) "=" (conditional_expression) "(active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE" (parenthesized_expression) "(active)" (() "(" (identifier) "active" ()) ")" (?) "?" (identifier) "RUUVI_BOARD_LEDS_ACTIVE_STATE" (:) ":" (unary_expression) "!RUUVI_BOARD_LEDS_ACTIVE_STATE" (!) "!" (identifier) "RUUVI_BOARD_LEDS_ACTIVE_STATE" (;) ";" (expression_statement) "task_led_write(m_activity_led, state);" (call_expression) "task_led_write(m_activity_led, state)" (identifier) "task_led_write" (argument_list) "(m_activity_led, state)" (() "(" (identifier) "m_activity_led" (,) "," (identifier) "state" ()) ")" (;) ";" (}) "}" (function_definition) "void task_led_activity_led_set(uint16_t led)\n{\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored "-Wmissing-braces"\n ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }\n}" (primitive_type) "void" (function_declarator) "task_led_activity_led_set(uint16_t led)" (identifier) "task_led_activity_led_set" (parameter_list) "(uint16_t led)" (() "(" (parameter_declaration) "uint16_t led" (primitive_type) "uint16_t" (identifier) "led" ()) ")" (compound_statement) "{\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored "-Wmissing-braces"\n ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }\n}" ({) "{" (preproc_call) "#pragma GCC diagnostic push\n" (preproc_directive) "#pragma" (preproc_arg) "GCC diagnostic push" (preproc_call) "#pragma GCC diagnostic ignored "-Wmissing-braces"\n" (preproc_directive) "#pragma" (preproc_arg) "GCC diagnostic ignored "-Wmissing-braces"" (declaration) "ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;" (type_identifier) "ruuvi_interface_gpio_id_t" (type_qualifier) "const" (const) "const" (init_declarator) "leds[] = RUUVI_BOARD_LEDS_LIST" (array_declarator) "leds[]" (identifier) "leds" ([) "[" (]) "]" (=) "=" (identifier) "RUUVI_BOARD_LEDS_LIST" (;) ";" (preproc_call) "#pragma GCC diagnostic pop\n" (preproc_directive) "#pragma" (preproc_arg) "GCC diagnostic pop" (expression_statement) "m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;" (assignment_expression) "m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED" (identifier) "m_activity_led" (=) "=" (identifier) "RUUVI_INTERFACE_GPIO_ID_UNUSED" (;) ";" (for_statement) "for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }" (for) "for" (() "(" (declaration) "size_t ii = 0;" (primitive_type) "size_t" (init_declarator) "ii = 0" (identifier) "ii" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "ii < RUUVI_BOARD_LEDS_NUMBER" (identifier) "ii" (<) "<" (identifier) "RUUVI_BOARD_LEDS_NUMBER" (;) ";" (update_expression) "ii++" (identifier) "ii" (++) "++" ()) ")" (compound_statement) "{\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }" ({) "{" (if_statement) "if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }" (if) "if" (parenthesized_expression) "(leds[ii].pin == led)" (() "(" (binary_expression) "leds[ii].pin == led" (field_expression) "leds[ii].pin" (subscript_expression) "leds[ii]" (identifier) "leds" ([) "[" (identifier) "ii" (]) "]" (.) "." (field_identifier) "pin" (==) "==" (identifier) "led" ()) ")" (compound_statement) "{\n m_activity_led = led;\n break;\n }" ({) "{" (expression_statement) "m_activity_led = led;" (assignment_expression) "m_activity_led = led" (identifier) "m_activity_led" (=) "=" (identifier) "led" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (}) "}"
353
0
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 31.47, "nodes": 218, "errors": 0, "source_hash": "6d7a3fb8f75595fee4973016c3bc065e199e0977e9deea04860976c68cb7100e", "categorized_nodes": 150}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"task_led.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": "\"task_led.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 21}}, {"id": 3, "type": "preproc_include", "text": "#include \"task_environmental.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": "\"task_environmental.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include \"ruuvi_driver_error.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": "\"ruuvi_driver_error.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 31}}, {"id": 9, "type": "preproc_include", "text": "#include \"ruuvi_interface_gpio.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"ruuvi_interface_gpio.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 33}}, {"id": 12, "type": "preproc_include", "text": "#include <stddef.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stddef.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 15, "type": "declaration", "text": "static uint16_t m_activity_led;", "parent": null, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 31}}, {"id": 16, "type": "primitive_type", "text": "uint16_t", "parent": 15, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 15}}, {"id": 17, "type": "identifier", "text": "m_activity_led", "parent": 15, "children": [], "start_point": {"row": 6, "column": 16}, "end_point": {"row": 6, "column": 30}}, {"id": 18, "type": "function_definition", "text": "ruuvi_driver_status_t task_led_init(void)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n\n if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wmissing-braces\"\n ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }\n\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n return err_code;\n}", "parent": null, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "ruuvi_driver_status_t", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 21}}, {"id": 20, "type": "function_declarator", "text": "task_led_init(void)", "parent": 18, "children": [21, 22], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 41}}, {"id": 21, "type": "identifier", "text": "task_led_init", "parent": 20, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 35}}, {"id": 22, "type": "parameter_list", "text": "(void)", "parent": 20, "children": [23], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 41}}, {"id": 23, "type": "parameter_declaration", "text": "void", "parent": 22, "children": [24], "start_point": {"row": 8, "column": 36}, "end_point": {"row": 8, "column": 40}}, {"id": 24, "type": "primitive_type", "text": "void", "parent": 23, "children": [], "start_point": {"row": 8, "column": 36}, "end_point": {"row": 8, "column": 40}}, {"id": 25, "type": "declaration", "text": "ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;", "parent": 18, "children": [26, 27], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 56}}, {"id": 26, "type": "type_identifier", "text": "ruuvi_driver_status_t", "parent": 25, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 23}}, {"id": 27, "type": "init_declarator", "text": "err_code = RUUVI_DRIVER_SUCCESS", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 55}}, {"id": 28, "type": "identifier", "text": "err_code", "parent": 27, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 32}}, {"id": 29, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 10, "column": 33}, "end_point": {"row": 10, "column": 34}}, {"id": 30, "type": "identifier", "text": "RUUVI_DRIVER_SUCCESS", "parent": 27, "children": [], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 55}}, {"id": 31, "type": "if_statement", "text": "if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }", "parent": 18, "children": [32], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 15, "column": 3}}, {"id": 32, "type": "parenthesized_expression", "text": "(!ruuvi_interface_gpio_is_init())", "parent": 31, "children": [33], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 37}}, {"id": 33, "type": "unary_expression", "text": "!ruuvi_interface_gpio_is_init()", "parent": 32, "children": [34, 35], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 36}}, {"id": 34, "type": "!", "text": "!", "parent": 33, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 6}}, {"id": 35, "type": "call_expression", "text": "ruuvi_interface_gpio_is_init()", "parent": 33, "children": [36, 37], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 36}}, {"id": 36, "type": "identifier", "text": "ruuvi_interface_gpio_is_init", "parent": 35, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 34}}, {"id": 37, "type": "argument_list", "text": "()", "parent": 35, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 36}}, {"id": 38, "type": "assignment_expression", "text": "err_code |= ruuvi_interface_gpio_init()", "parent": 31, "children": [39, 40, 41], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 43}}, {"id": 39, "type": "identifier", "text": "err_code", "parent": 38, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 40, "type": "|=", "text": "|=", "parent": 38, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 15}}, {"id": 41, "type": "call_expression", "text": "ruuvi_interface_gpio_init()", "parent": 38, "children": [42, 43], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 43}}, {"id": 42, "type": "identifier", "text": "ruuvi_interface_gpio_init", "parent": 41, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 41}}, {"id": 43, "type": "argument_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 14, "column": 41}, "end_point": {"row": 14, "column": 43}}, {"id": 44, "type": "preproc_call", "text": "#pragma GCC diagnostic push\n", "parent": 18, "children": [45, 46], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 45, "type": "preproc_directive", "text": "#pragma", "parent": 44, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 46, "type": "preproc_arg", "text": "GCC diagnostic push", "parent": 44, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 27}}, {"id": 47, "type": "preproc_call", "text": "#pragma GCC diagnostic ignored \"-Wmissing-braces\"\n", "parent": 18, "children": [48, 49], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 48, "type": "preproc_directive", "text": "#pragma", "parent": 47, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 49, "type": "preproc_arg", "text": "GCC diagnostic ignored \"-Wmissing-braces\"", "parent": 47, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 49}}, {"id": 50, "type": "declaration", "text": "ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;", "parent": 18, "children": [51, 52], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 59}}, {"id": 51, "type": "type_identifier", "text": "ruuvi_interface_gpio_id_t", "parent": 50, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 27}}, {"id": 52, "type": "init_declarator", "text": "leds[] = RUUVI_BOARD_LEDS_LIST", "parent": 50, "children": [53, 55, 56], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 58}}, {"id": 53, "type": "array_declarator", "text": "leds[]", "parent": 52, "children": [54], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 34}}, {"id": 54, "type": "identifier", "text": "leds", "parent": 53, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 32}}, {"id": 55, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 56, "type": "identifier", "text": "RUUVI_BOARD_LEDS_LIST", "parent": 52, "children": [], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 58}}, {"id": 57, "type": "preproc_call", "text": "#pragma GCC diagnostic pop\n", "parent": 18, "children": [58, 59], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 58, "type": "preproc_directive", "text": "#pragma", "parent": 57, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 59, "type": "preproc_arg", "text": "GCC diagnostic pop", "parent": 57, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 26}}, {"id": 60, "type": "for_statement", "text": "for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }", "parent": 18, "children": [61, 67, 71], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 26, "column": 3}}, {"id": 61, "type": "declaration", "text": "size_t ii = 0;", "parent": 60, "children": [62, 63], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 20}}, {"id": 62, "type": "primitive_type", "text": "size_t", "parent": 61, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 12}}, {"id": 63, "type": "init_declarator", "text": "ii = 0", "parent": 61, "children": [64, 65, 66], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 19}}, {"id": 64, "type": "identifier", "text": "ii", "parent": 63, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 15}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 17}}, {"id": 66, "type": "number_literal", "text": "0", "parent": 63, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 19}}, {"id": 67, "type": "binary_expression", "text": "ii < RUUVI_BOARD_LEDS_NUMBER", "parent": 60, "children": [68, 69, 70], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 49}}, {"id": 68, "type": "identifier", "text": "ii", "parent": 67, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 23}}, {"id": 69, "type": "<", "text": "<", "parent": 67, "children": [], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 25}}, {"id": 70, "type": "identifier", "text": "RUUVI_BOARD_LEDS_NUMBER", "parent": 67, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 49}}, {"id": 71, "type": "update_expression", "text": "ii++", "parent": 60, "children": [72, 73], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 55}}, {"id": 72, "type": "identifier", "text": "ii", "parent": 71, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 53}}, {"id": 73, "type": "++", "text": "++", "parent": 71, "children": [], "start_point": {"row": 22, "column": 53}, "end_point": {"row": 22, "column": 55}}, {"id": 74, "type": "call_expression", "text": "ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE)", "parent": 60, "children": [75, 76], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 88}}, {"id": 75, "type": "identifier", "text": "ruuvi_interface_gpio_configure", "parent": 74, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 34}}, {"id": 76, "type": "argument_list", "text": "(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE)", "parent": 74, "children": [77, 80], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 88}}, {"id": 77, "type": "subscript_expression", "text": "leds[ii]", "parent": 76, "children": [78, 79], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 43}}, {"id": 78, "type": "identifier", "text": "leds", "parent": 77, "children": [], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 39}}, {"id": 79, "type": "identifier", "text": "ii", "parent": 77, "children": [], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 42}}, {"id": 80, "type": "identifier", "text": "RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE", "parent": 76, "children": [], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 87}}, {"id": 81, "type": "call_expression", "text": "ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE)", "parent": 60, "children": [82, 83], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 72}}, {"id": 82, "type": "identifier", "text": "ruuvi_interface_gpio_write", "parent": 81, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 30}}, {"id": 83, "type": "argument_list", "text": "(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE)", "parent": 81, "children": [84, 87], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 72}}, {"id": 84, "type": "subscript_expression", "text": "leds[ii]", "parent": 83, "children": [85, 86], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 39}}, {"id": 85, "type": "identifier", "text": "leds", "parent": 84, "children": [], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 35}}, {"id": 86, "type": "identifier", "text": "ii", "parent": 84, "children": [], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 38}}, {"id": 87, "type": "unary_expression", "text": "!RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 83, "children": [88, 89], "start_point": {"row": 25, "column": 41}, "end_point": {"row": 25, "column": 71}}, {"id": 88, "type": "!", "text": "!", "parent": 87, "children": [], "start_point": {"row": 25, "column": 41}, "end_point": {"row": 25, "column": 42}}, {"id": 89, "type": "identifier", "text": "RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 87, "children": [], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 71}}, {"id": 90, "type": "assignment_expression", "text": "m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED", "parent": 18, "children": [91, 92, 93], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 49}}, {"id": 91, "type": "identifier", "text": "m_activity_led", "parent": 90, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 16}}, {"id": 92, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 93, "type": "identifier", "text": "RUUVI_INTERFACE_GPIO_ID_UNUSED", "parent": 90, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 49}}, {"id": 94, "type": "return_statement", "text": "return err_code;", "parent": 18, "children": [95], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 18}}, {"id": 95, "type": "identifier", "text": "err_code", "parent": 94, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 17}}, {"id": 96, "type": "function_definition", "text": "ruuvi_driver_status_t task_led_write(const uint16_t led, const task_led_state_t state)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n ruuvi_interface_gpio_id_t pin = {.pin = led };\n err_code |= ruuvi_interface_gpio_write(pin, state);\n return err_code;\n}", "parent": null, "children": [97, 98], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 97, "type": "type_identifier", "text": "ruuvi_driver_status_t", "parent": 96, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 21}}, {"id": 98, "type": "function_declarator", "text": "task_led_write(const uint16_t led, const task_led_state_t state)", "parent": 96, "children": [99, 100], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 86}}, {"id": 99, "type": "identifier", "text": "task_led_write", "parent": 98, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 36}}, {"id": 100, "type": "parameter_list", "text": "(const uint16_t led, const task_led_state_t state)", "parent": 98, "children": [101, 104], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 86}}, {"id": 101, "type": "parameter_declaration", "text": "const uint16_t led", "parent": 100, "children": [102, 103], "start_point": {"row": 32, "column": 37}, "end_point": {"row": 32, "column": 55}}, {"id": 102, "type": "primitive_type", "text": "uint16_t", "parent": 101, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 51}}, {"id": 103, "type": "identifier", "text": "led", "parent": 101, "children": [], "start_point": {"row": 32, "column": 52}, "end_point": {"row": 32, "column": 55}}, {"id": 104, "type": "parameter_declaration", "text": "const task_led_state_t state", "parent": 100, "children": [105, 106], "start_point": {"row": 32, "column": 57}, "end_point": {"row": 32, "column": 85}}, {"id": 105, "type": "type_identifier", "text": "task_led_state_t", "parent": 104, "children": [], "start_point": {"row": 32, "column": 63}, "end_point": {"row": 32, "column": 79}}, {"id": 106, "type": "identifier", "text": "state", "parent": 104, "children": [], "start_point": {"row": 32, "column": 80}, "end_point": {"row": 32, "column": 85}}, {"id": 107, "type": "declaration", "text": "ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;", "parent": 96, "children": [108, 109], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 56}}, {"id": 108, "type": "type_identifier", "text": "ruuvi_driver_status_t", "parent": 107, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 23}}, {"id": 109, "type": "init_declarator", "text": "err_code = RUUVI_DRIVER_SUCCESS", "parent": 107, "children": [110, 111, 112], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 55}}, {"id": 110, "type": "identifier", "text": "err_code", "parent": 109, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 32}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 34}}, {"id": 112, "type": "identifier", "text": "RUUVI_DRIVER_SUCCESS", "parent": 109, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 55}}, {"id": 113, "type": "declaration", "text": "ruuvi_interface_gpio_id_t pin = {.pin = led };", "parent": 96, "children": [114, 115], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 48}}, {"id": 114, "type": "type_identifier", "text": "ruuvi_interface_gpio_id_t", "parent": 113, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 27}}, {"id": 115, "type": "init_declarator", "text": "pin = {.pin = led }", "parent": 113, "children": [116, 117, 118], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 47}}, {"id": 116, "type": "identifier", "text": "pin", "parent": 115, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 31}}, {"id": 117, "type": "=", "text": "=", "parent": 115, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 33}}, {"id": 118, "type": "initializer_list", "text": "{.pin = led }", "parent": 115, "children": [119], "start_point": {"row": 35, "column": 34}, "end_point": {"row": 35, "column": 47}}, {"id": 119, "type": "initializer_pair", "text": ".pin = led", "parent": 118, "children": [120, 122, 123], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 45}}, {"id": 120, "type": "field_designator", "text": ".pin", "parent": 119, "children": [121], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 39}}, {"id": 121, "type": "field_identifier", "text": "pin", "parent": 120, "children": [], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 39}}, {"id": 122, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 41}}, {"id": 123, "type": "identifier", "text": "led", "parent": 119, "children": [], "start_point": {"row": 35, "column": 42}, "end_point": {"row": 35, "column": 45}}, {"id": 124, "type": "assignment_expression", "text": "err_code |= ruuvi_interface_gpio_write(pin, state)", "parent": 96, "children": [125, 126, 127], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 52}}, {"id": 125, "type": "identifier", "text": "err_code", "parent": 124, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 10}}, {"id": 126, "type": "|=", "text": "|=", "parent": 124, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 13}}, {"id": 127, "type": "call_expression", "text": "ruuvi_interface_gpio_write(pin, state)", "parent": 124, "children": [128, 129], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 52}}, {"id": 128, "type": "identifier", "text": "ruuvi_interface_gpio_write", "parent": 127, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 40}}, {"id": 129, "type": "argument_list", "text": "(pin, state)", "parent": 127, "children": [130, 131], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 52}}, {"id": 130, "type": "identifier", "text": "pin", "parent": 129, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 36, "column": 44}}, {"id": 131, "type": "identifier", "text": "state", "parent": 129, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 51}}, {"id": 132, "type": "return_statement", "text": "return err_code;", "parent": 96, "children": [133], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 18}}, {"id": 133, "type": "identifier", "text": "err_code", "parent": 132, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 17}}, {"id": 134, "type": "function_definition", "text": "void task_led_activity_indicate(const bool active)\n{\n const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;\n task_led_write(m_activity_led, state);\n}", "parent": null, "children": [135, 136], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 135, "type": "primitive_type", "text": "void", "parent": 134, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 4}}, {"id": 136, "type": "function_declarator", "text": "task_led_activity_indicate(const bool active)", "parent": 134, "children": [137, 138], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 50}}, {"id": 137, "type": "identifier", "text": "task_led_activity_indicate", "parent": 136, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 31}}, {"id": 138, "type": "parameter_list", "text": "(const bool active)", "parent": 136, "children": [139], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 50}}, {"id": 139, "type": "parameter_declaration", "text": "const bool active", "parent": 138, "children": [140, 141], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 49}}, {"id": 140, "type": "primitive_type", "text": "bool", "parent": 139, "children": [], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 42}}, {"id": 141, "type": "identifier", "text": "active", "parent": 139, "children": [], "start_point": {"row": 40, "column": 43}, "end_point": {"row": 40, "column": 49}}, {"id": 142, "type": "declaration", "text": "const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;", "parent": 134, "children": [143, 144], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 107}}, {"id": 143, "type": "type_identifier", "text": "task_led_state_t", "parent": 142, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 24}}, {"id": 144, "type": "init_declarator", "text": "state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 142, "children": [145, 146, 147], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 106}}, {"id": 145, "type": "identifier", "text": "state", "parent": 144, "children": [], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 30}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 32}}, {"id": 147, "type": "conditional_expression", "text": "(active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 144, "children": [148, 150, 151, 152], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 106}}, {"id": 148, "type": "parenthesized_expression", "text": "(active)", "parent": 147, "children": [149], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 41}}, {"id": 149, "type": "identifier", "text": "active", "parent": 148, "children": [], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 40}}, {"id": 150, "type": "?", "text": "?", "parent": 147, "children": [], "start_point": {"row": 42, "column": 42}, "end_point": {"row": 42, "column": 43}}, {"id": 151, "type": "identifier", "text": "RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 147, "children": [], "start_point": {"row": 42, "column": 44}, "end_point": {"row": 42, "column": 73}}, {"id": 152, "type": "unary_expression", "text": "!RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 147, "children": [153, 154], "start_point": {"row": 42, "column": 76}, "end_point": {"row": 42, "column": 106}}, {"id": 153, "type": "!", "text": "!", "parent": 152, "children": [], "start_point": {"row": 42, "column": 76}, "end_point": {"row": 42, "column": 77}}, {"id": 154, "type": "identifier", "text": "RUUVI_BOARD_LEDS_ACTIVE_STATE", "parent": 152, "children": [], "start_point": {"row": 42, "column": 77}, "end_point": {"row": 42, "column": 106}}, {"id": 155, "type": "call_expression", "text": "task_led_write(m_activity_led, state)", "parent": 134, "children": [156, 157], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 39}}, {"id": 156, "type": "identifier", "text": "task_led_write", "parent": 155, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 16}}, {"id": 157, "type": "argument_list", "text": "(m_activity_led, state)", "parent": 155, "children": [158, 159], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 39}}, {"id": 158, "type": "identifier", "text": "m_activity_led", "parent": 157, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 31}}, {"id": 159, "type": "identifier", "text": "state", "parent": 157, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 38}}, {"id": 160, "type": "function_definition", "text": "void task_led_activity_led_set(uint16_t led)\n{\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wmissing-braces\"\n ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }\n}", "parent": null, "children": [161, 162], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 4}}, {"id": 162, "type": "function_declarator", "text": "task_led_activity_led_set(uint16_t led)", "parent": 160, "children": [163, 164], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 44}}, {"id": 163, "type": "identifier", "text": "task_led_activity_led_set", "parent": 162, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 30}}, {"id": 164, "type": "parameter_list", "text": "(uint16_t led)", "parent": 162, "children": [165], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 44}}, {"id": 165, "type": "parameter_declaration", "text": "uint16_t led", "parent": 164, "children": [166, 167], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 43}}, {"id": 166, "type": "primitive_type", "text": "uint16_t", "parent": 165, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 39}}, {"id": 167, "type": "identifier", "text": "led", "parent": 165, "children": [], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 43}}, {"id": 168, "type": "preproc_call", "text": "#pragma GCC diagnostic push\n", "parent": 160, "children": [169, 170], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 169, "type": "preproc_directive", "text": "#pragma", "parent": 168, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 170, "type": "preproc_arg", "text": "GCC diagnostic push", "parent": 168, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 27}}, {"id": 171, "type": "preproc_call", "text": "#pragma GCC diagnostic ignored \"-Wmissing-braces\"\n", "parent": 160, "children": [172, 173], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 172, "type": "preproc_directive", "text": "#pragma", "parent": 171, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 173, "type": "preproc_arg", "text": "GCC diagnostic ignored \"-Wmissing-braces\"", "parent": 171, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 49}}, {"id": 174, "type": "declaration", "text": "ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;", "parent": 160, "children": [175, 176], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 65}}, {"id": 175, "type": "type_identifier", "text": "ruuvi_interface_gpio_id_t", "parent": 174, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 27}}, {"id": 176, "type": "init_declarator", "text": "leds[] = RUUVI_BOARD_LEDS_LIST", "parent": 174, "children": [177, 179, 180], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 64}}, {"id": 177, "type": "array_declarator", "text": "leds[]", "parent": 176, "children": [178], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 40}}, {"id": 178, "type": "identifier", "text": "leds", "parent": 177, "children": [], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 38}}, {"id": 179, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 42}}, {"id": 180, "type": "identifier", "text": "RUUVI_BOARD_LEDS_LIST", "parent": 176, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 64}}, {"id": 181, "type": "preproc_call", "text": "#pragma GCC diagnostic pop\n", "parent": 160, "children": [182, 183], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 182, "type": "preproc_directive", "text": "#pragma", "parent": 181, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 7}}, {"id": 183, "type": "preproc_arg", "text": "GCC diagnostic pop", "parent": 181, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 26}}, {"id": 184, "type": "assignment_expression", "text": "m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED", "parent": 160, "children": [185, 186, 187], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 49}}, {"id": 185, "type": "identifier", "text": "m_activity_led", "parent": 184, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 16}}, {"id": 186, "type": "=", "text": "=", "parent": 184, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 18}}, {"id": 187, "type": "identifier", "text": "RUUVI_INTERFACE_GPIO_ID_UNUSED", "parent": 184, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 49}}, {"id": 188, "type": "for_statement", "text": "for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }", "parent": 160, "children": [189, 195, 199], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 60, "column": 3}}, {"id": 189, "type": "declaration", "text": "size_t ii = 0;", "parent": 188, "children": [190, 191], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 20}}, {"id": 190, "type": "primitive_type", "text": "size_t", "parent": 189, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 12}}, {"id": 191, "type": "init_declarator", "text": "ii = 0", "parent": 189, "children": [192, 193, 194], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 19}}, {"id": 192, "type": "identifier", "text": "ii", "parent": 191, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 15}}, {"id": 193, "type": "=", "text": "=", "parent": 191, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 17}}, {"id": 194, "type": "number_literal", "text": "0", "parent": 191, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 19}}, {"id": 195, "type": "binary_expression", "text": "ii < RUUVI_BOARD_LEDS_NUMBER", "parent": 188, "children": [196, 197, 198], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 49}}, {"id": 196, "type": "identifier", "text": "ii", "parent": 195, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 23}}, {"id": 197, "type": "<", "text": "<", "parent": 195, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 25}}, {"id": 198, "type": "identifier", "text": "RUUVI_BOARD_LEDS_NUMBER", "parent": 195, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 49}}, {"id": 199, "type": "update_expression", "text": "ii++", "parent": 188, "children": [200, 201], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 55}}, {"id": 200, "type": "identifier", "text": "ii", "parent": 199, "children": [], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 53}}, {"id": 201, "type": "++", "text": "++", "parent": 199, "children": [], "start_point": {"row": 53, "column": 53}, "end_point": {"row": 53, "column": 55}}, {"id": 202, "type": "if_statement", "text": "if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }", "parent": 188, "children": [203], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 59, "column": 5}}, {"id": 203, "type": "parenthesized_expression", "text": "(leds[ii].pin == led)", "parent": 202, "children": [204], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 27}}, {"id": 204, "type": "binary_expression", "text": "leds[ii].pin == led", "parent": 203, "children": [205, 210, 211], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 26}}, {"id": 205, "type": "field_expression", "text": "leds[ii].pin", "parent": 204, "children": [206, 209], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 19}}, {"id": 206, "type": "subscript_expression", "text": "leds[ii]", "parent": 205, "children": [207, 208], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 15}}, {"id": 207, "type": "identifier", "text": "leds", "parent": 206, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 11}}, {"id": 208, "type": "identifier", "text": "ii", "parent": 206, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 14}}, {"id": 209, "type": "field_identifier", "text": "pin", "parent": 205, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 19}}, {"id": 210, "type": "==", "text": "==", "parent": 204, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 22}}, {"id": 211, "type": "identifier", "text": "led", "parent": 204, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 26}}, {"id": 212, "type": "assignment_expression", "text": "m_activity_led = led", "parent": 202, "children": [213, 214, 215], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 26}}, {"id": 213, "type": "identifier", "text": "m_activity_led", "parent": 212, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 20}}, {"id": 214, "type": "=", "text": "=", "parent": 212, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 22}}, {"id": 215, "type": "identifier", "text": "led", "parent": 212, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 26}}, {"id": 216, "type": "break_statement", "text": "break;", "parent": 202, "children": [217], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 12}}, {"id": 217, "type": "break", "text": "break", "parent": 216, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 11}}]}, "node_categories": {"declarations": {"functions": [18, 20, 96, 98, 134, 136, 160, 162], "variables": [15, 23, 25, 50, 61, 101, 104, 107, 113, 139, 142, 165, 174, 189], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [32, 33, 35, 41, 67, 71, 74, 77, 81, 84, 87, 127, 148, 152, 155, 195, 199, 203, 204, 205, 206], "assignments": [38, 90, 124, 184, 212], "loops": [60, 188], "conditionals": [17, 19, 21, 26, 28, 30, 31, 36, 39, 42, 51, 54, 56, 64, 68, 70, 72, 75, 78, 79, 80, 82, 85, 86, 89, 91, 93, 95, 97, 99, 103, 105, 106, 108, 110, 112, 114, 116, 121, 123, 125, 128, 130, 131, 133, 137, 141, 143, 145, 147, 149, 151, 154, 156, 158, 159, 163, 167, 175, 178, 180, 185, 187, 192, 196, 198, 200, 202, 207, 208, 209, 211, 213, 215], "returns": [94, 132], "exceptions": []}, "expressions": {"calls": [44, 47, 57, 168, 171, 181], "literals": [2, 5, 8, 11, 14, 66, 194], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [120]}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "ruuvi_driver_status_t task_led_init(void)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "task_led_init(void)"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "ruuvi_driver_status_t task_led_write(const uint16_t led, const task_led_state_t state)\n{\n ruuvi_dri"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "task_led_write(const uint16_t led, const task_led_state_t state)"}, {"node_id": 134, "universal_type": "function", "name": "task_led_activity_indicate", "text_snippet": "void task_led_activity_indicate(const bool active)\n{\n const task_led_state_t state = (active) ? RUU"}, {"node_id": 136, "universal_type": "function", "name": "active)", "text_snippet": "task_led_activity_indicate(const bool active)"}, {"node_id": 160, "universal_type": "function", "name": "task_led_activity_led_set", "text_snippet": "void task_led_activity_led_set(uint16_t led)\n{\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ig"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "task_led_activity_led_set(uint16_t led)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"task_led.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"task_environmental.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"ruuvi_driver_error.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"ruuvi_interface_gpio.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stddef.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#include \"task_led.h\"\n#include \"task_environmental.h\"\n#include \"ruuvi_driver_error.h\"\n#include \"ruuvi_interface_gpio.h\"\n#include <stddef.h>\n\nstatic uint16_t m_activity_led;\n\nruuvi_driver_status_t task_led_init(void)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n\n if(!ruuvi_interface_gpio_is_init())\n {\n err_code |= ruuvi_interface_gpio_init();\n }\n\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wmissing-braces\"\n ruuvi_interface_gpio_id_t leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n ruuvi_interface_gpio_configure(leds[ii], RUUVI_INTERFACE_GPIO_MODE_OUTPUT_HIGHDRIVE);\n ruuvi_interface_gpio_write(leds[ii], !RUUVI_BOARD_LEDS_ACTIVE_STATE);\n }\n\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n return err_code;\n}\n\nruuvi_driver_status_t task_led_write(const uint16_t led, const task_led_state_t state)\n{\n ruuvi_driver_status_t err_code = RUUVI_DRIVER_SUCCESS;\n ruuvi_interface_gpio_id_t pin = {.pin = led };\n err_code |= ruuvi_interface_gpio_write(pin, state);\n return err_code;\n}\n\nvoid task_led_activity_indicate(const bool active)\n{\n const task_led_state_t state = (active) ? RUUVI_BOARD_LEDS_ACTIVE_STATE : !RUUVI_BOARD_LEDS_ACTIVE_STATE;\n task_led_write(m_activity_led, state);\n}\n\nvoid task_led_activity_led_set(uint16_t led)\n{\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wmissing-braces\"\n ruuvi_interface_gpio_id_t const leds[] = RUUVI_BOARD_LEDS_LIST;\n#pragma GCC diagnostic pop\n m_activity_led = RUUVI_INTERFACE_GPIO_ID_UNUSED;\n for(size_t ii = 0; ii < RUUVI_BOARD_LEDS_NUMBER; ii++)\n {\n if(leds[ii].pin == led)\n {\n m_activity_led = led;\n break;\n }\n }\n}"}
278
c
//-------------------------------------------------------------------------------------- // MemoryMapping.h // PIX Pluging for PIX Workshop GDC2007 // Copyright (c) Microsoft Corporation. All rights reserved. //-------------------------------------------------------------------------------------- #pragma once #ifndef _MEMORY_MAPPING_H_ #define _MEMORY_MAPPING_H_ struct SHARED_MEMORY_DATA { int NumTerrainTiles; int NumGrassTiles; int NumBalls; int MaxBalls; }; bool g_bSharedMemoryInit = false; HANDLE g_hMapFile = NULL; SHARED_MEMORY_DATA* g_pSharedData = NULL; WCHAR g_szSharedName[] = L"Local\\PIXWorkshopGDC2007"; #endif
32.6
20
(translation_unit) "//--------------------------------------------------------------------------------------\n// MemoryMapping.h\n// PIX Pluging for PIX Workshop GDC2007\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n#pragma once\n#ifndef _MEMORY_MAPPING_H_\n#define _MEMORY_MAPPING_H_\n\nstruct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n};\n\nbool g_bSharedMemoryInit = false;\nHANDLE g_hMapFile = NULL;\nSHARED_MEMORY_DATA* g_pSharedData = NULL;\nWCHAR g_szSharedName[] = L"Local\\PIXWorkshopGDC2007";\n\n#endif\n" (comment) "//--------------------------------------------------------------------------------------" (comment) "// MemoryMapping.h" (comment) "// PIX Pluging for PIX Workshop GDC2007" (comment) "// Copyright (c) Microsoft Corporation. All rights reserved." (comment) "//--------------------------------------------------------------------------------------" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_ifdef) "#ifndef _MEMORY_MAPPING_H_\n#define _MEMORY_MAPPING_H_\n\nstruct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n};\n\nbool g_bSharedMemoryInit = false;\nHANDLE g_hMapFile = NULL;\nSHARED_MEMORY_DATA* g_pSharedData = NULL;\nWCHAR g_szSharedName[] = L"Local\\PIXWorkshopGDC2007";\n\n#endif" (#ifndef) "#ifndef" (identifier) "_MEMORY_MAPPING_H_" (preproc_def) "#define _MEMORY_MAPPING_H_\n" (#define) "#define" (identifier) "_MEMORY_MAPPING_H_" (struct_specifier) "struct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n}" (struct) "struct" (type_identifier) "SHARED_MEMORY_DATA" (field_declaration_list) "{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n}" ({) "{" (field_declaration) "int NumTerrainTiles;" (primitive_type) "int" (field_identifier) "NumTerrainTiles" (;) ";" (field_declaration) "int NumGrassTiles;" (primitive_type) "int" (field_identifier) "NumGrassTiles" (;) ";" (field_declaration) "int NumBalls;" (primitive_type) "int" (field_identifier) "NumBalls" (;) ";" (field_declaration) "int MaxBalls;" (primitive_type) "int" (field_identifier) "MaxBalls" (;) ";" (}) "}" (;) ";" (declaration) "bool g_bSharedMemoryInit = false;" (primitive_type) "bool" (init_declarator) "g_bSharedMemoryInit = false" (identifier) "g_bSharedMemoryInit" (=) "=" (false) "false" (;) ";" (declaration) "HANDLE g_hMapFile = NULL;" (type_identifier) "HANDLE" (init_declarator) "g_hMapFile = NULL" (identifier) "g_hMapFile" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "SHARED_MEMORY_DATA* g_pSharedData = NULL;" (type_identifier) "SHARED_MEMORY_DATA" (init_declarator) "* g_pSharedData = NULL" (pointer_declarator) "* g_pSharedData" (*) "*" (identifier) "g_pSharedData" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "WCHAR g_szSharedName[] = L"Local\\PIXWorkshopGDC2007";" (type_identifier) "WCHAR" (init_declarator) "g_szSharedName[] = L"Local\\PIXWorkshopGDC2007"" (array_declarator) "g_szSharedName[]" (identifier) "g_szSharedName" ([) "[" (]) "]" (=) "=" (string_literal) "L"Local\\PIXWorkshopGDC2007"" (L") "L"" (string_content) "Local" (escape_sequence) "\\" (string_content) "PIXWorkshopGDC2007" (") """ (;) ";" (#endif) "#endif"
79
0
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 32.6, "nodes": 56, "errors": 0, "source_hash": "24d85c21cb848810e0702910ef32b29011418b38c17e369cbd7c515ebe5cfa48", "categorized_nodes": 29}, "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_ifdef", "text": "#ifndef _MEMORY_MAPPING_H_\n#define _MEMORY_MAPPING_H_\n\nstruct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n};\n\nbool g_bSharedMemoryInit = false;\nHANDLE g_hMapFile = NULL;\nSHARED_MEMORY_DATA* g_pSharedData = NULL;\nWCHAR g_szSharedName[] = L\"Local\\\\PIXWorkshopGDC2007\";\n\n#endif", "parent": null, "children": [4, 5, 6, 9, 24, 30, 37, 46, 55], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 4, "type": "#ifndef", "text": "#ifndef", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "identifier", "text": "_MEMORY_MAPPING_H_", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 26}}, {"id": 6, "type": "preproc_def", "text": "#define _MEMORY_MAPPING_H_\n", "parent": 3, "children": [7, 8], "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": "_MEMORY_MAPPING_H_", "parent": 6, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 26}}, {"id": 9, "type": "struct_specifier", "text": "struct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n}", "parent": 3, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 10, "type": "struct", "text": "struct", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 11, "type": "type_identifier", "text": "SHARED_MEMORY_DATA", "parent": 9, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 25}}, {"id": 12, "type": "field_declaration", "text": "int NumTerrainTiles;", "parent": 9, "children": [13, 14], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 24}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 7}}, {"id": 14, "type": "field_identifier", "text": "NumTerrainTiles", "parent": 12, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 23}}, {"id": 15, "type": "field_declaration", "text": "int NumGrassTiles;", "parent": 9, "children": [16, 17], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 22}}, {"id": 16, "type": "primitive_type", "text": "int", "parent": 15, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 7}}, {"id": 17, "type": "field_identifier", "text": "NumGrassTiles", "parent": 15, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 21}}, {"id": 18, "type": "field_declaration", "text": "int NumBalls;", "parent": 9, "children": [19, 20], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 7}}, {"id": 20, "type": "field_identifier", "text": "NumBalls", "parent": 18, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 16}}, {"id": 21, "type": "field_declaration", "text": "int MaxBalls;", "parent": 9, "children": [22, 23], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 17}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 7}}, {"id": 23, "type": "field_identifier", "text": "MaxBalls", "parent": 21, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 16}}, {"id": 24, "type": "declaration", "text": "bool g_bSharedMemoryInit = false;", "parent": 3, "children": [25, 26], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 48}}, {"id": 25, "type": "primitive_type", "text": "bool", "parent": 24, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 26, "type": "init_declarator", "text": "g_bSharedMemoryInit = false", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 47}}, {"id": 27, "type": "identifier", "text": "g_bSharedMemoryInit", "parent": 26, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 39}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 41}}, {"id": 29, "type": "false", "text": "false", "parent": 26, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 47}}, {"id": 30, "type": "declaration", "text": "HANDLE g_hMapFile = NULL;", "parent": 3, "children": [31, 32], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 38}}, {"id": 31, "type": "type_identifier", "text": "HANDLE", "parent": 30, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 32, "type": "init_declarator", "text": "g_hMapFile = NULL", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 37}}, {"id": 33, "type": "identifier", "text": "g_hMapFile", "parent": 32, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 30}}, {"id": 34, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 32}}, {"id": 35, "type": "null", "text": "NULL", "parent": 32, "children": [36], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 37}}, {"id": 36, "type": "NULL", "text": "NULL", "parent": 35, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 37}}, {"id": 37, "type": "declaration", "text": "SHARED_MEMORY_DATA* g_pSharedData = NULL;", "parent": 3, "children": [38, 39], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 41}}, {"id": 38, "type": "type_identifier", "text": "SHARED_MEMORY_DATA", "parent": 37, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 18}}, {"id": 39, "type": "init_declarator", "text": "* g_pSharedData = NULL", "parent": 37, "children": [40, 43, 44], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 40}}, {"id": 40, "type": "pointer_declarator", "text": "* g_pSharedData", "parent": 39, "children": [41, 42], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 33}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 19}}, {"id": 42, "type": "identifier", "text": "g_pSharedData", "parent": 40, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 33}}, {"id": 43, "type": "=", "text": "=", "parent": 39, "children": [], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 35}}, {"id": 44, "type": "null", "text": "NULL", "parent": 39, "children": [45], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 40}}, {"id": 45, "type": "NULL", "text": "NULL", "parent": 44, "children": [], "start_point": {"row": 20, "column": 36}, "end_point": {"row": 20, "column": 40}}, {"id": 46, "type": "declaration", "text": "WCHAR g_szSharedName[] = L\"Local\\\\PIXWorkshopGDC2007\";", "parent": 3, "children": [47, 48], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 54}}, {"id": 47, "type": "type_identifier", "text": "WCHAR", "parent": 46, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 5}}, {"id": 48, "type": "init_declarator", "text": "g_szSharedName[] = L\"Local\\\\PIXWorkshopGDC2007\"", "parent": 46, "children": [49, 51, 52], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 53}}, {"id": 49, "type": "array_declarator", "text": "g_szSharedName[]", "parent": 48, "children": [50], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 22}}, {"id": 50, "type": "identifier", "text": "g_szSharedName", "parent": 49, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 20}}, {"id": 51, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 24}}, {"id": 52, "type": "string_literal", "text": "L\"Local\\\\PIXWorkshopGDC2007\"", "parent": 48, "children": [53, 54], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 53}}, {"id": 53, "type": "L\"", "text": "L\"", "parent": 52, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 27}}, {"id": 54, "type": "escape_sequence", "text": "\\\\", "parent": 52, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 34}}, {"id": 55, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [12, 15, 18, 21, 24, 30, 37, 46], "classes": [9, 10], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 4, 5, 8, 11, 14, 17, 20, 23, 27, 31, 33, 38, 42, 47, 50, 55], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [52], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 9, "universal_type": "class", "name": "SHARED_MEMORY_DATA", "text_snippet": "struct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n in"}, {"node_id": 10, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "//--------------------------------------------------------------------------------------\n// MemoryMapping.h\n// PIX Pluging for PIX Workshop GDC2007\n// Copyright (c) Microsoft Corporation. All rights reserved.\n//--------------------------------------------------------------------------------------\n\n#pragma once\n#ifndef _MEMORY_MAPPING_H_\n#define _MEMORY_MAPPING_H_\n\nstruct SHARED_MEMORY_DATA\n{\n int NumTerrainTiles;\n int NumGrassTiles;\n int NumBalls;\n int MaxBalls;\n};\n\nbool g_bSharedMemoryInit = false;\nHANDLE g_hMapFile = NULL;\nSHARED_MEMORY_DATA* g_pSharedData = NULL;\nWCHAR g_szSharedName[] = L\"Local\\\\PIXWorkshopGDC2007\";\n\n#endif\n"}
279
c
// Copyright (c) 2009-2022 The Regents of the University of Michigan. // Part of HOOMD-blue, released under the BSD 3-Clause License. #ifndef __BOND_EVALUATOR_TETHER_H__ #define __BOND_EVALUATOR_TETHER_H__ #ifndef __HIPCC__ #include <string> #endif #include "hoomd/HOOMDMath.h" /*! \file EvaluatorBondTether.h \brief Defines the bond evaluator class for Tethering potentials */ // need to declare these class methods with __device__ qualifiers when building in nvcc // DEVICE is __host__ __device__ when included in nvcc and blank when included into the host // compiler #ifdef __HIPCC__ #define DEVICE __device__ #else #define DEVICE #endif namespace hoomd { namespace md { struct tether_params { Scalar k_b; Scalar l_min; Scalar l_c1; Scalar l_c0; Scalar l_max; #ifndef __HIPCC__ tether_params() { k_b = 10; l_min = 0.9; l_c1 = 1.2; l_c0 = 1.8; l_max = 2.1; } tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max) : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max) { } tether_params(pybind11::dict v) { k_b = v["k_b"].cast<Scalar>(); l_min = v["l_min"].cast<Scalar>(); l_c1 = v["l_c1"].cast<Scalar>(); l_c0 = v["l_c0"].cast<Scalar>(); l_max = v["l_max"].cast<Scalar>(); if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max && l_c0 < l_max)) { throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0" " < l_max"); } } pybind11::dict asDict() { pybind11::dict v; v["k_b"] = k_b; v["l_min"] = l_min; v["l_c1"] = l_c1; v["l_c0"] = l_c0; v["l_max"] = l_max; return v; } #endif } __attribute__((aligned(32))); //! Class for evaluating the tethering bond potential /*! The parameters are: - \a k_b (param.x) Bond stiffness - \a l_min (param.y) minimum bond length - \a l_c1 (param.w) cutoff length of repulsive part - \a l_c0 (param.z) cutoff length of attractive part - \a l_max (param.a) maximum bond length */ class EvaluatorBondTether { public: //! Define the parameter type used by this bond potential evaluator typedef tether_params param_type; //! Constructs the pair potential evaluator /*! \param _rsq Squared distance between the particles \param _params Per type pair parameters of this potential */ DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params) : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0), l_max(_params.l_max) { } //! This evaluator doesn't use diameter DEVICE static bool needsDiameter() { return false; } //! Accept the optional diameter values /*! \param da Diameter of particle a \param db Diameter of particle */ DEVICE void setDiameter(Scalar da, Scalar db) { } //! Tether doesn't use charge DEVICE static bool needsCharge() { return false; } //! Accept the optional charge values /*! \param qa Charge of particle a \param qb Charge of particle b */ DEVICE void setCharge(Scalar qa, Scalar qb) { } //! Evaluate the force and energy /*! \param force_divr Output parameter to write the computed force divided by r. \param bond_eng Output parameter to write the computed bond energy \return True if they are evaluated or false if the bond energy is not defined */ DEVICE bool evalForceAndEnergy(Scalar& force_divr, Scalar& bond_eng) { Scalar r = sqrt(rsq); Scalar U_att = Scalar(0.0); Scalar F_att = Scalar(0.0); Scalar U_rep = Scalar(0.0); Scalar F_rep = Scalar(0.0); if (r > l_c0) { U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r)); F_att = k_b * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r) - exp(Scalar(1.0) / (l_c0 - r))) / (l_max - r) / (l_max - r)); } if (r < l_c1) { U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min)); F_rep = k_b * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1) + exp(Scalar(1.0) / (r - l_c1))) / (r - l_min) / (r - l_min)); } if (k_b != Scalar(0.0)) { // Check if bond length restriction is violated if (rsq >= l_max * l_max) return false; if (rsq <= l_min * l_min) return false; force_divr = (F_att + F_rep) / r; bond_eng = U_att + U_rep; } return true; } #ifndef __HIPCC__ //! Get the name of this potential /*! \returns The potential name. */ static std::string getName() { return std::string("tether"); } #endif protected: Scalar rsq; //!< Stored rsq from the constructor Scalar k_b; //!< k_b parameter Scalar l_min; //!< l_min parameter Scalar l_c1; //!< l_c1 parameter Scalar l_c0; //!< l_c0 parameter Scalar l_max; //!< l_max parameter }; } // end namespace md } // end namespace hoomd #endif // __BOND_EVALUATOR_TETHER_H__
31.81
172
(translation_unit) "// Copyright (c) 2009-2022 The Regents of the University of Michigan.\n// Part of HOOMD-blue, released under the BSD 3-Clause License.\n\n#ifndef __BOND_EVALUATOR_TETHER_H__\n#define __BOND_EVALUATOR_TETHER_H__\n\n#ifndef __HIPCC__\n#include <string>\n#endif\n\n#include "hoomd/HOOMDMath.h"\n\n/*! \file EvaluatorBondTether.h\n \brief Defines the bond evaluator class for Tethering potentials\n*/\n\n// need to declare these class methods with __device__ qualifiers when building in nvcc\n// DEVICE is __host__ __device__ when included in nvcc and blank when included into the host\n// compiler\n#ifdef __HIPCC__\n#define DEVICE __device__\n#else\n#define DEVICE\n#endif\n\nnamespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v["k_b"].cast<Scalar>();\n l_min = v["l_min"].cast<Scalar>();\n l_c1 = v["l_c1"].cast<Scalar>();\n l_c0 = v["l_c0"].cast<Scalar>();\n l_max = v["l_max"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");\n }\n }\n\n pybind11::dict asDict()\n {\n pybind11::dict v;\n v["k_b"] = k_b;\n v["l_min"] = l_min;\n v["l_c1"] = l_c1;\n v["l_c0"] = l_c0;\n v["l_max"] = l_max;\n return v;\n }\n#endif\n } __attribute__((aligned(32)));\n\n//! Class for evaluating the tethering bond potential\n/*! The parameters are:\n - \a k_b (param.x) Bond stiffness\n - \a l_min (param.y) minimum bond length\n - \a l_c1 (param.w) cutoff length of repulsive part\n - \a l_c0 (param.z) cutoff length of attractive part\n - \a l_max (param.a) maximum bond length\n*/\nclass EvaluatorBondTether\n {\n public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;\n\n //! Constructs the pair potential evaluator\n /*! \param _rsq Squared distance between the particles\n \param _params Per type pair parameters of this potential\n */\n DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;\n }\n\n //! Accept the optional diameter values\n /*! \param da Diameter of particle a\n \param db Diameter of particle\n */\n DEVICE void setDiameter(Scalar da, Scalar db) { }\n\n //! Tether doesn't use charge\n DEVICE static bool needsCharge()\n {\n return false;\n }\n\n //! Accept the optional charge values\n /*! \param qa Charge of particle a\n \param qb Charge of particle b\n */\n DEVICE void setCharge(Scalar qa, Scalar qb) { }\n\n //! Evaluate the force and energy\n /*! \param force_divr Output parameter to write the computed force divided by r.\n \param bond_eng Output parameter to write the computed bond energy\n\n \return True if they are evaluated or false if the bond\n energy is not defined\n */\n DEVICE bool evalForceAndEnergy(Scalar& force_divr, Scalar& bond_eng)\n {\n Scalar r = sqrt(rsq);\n Scalar U_att = Scalar(0.0);\n Scalar F_att = Scalar(0.0);\n Scalar U_rep = Scalar(0.0);\n Scalar F_rep = Scalar(0.0);\n\n if (r > l_c0)\n {\n U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));\n F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));\n }\n\n if (r < l_c1)\n {\n U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));\n F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));\n }\n if (k_b != Scalar(0.0))\n {\n // Check if bond length restriction is violated\n if (rsq >= l_max * l_max)\n return false;\n if (rsq <= l_min * l_min)\n return false;\n\n force_divr = (F_att + F_rep) / r;\n bond_eng = U_att + U_rep;\n }\n\n return true;\n }\n\n#ifndef __HIPCC__\n //! Get the name of this potential\n /*! \returns The potential name.\n */\n static std::string getName()\n {\n return std::string("tether");\n }\n#endif\n\n protected:\n Scalar rsq; //!< Stored rsq from the constructor\n Scalar k_b; //!< k_b parameter\n Scalar l_min; //!< l_min parameter\n Scalar l_c1; //!< l_c1 parameter\n Scalar l_c0; //!< l_c0 parameter\n Scalar l_max; //!< l_max parameter\n };\n\n } // end namespace md\n } // end namespace hoomd\n\n#endif // __BOND_EVALUATOR_TETHER_H__\n" (comment) "// Copyright (c) 2009-2022 The Regents of the University of Michigan." (comment) "// Part of HOOMD-blue, released under the BSD 3-Clause License." (preproc_ifdef) "#ifndef __BOND_EVALUATOR_TETHER_H__\n#define __BOND_EVALUATOR_TETHER_H__\n\n#ifndef __HIPCC__\n#include <string>\n#endif\n\n#include "hoomd/HOOMDMath.h"\n\n/*! \file EvaluatorBondTether.h\n \brief Defines the bond evaluator class for Tethering potentials\n*/\n\n// need to declare these class methods with __device__ qualifiers when building in nvcc\n// DEVICE is __host__ __device__ when included in nvcc and blank when included into the host\n// compiler\n#ifdef __HIPCC__\n#define DEVICE __device__\n#else\n#define DEVICE\n#endif\n\nnamespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v["k_b"].cast<Scalar>();\n l_min = v["l_min"].cast<Scalar>();\n l_c1 = v["l_c1"].cast<Scalar>();\n l_c0 = v["l_c0"].cast<Scalar>();\n l_max = v["l_max"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");\n }\n }\n\n pybind11::dict asDict()\n {\n pybind11::dict v;\n v["k_b"] = k_b;\n v["l_min"] = l_min;\n v["l_c1"] = l_c1;\n v["l_c0"] = l_c0;\n v["l_max"] = l_max;\n return v;\n }\n#endif" (#ifndef) "#ifndef" (identifier) "__BOND_EVALUATOR_TETHER_H__" (preproc_def) "#define __BOND_EVALUATOR_TETHER_H__\n" (#define) "#define" (identifier) "__BOND_EVALUATOR_TETHER_H__" (preproc_ifdef) "#ifndef __HIPCC__\n#include <string>\n#endif" (#ifndef) "#ifndef" (identifier) "__HIPCC__" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (#endif) "#endif" (preproc_include) "#include "hoomd/HOOMDMath.h"\n" (#include) "#include" (string_literal) ""hoomd/HOOMDMath.h"" (") """ (string_content) "hoomd/HOOMDMath.h" (") """ (comment) "/*! \file EvaluatorBondTether.h\n \brief Defines the bond evaluator class for Tethering potentials\n*/" (comment) "// need to declare these class methods with __device__ qualifiers when building in nvcc" (comment) "// DEVICE is __host__ __device__ when included in nvcc and blank when included into the host" (comment) "// compiler" (preproc_ifdef) "#ifdef __HIPCC__\n#define DEVICE __device__\n#else\n#define DEVICE\n#endif" (#ifdef) "#ifdef" (identifier) "__HIPCC__" (preproc_def) "#define DEVICE __device__\n" (#define) "#define" (identifier) "DEVICE" (preproc_arg) "__device__" (preproc_else) "#else\n#define DEVICE\n" (#else) "#else" (preproc_def) "#define DEVICE\n" (#define) "#define" (identifier) "DEVICE" (#endif) "#endif" (function_definition) "namespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v["k_b"].cast<Scalar>();\n l_min = v["l_min"].cast<Scalar>();\n l_c1 = v["l_c1"].cast<Scalar>();\n l_c0 = v["l_c0"].cast<Scalar>();\n l_max = v["l_max"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");\n }\n }" (type_identifier) "namespace" (identifier) "hoomd" (compound_statement) "{\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v["k_b"].cast<Scalar>();\n l_min = v["l_min"].cast<Scalar>();\n l_c1 = v["l_c1"].cast<Scalar>();\n l_c0 = v["l_c0"].cast<Scalar>();\n l_max = v["l_max"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");\n }\n }" ({) "{" (function_definition) "namespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }" (type_identifier) "namespace" (identifier) "md" (compound_statement) "{\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }" ({) "{" (ERROR) "struct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b =" (struct) "struct" (identifier) "tether_params" ({) "{" (field_declaration) "Scalar k_b;" (type_identifier) "Scalar" (field_identifier) "k_b" (;) ";" (field_declaration) "Scalar l_min;" (type_identifier) "Scalar" (field_identifier) "l_min" (;) ";" (field_declaration) "Scalar l_c1;" (type_identifier) "Scalar" (field_identifier) "l_c1" (;) ";" (field_declaration) "Scalar l_c0;" (type_identifier) "Scalar" (field_identifier) "l_c0" (;) ";" (field_declaration) "Scalar l_max;" (type_identifier) "Scalar" (field_identifier) "l_max" (;) ";" (#ifndef) "#ifndef" (identifier) "__HIPCC__" (identifier) "tether_params" (() "(" (ERROR) ")\n {" ()) ")" ({) "{" (identifier) "k_b" (=) "=" (expression_statement) "10;" (number_literal) "10" (;) ";" (expression_statement) "l_min = 0.9;" (assignment_expression) "l_min = 0.9" (identifier) "l_min" (=) "=" (number_literal) "0.9" (;) ";" (expression_statement) "l_c1 = 1.2;" (assignment_expression) "l_c1 = 1.2" (identifier) "l_c1" (=) "=" (number_literal) "1.2" (;) ";" (expression_statement) "l_c0 = 1.8;" (assignment_expression) "l_c0 = 1.8" (identifier) "l_c0" (=) "=" (number_literal) "1.8" (;) ";" (expression_statement) "l_max = 2.1;" (assignment_expression) "l_max = 2.1" (identifier) "l_max" (=) "=" (number_literal) "2.1" (;) ";" (}) "}" (declaration) "tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v["k_b"].cast<Scalar>();" (macro_type_specifier) "tether_params(Scalar" (identifier) "tether_params" (() "(" (type_descriptor) "Scalar" (type_identifier) "Scalar" ()) "" (identifier) "k_b" (,) "," (identifier) "Scalar" (ERROR) "l_min" (identifier) "l_min" (,) "," (identifier) "Scalar" (ERROR) "l_c1" (identifier) "l_c1" (,) "," (identifier) "Scalar" (ERROR) "l_c0" (identifier) "l_c0" (,) "," (ERROR) "Scalar l_max)\n :" (identifier) "Scalar" (identifier) "l_max" ()) ")" (:) ":" (function_declarator) "k_b(k_b)" (identifier) "k_b" (parameter_list) "(k_b)" (() "(" (parameter_declaration) "k_b" (type_identifier) "k_b" ()) ")" (,) "," (function_declarator) "l_min(l_min)" (identifier) "l_min" (parameter_list) "(l_min)" (() "(" (parameter_declaration) "l_min" (type_identifier) "l_min" ()) ")" (,) "," (function_declarator) "l_c1(l_c1)" (identifier) "l_c1" (parameter_list) "(l_c1)" (() "(" (parameter_declaration) "l_c1" (type_identifier) "l_c1" ()) ")" (,) "," (function_declarator) "l_c0(l_c0)" (identifier) "l_c0" (parameter_list) "(l_c0)" (() "(" (parameter_declaration) "l_c0" (type_identifier) "l_c0" ()) ")" (,) "," (ERROR) "l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {" (function_declarator) "l_max(l_max)" (identifier) "l_max" (parameter_list) "(l_max)" (() "(" (parameter_declaration) "l_max" (type_identifier) "l_max" ()) ")" ({) "{" (}) "}" (function_declarator) "tether_params(pybind11::dict v)" (identifier) "tether_params" (parameter_list) "(pybind11::dict v)" (() "(" (parameter_declaration) "pybind11::dict v" (type_identifier) "pybind11" (ERROR) "::dict" (:) ":" (:) ":" (identifier) "dict" (identifier) "v" ()) ")" ({) "{" (init_declarator) "k_b = v["k_b"].cast<Scalar>()" (identifier) "k_b" (=) "=" (binary_expression) "v["k_b"].cast<Scalar>()" (binary_expression) "v["k_b"].cast<Scalar" (field_expression) "v["k_b"].cast" (subscript_expression) "v["k_b"]" (identifier) "v" ([) "[" (string_literal) ""k_b"" (") """ (string_content) "k_b" (") """ (]) "]" (.) "." (field_identifier) "cast" (<) "<" (identifier) "Scalar" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (expression_statement) "l_min = v["l_min"].cast<Scalar>();" (assignment_expression) "l_min = v["l_min"].cast<Scalar>()" (identifier) "l_min" (=) "=" (binary_expression) "v["l_min"].cast<Scalar>()" (binary_expression) "v["l_min"].cast<Scalar" (field_expression) "v["l_min"].cast" (subscript_expression) "v["l_min"]" (identifier) "v" ([) "[" (string_literal) ""l_min"" (") """ (string_content) "l_min" (") """ (]) "]" (.) "." (field_identifier) "cast" (<) "<" (identifier) "Scalar" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (expression_statement) "l_c1 = v["l_c1"].cast<Scalar>();" (assignment_expression) "l_c1 = v["l_c1"].cast<Scalar>()" (identifier) "l_c1" (=) "=" (binary_expression) "v["l_c1"].cast<Scalar>()" (binary_expression) "v["l_c1"].cast<Scalar" (field_expression) "v["l_c1"].cast" (subscript_expression) "v["l_c1"]" (identifier) "v" ([) "[" (string_literal) ""l_c1"" (") """ (string_content) "l_c1" (") """ (]) "]" (.) "." (field_identifier) "cast" (<) "<" (identifier) "Scalar" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (expression_statement) "l_c0 = v["l_c0"].cast<Scalar>();" (assignment_expression) "l_c0 = v["l_c0"].cast<Scalar>()" (identifier) "l_c0" (=) "=" (binary_expression) "v["l_c0"].cast<Scalar>()" (binary_expression) "v["l_c0"].cast<Scalar" (field_expression) "v["l_c0"].cast" (subscript_expression) "v["l_c0"]" (identifier) "v" ([) "[" (string_literal) ""l_c0"" (") """ (string_content) "l_c0" (") """ (]) "]" (.) "." (field_identifier) "cast" (<) "<" (identifier) "Scalar" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (expression_statement) "l_max = v["l_max"].cast<Scalar>();" (assignment_expression) "l_max = v["l_max"].cast<Scalar>()" (identifier) "l_max" (=) "=" (binary_expression) "v["l_max"].cast<Scalar>()" (binary_expression) "v["l_max"].cast<Scalar" (field_expression) "v["l_max"].cast" (subscript_expression) "v["l_max"]" (identifier) "v" ([) "[" (string_literal) ""l_max"" (") """ (string_content) "l_max" (") """ (]) "]" (.) "." (field_identifier) "cast" (<) "<" (identifier) "Scalar" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (;) ";" (if_statement) "if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");\n }" (if) "if" (parenthesized_expression) "(!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))" (() "(" (unary_expression) "!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max)" (!) "!" (parenthesized_expression) "(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max)" (() "(" (binary_expression) "l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max" (binary_expression) "l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max" (binary_expression) "l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0" (binary_expression) "l_min < l_c1 && l_min < l_c0 && l_min < l_max" (binary_expression) "l_min < l_c1 && l_min < l_c0" (binary_expression) "l_min < l_c1" (identifier) "l_min" (<) "<" (identifier) "l_c1" (&&) "&&" (binary_expression) "l_min < l_c0" (identifier) "l_min" (<) "<" (identifier) "l_c0" (&&) "&&" (binary_expression) "l_min < l_max" (identifier) "l_min" (<) "<" (identifier) "l_max" (&&) "&&" (binary_expression) "l_c1 < l_c0" (identifier) "l_c1" (<) "<" (identifier) "l_c0" (&&) "&&" (binary_expression) "l_c1 < l_max" (identifier) "l_c1" (<) "<" (identifier) "l_max" (&&) "&&" (binary_expression) "l_c0 < l_max" (identifier) "l_c0" (<) "<" (identifier) "l_max" ()) ")" ()) ")" (compound_statement) "{\n throw std::invalid_argument("The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");\n }" ({) "{" (ERROR) "throw std::invalid_argument(" (type_identifier) "throw" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (identifier) "invalid_argument" (() "(" (expression_statement) ""The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max");" (concatenated_string) ""The input parameters should follow l_min < l_c1 < l_c0"\n " < l_max"" (string_literal) ""The input parameters should follow l_min < l_c1 < l_c0"" (") """ (string_content) "The input parameters should follow l_min < l_c1 < l_c0" (") """ (string_literal) "" < l_max"" (") """ (string_content) " < l_max" (") """ (ERROR) ")" ()) ")" (;) ";" (}) "}" (}) "}" (labeled_statement) "pybind11::dict asDict()\n {\n pybind11::dict v;\n v["k_b"] = k_b;\n v["l_min"] = l_min;\n v["l_c1"] = l_c1;\n v["l_c0"] = l_c0;\n v["l_max"] = l_max;\n return v;\n }" (statement_identifier) "pybind11" (:) ":" (ERROR) ":dict asDict()" (:) ":" (type_identifier) "dict" (function_declarator) "asDict()" (identifier) "asDict" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n pybind11::dict v;\n v["k_b"] = k_b;\n v["l_min"] = l_min;\n v["l_c1"] = l_c1;\n v["l_c0"] = l_c0;\n v["l_max"] = l_max;\n return v;\n }" ({) "{" (labeled_statement) "pybind11::dict v;" (statement_identifier) "pybind11" (:) ":" (ERROR) ":" (:) ":" (declaration) "dict v;" (type_identifier) "dict" (identifier) "v" (;) ";" (expression_statement) "v["k_b"] = k_b;" (assignment_expression) "v["k_b"] = k_b" (subscript_expression) "v["k_b"]" (identifier) "v" ([) "[" (string_literal) ""k_b"" (") """ (string_content) "k_b" (") """ (]) "]" (=) "=" (identifier) "k_b" (;) ";" (expression_statement) "v["l_min"] = l_min;" (assignment_expression) "v["l_min"] = l_min" (subscript_expression) "v["l_min"]" (identifier) "v" ([) "[" (string_literal) ""l_min"" (") """ (string_content) "l_min" (") """ (]) "]" (=) "=" (identifier) "l_min" (;) ";" (expression_statement) "v["l_c1"] = l_c1;" (assignment_expression) "v["l_c1"] = l_c1" (subscript_expression) "v["l_c1"]" (identifier) "v" ([) "[" (string_literal) ""l_c1"" (") """ (string_content) "l_c1" (") """ (]) "]" (=) "=" (identifier) "l_c1" (;) ";" (expression_statement) "v["l_c0"] = l_c0;" (assignment_expression) "v["l_c0"] = l_c0" (subscript_expression) "v["l_c0"]" (identifier) "v" ([) "[" (string_literal) ""l_c0"" (") """ (string_content) "l_c0" (") """ (]) "]" (=) "=" (identifier) "l_c0" (;) ";" (expression_statement) "v["l_max"] = l_max;" (assignment_expression) "v["l_max"] = l_max" (subscript_expression) "v["l_max"]" (identifier) "v" ([) "[" (string_literal) ""l_max"" (") """ (string_content) "l_max" (") """ (]) "]" (=) "=" (identifier) "l_max" (;) ";" (return_statement) "return v;" (return) "return" (identifier) "v" (;) ";" (}) "}" (#endif) "#endif" (ERROR) "} __attribute__((aligned(32)))" (}) "}" (attribute_specifier) "__attribute__((aligned(32)))" (__attribute__) "__attribute__" (() "(" (argument_list) "(aligned(32))" (() "(" (call_expression) "aligned(32)" (identifier) "aligned" (argument_list) "(32)" (() "(" (number_literal) "32" ()) ")" ()) ")" ()) ")" (expression_statement) ";" (;) ";" (comment) "//! Class for evaluating the tethering bond potential" (comment) "/*! The parameters are:\n - \a k_b (param.x) Bond stiffness\n - \a l_min (param.y) minimum bond length\n - \a l_c1 (param.w) cutoff length of repulsive part\n - \a l_c0 (param.z) cutoff length of attractive part\n - \a l_max (param.a) maximum bond length\n*/" (function_definition) "class EvaluatorBondTether\n {\n public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;\n\n //! Constructs the pair potential evaluator\n /*! \param _rsq Squared distance between the particles\n \param _params Per type pair parameters of this potential\n */\n DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;\n }" (type_identifier) "class" (identifier) "EvaluatorBondTether" (compound_statement) "{\n public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;\n\n //! Constructs the pair potential evaluator\n /*! \param _rsq Squared distance between the particles\n \param _params Per type pair parameters of this potential\n */\n DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;\n }" ({) "{" (labeled_statement) "public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;" (statement_identifier) "public" (:) ":" (comment) "//! Define the parameter type used by this bond potential evaluator" (declaration) "typedef tether_params param_type;" (type_identifier) "typedef" (identifier) "tether_params" (ERROR) "param_type" (identifier) "param_type" (;) ";" (comment) "//! Constructs the pair potential evaluator" (comment) "/*! \param _rsq Squared distance between the particles\n \param _params Per type pair parameters of this potential\n */" (declaration) "DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;" (type_identifier) "DEVICE" (ERROR) "EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq)," (function_declarator) "EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq)" (identifier) "EvaluatorBondTether" (parameter_list) "(Scalar _rsq, const param_type& _params)" (() "(" (parameter_declaration) "Scalar _rsq" (type_identifier) "Scalar" (identifier) "_rsq" (,) "," (parameter_declaration) "const param_type& _params" (type_qualifier) "const" (const) "const" (type_identifier) "param_type" (ERROR) "&" (&) "&" (identifier) "_params" ()) ")" (ERROR) ":" (:) ":" (call_expression) "rsq(_rsq)" (identifier) "rsq" (argument_list) "(_rsq)" (() "(" (identifier) "_rsq" ()) ")" (,) "," (function_declarator) "k_b(_params.k_b)" (identifier) "k_b" (parameter_list) "(_params.k_b)" (() "(" (parameter_declaration) "_params.k_b" (type_identifier) "_params" (ERROR) "." (.) "." (identifier) "k_b" ()) ")" (,) "," (function_declarator) "l_min(_params.l_min)" (identifier) "l_min" (parameter_list) "(_params.l_min)" (() "(" (parameter_declaration) "_params.l_min" (type_identifier) "_params" (ERROR) "." (.) "." (identifier) "l_min" ()) ")" (,) "," (function_declarator) "l_c1(_params.l_c1)" (identifier) "l_c1" (parameter_list) "(_params.l_c1)" (() "(" (parameter_declaration) "_params.l_c1" (type_identifier) "_params" (ERROR) "." (.) "." (identifier) "l_c1" ()) ")" (,) "," (function_declarator) "l_c0(_params.l_c0)" (identifier) "l_c0" (parameter_list) "(_params.l_c0)" (() "(" (parameter_declaration) "_params.l_c0" (type_identifier) "_params" (ERROR) "." (.) "." (identifier) "l_c0" ()) ")" (ERROR) ",\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false" (,) "," (ERROR) "l_max(_params.l_max)\n {\n }" (function_declarator) "l_max(_params.l_max)" (identifier) "l_max" (parameter_list) "(_params.l_max)" (() "(" (parameter_declaration) "_params.l_max" (type_identifier) "_params" (ERROR) "." (.) "." (identifier) "l_max" ()) ")" ({) "{" (}) "}" (comment) "//! This evaluator doesn't use diameter" (ERROR) "DEVICE static bool" (identifier) "DEVICE" (identifier) "static" (primitive_type) "bool" (function_declarator) "needsDiameter()" (identifier) "needsDiameter" (parameter_list) "()" (() "(" ()) ")" ({) "{" (return) "return" (false) "false" (;) ";" (}) "}" (comment) "//! Accept the optional diameter values" (comment) "/*! \param da Diameter of particle a\n \param db Diameter of particle\n */" (function_definition) "DEVICE void setDiameter(Scalar da, Scalar db) { }" (type_identifier) "DEVICE" (ERROR) "void" (identifier) "void" (function_declarator) "setDiameter(Scalar da, Scalar db)" (identifier) "setDiameter" (parameter_list) "(Scalar da, Scalar db)" (() "(" (parameter_declaration) "Scalar da" (type_identifier) "Scalar" (identifier) "da" (,) "," (parameter_declaration) "Scalar db" (type_identifier) "Scalar" (identifier) "db" ()) ")" (compound_statement) "{ }" ({) "{" (}) "}" (comment) "//! Tether doesn't use charge" (function_definition) "DEVICE static bool needsCharge()\n {\n return false;\n }" (type_identifier) "DEVICE" (storage_class_specifier) "static" (static) "static" (ERROR) "bool" (identifier) "bool" (function_declarator) "needsCharge()" (identifier) "needsCharge" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (comment) "//! Accept the optional charge values" (comment) "/*! \param qa Charge of particle a\n \param qb Charge of particle b\n */" (function_definition) "DEVICE void setCharge(Scalar qa, Scalar qb) { }" (type_identifier) "DEVICE" (ERROR) "void" (identifier) "void" (function_declarator) "setCharge(Scalar qa, Scalar qb)" (identifier) "setCharge" (parameter_list) "(Scalar qa, Scalar qb)" (() "(" (parameter_declaration) "Scalar qa" (type_identifier) "Scalar" (identifier) "qa" (,) "," (parameter_declaration) "Scalar qb" (type_identifier) "Scalar" (identifier) "qb" ()) ")" (compound_statement) "{ }" ({) "{" (}) "}" (comment) "//! Evaluate the force and energy" (comment) "/*! \param force_divr Output parameter to write the computed force divided by r.\n \param bond_eng Output parameter to write the computed bond energy\n\n \return True if they are evaluated or false if the bond\n energy is not defined\n */" (declaration) "DEVICE bool" (type_identifier) "DEVICE" (identifier) "bool" (;) "" (expression_statement) "evalForceAndEnergy(Scalar& force_divr, Scalar& bond_eng)" (call_expression) "evalForceAndEnergy(Scalar& force_divr, Scalar& bond_eng)" (identifier) "evalForceAndEnergy" (argument_list) "(Scalar& force_divr, Scalar& bond_eng)" (() "(" (binary_expression) "Scalar& force_divr" (identifier) "Scalar" (&) "&" (identifier) "force_divr" (,) "," (binary_expression) "Scalar& bond_eng" (identifier) "Scalar" (&) "&" (identifier) "bond_eng" ()) ")" (;) "" (compound_statement) "{\n Scalar r = sqrt(rsq);\n Scalar U_att = Scalar(0.0);\n Scalar F_att = Scalar(0.0);\n Scalar U_rep = Scalar(0.0);\n Scalar F_rep = Scalar(0.0);\n\n if (r > l_c0)\n {\n U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));\n F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));\n }\n\n if (r < l_c1)\n {\n U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));\n F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));\n }\n if (k_b != Scalar(0.0))\n {\n // Check if bond length restriction is violated\n if (rsq >= l_max * l_max)\n return false;\n if (rsq <= l_min * l_min)\n return false;\n\n force_divr = (F_att + F_rep) / r;\n bond_eng = U_att + U_rep;\n }\n\n return true;\n }" ({) "{" (declaration) "Scalar r = sqrt(rsq);" (type_identifier) "Scalar" (init_declarator) "r = sqrt(rsq)" (identifier) "r" (=) "=" (call_expression) "sqrt(rsq)" (identifier) "sqrt" (argument_list) "(rsq)" (() "(" (identifier) "rsq" ()) ")" (;) ";" (declaration) "Scalar U_att = Scalar(0.0);" (type_identifier) "Scalar" (init_declarator) "U_att = Scalar(0.0)" (identifier) "U_att" (=) "=" (call_expression) "Scalar(0.0)" (identifier) "Scalar" (argument_list) "(0.0)" (() "(" (number_literal) "0.0" ()) ")" (;) ";" (declaration) "Scalar F_att = Scalar(0.0);" (type_identifier) "Scalar" (init_declarator) "F_att = Scalar(0.0)" (identifier) "F_att" (=) "=" (call_expression) "Scalar(0.0)" (identifier) "Scalar" (argument_list) "(0.0)" (() "(" (number_literal) "0.0" ()) ")" (;) ";" (declaration) "Scalar U_rep = Scalar(0.0);" (type_identifier) "Scalar" (init_declarator) "U_rep = Scalar(0.0)" (identifier) "U_rep" (=) "=" (call_expression) "Scalar(0.0)" (identifier) "Scalar" (argument_list) "(0.0)" (() "(" (number_literal) "0.0" ()) ")" (;) ";" (declaration) "Scalar F_rep = Scalar(0.0);" (type_identifier) "Scalar" (init_declarator) "F_rep = Scalar(0.0)" (identifier) "F_rep" (=) "=" (call_expression) "Scalar(0.0)" (identifier) "Scalar" (argument_list) "(0.0)" (() "(" (number_literal) "0.0" ()) ")" (;) ";" (if_statement) "if (r > l_c0)\n {\n U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));\n F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));\n }" (if) "if" (parenthesized_expression) "(r > l_c0)" (() "(" (binary_expression) "r > l_c0" (identifier) "r" (>) ">" (identifier) "l_c0" ()) ")" (compound_statement) "{\n U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));\n F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));\n }" ({) "{" (expression_statement) "U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));" (assignment_expression) "U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r))" (identifier) "U_att" (=) "=" (binary_expression) "k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r))" (identifier) "k_b" (*) "*" (parenthesized_expression) "(exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r))" (() "(" (binary_expression) "exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r)" (call_expression) "exp(Scalar(1.0) / (l_c0 - r))" (identifier) "exp" (argument_list) "(Scalar(1.0) / (l_c0 - r))" (() "(" (binary_expression) "Scalar(1.0) / (l_c0 - r)" (call_expression) "Scalar(1.0)" (identifier) "Scalar" (argument_list) "(1.0)" (() "(" (number_literal) "1.0" ()) ")" (/) "/" (parenthesized_expression) "(l_c0 - r)" (() "(" (binary_expression) "l_c0 - r" (identifier) "l_c0" (-) "-" (identifier) "r" ()) ")" ()) ")" (/) "/" (parenthesized_expression) "(l_max - r)" (() "(" (binary_expression) "l_max - r" (identifier) "l_max" (-) "-" (identifier) "r" ()) ")" ()) ")" (;) ";" (expression_statement) "F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));" (assignment_expression) "F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r))" (identifier) "F_att" (=) "=" (binary_expression) "k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r))" (identifier) "k_b" (*) "*" (parenthesized_expression) "(((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r))" (() "(" (binary_expression) "((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r)" (binary_expression) "((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r)" (parenthesized_expression) "((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))" (() "(" (binary_expression) "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r))" (binary_expression) "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)" (binary_expression) "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r)" (binary_expression) "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r))" (parenthesized_expression) "(r - l_max)" (() "(" (binary_expression) "r - l_max" (identifier) "r" (-) "-" (identifier) "l_max" ()) ")" (*) "*" (call_expression) "exp(Scalar(1.0) / (l_c0 - r))" (identifier) "exp" (argument_list) "(Scalar(1.0) / (l_c0 - r))" (() "(" (binary_expression) "Scalar(1.0) / (l_c0 - r)" (call_expression) "Scalar(1.0)" (identifier) "Scalar" (argument_list) "(1.0)" (() "(" (number_literal) "1.0" ()) ")" (/) "/" (parenthesized_expression) "(l_c0 - r)" (() "(" (binary_expression) "l_c0 - r" (identifier) "l_c0" (-) "-" (identifier) "r" ()) ")" ()) ")" (/) "/" (parenthesized_expression) "(l_c0 - r)" (() "(" (binary_expression) "l_c0 - r" (identifier) "l_c0" (-) "-" (identifier) "r" ()) ")" (/) "/" (parenthesized_expression) "(l_c0 - r)" (() "(" (binary_expression) "l_c0 - r" (identifier) "l_c0" (-) "-" (identifier) "r" ()) ")" (-) "-" (call_expression) "exp(Scalar(1.0) / (l_c0 - r))" (identifier) "exp" (argument_list) "(Scalar(1.0) / (l_c0 - r))" (() "(" (binary_expression) "Scalar(1.0) / (l_c0 - r)" (call_expression) "Scalar(1.0)" (identifier) "Scalar" (argument_list) "(1.0)" (() "(" (number_literal) "1.0" ()) ")" (/) "/" (parenthesized_expression) "(l_c0 - r)" (() "(" (binary_expression) "l_c0 - r" (identifier) "l_c0" (-) "-" (identifier) "r" ()) ")" ()) ")" ()) ")" (/) "/" (parenthesized_expression) "(l_max - r)" (() "(" (binary_expression) "l_max - r" (identifier) "l_max" (-) "-" (identifier) "r" ()) ")" (/) "/" (parenthesized_expression) "(l_max - r)" (() "(" (binary_expression) "l_max - r" (identifier) "l_max" (-) "-" (identifier) "r" ()) ")" ()) ")" (;) ";" (}) "}" (if_statement) "if (r < l_c1)\n {\n U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));\n F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));\n }" (if) "if" (parenthesized_expression) "(r < l_c1)" (() "(" (binary_expression) "r < l_c1" (identifier) "r" (<) "<" (identifier) "l_c1" ()) ")" (compound_statement) "{\n U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));\n F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));\n }" ({) "{" (expression_statement) "U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));" (assignment_expression) "U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min))" (identifier) "U_rep" (=) "=" (binary_expression) "k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min))" (identifier) "k_b" (*) "*" (parenthesized_expression) "(exp(Scalar(1.0) / (r - l_c1)) / (r - l_min))" (() "(" (binary_expression) "exp(Scalar(1.0) / (r - l_c1)) / (r - l_min)" (call_expression) "exp(Scalar(1.0) / (r - l_c1))" (identifier) "exp" (argument_list) "(Scalar(1.0) / (r - l_c1))" (() "(" (binary_expression) "Scalar(1.0) / (r - l_c1)" (call_expression) "Scalar(1.0)" (identifier) "Scalar" (argument_list) "(1.0)" (() "(" (number_literal) "1.0" ()) ")" (/) "/" (parenthesized_expression) "(r - l_c1)" (() "(" (binary_expression) "r - l_c1" (identifier) "r" (-) "-" (identifier) "l_c1" ()) ")" ()) ")" (/) "/" (parenthesized_expression) "(r - l_min)" (() "(" (binary_expression) "r - l_min" (identifier) "r" (-) "-" (identifier) "l_min" ()) ")" ()) ")" (;) ";" (expression_statement) "F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));" (assignment_expression) "F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min))" (identifier) "F_rep" (=) "=" (binary_expression) "k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min))" (identifier) "k_b" (*) "*" (parenthesized_expression) "(((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min))" (() "(" (binary_expression) "((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min)" (binary_expression) "((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min)" (parenthesized_expression) "((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))" (() "(" (binary_expression) "(r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1))" (binary_expression) "(r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)" (binary_expression) "(r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1)" (binary_expression) "(r - l_min) * exp(Scalar(1.0) / (r - l_c1))" (parenthesized_expression) "(r - l_min)" (() "(" (binary_expression) "r - l_min" (identifier) "r" (-) "-" (identifier) "l_min" ()) ")" (*) "*" (call_expression) "exp(Scalar(1.0) / (r - l_c1))" (identifier) "exp" (argument_list) "(Scalar(1.0) / (r - l_c1))" (() "(" (binary_expression) "Scalar(1.0) / (r - l_c1)" (call_expression) "Scalar(1.0)" (identifier) "Scalar" (argument_list) "(1.0)" (() "(" (number_literal) "1.0" ()) ")" (/) "/" (parenthesized_expression) "(r - l_c1)" (() "(" (binary_expression) "r - l_c1" (identifier) "r" (-) "-" (identifier) "l_c1" ()) ")" ()) ")" (/) "/" (parenthesized_expression) "(r - l_c1)" (() "(" (binary_expression) "r - l_c1" (identifier) "r" (-) "-" (identifier) "l_c1" ()) ")" (/) "/" (parenthesized_expression) "(r - l_c1)" (() "(" (binary_expression) "r - l_c1" (identifier) "r" (-) "-" (identifier) "l_c1" ()) ")" (+) "+" (call_expression) "exp(Scalar(1.0) / (r - l_c1))" (identifier) "exp" (argument_list) "(Scalar(1.0) / (r - l_c1))" (() "(" (binary_expression) "Scalar(1.0) / (r - l_c1)" (call_expression) "Scalar(1.0)" (identifier) "Scalar" (argument_list) "(1.0)" (() "(" (number_literal) "1.0" ()) ")" (/) "/" (parenthesized_expression) "(r - l_c1)" (() "(" (binary_expression) "r - l_c1" (identifier) "r" (-) "-" (identifier) "l_c1" ()) ")" ()) ")" ()) ")" (/) "/" (parenthesized_expression) "(r - l_min)" (() "(" (binary_expression) "r - l_min" (identifier) "r" (-) "-" (identifier) "l_min" ()) ")" (/) "/" (parenthesized_expression) "(r - l_min)" (() "(" (binary_expression) "r - l_min" (identifier) "r" (-) "-" (identifier) "l_min" ()) ")" ()) ")" (;) ";" (}) "}" (if_statement) "if (k_b != Scalar(0.0))\n {\n // Check if bond length restriction is violated\n if (rsq >= l_max * l_max)\n return false;\n if (rsq <= l_min * l_min)\n return false;\n\n force_divr = (F_att + F_rep) / r;\n bond_eng = U_att + U_rep;\n }" (if) "if" (parenthesized_expression) "(k_b != Scalar(0.0))" (() "(" (binary_expression) "k_b != Scalar(0.0)" (identifier) "k_b" (!=) "!=" (call_expression) "Scalar(0.0)" (identifier) "Scalar" (argument_list) "(0.0)" (() "(" (number_literal) "0.0" ()) ")" ()) ")" (compound_statement) "{\n // Check if bond length restriction is violated\n if (rsq >= l_max * l_max)\n return false;\n if (rsq <= l_min * l_min)\n return false;\n\n force_divr = (F_att + F_rep) / r;\n bond_eng = U_att + U_rep;\n }" ({) "{" (comment) "// Check if bond length restriction is violated" (if_statement) "if (rsq >= l_max * l_max)\n return false;" (if) "if" (parenthesized_expression) "(rsq >= l_max * l_max)" (() "(" (binary_expression) "rsq >= l_max * l_max" (identifier) "rsq" (>=) ">=" (binary_expression) "l_max * l_max" (identifier) "l_max" (*) "*" (identifier) "l_max" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (if_statement) "if (rsq <= l_min * l_min)\n return false;" (if) "if" (parenthesized_expression) "(rsq <= l_min * l_min)" (() "(" (binary_expression) "rsq <= l_min * l_min" (identifier) "rsq" (<=) "<=" (binary_expression) "l_min * l_min" (identifier) "l_min" (*) "*" (identifier) "l_min" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (expression_statement) "force_divr = (F_att + F_rep) / r;" (assignment_expression) "force_divr = (F_att + F_rep) / r" (identifier) "force_divr" (=) "=" (binary_expression) "(F_att + F_rep) / r" (parenthesized_expression) "(F_att + F_rep)" (() "(" (binary_expression) "F_att + F_rep" (identifier) "F_att" (+) "+" (identifier) "F_rep" ()) ")" (/) "/" (identifier) "r" (;) ";" (expression_statement) "bond_eng = U_att + U_rep;" (assignment_expression) "bond_eng = U_att + U_rep" (identifier) "bond_eng" (=) "=" (binary_expression) "U_att + U_rep" (identifier) "U_att" (+) "+" (identifier) "U_rep" (;) ";" (}) "}" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (preproc_ifdef) "#ifndef __HIPCC__\n //! Get the name of this potential\n /*! \returns The potential name.\n */\n static std::string getName()\n {\n return std::string("tether");\n }\n#endif" (#ifndef) "#ifndef" (identifier) "__HIPCC__" (comment) "//! Get the name of this potential" (comment) "/*! \returns The potential name.\n */" (function_definition) "static std::string getName()\n {\n return std::string("tether");\n }" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (function_declarator) "getName()" (identifier) "getName" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return std::string("tether");\n }" ({) "{" (return_statement) "return std::string("tether");" (return) "return" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "string("tether")" (identifier) "string" (argument_list) "("tether")" (() "(" (string_literal) ""tether"" (") """ (string_content) "tether" (") """ ()) ")" (;) ";" (}) "}" (#endif) "#endif" (labeled_statement) "protected:\n Scalar rsq;" (statement_identifier) "protected" (:) ":" (declaration) "Scalar rsq;" (type_identifier) "Scalar" (identifier) "rsq" (;) ";" (comment) "//!< Stored rsq from the constructor" (declaration) "Scalar k_b;" (type_identifier) "Scalar" (identifier) "k_b" (;) ";" (comment) "//!< k_b parameter" (declaration) "Scalar l_min;" (type_identifier) "Scalar" (identifier) "l_min" (;) ";" (comment) "//!< l_min parameter" (declaration) "Scalar l_c1;" (type_identifier) "Scalar" (identifier) "l_c1" (;) ";" (comment) "//!< l_c1 parameter" (declaration) "Scalar l_c0;" (type_identifier) "Scalar" (identifier) "l_c0" (;) ";" (comment) "//!< l_c0 parameter" (declaration) "Scalar l_max;" (type_identifier) "Scalar" (identifier) "l_max" (;) ";" (comment) "//!< l_max parameter" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "} // end namespace md\n } // end namespace hoomd\n\n#endif" (}) "}" (comment) "// end namespace md" (}) "}" (comment) "// end namespace hoomd" (#endif) "#endif" (comment) "// __BOND_EVALUATOR_TETHER_H__"
1,226
33
{"language": "c", "success": true, "metadata": {"lines": 172, "avg_line_length": 31.81, "nodes": 761, "errors": 0, "source_hash": "a5726314da3141617863c9c47084d1ab28b6e81f474df6b89bd49e83b7491616", "categorized_nodes": 570}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __BOND_EVALUATOR_TETHER_H__\n#define __BOND_EVALUATOR_TETHER_H__\n\n#ifndef __HIPCC__\n#include <string>\n#endif\n\n#include \"hoomd/HOOMDMath.h\"\n\n/*! \\file EvaluatorBondTether.h\n \\brief Defines the bond evaluator class for Tethering potentials\n*/\n\n// need to declare these class methods with __device__ qualifiers when building in nvcc\n// DEVICE is __host__ __device__ when included in nvcc and blank when included into the host\n// compiler\n#ifdef __HIPCC__\n#define DEVICE __device__\n#else\n#define DEVICE\n#endif\n\nnamespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v[\"k_b\"].cast<Scalar>();\n l_min = v[\"l_min\"].cast<Scalar>();\n l_c1 = v[\"l_c1\"].cast<Scalar>();\n l_c0 = v[\"l_c0\"].cast<Scalar>();\n l_max = v[\"l_max\"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument(\"The input parameters should follow l_min < l_c1 < l_c0\"\n \" < l_max\");\n }\n }\n\n pybind11::dict asDict()\n {\n pybind11::dict v;\n v[\"k_b\"] = k_b;\n v[\"l_min\"] = l_min;\n v[\"l_c1\"] = l_c1;\n v[\"l_c0\"] = l_c0;\n v[\"l_max\"] = l_max;\n return v;\n }\n#endif", "parent": null, "children": [1, 2, 3, 6, 13, 16, 29, 249, 293], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 2, "type": "identifier", "text": "__BOND_EVALUATOR_TETHER_H__", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 35}}, {"id": 3, "type": "preproc_def", "text": "#define __BOND_EVALUATOR_TETHER_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 5, "type": "identifier", "text": "__BOND_EVALUATOR_TETHER_H__", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 35}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifndef __HIPCC__\n#include <string>\n#endif", "parent": 0, "children": [7, 8, 9, 12], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 7, "type": "#ifndef", "text": "#ifndef", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 8, "type": "identifier", "text": "__HIPCC__", "parent": 6, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <string>\n", "parent": 6, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<string>", "parent": 9, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 17}}, {"id": 12, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 13, "type": "preproc_include", "text": "#include \"hoomd/HOOMDMath.h\"\n", "parent": 0, "children": [14, 15], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 14, "type": "#include", "text": "#include", "parent": 13, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 15, "type": "string_literal", "text": "\"hoomd/HOOMDMath.h\"", "parent": 13, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 28}}, {"id": 16, "type": "preproc_ifdef", "text": "#ifdef __HIPCC__\n#define DEVICE __device__\n#else\n#define DEVICE\n#endif", "parent": 0, "children": [17, 18, 19, 23, 28], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 17, "type": "#ifdef", "text": "#ifdef", "parent": 16, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 18, "type": "identifier", "text": "__HIPCC__", "parent": 16, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 16}}, {"id": 19, "type": "preproc_def", "text": "#define DEVICE __device__\n", "parent": 16, "children": [20, 21, 22], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 20, "type": "#define", "text": "#define", "parent": 19, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 21, "type": "identifier", "text": "DEVICE", "parent": 19, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 14}}, {"id": 22, "type": "preproc_arg", "text": "__device__", "parent": 19, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 25}}, {"id": 23, "type": "preproc_else", "text": "#else\n#define DEVICE\n", "parent": 16, "children": [24, 25], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 24, "type": "#else", "text": "#else", "parent": 23, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 5}}, {"id": 25, "type": "preproc_def", "text": "#define DEVICE\n", "parent": 23, "children": [26, 27], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 27, "type": "identifier", "text": "DEVICE", "parent": 25, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 14}}, {"id": 28, "type": "#endif", "text": "#endif", "parent": 16, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 29, "type": "function_definition", "text": "namespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v[\"k_b\"].cast<Scalar>();\n l_min = v[\"l_min\"].cast<Scalar>();\n l_c1 = v[\"l_c1\"].cast<Scalar>();\n l_c0 = v[\"l_c0\"].cast<Scalar>();\n l_max = v[\"l_max\"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument(\"The input parameters should follow l_min < l_c1 < l_c0\"\n \" < l_max\");\n }\n }", "parent": 0, "children": [30, 31], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 66, "column": 9}}, {"id": 30, "type": "type_identifier", "text": "namespace", "parent": 29, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 9}}, {"id": 31, "type": "identifier", "text": "hoomd", "parent": 29, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 15}}, {"id": 32, "type": "function_definition", "text": "namespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }", "parent": 29, "children": [33, 34], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 45, "column": 9}}, {"id": 33, "type": "type_identifier", "text": "namespace", "parent": 32, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 9}}, {"id": 34, "type": "identifier", "text": "md", "parent": 32, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 12}}, {"id": 35, "type": "ERROR", "text": "struct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b =", "parent": 32, "children": [36, 37, 38, 41, 44, 47, 50, 53, 54, 55, 56, 57, 58], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 40, "column": 13}}, {"id": 36, "type": "struct", "text": "struct", "parent": 35, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 37, "type": "identifier", "text": "tether_params", "parent": 35, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 20}}, {"id": 38, "type": "field_declaration", "text": "Scalar k_b;", "parent": 35, "children": [39, 40], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 15}}, {"id": 39, "type": "type_identifier", "text": "Scalar", "parent": 38, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 10}}, {"id": 40, "type": "field_identifier", "text": "k_b", "parent": 38, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 14}}, {"id": 41, "type": "field_declaration", "text": "Scalar l_min;", "parent": 35, "children": [42, 43], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 17}}, {"id": 42, "type": "type_identifier", "text": "Scalar", "parent": 41, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 10}}, {"id": 43, "type": "field_identifier", "text": "l_min", "parent": 41, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 16}}, {"id": 44, "type": "field_declaration", "text": "Scalar l_c1;", "parent": 35, "children": [45, 46], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 16}}, {"id": 45, "type": "type_identifier", "text": "Scalar", "parent": 44, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 46, "type": "field_identifier", "text": "l_c1", "parent": 44, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 15}}, {"id": 47, "type": "field_declaration", "text": "Scalar l_c0;", "parent": 35, "children": [48, 49], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 16}}, {"id": 48, "type": "type_identifier", "text": "Scalar", "parent": 47, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 49, "type": "field_identifier", "text": "l_c0", "parent": 47, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 15}}, {"id": 50, "type": "field_declaration", "text": "Scalar l_max;", "parent": 35, "children": [51, 52], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 17}}, {"id": 51, "type": "type_identifier", "text": "Scalar", "parent": 50, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 10}}, {"id": 52, "type": "field_identifier", "text": "l_max", "parent": 50, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 16}}, {"id": 53, "type": "#ifndef", "text": "#ifndef", "parent": 35, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 54, "type": "identifier", "text": "__HIPCC__", "parent": 35, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 17}}, {"id": 55, "type": "identifier", "text": "tether_params", "parent": 35, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 17}}, {"id": 56, "type": "ERROR", "text": ")\n {", "parent": 35, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 39, "column": 9}}, {"id": 57, "type": "identifier", "text": "k_b", "parent": 35, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 11}}, {"id": 58, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 13}}, {"id": 59, "type": "number_literal", "text": "10", "parent": 32, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 16}}, {"id": 60, "type": "assignment_expression", "text": "l_min = 0.9", "parent": 32, "children": [61, 62, 63], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 19}}, {"id": 61, "type": "identifier", "text": "l_min", "parent": 60, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 13}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 15}}, {"id": 63, "type": "number_literal", "text": "0.9", "parent": 60, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 19}}, {"id": 64, "type": "assignment_expression", "text": "l_c1 = 1.2", "parent": 32, "children": [65, 66, 67], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 18}}, {"id": 65, "type": "identifier", "text": "l_c1", "parent": 64, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 12}}, {"id": 66, "type": "=", "text": "=", "parent": 64, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 14}}, {"id": 67, "type": "number_literal", "text": "1.2", "parent": 64, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 18}}, {"id": 68, "type": "assignment_expression", "text": "l_c0 = 1.8", "parent": 32, "children": [69, 70, 71], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 18}}, {"id": 69, "type": "identifier", "text": "l_c0", "parent": 68, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 70, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 14}}, {"id": 71, "type": "number_literal", "text": "1.8", "parent": 68, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 18}}, {"id": 72, "type": "assignment_expression", "text": "l_max = 2.1", "parent": 32, "children": [73, 74, 75], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 19}}, {"id": 73, "type": "identifier", "text": "l_max", "parent": 72, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 13}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 15}}, {"id": 75, "type": "number_literal", "text": "2.1", "parent": 72, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 19}}, {"id": 76, "type": "declaration", "text": "tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v[\"k_b\"].cast<Scalar>();", "parent": 29, "children": [77, 81, 82, 83, 85, 86, 88, 89, 91, 94, 99, 104, 109, 114, 128], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 54, "column": 38}}, {"id": 77, "type": "macro_type_specifier", "text": "tether_params(Scalar", "parent": 76, "children": [78, 79], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 24}}, {"id": 78, "type": "identifier", "text": "tether_params", "parent": 77, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 17}}, {"id": 79, "type": "type_descriptor", "text": "Scalar", "parent": 77, "children": [80], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 24}}, {"id": 80, "type": "type_identifier", "text": "Scalar", "parent": 79, "children": [], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 24}}, {"id": 81, "type": "identifier", "text": "k_b", "parent": 76, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 28}}, {"id": 82, "type": "identifier", "text": "Scalar", "parent": 76, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 36}}, {"id": 83, "type": "ERROR", "text": "l_min", "parent": 76, "children": [84], "start_point": {"row": 47, "column": 37}, "end_point": {"row": 47, "column": 42}}, {"id": 84, "type": "identifier", "text": "l_min", "parent": 83, "children": [], "start_point": {"row": 47, "column": 37}, "end_point": {"row": 47, "column": 42}}, {"id": 85, "type": "identifier", "text": "Scalar", "parent": 76, "children": [], "start_point": {"row": 47, "column": 44}, "end_point": {"row": 47, "column": 50}}, {"id": 86, "type": "ERROR", "text": "l_c1", "parent": 76, "children": [87], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 55}}, {"id": 87, "type": "identifier", "text": "l_c1", "parent": 86, "children": [], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 55}}, {"id": 88, "type": "identifier", "text": "Scalar", "parent": 76, "children": [], "start_point": {"row": 47, "column": 57}, "end_point": {"row": 47, "column": 63}}, {"id": 89, "type": "ERROR", "text": "l_c0", "parent": 76, "children": [90], "start_point": {"row": 47, "column": 64}, "end_point": {"row": 47, "column": 68}}, {"id": 90, "type": "identifier", "text": "l_c0", "parent": 89, "children": [], "start_point": {"row": 47, "column": 64}, "end_point": {"row": 47, "column": 68}}, {"id": 91, "type": "ERROR", "text": "Scalar l_max)\n :", "parent": 76, "children": [92, 93], "start_point": {"row": 47, "column": 70}, "end_point": {"row": 48, "column": 9}}, {"id": 92, "type": "identifier", "text": "Scalar", "parent": 91, "children": [], "start_point": {"row": 47, "column": 70}, "end_point": {"row": 47, "column": 76}}, {"id": 93, "type": "identifier", "text": "l_max", "parent": 91, "children": [], "start_point": {"row": 47, "column": 77}, "end_point": {"row": 47, "column": 82}}, {"id": 94, "type": "function_declarator", "text": "k_b(k_b)", "parent": 76, "children": [95, 96], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 18}}, {"id": 95, "type": "identifier", "text": "k_b", "parent": 94, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 13}}, {"id": 96, "type": "parameter_list", "text": "(k_b)", "parent": 94, "children": [97], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 18}}, {"id": 97, "type": "parameter_declaration", "text": "k_b", "parent": 96, "children": [98], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 17}}, {"id": 98, "type": "type_identifier", "text": "k_b", "parent": 97, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 17}}, {"id": 99, "type": "function_declarator", "text": "l_min(l_min)", "parent": 76, "children": [100, 101], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 32}}, {"id": 100, "type": "identifier", "text": "l_min", "parent": 99, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 25}}, {"id": 101, "type": "parameter_list", "text": "(l_min)", "parent": 99, "children": [102], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 32}}, {"id": 102, "type": "parameter_declaration", "text": "l_min", "parent": 101, "children": [103], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 31}}, {"id": 103, "type": "type_identifier", "text": "l_min", "parent": 102, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 31}}, {"id": 104, "type": "function_declarator", "text": "l_c1(l_c1)", "parent": 76, "children": [105, 106], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 44}}, {"id": 105, "type": "identifier", "text": "l_c1", "parent": 104, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 38}}, {"id": 106, "type": "parameter_list", "text": "(l_c1)", "parent": 104, "children": [107], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 48, "column": 44}}, {"id": 107, "type": "parameter_declaration", "text": "l_c1", "parent": 106, "children": [108], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 43}}, {"id": 108, "type": "type_identifier", "text": "l_c1", "parent": 107, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 43}}, {"id": 109, "type": "function_declarator", "text": "l_c0(l_c0)", "parent": 76, "children": [110, 111], "start_point": {"row": 48, "column": 46}, "end_point": {"row": 48, "column": 56}}, {"id": 110, "type": "identifier", "text": "l_c0", "parent": 109, "children": [], "start_point": {"row": 48, "column": 46}, "end_point": {"row": 48, "column": 50}}, {"id": 111, "type": "parameter_list", "text": "(l_c0)", "parent": 109, "children": [112], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 56}}, {"id": 112, "type": "parameter_declaration", "text": "l_c0", "parent": 111, "children": [113], "start_point": {"row": 48, "column": 51}, "end_point": {"row": 48, "column": 55}}, {"id": 113, "type": "type_identifier", "text": "l_c0", "parent": 112, "children": [], "start_point": {"row": 48, "column": 51}, "end_point": {"row": 48, "column": 55}}, {"id": 114, "type": "ERROR", "text": "l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {", "parent": 76, "children": [115, 120], "start_point": {"row": 48, "column": 58}, "end_point": {"row": 53, "column": 9}}, {"id": 115, "type": "function_declarator", "text": "l_max(l_max)", "parent": 114, "children": [116, 117], "start_point": {"row": 48, "column": 58}, "end_point": {"row": 48, "column": 70}}, {"id": 116, "type": "identifier", "text": "l_max", "parent": 115, "children": [], "start_point": {"row": 48, "column": 58}, "end_point": {"row": 48, "column": 63}}, {"id": 117, "type": "parameter_list", "text": "(l_max)", "parent": 115, "children": [118], "start_point": {"row": 48, "column": 63}, "end_point": {"row": 48, "column": 70}}, {"id": 118, "type": "parameter_declaration", "text": "l_max", "parent": 117, "children": [119], "start_point": {"row": 48, "column": 64}, "end_point": {"row": 48, "column": 69}}, {"id": 119, "type": "type_identifier", "text": "l_max", "parent": 118, "children": [], "start_point": {"row": 48, "column": 64}, "end_point": {"row": 48, "column": 69}}, {"id": 120, "type": "function_declarator", "text": "tether_params(pybind11::dict v)", "parent": 114, "children": [121, 122], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 35}}, {"id": 121, "type": "identifier", "text": "tether_params", "parent": 120, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 17}}, {"id": 122, "type": "parameter_list", "text": "(pybind11::dict v)", "parent": 120, "children": [123], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 35}}, {"id": 123, "type": "parameter_declaration", "text": "pybind11::dict v", "parent": 122, "children": [124, 125, 127], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 34}}, {"id": 124, "type": "type_identifier", "text": "pybind11", "parent": 123, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 26}}, {"id": 125, "type": "ERROR", "text": "::dict", "parent": 123, "children": [126], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 32}}, {"id": 126, "type": "identifier", "text": "dict", "parent": 125, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 32}}, {"id": 127, "type": "identifier", "text": "v", "parent": 123, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 34}}, {"id": 128, "type": "init_declarator", "text": "k_b = v[\"k_b\"].cast<Scalar>()", "parent": 76, "children": [129, 130, 131], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 37}}, {"id": 129, "type": "identifier", "text": "k_b", "parent": 128, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 11}}, {"id": 130, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 13}}, {"id": 131, "type": "binary_expression", "text": "v[\"k_b\"].cast<Scalar>()", "parent": 128, "children": [132, 140, 141], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 37}}, {"id": 132, "type": "binary_expression", "text": "v[\"k_b\"].cast<Scalar", "parent": 131, "children": [133, 138, 139], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 34}}, {"id": 133, "type": "field_expression", "text": "v[\"k_b\"].cast", "parent": 132, "children": [134, 137], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 27}}, {"id": 134, "type": "subscript_expression", "text": "v[\"k_b\"]", "parent": 133, "children": [135, 136], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 22}}, {"id": 135, "type": "identifier", "text": "v", "parent": 134, "children": [], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 15}}, {"id": 136, "type": "string_literal", "text": "\"k_b\"", "parent": 134, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 21}}, {"id": 137, "type": "field_identifier", "text": "cast", "parent": 133, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 27}}, {"id": 138, "type": "<", "text": "<", "parent": 132, "children": [], "start_point": {"row": 54, "column": 27}, "end_point": {"row": 54, "column": 28}}, {"id": 139, "type": "identifier", "text": "Scalar", "parent": 132, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 34}}, {"id": 140, "type": ">", "text": ">", "parent": 131, "children": [], "start_point": {"row": 54, "column": 34}, "end_point": {"row": 54, "column": 35}}, {"id": 141, "type": "parenthesized_expression", "text": "()", "parent": 131, "children": [142], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 37}}, {"id": 142, "type": "identifier", "text": "", "parent": 141, "children": [], "start_point": {"row": 54, "column": 36}, "end_point": {"row": 54, "column": 36}}, {"id": 143, "type": "assignment_expression", "text": "l_min = v[\"l_min\"].cast<Scalar>()", "parent": 29, "children": [144, 145, 146], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 41}}, {"id": 144, "type": "identifier", "text": "l_min", "parent": 143, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 13}}, {"id": 145, "type": "=", "text": "=", "parent": 143, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 15}}, {"id": 146, "type": "binary_expression", "text": "v[\"l_min\"].cast<Scalar>()", "parent": 143, "children": [147, 155, 156], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 41}}, {"id": 147, "type": "binary_expression", "text": "v[\"l_min\"].cast<Scalar", "parent": 146, "children": [148, 153, 154], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 38}}, {"id": 148, "type": "field_expression", "text": "v[\"l_min\"].cast", "parent": 147, "children": [149, 152], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 31}}, {"id": 149, "type": "subscript_expression", "text": "v[\"l_min\"]", "parent": 148, "children": [150, 151], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 26}}, {"id": 150, "type": "identifier", "text": "v", "parent": 149, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 17}}, {"id": 151, "type": "string_literal", "text": "\"l_min\"", "parent": 149, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 25}}, {"id": 152, "type": "field_identifier", "text": "cast", "parent": 148, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 31}}, {"id": 153, "type": "<", "text": "<", "parent": 147, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 32}}, {"id": 154, "type": "identifier", "text": "Scalar", "parent": 147, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 38}}, {"id": 155, "type": ">", "text": ">", "parent": 146, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 39}}, {"id": 156, "type": "parenthesized_expression", "text": "()", "parent": 146, "children": [157], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 41}}, {"id": 157, "type": "identifier", "text": "", "parent": 156, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 40}}, {"id": 158, "type": "assignment_expression", "text": "l_c1 = v[\"l_c1\"].cast<Scalar>()", "parent": 29, "children": [159, 160, 161], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 39}}, {"id": 159, "type": "identifier", "text": "l_c1", "parent": 158, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 12}}, {"id": 160, "type": "=", "text": "=", "parent": 158, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 14}}, {"id": 161, "type": "binary_expression", "text": "v[\"l_c1\"].cast<Scalar>()", "parent": 158, "children": [162, 170, 171], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 39}}, {"id": 162, "type": "binary_expression", "text": "v[\"l_c1\"].cast<Scalar", "parent": 161, "children": [163, 168, 169], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 36}}, {"id": 163, "type": "field_expression", "text": "v[\"l_c1\"].cast", "parent": 162, "children": [164, 167], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 29}}, {"id": 164, "type": "subscript_expression", "text": "v[\"l_c1\"]", "parent": 163, "children": [165, 166], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 24}}, {"id": 165, "type": "identifier", "text": "v", "parent": 164, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 166, "type": "string_literal", "text": "\"l_c1\"", "parent": 164, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 23}}, {"id": 167, "type": "field_identifier", "text": "cast", "parent": 163, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 29}}, {"id": 168, "type": "<", "text": "<", "parent": 162, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 30}}, {"id": 169, "type": "identifier", "text": "Scalar", "parent": 162, "children": [], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 36}}, {"id": 170, "type": ">", "text": ">", "parent": 161, "children": [], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 37}}, {"id": 171, "type": "parenthesized_expression", "text": "()", "parent": 161, "children": [172], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 39}}, {"id": 172, "type": "identifier", "text": "", "parent": 171, "children": [], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 38}}, {"id": 173, "type": "assignment_expression", "text": "l_c0 = v[\"l_c0\"].cast<Scalar>()", "parent": 29, "children": [174, 175, 176], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 39}}, {"id": 174, "type": "identifier", "text": "l_c0", "parent": 173, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 12}}, {"id": 175, "type": "=", "text": "=", "parent": 173, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 14}}, {"id": 176, "type": "binary_expression", "text": "v[\"l_c0\"].cast<Scalar>()", "parent": 173, "children": [177, 185, 186], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 39}}, {"id": 177, "type": "binary_expression", "text": "v[\"l_c0\"].cast<Scalar", "parent": 176, "children": [178, 183, 184], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 36}}, {"id": 178, "type": "field_expression", "text": "v[\"l_c0\"].cast", "parent": 177, "children": [179, 182], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 29}}, {"id": 179, "type": "subscript_expression", "text": "v[\"l_c0\"]", "parent": 178, "children": [180, 181], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 24}}, {"id": 180, "type": "identifier", "text": "v", "parent": 179, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 16}}, {"id": 181, "type": "string_literal", "text": "\"l_c0\"", "parent": 179, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 23}}, {"id": 182, "type": "field_identifier", "text": "cast", "parent": 178, "children": [], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 29}}, {"id": 183, "type": "<", "text": "<", "parent": 177, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 30}}, {"id": 184, "type": "identifier", "text": "Scalar", "parent": 177, "children": [], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 36}}, {"id": 185, "type": ">", "text": ">", "parent": 176, "children": [], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 37}}, {"id": 186, "type": "parenthesized_expression", "text": "()", "parent": 176, "children": [187], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 39}}, {"id": 187, "type": "identifier", "text": "", "parent": 186, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 38}}, {"id": 188, "type": "assignment_expression", "text": "l_max = v[\"l_max\"].cast<Scalar>()", "parent": 29, "children": [189, 190, 191], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 41}}, {"id": 189, "type": "identifier", "text": "l_max", "parent": 188, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 13}}, {"id": 190, "type": "=", "text": "=", "parent": 188, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 15}}, {"id": 191, "type": "binary_expression", "text": "v[\"l_max\"].cast<Scalar>()", "parent": 188, "children": [192, 200, 201], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 41}}, {"id": 192, "type": "binary_expression", "text": "v[\"l_max\"].cast<Scalar", "parent": 191, "children": [193, 198, 199], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 38}}, {"id": 193, "type": "field_expression", "text": "v[\"l_max\"].cast", "parent": 192, "children": [194, 197], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 31}}, {"id": 194, "type": "subscript_expression", "text": "v[\"l_max\"]", "parent": 193, "children": [195, 196], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 26}}, {"id": 195, "type": "identifier", "text": "v", "parent": 194, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 17}}, {"id": 196, "type": "string_literal", "text": "\"l_max\"", "parent": 194, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 25}}, {"id": 197, "type": "field_identifier", "text": "cast", "parent": 193, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 31}}, {"id": 198, "type": "<", "text": "<", "parent": 192, "children": [], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 32}}, {"id": 199, "type": "identifier", "text": "Scalar", "parent": 192, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 38}}, {"id": 200, "type": ">", "text": ">", "parent": 191, "children": [], "start_point": {"row": 58, "column": 38}, "end_point": {"row": 58, "column": 39}}, {"id": 201, "type": "parenthesized_expression", "text": "()", "parent": 191, "children": [202], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 41}}, {"id": 202, "type": "identifier", "text": "", "parent": 201, "children": [], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 40}}, {"id": 203, "type": "if_statement", "text": "if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument(\"The input parameters should follow l_min < l_c1 < l_c0\"\n \" < l_max\");\n }", "parent": 29, "children": [204], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 65, "column": 13}}, {"id": 204, "type": "parenthesized_expression", "text": "(!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))", "parent": 203, "children": [205], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 61, "column": 31}}, {"id": 205, "type": "unary_expression", "text": "!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max)", "parent": 204, "children": [206, 207], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 61, "column": 30}}, {"id": 206, "type": "!", "text": "!", "parent": 205, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 207, "type": "parenthesized_expression", "text": "(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max)", "parent": 205, "children": [208], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 61, "column": 30}}, {"id": 208, "type": "binary_expression", "text": "l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max", "parent": 207, "children": [209, 237, 238], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 61, "column": 29}}, {"id": 209, "type": "binary_expression", "text": "l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max", "parent": 208, "children": [210, 232, 233], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 90}}, {"id": 210, "type": "binary_expression", "text": "l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0", "parent": 209, "children": [211, 227, 228], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 74}}, {"id": 211, "type": "binary_expression", "text": "l_min < l_c1 && l_min < l_c0 && l_min < l_max", "parent": 210, "children": [212, 222, 223], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 59}}, {"id": 212, "type": "binary_expression", "text": "l_min < l_c1 && l_min < l_c0", "parent": 211, "children": [213, 217, 218], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 42}}, {"id": 213, "type": "binary_expression", "text": "l_min < l_c1", "parent": 212, "children": [214, 215, 216], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 26}}, {"id": 214, "type": "identifier", "text": "l_min", "parent": 213, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 19}}, {"id": 215, "type": "<", "text": "<", "parent": 213, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 21}}, {"id": 216, "type": "identifier", "text": "l_c1", "parent": 213, "children": [], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 26}}, {"id": 217, "type": "&&", "text": "&&", "parent": 212, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 29}}, {"id": 218, "type": "binary_expression", "text": "l_min < l_c0", "parent": 212, "children": [219, 220, 221], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 42}}, {"id": 219, "type": "identifier", "text": "l_min", "parent": 218, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 35}}, {"id": 220, "type": "<", "text": "<", "parent": 218, "children": [], "start_point": {"row": 60, "column": 36}, "end_point": {"row": 60, "column": 37}}, {"id": 221, "type": "identifier", "text": "l_c0", "parent": 218, "children": [], "start_point": {"row": 60, "column": 38}, "end_point": {"row": 60, "column": 42}}, {"id": 222, "type": "&&", "text": "&&", "parent": 211, "children": [], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 45}}, {"id": 223, "type": "binary_expression", "text": "l_min < l_max", "parent": 211, "children": [224, 225, 226], "start_point": {"row": 60, "column": 46}, "end_point": {"row": 60, "column": 59}}, {"id": 224, "type": "identifier", "text": "l_min", "parent": 223, "children": [], "start_point": {"row": 60, "column": 46}, "end_point": {"row": 60, "column": 51}}, {"id": 225, "type": "<", "text": "<", "parent": 223, "children": [], "start_point": {"row": 60, "column": 52}, "end_point": {"row": 60, "column": 53}}, {"id": 226, "type": "identifier", "text": "l_max", "parent": 223, "children": [], "start_point": {"row": 60, "column": 54}, "end_point": {"row": 60, "column": 59}}, {"id": 227, "type": "&&", "text": "&&", "parent": 210, "children": [], "start_point": {"row": 60, "column": 60}, "end_point": {"row": 60, "column": 62}}, {"id": 228, "type": "binary_expression", "text": "l_c1 < l_c0", "parent": 210, "children": [229, 230, 231], "start_point": {"row": 60, "column": 63}, "end_point": {"row": 60, "column": 74}}, {"id": 229, "type": "identifier", "text": "l_c1", "parent": 228, "children": [], "start_point": {"row": 60, "column": 63}, "end_point": {"row": 60, "column": 67}}, {"id": 230, "type": "<", "text": "<", "parent": 228, "children": [], "start_point": {"row": 60, "column": 68}, "end_point": {"row": 60, "column": 69}}, {"id": 231, "type": "identifier", "text": "l_c0", "parent": 228, "children": [], "start_point": {"row": 60, "column": 70}, "end_point": {"row": 60, "column": 74}}, {"id": 232, "type": "&&", "text": "&&", "parent": 209, "children": [], "start_point": {"row": 60, "column": 75}, "end_point": {"row": 60, "column": 77}}, {"id": 233, "type": "binary_expression", "text": "l_c1 < l_max", "parent": 209, "children": [234, 235, 236], "start_point": {"row": 60, "column": 78}, "end_point": {"row": 60, "column": 90}}, {"id": 234, "type": "identifier", "text": "l_c1", "parent": 233, "children": [], "start_point": {"row": 60, "column": 78}, "end_point": {"row": 60, "column": 82}}, {"id": 235, "type": "<", "text": "<", "parent": 233, "children": [], "start_point": {"row": 60, "column": 83}, "end_point": {"row": 60, "column": 84}}, {"id": 236, "type": "identifier", "text": "l_max", "parent": 233, "children": [], "start_point": {"row": 60, "column": 85}, "end_point": {"row": 60, "column": 90}}, {"id": 237, "type": "&&", "text": "&&", "parent": 208, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 16}}, {"id": 238, "type": "binary_expression", "text": "l_c0 < l_max", "parent": 208, "children": [239, 240, 241], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 29}}, {"id": 239, "type": "identifier", "text": "l_c0", "parent": 238, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 21}}, {"id": 240, "type": "<", "text": "<", "parent": 238, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 241, "type": "identifier", "text": "l_max", "parent": 238, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 29}}, {"id": 242, "type": "ERROR", "text": "throw std::invalid_argument(", "parent": 203, "children": [243, 245], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 40}}, {"id": 243, "type": "ERROR", "text": "std::", "parent": 242, "children": [244], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 23}}, {"id": 244, "type": "identifier", "text": "std", "parent": 243, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 21}}, {"id": 245, "type": "identifier", "text": "invalid_argument", "parent": 242, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 39}}, {"id": 246, "type": "concatenated_string", "text": "\"The input parameters should follow l_min < l_c1 < l_c0\"\n \" < l_max\"", "parent": 203, "children": [247, 248], "start_point": {"row": 63, "column": 40}, "end_point": {"row": 64, "column": 50}}, {"id": 247, "type": "string_literal", "text": "\"The input parameters should follow l_min < l_c1 < l_c0\"", "parent": 246, "children": [], "start_point": {"row": 63, "column": 40}, "end_point": {"row": 63, "column": 96}}, {"id": 248, "type": "string_literal", "text": "\" < l_max\"", "parent": 246, "children": [], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 50}}, {"id": 249, "type": "labeled_statement", "text": "pybind11::dict asDict()\n {\n pybind11::dict v;\n v[\"k_b\"] = k_b;\n v[\"l_min\"] = l_min;\n v[\"l_c1\"] = l_c1;\n v[\"l_c0\"] = l_c0;\n v[\"l_max\"] = l_max;\n return v;\n }", "parent": 0, "children": [250, 251], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 77, "column": 9}}, {"id": 250, "type": "statement_identifier", "text": "pybind11", "parent": 249, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 12}}, {"id": 251, "type": "ERROR", "text": ":dict asDict()", "parent": 249, "children": [252, 253], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 27}}, {"id": 252, "type": "type_identifier", "text": "dict", "parent": 251, "children": [], "start_point": {"row": 68, "column": 14}, "end_point": {"row": 68, "column": 18}}, {"id": 253, "type": "function_declarator", "text": "asDict()", "parent": 251, "children": [254, 255], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 27}}, {"id": 254, "type": "identifier", "text": "asDict", "parent": 253, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 25}}, {"id": 255, "type": "parameter_list", "text": "()", "parent": 253, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 27}}, {"id": 256, "type": "labeled_statement", "text": "pybind11::dict v;", "parent": 249, "children": [257, 258], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 25}}, {"id": 257, "type": "statement_identifier", "text": "pybind11", "parent": 256, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 16}}, {"id": 258, "type": "declaration", "text": "dict v;", "parent": 256, "children": [259, 260], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 25}}, {"id": 259, "type": "type_identifier", "text": "dict", "parent": 258, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 22}}, {"id": 260, "type": "identifier", "text": "v", "parent": 258, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 24}}, {"id": 261, "type": "assignment_expression", "text": "v[\"k_b\"] = k_b", "parent": 249, "children": [262, 265, 266], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 22}}, {"id": 262, "type": "subscript_expression", "text": "v[\"k_b\"]", "parent": 261, "children": [263, 264], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 16}}, {"id": 263, "type": "identifier", "text": "v", "parent": 262, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 9}}, {"id": 264, "type": "string_literal", "text": "\"k_b\"", "parent": 262, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 15}}, {"id": 265, "type": "=", "text": "=", "parent": 261, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 18}}, {"id": 266, "type": "identifier", "text": "k_b", "parent": 261, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 22}}, {"id": 267, "type": "assignment_expression", "text": "v[\"l_min\"] = l_min", "parent": 249, "children": [268, 271, 272], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 26}}, {"id": 268, "type": "subscript_expression", "text": "v[\"l_min\"]", "parent": 267, "children": [269, 270], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 18}}, {"id": 269, "type": "identifier", "text": "v", "parent": 268, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 9}}, {"id": 270, "type": "string_literal", "text": "\"l_min\"", "parent": 268, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 17}}, {"id": 271, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 20}}, {"id": 272, "type": "identifier", "text": "l_min", "parent": 267, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 26}}, {"id": 273, "type": "assignment_expression", "text": "v[\"l_c1\"] = l_c1", "parent": 249, "children": [274, 277, 278], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 24}}, {"id": 274, "type": "subscript_expression", "text": "v[\"l_c1\"]", "parent": 273, "children": [275, 276], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 17}}, {"id": 275, "type": "identifier", "text": "v", "parent": 274, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 9}}, {"id": 276, "type": "string_literal", "text": "\"l_c1\"", "parent": 274, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 16}}, {"id": 277, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 19}}, {"id": 278, "type": "identifier", "text": "l_c1", "parent": 273, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 24}}, {"id": 279, "type": "assignment_expression", "text": "v[\"l_c0\"] = l_c0", "parent": 249, "children": [280, 283, 284], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 24}}, {"id": 280, "type": "subscript_expression", "text": "v[\"l_c0\"]", "parent": 279, "children": [281, 282], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 17}}, {"id": 281, "type": "identifier", "text": "v", "parent": 280, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 9}}, {"id": 282, "type": "string_literal", "text": "\"l_c0\"", "parent": 280, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 16}}, {"id": 283, "type": "=", "text": "=", "parent": 279, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 19}}, {"id": 284, "type": "identifier", "text": "l_c0", "parent": 279, "children": [], "start_point": {"row": 74, "column": 20}, "end_point": {"row": 74, "column": 24}}, {"id": 285, "type": "assignment_expression", "text": "v[\"l_max\"] = l_max", "parent": 249, "children": [286, 289, 290], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 26}}, {"id": 286, "type": "subscript_expression", "text": "v[\"l_max\"]", "parent": 285, "children": [287, 288], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 18}}, {"id": 287, "type": "identifier", "text": "v", "parent": 286, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 9}}, {"id": 288, "type": "string_literal", "text": "\"l_max\"", "parent": 286, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 17}}, {"id": 289, "type": "=", "text": "=", "parent": 285, "children": [], "start_point": {"row": 75, "column": 19}, "end_point": {"row": 75, "column": 20}}, {"id": 290, "type": "identifier", "text": "l_max", "parent": 285, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 26}}, {"id": 291, "type": "return_statement", "text": "return v;", "parent": 249, "children": [292], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 17}}, {"id": 292, "type": "identifier", "text": "v", "parent": 291, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 16}}, {"id": 293, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 294, "type": "ERROR", "text": "} __attribute__((aligned(32)))", "parent": null, "children": [295], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 34}}, {"id": 295, "type": "attribute_specifier", "text": "__attribute__((aligned(32)))", "parent": 294, "children": [296, 297], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 34}}, {"id": 296, "type": "__attribute__", "text": "__attribute__", "parent": 295, "children": [], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 19}}, {"id": 297, "type": "argument_list", "text": "(aligned(32))", "parent": 295, "children": [298], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 33}}, {"id": 298, "type": "call_expression", "text": "aligned(32)", "parent": 297, "children": [299, 300], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 32}}, {"id": 299, "type": "identifier", "text": "aligned", "parent": 298, "children": [], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 28}}, {"id": 300, "type": "argument_list", "text": "(32)", "parent": 298, "children": [301], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 32}}, {"id": 301, "type": "number_literal", "text": "32", "parent": 300, "children": [], "start_point": {"row": 79, "column": 29}, "end_point": {"row": 79, "column": 31}}, {"id": 302, "type": "function_definition", "text": "class EvaluatorBondTether\n {\n public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;\n\n //! Constructs the pair potential evaluator\n /*! \\param _rsq Squared distance between the particles\n \\param _params Per type pair parameters of this potential\n */\n DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;\n }", "parent": null, "children": [303], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 109, "column": 9}}, {"id": 303, "type": "identifier", "text": "EvaluatorBondTether", "parent": 302, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 25}}, {"id": 304, "type": "labeled_statement", "text": "public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;", "parent": 302, "children": [305], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 93, "column": 37}}, {"id": 305, "type": "declaration", "text": "typedef tether_params param_type;", "parent": 304, "children": [306, 307, 308], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 37}}, {"id": 306, "type": "type_identifier", "text": "typedef", "parent": 305, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 11}}, {"id": 307, "type": "identifier", "text": "tether_params", "parent": 305, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 25}}, {"id": 308, "type": "ERROR", "text": "param_type", "parent": 305, "children": [309], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 36}}, {"id": 309, "type": "identifier", "text": "param_type", "parent": 308, "children": [], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 36}}, {"id": 310, "type": "declaration", "text": "DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;", "parent": 302, "children": [311, 312, 326, 332, 338, 344, 350], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 108, "column": 21}}, {"id": 311, "type": "type_identifier", "text": "DEVICE", "parent": 310, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 10}}, {"id": 312, "type": "ERROR", "text": "EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq),", "parent": 310, "children": [313], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 100, "column": 20}}, {"id": 313, "type": "function_declarator", "text": "EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq)", "parent": 312, "children": [314, 315, 322], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 100, "column": 19}}, {"id": 314, "type": "identifier", "text": "EvaluatorBondTether", "parent": 313, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 30}}, {"id": 315, "type": "parameter_list", "text": "(Scalar _rsq, const param_type& _params)", "parent": 313, "children": [316, 319], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 70}}, {"id": 316, "type": "parameter_declaration", "text": "Scalar _rsq", "parent": 315, "children": [317, 318], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 42}}, {"id": 317, "type": "type_identifier", "text": "Scalar", "parent": 316, "children": [], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 37}}, {"id": 318, "type": "identifier", "text": "_rsq", "parent": 316, "children": [], "start_point": {"row": 99, "column": 38}, "end_point": {"row": 99, "column": 42}}, {"id": 319, "type": "parameter_declaration", "text": "const param_type& _params", "parent": 315, "children": [320, 321], "start_point": {"row": 99, "column": 44}, "end_point": {"row": 99, "column": 69}}, {"id": 320, "type": "type_identifier", "text": "param_type", "parent": 319, "children": [], "start_point": {"row": 99, "column": 50}, "end_point": {"row": 99, "column": 60}}, {"id": 321, "type": "identifier", "text": "_params", "parent": 319, "children": [], "start_point": {"row": 99, "column": 62}, "end_point": {"row": 99, "column": 69}}, {"id": 322, "type": "call_expression", "text": "rsq(_rsq)", "parent": 313, "children": [323, 324], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 19}}, {"id": 323, "type": "identifier", "text": "rsq", "parent": 322, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 13}}, {"id": 324, "type": "argument_list", "text": "(_rsq)", "parent": 322, "children": [325], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 19}}, {"id": 325, "type": "identifier", "text": "_rsq", "parent": 324, "children": [], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 18}}, {"id": 326, "type": "function_declarator", "text": "k_b(_params.k_b)", "parent": 310, "children": [327, 328], "start_point": {"row": 100, "column": 21}, "end_point": {"row": 100, "column": 37}}, {"id": 327, "type": "identifier", "text": "k_b", "parent": 326, "children": [], "start_point": {"row": 100, "column": 21}, "end_point": {"row": 100, "column": 24}}, {"id": 328, "type": "parameter_list", "text": "(_params.k_b)", "parent": 326, "children": [329], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 37}}, {"id": 329, "type": "parameter_declaration", "text": "_params.k_b", "parent": 328, "children": [330, 331], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 36}}, {"id": 330, "type": "type_identifier", "text": "_params", "parent": 329, "children": [], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 32}}, {"id": 331, "type": "identifier", "text": "k_b", "parent": 329, "children": [], "start_point": {"row": 100, "column": 33}, "end_point": {"row": 100, "column": 36}}, {"id": 332, "type": "function_declarator", "text": "l_min(_params.l_min)", "parent": 310, "children": [333, 334], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 59}}, {"id": 333, "type": "identifier", "text": "l_min", "parent": 332, "children": [], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 44}}, {"id": 334, "type": "parameter_list", "text": "(_params.l_min)", "parent": 332, "children": [335], "start_point": {"row": 100, "column": 44}, "end_point": {"row": 100, "column": 59}}, {"id": 335, "type": "parameter_declaration", "text": "_params.l_min", "parent": 334, "children": [336, 337], "start_point": {"row": 100, "column": 45}, "end_point": {"row": 100, "column": 58}}, {"id": 336, "type": "type_identifier", "text": "_params", "parent": 335, "children": [], "start_point": {"row": 100, "column": 45}, "end_point": {"row": 100, "column": 52}}, {"id": 337, "type": "identifier", "text": "l_min", "parent": 335, "children": [], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 58}}, {"id": 338, "type": "function_declarator", "text": "l_c1(_params.l_c1)", "parent": 310, "children": [339, 340], "start_point": {"row": 100, "column": 61}, "end_point": {"row": 100, "column": 79}}, {"id": 339, "type": "identifier", "text": "l_c1", "parent": 338, "children": [], "start_point": {"row": 100, "column": 61}, "end_point": {"row": 100, "column": 65}}, {"id": 340, "type": "parameter_list", "text": "(_params.l_c1)", "parent": 338, "children": [341], "start_point": {"row": 100, "column": 65}, "end_point": {"row": 100, "column": 79}}, {"id": 341, "type": "parameter_declaration", "text": "_params.l_c1", "parent": 340, "children": [342, 343], "start_point": {"row": 100, "column": 66}, "end_point": {"row": 100, "column": 78}}, {"id": 342, "type": "type_identifier", "text": "_params", "parent": 341, "children": [], "start_point": {"row": 100, "column": 66}, "end_point": {"row": 100, "column": 73}}, {"id": 343, "type": "identifier", "text": "l_c1", "parent": 341, "children": [], "start_point": {"row": 100, "column": 74}, "end_point": {"row": 100, "column": 78}}, {"id": 344, "type": "function_declarator", "text": "l_c0(_params.l_c0)", "parent": 310, "children": [345, 346], "start_point": {"row": 100, "column": 81}, "end_point": {"row": 100, "column": 99}}, {"id": 345, "type": "identifier", "text": "l_c0", "parent": 344, "children": [], "start_point": {"row": 100, "column": 81}, "end_point": {"row": 100, "column": 85}}, {"id": 346, "type": "parameter_list", "text": "(_params.l_c0)", "parent": 344, "children": [347], "start_point": {"row": 100, "column": 85}, "end_point": {"row": 100, "column": 99}}, {"id": 347, "type": "parameter_declaration", "text": "_params.l_c0", "parent": 346, "children": [348, 349], "start_point": {"row": 100, "column": 86}, "end_point": {"row": 100, "column": 98}}, {"id": 348, "type": "type_identifier", "text": "_params", "parent": 347, "children": [], "start_point": {"row": 100, "column": 86}, "end_point": {"row": 100, "column": 93}}, {"id": 349, "type": "identifier", "text": "l_c0", "parent": 347, "children": [], "start_point": {"row": 100, "column": 94}, "end_point": {"row": 100, "column": 98}}, {"id": 350, "type": "ERROR", "text": ",\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false", "parent": 310, "children": [351, 358, 361, 364], "start_point": {"row": 100, "column": 99}, "end_point": {"row": 108, "column": 20}}, {"id": 351, "type": "ERROR", "text": "l_max(_params.l_max)\n {\n }", "parent": 350, "children": [352], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 103, "column": 9}}, {"id": 352, "type": "function_declarator", "text": "l_max(_params.l_max)", "parent": 351, "children": [353, 354], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 30}}, {"id": 353, "type": "identifier", "text": "l_max", "parent": 352, "children": [], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 15}}, {"id": 354, "type": "parameter_list", "text": "(_params.l_max)", "parent": 352, "children": [355], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 30}}, {"id": 355, "type": "parameter_declaration", "text": "_params.l_max", "parent": 354, "children": [356, 357], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 29}}, {"id": 356, "type": "type_identifier", "text": "_params", "parent": 355, "children": [], "start_point": {"row": 101, "column": 16}, "end_point": {"row": 101, "column": 23}}, {"id": 357, "type": "identifier", "text": "l_max", "parent": 355, "children": [], "start_point": {"row": 101, "column": 24}, "end_point": {"row": 101, "column": 29}}, {"id": 358, "type": "ERROR", "text": "DEVICE static bool", "parent": 350, "children": [359, 360], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 22}}, {"id": 359, "type": "identifier", "text": "DEVICE", "parent": 358, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 10}}, {"id": 360, "type": "primitive_type", "text": "bool", "parent": 358, "children": [], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 22}}, {"id": 361, "type": "function_declarator", "text": "needsDiameter()", "parent": 350, "children": [362, 363], "start_point": {"row": 106, "column": 23}, "end_point": {"row": 106, "column": 38}}, {"id": 362, "type": "identifier", "text": "needsDiameter", "parent": 361, "children": [], "start_point": {"row": 106, "column": 23}, "end_point": {"row": 106, "column": 36}}, {"id": 363, "type": "parameter_list", "text": "()", "parent": 361, "children": [], "start_point": {"row": 106, "column": 36}, "end_point": {"row": 106, "column": 38}}, {"id": 364, "type": "false", "text": "false", "parent": 350, "children": [], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 20}}, {"id": 365, "type": "function_definition", "text": "DEVICE void setDiameter(Scalar da, Scalar db) { }", "parent": null, "children": [366, 367, 369], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 53}}, {"id": 366, "type": "type_identifier", "text": "DEVICE", "parent": 365, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 10}}, {"id": 367, "type": "ERROR", "text": "void", "parent": 365, "children": [368], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 15}}, {"id": 368, "type": "identifier", "text": "void", "parent": 367, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 15}}, {"id": 369, "type": "function_declarator", "text": "setDiameter(Scalar da, Scalar db)", "parent": 365, "children": [370, 371], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 49}}, {"id": 370, "type": "identifier", "text": "setDiameter", "parent": 369, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 27}}, {"id": 371, "type": "parameter_list", "text": "(Scalar da, Scalar db)", "parent": 369, "children": [372, 375], "start_point": {"row": 115, "column": 27}, "end_point": {"row": 115, "column": 49}}, {"id": 372, "type": "parameter_declaration", "text": "Scalar da", "parent": 371, "children": [373, 374], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 37}}, {"id": 373, "type": "type_identifier", "text": "Scalar", "parent": 372, "children": [], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 34}}, {"id": 374, "type": "identifier", "text": "da", "parent": 372, "children": [], "start_point": {"row": 115, "column": 35}, "end_point": {"row": 115, "column": 37}}, {"id": 375, "type": "parameter_declaration", "text": "Scalar db", "parent": 371, "children": [376, 377], "start_point": {"row": 115, "column": 39}, "end_point": {"row": 115, "column": 48}}, {"id": 376, "type": "type_identifier", "text": "Scalar", "parent": 375, "children": [], "start_point": {"row": 115, "column": 39}, "end_point": {"row": 115, "column": 45}}, {"id": 377, "type": "identifier", "text": "db", "parent": 375, "children": [], "start_point": {"row": 115, "column": 46}, "end_point": {"row": 115, "column": 48}}, {"id": 378, "type": "function_definition", "text": "DEVICE static bool needsCharge()\n {\n return false;\n }", "parent": null, "children": [379, 380, 382], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 121, "column": 9}}, {"id": 379, "type": "type_identifier", "text": "DEVICE", "parent": 378, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 10}}, {"id": 380, "type": "ERROR", "text": "bool", "parent": 378, "children": [381], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 22}}, {"id": 381, "type": "identifier", "text": "bool", "parent": 380, "children": [], "start_point": {"row": 118, "column": 18}, "end_point": {"row": 118, "column": 22}}, {"id": 382, "type": "function_declarator", "text": "needsCharge()", "parent": 378, "children": [383, 384], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 36}}, {"id": 383, "type": "identifier", "text": "needsCharge", "parent": 382, "children": [], "start_point": {"row": 118, "column": 23}, "end_point": {"row": 118, "column": 34}}, {"id": 384, "type": "parameter_list", "text": "()", "parent": 382, "children": [], "start_point": {"row": 118, "column": 34}, "end_point": {"row": 118, "column": 36}}, {"id": 385, "type": "return_statement", "text": "return false;", "parent": 378, "children": [386], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 21}}, {"id": 386, "type": "false", "text": "false", "parent": 385, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 20}}, {"id": 387, "type": "function_definition", "text": "DEVICE void setCharge(Scalar qa, Scalar qb) { }", "parent": null, "children": [388, 389, 391], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 51}}, {"id": 388, "type": "type_identifier", "text": "DEVICE", "parent": 387, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 10}}, {"id": 389, "type": "ERROR", "text": "void", "parent": 387, "children": [390], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 15}}, {"id": 390, "type": "identifier", "text": "void", "parent": 389, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 15}}, {"id": 391, "type": "function_declarator", "text": "setCharge(Scalar qa, Scalar qb)", "parent": 387, "children": [392, 393], "start_point": {"row": 127, "column": 16}, "end_point": {"row": 127, "column": 47}}, {"id": 392, "type": "identifier", "text": "setCharge", "parent": 391, "children": [], "start_point": {"row": 127, "column": 16}, "end_point": {"row": 127, "column": 25}}, {"id": 393, "type": "parameter_list", "text": "(Scalar qa, Scalar qb)", "parent": 391, "children": [394, 397], "start_point": {"row": 127, "column": 25}, "end_point": {"row": 127, "column": 47}}, {"id": 394, "type": "parameter_declaration", "text": "Scalar qa", "parent": 393, "children": [395, 396], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 127, "column": 35}}, {"id": 395, "type": "type_identifier", "text": "Scalar", "parent": 394, "children": [], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 127, "column": 32}}, {"id": 396, "type": "identifier", "text": "qa", "parent": 394, "children": [], "start_point": {"row": 127, "column": 33}, "end_point": {"row": 127, "column": 35}}, {"id": 397, "type": "parameter_declaration", "text": "Scalar qb", "parent": 393, "children": [398, 399], "start_point": {"row": 127, "column": 37}, "end_point": {"row": 127, "column": 46}}, {"id": 398, "type": "type_identifier", "text": "Scalar", "parent": 397, "children": [], "start_point": {"row": 127, "column": 37}, "end_point": {"row": 127, "column": 43}}, {"id": 399, "type": "identifier", "text": "qb", "parent": 397, "children": [], "start_point": {"row": 127, "column": 44}, "end_point": {"row": 127, "column": 46}}, {"id": 400, "type": "declaration", "text": "DEVICE bool", "parent": null, "children": [401, 402], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 15}}, {"id": 401, "type": "type_identifier", "text": "DEVICE", "parent": 400, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 10}}, {"id": 402, "type": "identifier", "text": "bool", "parent": 400, "children": [], "start_point": {"row": 136, "column": 11}, "end_point": {"row": 136, "column": 15}}, {"id": 403, "type": "call_expression", "text": "evalForceAndEnergy(Scalar& force_divr, Scalar& bond_eng)", "parent": null, "children": [404, 405], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 72}}, {"id": 404, "type": "identifier", "text": "evalForceAndEnergy", "parent": 403, "children": [], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 34}}, {"id": 405, "type": "argument_list", "text": "(Scalar& force_divr, Scalar& bond_eng)", "parent": 403, "children": [406, 409], "start_point": {"row": 136, "column": 34}, "end_point": {"row": 136, "column": 72}}, {"id": 406, "type": "binary_expression", "text": "Scalar& force_divr", "parent": 405, "children": [407, 408], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 53}}, {"id": 407, "type": "identifier", "text": "Scalar", "parent": 406, "children": [], "start_point": {"row": 136, "column": 35}, "end_point": {"row": 136, "column": 41}}, {"id": 408, "type": "identifier", "text": "force_divr", "parent": 406, "children": [], "start_point": {"row": 136, "column": 43}, "end_point": {"row": 136, "column": 53}}, {"id": 409, "type": "binary_expression", "text": "Scalar& bond_eng", "parent": 405, "children": [410, 411], "start_point": {"row": 136, "column": 55}, "end_point": {"row": 136, "column": 71}}, {"id": 410, "type": "identifier", "text": "Scalar", "parent": 409, "children": [], "start_point": {"row": 136, "column": 55}, "end_point": {"row": 136, "column": 61}}, {"id": 411, "type": "identifier", "text": "bond_eng", "parent": 409, "children": [], "start_point": {"row": 136, "column": 63}, "end_point": {"row": 136, "column": 71}}, {"id": 412, "type": "declaration", "text": "Scalar r = sqrt(rsq);", "parent": null, "children": [413, 414], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 29}}, {"id": 413, "type": "type_identifier", "text": "Scalar", "parent": 412, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 14}}, {"id": 414, "type": "init_declarator", "text": "r = sqrt(rsq)", "parent": 412, "children": [415, 416, 417], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 28}}, {"id": 415, "type": "identifier", "text": "r", "parent": 414, "children": [], "start_point": {"row": 138, "column": 15}, "end_point": {"row": 138, "column": 16}}, {"id": 416, "type": "=", "text": "=", "parent": 414, "children": [], "start_point": {"row": 138, "column": 17}, "end_point": {"row": 138, "column": 18}}, {"id": 417, "type": "call_expression", "text": "sqrt(rsq)", "parent": 414, "children": [418, 419], "start_point": {"row": 138, "column": 19}, "end_point": {"row": 138, "column": 28}}, {"id": 418, "type": "identifier", "text": "sqrt", "parent": 417, "children": [], "start_point": {"row": 138, "column": 19}, "end_point": {"row": 138, "column": 23}}, {"id": 419, "type": "argument_list", "text": "(rsq)", "parent": 417, "children": [420], "start_point": {"row": 138, "column": 23}, "end_point": {"row": 138, "column": 28}}, {"id": 420, "type": "identifier", "text": "rsq", "parent": 419, "children": [], "start_point": {"row": 138, "column": 24}, "end_point": {"row": 138, "column": 27}}, {"id": 421, "type": "declaration", "text": "Scalar U_att = Scalar(0.0);", "parent": null, "children": [422, 423], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 35}}, {"id": 422, "type": "type_identifier", "text": "Scalar", "parent": 421, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 14}}, {"id": 423, "type": "init_declarator", "text": "U_att = Scalar(0.0)", "parent": 421, "children": [424, 425, 426], "start_point": {"row": 139, "column": 15}, "end_point": {"row": 139, "column": 34}}, {"id": 424, "type": "identifier", "text": "U_att", "parent": 423, "children": [], "start_point": {"row": 139, "column": 15}, "end_point": {"row": 139, "column": 20}}, {"id": 425, "type": "=", "text": "=", "parent": 423, "children": [], "start_point": {"row": 139, "column": 21}, "end_point": {"row": 139, "column": 22}}, {"id": 426, "type": "call_expression", "text": "Scalar(0.0)", "parent": 423, "children": [427, 428], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 34}}, {"id": 427, "type": "identifier", "text": "Scalar", "parent": 426, "children": [], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 29}}, {"id": 428, "type": "argument_list", "text": "(0.0)", "parent": 426, "children": [429], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 34}}, {"id": 429, "type": "number_literal", "text": "0.0", "parent": 428, "children": [], "start_point": {"row": 139, "column": 30}, "end_point": {"row": 139, "column": 33}}, {"id": 430, "type": "declaration", "text": "Scalar F_att = Scalar(0.0);", "parent": null, "children": [431, 432], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 35}}, {"id": 431, "type": "type_identifier", "text": "Scalar", "parent": 430, "children": [], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 14}}, {"id": 432, "type": "init_declarator", "text": "F_att = Scalar(0.0)", "parent": 430, "children": [433, 434, 435], "start_point": {"row": 140, "column": 15}, "end_point": {"row": 140, "column": 34}}, {"id": 433, "type": "identifier", "text": "F_att", "parent": 432, "children": [], "start_point": {"row": 140, "column": 15}, "end_point": {"row": 140, "column": 20}}, {"id": 434, "type": "=", "text": "=", "parent": 432, "children": [], "start_point": {"row": 140, "column": 21}, "end_point": {"row": 140, "column": 22}}, {"id": 435, "type": "call_expression", "text": "Scalar(0.0)", "parent": 432, "children": [436, 437], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 34}}, {"id": 436, "type": "identifier", "text": "Scalar", "parent": 435, "children": [], "start_point": {"row": 140, "column": 23}, "end_point": {"row": 140, "column": 29}}, {"id": 437, "type": "argument_list", "text": "(0.0)", "parent": 435, "children": [438], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 34}}, {"id": 438, "type": "number_literal", "text": "0.0", "parent": 437, "children": [], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 33}}, {"id": 439, "type": "declaration", "text": "Scalar U_rep = Scalar(0.0);", "parent": null, "children": [440, 441], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 35}}, {"id": 440, "type": "type_identifier", "text": "Scalar", "parent": 439, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 14}}, {"id": 441, "type": "init_declarator", "text": "U_rep = Scalar(0.0)", "parent": 439, "children": [442, 443, 444], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 34}}, {"id": 442, "type": "identifier", "text": "U_rep", "parent": 441, "children": [], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 20}}, {"id": 443, "type": "=", "text": "=", "parent": 441, "children": [], "start_point": {"row": 141, "column": 21}, "end_point": {"row": 141, "column": 22}}, {"id": 444, "type": "call_expression", "text": "Scalar(0.0)", "parent": 441, "children": [445, 446], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 34}}, {"id": 445, "type": "identifier", "text": "Scalar", "parent": 444, "children": [], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 29}}, {"id": 446, "type": "argument_list", "text": "(0.0)", "parent": 444, "children": [447], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 34}}, {"id": 447, "type": "number_literal", "text": "0.0", "parent": 446, "children": [], "start_point": {"row": 141, "column": 30}, "end_point": {"row": 141, "column": 33}}, {"id": 448, "type": "declaration", "text": "Scalar F_rep = Scalar(0.0);", "parent": null, "children": [449, 450], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 35}}, {"id": 449, "type": "type_identifier", "text": "Scalar", "parent": 448, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 14}}, {"id": 450, "type": "init_declarator", "text": "F_rep = Scalar(0.0)", "parent": 448, "children": [451, 452, 453], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 34}}, {"id": 451, "type": "identifier", "text": "F_rep", "parent": 450, "children": [], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 20}}, {"id": 452, "type": "=", "text": "=", "parent": 450, "children": [], "start_point": {"row": 142, "column": 21}, "end_point": {"row": 142, "column": 22}}, {"id": 453, "type": "call_expression", "text": "Scalar(0.0)", "parent": 450, "children": [454, 455], "start_point": {"row": 142, "column": 23}, "end_point": {"row": 142, "column": 34}}, {"id": 454, "type": "identifier", "text": "Scalar", "parent": 453, "children": [], "start_point": {"row": 142, "column": 23}, "end_point": {"row": 142, "column": 29}}, {"id": 455, "type": "argument_list", "text": "(0.0)", "parent": 453, "children": [456], "start_point": {"row": 142, "column": 29}, "end_point": {"row": 142, "column": 34}}, {"id": 456, "type": "number_literal", "text": "0.0", "parent": 455, "children": [], "start_point": {"row": 142, "column": 30}, "end_point": {"row": 142, "column": 33}}, {"id": 457, "type": "if_statement", "text": "if (r > l_c0)\n {\n U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));\n F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));\n }", "parent": null, "children": [458], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 151, "column": 13}}, {"id": 458, "type": "parenthesized_expression", "text": "(r > l_c0)", "parent": 457, "children": [459], "start_point": {"row": 144, "column": 11}, "end_point": {"row": 144, "column": 21}}, {"id": 459, "type": "binary_expression", "text": "r > l_c0", "parent": 458, "children": [460, 461, 462], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 20}}, {"id": 460, "type": "identifier", "text": "r", "parent": 459, "children": [], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 13}}, {"id": 461, "type": ">", "text": ">", "parent": 459, "children": [], "start_point": {"row": 144, "column": 14}, "end_point": {"row": 144, "column": 15}}, {"id": 462, "type": "identifier", "text": "l_c0", "parent": 459, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 20}}, {"id": 463, "type": "assignment_expression", "text": "U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r))", "parent": 457, "children": [464, 465, 466], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 71}}, {"id": 464, "type": "identifier", "text": "U_att", "parent": 463, "children": [], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 17}}, {"id": 465, "type": "=", "text": "=", "parent": 463, "children": [], "start_point": {"row": 146, "column": 18}, "end_point": {"row": 146, "column": 19}}, {"id": 466, "type": "binary_expression", "text": "k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r))", "parent": 463, "children": [467, 468, 469], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 71}}, {"id": 467, "type": "identifier", "text": "k_b", "parent": 466, "children": [], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 23}}, {"id": 468, "type": "*", "text": "*", "parent": 466, "children": [], "start_point": {"row": 146, "column": 24}, "end_point": {"row": 146, "column": 25}}, {"id": 469, "type": "parenthesized_expression", "text": "(exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r))", "parent": 466, "children": [470], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 71}}, {"id": 470, "type": "binary_expression", "text": "exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r)", "parent": 469, "children": [471, 485, 486], "start_point": {"row": 146, "column": 27}, "end_point": {"row": 146, "column": 70}}, {"id": 471, "type": "call_expression", "text": "exp(Scalar(1.0) / (l_c0 - r))", "parent": 470, "children": [472, 473], "start_point": {"row": 146, "column": 27}, "end_point": {"row": 146, "column": 56}}, {"id": 472, "type": "identifier", "text": "exp", "parent": 471, "children": [], "start_point": {"row": 146, "column": 27}, "end_point": {"row": 146, "column": 30}}, {"id": 473, "type": "argument_list", "text": "(Scalar(1.0) / (l_c0 - r))", "parent": 471, "children": [474], "start_point": {"row": 146, "column": 30}, "end_point": {"row": 146, "column": 56}}, {"id": 474, "type": "binary_expression", "text": "Scalar(1.0) / (l_c0 - r)", "parent": 473, "children": [475, 479, 480], "start_point": {"row": 146, "column": 31}, "end_point": {"row": 146, "column": 55}}, {"id": 475, "type": "call_expression", "text": "Scalar(1.0)", "parent": 474, "children": [476, 477], "start_point": {"row": 146, "column": 31}, "end_point": {"row": 146, "column": 42}}, {"id": 476, "type": "identifier", "text": "Scalar", "parent": 475, "children": [], "start_point": {"row": 146, "column": 31}, "end_point": {"row": 146, "column": 37}}, {"id": 477, "type": "argument_list", "text": "(1.0)", "parent": 475, "children": [478], "start_point": {"row": 146, "column": 37}, "end_point": {"row": 146, "column": 42}}, {"id": 478, "type": "number_literal", "text": "1.0", "parent": 477, "children": [], "start_point": {"row": 146, "column": 38}, "end_point": {"row": 146, "column": 41}}, {"id": 479, "type": "/", "text": "/", "parent": 474, "children": [], "start_point": {"row": 146, "column": 43}, "end_point": {"row": 146, "column": 44}}, {"id": 480, "type": "parenthesized_expression", "text": "(l_c0 - r)", "parent": 474, "children": [481], "start_point": {"row": 146, "column": 45}, "end_point": {"row": 146, "column": 55}}, {"id": 481, "type": "binary_expression", "text": "l_c0 - r", "parent": 480, "children": [482, 483, 484], "start_point": {"row": 146, "column": 46}, "end_point": {"row": 146, "column": 54}}, {"id": 482, "type": "identifier", "text": "l_c0", "parent": 481, "children": [], "start_point": {"row": 146, "column": 46}, "end_point": {"row": 146, "column": 50}}, {"id": 483, "type": "-", "text": "-", "parent": 481, "children": [], "start_point": {"row": 146, "column": 51}, "end_point": {"row": 146, "column": 52}}, {"id": 484, "type": "identifier", "text": "r", "parent": 481, "children": [], "start_point": {"row": 146, "column": 53}, "end_point": {"row": 146, "column": 54}}, {"id": 485, "type": "/", "text": "/", "parent": 470, "children": [], "start_point": {"row": 146, "column": 57}, "end_point": {"row": 146, "column": 58}}, {"id": 486, "type": "parenthesized_expression", "text": "(l_max - r)", "parent": 470, "children": [487], "start_point": {"row": 146, "column": 59}, "end_point": {"row": 146, "column": 70}}, {"id": 487, "type": "binary_expression", "text": "l_max - r", "parent": 486, "children": [488, 489, 490], "start_point": {"row": 146, "column": 60}, "end_point": {"row": 146, "column": 69}}, {"id": 488, "type": "identifier", "text": "l_max", "parent": 487, "children": [], "start_point": {"row": 146, "column": 60}, "end_point": {"row": 146, "column": 65}}, {"id": 489, "type": "-", "text": "-", "parent": 487, "children": [], "start_point": {"row": 146, "column": 66}, "end_point": {"row": 146, "column": 67}}, {"id": 490, "type": "identifier", "text": "r", "parent": 487, "children": [], "start_point": {"row": 146, "column": 68}, "end_point": {"row": 146, "column": 69}}, {"id": 491, "type": "assignment_expression", "text": "F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r))", "parent": 457, "children": [492, 493, 494], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 150, "column": 51}}, {"id": 492, "type": "identifier", "text": "F_att", "parent": 491, "children": [], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 17}}, {"id": 493, "type": "=", "text": "=", "parent": 491, "children": [], "start_point": {"row": 147, "column": 18}, "end_point": {"row": 147, "column": 19}}, {"id": 494, "type": "binary_expression", "text": "k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r))", "parent": 491, "children": [495, 496, 497], "start_point": {"row": 147, "column": 20}, "end_point": {"row": 150, "column": 51}}, {"id": 495, "type": "identifier", "text": "k_b", "parent": 494, "children": [], "start_point": {"row": 147, "column": 20}, "end_point": {"row": 147, "column": 23}}, {"id": 496, "type": "*", "text": "*", "parent": 494, "children": [], "start_point": {"row": 148, "column": 20}, "end_point": {"row": 148, "column": 21}}, {"id": 497, "type": "parenthesized_expression", "text": "(((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r))", "parent": 494, "children": [498], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 150, "column": 51}}, {"id": 498, "type": "binary_expression", "text": "((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r)", "parent": 497, "children": [499, 558, 559], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 150, "column": 50}}, {"id": 499, "type": "binary_expression", "text": "((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r)", "parent": 498, "children": [500, 552, 553], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 150, "column": 36}}, {"id": 500, "type": "parenthesized_expression", "text": "((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))", "parent": 499, "children": [501], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 149, "column": 56}}, {"id": 501, "type": "binary_expression", "text": "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r))", "parent": 500, "children": [502, 537, 538], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 149, "column": 55}}, {"id": 502, "type": "binary_expression", "text": "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)", "parent": 501, "children": [503, 531, 532], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 93}}, {"id": 503, "type": "binary_expression", "text": "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r)", "parent": 502, "children": [504, 525, 526], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 80}}, {"id": 504, "type": "binary_expression", "text": "(r - l_max) * exp(Scalar(1.0) / (l_c0 - r))", "parent": 503, "children": [505, 510, 511], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 67}}, {"id": 505, "type": "parenthesized_expression", "text": "(r - l_max)", "parent": 504, "children": [506], "start_point": {"row": 148, "column": 24}, "end_point": {"row": 148, "column": 35}}, {"id": 506, "type": "binary_expression", "text": "r - l_max", "parent": 505, "children": [507, 508, 509], "start_point": {"row": 148, "column": 25}, "end_point": {"row": 148, "column": 34}}, {"id": 507, "type": "identifier", "text": "r", "parent": 506, "children": [], "start_point": {"row": 148, "column": 25}, "end_point": {"row": 148, "column": 26}}, {"id": 508, "type": "-", "text": "-", "parent": 506, "children": [], "start_point": {"row": 148, "column": 27}, "end_point": {"row": 148, "column": 28}}, {"id": 509, "type": "identifier", "text": "l_max", "parent": 506, "children": [], "start_point": {"row": 148, "column": 29}, "end_point": {"row": 148, "column": 34}}, {"id": 510, "type": "*", "text": "*", "parent": 504, "children": [], "start_point": {"row": 148, "column": 36}, "end_point": {"row": 148, "column": 37}}, {"id": 511, "type": "call_expression", "text": "exp(Scalar(1.0) / (l_c0 - r))", "parent": 504, "children": [512, 513], "start_point": {"row": 148, "column": 38}, "end_point": {"row": 148, "column": 67}}, {"id": 512, "type": "identifier", "text": "exp", "parent": 511, "children": [], "start_point": {"row": 148, "column": 38}, "end_point": {"row": 148, "column": 41}}, {"id": 513, "type": "argument_list", "text": "(Scalar(1.0) / (l_c0 - r))", "parent": 511, "children": [514], "start_point": {"row": 148, "column": 41}, "end_point": {"row": 148, "column": 67}}, {"id": 514, "type": "binary_expression", "text": "Scalar(1.0) / (l_c0 - r)", "parent": 513, "children": [515, 519, 520], "start_point": {"row": 148, "column": 42}, "end_point": {"row": 148, "column": 66}}, {"id": 515, "type": "call_expression", "text": "Scalar(1.0)", "parent": 514, "children": [516, 517], "start_point": {"row": 148, "column": 42}, "end_point": {"row": 148, "column": 53}}, {"id": 516, "type": "identifier", "text": "Scalar", "parent": 515, "children": [], "start_point": {"row": 148, "column": 42}, "end_point": {"row": 148, "column": 48}}, {"id": 517, "type": "argument_list", "text": "(1.0)", "parent": 515, "children": [518], "start_point": {"row": 148, "column": 48}, "end_point": {"row": 148, "column": 53}}, {"id": 518, "type": "number_literal", "text": "1.0", "parent": 517, "children": [], "start_point": {"row": 148, "column": 49}, "end_point": {"row": 148, "column": 52}}, {"id": 519, "type": "/", "text": "/", "parent": 514, "children": [], "start_point": {"row": 148, "column": 54}, "end_point": {"row": 148, "column": 55}}, {"id": 520, "type": "parenthesized_expression", "text": "(l_c0 - r)", "parent": 514, "children": [521], "start_point": {"row": 148, "column": 56}, "end_point": {"row": 148, "column": 66}}, {"id": 521, "type": "binary_expression", "text": "l_c0 - r", "parent": 520, "children": [522, 523, 524], "start_point": {"row": 148, "column": 57}, "end_point": {"row": 148, "column": 65}}, {"id": 522, "type": "identifier", "text": "l_c0", "parent": 521, "children": [], "start_point": {"row": 148, "column": 57}, "end_point": {"row": 148, "column": 61}}, {"id": 523, "type": "-", "text": "-", "parent": 521, "children": [], "start_point": {"row": 148, "column": 62}, "end_point": {"row": 148, "column": 63}}, {"id": 524, "type": "identifier", "text": "r", "parent": 521, "children": [], "start_point": {"row": 148, "column": 64}, "end_point": {"row": 148, "column": 65}}, {"id": 525, "type": "/", "text": "/", "parent": 503, "children": [], "start_point": {"row": 148, "column": 68}, "end_point": {"row": 148, "column": 69}}, {"id": 526, "type": "parenthesized_expression", "text": "(l_c0 - r)", "parent": 503, "children": [527], "start_point": {"row": 148, "column": 70}, "end_point": {"row": 148, "column": 80}}, {"id": 527, "type": "binary_expression", "text": "l_c0 - r", "parent": 526, "children": [528, 529, 530], "start_point": {"row": 148, "column": 71}, "end_point": {"row": 148, "column": 79}}, {"id": 528, "type": "identifier", "text": "l_c0", "parent": 527, "children": [], "start_point": {"row": 148, "column": 71}, "end_point": {"row": 148, "column": 75}}, {"id": 529, "type": "-", "text": "-", "parent": 527, "children": [], "start_point": {"row": 148, "column": 76}, "end_point": {"row": 148, "column": 77}}, {"id": 530, "type": "identifier", "text": "r", "parent": 527, "children": [], "start_point": {"row": 148, "column": 78}, "end_point": {"row": 148, "column": 79}}, {"id": 531, "type": "/", "text": "/", "parent": 502, "children": [], "start_point": {"row": 148, "column": 81}, "end_point": {"row": 148, "column": 82}}, {"id": 532, "type": "parenthesized_expression", "text": "(l_c0 - r)", "parent": 502, "children": [533], "start_point": {"row": 148, "column": 83}, "end_point": {"row": 148, "column": 93}}, {"id": 533, "type": "binary_expression", "text": "l_c0 - r", "parent": 532, "children": [534, 535, 536], "start_point": {"row": 148, "column": 84}, "end_point": {"row": 148, "column": 92}}, {"id": 534, "type": "identifier", "text": "l_c0", "parent": 533, "children": [], "start_point": {"row": 148, "column": 84}, "end_point": {"row": 148, "column": 88}}, {"id": 535, "type": "-", "text": "-", "parent": 533, "children": [], "start_point": {"row": 148, "column": 89}, "end_point": {"row": 148, "column": 90}}, {"id": 536, "type": "identifier", "text": "r", "parent": 533, "children": [], "start_point": {"row": 148, "column": 91}, "end_point": {"row": 148, "column": 92}}, {"id": 537, "type": "-", "text": "-", "parent": 501, "children": [], "start_point": {"row": 149, "column": 24}, "end_point": {"row": 149, "column": 25}}, {"id": 538, "type": "call_expression", "text": "exp(Scalar(1.0) / (l_c0 - r))", "parent": 501, "children": [539, 540], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 55}}, {"id": 539, "type": "identifier", "text": "exp", "parent": 538, "children": [], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 29}}, {"id": 540, "type": "argument_list", "text": "(Scalar(1.0) / (l_c0 - r))", "parent": 538, "children": [541], "start_point": {"row": 149, "column": 29}, "end_point": {"row": 149, "column": 55}}, {"id": 541, "type": "binary_expression", "text": "Scalar(1.0) / (l_c0 - r)", "parent": 540, "children": [542, 546, 547], "start_point": {"row": 149, "column": 30}, "end_point": {"row": 149, "column": 54}}, {"id": 542, "type": "call_expression", "text": "Scalar(1.0)", "parent": 541, "children": [543, 544], "start_point": {"row": 149, "column": 30}, "end_point": {"row": 149, "column": 41}}, {"id": 543, "type": "identifier", "text": "Scalar", "parent": 542, "children": [], "start_point": {"row": 149, "column": 30}, "end_point": {"row": 149, "column": 36}}, {"id": 544, "type": "argument_list", "text": "(1.0)", "parent": 542, "children": [545], "start_point": {"row": 149, "column": 36}, "end_point": {"row": 149, "column": 41}}, {"id": 545, "type": "number_literal", "text": "1.0", "parent": 544, "children": [], "start_point": {"row": 149, "column": 37}, "end_point": {"row": 149, "column": 40}}, {"id": 546, "type": "/", "text": "/", "parent": 541, "children": [], "start_point": {"row": 149, "column": 42}, "end_point": {"row": 149, "column": 43}}, {"id": 547, "type": "parenthesized_expression", "text": "(l_c0 - r)", "parent": 541, "children": [548], "start_point": {"row": 149, "column": 44}, "end_point": {"row": 149, "column": 54}}, {"id": 548, "type": "binary_expression", "text": "l_c0 - r", "parent": 547, "children": [549, 550, 551], "start_point": {"row": 149, "column": 45}, "end_point": {"row": 149, "column": 53}}, {"id": 549, "type": "identifier", "text": "l_c0", "parent": 548, "children": [], "start_point": {"row": 149, "column": 45}, "end_point": {"row": 149, "column": 49}}, {"id": 550, "type": "-", "text": "-", "parent": 548, "children": [], "start_point": {"row": 149, "column": 50}, "end_point": {"row": 149, "column": 51}}, {"id": 551, "type": "identifier", "text": "r", "parent": 548, "children": [], "start_point": {"row": 149, "column": 52}, "end_point": {"row": 149, "column": 53}}, {"id": 552, "type": "/", "text": "/", "parent": 499, "children": [], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 24}}, {"id": 553, "type": "parenthesized_expression", "text": "(l_max - r)", "parent": 499, "children": [554], "start_point": {"row": 150, "column": 25}, "end_point": {"row": 150, "column": 36}}, {"id": 554, "type": "binary_expression", "text": "l_max - r", "parent": 553, "children": [555, 556, 557], "start_point": {"row": 150, "column": 26}, "end_point": {"row": 150, "column": 35}}, {"id": 555, "type": "identifier", "text": "l_max", "parent": 554, "children": [], "start_point": {"row": 150, "column": 26}, "end_point": {"row": 150, "column": 31}}, {"id": 556, "type": "-", "text": "-", "parent": 554, "children": [], "start_point": {"row": 150, "column": 32}, "end_point": {"row": 150, "column": 33}}, {"id": 557, "type": "identifier", "text": "r", "parent": 554, "children": [], "start_point": {"row": 150, "column": 34}, "end_point": {"row": 150, "column": 35}}, {"id": 558, "type": "/", "text": "/", "parent": 498, "children": [], "start_point": {"row": 150, "column": 37}, "end_point": {"row": 150, "column": 38}}, {"id": 559, "type": "parenthesized_expression", "text": "(l_max - r)", "parent": 498, "children": [560], "start_point": {"row": 150, "column": 39}, "end_point": {"row": 150, "column": 50}}, {"id": 560, "type": "binary_expression", "text": "l_max - r", "parent": 559, "children": [561, 562, 563], "start_point": {"row": 150, "column": 40}, "end_point": {"row": 150, "column": 49}}, {"id": 561, "type": "identifier", "text": "l_max", "parent": 560, "children": [], "start_point": {"row": 150, "column": 40}, "end_point": {"row": 150, "column": 45}}, {"id": 562, "type": "-", "text": "-", "parent": 560, "children": [], "start_point": {"row": 150, "column": 46}, "end_point": {"row": 150, "column": 47}}, {"id": 563, "type": "identifier", "text": "r", "parent": 560, "children": [], "start_point": {"row": 150, "column": 48}, "end_point": {"row": 150, "column": 49}}, {"id": 564, "type": "if_statement", "text": "if (r < l_c1)\n {\n U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));\n F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));\n }", "parent": null, "children": [565], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 160, "column": 13}}, {"id": 565, "type": "parenthesized_expression", "text": "(r < l_c1)", "parent": 564, "children": [566], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 21}}, {"id": 566, "type": "binary_expression", "text": "r < l_c1", "parent": 565, "children": [567, 568, 569], "start_point": {"row": 153, "column": 12}, "end_point": {"row": 153, "column": 20}}, {"id": 567, "type": "identifier", "text": "r", "parent": 566, "children": [], "start_point": {"row": 153, "column": 12}, "end_point": {"row": 153, "column": 13}}, {"id": 568, "type": "<", "text": "<", "parent": 566, "children": [], "start_point": {"row": 153, "column": 14}, "end_point": {"row": 153, "column": 15}}, {"id": 569, "type": "identifier", "text": "l_c1", "parent": 566, "children": [], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 20}}, {"id": 570, "type": "assignment_expression", "text": "U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min))", "parent": 564, "children": [571, 572, 573], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 71}}, {"id": 571, "type": "identifier", "text": "U_rep", "parent": 570, "children": [], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 17}}, {"id": 572, "type": "=", "text": "=", "parent": 570, "children": [], "start_point": {"row": 155, "column": 18}, "end_point": {"row": 155, "column": 19}}, {"id": 573, "type": "binary_expression", "text": "k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min))", "parent": 570, "children": [574, 575, 576], "start_point": {"row": 155, "column": 20}, "end_point": {"row": 155, "column": 71}}, {"id": 574, "type": "identifier", "text": "k_b", "parent": 573, "children": [], "start_point": {"row": 155, "column": 20}, "end_point": {"row": 155, "column": 23}}, {"id": 575, "type": "*", "text": "*", "parent": 573, "children": [], "start_point": {"row": 155, "column": 24}, "end_point": {"row": 155, "column": 25}}, {"id": 576, "type": "parenthesized_expression", "text": "(exp(Scalar(1.0) / (r - l_c1)) / (r - l_min))", "parent": 573, "children": [577], "start_point": {"row": 155, "column": 26}, "end_point": {"row": 155, "column": 71}}, {"id": 577, "type": "binary_expression", "text": "exp(Scalar(1.0) / (r - l_c1)) / (r - l_min)", "parent": 576, "children": [578, 592, 593], "start_point": {"row": 155, "column": 27}, "end_point": {"row": 155, "column": 70}}, {"id": 578, "type": "call_expression", "text": "exp(Scalar(1.0) / (r - l_c1))", "parent": 577, "children": [579, 580], "start_point": {"row": 155, "column": 27}, "end_point": {"row": 155, "column": 56}}, {"id": 579, "type": "identifier", "text": "exp", "parent": 578, "children": [], "start_point": {"row": 155, "column": 27}, "end_point": {"row": 155, "column": 30}}, {"id": 580, "type": "argument_list", "text": "(Scalar(1.0) / (r - l_c1))", "parent": 578, "children": [581], "start_point": {"row": 155, "column": 30}, "end_point": {"row": 155, "column": 56}}, {"id": 581, "type": "binary_expression", "text": "Scalar(1.0) / (r - l_c1)", "parent": 580, "children": [582, 586, 587], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 55}}, {"id": 582, "type": "call_expression", "text": "Scalar(1.0)", "parent": 581, "children": [583, 584], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 42}}, {"id": 583, "type": "identifier", "text": "Scalar", "parent": 582, "children": [], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 37}}, {"id": 584, "type": "argument_list", "text": "(1.0)", "parent": 582, "children": [585], "start_point": {"row": 155, "column": 37}, "end_point": {"row": 155, "column": 42}}, {"id": 585, "type": "number_literal", "text": "1.0", "parent": 584, "children": [], "start_point": {"row": 155, "column": 38}, "end_point": {"row": 155, "column": 41}}, {"id": 586, "type": "/", "text": "/", "parent": 581, "children": [], "start_point": {"row": 155, "column": 43}, "end_point": {"row": 155, "column": 44}}, {"id": 587, "type": "parenthesized_expression", "text": "(r - l_c1)", "parent": 581, "children": [588], "start_point": {"row": 155, "column": 45}, "end_point": {"row": 155, "column": 55}}, {"id": 588, "type": "binary_expression", "text": "r - l_c1", "parent": 587, "children": [589, 590, 591], "start_point": {"row": 155, "column": 46}, "end_point": {"row": 155, "column": 54}}, {"id": 589, "type": "identifier", "text": "r", "parent": 588, "children": [], "start_point": {"row": 155, "column": 46}, "end_point": {"row": 155, "column": 47}}, {"id": 590, "type": "-", "text": "-", "parent": 588, "children": [], "start_point": {"row": 155, "column": 48}, "end_point": {"row": 155, "column": 49}}, {"id": 591, "type": "identifier", "text": "l_c1", "parent": 588, "children": [], "start_point": {"row": 155, "column": 50}, "end_point": {"row": 155, "column": 54}}, {"id": 592, "type": "/", "text": "/", "parent": 577, "children": [], "start_point": {"row": 155, "column": 57}, "end_point": {"row": 155, "column": 58}}, {"id": 593, "type": "parenthesized_expression", "text": "(r - l_min)", "parent": 577, "children": [594], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 70}}, {"id": 594, "type": "binary_expression", "text": "r - l_min", "parent": 593, "children": [595, 596, 597], "start_point": {"row": 155, "column": 60}, "end_point": {"row": 155, "column": 69}}, {"id": 595, "type": "identifier", "text": "r", "parent": 594, "children": [], "start_point": {"row": 155, "column": 60}, "end_point": {"row": 155, "column": 61}}, {"id": 596, "type": "-", "text": "-", "parent": 594, "children": [], "start_point": {"row": 155, "column": 62}, "end_point": {"row": 155, "column": 63}}, {"id": 597, "type": "identifier", "text": "l_min", "parent": 594, "children": [], "start_point": {"row": 155, "column": 64}, "end_point": {"row": 155, "column": 69}}, {"id": 598, "type": "assignment_expression", "text": "F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min))", "parent": 564, "children": [599, 600, 601], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 159, "column": 51}}, {"id": 599, "type": "identifier", "text": "F_rep", "parent": 598, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 17}}, {"id": 600, "type": "=", "text": "=", "parent": 598, "children": [], "start_point": {"row": 156, "column": 18}, "end_point": {"row": 156, "column": 19}}, {"id": 601, "type": "binary_expression", "text": "k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min))", "parent": 598, "children": [602, 603, 604], "start_point": {"row": 156, "column": 20}, "end_point": {"row": 159, "column": 51}}, {"id": 602, "type": "identifier", "text": "k_b", "parent": 601, "children": [], "start_point": {"row": 156, "column": 20}, "end_point": {"row": 156, "column": 23}}, {"id": 603, "type": "*", "text": "*", "parent": 601, "children": [], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 21}}, {"id": 604, "type": "parenthesized_expression", "text": "(((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min))", "parent": 601, "children": [605], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 159, "column": 51}}, {"id": 605, "type": "binary_expression", "text": "((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min)", "parent": 604, "children": [606, 665, 666], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 159, "column": 50}}, {"id": 606, "type": "binary_expression", "text": "((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min)", "parent": 605, "children": [607, 659, 660], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 159, "column": 36}}, {"id": 607, "type": "parenthesized_expression", "text": "((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))", "parent": 606, "children": [608], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 158, "column": 56}}, {"id": 608, "type": "binary_expression", "text": "(r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1))", "parent": 607, "children": [609, 644, 645], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 158, "column": 55}}, {"id": 609, "type": "binary_expression", "text": "(r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)", "parent": 608, "children": [610, 638, 639], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 93}}, {"id": 610, "type": "binary_expression", "text": "(r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1)", "parent": 609, "children": [611, 632, 633], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 80}}, {"id": 611, "type": "binary_expression", "text": "(r - l_min) * exp(Scalar(1.0) / (r - l_c1))", "parent": 610, "children": [612, 617, 618], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 67}}, {"id": 612, "type": "parenthesized_expression", "text": "(r - l_min)", "parent": 611, "children": [613], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 35}}, {"id": 613, "type": "binary_expression", "text": "r - l_min", "parent": 612, "children": [614, 615, 616], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 34}}, {"id": 614, "type": "identifier", "text": "r", "parent": 613, "children": [], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 26}}, {"id": 615, "type": "-", "text": "-", "parent": 613, "children": [], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 28}}, {"id": 616, "type": "identifier", "text": "l_min", "parent": 613, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 34}}, {"id": 617, "type": "*", "text": "*", "parent": 611, "children": [], "start_point": {"row": 157, "column": 36}, "end_point": {"row": 157, "column": 37}}, {"id": 618, "type": "call_expression", "text": "exp(Scalar(1.0) / (r - l_c1))", "parent": 611, "children": [619, 620], "start_point": {"row": 157, "column": 38}, "end_point": {"row": 157, "column": 67}}, {"id": 619, "type": "identifier", "text": "exp", "parent": 618, "children": [], "start_point": {"row": 157, "column": 38}, "end_point": {"row": 157, "column": 41}}, {"id": 620, "type": "argument_list", "text": "(Scalar(1.0) / (r - l_c1))", "parent": 618, "children": [621], "start_point": {"row": 157, "column": 41}, "end_point": {"row": 157, "column": 67}}, {"id": 621, "type": "binary_expression", "text": "Scalar(1.0) / (r - l_c1)", "parent": 620, "children": [622, 626, 627], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 66}}, {"id": 622, "type": "call_expression", "text": "Scalar(1.0)", "parent": 621, "children": [623, 624], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 53}}, {"id": 623, "type": "identifier", "text": "Scalar", "parent": 622, "children": [], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 48}}, {"id": 624, "type": "argument_list", "text": "(1.0)", "parent": 622, "children": [625], "start_point": {"row": 157, "column": 48}, "end_point": {"row": 157, "column": 53}}, {"id": 625, "type": "number_literal", "text": "1.0", "parent": 624, "children": [], "start_point": {"row": 157, "column": 49}, "end_point": {"row": 157, "column": 52}}, {"id": 626, "type": "/", "text": "/", "parent": 621, "children": [], "start_point": {"row": 157, "column": 54}, "end_point": {"row": 157, "column": 55}}, {"id": 627, "type": "parenthesized_expression", "text": "(r - l_c1)", "parent": 621, "children": [628], "start_point": {"row": 157, "column": 56}, "end_point": {"row": 157, "column": 66}}, {"id": 628, "type": "binary_expression", "text": "r - l_c1", "parent": 627, "children": [629, 630, 631], "start_point": {"row": 157, "column": 57}, "end_point": {"row": 157, "column": 65}}, {"id": 629, "type": "identifier", "text": "r", "parent": 628, "children": [], "start_point": {"row": 157, "column": 57}, "end_point": {"row": 157, "column": 58}}, {"id": 630, "type": "-", "text": "-", "parent": 628, "children": [], "start_point": {"row": 157, "column": 59}, "end_point": {"row": 157, "column": 60}}, {"id": 631, "type": "identifier", "text": "l_c1", "parent": 628, "children": [], "start_point": {"row": 157, "column": 61}, "end_point": {"row": 157, "column": 65}}, {"id": 632, "type": "/", "text": "/", "parent": 610, "children": [], "start_point": {"row": 157, "column": 68}, "end_point": {"row": 157, "column": 69}}, {"id": 633, "type": "parenthesized_expression", "text": "(r - l_c1)", "parent": 610, "children": [634], "start_point": {"row": 157, "column": 70}, "end_point": {"row": 157, "column": 80}}, {"id": 634, "type": "binary_expression", "text": "r - l_c1", "parent": 633, "children": [635, 636, 637], "start_point": {"row": 157, "column": 71}, "end_point": {"row": 157, "column": 79}}, {"id": 635, "type": "identifier", "text": "r", "parent": 634, "children": [], "start_point": {"row": 157, "column": 71}, "end_point": {"row": 157, "column": 72}}, {"id": 636, "type": "-", "text": "-", "parent": 634, "children": [], "start_point": {"row": 157, "column": 73}, "end_point": {"row": 157, "column": 74}}, {"id": 637, "type": "identifier", "text": "l_c1", "parent": 634, "children": [], "start_point": {"row": 157, "column": 75}, "end_point": {"row": 157, "column": 79}}, {"id": 638, "type": "/", "text": "/", "parent": 609, "children": [], "start_point": {"row": 157, "column": 81}, "end_point": {"row": 157, "column": 82}}, {"id": 639, "type": "parenthesized_expression", "text": "(r - l_c1)", "parent": 609, "children": [640], "start_point": {"row": 157, "column": 83}, "end_point": {"row": 157, "column": 93}}, {"id": 640, "type": "binary_expression", "text": "r - l_c1", "parent": 639, "children": [641, 642, 643], "start_point": {"row": 157, "column": 84}, "end_point": {"row": 157, "column": 92}}, {"id": 641, "type": "identifier", "text": "r", "parent": 640, "children": [], "start_point": {"row": 157, "column": 84}, "end_point": {"row": 157, "column": 85}}, {"id": 642, "type": "-", "text": "-", "parent": 640, "children": [], "start_point": {"row": 157, "column": 86}, "end_point": {"row": 157, "column": 87}}, {"id": 643, "type": "identifier", "text": "l_c1", "parent": 640, "children": [], "start_point": {"row": 157, "column": 88}, "end_point": {"row": 157, "column": 92}}, {"id": 644, "type": "+", "text": "+", "parent": 608, "children": [], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 25}}, {"id": 645, "type": "call_expression", "text": "exp(Scalar(1.0) / (r - l_c1))", "parent": 608, "children": [646, 647], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 55}}, {"id": 646, "type": "identifier", "text": "exp", "parent": 645, "children": [], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 29}}, {"id": 647, "type": "argument_list", "text": "(Scalar(1.0) / (r - l_c1))", "parent": 645, "children": [648], "start_point": {"row": 158, "column": 29}, "end_point": {"row": 158, "column": 55}}, {"id": 648, "type": "binary_expression", "text": "Scalar(1.0) / (r - l_c1)", "parent": 647, "children": [649, 653, 654], "start_point": {"row": 158, "column": 30}, "end_point": {"row": 158, "column": 54}}, {"id": 649, "type": "call_expression", "text": "Scalar(1.0)", "parent": 648, "children": [650, 651], "start_point": {"row": 158, "column": 30}, "end_point": {"row": 158, "column": 41}}, {"id": 650, "type": "identifier", "text": "Scalar", "parent": 649, "children": [], "start_point": {"row": 158, "column": 30}, "end_point": {"row": 158, "column": 36}}, {"id": 651, "type": "argument_list", "text": "(1.0)", "parent": 649, "children": [652], "start_point": {"row": 158, "column": 36}, "end_point": {"row": 158, "column": 41}}, {"id": 652, "type": "number_literal", "text": "1.0", "parent": 651, "children": [], "start_point": {"row": 158, "column": 37}, "end_point": {"row": 158, "column": 40}}, {"id": 653, "type": "/", "text": "/", "parent": 648, "children": [], "start_point": {"row": 158, "column": 42}, "end_point": {"row": 158, "column": 43}}, {"id": 654, "type": "parenthesized_expression", "text": "(r - l_c1)", "parent": 648, "children": [655], "start_point": {"row": 158, "column": 44}, "end_point": {"row": 158, "column": 54}}, {"id": 655, "type": "binary_expression", "text": "r - l_c1", "parent": 654, "children": [656, 657, 658], "start_point": {"row": 158, "column": 45}, "end_point": {"row": 158, "column": 53}}, {"id": 656, "type": "identifier", "text": "r", "parent": 655, "children": [], "start_point": {"row": 158, "column": 45}, "end_point": {"row": 158, "column": 46}}, {"id": 657, "type": "-", "text": "-", "parent": 655, "children": [], "start_point": {"row": 158, "column": 47}, "end_point": {"row": 158, "column": 48}}, {"id": 658, "type": "identifier", "text": "l_c1", "parent": 655, "children": [], "start_point": {"row": 158, "column": 49}, "end_point": {"row": 158, "column": 53}}, {"id": 659, "type": "/", "text": "/", "parent": 606, "children": [], "start_point": {"row": 159, "column": 23}, "end_point": {"row": 159, "column": 24}}, {"id": 660, "type": "parenthesized_expression", "text": "(r - l_min)", "parent": 606, "children": [661], "start_point": {"row": 159, "column": 25}, "end_point": {"row": 159, "column": 36}}, {"id": 661, "type": "binary_expression", "text": "r - l_min", "parent": 660, "children": [662, 663, 664], "start_point": {"row": 159, "column": 26}, "end_point": {"row": 159, "column": 35}}, {"id": 662, "type": "identifier", "text": "r", "parent": 661, "children": [], "start_point": {"row": 159, "column": 26}, "end_point": {"row": 159, "column": 27}}, {"id": 663, "type": "-", "text": "-", "parent": 661, "children": [], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 29}}, {"id": 664, "type": "identifier", "text": "l_min", "parent": 661, "children": [], "start_point": {"row": 159, "column": 30}, "end_point": {"row": 159, "column": 35}}, {"id": 665, "type": "/", "text": "/", "parent": 605, "children": [], "start_point": {"row": 159, "column": 37}, "end_point": {"row": 159, "column": 38}}, {"id": 666, "type": "parenthesized_expression", "text": "(r - l_min)", "parent": 605, "children": [667], "start_point": {"row": 159, "column": 39}, "end_point": {"row": 159, "column": 50}}, {"id": 667, "type": "binary_expression", "text": "r - l_min", "parent": 666, "children": [668, 669, 670], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 49}}, {"id": 668, "type": "identifier", "text": "r", "parent": 667, "children": [], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 41}}, {"id": 669, "type": "-", "text": "-", "parent": 667, "children": [], "start_point": {"row": 159, "column": 42}, "end_point": {"row": 159, "column": 43}}, {"id": 670, "type": "identifier", "text": "l_min", "parent": 667, "children": [], "start_point": {"row": 159, "column": 44}, "end_point": {"row": 159, "column": 49}}, {"id": 671, "type": "if_statement", "text": "if (k_b != Scalar(0.0))\n {\n // Check if bond length restriction is violated\n if (rsq >= l_max * l_max)\n return false;\n if (rsq <= l_min * l_min)\n return false;\n\n force_divr = (F_att + F_rep) / r;\n bond_eng = U_att + U_rep;\n }", "parent": null, "children": [672], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 171, "column": 13}}, {"id": 672, "type": "parenthesized_expression", "text": "(k_b != Scalar(0.0))", "parent": 671, "children": [673], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 31}}, {"id": 673, "type": "binary_expression", "text": "k_b != Scalar(0.0)", "parent": 672, "children": [674, 675, 676], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 30}}, {"id": 674, "type": "identifier", "text": "k_b", "parent": 673, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 15}}, {"id": 675, "type": "!=", "text": "!=", "parent": 673, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 18}}, {"id": 676, "type": "call_expression", "text": "Scalar(0.0)", "parent": 673, "children": [677, 678], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 30}}, {"id": 677, "type": "identifier", "text": "Scalar", "parent": 676, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 25}}, {"id": 678, "type": "argument_list", "text": "(0.0)", "parent": 676, "children": [679], "start_point": {"row": 161, "column": 25}, "end_point": {"row": 161, "column": 30}}, {"id": 679, "type": "number_literal", "text": "0.0", "parent": 678, "children": [], "start_point": {"row": 161, "column": 26}, "end_point": {"row": 161, "column": 29}}, {"id": 680, "type": "if_statement", "text": "if (rsq >= l_max * l_max)\n return false;", "parent": 671, "children": [681, 689], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 165, "column": 29}}, {"id": 681, "type": "parenthesized_expression", "text": "(rsq >= l_max * l_max)", "parent": 680, "children": [682], "start_point": {"row": 164, "column": 15}, "end_point": {"row": 164, "column": 37}}, {"id": 682, "type": "binary_expression", "text": "rsq >= l_max * l_max", "parent": 681, "children": [683, 684, 685], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 36}}, {"id": 683, "type": "identifier", "text": "rsq", "parent": 682, "children": [], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 19}}, {"id": 684, "type": ">=", "text": ">=", "parent": 682, "children": [], "start_point": {"row": 164, "column": 20}, "end_point": {"row": 164, "column": 22}}, {"id": 685, "type": "binary_expression", "text": "l_max * l_max", "parent": 682, "children": [686, 687, 688], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 36}}, {"id": 686, "type": "identifier", "text": "l_max", "parent": 685, "children": [], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 28}}, {"id": 687, "type": "*", "text": "*", "parent": 685, "children": [], "start_point": {"row": 164, "column": 29}, "end_point": {"row": 164, "column": 30}}, {"id": 688, "type": "identifier", "text": "l_max", "parent": 685, "children": [], "start_point": {"row": 164, "column": 31}, "end_point": {"row": 164, "column": 36}}, {"id": 689, "type": "return_statement", "text": "return false;", "parent": 680, "children": [690], "start_point": {"row": 165, "column": 16}, "end_point": {"row": 165, "column": 29}}, {"id": 690, "type": "false", "text": "false", "parent": 689, "children": [], "start_point": {"row": 165, "column": 23}, "end_point": {"row": 165, "column": 28}}, {"id": 691, "type": "if_statement", "text": "if (rsq <= l_min * l_min)\n return false;", "parent": 671, "children": [692, 700], "start_point": {"row": 166, "column": 12}, "end_point": {"row": 167, "column": 29}}, {"id": 692, "type": "parenthesized_expression", "text": "(rsq <= l_min * l_min)", "parent": 691, "children": [693], "start_point": {"row": 166, "column": 15}, "end_point": {"row": 166, "column": 37}}, {"id": 693, "type": "binary_expression", "text": "rsq <= l_min * l_min", "parent": 692, "children": [694, 695, 696], "start_point": {"row": 166, "column": 16}, "end_point": {"row": 166, "column": 36}}, {"id": 694, "type": "identifier", "text": "rsq", "parent": 693, "children": [], "start_point": {"row": 166, "column": 16}, "end_point": {"row": 166, "column": 19}}, {"id": 695, "type": "<=", "text": "<=", "parent": 693, "children": [], "start_point": {"row": 166, "column": 20}, "end_point": {"row": 166, "column": 22}}, {"id": 696, "type": "binary_expression", "text": "l_min * l_min", "parent": 693, "children": [697, 698, 699], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 36}}, {"id": 697, "type": "identifier", "text": "l_min", "parent": 696, "children": [], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 28}}, {"id": 698, "type": "*", "text": "*", "parent": 696, "children": [], "start_point": {"row": 166, "column": 29}, "end_point": {"row": 166, "column": 30}}, {"id": 699, "type": "identifier", "text": "l_min", "parent": 696, "children": [], "start_point": {"row": 166, "column": 31}, "end_point": {"row": 166, "column": 36}}, {"id": 700, "type": "return_statement", "text": "return false;", "parent": 691, "children": [701], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 29}}, {"id": 701, "type": "false", "text": "false", "parent": 700, "children": [], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 167, "column": 28}}, {"id": 702, "type": "assignment_expression", "text": "force_divr = (F_att + F_rep) / r", "parent": 671, "children": [703, 704, 705], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 44}}, {"id": 703, "type": "identifier", "text": "force_divr", "parent": 702, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 22}}, {"id": 704, "type": "=", "text": "=", "parent": 702, "children": [], "start_point": {"row": 169, "column": 23}, "end_point": {"row": 169, "column": 24}}, {"id": 705, "type": "binary_expression", "text": "(F_att + F_rep) / r", "parent": 702, "children": [706, 711, 712], "start_point": {"row": 169, "column": 25}, "end_point": {"row": 169, "column": 44}}, {"id": 706, "type": "parenthesized_expression", "text": "(F_att + F_rep)", "parent": 705, "children": [707], "start_point": {"row": 169, "column": 25}, "end_point": {"row": 169, "column": 40}}, {"id": 707, "type": "binary_expression", "text": "F_att + F_rep", "parent": 706, "children": [708, 709, 710], "start_point": {"row": 169, "column": 26}, "end_point": {"row": 169, "column": 39}}, {"id": 708, "type": "identifier", "text": "F_att", "parent": 707, "children": [], "start_point": {"row": 169, "column": 26}, "end_point": {"row": 169, "column": 31}}, {"id": 709, "type": "+", "text": "+", "parent": 707, "children": [], "start_point": {"row": 169, "column": 32}, "end_point": {"row": 169, "column": 33}}, {"id": 710, "type": "identifier", "text": "F_rep", "parent": 707, "children": [], "start_point": {"row": 169, "column": 34}, "end_point": {"row": 169, "column": 39}}, {"id": 711, "type": "/", "text": "/", "parent": 705, "children": [], "start_point": {"row": 169, "column": 41}, "end_point": {"row": 169, "column": 42}}, {"id": 712, "type": "identifier", "text": "r", "parent": 705, "children": [], "start_point": {"row": 169, "column": 43}, "end_point": {"row": 169, "column": 44}}, {"id": 713, "type": "assignment_expression", "text": "bond_eng = U_att + U_rep", "parent": 671, "children": [714, 715, 716], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 36}}, {"id": 714, "type": "identifier", "text": "bond_eng", "parent": 713, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 20}}, {"id": 715, "type": "=", "text": "=", "parent": 713, "children": [], "start_point": {"row": 170, "column": 21}, "end_point": {"row": 170, "column": 22}}, {"id": 716, "type": "binary_expression", "text": "U_att + U_rep", "parent": 713, "children": [717, 718, 719], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 36}}, {"id": 717, "type": "identifier", "text": "U_att", "parent": 716, "children": [], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 28}}, {"id": 718, "type": "+", "text": "+", "parent": 716, "children": [], "start_point": {"row": 170, "column": 29}, "end_point": {"row": 170, "column": 30}}, {"id": 719, "type": "identifier", "text": "U_rep", "parent": 716, "children": [], "start_point": {"row": 170, "column": 31}, "end_point": {"row": 170, "column": 36}}, {"id": 720, "type": "return_statement", "text": "return true;", "parent": null, "children": [721], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 20}}, {"id": 721, "type": "true", "text": "true", "parent": 720, "children": [], "start_point": {"row": 173, "column": 15}, "end_point": {"row": 173, "column": 19}}, {"id": 722, "type": "preproc_ifdef", "text": "#ifndef __HIPCC__\n //! Get the name of this potential\n /*! \\returns The potential name.\n */\n static std::string getName()\n {\n return std::string(\"tether\");\n }\n#endif", "parent": null, "children": [723, 724, 725, 739], "start_point": {"row": 176, "column": 0}, "end_point": {"row": 184, "column": 6}}, {"id": 723, "type": "#ifndef", "text": "#ifndef", "parent": 722, "children": [], "start_point": {"row": 176, "column": 0}, "end_point": {"row": 176, "column": 7}}, {"id": 724, "type": "identifier", "text": "__HIPCC__", "parent": 722, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 17}}, {"id": 725, "type": "function_definition", "text": "static std::string getName()\n {\n return std::string(\"tether\");\n }", "parent": 722, "children": [726, 727, 729], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 183, "column": 9}}, {"id": 726, "type": "type_identifier", "text": "std", "parent": 725, "children": [], "start_point": {"row": 180, "column": 11}, "end_point": {"row": 180, "column": 14}}, {"id": 727, "type": "ERROR", "text": "::string", "parent": 725, "children": [728], "start_point": {"row": 180, "column": 14}, "end_point": {"row": 180, "column": 22}}, {"id": 728, "type": "identifier", "text": "string", "parent": 727, "children": [], "start_point": {"row": 180, "column": 16}, "end_point": {"row": 180, "column": 22}}, {"id": 729, "type": "function_declarator", "text": "getName()", "parent": 725, "children": [730, 731], "start_point": {"row": 180, "column": 23}, "end_point": {"row": 180, "column": 32}}, {"id": 730, "type": "identifier", "text": "getName", "parent": 729, "children": [], "start_point": {"row": 180, "column": 23}, "end_point": {"row": 180, "column": 30}}, {"id": 731, "type": "parameter_list", "text": "()", "parent": 729, "children": [], "start_point": {"row": 180, "column": 30}, "end_point": {"row": 180, "column": 32}}, {"id": 732, "type": "return_statement", "text": "return std::string(\"tether\");", "parent": 725, "children": [733, 735], "start_point": {"row": 182, "column": 8}, "end_point": {"row": 182, "column": 37}}, {"id": 733, "type": "ERROR", "text": "std::", "parent": 732, "children": [734], "start_point": {"row": 182, "column": 15}, "end_point": {"row": 182, "column": 20}}, {"id": 734, "type": "identifier", "text": "std", "parent": 733, "children": [], "start_point": {"row": 182, "column": 15}, "end_point": {"row": 182, "column": 18}}, {"id": 735, "type": "call_expression", "text": "string(\"tether\")", "parent": 732, "children": [736, 737], "start_point": {"row": 182, "column": 20}, "end_point": {"row": 182, "column": 36}}, {"id": 736, "type": "identifier", "text": "string", "parent": 735, "children": [], "start_point": {"row": 182, "column": 20}, "end_point": {"row": 182, "column": 26}}, {"id": 737, "type": "argument_list", "text": "(\"tether\")", "parent": 735, "children": [738], "start_point": {"row": 182, "column": 26}, "end_point": {"row": 182, "column": 36}}, {"id": 738, "type": "string_literal", "text": "\"tether\"", "parent": 737, "children": [], "start_point": {"row": 182, "column": 27}, "end_point": {"row": 182, "column": 35}}, {"id": 739, "type": "#endif", "text": "#endif", "parent": 722, "children": [], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 184, "column": 6}}, {"id": 740, "type": "labeled_statement", "text": "protected:\n Scalar rsq;", "parent": null, "children": [741], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 187, "column": 15}}, {"id": 741, "type": "declaration", "text": "Scalar rsq;", "parent": 740, "children": [742, 743], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 15}}, {"id": 742, "type": "type_identifier", "text": "Scalar", "parent": 741, "children": [], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 10}}, {"id": 743, "type": "identifier", "text": "rsq", "parent": 741, "children": [], "start_point": {"row": 187, "column": 11}, "end_point": {"row": 187, "column": 14}}, {"id": 744, "type": "declaration", "text": "Scalar k_b;", "parent": null, "children": [745, 746], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 15}}, {"id": 745, "type": "type_identifier", "text": "Scalar", "parent": 744, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 10}}, {"id": 746, "type": "identifier", "text": "k_b", "parent": 744, "children": [], "start_point": {"row": 188, "column": 11}, "end_point": {"row": 188, "column": 14}}, {"id": 747, "type": "declaration", "text": "Scalar l_min;", "parent": null, "children": [748, 749], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 17}}, {"id": 748, "type": "type_identifier", "text": "Scalar", "parent": 747, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 10}}, {"id": 749, "type": "identifier", "text": "l_min", "parent": 747, "children": [], "start_point": {"row": 189, "column": 11}, "end_point": {"row": 189, "column": 16}}, {"id": 750, "type": "declaration", "text": "Scalar l_c1;", "parent": null, "children": [751, 752], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 16}}, {"id": 751, "type": "type_identifier", "text": "Scalar", "parent": 750, "children": [], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 10}}, {"id": 752, "type": "identifier", "text": "l_c1", "parent": 750, "children": [], "start_point": {"row": 190, "column": 11}, "end_point": {"row": 190, "column": 15}}, {"id": 753, "type": "declaration", "text": "Scalar l_c0;", "parent": null, "children": [754, 755], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 16}}, {"id": 754, "type": "type_identifier", "text": "Scalar", "parent": 753, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 10}}, {"id": 755, "type": "identifier", "text": "l_c0", "parent": 753, "children": [], "start_point": {"row": 191, "column": 11}, "end_point": {"row": 191, "column": 15}}, {"id": 756, "type": "declaration", "text": "Scalar l_max;", "parent": null, "children": [757, 758], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 17}}, {"id": 757, "type": "type_identifier", "text": "Scalar", "parent": 756, "children": [], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 10}}, {"id": 758, "type": "identifier", "text": "l_max", "parent": 756, "children": [], "start_point": {"row": 192, "column": 11}, "end_point": {"row": 192, "column": 16}}, {"id": 759, "type": "ERROR", "text": "} // end namespace md\n } // end namespace hoomd\n\n#endif", "parent": null, "children": [760], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 198, "column": 6}}, {"id": 760, "type": "#endif", "text": "#endif", "parent": 759, "children": [], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 32, 94, 99, 104, 109, 115, 120, 253, 302, 313, 326, 332, 338, 344, 352, 361, 365, 369, 378, 382, 387, 391, 725, 729], "variables": [38, 41, 44, 47, 50, 76, 97, 102, 107, 112, 118, 123, 258, 305, 310, 316, 319, 329, 335, 341, 347, 355, 372, 375, 394, 397, 400, 412, 421, 430, 439, 448, 741, 744, 747, 750, 753, 756], "classes": [36], "imports": [9, 10, 13, 14], "modules": [], "enums": []}, "statements": {"expressions": [131, 132, 133, 134, 141, 146, 147, 148, 149, 156, 161, 162, 163, 164, 171, 176, 177, 178, 179, 186, 191, 192, 193, 194, 201, 204, 205, 207, 208, 209, 210, 211, 212, 213, 218, 223, 228, 233, 238, 262, 268, 274, 280, 286, 298, 322, 403, 406, 409, 417, 426, 435, 444, 453, 458, 459, 466, 469, 470, 471, 474, 475, 480, 481, 486, 487, 494, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 511, 514, 515, 520, 521, 526, 527, 532, 533, 538, 541, 542, 547, 548, 553, 554, 559, 560, 565, 566, 573, 576, 577, 578, 581, 582, 587, 588, 593, 594, 601, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 618, 621, 622, 627, 628, 633, 634, 639, 640, 645, 648, 649, 654, 655, 660, 661, 666, 667, 672, 673, 676, 681, 682, 685, 692, 693, 696, 705, 706, 707, 716, 735], "assignments": [60, 64, 68, 72, 143, 158, 173, 188, 261, 267, 273, 279, 285, 463, 491, 570, 598, 702, 713], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 12, 16, 17, 18, 21, 27, 28, 30, 31, 33, 34, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 53, 54, 55, 57, 61, 65, 69, 73, 77, 78, 80, 81, 82, 84, 85, 87, 88, 90, 92, 93, 95, 98, 100, 103, 105, 108, 110, 113, 116, 119, 121, 124, 126, 127, 129, 135, 137, 139, 142, 144, 150, 152, 154, 157, 159, 165, 167, 169, 172, 174, 180, 182, 184, 187, 189, 195, 197, 199, 202, 203, 214, 216, 219, 221, 224, 226, 229, 231, 234, 236, 239, 241, 244, 245, 250, 252, 254, 257, 259, 260, 263, 266, 269, 272, 275, 278, 281, 284, 287, 290, 292, 293, 295, 299, 303, 306, 307, 309, 311, 314, 317, 318, 320, 321, 323, 325, 327, 330, 331, 333, 336, 337, 339, 342, 343, 345, 348, 349, 353, 356, 357, 359, 362, 366, 368, 370, 373, 374, 376, 377, 379, 381, 383, 388, 390, 392, 395, 396, 398, 399, 401, 402, 404, 407, 408, 410, 411, 413, 415, 418, 420, 422, 424, 427, 431, 433, 436, 440, 442, 445, 449, 451, 454, 457, 460, 462, 464, 467, 472, 476, 482, 484, 488, 490, 492, 495, 507, 509, 512, 516, 522, 524, 528, 530, 534, 536, 539, 543, 549, 551, 555, 557, 561, 563, 564, 567, 569, 571, 574, 579, 583, 589, 591, 595, 597, 599, 602, 614, 616, 619, 623, 629, 631, 635, 637, 641, 643, 646, 650, 656, 658, 662, 664, 668, 670, 671, 674, 677, 680, 683, 686, 688, 691, 694, 697, 699, 703, 708, 710, 712, 714, 717, 719, 722, 723, 724, 726, 728, 730, 734, 736, 739, 742, 743, 745, 746, 748, 749, 751, 752, 754, 755, 757, 758, 760], "returns": [291, 385, 689, 700, 720, 732], "exceptions": []}, "expressions": {"calls": [], "literals": [11, 15, 59, 63, 67, 71, 75, 136, 151, 166, 181, 196, 246, 247, 248, 264, 270, 276, 282, 288, 301, 429, 438, 447, 456, 478, 518, 545, 585, 625, 652, 679, 738], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "tether_params", "text_snippet": "namespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min"}, {"node_id": 32, "universal_type": "function", "name": "tether_params", "text_snippet": "namespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n "}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "k_b(k_b)"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "l_min(l_min)"}, {"node_id": 104, "universal_type": "function", "name": "unknown", "text_snippet": "l_c1(l_c1)"}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "l_c0(l_c0)"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "l_max(l_max)"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "tether_params(pybind11::dict v)"}, {"node_id": 253, "universal_type": "function", "name": "unknown", "text_snippet": "asDict()"}, {"node_id": 302, "universal_type": "function", "name": "EvaluatorBondTether", "text_snippet": "class EvaluatorBondTether\n {\n public:\n //! Define the parameter type used by this bond pote"}, {"node_id": 313, "universal_type": "function", "name": "unknown", "text_snippet": "EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq)"}, {"node_id": 326, "universal_type": "function", "name": "unknown", "text_snippet": "k_b(_params.k_b)"}, {"node_id": 332, "universal_type": "function", "name": "unknown", "text_snippet": "l_min(_params.l_min)"}, {"node_id": 338, "universal_type": "function", "name": "unknown", "text_snippet": "l_c1(_params.l_c1)"}, {"node_id": 344, "universal_type": "function", "name": "unknown", "text_snippet": "l_c0(_params.l_c0)"}, {"node_id": 352, "universal_type": "function", "name": "unknown", "text_snippet": "l_max(_params.l_max)"}, {"node_id": 361, "universal_type": "function", "name": "unknown", "text_snippet": "needsDiameter()"}, {"node_id": 365, "universal_type": "function", "name": "setDiameter", "text_snippet": "DEVICE void setDiameter(Scalar da, Scalar db) { }"}, {"node_id": 369, "universal_type": "function", "name": "unknown", "text_snippet": "setDiameter(Scalar da, Scalar db)"}, {"node_id": 378, "universal_type": "function", "name": "needsCharge", "text_snippet": "DEVICE static bool needsCharge()\n {\n return false;\n }"}, {"node_id": 382, "universal_type": "function", "name": "unknown", "text_snippet": "needsCharge()"}, {"node_id": 387, "universal_type": "function", "name": "setCharge", "text_snippet": "DEVICE void setCharge(Scalar qa, Scalar qb) { }"}, {"node_id": 391, "universal_type": "function", "name": "unknown", "text_snippet": "setCharge(Scalar qa, Scalar qb)"}, {"node_id": 725, "universal_type": "function", "name": "unknown", "text_snippet": "static std::string getName()\n {\n return std::string(\"tether\");\n }"}, {"node_id": 729, "universal_type": "function", "name": "unknown", "text_snippet": "getName()"}], "class_declarations": [{"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 9, "text": "#include <string>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 13, "text": "#include \"hoomd/HOOMDMath.h\"\n"}, {"node_id": 14, "text": "#include"}]}, "original_source_code": "// Copyright (c) 2009-2022 The Regents of the University of Michigan.\n// Part of HOOMD-blue, released under the BSD 3-Clause License.\n\n#ifndef __BOND_EVALUATOR_TETHER_H__\n#define __BOND_EVALUATOR_TETHER_H__\n\n#ifndef __HIPCC__\n#include <string>\n#endif\n\n#include \"hoomd/HOOMDMath.h\"\n\n/*! \\file EvaluatorBondTether.h\n \\brief Defines the bond evaluator class for Tethering potentials\n*/\n\n// need to declare these class methods with __device__ qualifiers when building in nvcc\n// DEVICE is __host__ __device__ when included in nvcc and blank when included into the host\n// compiler\n#ifdef __HIPCC__\n#define DEVICE __device__\n#else\n#define DEVICE\n#endif\n\nnamespace hoomd\n {\nnamespace md\n {\nstruct tether_params\n {\n Scalar k_b;\n Scalar l_min;\n Scalar l_c1;\n Scalar l_c0;\n Scalar l_max;\n\n#ifndef __HIPCC__\n tether_params()\n {\n k_b = 10;\n l_min = 0.9;\n l_c1 = 1.2;\n l_c0 = 1.8;\n l_max = 2.1;\n }\n\n tether_params(Scalar k_b, Scalar l_min, Scalar l_c1, Scalar l_c0, Scalar l_max)\n : k_b(k_b), l_min(l_min), l_c1(l_c1), l_c0(l_c0), l_max(l_max)\n {\n }\n\n tether_params(pybind11::dict v)\n {\n k_b = v[\"k_b\"].cast<Scalar>();\n l_min = v[\"l_min\"].cast<Scalar>();\n l_c1 = v[\"l_c1\"].cast<Scalar>();\n l_c0 = v[\"l_c0\"].cast<Scalar>();\n l_max = v[\"l_max\"].cast<Scalar>();\n\n if (!(l_min < l_c1 && l_min < l_c0 && l_min < l_max && l_c1 < l_c0 && l_c1 < l_max\n && l_c0 < l_max))\n {\n throw std::invalid_argument(\"The input parameters should follow l_min < l_c1 < l_c0\"\n \" < l_max\");\n }\n }\n\n pybind11::dict asDict()\n {\n pybind11::dict v;\n v[\"k_b\"] = k_b;\n v[\"l_min\"] = l_min;\n v[\"l_c1\"] = l_c1;\n v[\"l_c0\"] = l_c0;\n v[\"l_max\"] = l_max;\n return v;\n }\n#endif\n } __attribute__((aligned(32)));\n\n//! Class for evaluating the tethering bond potential\n/*! The parameters are:\n - \\a k_b (param.x) Bond stiffness\n - \\a l_min (param.y) minimum bond length\n - \\a l_c1 (param.w) cutoff length of repulsive part\n - \\a l_c0 (param.z) cutoff length of attractive part\n - \\a l_max (param.a) maximum bond length\n*/\nclass EvaluatorBondTether\n {\n public:\n //! Define the parameter type used by this bond potential evaluator\n typedef tether_params param_type;\n\n //! Constructs the pair potential evaluator\n /*! \\param _rsq Squared distance between the particles\n \\param _params Per type pair parameters of this potential\n */\n DEVICE EvaluatorBondTether(Scalar _rsq, const param_type& _params)\n : rsq(_rsq), k_b(_params.k_b), l_min(_params.l_min), l_c1(_params.l_c1), l_c0(_params.l_c0),\n l_max(_params.l_max)\n {\n }\n\n //! This evaluator doesn't use diameter\n DEVICE static bool needsDiameter()\n {\n return false;\n }\n\n //! Accept the optional diameter values\n /*! \\param da Diameter of particle a\n \\param db Diameter of particle\n */\n DEVICE void setDiameter(Scalar da, Scalar db) { }\n\n //! Tether doesn't use charge\n DEVICE static bool needsCharge()\n {\n return false;\n }\n\n //! Accept the optional charge values\n /*! \\param qa Charge of particle a\n \\param qb Charge of particle b\n */\n DEVICE void setCharge(Scalar qa, Scalar qb) { }\n\n //! Evaluate the force and energy\n /*! \\param force_divr Output parameter to write the computed force divided by r.\n \\param bond_eng Output parameter to write the computed bond energy\n\n \\return True if they are evaluated or false if the bond\n energy is not defined\n */\n DEVICE bool evalForceAndEnergy(Scalar& force_divr, Scalar& bond_eng)\n {\n Scalar r = sqrt(rsq);\n Scalar U_att = Scalar(0.0);\n Scalar F_att = Scalar(0.0);\n Scalar U_rep = Scalar(0.0);\n Scalar F_rep = Scalar(0.0);\n\n if (r > l_c0)\n {\n U_att = k_b * (exp(Scalar(1.0) / (l_c0 - r)) / (l_max - r));\n F_att = k_b\n * (((r - l_max) * exp(Scalar(1.0) / (l_c0 - r)) / (l_c0 - r) / (l_c0 - r)\n - exp(Scalar(1.0) / (l_c0 - r)))\n / (l_max - r) / (l_max - r));\n }\n\n if (r < l_c1)\n {\n U_rep = k_b * (exp(Scalar(1.0) / (r - l_c1)) / (r - l_min));\n F_rep = k_b\n * (((r - l_min) * exp(Scalar(1.0) / (r - l_c1)) / (r - l_c1) / (r - l_c1)\n + exp(Scalar(1.0) / (r - l_c1)))\n / (r - l_min) / (r - l_min));\n }\n if (k_b != Scalar(0.0))\n {\n // Check if bond length restriction is violated\n if (rsq >= l_max * l_max)\n return false;\n if (rsq <= l_min * l_min)\n return false;\n\n force_divr = (F_att + F_rep) / r;\n bond_eng = U_att + U_rep;\n }\n\n return true;\n }\n\n#ifndef __HIPCC__\n //! Get the name of this potential\n /*! \\returns The potential name.\n */\n static std::string getName()\n {\n return std::string(\"tether\");\n }\n#endif\n\n protected:\n Scalar rsq; //!< Stored rsq from the constructor\n Scalar k_b; //!< k_b parameter\n Scalar l_min; //!< l_min parameter\n Scalar l_c1; //!< l_c1 parameter\n Scalar l_c0; //!< l_c0 parameter\n Scalar l_max; //!< l_max parameter\n };\n\n } // end namespace md\n } // end namespace hoomd\n\n#endif // __BOND_EVALUATOR_TETHER_H__\n"}
280
c
/* * socket methods (mostly unimplemented) */ #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> static struct hostent _out_host = {0}; static struct in_addr * _out_host_vector[2] = {NULL, NULL}; static struct in_addr * _out_host_aliases[1] = {NULL}; static uint32_t _out_addr; #define UNIMPLEMENTED fprintf(stderr, "[libnetwork] Unimplemented: %s\n", __FUNCTION__) struct hostent * gethostbyname(const char * name) { if (_out_host.h_name) free(_out_host.h_name); _out_host.h_name = strdup(name); int fd = open("/dev/net",O_RDONLY); void * args[2] = {(void *)name,&_out_addr}; int ret = ioctl(fd, 0x5000, args); close(fd); if (ret) return NULL; _out_host_vector[0] = (struct in_addr *)&_out_addr; _out_host.h_aliases = (char **)&_out_host_aliases; _out_host.h_addrtype = AF_INET; _out_host.h_addr_list = (char**)_out_host_vector; _out_host.h_length = sizeof(uint32_t); return &_out_host; } int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { UNIMPLEMENTED; return -1; } /* All of these should just be reads. */ ssize_t recv(int sockfd, void *buf, size_t len, int flags) { UNIMPLEMENTED; return -1; } ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) { UNIMPLEMENTED; return -1; } ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) { UNIMPLEMENTED; return -1; } ssize_t send(int sockfd, const void *buf, size_t len, int flags) { UNIMPLEMENTED; return len; } ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) { UNIMPLEMENTED; return len; } ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) { UNIMPLEMENTED; return -1; } int socket(int domain, int type, int protocol) { UNIMPLEMENTED; return -1; } uint32_t htonl(uint32_t hostlong) { return ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24)); } uint16_t htons(uint16_t hostshort) { return ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) ); } uint32_t ntohl(uint32_t netlong) { return htonl(netlong); } uint16_t ntohs(uint16_t netshort) { return htons(netshort); } int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { UNIMPLEMENTED; return -1; } int accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen) { UNIMPLEMENTED; return -1; } int listen(int sockfd, int backlog) { UNIMPLEMENTED; return -1; } int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) { UNIMPLEMENTED; return -1; } int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen) { return -1; } int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) { UNIMPLEMENTED; return -1; } int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) { UNIMPLEMENTED; return -1; }
28.04
105
(translation_unit) "/*\n * socket methods (mostly unimplemented)\n */\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <sys/ioctl.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n\n\nstatic struct hostent _out_host = {0};\nstatic struct in_addr * _out_host_vector[2] = {NULL, NULL};\nstatic struct in_addr * _out_host_aliases[1] = {NULL};\nstatic uint32_t _out_addr;\n\n#define UNIMPLEMENTED fprintf(stderr, "[libnetwork] Unimplemented: %s\n", __FUNCTION__)\n\nstruct hostent * gethostbyname(const char * name) {\n if (_out_host.h_name) free(_out_host.h_name);\n _out_host.h_name = strdup(name);\n int fd = open("/dev/net",O_RDONLY);\n void * args[2] = {(void *)name,&_out_addr};\n int ret = ioctl(fd, 0x5000, args);\n close(fd);\n if (ret) return NULL;\n\n _out_host_vector[0] = (struct in_addr *)&_out_addr;\n _out_host.h_aliases = (char **)&_out_host_aliases;\n _out_host.h_addrtype = AF_INET;\n _out_host.h_addr_list = (char**)_out_host_vector;\n _out_host.h_length = sizeof(uint32_t);\n return &_out_host;\n}\n\nint connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n UNIMPLEMENTED;\n return -1;\n}\n\n/* All of these should just be reads. */\nssize_t recv(int sockfd, void *buf, size_t len, int flags) {\n UNIMPLEMENTED;\n return -1;\n}\nssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) {\n UNIMPLEMENTED;\n return -1;\n}\nssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) {\n UNIMPLEMENTED;\n return -1;\n}\n\nssize_t send(int sockfd, const void *buf, size_t len, int flags) {\n UNIMPLEMENTED;\n return len;\n}\nssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) {\n UNIMPLEMENTED;\n return len;\n}\nssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) {\n UNIMPLEMENTED;\n return -1;\n}\n\nint socket(int domain, int type, int protocol) {\n UNIMPLEMENTED;\n return -1;\n}\n\nuint32_t htonl(uint32_t hostlong) {\n return ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));\n}\n\nuint16_t htons(uint16_t hostshort) {\n return ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );\n}\n\nuint32_t ntohl(uint32_t netlong) {\n return htonl(netlong);\n}\n\nuint16_t ntohs(uint16_t netshort) {\n return htons(netshort);\n}\n\nint bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n UNIMPLEMENTED;\n return -1;\n}\n\nint accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen) {\n UNIMPLEMENTED;\n return -1;\n}\n\nint listen(int sockfd, int backlog) {\n UNIMPLEMENTED;\n return -1;\n}\n\nint getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n UNIMPLEMENTED;\n return -1;\n}\n\nint getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n return -1;\n}\n\nint getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) {\n UNIMPLEMENTED;\n return -1;\n}\n\nint setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) {\n UNIMPLEMENTED;\n return -1;\n}\n\n\n" (comment) "/*\n * socket methods (mostly unimplemented)\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <fcntl.h>\n" (#include) "#include" (system_lib_string) "<fcntl.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <sys/ioctl.h>\n" (#include) "#include" (system_lib_string) "<sys/ioctl.h>" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.h>" (preproc_include) "#include <sys/socket.h>\n" (#include) "#include" (system_lib_string) "<sys/socket.h>" (declaration) "static struct hostent _out_host = {0};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct hostent" (struct) "struct" (type_identifier) "hostent" (init_declarator) "_out_host = {0}" (identifier) "_out_host" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (declaration) "static struct in_addr * _out_host_vector[2] = {NULL, NULL};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct in_addr" (struct) "struct" (type_identifier) "in_addr" (init_declarator) "* _out_host_vector[2] = {NULL, NULL}" (pointer_declarator) "* _out_host_vector[2]" (*) "*" (array_declarator) "_out_host_vector[2]" (identifier) "_out_host_vector" ([) "[" (number_literal) "2" (]) "]" (=) "=" (initializer_list) "{NULL, NULL}" ({) "{" (null) "NULL" (NULL) "NULL" (,) "," (null) "NULL" (NULL) "NULL" (}) "}" (;) ";" (declaration) "static struct in_addr * _out_host_aliases[1] = {NULL};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct in_addr" (struct) "struct" (type_identifier) "in_addr" (init_declarator) "* _out_host_aliases[1] = {NULL}" (pointer_declarator) "* _out_host_aliases[1]" (*) "*" (array_declarator) "_out_host_aliases[1]" (identifier) "_out_host_aliases" ([) "[" (number_literal) "1" (]) "]" (=) "=" (initializer_list) "{NULL}" ({) "{" (null) "NULL" (NULL) "NULL" (}) "}" (;) ";" (declaration) "static uint32_t _out_addr;" (storage_class_specifier) "static" (static) "static" (primitive_type) "uint32_t" (identifier) "_out_addr" (;) ";" (preproc_def) "#define UNIMPLEMENTED fprintf(stderr, "[libnetwork] Unimplemented: %s\n", __FUNCTION__)\n" (#define) "#define" (identifier) "UNIMPLEMENTED" (preproc_arg) "fprintf(stderr, "[libnetwork] Unimplemented: %s\n", __FUNCTION__)" (function_definition) "struct hostent * gethostbyname(const char * name) {\n if (_out_host.h_name) free(_out_host.h_name);\n _out_host.h_name = strdup(name);\n int fd = open("/dev/net",O_RDONLY);\n void * args[2] = {(void *)name,&_out_addr};\n int ret = ioctl(fd, 0x5000, args);\n close(fd);\n if (ret) return NULL;\n\n _out_host_vector[0] = (struct in_addr *)&_out_addr;\n _out_host.h_aliases = (char **)&_out_host_aliases;\n _out_host.h_addrtype = AF_INET;\n _out_host.h_addr_list = (char**)_out_host_vector;\n _out_host.h_length = sizeof(uint32_t);\n return &_out_host;\n}" (struct_specifier) "struct hostent" (struct) "struct" (type_identifier) "hostent" (pointer_declarator) "* gethostbyname(const char * name)" (*) "*" (function_declarator) "gethostbyname(const char * name)" (identifier) "gethostbyname" (parameter_list) "(const char * name)" (() "(" (parameter_declaration) "const char * name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (compound_statement) "{\n if (_out_host.h_name) free(_out_host.h_name);\n _out_host.h_name = strdup(name);\n int fd = open("/dev/net",O_RDONLY);\n void * args[2] = {(void *)name,&_out_addr};\n int ret = ioctl(fd, 0x5000, args);\n close(fd);\n if (ret) return NULL;\n\n _out_host_vector[0] = (struct in_addr *)&_out_addr;\n _out_host.h_aliases = (char **)&_out_host_aliases;\n _out_host.h_addrtype = AF_INET;\n _out_host.h_addr_list = (char**)_out_host_vector;\n _out_host.h_length = sizeof(uint32_t);\n return &_out_host;\n}" ({) "{" (if_statement) "if (_out_host.h_name) free(_out_host.h_name);" (if) "if" (parenthesized_expression) "(_out_host.h_name)" (() "(" (field_expression) "_out_host.h_name" (identifier) "_out_host" (.) "." (field_identifier) "h_name" ()) ")" (expression_statement) "free(_out_host.h_name);" (call_expression) "free(_out_host.h_name)" (identifier) "free" (argument_list) "(_out_host.h_name)" (() "(" (field_expression) "_out_host.h_name" (identifier) "_out_host" (.) "." (field_identifier) "h_name" ()) ")" (;) ";" (expression_statement) "_out_host.h_name = strdup(name);" (assignment_expression) "_out_host.h_name = strdup(name)" (field_expression) "_out_host.h_name" (identifier) "_out_host" (.) "." (field_identifier) "h_name" (=) "=" (call_expression) "strdup(name)" (identifier) "strdup" (argument_list) "(name)" (() "(" (identifier) "name" ()) ")" (;) ";" (declaration) "int fd = open("/dev/net",O_RDONLY);" (primitive_type) "int" (init_declarator) "fd = open("/dev/net",O_RDONLY)" (identifier) "fd" (=) "=" (call_expression) "open("/dev/net",O_RDONLY)" (identifier) "open" (argument_list) "("/dev/net",O_RDONLY)" (() "(" (string_literal) ""/dev/net"" (") """ (string_content) "/dev/net" (") """ (,) "," (identifier) "O_RDONLY" ()) ")" (;) ";" (declaration) "void * args[2] = {(void *)name,&_out_addr};" (primitive_type) "void" (init_declarator) "* args[2] = {(void *)name,&_out_addr}" (pointer_declarator) "* args[2]" (*) "*" (array_declarator) "args[2]" (identifier) "args" ([) "[" (number_literal) "2" (]) "]" (=) "=" (initializer_list) "{(void *)name,&_out_addr}" ({) "{" (cast_expression) "(void *)name" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "name" (,) "," (pointer_expression) "&_out_addr" (&) "&" (identifier) "_out_addr" (}) "}" (;) ";" (declaration) "int ret = ioctl(fd, 0x5000, args);" (primitive_type) "int" (init_declarator) "ret = ioctl(fd, 0x5000, args)" (identifier) "ret" (=) "=" (call_expression) "ioctl(fd, 0x5000, args)" (identifier) "ioctl" (argument_list) "(fd, 0x5000, args)" (() "(" (identifier) "fd" (,) "," (number_literal) "0x5000" (,) "," (identifier) "args" ()) ")" (;) ";" (expression_statement) "close(fd);" (call_expression) "close(fd)" (identifier) "close" (argument_list) "(fd)" (() "(" (identifier) "fd" ()) ")" (;) ";" (if_statement) "if (ret) return NULL;" (if) "if" (parenthesized_expression) "(ret)" (() "(" (identifier) "ret" ()) ")" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "_out_host_vector[0] = (struct in_addr *)&_out_addr;" (assignment_expression) "_out_host_vector[0] = (struct in_addr *)&_out_addr" (subscript_expression) "_out_host_vector[0]" (identifier) "_out_host_vector" ([) "[" (number_literal) "0" (]) "]" (=) "=" (cast_expression) "(struct in_addr *)&_out_addr" (() "(" (type_descriptor) "struct in_addr *" (struct_specifier) "struct in_addr" (struct) "struct" (type_identifier) "in_addr" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&_out_addr" (&) "&" (identifier) "_out_addr" (;) ";" (expression_statement) "_out_host.h_aliases = (char **)&_out_host_aliases;" (assignment_expression) "_out_host.h_aliases = (char **)&_out_host_aliases" (field_expression) "_out_host.h_aliases" (identifier) "_out_host" (.) "." (field_identifier) "h_aliases" (=) "=" (cast_expression) "(char **)&_out_host_aliases" (() "(" (type_descriptor) "char **" (primitive_type) "char" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&_out_host_aliases" (&) "&" (identifier) "_out_host_aliases" (;) ";" (expression_statement) "_out_host.h_addrtype = AF_INET;" (assignment_expression) "_out_host.h_addrtype = AF_INET" (field_expression) "_out_host.h_addrtype" (identifier) "_out_host" (.) "." (field_identifier) "h_addrtype" (=) "=" (identifier) "AF_INET" (;) ";" (expression_statement) "_out_host.h_addr_list = (char**)_out_host_vector;" (assignment_expression) "_out_host.h_addr_list = (char**)_out_host_vector" (field_expression) "_out_host.h_addr_list" (identifier) "_out_host" (.) "." (field_identifier) "h_addr_list" (=) "=" (cast_expression) "(char**)_out_host_vector" (() "(" (type_descriptor) "char**" (primitive_type) "char" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "_out_host_vector" (;) ";" (expression_statement) "_out_host.h_length = sizeof(uint32_t);" (assignment_expression) "_out_host.h_length = sizeof(uint32_t)" (field_expression) "_out_host.h_length" (identifier) "_out_host" (.) "." (field_identifier) "h_length" (=) "=" (sizeof_expression) "sizeof(uint32_t)" (sizeof) "sizeof" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (;) ";" (return_statement) "return &_out_host;" (return) "return" (pointer_expression) "&_out_host" (&) "&" (identifier) "_out_host" (;) ";" (}) "}" (function_definition) "int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)" (identifier) "connect" (parameter_list) "(int sockfd, const struct sockaddr *addr, socklen_t addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "const struct sockaddr *addr" (type_qualifier) "const" (const) "const" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "socklen_t addrlen" (type_identifier) "socklen_t" (identifier) "addrlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (comment) "/* All of these should just be reads. */" (function_definition) "ssize_t recv(int sockfd, void *buf, size_t len, int flags) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "ssize_t" (function_declarator) "recv(int sockfd, void *buf, size_t len, int flags)" (identifier) "recv" (parameter_list) "(int sockfd, void *buf, size_t len, int flags)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "void *buf" (primitive_type) "void" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "ssize_t" (function_declarator) "recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)" (identifier) "recvfrom" (parameter_list) "(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "void *buf" (primitive_type) "void" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" (,) "," (parameter_declaration) "struct sockaddr *src_addr" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "*src_addr" (*) "*" (identifier) "src_addr" (,) "," (parameter_declaration) "socklen_t *addrlen" (type_identifier) "socklen_t" (pointer_declarator) "*addrlen" (*) "*" (identifier) "addrlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "ssize_t" (function_declarator) "recvmsg(int sockfd, struct msghdr *msg, int flags)" (identifier) "recvmsg" (parameter_list) "(int sockfd, struct msghdr *msg, int flags)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "struct msghdr *msg" (struct_specifier) "struct msghdr" (struct) "struct" (type_identifier) "msghdr" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "ssize_t send(int sockfd, const void *buf, size_t len, int flags) {\n UNIMPLEMENTED;\n return len;\n}" (primitive_type) "ssize_t" (function_declarator) "send(int sockfd, const void *buf, size_t len, int flags)" (identifier) "send" (parameter_list) "(int sockfd, const void *buf, size_t len, int flags)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "const void *buf" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return len;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return len;" (return) "return" (identifier) "len" (;) ";" (}) "}" (function_definition) "ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) {\n UNIMPLEMENTED;\n return len;\n}" (primitive_type) "ssize_t" (function_declarator) "sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)" (identifier) "sendto" (parameter_list) "(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "const void *buf" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "size_t len" (primitive_type) "size_t" (identifier) "len" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" (,) "," (parameter_declaration) "const struct sockaddr *dest_addr" (type_qualifier) "const" (const) "const" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "*dest_addr" (*) "*" (identifier) "dest_addr" (,) "," (parameter_declaration) "socklen_t addrlen" (type_identifier) "socklen_t" (identifier) "addrlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return len;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return len;" (return) "return" (identifier) "len" (;) ";" (}) "}" (function_definition) "ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "ssize_t" (function_declarator) "sendmsg(int sockfd, const struct msghdr *msg, int flags)" (identifier) "sendmsg" (parameter_list) "(int sockfd, const struct msghdr *msg, int flags)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "const struct msghdr *msg" (type_qualifier) "const" (const) "const" (struct_specifier) "struct msghdr" (struct) "struct" (type_identifier) "msghdr" (pointer_declarator) "*msg" (*) "*" (identifier) "msg" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int socket(int domain, int type, int protocol) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "socket(int domain, int type, int protocol)" (identifier) "socket" (parameter_list) "(int domain, int type, int protocol)" (() "(" (parameter_declaration) "int domain" (primitive_type) "int" (identifier) "domain" (,) "," (parameter_declaration) "int type" (primitive_type) "int" (identifier) "type" (,) "," (parameter_declaration) "int protocol" (primitive_type) "int" (identifier) "protocol" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "uint32_t htonl(uint32_t hostlong) {\n return ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));\n}" (primitive_type) "uint32_t" (function_declarator) "htonl(uint32_t hostlong)" (identifier) "htonl" (parameter_list) "(uint32_t hostlong)" (() "(" (parameter_declaration) "uint32_t hostlong" (primitive_type) "uint32_t" (identifier) "hostlong" ()) ")" (compound_statement) "{\n return ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));\n}" ({) "{" (return_statement) "return ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));" (return) "return" (parenthesized_expression) "( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24))" (() "(" (binary_expression) "(((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24)" (binary_expression) "(((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8)" (binary_expression) "(((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8)" (parenthesized_expression) "(((hostlong) & 0xFF) << 24)" (() "(" (binary_expression) "((hostlong) & 0xFF) << 24" (parenthesized_expression) "((hostlong) & 0xFF)" (() "(" (binary_expression) "(hostlong) & 0xFF" (parenthesized_expression) "(hostlong)" (() "(" (identifier) "hostlong" ()) ")" (&) "&" (number_literal) "0xFF" ()) ")" (<<) "<<" (number_literal) "24" ()) ")" (|) "|" (parenthesized_expression) "(((hostlong) & 0xFF00) << 8)" (() "(" (binary_expression) "((hostlong) & 0xFF00) << 8" (parenthesized_expression) "((hostlong) & 0xFF00)" (() "(" (binary_expression) "(hostlong) & 0xFF00" (parenthesized_expression) "(hostlong)" (() "(" (identifier) "hostlong" ()) ")" (&) "&" (number_literal) "0xFF00" ()) ")" (<<) "<<" (number_literal) "8" ()) ")" (|) "|" (parenthesized_expression) "(((hostlong) & 0xFF0000) >> 8)" (() "(" (binary_expression) "((hostlong) & 0xFF0000) >> 8" (parenthesized_expression) "((hostlong) & 0xFF0000)" (() "(" (binary_expression) "(hostlong) & 0xFF0000" (parenthesized_expression) "(hostlong)" (() "(" (identifier) "hostlong" ()) ")" (&) "&" (number_literal) "0xFF0000" ()) ")" (>>) ">>" (number_literal) "8" ()) ")" (|) "|" (parenthesized_expression) "(((hostlong) & 0xFF000000) >> 24)" (() "(" (binary_expression) "((hostlong) & 0xFF000000) >> 24" (parenthesized_expression) "((hostlong) & 0xFF000000)" (() "(" (binary_expression) "(hostlong) & 0xFF000000" (parenthesized_expression) "(hostlong)" (() "(" (identifier) "hostlong" ()) ")" (&) "&" (number_literal) "0xFF000000" ()) ")" (>>) ">>" (number_literal) "24" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "uint16_t htons(uint16_t hostshort) {\n return ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );\n}" (primitive_type) "uint16_t" (function_declarator) "htons(uint16_t hostshort)" (identifier) "htons" (parameter_list) "(uint16_t hostshort)" (() "(" (parameter_declaration) "uint16_t hostshort" (primitive_type) "uint16_t" (identifier) "hostshort" ()) ")" (compound_statement) "{\n return ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );\n}" ({) "{" (return_statement) "return ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );" (return) "return" (parenthesized_expression) "( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) )" (() "(" (binary_expression) "(((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8)" (parenthesized_expression) "(((hostshort) & 0xFF) << 8)" (() "(" (binary_expression) "((hostshort) & 0xFF) << 8" (parenthesized_expression) "((hostshort) & 0xFF)" (() "(" (binary_expression) "(hostshort) & 0xFF" (parenthesized_expression) "(hostshort)" (() "(" (identifier) "hostshort" ()) ")" (&) "&" (number_literal) "0xFF" ()) ")" (<<) "<<" (number_literal) "8" ()) ")" (|) "|" (parenthesized_expression) "(((hostshort) & 0xFF00) >> 8)" (() "(" (binary_expression) "((hostshort) & 0xFF00) >> 8" (parenthesized_expression) "((hostshort) & 0xFF00)" (() "(" (binary_expression) "(hostshort) & 0xFF00" (parenthesized_expression) "(hostshort)" (() "(" (identifier) "hostshort" ()) ")" (&) "&" (number_literal) "0xFF00" ()) ")" (>>) ">>" (number_literal) "8" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "uint32_t ntohl(uint32_t netlong) {\n return htonl(netlong);\n}" (primitive_type) "uint32_t" (function_declarator) "ntohl(uint32_t netlong)" (identifier) "ntohl" (parameter_list) "(uint32_t netlong)" (() "(" (parameter_declaration) "uint32_t netlong" (primitive_type) "uint32_t" (identifier) "netlong" ()) ")" (compound_statement) "{\n return htonl(netlong);\n}" ({) "{" (return_statement) "return htonl(netlong);" (return) "return" (call_expression) "htonl(netlong)" (identifier) "htonl" (argument_list) "(netlong)" (() "(" (identifier) "netlong" ()) ")" (;) ";" (}) "}" (function_definition) "uint16_t ntohs(uint16_t netshort) {\n return htons(netshort);\n}" (primitive_type) "uint16_t" (function_declarator) "ntohs(uint16_t netshort)" (identifier) "ntohs" (parameter_list) "(uint16_t netshort)" (() "(" (parameter_declaration) "uint16_t netshort" (primitive_type) "uint16_t" (identifier) "netshort" ()) ")" (compound_statement) "{\n return htons(netshort);\n}" ({) "{" (return_statement) "return htons(netshort);" (return) "return" (call_expression) "htons(netshort)" (identifier) "htons" (argument_list) "(netshort)" (() "(" (identifier) "netshort" ()) ")" (;) ";" (}) "}" (function_definition) "int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)" (identifier) "bind" (parameter_list) "(int sockfd, const struct sockaddr *addr, socklen_t addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "const struct sockaddr *addr" (type_qualifier) "const" (const) "const" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "socklen_t addrlen" (type_identifier) "socklen_t" (identifier) "addrlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen)" (identifier) "accept" (parameter_list) "(int sockfd, struct sockaddr * addr, socklen_t * addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "struct sockaddr * addr" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "* addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "socklen_t * addrlen" (type_identifier) "socklen_t" (pointer_declarator) "* addrlen" (*) "*" (identifier) "addrlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int listen(int sockfd, int backlog) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "listen(int sockfd, int backlog)" (identifier) "listen" (parameter_list) "(int sockfd, int backlog)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "int backlog" (primitive_type) "int" (identifier) "backlog" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen)" (identifier) "getsockname" (parameter_list) "(int sockfd, struct sockaddr *addr, socklen_t *addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "struct sockaddr *addr" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "socklen_t *addrlen" (type_identifier) "socklen_t" (pointer_declarator) "*addrlen" (*) "*" (identifier) "addrlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n return -1;\n}" (primitive_type) "int" (function_declarator) "getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen)" (identifier) "getpeername" (parameter_list) "(int sockfd, struct sockaddr *addr, socklen_t *addrlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "struct sockaddr *addr" (struct_specifier) "struct sockaddr" (struct) "struct" (type_identifier) "sockaddr" (pointer_declarator) "*addr" (*) "*" (identifier) "addr" (,) "," (parameter_declaration) "socklen_t *addrlen" (type_identifier) "socklen_t" (pointer_declarator) "*addrlen" (*) "*" (identifier) "addrlen" ()) ")" (compound_statement) "{\n return -1;\n}" ({) "{" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)" (identifier) "getsockopt" (parameter_list) "(int sockfd, int level, int optname, void *optval, socklen_t *optlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "int level" (primitive_type) "int" (identifier) "level" (,) "," (parameter_declaration) "int optname" (primitive_type) "int" (identifier) "optname" (,) "," (parameter_declaration) "void *optval" (primitive_type) "void" (pointer_declarator) "*optval" (*) "*" (identifier) "optval" (,) "," (parameter_declaration) "socklen_t *optlen" (type_identifier) "socklen_t" (pointer_declarator) "*optlen" (*) "*" (identifier) "optlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) {\n UNIMPLEMENTED;\n return -1;\n}" (primitive_type) "int" (function_declarator) "setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)" (identifier) "setsockopt" (parameter_list) "(int sockfd, int level, int optname, const void *optval, socklen_t optlen)" (() "(" (parameter_declaration) "int sockfd" (primitive_type) "int" (identifier) "sockfd" (,) "," (parameter_declaration) "int level" (primitive_type) "int" (identifier) "level" (,) "," (parameter_declaration) "int optname" (primitive_type) "int" (identifier) "optname" (,) "," (parameter_declaration) "const void *optval" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*optval" (*) "*" (identifier) "optval" (,) "," (parameter_declaration) "socklen_t optlen" (type_identifier) "socklen_t" (identifier) "optlen" ()) ")" (compound_statement) "{\n UNIMPLEMENTED;\n return -1;\n}" ({) "{" (expression_statement) "UNIMPLEMENTED;" (identifier) "UNIMPLEMENTED" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}"
1,040
0
{"language": "c", "success": true, "metadata": {"lines": 105, "avg_line_length": 28.04, "nodes": 663, "errors": 0, "source_hash": "236de81df937644f9430a5e8525b8fe55fb5b7d1f61590d22ca94a6dda9ba29e", "categorized_nodes": 457}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdint.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": "<stdint.h>", "parent": 3, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <stdlib.h>\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": "<stdlib.h>", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<string.h>", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <fcntl.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": "system_lib_string", "text": "<fcntl.h>", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <unistd.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": "system_lib_string", "text": "<unistd.h>", "parent": 15, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include <sys/ioctl.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<sys/ioctl.h>", "parent": 18, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include <sys/types.h>\n", "parent": null, "children": [22, 23], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<sys/types.h>", "parent": 21, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 22}}, {"id": 24, "type": "preproc_include", "text": "#include <sys/socket.h>\n", "parent": null, "children": [25, 26], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<sys/socket.h>", "parent": 24, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 27, "type": "declaration", "text": "static struct hostent _out_host = {0};", "parent": null, "children": [28, 31], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 38}}, {"id": 28, "type": "struct_specifier", "text": "struct hostent", "parent": 27, "children": [29, 30], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 21}}, {"id": 29, "type": "struct", "text": "struct", "parent": 28, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 13}}, {"id": 30, "type": "type_identifier", "text": "hostent", "parent": 28, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 21}}, {"id": 31, "type": "init_declarator", "text": "_out_host = {0}", "parent": 27, "children": [32, 33, 34], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 37}}, {"id": 32, "type": "identifier", "text": "_out_host", "parent": 31, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 31}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 33}}, {"id": 34, "type": "initializer_list", "text": "{0}", "parent": 31, "children": [35], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 37}}, {"id": 35, "type": "number_literal", "text": "0", "parent": 34, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 36}}, {"id": 36, "type": "declaration", "text": "static struct in_addr * _out_host_vector[2] = {NULL, NULL};", "parent": null, "children": [37, 40], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 59}}, {"id": 37, "type": "struct_specifier", "text": "struct in_addr", "parent": 36, "children": [38, 39], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 21}}, {"id": 38, "type": "struct", "text": "struct", "parent": 37, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 13}}, {"id": 39, "type": "type_identifier", "text": "in_addr", "parent": 37, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 21}}, {"id": 40, "type": "init_declarator", "text": "* _out_host_vector[2] = {NULL, NULL}", "parent": 36, "children": [41, 46, 47], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 58}}, {"id": 41, "type": "pointer_declarator", "text": "* _out_host_vector[2]", "parent": 40, "children": [42, 43], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 43}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 23}}, {"id": 43, "type": "array_declarator", "text": "_out_host_vector[2]", "parent": 41, "children": [44, 45], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 43}}, {"id": 44, "type": "identifier", "text": "_out_host_vector", "parent": 43, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 40}}, {"id": 45, "type": "number_literal", "text": "2", "parent": 43, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 42}}, {"id": 46, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 15, "column": 44}, "end_point": {"row": 15, "column": 45}}, {"id": 47, "type": "initializer_list", "text": "{NULL, NULL}", "parent": 40, "children": [48, 50], "start_point": {"row": 15, "column": 46}, "end_point": {"row": 15, "column": 58}}, {"id": 48, "type": "null", "text": "NULL", "parent": 47, "children": [49], "start_point": {"row": 15, "column": 47}, "end_point": {"row": 15, "column": 51}}, {"id": 49, "type": "NULL", "text": "NULL", "parent": 48, "children": [], "start_point": {"row": 15, "column": 47}, "end_point": {"row": 15, "column": 51}}, {"id": 50, "type": "null", "text": "NULL", "parent": 47, "children": [51], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 57}}, {"id": 51, "type": "NULL", "text": "NULL", "parent": 50, "children": [], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 57}}, {"id": 52, "type": "declaration", "text": "static struct in_addr * _out_host_aliases[1] = {NULL};", "parent": null, "children": [53, 56], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 54}}, {"id": 53, "type": "struct_specifier", "text": "struct in_addr", "parent": 52, "children": [54, 55], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 21}}, {"id": 54, "type": "struct", "text": "struct", "parent": 53, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 13}}, {"id": 55, "type": "type_identifier", "text": "in_addr", "parent": 53, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 21}}, {"id": 56, "type": "init_declarator", "text": "* _out_host_aliases[1] = {NULL}", "parent": 52, "children": [57, 62, 63], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 53}}, {"id": 57, "type": "pointer_declarator", "text": "* _out_host_aliases[1]", "parent": 56, "children": [58, 59], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 44}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 23}}, {"id": 59, "type": "array_declarator", "text": "_out_host_aliases[1]", "parent": 57, "children": [60, 61], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 44}}, {"id": 60, "type": "identifier", "text": "_out_host_aliases", "parent": 59, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 41}}, {"id": 61, "type": "number_literal", "text": "1", "parent": 59, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 43}}, {"id": 62, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 16, "column": 45}, "end_point": {"row": 16, "column": 46}}, {"id": 63, "type": "initializer_list", "text": "{NULL}", "parent": 56, "children": [64], "start_point": {"row": 16, "column": 47}, "end_point": {"row": 16, "column": 53}}, {"id": 64, "type": "null", "text": "NULL", "parent": 63, "children": [65], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 52}}, {"id": 65, "type": "NULL", "text": "NULL", "parent": 64, "children": [], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 52}}, {"id": 66, "type": "declaration", "text": "static uint32_t _out_addr;", "parent": null, "children": [67, 68], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 26}}, {"id": 67, "type": "primitive_type", "text": "uint32_t", "parent": 66, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 15}}, {"id": 68, "type": "identifier", "text": "_out_addr", "parent": 66, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 25}}, {"id": 69, "type": "preproc_def", "text": "#define UNIMPLEMENTED fprintf(stderr, \"[libnetwork] Unimplemented: %s\\n\", __FUNCTION__)\n", "parent": null, "children": [70, 71, 72], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 70, "type": "#define", "text": "#define", "parent": 69, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 71, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 69, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 21}}, {"id": 72, "type": "preproc_arg", "text": "fprintf(stderr, \"[libnetwork] Unimplemented: %s\\n\", __FUNCTION__)", "parent": 69, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 87}}, {"id": 73, "type": "function_definition", "text": "struct hostent * gethostbyname(const char * name) {\n\tif (_out_host.h_name) free(_out_host.h_name);\n\t_out_host.h_name = strdup(name);\n\tint fd = open(\"/dev/net\",O_RDONLY);\n\tvoid * args[2] = {(void *)name,&_out_addr};\n\tint ret = ioctl(fd, 0x5000, args);\n\tclose(fd);\n\tif (ret) return NULL;\n\n\t_out_host_vector[0] = (struct in_addr *)&_out_addr;\n\t_out_host.h_aliases = (char **)&_out_host_aliases;\n\t_out_host.h_addrtype = AF_INET;\n\t_out_host.h_addr_list = (char**)_out_host_vector;\n\t_out_host.h_length = sizeof(uint32_t);\n\treturn &_out_host;\n}", "parent": null, "children": [74, 77], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 74, "type": "struct_specifier", "text": "struct hostent", "parent": 73, "children": [75, 76], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 14}}, {"id": 75, "type": "struct", "text": "struct", "parent": 74, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 76, "type": "type_identifier", "text": "hostent", "parent": 74, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 14}}, {"id": 77, "type": "pointer_declarator", "text": "* gethostbyname(const char * name)", "parent": 73, "children": [78, 79], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 49}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 79, "type": "function_declarator", "text": "gethostbyname(const char * name)", "parent": 77, "children": [80, 81], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 49}}, {"id": 80, "type": "identifier", "text": "gethostbyname", "parent": 79, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 30}}, {"id": 81, "type": "parameter_list", "text": "(const char * name)", "parent": 79, "children": [82], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 49}}, {"id": 82, "type": "parameter_declaration", "text": "const char * name", "parent": 81, "children": [83, 84], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 48}}, {"id": 83, "type": "primitive_type", "text": "char", "parent": 82, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 41}}, {"id": 84, "type": "pointer_declarator", "text": "* name", "parent": 82, "children": [85, 86], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 48}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 43}}, {"id": 86, "type": "identifier", "text": "name", "parent": 84, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 48}}, {"id": 87, "type": "if_statement", "text": "if (_out_host.h_name) free(_out_host.h_name);", "parent": 73, "children": [88], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 46}}, {"id": 88, "type": "parenthesized_expression", "text": "(_out_host.h_name)", "parent": 87, "children": [89], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 22}}, {"id": 89, "type": "field_expression", "text": "_out_host.h_name", "parent": 88, "children": [90, 91], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 21}}, {"id": 90, "type": "identifier", "text": "_out_host", "parent": 89, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 14}}, {"id": 91, "type": "field_identifier", "text": "h_name", "parent": 89, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 21}}, {"id": 92, "type": "call_expression", "text": "free(_out_host.h_name)", "parent": 87, "children": [93, 94], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 45}}, {"id": 93, "type": "identifier", "text": "free", "parent": 92, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 27}}, {"id": 94, "type": "argument_list", "text": "(_out_host.h_name)", "parent": 92, "children": [95], "start_point": {"row": 22, "column": 27}, "end_point": {"row": 22, "column": 45}}, {"id": 95, "type": "field_expression", "text": "_out_host.h_name", "parent": 94, "children": [96, 97], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 44}}, {"id": 96, "type": "identifier", "text": "_out_host", "parent": 95, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 37}}, {"id": 97, "type": "field_identifier", "text": "h_name", "parent": 95, "children": [], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 44}}, {"id": 98, "type": "assignment_expression", "text": "_out_host.h_name = strdup(name)", "parent": 73, "children": [99, 102, 103], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 32}}, {"id": 99, "type": "field_expression", "text": "_out_host.h_name", "parent": 98, "children": [100, 101], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 17}}, {"id": 100, "type": "identifier", "text": "_out_host", "parent": 99, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 10}}, {"id": 101, "type": "field_identifier", "text": "h_name", "parent": 99, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 17}}, {"id": 102, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 19}}, {"id": 103, "type": "call_expression", "text": "strdup(name)", "parent": 98, "children": [104, 105], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 32}}, {"id": 104, "type": "identifier", "text": "strdup", "parent": 103, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 26}}, {"id": 105, "type": "argument_list", "text": "(name)", "parent": 103, "children": [106], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 32}}, {"id": 106, "type": "identifier", "text": "name", "parent": 105, "children": [], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 31}}, {"id": 107, "type": "declaration", "text": "int fd = open(\"/dev/net\",O_RDONLY);", "parent": 73, "children": [108, 109], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 36}}, {"id": 108, "type": "primitive_type", "text": "int", "parent": 107, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}, {"id": 109, "type": "init_declarator", "text": "fd = open(\"/dev/net\",O_RDONLY)", "parent": 107, "children": [110, 111, 112], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 35}}, {"id": 110, "type": "identifier", "text": "fd", "parent": 109, "children": [], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 7}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 9}}, {"id": 112, "type": "call_expression", "text": "open(\"/dev/net\",O_RDONLY)", "parent": 109, "children": [113, 114], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 35}}, {"id": 113, "type": "identifier", "text": "open", "parent": 112, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 14}}, {"id": 114, "type": "argument_list", "text": "(\"/dev/net\",O_RDONLY)", "parent": 112, "children": [115, 116], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 35}}, {"id": 115, "type": "string_literal", "text": "\"/dev/net\"", "parent": 114, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 25}}, {"id": 116, "type": "identifier", "text": "O_RDONLY", "parent": 114, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 34}}, {"id": 117, "type": "declaration", "text": "void * args[2] = {(void *)name,&_out_addr};", "parent": 73, "children": [118, 119], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 44}}, {"id": 118, "type": "primitive_type", "text": "void", "parent": 117, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 5}}, {"id": 119, "type": "init_declarator", "text": "* args[2] = {(void *)name,&_out_addr}", "parent": 117, "children": [120, 125, 126], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 43}}, {"id": 120, "type": "pointer_declarator", "text": "* args[2]", "parent": 119, "children": [121, 122], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 15}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 7}}, {"id": 122, "type": "array_declarator", "text": "args[2]", "parent": 120, "children": [123, 124], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 15}}, {"id": 123, "type": "identifier", "text": "args", "parent": 122, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 12}}, {"id": 124, "type": "number_literal", "text": "2", "parent": 122, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 14}}, {"id": 125, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 17}}, {"id": 126, "type": "initializer_list", "text": "{(void *)name,&_out_addr}", "parent": 119, "children": [127, 133], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 43}}, {"id": 127, "type": "cast_expression", "text": "(void *)name", "parent": 126, "children": [128, 132], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 31}}, {"id": 128, "type": "type_descriptor", "text": "void *", "parent": 127, "children": [129, 130], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 26}}, {"id": 129, "type": "primitive_type", "text": "void", "parent": 128, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 24}}, {"id": 130, "type": "abstract_pointer_declarator", "text": "*", "parent": 128, "children": [131], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 26}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 26}}, {"id": 132, "type": "identifier", "text": "name", "parent": 127, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 31}}, {"id": 133, "type": "pointer_expression", "text": "&_out_addr", "parent": 126, "children": [134], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 42}}, {"id": 134, "type": "identifier", "text": "_out_addr", "parent": 133, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 42}}, {"id": 135, "type": "declaration", "text": "int ret = ioctl(fd, 0x5000, args);", "parent": 73, "children": [136, 137], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 35}}, {"id": 136, "type": "primitive_type", "text": "int", "parent": 135, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 4}}, {"id": 137, "type": "init_declarator", "text": "ret = ioctl(fd, 0x5000, args)", "parent": 135, "children": [138, 139, 140], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 34}}, {"id": 138, "type": "identifier", "text": "ret", "parent": 137, "children": [], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 8}}, {"id": 139, "type": "=", "text": "=", "parent": 137, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 10}}, {"id": 140, "type": "call_expression", "text": "ioctl(fd, 0x5000, args)", "parent": 137, "children": [141, 142], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 34}}, {"id": 141, "type": "identifier", "text": "ioctl", "parent": 140, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 16}}, {"id": 142, "type": "argument_list", "text": "(fd, 0x5000, args)", "parent": 140, "children": [143, 144, 145], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 34}}, {"id": 143, "type": "identifier", "text": "fd", "parent": 142, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 19}}, {"id": 144, "type": "number_literal", "text": "0x5000", "parent": 142, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 27}}, {"id": 145, "type": "identifier", "text": "args", "parent": 142, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 33}}, {"id": 146, "type": "call_expression", "text": "close(fd)", "parent": 73, "children": [147, 148], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 10}}, {"id": 147, "type": "identifier", "text": "close", "parent": 146, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 6}}, {"id": 148, "type": "argument_list", "text": "(fd)", "parent": 146, "children": [149], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 10}}, {"id": 149, "type": "identifier", "text": "fd", "parent": 148, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 9}}, {"id": 150, "type": "if_statement", "text": "if (ret) return NULL;", "parent": 73, "children": [151, 153], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 22}}, {"id": 151, "type": "parenthesized_expression", "text": "(ret)", "parent": 150, "children": [152], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 9}}, {"id": 152, "type": "identifier", "text": "ret", "parent": 151, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 8}}, {"id": 153, "type": "return_statement", "text": "return NULL;", "parent": 150, "children": [154], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 22}}, {"id": 154, "type": "null", "text": "NULL", "parent": 153, "children": [155], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 21}}, {"id": 155, "type": "NULL", "text": "NULL", "parent": 154, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 21}}, {"id": 156, "type": "assignment_expression", "text": "_out_host_vector[0] = (struct in_addr *)&_out_addr", "parent": 73, "children": [157, 160, 161], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 51}}, {"id": 157, "type": "subscript_expression", "text": "_out_host_vector[0]", "parent": 156, "children": [158, 159], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 20}}, {"id": 158, "type": "identifier", "text": "_out_host_vector", "parent": 157, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 17}}, {"id": 159, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 19}}, {"id": 160, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 22}}, {"id": 161, "type": "cast_expression", "text": "(struct in_addr *)&_out_addr", "parent": 156, "children": [162, 168], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 51}}, {"id": 162, "type": "type_descriptor", "text": "struct in_addr *", "parent": 161, "children": [163, 166], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 40}}, {"id": 163, "type": "struct_specifier", "text": "struct in_addr", "parent": 162, "children": [164, 165], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 38}}, {"id": 164, "type": "struct", "text": "struct", "parent": 163, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 30}}, {"id": 165, "type": "type_identifier", "text": "in_addr", "parent": 163, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 38}}, {"id": 166, "type": "abstract_pointer_declarator", "text": "*", "parent": 162, "children": [167], "start_point": {"row": 30, "column": 39}, "end_point": {"row": 30, "column": 40}}, {"id": 167, "type": "*", "text": "*", "parent": 166, "children": [], "start_point": {"row": 30, "column": 39}, "end_point": {"row": 30, "column": 40}}, {"id": 168, "type": "pointer_expression", "text": "&_out_addr", "parent": 161, "children": [169], "start_point": {"row": 30, "column": 41}, "end_point": {"row": 30, "column": 51}}, {"id": 169, "type": "identifier", "text": "_out_addr", "parent": 168, "children": [], "start_point": {"row": 30, "column": 42}, "end_point": {"row": 30, "column": 51}}, {"id": 170, "type": "assignment_expression", "text": "_out_host.h_aliases = (char **)&_out_host_aliases", "parent": 73, "children": [171, 174, 175], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 50}}, {"id": 171, "type": "field_expression", "text": "_out_host.h_aliases", "parent": 170, "children": [172, 173], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 20}}, {"id": 172, "type": "identifier", "text": "_out_host", "parent": 171, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 10}}, {"id": 173, "type": "field_identifier", "text": "h_aliases", "parent": 171, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 20}}, {"id": 174, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 22}}, {"id": 175, "type": "cast_expression", "text": "(char **)&_out_host_aliases", "parent": 170, "children": [176, 182], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 50}}, {"id": 176, "type": "type_descriptor", "text": "char **", "parent": 175, "children": [177, 178], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 31}}, {"id": 177, "type": "primitive_type", "text": "char", "parent": 176, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 28}}, {"id": 178, "type": "abstract_pointer_declarator", "text": "**", "parent": 176, "children": [179, 180], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 31}}, {"id": 179, "type": "*", "text": "*", "parent": 178, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 30}}, {"id": 180, "type": "abstract_pointer_declarator", "text": "*", "parent": 178, "children": [181], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 31}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 31}}, {"id": 182, "type": "pointer_expression", "text": "&_out_host_aliases", "parent": 175, "children": [183], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 50}}, {"id": 183, "type": "identifier", "text": "_out_host_aliases", "parent": 182, "children": [], "start_point": {"row": 31, "column": 33}, "end_point": {"row": 31, "column": 50}}, {"id": 184, "type": "assignment_expression", "text": "_out_host.h_addrtype = AF_INET", "parent": 73, "children": [185, 188, 189], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 31}}, {"id": 185, "type": "field_expression", "text": "_out_host.h_addrtype", "parent": 184, "children": [186, 187], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 21}}, {"id": 186, "type": "identifier", "text": "_out_host", "parent": 185, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 10}}, {"id": 187, "type": "field_identifier", "text": "h_addrtype", "parent": 185, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 21}}, {"id": 188, "type": "=", "text": "=", "parent": 184, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 23}}, {"id": 189, "type": "identifier", "text": "AF_INET", "parent": 184, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 31}}, {"id": 190, "type": "assignment_expression", "text": "_out_host.h_addr_list = (char**)_out_host_vector", "parent": 73, "children": [191, 194, 195], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 49}}, {"id": 191, "type": "field_expression", "text": "_out_host.h_addr_list", "parent": 190, "children": [192, 193], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 22}}, {"id": 192, "type": "identifier", "text": "_out_host", "parent": 191, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 10}}, {"id": 193, "type": "field_identifier", "text": "h_addr_list", "parent": 191, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 22}}, {"id": 194, "type": "=", "text": "=", "parent": 190, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 24}}, {"id": 195, "type": "cast_expression", "text": "(char**)_out_host_vector", "parent": 190, "children": [196, 202], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 49}}, {"id": 196, "type": "type_descriptor", "text": "char**", "parent": 195, "children": [197, 198], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 32}}, {"id": 197, "type": "primitive_type", "text": "char", "parent": 196, "children": [], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 30}}, {"id": 198, "type": "abstract_pointer_declarator", "text": "**", "parent": 196, "children": [199, 200], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 32}}, {"id": 199, "type": "*", "text": "*", "parent": 198, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 31}}, {"id": 200, "type": "abstract_pointer_declarator", "text": "*", "parent": 198, "children": [201], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 32}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 32}}, {"id": 202, "type": "identifier", "text": "_out_host_vector", "parent": 195, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 49}}, {"id": 203, "type": "assignment_expression", "text": "_out_host.h_length = sizeof(uint32_t)", "parent": 73, "children": [204, 207, 208], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 38}}, {"id": 204, "type": "field_expression", "text": "_out_host.h_length", "parent": 203, "children": [205, 206], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 19}}, {"id": 205, "type": "identifier", "text": "_out_host", "parent": 204, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 10}}, {"id": 206, "type": "field_identifier", "text": "h_length", "parent": 204, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 19}}, {"id": 207, "type": "=", "text": "=", "parent": 203, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 21}}, {"id": 208, "type": "sizeof_expression", "text": "sizeof(uint32_t)", "parent": 203, "children": [209], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 38}}, {"id": 209, "type": "type_descriptor", "text": "uint32_t", "parent": 208, "children": [210], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 37}}, {"id": 210, "type": "primitive_type", "text": "uint32_t", "parent": 209, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 37}}, {"id": 211, "type": "return_statement", "text": "return &_out_host;", "parent": 73, "children": [212], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 19}}, {"id": 212, "type": "pointer_expression", "text": "&_out_host", "parent": 211, "children": [213], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 18}}, {"id": 213, "type": "identifier", "text": "_out_host", "parent": 212, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 18}}, {"id": 214, "type": "function_definition", "text": "int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [215, 216], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 215, "type": "primitive_type", "text": "int", "parent": 214, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 3}}, {"id": 216, "type": "function_declarator", "text": "connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)", "parent": 214, "children": [217, 218], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 71}}, {"id": 217, "type": "identifier", "text": "connect", "parent": 216, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 218, "type": "parameter_list", "text": "(int sockfd, const struct sockaddr *addr, socklen_t addrlen)", "parent": 216, "children": [219, 222, 229], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 71}}, {"id": 219, "type": "parameter_declaration", "text": "int sockfd", "parent": 218, "children": [220, 221], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 22}}, {"id": 220, "type": "primitive_type", "text": "int", "parent": 219, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 15}}, {"id": 221, "type": "identifier", "text": "sockfd", "parent": 219, "children": [], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 22}}, {"id": 222, "type": "parameter_declaration", "text": "const struct sockaddr *addr", "parent": 218, "children": [223, 226], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 51}}, {"id": 223, "type": "struct_specifier", "text": "struct sockaddr", "parent": 222, "children": [224, 225], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 45}}, {"id": 224, "type": "struct", "text": "struct", "parent": 223, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 36}}, {"id": 225, "type": "type_identifier", "text": "sockaddr", "parent": 223, "children": [], "start_point": {"row": 38, "column": 37}, "end_point": {"row": 38, "column": 45}}, {"id": 226, "type": "pointer_declarator", "text": "*addr", "parent": 222, "children": [227, 228], "start_point": {"row": 38, "column": 46}, "end_point": {"row": 38, "column": 51}}, {"id": 227, "type": "*", "text": "*", "parent": 226, "children": [], "start_point": {"row": 38, "column": 46}, "end_point": {"row": 38, "column": 47}}, {"id": 228, "type": "identifier", "text": "addr", "parent": 226, "children": [], "start_point": {"row": 38, "column": 47}, "end_point": {"row": 38, "column": 51}}, {"id": 229, "type": "parameter_declaration", "text": "socklen_t addrlen", "parent": 218, "children": [230, 231], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 70}}, {"id": 230, "type": "type_identifier", "text": "socklen_t", "parent": 229, "children": [], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 62}}, {"id": 231, "type": "identifier", "text": "addrlen", "parent": 229, "children": [], "start_point": {"row": 38, "column": 63}, "end_point": {"row": 38, "column": 70}}, {"id": 232, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 214, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 14}}, {"id": 233, "type": "return_statement", "text": "return -1;", "parent": 214, "children": [234], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 11}}, {"id": 234, "type": "number_literal", "text": "-1", "parent": 233, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 10}}, {"id": 235, "type": "function_definition", "text": "ssize_t recv(int sockfd, void *buf, size_t len, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [236, 237], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 236, "type": "primitive_type", "text": "ssize_t", "parent": 235, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 237, "type": "function_declarator", "text": "recv(int sockfd, void *buf, size_t len, int flags)", "parent": 235, "children": [238, 239], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 58}}, {"id": 238, "type": "identifier", "text": "recv", "parent": 237, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 12}}, {"id": 239, "type": "parameter_list", "text": "(int sockfd, void *buf, size_t len, int flags)", "parent": 237, "children": [240, 243, 248, 251], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 58}}, {"id": 240, "type": "parameter_declaration", "text": "int sockfd", "parent": 239, "children": [241, 242], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 23}}, {"id": 241, "type": "primitive_type", "text": "int", "parent": 240, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 16}}, {"id": 242, "type": "identifier", "text": "sockfd", "parent": 240, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 23}}, {"id": 243, "type": "parameter_declaration", "text": "void *buf", "parent": 239, "children": [244, 245], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 34}}, {"id": 244, "type": "primitive_type", "text": "void", "parent": 243, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 29}}, {"id": 245, "type": "pointer_declarator", "text": "*buf", "parent": 243, "children": [246, 247], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 34}}, {"id": 246, "type": "*", "text": "*", "parent": 245, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 31}}, {"id": 247, "type": "identifier", "text": "buf", "parent": 245, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 34}}, {"id": 248, "type": "parameter_declaration", "text": "size_t len", "parent": 239, "children": [249, 250], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 46}}, {"id": 249, "type": "primitive_type", "text": "size_t", "parent": 248, "children": [], "start_point": {"row": 44, "column": 36}, "end_point": {"row": 44, "column": 42}}, {"id": 250, "type": "identifier", "text": "len", "parent": 248, "children": [], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 46}}, {"id": 251, "type": "parameter_declaration", "text": "int flags", "parent": 239, "children": [252, 253], "start_point": {"row": 44, "column": 48}, "end_point": {"row": 44, "column": 57}}, {"id": 252, "type": "primitive_type", "text": "int", "parent": 251, "children": [], "start_point": {"row": 44, "column": 48}, "end_point": {"row": 44, "column": 51}}, {"id": 253, "type": "identifier", "text": "flags", "parent": 251, "children": [], "start_point": {"row": 44, "column": 52}, "end_point": {"row": 44, "column": 57}}, {"id": 254, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 235, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 14}}, {"id": 255, "type": "return_statement", "text": "return -1;", "parent": 235, "children": [256], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 11}}, {"id": 256, "type": "number_literal", "text": "-1", "parent": 255, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 10}}, {"id": 257, "type": "function_definition", "text": "ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [258, 259], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 258, "type": "primitive_type", "text": "ssize_t", "parent": 257, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 259, "type": "function_declarator", "text": "recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)", "parent": 257, "children": [260, 261], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 109}}, {"id": 260, "type": "identifier", "text": "recvfrom", "parent": 259, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 16}}, {"id": 261, "type": "parameter_list", "text": "(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)", "parent": 259, "children": [262, 265, 270, 273, 276, 283], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 109}}, {"id": 262, "type": "parameter_declaration", "text": "int sockfd", "parent": 261, "children": [263, 264], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 27}}, {"id": 263, "type": "primitive_type", "text": "int", "parent": 262, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 20}}, {"id": 264, "type": "identifier", "text": "sockfd", "parent": 262, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 27}}, {"id": 265, "type": "parameter_declaration", "text": "void *buf", "parent": 261, "children": [266, 267], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 38}}, {"id": 266, "type": "primitive_type", "text": "void", "parent": 265, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 33}}, {"id": 267, "type": "pointer_declarator", "text": "*buf", "parent": 265, "children": [268, 269], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 38}}, {"id": 268, "type": "*", "text": "*", "parent": 267, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 35}}, {"id": 269, "type": "identifier", "text": "buf", "parent": 267, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 38}}, {"id": 270, "type": "parameter_declaration", "text": "size_t len", "parent": 261, "children": [271, 272], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 50}}, {"id": 271, "type": "primitive_type", "text": "size_t", "parent": 270, "children": [], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 46}}, {"id": 272, "type": "identifier", "text": "len", "parent": 270, "children": [], "start_point": {"row": 48, "column": 47}, "end_point": {"row": 48, "column": 50}}, {"id": 273, "type": "parameter_declaration", "text": "int flags", "parent": 261, "children": [274, 275], "start_point": {"row": 48, "column": 52}, "end_point": {"row": 48, "column": 61}}, {"id": 274, "type": "primitive_type", "text": "int", "parent": 273, "children": [], "start_point": {"row": 48, "column": 52}, "end_point": {"row": 48, "column": 55}}, {"id": 275, "type": "identifier", "text": "flags", "parent": 273, "children": [], "start_point": {"row": 48, "column": 56}, "end_point": {"row": 48, "column": 61}}, {"id": 276, "type": "parameter_declaration", "text": "struct sockaddr *src_addr", "parent": 261, "children": [277, 280], "start_point": {"row": 48, "column": 63}, "end_point": {"row": 48, "column": 88}}, {"id": 277, "type": "struct_specifier", "text": "struct sockaddr", "parent": 276, "children": [278, 279], "start_point": {"row": 48, "column": 63}, "end_point": {"row": 48, "column": 78}}, {"id": 278, "type": "struct", "text": "struct", "parent": 277, "children": [], "start_point": {"row": 48, "column": 63}, "end_point": {"row": 48, "column": 69}}, {"id": 279, "type": "type_identifier", "text": "sockaddr", "parent": 277, "children": [], "start_point": {"row": 48, "column": 70}, "end_point": {"row": 48, "column": 78}}, {"id": 280, "type": "pointer_declarator", "text": "*src_addr", "parent": 276, "children": [281, 282], "start_point": {"row": 48, "column": 79}, "end_point": {"row": 48, "column": 88}}, {"id": 281, "type": "*", "text": "*", "parent": 280, "children": [], "start_point": {"row": 48, "column": 79}, "end_point": {"row": 48, "column": 80}}, {"id": 282, "type": "identifier", "text": "src_addr", "parent": 280, "children": [], "start_point": {"row": 48, "column": 80}, "end_point": {"row": 48, "column": 88}}, {"id": 283, "type": "parameter_declaration", "text": "socklen_t *addrlen", "parent": 261, "children": [284, 285], "start_point": {"row": 48, "column": 90}, "end_point": {"row": 48, "column": 108}}, {"id": 284, "type": "type_identifier", "text": "socklen_t", "parent": 283, "children": [], "start_point": {"row": 48, "column": 90}, "end_point": {"row": 48, "column": 99}}, {"id": 285, "type": "pointer_declarator", "text": "*addrlen", "parent": 283, "children": [286, 287], "start_point": {"row": 48, "column": 100}, "end_point": {"row": 48, "column": 108}}, {"id": 286, "type": "*", "text": "*", "parent": 285, "children": [], "start_point": {"row": 48, "column": 100}, "end_point": {"row": 48, "column": 101}}, {"id": 287, "type": "identifier", "text": "addrlen", "parent": 285, "children": [], "start_point": {"row": 48, "column": 101}, "end_point": {"row": 48, "column": 108}}, {"id": 288, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 257, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 14}}, {"id": 289, "type": "return_statement", "text": "return -1;", "parent": 257, "children": [290], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 11}}, {"id": 290, "type": "number_literal", "text": "-1", "parent": 289, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 10}}, {"id": 291, "type": "function_definition", "text": "ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [292, 293], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 292, "type": "primitive_type", "text": "ssize_t", "parent": 291, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 7}}, {"id": 293, "type": "function_declarator", "text": "recvmsg(int sockfd, struct msghdr *msg, int flags)", "parent": 291, "children": [294, 295], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 58}}, {"id": 294, "type": "identifier", "text": "recvmsg", "parent": 293, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 15}}, {"id": 295, "type": "parameter_list", "text": "(int sockfd, struct msghdr *msg, int flags)", "parent": 293, "children": [296, 299, 306], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 58}}, {"id": 296, "type": "parameter_declaration", "text": "int sockfd", "parent": 295, "children": [297, 298], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 26}}, {"id": 297, "type": "primitive_type", "text": "int", "parent": 296, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 19}}, {"id": 298, "type": "identifier", "text": "sockfd", "parent": 296, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 26}}, {"id": 299, "type": "parameter_declaration", "text": "struct msghdr *msg", "parent": 295, "children": [300, 303], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 46}}, {"id": 300, "type": "struct_specifier", "text": "struct msghdr", "parent": 299, "children": [301, 302], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 41}}, {"id": 301, "type": "struct", "text": "struct", "parent": 300, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 34}}, {"id": 302, "type": "type_identifier", "text": "msghdr", "parent": 300, "children": [], "start_point": {"row": 52, "column": 35}, "end_point": {"row": 52, "column": 41}}, {"id": 303, "type": "pointer_declarator", "text": "*msg", "parent": 299, "children": [304, 305], "start_point": {"row": 52, "column": 42}, "end_point": {"row": 52, "column": 46}}, {"id": 304, "type": "*", "text": "*", "parent": 303, "children": [], "start_point": {"row": 52, "column": 42}, "end_point": {"row": 52, "column": 43}}, {"id": 305, "type": "identifier", "text": "msg", "parent": 303, "children": [], "start_point": {"row": 52, "column": 43}, "end_point": {"row": 52, "column": 46}}, {"id": 306, "type": "parameter_declaration", "text": "int flags", "parent": 295, "children": [307, 308], "start_point": {"row": 52, "column": 48}, "end_point": {"row": 52, "column": 57}}, {"id": 307, "type": "primitive_type", "text": "int", "parent": 306, "children": [], "start_point": {"row": 52, "column": 48}, "end_point": {"row": 52, "column": 51}}, {"id": 308, "type": "identifier", "text": "flags", "parent": 306, "children": [], "start_point": {"row": 52, "column": 52}, "end_point": {"row": 52, "column": 57}}, {"id": 309, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 291, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 14}}, {"id": 310, "type": "return_statement", "text": "return -1;", "parent": 291, "children": [311], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 11}}, {"id": 311, "type": "number_literal", "text": "-1", "parent": 310, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 10}}, {"id": 312, "type": "function_definition", "text": "ssize_t send(int sockfd, const void *buf, size_t len, int flags) {\n\tUNIMPLEMENTED;\n\treturn len;\n}", "parent": null, "children": [313, 314], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 313, "type": "primitive_type", "text": "ssize_t", "parent": 312, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 7}}, {"id": 314, "type": "function_declarator", "text": "send(int sockfd, const void *buf, size_t len, int flags)", "parent": 312, "children": [315, 316], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 64}}, {"id": 315, "type": "identifier", "text": "send", "parent": 314, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 12}}, {"id": 316, "type": "parameter_list", "text": "(int sockfd, const void *buf, size_t len, int flags)", "parent": 314, "children": [317, 320, 325, 328], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 64}}, {"id": 317, "type": "parameter_declaration", "text": "int sockfd", "parent": 316, "children": [318, 319], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 23}}, {"id": 318, "type": "primitive_type", "text": "int", "parent": 317, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 16}}, {"id": 319, "type": "identifier", "text": "sockfd", "parent": 317, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 23}}, {"id": 320, "type": "parameter_declaration", "text": "const void *buf", "parent": 316, "children": [321, 322], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 40}}, {"id": 321, "type": "primitive_type", "text": "void", "parent": 320, "children": [], "start_point": {"row": 57, "column": 31}, "end_point": {"row": 57, "column": 35}}, {"id": 322, "type": "pointer_declarator", "text": "*buf", "parent": 320, "children": [323, 324], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 40}}, {"id": 323, "type": "*", "text": "*", "parent": 322, "children": [], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 37}}, {"id": 324, "type": "identifier", "text": "buf", "parent": 322, "children": [], "start_point": {"row": 57, "column": 37}, "end_point": {"row": 57, "column": 40}}, {"id": 325, "type": "parameter_declaration", "text": "size_t len", "parent": 316, "children": [326, 327], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 52}}, {"id": 326, "type": "primitive_type", "text": "size_t", "parent": 325, "children": [], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 48}}, {"id": 327, "type": "identifier", "text": "len", "parent": 325, "children": [], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 52}}, {"id": 328, "type": "parameter_declaration", "text": "int flags", "parent": 316, "children": [329, 330], "start_point": {"row": 57, "column": 54}, "end_point": {"row": 57, "column": 63}}, {"id": 329, "type": "primitive_type", "text": "int", "parent": 328, "children": [], "start_point": {"row": 57, "column": 54}, "end_point": {"row": 57, "column": 57}}, {"id": 330, "type": "identifier", "text": "flags", "parent": 328, "children": [], "start_point": {"row": 57, "column": 58}, "end_point": {"row": 57, "column": 63}}, {"id": 331, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 312, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 14}}, {"id": 332, "type": "return_statement", "text": "return len;", "parent": 312, "children": [333], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 12}}, {"id": 333, "type": "identifier", "text": "len", "parent": 332, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 11}}, {"id": 334, "type": "function_definition", "text": "ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn len;\n}", "parent": null, "children": [335, 336], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 335, "type": "primitive_type", "text": "ssize_t", "parent": 334, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 336, "type": "function_declarator", "text": "sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)", "parent": 334, "children": [337, 338], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 119}}, {"id": 337, "type": "identifier", "text": "sendto", "parent": 336, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 14}}, {"id": 338, "type": "parameter_list", "text": "(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)", "parent": 336, "children": [339, 342, 347, 350, 353, 360], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 119}}, {"id": 339, "type": "parameter_declaration", "text": "int sockfd", "parent": 338, "children": [340, 341], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 25}}, {"id": 340, "type": "primitive_type", "text": "int", "parent": 339, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 18}}, {"id": 341, "type": "identifier", "text": "sockfd", "parent": 339, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 25}}, {"id": 342, "type": "parameter_declaration", "text": "const void *buf", "parent": 338, "children": [343, 344], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 42}}, {"id": 343, "type": "primitive_type", "text": "void", "parent": 342, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 37}}, {"id": 344, "type": "pointer_declarator", "text": "*buf", "parent": 342, "children": [345, 346], "start_point": {"row": 61, "column": 38}, "end_point": {"row": 61, "column": 42}}, {"id": 345, "type": "*", "text": "*", "parent": 344, "children": [], "start_point": {"row": 61, "column": 38}, "end_point": {"row": 61, "column": 39}}, {"id": 346, "type": "identifier", "text": "buf", "parent": 344, "children": [], "start_point": {"row": 61, "column": 39}, "end_point": {"row": 61, "column": 42}}, {"id": 347, "type": "parameter_declaration", "text": "size_t len", "parent": 338, "children": [348, 349], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 54}}, {"id": 348, "type": "primitive_type", "text": "size_t", "parent": 347, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 50}}, {"id": 349, "type": "identifier", "text": "len", "parent": 347, "children": [], "start_point": {"row": 61, "column": 51}, "end_point": {"row": 61, "column": 54}}, {"id": 350, "type": "parameter_declaration", "text": "int flags", "parent": 338, "children": [351, 352], "start_point": {"row": 61, "column": 56}, "end_point": {"row": 61, "column": 65}}, {"id": 351, "type": "primitive_type", "text": "int", "parent": 350, "children": [], "start_point": {"row": 61, "column": 56}, "end_point": {"row": 61, "column": 59}}, {"id": 352, "type": "identifier", "text": "flags", "parent": 350, "children": [], "start_point": {"row": 61, "column": 60}, "end_point": {"row": 61, "column": 65}}, {"id": 353, "type": "parameter_declaration", "text": "const struct sockaddr *dest_addr", "parent": 338, "children": [354, 357], "start_point": {"row": 61, "column": 67}, "end_point": {"row": 61, "column": 99}}, {"id": 354, "type": "struct_specifier", "text": "struct sockaddr", "parent": 353, "children": [355, 356], "start_point": {"row": 61, "column": 73}, "end_point": {"row": 61, "column": 88}}, {"id": 355, "type": "struct", "text": "struct", "parent": 354, "children": [], "start_point": {"row": 61, "column": 73}, "end_point": {"row": 61, "column": 79}}, {"id": 356, "type": "type_identifier", "text": "sockaddr", "parent": 354, "children": [], "start_point": {"row": 61, "column": 80}, "end_point": {"row": 61, "column": 88}}, {"id": 357, "type": "pointer_declarator", "text": "*dest_addr", "parent": 353, "children": [358, 359], "start_point": {"row": 61, "column": 89}, "end_point": {"row": 61, "column": 99}}, {"id": 358, "type": "*", "text": "*", "parent": 357, "children": [], "start_point": {"row": 61, "column": 89}, "end_point": {"row": 61, "column": 90}}, {"id": 359, "type": "identifier", "text": "dest_addr", "parent": 357, "children": [], "start_point": {"row": 61, "column": 90}, "end_point": {"row": 61, "column": 99}}, {"id": 360, "type": "parameter_declaration", "text": "socklen_t addrlen", "parent": 338, "children": [361, 362], "start_point": {"row": 61, "column": 101}, "end_point": {"row": 61, "column": 118}}, {"id": 361, "type": "type_identifier", "text": "socklen_t", "parent": 360, "children": [], "start_point": {"row": 61, "column": 101}, "end_point": {"row": 61, "column": 110}}, {"id": 362, "type": "identifier", "text": "addrlen", "parent": 360, "children": [], "start_point": {"row": 61, "column": 111}, "end_point": {"row": 61, "column": 118}}, {"id": 363, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 334, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 14}}, {"id": 364, "type": "return_statement", "text": "return len;", "parent": 334, "children": [365], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 12}}, {"id": 365, "type": "identifier", "text": "len", "parent": 364, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 11}}, {"id": 366, "type": "function_definition", "text": "ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [367, 368], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 367, "type": "primitive_type", "text": "ssize_t", "parent": 366, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 7}}, {"id": 368, "type": "function_declarator", "text": "sendmsg(int sockfd, const struct msghdr *msg, int flags)", "parent": 366, "children": [369, 370], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 64}}, {"id": 369, "type": "identifier", "text": "sendmsg", "parent": 368, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 15}}, {"id": 370, "type": "parameter_list", "text": "(int sockfd, const struct msghdr *msg, int flags)", "parent": 368, "children": [371, 374, 381], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 64}}, {"id": 371, "type": "parameter_declaration", "text": "int sockfd", "parent": 370, "children": [372, 373], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 26}}, {"id": 372, "type": "primitive_type", "text": "int", "parent": 371, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 19}}, {"id": 373, "type": "identifier", "text": "sockfd", "parent": 371, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 26}}, {"id": 374, "type": "parameter_declaration", "text": "const struct msghdr *msg", "parent": 370, "children": [375, 378], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 52}}, {"id": 375, "type": "struct_specifier", "text": "struct msghdr", "parent": 374, "children": [376, 377], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 47}}, {"id": 376, "type": "struct", "text": "struct", "parent": 375, "children": [], "start_point": {"row": 65, "column": 34}, "end_point": {"row": 65, "column": 40}}, {"id": 377, "type": "type_identifier", "text": "msghdr", "parent": 375, "children": [], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 47}}, {"id": 378, "type": "pointer_declarator", "text": "*msg", "parent": 374, "children": [379, 380], "start_point": {"row": 65, "column": 48}, "end_point": {"row": 65, "column": 52}}, {"id": 379, "type": "*", "text": "*", "parent": 378, "children": [], "start_point": {"row": 65, "column": 48}, "end_point": {"row": 65, "column": 49}}, {"id": 380, "type": "identifier", "text": "msg", "parent": 378, "children": [], "start_point": {"row": 65, "column": 49}, "end_point": {"row": 65, "column": 52}}, {"id": 381, "type": "parameter_declaration", "text": "int flags", "parent": 370, "children": [382, 383], "start_point": {"row": 65, "column": 54}, "end_point": {"row": 65, "column": 63}}, {"id": 382, "type": "primitive_type", "text": "int", "parent": 381, "children": [], "start_point": {"row": 65, "column": 54}, "end_point": {"row": 65, "column": 57}}, {"id": 383, "type": "identifier", "text": "flags", "parent": 381, "children": [], "start_point": {"row": 65, "column": 58}, "end_point": {"row": 65, "column": 63}}, {"id": 384, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 366, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 14}}, {"id": 385, "type": "return_statement", "text": "return -1;", "parent": 366, "children": [386], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 11}}, {"id": 386, "type": "number_literal", "text": "-1", "parent": 385, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 10}}, {"id": 387, "type": "function_definition", "text": "int socket(int domain, int type, int protocol) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [388, 389], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 73, "column": 1}}, {"id": 388, "type": "primitive_type", "text": "int", "parent": 387, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 3}}, {"id": 389, "type": "function_declarator", "text": "socket(int domain, int type, int protocol)", "parent": 387, "children": [390, 391], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 46}}, {"id": 390, "type": "identifier", "text": "socket", "parent": 389, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 391, "type": "parameter_list", "text": "(int domain, int type, int protocol)", "parent": 389, "children": [392, 395, 398], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 46}}, {"id": 392, "type": "parameter_declaration", "text": "int domain", "parent": 391, "children": [393, 394], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 21}}, {"id": 393, "type": "primitive_type", "text": "int", "parent": 392, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 14}}, {"id": 394, "type": "identifier", "text": "domain", "parent": 392, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 21}}, {"id": 395, "type": "parameter_declaration", "text": "int type", "parent": 391, "children": [396, 397], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 31}}, {"id": 396, "type": "primitive_type", "text": "int", "parent": 395, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 26}}, {"id": 397, "type": "identifier", "text": "type", "parent": 395, "children": [], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 31}}, {"id": 398, "type": "parameter_declaration", "text": "int protocol", "parent": 391, "children": [399, 400], "start_point": {"row": 70, "column": 33}, "end_point": {"row": 70, "column": 45}}, {"id": 399, "type": "primitive_type", "text": "int", "parent": 398, "children": [], "start_point": {"row": 70, "column": 33}, "end_point": {"row": 70, "column": 36}}, {"id": 400, "type": "identifier", "text": "protocol", "parent": 398, "children": [], "start_point": {"row": 70, "column": 37}, "end_point": {"row": 70, "column": 45}}, {"id": 401, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 387, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 14}}, {"id": 402, "type": "return_statement", "text": "return -1;", "parent": 387, "children": [403], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 11}}, {"id": 403, "type": "number_literal", "text": "-1", "parent": 402, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 10}}, {"id": 404, "type": "function_definition", "text": "uint32_t htonl(uint32_t hostlong) {\n\treturn ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));\n}", "parent": null, "children": [405, 406], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 77, "column": 1}}, {"id": 405, "type": "primitive_type", "text": "uint32_t", "parent": 404, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 8}}, {"id": 406, "type": "function_declarator", "text": "htonl(uint32_t hostlong)", "parent": 404, "children": [407, 408], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 33}}, {"id": 407, "type": "identifier", "text": "htonl", "parent": 406, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 14}}, {"id": 408, "type": "parameter_list", "text": "(uint32_t hostlong)", "parent": 406, "children": [409], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 33}}, {"id": 409, "type": "parameter_declaration", "text": "uint32_t hostlong", "parent": 408, "children": [410, 411], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 32}}, {"id": 410, "type": "primitive_type", "text": "uint32_t", "parent": 409, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 23}}, {"id": 411, "type": "identifier", "text": "hostlong", "parent": 409, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 32}}, {"id": 412, "type": "return_statement", "text": "return ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));", "parent": 404, "children": [413], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 139}}, {"id": 413, "type": "parenthesized_expression", "text": "( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24))", "parent": 412, "children": [414], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 138}}, {"id": 414, "type": "binary_expression", "text": "(((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24)", "parent": 413, "children": [415, 444], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 137}}, {"id": 415, "type": "binary_expression", "text": "(((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8)", "parent": 414, "children": [416, 435], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 101}}, {"id": 416, "type": "binary_expression", "text": "(((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8)", "parent": 415, "children": [417, 426], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 68}}, {"id": 417, "type": "parenthesized_expression", "text": "(((hostlong) & 0xFF) << 24)", "parent": 416, "children": [418], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 37}}, {"id": 418, "type": "binary_expression", "text": "((hostlong) & 0xFF) << 24", "parent": 417, "children": [419, 424, 425], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 36}}, {"id": 419, "type": "parenthesized_expression", "text": "((hostlong) & 0xFF)", "parent": 418, "children": [420], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 30}}, {"id": 420, "type": "binary_expression", "text": "(hostlong) & 0xFF", "parent": 419, "children": [421, 423], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 29}}, {"id": 421, "type": "parenthesized_expression", "text": "(hostlong)", "parent": 420, "children": [422], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 22}}, {"id": 422, "type": "identifier", "text": "hostlong", "parent": 421, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 21}}, {"id": 423, "type": "number_literal", "text": "0xFF", "parent": 420, "children": [], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 29}}, {"id": 424, "type": "<<", "text": "<<", "parent": 418, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 33}}, {"id": 425, "type": "number_literal", "text": "24", "parent": 418, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 36}}, {"id": 426, "type": "parenthesized_expression", "text": "(((hostlong) & 0xFF00) << 8)", "parent": 416, "children": [427], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 68}}, {"id": 427, "type": "binary_expression", "text": "((hostlong) & 0xFF00) << 8", "parent": 426, "children": [428, 433, 434], "start_point": {"row": 76, "column": 41}, "end_point": {"row": 76, "column": 67}}, {"id": 428, "type": "parenthesized_expression", "text": "((hostlong) & 0xFF00)", "parent": 427, "children": [429], "start_point": {"row": 76, "column": 41}, "end_point": {"row": 76, "column": 62}}, {"id": 429, "type": "binary_expression", "text": "(hostlong) & 0xFF00", "parent": 428, "children": [430, 432], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 61}}, {"id": 430, "type": "parenthesized_expression", "text": "(hostlong)", "parent": 429, "children": [431], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 52}}, {"id": 431, "type": "identifier", "text": "hostlong", "parent": 430, "children": [], "start_point": {"row": 76, "column": 43}, "end_point": {"row": 76, "column": 51}}, {"id": 432, "type": "number_literal", "text": "0xFF00", "parent": 429, "children": [], "start_point": {"row": 76, "column": 55}, "end_point": {"row": 76, "column": 61}}, {"id": 433, "type": "<<", "text": "<<", "parent": 427, "children": [], "start_point": {"row": 76, "column": 63}, "end_point": {"row": 76, "column": 65}}, {"id": 434, "type": "number_literal", "text": "8", "parent": 427, "children": [], "start_point": {"row": 76, "column": 66}, "end_point": {"row": 76, "column": 67}}, {"id": 435, "type": "parenthesized_expression", "text": "(((hostlong) & 0xFF0000) >> 8)", "parent": 415, "children": [436], "start_point": {"row": 76, "column": 71}, "end_point": {"row": 76, "column": 101}}, {"id": 436, "type": "binary_expression", "text": "((hostlong) & 0xFF0000) >> 8", "parent": 435, "children": [437, 442, 443], "start_point": {"row": 76, "column": 72}, "end_point": {"row": 76, "column": 100}}, {"id": 437, "type": "parenthesized_expression", "text": "((hostlong) & 0xFF0000)", "parent": 436, "children": [438], "start_point": {"row": 76, "column": 72}, "end_point": {"row": 76, "column": 95}}, {"id": 438, "type": "binary_expression", "text": "(hostlong) & 0xFF0000", "parent": 437, "children": [439, 441], "start_point": {"row": 76, "column": 73}, "end_point": {"row": 76, "column": 94}}, {"id": 439, "type": "parenthesized_expression", "text": "(hostlong)", "parent": 438, "children": [440], "start_point": {"row": 76, "column": 73}, "end_point": {"row": 76, "column": 83}}, {"id": 440, "type": "identifier", "text": "hostlong", "parent": 439, "children": [], "start_point": {"row": 76, "column": 74}, "end_point": {"row": 76, "column": 82}}, {"id": 441, "type": "number_literal", "text": "0xFF0000", "parent": 438, "children": [], "start_point": {"row": 76, "column": 86}, "end_point": {"row": 76, "column": 94}}, {"id": 442, "type": ">>", "text": ">>", "parent": 436, "children": [], "start_point": {"row": 76, "column": 96}, "end_point": {"row": 76, "column": 98}}, {"id": 443, "type": "number_literal", "text": "8", "parent": 436, "children": [], "start_point": {"row": 76, "column": 99}, "end_point": {"row": 76, "column": 100}}, {"id": 444, "type": "parenthesized_expression", "text": "(((hostlong) & 0xFF000000) >> 24)", "parent": 414, "children": [445], "start_point": {"row": 76, "column": 104}, "end_point": {"row": 76, "column": 137}}, {"id": 445, "type": "binary_expression", "text": "((hostlong) & 0xFF000000) >> 24", "parent": 444, "children": [446, 451, 452], "start_point": {"row": 76, "column": 105}, "end_point": {"row": 76, "column": 136}}, {"id": 446, "type": "parenthesized_expression", "text": "((hostlong) & 0xFF000000)", "parent": 445, "children": [447], "start_point": {"row": 76, "column": 105}, "end_point": {"row": 76, "column": 130}}, {"id": 447, "type": "binary_expression", "text": "(hostlong) & 0xFF000000", "parent": 446, "children": [448, 450], "start_point": {"row": 76, "column": 106}, "end_point": {"row": 76, "column": 129}}, {"id": 448, "type": "parenthesized_expression", "text": "(hostlong)", "parent": 447, "children": [449], "start_point": {"row": 76, "column": 106}, "end_point": {"row": 76, "column": 116}}, {"id": 449, "type": "identifier", "text": "hostlong", "parent": 448, "children": [], "start_point": {"row": 76, "column": 107}, "end_point": {"row": 76, "column": 115}}, {"id": 450, "type": "number_literal", "text": "0xFF000000", "parent": 447, "children": [], "start_point": {"row": 76, "column": 119}, "end_point": {"row": 76, "column": 129}}, {"id": 451, "type": ">>", "text": ">>", "parent": 445, "children": [], "start_point": {"row": 76, "column": 131}, "end_point": {"row": 76, "column": 133}}, {"id": 452, "type": "number_literal", "text": "24", "parent": 445, "children": [], "start_point": {"row": 76, "column": 134}, "end_point": {"row": 76, "column": 136}}, {"id": 453, "type": "function_definition", "text": "uint16_t htons(uint16_t hostshort) {\n\treturn ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );\n}", "parent": null, "children": [454, 455], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 81, "column": 1}}, {"id": 454, "type": "primitive_type", "text": "uint16_t", "parent": 453, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 8}}, {"id": 455, "type": "function_declarator", "text": "htons(uint16_t hostshort)", "parent": 453, "children": [456, 457], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 34}}, {"id": 456, "type": "identifier", "text": "htons", "parent": 455, "children": [], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 14}}, {"id": 457, "type": "parameter_list", "text": "(uint16_t hostshort)", "parent": 455, "children": [458], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 34}}, {"id": 458, "type": "parameter_declaration", "text": "uint16_t hostshort", "parent": 457, "children": [459, 460], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 33}}, {"id": 459, "type": "primitive_type", "text": "uint16_t", "parent": 458, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 23}}, {"id": 460, "type": "identifier", "text": "hostshort", "parent": 458, "children": [], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 33}}, {"id": 461, "type": "return_statement", "text": "return ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );", "parent": 453, "children": [462], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 72}}, {"id": 462, "type": "parenthesized_expression", "text": "( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) )", "parent": 461, "children": [463], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 71}}, {"id": 463, "type": "binary_expression", "text": "(((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8)", "parent": 462, "children": [464, 473], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 69}}, {"id": 464, "type": "parenthesized_expression", "text": "(((hostshort) & 0xFF) << 8)", "parent": 463, "children": [465], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 37}}, {"id": 465, "type": "binary_expression", "text": "((hostshort) & 0xFF) << 8", "parent": 464, "children": [466, 471, 472], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 36}}, {"id": 466, "type": "parenthesized_expression", "text": "((hostshort) & 0xFF)", "parent": 465, "children": [467], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 31}}, {"id": 467, "type": "binary_expression", "text": "(hostshort) & 0xFF", "parent": 466, "children": [468, 470], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 30}}, {"id": 468, "type": "parenthesized_expression", "text": "(hostshort)", "parent": 467, "children": [469], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 23}}, {"id": 469, "type": "identifier", "text": "hostshort", "parent": 468, "children": [], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 22}}, {"id": 470, "type": "number_literal", "text": "0xFF", "parent": 467, "children": [], "start_point": {"row": 80, "column": 26}, "end_point": {"row": 80, "column": 30}}, {"id": 471, "type": "<<", "text": "<<", "parent": 465, "children": [], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 34}}, {"id": 472, "type": "number_literal", "text": "8", "parent": 465, "children": [], "start_point": {"row": 80, "column": 35}, "end_point": {"row": 80, "column": 36}}, {"id": 473, "type": "parenthesized_expression", "text": "(((hostshort) & 0xFF00) >> 8)", "parent": 463, "children": [474], "start_point": {"row": 80, "column": 40}, "end_point": {"row": 80, "column": 69}}, {"id": 474, "type": "binary_expression", "text": "((hostshort) & 0xFF00) >> 8", "parent": 473, "children": [475, 480, 481], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 68}}, {"id": 475, "type": "parenthesized_expression", "text": "((hostshort) & 0xFF00)", "parent": 474, "children": [476], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 63}}, {"id": 476, "type": "binary_expression", "text": "(hostshort) & 0xFF00", "parent": 475, "children": [477, 479], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 62}}, {"id": 477, "type": "parenthesized_expression", "text": "(hostshort)", "parent": 476, "children": [478], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 53}}, {"id": 478, "type": "identifier", "text": "hostshort", "parent": 477, "children": [], "start_point": {"row": 80, "column": 43}, "end_point": {"row": 80, "column": 52}}, {"id": 479, "type": "number_literal", "text": "0xFF00", "parent": 476, "children": [], "start_point": {"row": 80, "column": 56}, "end_point": {"row": 80, "column": 62}}, {"id": 480, "type": ">>", "text": ">>", "parent": 474, "children": [], "start_point": {"row": 80, "column": 64}, "end_point": {"row": 80, "column": 66}}, {"id": 481, "type": "number_literal", "text": "8", "parent": 474, "children": [], "start_point": {"row": 80, "column": 67}, "end_point": {"row": 80, "column": 68}}, {"id": 482, "type": "function_definition", "text": "uint32_t ntohl(uint32_t netlong) {\n\treturn htonl(netlong);\n}", "parent": null, "children": [483, 484], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 85, "column": 1}}, {"id": 483, "type": "primitive_type", "text": "uint32_t", "parent": 482, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 8}}, {"id": 484, "type": "function_declarator", "text": "ntohl(uint32_t netlong)", "parent": 482, "children": [485, 486], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 32}}, {"id": 485, "type": "identifier", "text": "ntohl", "parent": 484, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 14}}, {"id": 486, "type": "parameter_list", "text": "(uint32_t netlong)", "parent": 484, "children": [487], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 32}}, {"id": 487, "type": "parameter_declaration", "text": "uint32_t netlong", "parent": 486, "children": [488, 489], "start_point": {"row": 83, "column": 15}, "end_point": {"row": 83, "column": 31}}, {"id": 488, "type": "primitive_type", "text": "uint32_t", "parent": 487, "children": [], "start_point": {"row": 83, "column": 15}, "end_point": {"row": 83, "column": 23}}, {"id": 489, "type": "identifier", "text": "netlong", "parent": 487, "children": [], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 31}}, {"id": 490, "type": "return_statement", "text": "return htonl(netlong);", "parent": 482, "children": [491], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 23}}, {"id": 491, "type": "call_expression", "text": "htonl(netlong)", "parent": 490, "children": [492, 493], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 22}}, {"id": 492, "type": "identifier", "text": "htonl", "parent": 491, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 13}}, {"id": 493, "type": "argument_list", "text": "(netlong)", "parent": 491, "children": [494], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 22}}, {"id": 494, "type": "identifier", "text": "netlong", "parent": 493, "children": [], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 21}}, {"id": 495, "type": "function_definition", "text": "uint16_t ntohs(uint16_t netshort) {\n\treturn htons(netshort);\n}", "parent": null, "children": [496, 497], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 496, "type": "primitive_type", "text": "uint16_t", "parent": 495, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 8}}, {"id": 497, "type": "function_declarator", "text": "ntohs(uint16_t netshort)", "parent": 495, "children": [498, 499], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 33}}, {"id": 498, "type": "identifier", "text": "ntohs", "parent": 497, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 14}}, {"id": 499, "type": "parameter_list", "text": "(uint16_t netshort)", "parent": 497, "children": [500], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 33}}, {"id": 500, "type": "parameter_declaration", "text": "uint16_t netshort", "parent": 499, "children": [501, 502], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 32}}, {"id": 501, "type": "primitive_type", "text": "uint16_t", "parent": 500, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 23}}, {"id": 502, "type": "identifier", "text": "netshort", "parent": 500, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 32}}, {"id": 503, "type": "return_statement", "text": "return htons(netshort);", "parent": 495, "children": [504], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 24}}, {"id": 504, "type": "call_expression", "text": "htons(netshort)", "parent": 503, "children": [505, 506], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 23}}, {"id": 505, "type": "identifier", "text": "htons", "parent": 504, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 13}}, {"id": 506, "type": "argument_list", "text": "(netshort)", "parent": 504, "children": [507], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 23}}, {"id": 507, "type": "identifier", "text": "netshort", "parent": 506, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 22}}, {"id": 508, "type": "function_definition", "text": "int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [509, 510], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 509, "type": "primitive_type", "text": "int", "parent": 508, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 3}}, {"id": 510, "type": "function_declarator", "text": "bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)", "parent": 508, "children": [511, 512], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 68}}, {"id": 511, "type": "identifier", "text": "bind", "parent": 510, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 8}}, {"id": 512, "type": "parameter_list", "text": "(int sockfd, const struct sockaddr *addr, socklen_t addrlen)", "parent": 510, "children": [513, 516, 523], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 68}}, {"id": 513, "type": "parameter_declaration", "text": "int sockfd", "parent": 512, "children": [514, 515], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 19}}, {"id": 514, "type": "primitive_type", "text": "int", "parent": 513, "children": [], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 12}}, {"id": 515, "type": "identifier", "text": "sockfd", "parent": 513, "children": [], "start_point": {"row": 91, "column": 13}, "end_point": {"row": 91, "column": 19}}, {"id": 516, "type": "parameter_declaration", "text": "const struct sockaddr *addr", "parent": 512, "children": [517, 520], "start_point": {"row": 91, "column": 21}, "end_point": {"row": 91, "column": 48}}, {"id": 517, "type": "struct_specifier", "text": "struct sockaddr", "parent": 516, "children": [518, 519], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 42}}, {"id": 518, "type": "struct", "text": "struct", "parent": 517, "children": [], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 33}}, {"id": 519, "type": "type_identifier", "text": "sockaddr", "parent": 517, "children": [], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 42}}, {"id": 520, "type": "pointer_declarator", "text": "*addr", "parent": 516, "children": [521, 522], "start_point": {"row": 91, "column": 43}, "end_point": {"row": 91, "column": 48}}, {"id": 521, "type": "*", "text": "*", "parent": 520, "children": [], "start_point": {"row": 91, "column": 43}, "end_point": {"row": 91, "column": 44}}, {"id": 522, "type": "identifier", "text": "addr", "parent": 520, "children": [], "start_point": {"row": 91, "column": 44}, "end_point": {"row": 91, "column": 48}}, {"id": 523, "type": "parameter_declaration", "text": "socklen_t addrlen", "parent": 512, "children": [524, 525], "start_point": {"row": 91, "column": 50}, "end_point": {"row": 91, "column": 67}}, {"id": 524, "type": "type_identifier", "text": "socklen_t", "parent": 523, "children": [], "start_point": {"row": 91, "column": 50}, "end_point": {"row": 91, "column": 59}}, {"id": 525, "type": "identifier", "text": "addrlen", "parent": 523, "children": [], "start_point": {"row": 91, "column": 60}, "end_point": {"row": 91, "column": 67}}, {"id": 526, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 508, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 14}}, {"id": 527, "type": "return_statement", "text": "return -1;", "parent": 508, "children": [528], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 11}}, {"id": 528, "type": "number_literal", "text": "-1", "parent": 527, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 10}}, {"id": 529, "type": "function_definition", "text": "int accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [530, 531], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 530, "type": "primitive_type", "text": "int", "parent": 529, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 3}}, {"id": 531, "type": "function_declarator", "text": "accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen)", "parent": 529, "children": [532, 533], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 67}}, {"id": 532, "type": "identifier", "text": "accept", "parent": 531, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 10}}, {"id": 533, "type": "parameter_list", "text": "(int sockfd, struct sockaddr * addr, socklen_t * addrlen)", "parent": 531, "children": [534, 537, 544], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 67}}, {"id": 534, "type": "parameter_declaration", "text": "int sockfd", "parent": 533, "children": [535, 536], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 21}}, {"id": 535, "type": "primitive_type", "text": "int", "parent": 534, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 14}}, {"id": 536, "type": "identifier", "text": "sockfd", "parent": 534, "children": [], "start_point": {"row": 96, "column": 15}, "end_point": {"row": 96, "column": 21}}, {"id": 537, "type": "parameter_declaration", "text": "struct sockaddr * addr", "parent": 533, "children": [538, 541], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 45}}, {"id": 538, "type": "struct_specifier", "text": "struct sockaddr", "parent": 537, "children": [539, 540], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 38}}, {"id": 539, "type": "struct", "text": "struct", "parent": 538, "children": [], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 29}}, {"id": 540, "type": "type_identifier", "text": "sockaddr", "parent": 538, "children": [], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 38}}, {"id": 541, "type": "pointer_declarator", "text": "* addr", "parent": 537, "children": [542, 543], "start_point": {"row": 96, "column": 39}, "end_point": {"row": 96, "column": 45}}, {"id": 542, "type": "*", "text": "*", "parent": 541, "children": [], "start_point": {"row": 96, "column": 39}, "end_point": {"row": 96, "column": 40}}, {"id": 543, "type": "identifier", "text": "addr", "parent": 541, "children": [], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 45}}, {"id": 544, "type": "parameter_declaration", "text": "socklen_t * addrlen", "parent": 533, "children": [545, 546], "start_point": {"row": 96, "column": 47}, "end_point": {"row": 96, "column": 66}}, {"id": 545, "type": "type_identifier", "text": "socklen_t", "parent": 544, "children": [], "start_point": {"row": 96, "column": 47}, "end_point": {"row": 96, "column": 56}}, {"id": 546, "type": "pointer_declarator", "text": "* addrlen", "parent": 544, "children": [547, 548], "start_point": {"row": 96, "column": 57}, "end_point": {"row": 96, "column": 66}}, {"id": 547, "type": "*", "text": "*", "parent": 546, "children": [], "start_point": {"row": 96, "column": 57}, "end_point": {"row": 96, "column": 58}}, {"id": 548, "type": "identifier", "text": "addrlen", "parent": 546, "children": [], "start_point": {"row": 96, "column": 59}, "end_point": {"row": 96, "column": 66}}, {"id": 549, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 529, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 14}}, {"id": 550, "type": "return_statement", "text": "return -1;", "parent": 529, "children": [551], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 11}}, {"id": 551, "type": "number_literal", "text": "-1", "parent": 550, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 10}}, {"id": 552, "type": "function_definition", "text": "int listen(int sockfd, int backlog) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [553, 554], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 553, "type": "primitive_type", "text": "int", "parent": 552, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 3}}, {"id": 554, "type": "function_declarator", "text": "listen(int sockfd, int backlog)", "parent": 552, "children": [555, 556], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 35}}, {"id": 555, "type": "identifier", "text": "listen", "parent": 554, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 10}}, {"id": 556, "type": "parameter_list", "text": "(int sockfd, int backlog)", "parent": 554, "children": [557, 560], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 35}}, {"id": 557, "type": "parameter_declaration", "text": "int sockfd", "parent": 556, "children": [558, 559], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 21}}, {"id": 558, "type": "primitive_type", "text": "int", "parent": 557, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 14}}, {"id": 559, "type": "identifier", "text": "sockfd", "parent": 557, "children": [], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 21}}, {"id": 560, "type": "parameter_declaration", "text": "int backlog", "parent": 556, "children": [561, 562], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 34}}, {"id": 561, "type": "primitive_type", "text": "int", "parent": 560, "children": [], "start_point": {"row": 101, "column": 23}, "end_point": {"row": 101, "column": 26}}, {"id": 562, "type": "identifier", "text": "backlog", "parent": 560, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 34}}, {"id": 563, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 552, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 14}}, {"id": 564, "type": "return_statement", "text": "return -1;", "parent": 552, "children": [565], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 103, "column": 11}}, {"id": 565, "type": "number_literal", "text": "-1", "parent": 564, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 10}}, {"id": 566, "type": "function_definition", "text": "int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [567, 568], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 109, "column": 1}}, {"id": 567, "type": "primitive_type", "text": "int", "parent": 566, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 3}}, {"id": 568, "type": "function_declarator", "text": "getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen)", "parent": 566, "children": [569, 570], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 70}}, {"id": 569, "type": "identifier", "text": "getsockname", "parent": 568, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 15}}, {"id": 570, "type": "parameter_list", "text": "(int sockfd, struct sockaddr *addr, socklen_t *addrlen)", "parent": 568, "children": [571, 574, 581], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 70}}, {"id": 571, "type": "parameter_declaration", "text": "int sockfd", "parent": 570, "children": [572, 573], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 26}}, {"id": 572, "type": "primitive_type", "text": "int", "parent": 571, "children": [], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 19}}, {"id": 573, "type": "identifier", "text": "sockfd", "parent": 571, "children": [], "start_point": {"row": 106, "column": 20}, "end_point": {"row": 106, "column": 26}}, {"id": 574, "type": "parameter_declaration", "text": "struct sockaddr *addr", "parent": 570, "children": [575, 578], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 49}}, {"id": 575, "type": "struct_specifier", "text": "struct sockaddr", "parent": 574, "children": [576, 577], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 43}}, {"id": 576, "type": "struct", "text": "struct", "parent": 575, "children": [], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 34}}, {"id": 577, "type": "type_identifier", "text": "sockaddr", "parent": 575, "children": [], "start_point": {"row": 106, "column": 35}, "end_point": {"row": 106, "column": 43}}, {"id": 578, "type": "pointer_declarator", "text": "*addr", "parent": 574, "children": [579, 580], "start_point": {"row": 106, "column": 44}, "end_point": {"row": 106, "column": 49}}, {"id": 579, "type": "*", "text": "*", "parent": 578, "children": [], "start_point": {"row": 106, "column": 44}, "end_point": {"row": 106, "column": 45}}, {"id": 580, "type": "identifier", "text": "addr", "parent": 578, "children": [], "start_point": {"row": 106, "column": 45}, "end_point": {"row": 106, "column": 49}}, {"id": 581, "type": "parameter_declaration", "text": "socklen_t *addrlen", "parent": 570, "children": [582, 583], "start_point": {"row": 106, "column": 51}, "end_point": {"row": 106, "column": 69}}, {"id": 582, "type": "type_identifier", "text": "socklen_t", "parent": 581, "children": [], "start_point": {"row": 106, "column": 51}, "end_point": {"row": 106, "column": 60}}, {"id": 583, "type": "pointer_declarator", "text": "*addrlen", "parent": 581, "children": [584, 585], "start_point": {"row": 106, "column": 61}, "end_point": {"row": 106, "column": 69}}, {"id": 584, "type": "*", "text": "*", "parent": 583, "children": [], "start_point": {"row": 106, "column": 61}, "end_point": {"row": 106, "column": 62}}, {"id": 585, "type": "identifier", "text": "addrlen", "parent": 583, "children": [], "start_point": {"row": 106, "column": 62}, "end_point": {"row": 106, "column": 69}}, {"id": 586, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 566, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 14}}, {"id": 587, "type": "return_statement", "text": "return -1;", "parent": 566, "children": [588], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 11}}, {"id": 588, "type": "number_literal", "text": "-1", "parent": 587, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 10}}, {"id": 589, "type": "function_definition", "text": "int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n\treturn -1;\n}", "parent": null, "children": [590, 591], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 113, "column": 1}}, {"id": 590, "type": "primitive_type", "text": "int", "parent": 589, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 3}}, {"id": 591, "type": "function_declarator", "text": "getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen)", "parent": 589, "children": [592, 593], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 70}}, {"id": 592, "type": "identifier", "text": "getpeername", "parent": 591, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 15}}, {"id": 593, "type": "parameter_list", "text": "(int sockfd, struct sockaddr *addr, socklen_t *addrlen)", "parent": 591, "children": [594, 597, 604], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 70}}, {"id": 594, "type": "parameter_declaration", "text": "int sockfd", "parent": 593, "children": [595, 596], "start_point": {"row": 111, "column": 16}, "end_point": {"row": 111, "column": 26}}, {"id": 595, "type": "primitive_type", "text": "int", "parent": 594, "children": [], "start_point": {"row": 111, "column": 16}, "end_point": {"row": 111, "column": 19}}, {"id": 596, "type": "identifier", "text": "sockfd", "parent": 594, "children": [], "start_point": {"row": 111, "column": 20}, "end_point": {"row": 111, "column": 26}}, {"id": 597, "type": "parameter_declaration", "text": "struct sockaddr *addr", "parent": 593, "children": [598, 601], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 49}}, {"id": 598, "type": "struct_specifier", "text": "struct sockaddr", "parent": 597, "children": [599, 600], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 43}}, {"id": 599, "type": "struct", "text": "struct", "parent": 598, "children": [], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 34}}, {"id": 600, "type": "type_identifier", "text": "sockaddr", "parent": 598, "children": [], "start_point": {"row": 111, "column": 35}, "end_point": {"row": 111, "column": 43}}, {"id": 601, "type": "pointer_declarator", "text": "*addr", "parent": 597, "children": [602, 603], "start_point": {"row": 111, "column": 44}, "end_point": {"row": 111, "column": 49}}, {"id": 602, "type": "*", "text": "*", "parent": 601, "children": [], "start_point": {"row": 111, "column": 44}, "end_point": {"row": 111, "column": 45}}, {"id": 603, "type": "identifier", "text": "addr", "parent": 601, "children": [], "start_point": {"row": 111, "column": 45}, "end_point": {"row": 111, "column": 49}}, {"id": 604, "type": "parameter_declaration", "text": "socklen_t *addrlen", "parent": 593, "children": [605, 606], "start_point": {"row": 111, "column": 51}, "end_point": {"row": 111, "column": 69}}, {"id": 605, "type": "type_identifier", "text": "socklen_t", "parent": 604, "children": [], "start_point": {"row": 111, "column": 51}, "end_point": {"row": 111, "column": 60}}, {"id": 606, "type": "pointer_declarator", "text": "*addrlen", "parent": 604, "children": [607, 608], "start_point": {"row": 111, "column": 61}, "end_point": {"row": 111, "column": 69}}, {"id": 607, "type": "*", "text": "*", "parent": 606, "children": [], "start_point": {"row": 111, "column": 61}, "end_point": {"row": 111, "column": 62}}, {"id": 608, "type": "identifier", "text": "addrlen", "parent": 606, "children": [], "start_point": {"row": 111, "column": 62}, "end_point": {"row": 111, "column": 69}}, {"id": 609, "type": "return_statement", "text": "return -1;", "parent": 589, "children": [610], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 11}}, {"id": 610, "type": "number_literal", "text": "-1", "parent": 609, "children": [], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 10}}, {"id": 611, "type": "function_definition", "text": "int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [612, 613], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 612, "type": "primitive_type", "text": "int", "parent": 611, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 3}}, {"id": 613, "type": "function_declarator", "text": "getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)", "parent": 611, "children": [614, 615], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 83}}, {"id": 614, "type": "identifier", "text": "getsockopt", "parent": 613, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 14}}, {"id": 615, "type": "parameter_list", "text": "(int sockfd, int level, int optname, void *optval, socklen_t *optlen)", "parent": 613, "children": [616, 619, 622, 625, 630], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 83}}, {"id": 616, "type": "parameter_declaration", "text": "int sockfd", "parent": 615, "children": [617, 618], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 25}}, {"id": 617, "type": "primitive_type", "text": "int", "parent": 616, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 18}}, {"id": 618, "type": "identifier", "text": "sockfd", "parent": 616, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 25}}, {"id": 619, "type": "parameter_declaration", "text": "int level", "parent": 615, "children": [620, 621], "start_point": {"row": 115, "column": 27}, "end_point": {"row": 115, "column": 36}}, {"id": 620, "type": "primitive_type", "text": "int", "parent": 619, "children": [], "start_point": {"row": 115, "column": 27}, "end_point": {"row": 115, "column": 30}}, {"id": 621, "type": "identifier", "text": "level", "parent": 619, "children": [], "start_point": {"row": 115, "column": 31}, "end_point": {"row": 115, "column": 36}}, {"id": 622, "type": "parameter_declaration", "text": "int optname", "parent": 615, "children": [623, 624], "start_point": {"row": 115, "column": 38}, "end_point": {"row": 115, "column": 49}}, {"id": 623, "type": "primitive_type", "text": "int", "parent": 622, "children": [], "start_point": {"row": 115, "column": 38}, "end_point": {"row": 115, "column": 41}}, {"id": 624, "type": "identifier", "text": "optname", "parent": 622, "children": [], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 49}}, {"id": 625, "type": "parameter_declaration", "text": "void *optval", "parent": 615, "children": [626, 627], "start_point": {"row": 115, "column": 51}, "end_point": {"row": 115, "column": 63}}, {"id": 626, "type": "primitive_type", "text": "void", "parent": 625, "children": [], "start_point": {"row": 115, "column": 51}, "end_point": {"row": 115, "column": 55}}, {"id": 627, "type": "pointer_declarator", "text": "*optval", "parent": 625, "children": [628, 629], "start_point": {"row": 115, "column": 56}, "end_point": {"row": 115, "column": 63}}, {"id": 628, "type": "*", "text": "*", "parent": 627, "children": [], "start_point": {"row": 115, "column": 56}, "end_point": {"row": 115, "column": 57}}, {"id": 629, "type": "identifier", "text": "optval", "parent": 627, "children": [], "start_point": {"row": 115, "column": 57}, "end_point": {"row": 115, "column": 63}}, {"id": 630, "type": "parameter_declaration", "text": "socklen_t *optlen", "parent": 615, "children": [631, 632], "start_point": {"row": 115, "column": 65}, "end_point": {"row": 115, "column": 82}}, {"id": 631, "type": "type_identifier", "text": "socklen_t", "parent": 630, "children": [], "start_point": {"row": 115, "column": 65}, "end_point": {"row": 115, "column": 74}}, {"id": 632, "type": "pointer_declarator", "text": "*optlen", "parent": 630, "children": [633, 634], "start_point": {"row": 115, "column": 75}, "end_point": {"row": 115, "column": 82}}, {"id": 633, "type": "*", "text": "*", "parent": 632, "children": [], "start_point": {"row": 115, "column": 75}, "end_point": {"row": 115, "column": 76}}, {"id": 634, "type": "identifier", "text": "optlen", "parent": 632, "children": [], "start_point": {"row": 115, "column": 76}, "end_point": {"row": 115, "column": 82}}, {"id": 635, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 611, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 14}}, {"id": 636, "type": "return_statement", "text": "return -1;", "parent": 611, "children": [637], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 11}}, {"id": 637, "type": "number_literal", "text": "-1", "parent": 636, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 10}}, {"id": 638, "type": "function_definition", "text": "int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}", "parent": null, "children": [639, 640], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 123, "column": 1}}, {"id": 639, "type": "primitive_type", "text": "int", "parent": 638, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 3}}, {"id": 640, "type": "function_declarator", "text": "setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)", "parent": 638, "children": [641, 642], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 88}}, {"id": 641, "type": "identifier", "text": "setsockopt", "parent": 640, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 14}}, {"id": 642, "type": "parameter_list", "text": "(int sockfd, int level, int optname, const void *optval, socklen_t optlen)", "parent": 640, "children": [643, 646, 649, 652, 657], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 88}}, {"id": 643, "type": "parameter_declaration", "text": "int sockfd", "parent": 642, "children": [644, 645], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 25}}, {"id": 644, "type": "primitive_type", "text": "int", "parent": 643, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 18}}, {"id": 645, "type": "identifier", "text": "sockfd", "parent": 643, "children": [], "start_point": {"row": 120, "column": 19}, "end_point": {"row": 120, "column": 25}}, {"id": 646, "type": "parameter_declaration", "text": "int level", "parent": 642, "children": [647, 648], "start_point": {"row": 120, "column": 27}, "end_point": {"row": 120, "column": 36}}, {"id": 647, "type": "primitive_type", "text": "int", "parent": 646, "children": [], "start_point": {"row": 120, "column": 27}, "end_point": {"row": 120, "column": 30}}, {"id": 648, "type": "identifier", "text": "level", "parent": 646, "children": [], "start_point": {"row": 120, "column": 31}, "end_point": {"row": 120, "column": 36}}, {"id": 649, "type": "parameter_declaration", "text": "int optname", "parent": 642, "children": [650, 651], "start_point": {"row": 120, "column": 38}, "end_point": {"row": 120, "column": 49}}, {"id": 650, "type": "primitive_type", "text": "int", "parent": 649, "children": [], "start_point": {"row": 120, "column": 38}, "end_point": {"row": 120, "column": 41}}, {"id": 651, "type": "identifier", "text": "optname", "parent": 649, "children": [], "start_point": {"row": 120, "column": 42}, "end_point": {"row": 120, "column": 49}}, {"id": 652, "type": "parameter_declaration", "text": "const void *optval", "parent": 642, "children": [653, 654], "start_point": {"row": 120, "column": 51}, "end_point": {"row": 120, "column": 69}}, {"id": 653, "type": "primitive_type", "text": "void", "parent": 652, "children": [], "start_point": {"row": 120, "column": 57}, "end_point": {"row": 120, "column": 61}}, {"id": 654, "type": "pointer_declarator", "text": "*optval", "parent": 652, "children": [655, 656], "start_point": {"row": 120, "column": 62}, "end_point": {"row": 120, "column": 69}}, {"id": 655, "type": "*", "text": "*", "parent": 654, "children": [], "start_point": {"row": 120, "column": 62}, "end_point": {"row": 120, "column": 63}}, {"id": 656, "type": "identifier", "text": "optval", "parent": 654, "children": [], "start_point": {"row": 120, "column": 63}, "end_point": {"row": 120, "column": 69}}, {"id": 657, "type": "parameter_declaration", "text": "socklen_t optlen", "parent": 642, "children": [658, 659], "start_point": {"row": 120, "column": 71}, "end_point": {"row": 120, "column": 87}}, {"id": 658, "type": "type_identifier", "text": "socklen_t", "parent": 657, "children": [], "start_point": {"row": 120, "column": 71}, "end_point": {"row": 120, "column": 80}}, {"id": 659, "type": "identifier", "text": "optlen", "parent": 657, "children": [], "start_point": {"row": 120, "column": 81}, "end_point": {"row": 120, "column": 87}}, {"id": 660, "type": "identifier", "text": "UNIMPLEMENTED", "parent": 638, "children": [], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 14}}, {"id": 661, "type": "return_statement", "text": "return -1;", "parent": 638, "children": [662], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 11}}, {"id": 662, "type": "number_literal", "text": "-1", "parent": 661, "children": [], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 10}}]}, "node_categories": {"declarations": {"functions": [73, 79, 214, 216, 235, 237, 257, 259, 291, 293, 312, 314, 334, 336, 366, 368, 387, 389, 404, 406, 453, 455, 482, 484, 495, 497, 508, 510, 529, 531, 552, 554, 566, 568, 589, 591, 611, 613, 638, 640], "variables": [27, 36, 52, 66, 82, 107, 117, 135, 219, 222, 229, 240, 243, 248, 251, 262, 265, 270, 273, 276, 283, 296, 299, 306, 317, 320, 325, 328, 339, 342, 347, 350, 353, 360, 371, 374, 381, 392, 395, 398, 409, 458, 487, 500, 513, 516, 523, 534, 537, 544, 557, 560, 571, 574, 581, 594, 597, 604, 616, 619, 622, 625, 630, 643, 646, 649, 652, 657], "classes": [28, 29, 37, 38, 53, 54, 74, 75, 163, 164, 223, 224, 277, 278, 300, 301, 354, 355, 375, 376, 517, 518, 538, 539, 575, 576, 598, 599], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [88, 89, 92, 95, 99, 103, 112, 127, 133, 140, 146, 151, 157, 161, 168, 171, 175, 182, 185, 191, 195, 204, 208, 212, 413, 414, 415, 416, 417, 418, 419, 420, 421, 426, 427, 428, 429, 430, 435, 436, 437, 438, 439, 444, 445, 446, 447, 448, 462, 463, 464, 465, 466, 467, 468, 473, 474, 475, 476, 477, 491, 504], "assignments": [98, 156, 170, 184, 190, 203], "loops": [], "conditionals": [30, 32, 39, 44, 55, 60, 68, 71, 76, 80, 86, 87, 90, 91, 93, 96, 97, 100, 101, 104, 106, 110, 113, 116, 123, 132, 134, 138, 141, 143, 145, 147, 149, 150, 152, 158, 165, 169, 172, 173, 183, 186, 187, 189, 192, 193, 202, 205, 206, 213, 217, 221, 225, 228, 230, 231, 232, 238, 242, 247, 250, 253, 254, 260, 264, 269, 272, 275, 279, 282, 284, 287, 288, 294, 298, 302, 305, 308, 309, 315, 319, 324, 327, 330, 331, 333, 337, 341, 346, 349, 352, 356, 359, 361, 362, 363, 365, 369, 373, 377, 380, 383, 384, 390, 394, 397, 400, 401, 407, 411, 422, 431, 440, 449, 456, 460, 469, 478, 485, 489, 492, 494, 498, 502, 505, 507, 511, 515, 519, 522, 524, 525, 526, 532, 536, 540, 543, 545, 548, 549, 555, 559, 562, 563, 569, 573, 577, 580, 582, 585, 586, 592, 596, 600, 603, 605, 608, 614, 618, 621, 624, 629, 631, 634, 635, 641, 645, 648, 651, 656, 658, 659, 660], "returns": [153, 211, 233, 255, 289, 310, 332, 364, 385, 402, 412, 461, 490, 503, 527, 550, 564, 587, 609, 636, 661], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 35, 45, 61, 115, 124, 144, 159, 234, 256, 290, 311, 386, 403, 423, 425, 432, 434, 441, 443, 450, 452, 470, 472, 479, 481, 528, 551, 565, 588, 610, 637, 662], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 73, "universal_type": "function", "name": "hostent", "text_snippet": "struct hostent * gethostbyname(const char * name) {\n\tif (_out_host.h_name) free(_out_host.h_name);\n\t"}, {"node_id": 79, "universal_type": "function", "name": "unknown", "text_snippet": "gethostbyname(const char * name)"}, {"node_id": 214, "universal_type": "function", "name": "connect", "text_snippet": "int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1"}, {"node_id": 216, "universal_type": "function", "name": "sockaddr", "text_snippet": "connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)"}, {"node_id": 235, "universal_type": "function", "name": "*buf,", "text_snippet": "ssize_t recv(int sockfd, void *buf, size_t len, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 237, "universal_type": "function", "name": "*buf,", "text_snippet": "recv(int sockfd, void *buf, size_t len, int flags)"}, {"node_id": 257, "universal_type": "function", "name": "*buf,", "text_snippet": "ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t "}, {"node_id": 259, "universal_type": "function", "name": "*buf,", "text_snippet": "recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen"}, {"node_id": 291, "universal_type": "function", "name": "msghdr", "text_snippet": "ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 293, "universal_type": "function", "name": "msghdr", "text_snippet": "recvmsg(int sockfd, struct msghdr *msg, int flags)"}, {"node_id": 312, "universal_type": "function", "name": "*buf,", "text_snippet": "ssize_t send(int sockfd, const void *buf, size_t len, int flags) {\n\tUNIMPLEMENTED;\n\treturn len;\n}"}, {"node_id": 314, "universal_type": "function", "name": "*buf,", "text_snippet": "send(int sockfd, const void *buf, size_t len, int flags)"}, {"node_id": 334, "universal_type": "function", "name": "*buf,", "text_snippet": "ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr,"}, {"node_id": 336, "universal_type": "function", "name": "*buf,", "text_snippet": "sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen"}, {"node_id": 366, "universal_type": "function", "name": "msghdr", "text_snippet": "ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 368, "universal_type": "function", "name": "msghdr", "text_snippet": "sendmsg(int sockfd, const struct msghdr *msg, int flags)"}, {"node_id": 387, "universal_type": "function", "name": "socket", "text_snippet": "int socket(int domain, int type, int protocol) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 389, "universal_type": "function", "name": "type,", "text_snippet": "socket(int domain, int type, int protocol)"}, {"node_id": 404, "universal_type": "function", "name": "unknown", "text_snippet": "uint32_t htonl(uint32_t hostlong) {\n\treturn ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) <"}, {"node_id": 406, "universal_type": "function", "name": "unknown", "text_snippet": "htonl(uint32_t hostlong)"}, {"node_id": 453, "universal_type": "function", "name": "unknown", "text_snippet": "uint16_t htons(uint16_t hostshort) {\n\treturn ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00)"}, {"node_id": 455, "universal_type": "function", "name": "unknown", "text_snippet": "htons(uint16_t hostshort)"}, {"node_id": 482, "universal_type": "function", "name": "unknown", "text_snippet": "uint32_t ntohl(uint32_t netlong) {\n\treturn htonl(netlong);\n}"}, {"node_id": 484, "universal_type": "function", "name": "unknown", "text_snippet": "ntohl(uint32_t netlong)"}, {"node_id": 495, "universal_type": "function", "name": "unknown", "text_snippet": "uint16_t ntohs(uint16_t netshort) {\n\treturn htons(netshort);\n}"}, {"node_id": 497, "universal_type": "function", "name": "unknown", "text_snippet": "ntohs(uint16_t netshort)"}, {"node_id": 508, "universal_type": "function", "name": "bind", "text_snippet": "int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 510, "universal_type": "function", "name": "sockaddr", "text_snippet": "bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)"}, {"node_id": 529, "universal_type": "function", "name": "accept", "text_snippet": "int accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 531, "universal_type": "function", "name": "sockaddr", "text_snippet": "accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen)"}, {"node_id": 552, "universal_type": "function", "name": "listen", "text_snippet": "int listen(int sockfd, int backlog) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}"}, {"node_id": 554, "universal_type": "function", "name": "backlog)", "text_snippet": "listen(int sockfd, int backlog)"}, {"node_id": 566, "universal_type": "function", "name": "getsockname", "text_snippet": "int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;"}, {"node_id": 568, "universal_type": "function", "name": "sockaddr", "text_snippet": "getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen)"}, {"node_id": 589, "universal_type": "function", "name": "getpeername", "text_snippet": "int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n\treturn -1;\n}"}, {"node_id": 591, "universal_type": "function", "name": "sockaddr", "text_snippet": "getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen)"}, {"node_id": 611, "universal_type": "function", "name": "getsockopt", "text_snippet": "int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) {\n\tUNIMPLEMENTED"}, {"node_id": 613, "universal_type": "function", "name": "level,", "text_snippet": "getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)"}, {"node_id": 638, "universal_type": "function", "name": "setsockopt", "text_snippet": "int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) {\n\tUNIMPLEM"}, {"node_id": 640, "universal_type": "function", "name": "level,", "text_snippet": "setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)"}], "class_declarations": [{"node_id": 28, "universal_type": "class", "name": "hostent", "text_snippet": "struct hostent"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 37, "universal_type": "class", "name": "in_addr", "text_snippet": "struct in_addr"}, {"node_id": 38, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 53, "universal_type": "class", "name": "in_addr", "text_snippet": "struct in_addr"}, {"node_id": 54, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 74, "universal_type": "class", "name": "hostent", "text_snippet": "struct hostent"}, {"node_id": 75, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 163, "universal_type": "class", "name": "in_addr", "text_snippet": "struct in_addr"}, {"node_id": 164, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 223, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 224, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 277, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 278, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 300, "universal_type": "class", "name": "msghdr", "text_snippet": "struct msghdr"}, {"node_id": 301, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 354, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 355, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 375, "universal_type": "class", "name": "msghdr", "text_snippet": "struct msghdr"}, {"node_id": 376, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 517, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 518, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 538, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 539, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 575, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 576, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 598, "universal_type": "class", "name": "sockaddr", "text_snippet": "struct sockaddr"}, {"node_id": 599, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdint.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <stdlib.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <string.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <fcntl.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <unistd.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <sys/ioctl.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <sys/types.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <sys/socket.h>\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "/*\n * socket methods (mostly unimplemented)\n */\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fcntl.h>\n#include <unistd.h>\n#include <sys/ioctl.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n\n\nstatic struct hostent _out_host = {0};\nstatic struct in_addr * _out_host_vector[2] = {NULL, NULL};\nstatic struct in_addr * _out_host_aliases[1] = {NULL};\nstatic uint32_t _out_addr;\n\n#define UNIMPLEMENTED fprintf(stderr, \"[libnetwork] Unimplemented: %s\\n\", __FUNCTION__)\n\nstruct hostent * gethostbyname(const char * name) {\n\tif (_out_host.h_name) free(_out_host.h_name);\n\t_out_host.h_name = strdup(name);\n\tint fd = open(\"/dev/net\",O_RDONLY);\n\tvoid * args[2] = {(void *)name,&_out_addr};\n\tint ret = ioctl(fd, 0x5000, args);\n\tclose(fd);\n\tif (ret) return NULL;\n\n\t_out_host_vector[0] = (struct in_addr *)&_out_addr;\n\t_out_host.h_aliases = (char **)&_out_host_aliases;\n\t_out_host.h_addrtype = AF_INET;\n\t_out_host.h_addr_list = (char**)_out_host_vector;\n\t_out_host.h_length = sizeof(uint32_t);\n\treturn &_out_host;\n}\n\nint connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\n/* All of these should just be reads. */\nssize_t recv(int sockfd, void *buf, size_t len, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\nssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\nssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nssize_t send(int sockfd, const void *buf, size_t len, int flags) {\n\tUNIMPLEMENTED;\n\treturn len;\n}\nssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn len;\n}\nssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nint socket(int domain, int type, int protocol) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nuint32_t htonl(uint32_t hostlong) {\n\treturn ( (((hostlong) & 0xFF) << 24) | (((hostlong) & 0xFF00) << 8) | (((hostlong) & 0xFF0000) >> 8) | (((hostlong) & 0xFF000000) >> 24));\n}\n\nuint16_t htons(uint16_t hostshort) {\n\treturn ( (((hostshort) & 0xFF) << 8) | (((hostshort) & 0xFF00) >> 8) );\n}\n\nuint32_t ntohl(uint32_t netlong) {\n\treturn htonl(netlong);\n}\n\nuint16_t ntohs(uint16_t netshort) {\n\treturn htons(netshort);\n}\n\nint bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nint accept(int sockfd, struct sockaddr * addr, socklen_t * addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nint listen(int sockfd, int backlog) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nint getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nint getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {\n\treturn -1;\n}\n\nint getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\nint setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) {\n\tUNIMPLEMENTED;\n\treturn -1;\n}\n\n\n"}
281
c
int f(int x) { if (x > 10) { sleep(5); } return x+1; }
11.5
6
(translation_unit) "int f(int x) {\n if (x > 10) {\n sleep(5);\n }\n return x+1;\n}\n\n" (function_definition) "int f(int x) {\n if (x > 10) {\n sleep(5);\n }\n return x+1;\n}" (primitive_type) "int" (function_declarator) "f(int x)" (identifier) "f" (parameter_list) "(int x)" (() "(" (parameter_declaration) "int x" (primitive_type) "int" (identifier) "x" ()) ")" (compound_statement) "{\n if (x > 10) {\n sleep(5);\n }\n return x+1;\n}" ({) "{" (if_statement) "if (x > 10) {\n sleep(5);\n }" (if) "if" (parenthesized_expression) "(x > 10)" (() "(" (binary_expression) "x > 10" (identifier) "x" (>) ">" (number_literal) "10" ()) ")" (compound_statement) "{\n sleep(5);\n }" ({) "{" (expression_statement) "sleep(5);" (call_expression) "sleep(5)" (identifier) "sleep" (argument_list) "(5)" (() "(" (number_literal) "5" ()) ")" (;) ";" (}) "}" (return_statement) "return x+1;" (return) "return" (binary_expression) "x+1" (identifier) "x" (+) "+" (number_literal) "1" (;) ";" (}) "}"
41
0
{"language": "c", "success": true, "metadata": {"lines": 6, "avg_line_length": 11.5, "nodes": 23, "errors": 0, "source_hash": "cd04e1d5ebb4062518b1a9c818a83eccecedb93883755551f9425ec83cc5d5b4", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "function_definition", "text": "int f(int x) {\n if (x > 10) {\n sleep(5);\n }\n return x+1;\n}", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 5, "column": 1}}, {"id": 1, "type": "primitive_type", "text": "int", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 3}}, {"id": 2, "type": "function_declarator", "text": "f(int x)", "parent": 0, "children": [3, 4], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "identifier", "text": "f", "parent": 2, "children": [], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 5}}, {"id": 4, "type": "parameter_list", "text": "(int x)", "parent": 2, "children": [5], "start_point": {"row": 0, "column": 5}, "end_point": {"row": 0, "column": 12}}, {"id": 5, "type": "parameter_declaration", "text": "int x", "parent": 4, "children": [6, 7], "start_point": {"row": 0, "column": 6}, "end_point": {"row": 0, "column": 11}}, {"id": 6, "type": "primitive_type", "text": "int", "parent": 5, "children": [], "start_point": {"row": 0, "column": 6}, "end_point": {"row": 0, "column": 9}}, {"id": 7, "type": "identifier", "text": "x", "parent": 5, "children": [], "start_point": {"row": 0, "column": 10}, "end_point": {"row": 0, "column": 11}}, {"id": 8, "type": "if_statement", "text": "if (x > 10) {\n sleep(5);\n }", "parent": 0, "children": [9], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 3, "column": 5}}, {"id": 9, "type": "parenthesized_expression", "text": "(x > 10)", "parent": 8, "children": [10], "start_point": {"row": 1, "column": 7}, "end_point": {"row": 1, "column": 15}}, {"id": 10, "type": "binary_expression", "text": "x > 10", "parent": 9, "children": [11, 12, 13], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 14}}, {"id": 11, "type": "identifier", "text": "x", "parent": 10, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 9}}, {"id": 12, "type": ">", "text": ">", "parent": 10, "children": [], "start_point": {"row": 1, "column": 10}, "end_point": {"row": 1, "column": 11}}, {"id": 13, "type": "number_literal", "text": "10", "parent": 10, "children": [], "start_point": {"row": 1, "column": 12}, "end_point": {"row": 1, "column": 14}}, {"id": 14, "type": "call_expression", "text": "sleep(5)", "parent": 8, "children": [15, 16], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 16}}, {"id": 15, "type": "identifier", "text": "sleep", "parent": 14, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 13}}, {"id": 16, "type": "argument_list", "text": "(5)", "parent": 14, "children": [17], "start_point": {"row": 2, "column": 13}, "end_point": {"row": 2, "column": 16}}, {"id": 17, "type": "number_literal", "text": "5", "parent": 16, "children": [], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 15}}, {"id": 18, "type": "return_statement", "text": "return x+1;", "parent": 0, "children": [19], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 15}}, {"id": 19, "type": "binary_expression", "text": "x+1", "parent": 18, "children": [20, 21, 22], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 14}}, {"id": 20, "type": "identifier", "text": "x", "parent": 19, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 12}}, {"id": 21, "type": "+", "text": "+", "parent": 19, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 22, "type": "number_literal", "text": "1", "parent": 19, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 14}}]}, "node_categories": {"declarations": {"functions": [0, 2], "variables": [5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [9, 10, 14, 19], "assignments": [], "loops": [], "conditionals": [3, 7, 8, 11, 15, 20], "returns": [18], "exceptions": []}, "expressions": {"calls": [], "literals": [13, 17, 22], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 0, "universal_type": "function", "name": "f", "text_snippet": "int f(int x) {\n if (x > 10) {\n sleep(5);\n }\n return x+1;\n}"}, {"node_id": 2, "universal_type": "function", "name": "unknown", "text_snippet": "f(int x)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "int f(int x) {\n if (x > 10) {\n sleep(5);\n }\n return x+1;\n}\n\n"}
282
c
#ifndef CLIENT_H #define CLIENT_H #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <unistd.h> #include <errno.h> #include <ctype.h> #include <string.h> #include <memory.h> #include <stdio.h> #include <stdlib.h> #include <dirent.h> #include <fcntl.h> /* ============================================= * 一些宏定义或全局数据 * ============================================= */ #define MAX_SIZE 1024 #define COMMAND_NUM 17 char *CLIENT_INSTRUCTION[]= { "USER", "PASS", "RETR", "STOR", "QUIT", "SYST", "TYPE", "PORT", "PASV", "MKD", "CWD", "PWD", "LIST", "RMD", "RNFR", "RNTO", "REST" }; /* ============================================= * 客户端相关函数 * ============================================= */ //客户端运行的主要控制函数 int client_work(int argc,char **argv); //客户端PORT命令的控制函数 int client_port(char* param,char *ip,int *port); //客户端PASV命令的控制函数 int client_pasv(int sockfd,char *buffer,char *ip,int *port); //客户端RETR命令控制函数 int client_retr(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port); //客户端STOR命令控制函数 int client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port); //客户端LIST命令控制函数 int client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port); /* ============================================= * 基础处理函数 * ============================================= */ //创建套接字并监听 int create_socket(int port); //处理套接字接受请求 int accept_socket(int listenfd); //发送数据 int send_data(int sockfd,char *buf,int bufsize); //从命令行中读取输入 int get_input(char* buffer, int size,char *cmd,char *param); //得到ip地址和端口port int get_ip_port(char *param,char *ip,int *port); #endif
26.18
66
(translation_unit) "#ifndef CLIENT_H\n#define CLIENT_H\n\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n#include <netdb.h> \n\n#include <unistd.h>\n#include <errno.h>\n\n#include <ctype.h>\n#include <string.h>\n#include <memory.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <dirent.h>\n#include <fcntl.h>\n\n/* =============================================\n * 一些宏定义或全局数据\n * =============================================\n */\n#define MAX_SIZE 1024\n#define COMMAND_NUM 17\n\nchar *CLIENT_INSTRUCTION[]=\n{\n "USER", "PASS", \n "RETR", "STOR", \n "QUIT", "SYST", \n "TYPE", "PORT", \n "PASV", "MKD", \n "CWD", "PWD",\n "LIST", "RMD", \n "RNFR", "RNTO",\n "REST" \n};\n\n\n/* =============================================\n * 客户端相关函数\n * =============================================\n */\n\n//客户端运行的主要控制函数\nint client_work(int argc,char **argv);\n\n//客户端PORT命令的控制函数\nint client_port(char* param,char *ip,int *port);\n\n//客户端PASV命令的控制函数\nint client_pasv(int sockfd,char *buffer,char *ip,int *port);\n\n//客户端RETR命令控制函数\nint client_retr(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//客户端STOR命令控制函数\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//客户端LIST命令控制函数\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n\n/* =============================================\n * 基础处理函数\n * =============================================\n */\n//创建套接字并监听\nint create_socket(int port);\n\n//处理套接字接受请求\nint accept_socket(int listenfd);\n\n//发送数据\nint send_data(int sockfd,char *buf,int bufsize);\n\n//从命令行中读取输入\nint get_input(char* buffer, int size,char *cmd,char *param);\n\n//得到ip地址和端口port\nint get_ip_port(char *param,char *ip,int *port);\n\n#endif\n" (preproc_ifdef) "#ifndef CLIENT_H\n#define CLIENT_H\n\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n#include <netdb.h> \n\n#include <unistd.h>\n#include <errno.h>\n\n#include <ctype.h>\n#include <string.h>\n#include <memory.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <dirent.h>\n#include <fcntl.h>\n\n/* =============================================\n * 一些宏定义或全局数据\n * =============================================\n */\n#define MAX_SIZE 1024\n#define COMMAND_NUM 17\n\nchar *CLIENT_INSTRUCTION[]=\n{\n "USER", "PASS", \n "RETR", "STOR", \n "QUIT", "SYST", \n "TYPE", "PORT", \n "PASV", "MKD", \n "CWD", "PWD",\n "LIST", "RMD", \n "RNFR", "RNTO",\n "REST" \n};\n\n\n/* =============================================\n * 客户端相关函数\n * =============================================\n */\n\n//客户端运行的主要控制函数\nint client_work(int argc,char **argv);\n\n//客户端PORT命令的控制函数\nint client_port(char* param,char *ip,int *port);\n\n//客户端PASV命令的控制函数\nint client_pasv(int sockfd,char *buffer,char *ip,int *port);\n\n//客户端RETR命令控制函数\nint client_retr(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//客户端STOR命令控制函数\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//客户端LIST命令控制函数\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n\n/* =============================================\n * 基础处理函数\n * =============================================\n */\n//创建套接字并监听\nint create_socket(int port);\n\n//处理套接字接受请求\nint accept_socket(int listenfd);\n\n//发送数据\nint send_data(int sockfd,char *buf,int bufsize);\n\n//从命令行中读取输入\nint get_input(char* buffer, int size,char *cmd,char *param);\n\n//得到ip地址和端口port\nint get_ip_port(char *param,char *ip,int *port);\n\n#endif\n" (#ifndef) "#ifndef" (identifier) "CLIENT_H" (preproc_def) "#define CLIENT_H\n" (#define) "#define" (identifier) "CLIENT_H" (preproc_include) "#include <sys/socket.h>\n" (#include) "#include" (system_lib_string) "<sys/socket.h>" (preproc_include) "#include <netinet/in.h>\n" (#include) "#include" (system_lib_string) "<netinet/in.h>" (preproc_include) "#include <arpa/inet.h>\n" (#include) "#include" (system_lib_string) "<arpa/inet.h>" (preproc_include) "#include <netdb.h>" (#include) "#include" (system_lib_string) "<netdb.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <ctype.h>\n" (#include) "#include" (system_lib_string) "<ctype.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <memory.h>\n" (#include) "#include" (system_lib_string) "<memory.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 <dirent.h>\n" (#include) "#include" (system_lib_string) "<dirent.h>" (preproc_include) "#include <fcntl.h>\n" (#include) "#include" (system_lib_string) "<fcntl.h>" (comment) "/* =============================================\n * 一些宏定义或全局数据\n * =============================================\n */\n#define MAX_SIZE 10" (preproc_def) "4\n#define COMMAND_NUM " (#define) "4\n#defi" (identifier) "e COMMAN" (preproc_arg) "_NUM" (preproc_def) "17\n\nchar *CLIENT_INSTRU" (#define) "17\n\ncha" (identifier) " *CLIENT_IN" (preproc_arg) "TR" (declaration) "TION[]=\n{\n "USER", "PASS", \n "RETR", "STOR", \n "QUIT", "SYST", \n "TYPE", "PORT", \n "PASV", "MKD", \n "CWD", "PWD",\n "LIST", "RMD", \n "RNFR", "RNTO",\n "REST" \n};\n\n\n/* ==============" (primitive_type) "TION" (init_declarator) "]=\n{\n "USER", "PASS", \n "RETR", "STOR", \n "QUIT", "SYST", \n "TYPE", "PORT", \n "PASV", "MKD", \n "CWD", "PWD",\n "LIST", "RMD", \n "RNFR", "RNTO",\n "REST" \n};\n\n\n/* =============" (pointer_declarator) "]=\n{\n "USER", "PASS"," (*) "]" (array_declarator) "=\n{\n "USER", "PASS"," (identifier) "=\n{\n "USER", "PASS" ([) """ (]) "," (=) " " (initializer_list) " "RETR", "STOR", \n "QUIT", "SYST", \n "TYPE", "PORT", \n "PASV", "MKD", \n "CWD", "PWD",\n "LIST", "RMD", \n "RNFR", "RNTO",\n "REST" \n};\n\n\n/* =============" ({) " " (string_literal) "ETR", " (") "E" (string_content) "TR"," (") " " (,) """ (string_literal) "TOR", " (") "T" (string_content) "OR"," (") " " (,) "\n" (string_literal) "UIT", " (") "U" (string_content) "IT"," (") " " (,) """ (string_literal) "YST", " (") "Y" (string_content) "ST"," (") " " (,) "\n" (string_literal) "YPE", " (") "Y" (string_content) "PE"," (") " " (,) """ (string_literal) "ORT", " (") "O" (string_content) "RT"," (") " " (,) "\n" (string_literal) "ASV", " (") "A" (string_content) "SV"," (") " " (,) """ (string_literal) "KD", \n" (") "K" (string_content) "D", " (") "\n" (,) " " (string_literal) "D", "P" (") "D" (string_content) "", "" (") "P" (,) "W" (string_literal) "",\n "" (") """ (string_content) ",\n " (") """ (,) "L" (string_literal) "", "R" (") """ (string_content) ", "" (") "R" (,) "M" (string_literal) "", \n " (") """ (string_content) ", \n" (") " " (,) """ (string_literal) "FR", "" (") "F" (string_content) "R", " (") """ (,) "R" (string_literal) "TO",\n" (") "T" (string_content) "O"," (") "\n" (,) " " (string_literal) "ST" \n}" (") "S" (string_content) "T" \n" (") "}" (,) ";" (string_literal) "\n\n/* =" (") "\n" (string_content) "\n/* " (") "=" (,) "=" (string_literal) "======" (") "=" (string_content) "====" (") "=" (}) "=" (;) "=" (comment) "============================\n * 客户端相关函数\n * =============================================\n */\n\n//客户端运行的主要控制函数\nint client_work(i" (comment) " argc,char **argv);\n\n//客户端PORT命令的控制函数\n" (declaration) "nt client_port(char* param,char *ip,in" (primitive_type) "nt " (function_declarator) "lient_port(char* param,char *ip,i" (identifier) "lient_port(" (parameter_list) "char* param,char *ip,i" (() "c" (parameter_declaration) "har* par" (primitive_type) "har" (identifier) " par" (,) "a" (parameter_declaration) "m,char *ip," (primitive_type) "m,ch" (pointer_declarator) "r *ip," (*) "r" (pointer_declarator) " *ip," (*) " " (identifier) "*ip," ()) "i" (;) "n" (comment) "*port);\n\n//客户端PASV命令的控制函数\nint client" (declaration) "pasv(int sockfd,char *buffer,char *ip,int *port)" (primitive_type) "pas" (function_declarator) "(int sockfd,char *buffer,char *ip,int *port" (identifier) "(int sockfd" (parameter_list) ",char *buffer,char *ip,int *port" (() "," (parameter_declaration) "char *buffe" (primitive_type) "char" (pointer_declarator) " *buffe" (*) " " (identifier) "buffe" (,) "r" (parameter_declaration) ",char *i" (primitive_type) ",cha" (pointer_declarator) " *i" (*) " " (identifier) "*i" (,) "p" (parameter_declaration) ",int *por" (primitive_type) ",in" (pointer_declarator) " *por" (*) " " (identifier) "*por" ()) "t" (;) ")" (comment) "\n//客户端RETR命令控制函数\nint client_retr(int" (declaration) "sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,in" (primitive_type) "soc" (function_declarator) "fd,char *buffer,char *param,int is_PORT,char *PORT_ip,i" (identifier) "fd,char *bu" (parameter_list) "ffer,char *param,int is_PORT,char *PORT_ip,i" (() "f" (parameter_declaration) "fer,char *" (primitive_type) "fer" (identifier) "char *" (,) "p" (parameter_declaration) "aram,int is_" (primitive_type) "aram" (pointer_declarator) "int is_" (*) "i" (identifier) "nt is_" (,) "P" (parameter_declaration) "ORT,char" (primitive_type) "ORT," (pointer_declarator) "har" (*) "h" (identifier) "ar" (,) " " (parameter_declaration) "*PORT_ip," (primitive_type) "*PO" (pointer_declarator) "T_ip," (*) "T" (identifier) "_ip," ()) "i" (;) "n" (comment) "PORT_port,int is_PASV,char * PASV" (declaration) "ip,int PASV_port);\n\n//客户端STOR命令控制函数\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is" (primitive_type) "ip," (function_declarator) "nt PASV_port);\n\n//客户端STOR命令控制函数\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int i" (identifier) "nt PASV_por" (parameter_list) "t);\n\n//客户端STOR命令控制函数\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int i" (() "t" (parameter_declaration) ");\n\n//客户端S" (primitive_type) ");\n" (identifier) "//客户端S" (,) "T" (parameter_declaration) "OR命令控制函数\nint" (primitive_type) "OR命令" (pointer_declarator) "制函数\nint" (*) "制" (identifier) "函数\nint" (,) " " (parameter_declaration) "client_stor" (primitive_type) "clie" (pointer_declarator) "t_stor" (*) "t" (identifier) "_stor" (,) "(" (parameter_declaration) "int sockfd," (primitive_type) "int" (identifier) "sockfd," (,) "c" (parameter_declaration) "har *buffer,c" (primitive_type) "har " (pointer_declarator) "buffer,c" (*) "b" (identifier) "uffer,c" (,) "h" (parameter_declaration) "ar *param,int" (primitive_type) "ar " (identifier) "param,int" (,) " " (parameter_declaration) "is_PORT,cha" (primitive_type) "is_" (identifier) "ORT,cha" (,) "r" (parameter_declaration) " *PORT_ip,int " (primitive_type) " *PO" (pointer_declarator) "T_ip,int " (*) "T" (identifier) "ip,int " (,) "P" (parameter_declaration) "ORT_port,int " (primitive_type) "ORT" (identifier) "port,int " ()) "i" (;) "s" (comment) "ASV,char * PASV_ip,int PASV_port)" (declaration) "\n\n//客户端LIST命令控制函数\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_" (primitive_type) "\n\n/" (function_declarator) "客户端LIST命令控制函数\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV" (identifier) "客户端LIST命令控制" (parameter_list) "函数\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV" (() "函" (parameter_declaration) "数\nint clie" (primitive_type) "数\ni" (identifier) "t clie" (,) "n" (parameter_declaration) "t_list(int s" (primitive_type) "t_li" (pointer_declarator) "t(int s" (*) "t" (identifier) "(int s" (,) "o" (parameter_declaration) "ckfd,char *" (primitive_type) "ckfd" (pointer_declarator) "char *" (*) "c" (identifier) "har *" (,) "b" (parameter_declaration) "uffer,int i" (primitive_type) "uff" (identifier) "r,int i" (,) "s" (parameter_declaration) "_PORT,char *P" (primitive_type) "_POR" (pointer_declarator) ",char *P" (*) "," (identifier) "char *P" (,) "O" (parameter_declaration) "RT_ip,int POR" (primitive_type) "RT_" (identifier) "p,int POR" (,) "T" (parameter_declaration) "_port,int i" (primitive_type) "_po" (identifier) "t,int i" (,) "s" (parameter_declaration) "_PASV,char * P" (primitive_type) "_PAS" (pointer_declarator) ",char * P" (*) "," (identifier) "har * P" (,) "A" (parameter_declaration) "SV_ip,int PAS" (primitive_type) "SV_" (identifier) "p,int PAS" ()) "V" (;) "_" (comment) "rt);\n\n\n/* =======================" (declaration) "=====================\n * 基础处理函数\n * =============================================\n */\n//创建套接字并监听\nint create_socket(int port" (primitive_type) "===" (function_declarator) "=================\n * 基础处理函数\n * =============================================\n */\n//创建套接字并监听\nint create_socket(int por" (identifier) "===========" (parameter_list) "======\n * 基础处理函数\n * =============================================\n */\n//创建套接字并监听\nint create_socket(int por" (() "=" (parameter_declaration) "=====\n * 基" (primitive_type) "===" (identifier) "=\n * 基" (,) "础" (parameter_declaration) "处理函数\n * ====" (primitive_type) "处理函数" (pointer_declarator) " * ====" (*) " " (identifier) "* ====" (,) "=" (parameter_declaration) "===========" (primitive_type) "===" (identifier) "=======" (,) "=" (parameter_declaration) "=============" (primitive_type) "====" (pointer_declarator) "========" (*) "=" (identifier) "=======" (,) "=" (parameter_declaration) "=============" (primitive_type) "===" (identifier) "=========" (,) "=" (parameter_declaration) "\n */\n//创建套接" (primitive_type) "\n *" (identifier) "\n//创建套接" (,) "字" (parameter_declaration) "并监听\nint create" (primitive_type) "并监听\n" (pointer_declarator) "nt create" (*) "n" (identifier) " create" (,) "_" (parameter_declaration) "socket(int po" (primitive_type) "soc" (identifier) "et(int po" ()) "r" (;) "t" (comment) "\n//处理套接字接受请求\nint accept_socket(int listenfd);\n\n//发送数据\nint send_data(int sockfd,char *buf,int bufsize);\n\n//从命令行中读取输入\nint get" (comment) "input(char* buffer, int si" (declaration) "e,char *cmd,char *param);\n\n/" (primitive_type) "e,c" (function_declarator) "ar *cmd,char *param);\n\n" (identifier) "ar *cmd,char " (parameter_list) "*param);\n\n" (() "*" (parameter_declaration) "param);\n" (primitive_type) "par" (identifier) "m);\n" ()) "\n" (;) "/" (comment) "到ip地址和端口port\nint get_ip_port(" (declaration) "har *param,char *ip,int *port);\n" (primitive_type) "har" (function_declarator) "*param,char *ip,int *port);" (identifier) "*param,char *" (parameter_list) "ip,int *port);" (() "i" (parameter_declaration) "p,int *port)" (primitive_type) "p,i" (identifier) "t *port)" ()) ";" (;) "\n" (comment) "endif\n" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (primitive_type) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (identifier) "" ()) "" (;) "" (comment) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" ()) "" (;) "" (comment) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" ()) "" (;) "" (#endif) ""
484
0
{"language": "c", "success": true, "metadata": {"lines": 66, "avg_line_length": 26.18, "nodes": 325, "errors": 0, "source_hash": "71bcb1b9707257b5a9b5b87602191b88a3ead564e5000f18f3baffb5f574e1e0", "categorized_nodes": 192}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CLIENT_H\n#define CLIENT_H\n\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n#include <netdb.h>\t\n\n#include <unistd.h>\n#include <errno.h>\n\n#include <ctype.h>\n#include <string.h>\n#include <memory.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <dirent.h>\n#include <fcntl.h>\n\n/* =============================================\n * \u4e00\u4e9b\u5b8f\u5b9a\u4e49\u6216\u5168\u5c40\u6570\u636e\n * =============================================\n */\n#define MAX_SIZE 1024\n#define COMMAND_NUM 17\n\nchar *CLIENT_INSTRUCTION[]=\n{\n\t\"USER\",\t\"PASS\", \n\t\"RETR\", \"STOR\", \n\t\"QUIT\", \"SYST\", \n\t\"TYPE\", \"PORT\", \n\t\"PASV\", \"MKD\", \n\t\"CWD\", \"PWD\",\n\t\"LIST\", \"RMD\", \n\t\"RNFR\", \"RNTO\",\n\t\"REST\" \n};\n\n\n/* =============================================\n * \u5ba2\u6237\u7aef\u76f8\u5173\u51fd\u6570\n * =============================================\n */\n\n//\u5ba2\u6237\u7aef\u8fd0\u884c\u7684\u4e3b\u8981\u63a7\u5236\u51fd\u6570\nint client_work(int argc,char **argv);\n\n//\u5ba2\u6237\u7aefPORT\u547d\u4ee4\u7684\u63a7\u5236\u51fd\u6570\nint client_port(char* param,char *ip,int *port);\n\n//\u5ba2\u6237\u7aefPASV\u547d\u4ee4\u7684\u63a7\u5236\u51fd\u6570\nint client_pasv(int sockfd,char *buffer,char *ip,int *port);\n\n//\u5ba2\u6237\u7aefRETR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_retr(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//\u5ba2\u6237\u7aefSTOR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//\u5ba2\u6237\u7aefLIST\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n\n/* =============================================\n * \u57fa\u7840\u5904\u7406\u51fd\u6570\n * =============================================\n */\n//\u521b\u5efa\u5957\u63a5\u5b57\u5e76\u76d1\u542c\nint create_socket(int port);\n\n//\u5904\u7406\u5957\u63a5\u5b57\u63a5\u53d7\u8bf7\u6c42\nint accept_socket(int listenfd);\n\n//\u53d1\u9001\u6570\u636e\nint send_data(int sockfd,char *buf,int bufsize);\n\n//\u4ece\u547d\u4ee4\u884c\u4e2d\u8bfb\u53d6\u8f93\u5165\nint get_input(char* buffer, int size,char *cmd,char *param);\n\n//\u5f97\u5230ip\u5730\u5740\u548c\u7aef\u53e3port\nint get_ip_port(char *param,char *ip,int *port);\n\n#endif\n", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 49, 53, 78, 93, 113, 136, 176, 214, 249, 257, 265, 281, 304, 324], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 83, "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": "CLIENT_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define CLIENT_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": "CLIENT_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <sys/socket.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": "<sys/socket.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include <netinet/in.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": "<netinet/in.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <arpa/inet.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": "<arpa/inet.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 22}}, {"id": 15, "type": "preproc_include", "text": "#include <netdb.h>", "parent": 0, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 18}}, {"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": "<netdb.h>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": 0, "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": "system_lib_string", "text": "<unistd.h>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 21, "type": "preproc_include", "text": "#include <errno.h>\n", "parent": 0, "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": "system_lib_string", "text": "<errno.h>", "parent": 21, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 24, "type": "preproc_include", "text": "#include <ctype.h>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<ctype.h>", "parent": 24, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 18}}, {"id": 27, "type": "preproc_include", "text": "#include <string.h>\n", "parent": 0, "children": [28, 29], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<string.h>", "parent": 27, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 30, "type": "preproc_include", "text": "#include <memory.h>\n", "parent": 0, "children": [31, 32], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<memory.h>", "parent": 30, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 33, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": 0, "children": [34, 35], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 35, "type": "system_lib_string", "text": "<stdio.h>", "parent": 33, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 36, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": 0, "children": [37, 38], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 38, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 36, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 19}}, {"id": 39, "type": "preproc_include", "text": "#include <dirent.h>\n", "parent": 0, "children": [40, 41], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<dirent.h>", "parent": 39, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 19}}, {"id": 42, "type": "preproc_include", "text": "#include <fcntl.h>\n", "parent": 0, "children": [43, 44], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 44, "type": "system_lib_string", "text": "<fcntl.h>", "parent": 42, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 18}}, {"id": 45, "type": "preproc_def", "text": "4\n#define COMMAND_NUM ", "parent": 0, "children": [46, 47, 48], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 46, "type": "#define", "text": "4\n#defi", "parent": 45, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 47, "type": "identifier", "text": "e COMMAN", "parent": 45, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 48, "type": "preproc_arg", "text": "_NUM", "parent": 45, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 21}}, {"id": 49, "type": "preproc_def", "text": "17\n\nchar *CLIENT_INSTRU", "parent": 0, "children": [50, 51, 52], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 50, "type": "#define", "text": "17\n\ncha", "parent": 49, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 51, "type": "identifier", "text": " *CLIENT_IN", "parent": 49, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 19}}, {"id": 52, "type": "preproc_arg", "text": "TR", "parent": 49, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 22}}, {"id": 53, "type": "declaration", "text": "TION[]=\n{\n\t\"USER\",\t\"PASS\", \n\t\"RETR\", \"STOR\", \n\t\"QUIT\", \"SYST\", \n\t\"TYPE\", \"PORT\", \n\t\"PASV\", \"MKD\", \n\t\"CWD\", \"PWD\",\n\t\"LIST\", \"RMD\", \n\t\"RNFR\", \"RNTO\",\n\t\"REST\" \n};\n\n\n/* ==============", "parent": 0, "children": [54, 55], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 37, "column": 2}}, {"id": 54, "type": "primitive_type", "text": "TION", "parent": 53, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 4}}, {"id": 55, "type": "init_declarator", "text": "]=\n{\n\t\"USER\",\t\"PASS\", \n\t\"RETR\", \"STOR\", \n\t\"QUIT\", \"SYST\", \n\t\"TYPE\", \"PORT\", \n\t\"PASV\", \"MKD\", \n\t\"CWD\", \"PWD\",\n\t\"LIST\", \"RMD\", \n\t\"RNFR\", \"RNTO\",\n\t\"REST\" \n};\n\n\n/* =============", "parent": 53, "children": [56, 59, 60], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 37, "column": 1}}, {"id": 56, "type": "pointer_declarator", "text": "]=\n{\n\t\"USER\",\t\"PASS\",", "parent": 55, "children": [57], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 26}}, {"id": 57, "type": "array_declarator", "text": "=\n{\n\t\"USER\",\t\"PASS\",", "parent": 56, "children": [58], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 26}}, {"id": 58, "type": "identifier", "text": "=\n{\n\t\"USER\",\t\"PASS", "parent": 57, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 24}}, {"id": 59, "type": "=", "text": " ", "parent": 55, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 27}}, {"id": 60, "type": "initializer_list", "text": "\t\"RETR\", \"STOR\", \n\t\"QUIT\", \"SYST\", \n\t\"TYPE\", \"PORT\", \n\t\"PASV\", \"MKD\", \n\t\"CWD\", \"PWD\",\n\t\"LIST\", \"RMD\", \n\t\"RNFR\", \"RNTO\",\n\t\"REST\" \n};\n\n\n/* =============", "parent": 55, "children": [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 61, "type": "string_literal", "text": "ETR\", ", "parent": 60, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 7}}, {"id": 62, "type": "string_literal", "text": "TOR\", ", "parent": 60, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 15}}, {"id": 63, "type": "string_literal", "text": "UIT\", ", "parent": 60, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 7}}, {"id": 64, "type": "string_literal", "text": "YST\", ", "parent": 60, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 15}}, {"id": 65, "type": "string_literal", "text": "YPE\", ", "parent": 60, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 7}}, {"id": 66, "type": "string_literal", "text": "ORT\", ", "parent": 60, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 15}}, {"id": 67, "type": "string_literal", "text": "ASV\", ", "parent": 60, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 7}}, {"id": 68, "type": "string_literal", "text": "KD\", \n", "parent": 60, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 15}}, {"id": 69, "type": "string_literal", "text": "D\", \"P", "parent": 60, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 7}}, {"id": 70, "type": "string_literal", "text": "\",\n\t\"", "parent": 60, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 14}}, {"id": 71, "type": "string_literal", "text": "\", \"R", "parent": 60, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 6}}, {"id": 72, "type": "string_literal", "text": "\", \n\t", "parent": 60, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 13}}, {"id": 73, "type": "string_literal", "text": "FR\", \"", "parent": 60, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 7}}, {"id": 74, "type": "string_literal", "text": "TO\",\n", "parent": 60, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 14}}, {"id": 75, "type": "string_literal", "text": "ST\" \n}", "parent": 60, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 76, "type": "string_literal", "text": "\n\n/* =", "parent": 60, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 15}}, {"id": 77, "type": "string_literal", "text": "======", "parent": 60, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 7}}, {"id": 78, "type": "declaration", "text": "nt client_port(char* param,char *ip,in", "parent": 0, "children": [79, 80], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 38}}, {"id": 79, "type": "primitive_type", "text": "nt ", "parent": 78, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 3}}, {"id": 80, "type": "function_declarator", "text": "lient_port(char* param,char *ip,i", "parent": 78, "children": [81, 82], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 37}}, {"id": 81, "type": "identifier", "text": "lient_port(", "parent": 80, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 15}}, {"id": 82, "type": "parameter_list", "text": "char* param,char *ip,i", "parent": 80, "children": [83, 86], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 37}}, {"id": 83, "type": "parameter_declaration", "text": "har* par", "parent": 82, "children": [84, 85], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 24}}, {"id": 84, "type": "primitive_type", "text": "har", "parent": 83, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 19}}, {"id": 85, "type": "identifier", "text": " par", "parent": 83, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 24}}, {"id": 86, "type": "parameter_declaration", "text": "m,char *ip,", "parent": 82, "children": [87, 88], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 36}}, {"id": 87, "type": "primitive_type", "text": "m,ch", "parent": 86, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 29}}, {"id": 88, "type": "pointer_declarator", "text": "r *ip,", "parent": 86, "children": [89, 90], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 36}}, {"id": 89, "type": "*", "text": "r", "parent": 88, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 31}}, {"id": 90, "type": "pointer_declarator", "text": " *ip,", "parent": 88, "children": [91, 92], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 36}}, {"id": 91, "type": "*", "text": " ", "parent": 90, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 32}}, {"id": 92, "type": "identifier", "text": "*ip,", "parent": 90, "children": [], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 36}}, {"id": 93, "type": "declaration", "text": "pasv(int sockfd,char *buffer,char *ip,int *port)", "parent": 0, "children": [94, 95], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 48}}, {"id": 94, "type": "primitive_type", "text": "pas", "parent": 93, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 95, "type": "function_declarator", "text": "(int sockfd,char *buffer,char *ip,int *port", "parent": 93, "children": [96, 97], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 47}}, {"id": 96, "type": "identifier", "text": "(int sockfd", "parent": 95, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 15}}, {"id": 97, "type": "parameter_list", "text": ",char *buffer,char *ip,int *port", "parent": 95, "children": [98, 103, 108], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 47}}, {"id": 98, "type": "parameter_declaration", "text": "char *buffe", "parent": 97, "children": [99, 100], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 27}}, {"id": 99, "type": "primitive_type", "text": "char", "parent": 98, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 20}}, {"id": 100, "type": "pointer_declarator", "text": " *buffe", "parent": 98, "children": [101, 102], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 27}}, {"id": 101, "type": "*", "text": " ", "parent": 100, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 21}}, {"id": 102, "type": "identifier", "text": "buffe", "parent": 100, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 27}}, {"id": 103, "type": "parameter_declaration", "text": ",char *i", "parent": 97, "children": [104, 105], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 36}}, {"id": 104, "type": "primitive_type", "text": ",cha", "parent": 103, "children": [], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 32}}, {"id": 105, "type": "pointer_declarator", "text": " *i", "parent": 103, "children": [106, 107], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 36}}, {"id": 106, "type": "*", "text": " ", "parent": 105, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 34}}, {"id": 107, "type": "identifier", "text": "*i", "parent": 105, "children": [], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 36}}, {"id": 108, "type": "parameter_declaration", "text": ",int *por", "parent": 97, "children": [109, 110], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 46}}, {"id": 109, "type": "primitive_type", "text": ",in", "parent": 108, "children": [], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 40}}, {"id": 110, "type": "pointer_declarator", "text": " *por", "parent": 108, "children": [111, 112], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 46}}, {"id": 111, "type": "*", "text": " ", "parent": 110, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 42}}, {"id": 112, "type": "identifier", "text": "*por", "parent": 110, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 46}}, {"id": 113, "type": "declaration", "text": "sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,in", "parent": 0, "children": [114, 115], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 60}}, {"id": 114, "type": "primitive_type", "text": "soc", "parent": 113, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 3}}, {"id": 115, "type": "function_declarator", "text": "fd,char *buffer,char *param,int is_PORT,char *PORT_ip,i", "parent": 113, "children": [116, 117], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 59}}, {"id": 116, "type": "identifier", "text": "fd,char *bu", "parent": 115, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 15}}, {"id": 117, "type": "parameter_list", "text": "ffer,char *param,int is_PORT,char *PORT_ip,i", "parent": 115, "children": [118, 121, 126, 131], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 59}}, {"id": 118, "type": "parameter_declaration", "text": "fer,char *", "parent": 117, "children": [119, 120], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 26}}, {"id": 119, "type": "primitive_type", "text": "fer", "parent": 118, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 19}}, {"id": 120, "type": "identifier", "text": "char *", "parent": 118, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 26}}, {"id": 121, "type": "parameter_declaration", "text": "aram,int is_", "parent": 117, "children": [122, 123], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 39}}, {"id": 122, "type": "primitive_type", "text": "aram", "parent": 121, "children": [], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 31}}, {"id": 123, "type": "pointer_declarator", "text": "int is_", "parent": 121, "children": [124, 125], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 39}}, {"id": 124, "type": "*", "text": "i", "parent": 123, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 33}}, {"id": 125, "type": "identifier", "text": "nt is_", "parent": 123, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 39}}, {"id": 126, "type": "parameter_declaration", "text": "ORT,char", "parent": 117, "children": [127, 128], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 48}}, {"id": 127, "type": "primitive_type", "text": "ORT,", "parent": 126, "children": [], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 44}}, {"id": 128, "type": "pointer_declarator", "text": "har", "parent": 126, "children": [129, 130], "start_point": {"row": 52, "column": 45}, "end_point": {"row": 52, "column": 48}}, {"id": 129, "type": "*", "text": "h", "parent": 128, "children": [], "start_point": {"row": 52, "column": 45}, "end_point": {"row": 52, "column": 46}}, {"id": 130, "type": "identifier", "text": "ar", "parent": 128, "children": [], "start_point": {"row": 52, "column": 46}, "end_point": {"row": 52, "column": 48}}, {"id": 131, "type": "parameter_declaration", "text": "*PORT_ip,", "parent": 117, "children": [132, 133], "start_point": {"row": 52, "column": 49}, "end_point": {"row": 52, "column": 58}}, {"id": 132, "type": "primitive_type", "text": "*PO", "parent": 131, "children": [], "start_point": {"row": 52, "column": 49}, "end_point": {"row": 52, "column": 52}}, {"id": 133, "type": "pointer_declarator", "text": "T_ip,", "parent": 131, "children": [134, 135], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 58}}, {"id": 134, "type": "*", "text": "T", "parent": 133, "children": [], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 54}}, {"id": 135, "type": "identifier", "text": "_ip,", "parent": 133, "children": [], "start_point": {"row": 52, "column": 54}, "end_point": {"row": 52, "column": 58}}, {"id": 136, "type": "declaration", "text": "ip,int PASV_port);\n\n//\u5ba2\u6237\u7aefSTOR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is", "parent": 0, "children": [137, 138], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 134}}, {"id": 137, "type": "primitive_type", "text": "ip,", "parent": 136, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 3}}, {"id": 138, "type": "function_declarator", "text": "nt PASV_port);\n\n//\u5ba2\u6237\u7aefSTOR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int i", "parent": 136, "children": [139, 140], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 133}}, {"id": 139, "type": "identifier", "text": "nt PASV_por", "parent": 138, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 15}}, {"id": 140, "type": "parameter_list", "text": "t);\n\n//\u5ba2\u6237\u7aefSTOR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int i", "parent": 138, "children": [141, 144, 149, 154, 157, 162, 165, 168, 173], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 133}}, {"id": 141, "type": "parameter_declaration", "text": ");\n\n//\u5ba2\u6237\u7aefS", "parent": 140, "children": [142, 143], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 26}}, {"id": 142, "type": "primitive_type", "text": ");\n", "parent": 141, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 19}}, {"id": 143, "type": "identifier", "text": "//\u5ba2\u6237\u7aefS", "parent": 141, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 26}}, {"id": 144, "type": "parameter_declaration", "text": "OR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint", "parent": 140, "children": [145, 146], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 39}}, {"id": 145, "type": "primitive_type", "text": "OR\u547d\u4ee4", "parent": 144, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 31}}, {"id": 146, "type": "pointer_declarator", "text": "\u5236\u51fd\u6570\nint", "parent": 144, "children": [147, 148], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 39}}, {"id": 147, "type": "*", "text": "\u5236", "parent": 146, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 33}}, {"id": 148, "type": "identifier", "text": "\u51fd\u6570\nint", "parent": 146, "children": [], "start_point": {"row": 55, "column": 33}, "end_point": {"row": 55, "column": 39}}, {"id": 149, "type": "parameter_declaration", "text": "client_stor", "parent": 140, "children": [150, 151], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 51}}, {"id": 150, "type": "primitive_type", "text": "clie", "parent": 149, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 44}}, {"id": 151, "type": "pointer_declarator", "text": "t_stor", "parent": 149, "children": [152, 153], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 51}}, {"id": 152, "type": "*", "text": "t", "parent": 151, "children": [], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 46}}, {"id": 153, "type": "identifier", "text": "_stor", "parent": 151, "children": [], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 51}}, {"id": 154, "type": "parameter_declaration", "text": "int sockfd,", "parent": 140, "children": [155, 156], "start_point": {"row": 55, "column": 52}, "end_point": {"row": 55, "column": 63}}, {"id": 155, "type": "primitive_type", "text": "int", "parent": 154, "children": [], "start_point": {"row": 55, "column": 52}, "end_point": {"row": 55, "column": 55}}, {"id": 156, "type": "identifier", "text": "sockfd,", "parent": 154, "children": [], "start_point": {"row": 55, "column": 56}, "end_point": {"row": 55, "column": 63}}, {"id": 157, "type": "parameter_declaration", "text": "har *buffer,c", "parent": 140, "children": [158, 159], "start_point": {"row": 55, "column": 64}, "end_point": {"row": 55, "column": 77}}, {"id": 158, "type": "primitive_type", "text": "har ", "parent": 157, "children": [], "start_point": {"row": 55, "column": 64}, "end_point": {"row": 55, "column": 68}}, {"id": 159, "type": "pointer_declarator", "text": "buffer,c", "parent": 157, "children": [160, 161], "start_point": {"row": 55, "column": 69}, "end_point": {"row": 55, "column": 77}}, {"id": 160, "type": "*", "text": "b", "parent": 159, "children": [], "start_point": {"row": 55, "column": 69}, "end_point": {"row": 55, "column": 70}}, {"id": 161, "type": "identifier", "text": "uffer,c", "parent": 159, "children": [], "start_point": {"row": 55, "column": 70}, "end_point": {"row": 55, "column": 77}}, {"id": 162, "type": "parameter_declaration", "text": "ar *param,int", "parent": 140, "children": [163, 164], "start_point": {"row": 55, "column": 78}, "end_point": {"row": 55, "column": 91}}, {"id": 163, "type": "primitive_type", "text": "ar ", "parent": 162, "children": [], "start_point": {"row": 55, "column": 78}, "end_point": {"row": 55, "column": 81}}, {"id": 164, "type": "identifier", "text": "param,int", "parent": 162, "children": [], "start_point": {"row": 55, "column": 82}, "end_point": {"row": 55, "column": 91}}, {"id": 165, "type": "parameter_declaration", "text": "is_PORT,cha", "parent": 140, "children": [166, 167], "start_point": {"row": 55, "column": 92}, "end_point": {"row": 55, "column": 103}}, {"id": 166, "type": "primitive_type", "text": "is_", "parent": 165, "children": [], "start_point": {"row": 55, "column": 92}, "end_point": {"row": 55, "column": 95}}, {"id": 167, "type": "identifier", "text": "ORT,cha", "parent": 165, "children": [], "start_point": {"row": 55, "column": 96}, "end_point": {"row": 55, "column": 103}}, {"id": 168, "type": "parameter_declaration", "text": " *PORT_ip,int ", "parent": 140, "children": [169, 170], "start_point": {"row": 55, "column": 104}, "end_point": {"row": 55, "column": 118}}, {"id": 169, "type": "primitive_type", "text": " *PO", "parent": 168, "children": [], "start_point": {"row": 55, "column": 104}, "end_point": {"row": 55, "column": 108}}, {"id": 170, "type": "pointer_declarator", "text": "T_ip,int ", "parent": 168, "children": [171, 172], "start_point": {"row": 55, "column": 109}, "end_point": {"row": 55, "column": 118}}, {"id": 171, "type": "*", "text": "T", "parent": 170, "children": [], "start_point": {"row": 55, "column": 109}, "end_point": {"row": 55, "column": 110}}, {"id": 172, "type": "identifier", "text": "ip,int ", "parent": 170, "children": [], "start_point": {"row": 55, "column": 111}, "end_point": {"row": 55, "column": 118}}, {"id": 173, "type": "parameter_declaration", "text": "ORT_port,int ", "parent": 140, "children": [174, 175], "start_point": {"row": 55, "column": 119}, "end_point": {"row": 55, "column": 132}}, {"id": 174, "type": "primitive_type", "text": "ORT", "parent": 173, "children": [], "start_point": {"row": 55, "column": 119}, "end_point": {"row": 55, "column": 122}}, {"id": 175, "type": "identifier", "text": "port,int ", "parent": 173, "children": [], "start_point": {"row": 55, "column": 123}, "end_point": {"row": 55, "column": 132}}, {"id": 176, "type": "declaration", "text": "\n\n//\u5ba2\u6237\u7aefLIST\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_", "parent": 0, "children": [177, 178], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 134}}, {"id": 177, "type": "primitive_type", "text": "\n\n/", "parent": 176, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 3}}, {"id": 178, "type": "function_declarator", "text": "\u5ba2\u6237\u7aefLIST\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV", "parent": 176, "children": [179, 180], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 133}}, {"id": 179, "type": "identifier", "text": "\u5ba2\u6237\u7aefLIST\u547d\u4ee4\u63a7\u5236", "parent": 178, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 15}}, {"id": 180, "type": "parameter_list", "text": "\u51fd\u6570\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV", "parent": 178, "children": [181, 184, 189, 194, 197, 201, 204, 207, 211], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 133}}, {"id": 181, "type": "parameter_declaration", "text": "\u6570\nint clie", "parent": 180, "children": [182, 183], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 26}}, {"id": 182, "type": "primitive_type", "text": "\u6570\ni", "parent": 181, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 19}}, {"id": 183, "type": "identifier", "text": "t clie", "parent": 181, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 26}}, {"id": 184, "type": "parameter_declaration", "text": "t_list(int s", "parent": 180, "children": [185, 186], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 39}}, {"id": 185, "type": "primitive_type", "text": "t_li", "parent": 184, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 31}}, {"id": 186, "type": "pointer_declarator", "text": "t(int s", "parent": 184, "children": [187, 188], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 39}}, {"id": 187, "type": "*", "text": "t", "parent": 186, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 33}}, {"id": 188, "type": "identifier", "text": "(int s", "parent": 186, "children": [], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 39}}, {"id": 189, "type": "parameter_declaration", "text": "ckfd,char *", "parent": 180, "children": [190, 191], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 51}}, {"id": 190, "type": "primitive_type", "text": "ckfd", "parent": 189, "children": [], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 44}}, {"id": 191, "type": "pointer_declarator", "text": "char *", "parent": 189, "children": [192, 193], "start_point": {"row": 58, "column": 45}, "end_point": {"row": 58, "column": 51}}, {"id": 192, "type": "*", "text": "c", "parent": 191, "children": [], "start_point": {"row": 58, "column": 45}, "end_point": {"row": 58, "column": 46}}, {"id": 193, "type": "identifier", "text": "har *", "parent": 191, "children": [], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 51}}, {"id": 194, "type": "parameter_declaration", "text": "uffer,int i", "parent": 180, "children": [195, 196], "start_point": {"row": 58, "column": 52}, "end_point": {"row": 58, "column": 63}}, {"id": 195, "type": "primitive_type", "text": "uff", "parent": 194, "children": [], "start_point": {"row": 58, "column": 52}, "end_point": {"row": 58, "column": 55}}, {"id": 196, "type": "identifier", "text": "r,int i", "parent": 194, "children": [], "start_point": {"row": 58, "column": 56}, "end_point": {"row": 58, "column": 63}}, {"id": 197, "type": "parameter_declaration", "text": "_PORT,char *P", "parent": 180, "children": [198, 199], "start_point": {"row": 58, "column": 64}, "end_point": {"row": 58, "column": 77}}, {"id": 198, "type": "primitive_type", "text": "_POR", "parent": 197, "children": [], "start_point": {"row": 58, "column": 64}, "end_point": {"row": 58, "column": 68}}, {"id": 199, "type": "pointer_declarator", "text": ",char *P", "parent": 197, "children": [200], "start_point": {"row": 58, "column": 69}, "end_point": {"row": 58, "column": 77}}, {"id": 200, "type": "identifier", "text": "char *P", "parent": 199, "children": [], "start_point": {"row": 58, "column": 70}, "end_point": {"row": 58, "column": 77}}, {"id": 201, "type": "parameter_declaration", "text": "RT_ip,int POR", "parent": 180, "children": [202, 203], "start_point": {"row": 58, "column": 78}, "end_point": {"row": 58, "column": 91}}, {"id": 202, "type": "primitive_type", "text": "RT_", "parent": 201, "children": [], "start_point": {"row": 58, "column": 78}, "end_point": {"row": 58, "column": 81}}, {"id": 203, "type": "identifier", "text": "p,int POR", "parent": 201, "children": [], "start_point": {"row": 58, "column": 82}, "end_point": {"row": 58, "column": 91}}, {"id": 204, "type": "parameter_declaration", "text": "_port,int i", "parent": 180, "children": [205, 206], "start_point": {"row": 58, "column": 92}, "end_point": {"row": 58, "column": 103}}, {"id": 205, "type": "primitive_type", "text": "_po", "parent": 204, "children": [], "start_point": {"row": 58, "column": 92}, "end_point": {"row": 58, "column": 95}}, {"id": 206, "type": "identifier", "text": "t,int i", "parent": 204, "children": [], "start_point": {"row": 58, "column": 96}, "end_point": {"row": 58, "column": 103}}, {"id": 207, "type": "parameter_declaration", "text": "_PASV,char * P", "parent": 180, "children": [208, 209], "start_point": {"row": 58, "column": 104}, "end_point": {"row": 58, "column": 118}}, {"id": 208, "type": "primitive_type", "text": "_PAS", "parent": 207, "children": [], "start_point": {"row": 58, "column": 104}, "end_point": {"row": 58, "column": 108}}, {"id": 209, "type": "pointer_declarator", "text": ",char * P", "parent": 207, "children": [210], "start_point": {"row": 58, "column": 109}, "end_point": {"row": 58, "column": 118}}, {"id": 210, "type": "identifier", "text": "har * P", "parent": 209, "children": [], "start_point": {"row": 58, "column": 111}, "end_point": {"row": 58, "column": 118}}, {"id": 211, "type": "parameter_declaration", "text": "SV_ip,int PAS", "parent": 180, "children": [212, 213], "start_point": {"row": 58, "column": 119}, "end_point": {"row": 58, "column": 132}}, {"id": 212, "type": "primitive_type", "text": "SV_", "parent": 211, "children": [], "start_point": {"row": 58, "column": 119}, "end_point": {"row": 58, "column": 122}}, {"id": 213, "type": "identifier", "text": "p,int PAS", "parent": 211, "children": [], "start_point": {"row": 58, "column": 123}, "end_point": {"row": 58, "column": 132}}, {"id": 214, "type": "declaration", "text": "=====================\n * \u57fa\u7840\u5904\u7406\u51fd\u6570\n * =============================================\n */\n//\u521b\u5efa\u5957\u63a5\u5b57\u5e76\u76d1\u542c\nint create_socket(int port", "parent": 0, "children": [215, 216], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 122}}, {"id": 215, "type": "primitive_type", "text": "===", "parent": 214, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 3}}, {"id": 216, "type": "function_declarator", "text": "=================\n * \u57fa\u7840\u5904\u7406\u51fd\u6570\n * =============================================\n */\n//\u521b\u5efa\u5957\u63a5\u5b57\u5e76\u76d1\u542c\nint create_socket(int por", "parent": 214, "children": [217, 218], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 121}}, {"id": 217, "type": "identifier", "text": "===========", "parent": 216, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 15}}, {"id": 218, "type": "parameter_list", "text": "======\n * \u57fa\u7840\u5904\u7406\u51fd\u6570\n * =============================================\n */\n//\u521b\u5efa\u5957\u63a5\u5b57\u5e76\u76d1\u542c\nint create_socket(int por", "parent": 216, "children": [219, 222, 227, 230, 235, 238, 241, 246], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 121}}, {"id": 219, "type": "parameter_declaration", "text": "=====\n * \u57fa", "parent": 218, "children": [220, 221], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 26}}, {"id": 220, "type": "primitive_type", "text": "===", "parent": 219, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 19}}, {"id": 221, "type": "identifier", "text": "=\n * \u57fa", "parent": 219, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 26}}, {"id": 222, "type": "parameter_declaration", "text": "\u5904\u7406\u51fd\u6570\n * ====", "parent": 218, "children": [223, 224], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 39}}, {"id": 223, "type": "primitive_type", "text": "\u5904\u7406\u51fd\u6570", "parent": 222, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 31}}, {"id": 224, "type": "pointer_declarator", "text": " * ====", "parent": 222, "children": [225, 226], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 61, "column": 39}}, {"id": 225, "type": "*", "text": " ", "parent": 224, "children": [], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 61, "column": 33}}, {"id": 226, "type": "identifier", "text": "* ====", "parent": 224, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 39}}, {"id": 227, "type": "parameter_declaration", "text": "===========", "parent": 218, "children": [228, 229], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 51}}, {"id": 228, "type": "primitive_type", "text": "===", "parent": 227, "children": [], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 43}}, {"id": 229, "type": "identifier", "text": "=======", "parent": 227, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 51}}, {"id": 230, "type": "parameter_declaration", "text": "=============", "parent": 218, "children": [231, 232], "start_point": {"row": 61, "column": 52}, "end_point": {"row": 61, "column": 65}}, {"id": 231, "type": "primitive_type", "text": "====", "parent": 230, "children": [], "start_point": {"row": 61, "column": 52}, "end_point": {"row": 61, "column": 56}}, {"id": 232, "type": "pointer_declarator", "text": "========", "parent": 230, "children": [233, 234], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 65}}, {"id": 233, "type": "*", "text": "=", "parent": 232, "children": [], "start_point": {"row": 61, "column": 57}, "end_point": {"row": 61, "column": 58}}, {"id": 234, "type": "identifier", "text": "=======", "parent": 232, "children": [], "start_point": {"row": 61, "column": 58}, "end_point": {"row": 61, "column": 65}}, {"id": 235, "type": "parameter_declaration", "text": "=============", "parent": 218, "children": [236, 237], "start_point": {"row": 61, "column": 66}, "end_point": {"row": 61, "column": 79}}, {"id": 236, "type": "primitive_type", "text": "===", "parent": 235, "children": [], "start_point": {"row": 61, "column": 66}, "end_point": {"row": 61, "column": 69}}, {"id": 237, "type": "identifier", "text": "=========", "parent": 235, "children": [], "start_point": {"row": 61, "column": 70}, "end_point": {"row": 61, "column": 79}}, {"id": 238, "type": "parameter_declaration", "text": "\n */\n//\u521b\u5efa\u5957\u63a5", "parent": 218, "children": [239, 240], "start_point": {"row": 61, "column": 80}, "end_point": {"row": 61, "column": 91}}, {"id": 239, "type": "primitive_type", "text": "\n *", "parent": 238, "children": [], "start_point": {"row": 61, "column": 80}, "end_point": {"row": 61, "column": 83}}, {"id": 240, "type": "identifier", "text": "\n//\u521b\u5efa\u5957\u63a5", "parent": 238, "children": [], "start_point": {"row": 61, "column": 84}, "end_point": {"row": 61, "column": 91}}, {"id": 241, "type": "parameter_declaration", "text": "\u5e76\u76d1\u542c\nint create", "parent": 218, "children": [242, 243], "start_point": {"row": 61, "column": 92}, "end_point": {"row": 61, "column": 106}}, {"id": 242, "type": "primitive_type", "text": "\u5e76\u76d1\u542c\n", "parent": 241, "children": [], "start_point": {"row": 61, "column": 92}, "end_point": {"row": 61, "column": 96}}, {"id": 243, "type": "pointer_declarator", "text": "nt create", "parent": 241, "children": [244, 245], "start_point": {"row": 61, "column": 97}, "end_point": {"row": 61, "column": 106}}, {"id": 244, "type": "*", "text": "n", "parent": 243, "children": [], "start_point": {"row": 61, "column": 97}, "end_point": {"row": 61, "column": 98}}, {"id": 245, "type": "identifier", "text": " create", "parent": 243, "children": [], "start_point": {"row": 61, "column": 99}, "end_point": {"row": 61, "column": 106}}, {"id": 246, "type": "parameter_declaration", "text": "socket(int po", "parent": 218, "children": [247, 248], "start_point": {"row": 61, "column": 107}, "end_point": {"row": 61, "column": 120}}, {"id": 247, "type": "primitive_type", "text": "soc", "parent": 246, "children": [], "start_point": {"row": 61, "column": 107}, "end_point": {"row": 61, "column": 110}}, {"id": 248, "type": "identifier", "text": "et(int po", "parent": 246, "children": [], "start_point": {"row": 61, "column": 111}, "end_point": {"row": 61, "column": 120}}, {"id": 249, "type": "declaration", "text": "e,char *cmd,char *param);\n\n/", "parent": 0, "children": [250, 251], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 28}}, {"id": 250, "type": "primitive_type", "text": "e,c", "parent": 249, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 3}}, {"id": 251, "type": "function_declarator", "text": "ar *cmd,char *param);\n\n", "parent": 249, "children": [252, 253], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 27}}, {"id": 252, "type": "identifier", "text": "ar *cmd,char ", "parent": 251, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 17}}, {"id": 253, "type": "parameter_list", "text": "*param);\n\n", "parent": 251, "children": [254], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 27}}, {"id": 254, "type": "parameter_declaration", "text": "param);\n", "parent": 253, "children": [255, 256], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 26}}, {"id": 255, "type": "primitive_type", "text": "par", "parent": 254, "children": [], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 21}}, {"id": 256, "type": "identifier", "text": "m);\n", "parent": 254, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 26}}, {"id": 257, "type": "declaration", "text": "har *param,char *ip,int *port);\n", "parent": 0, "children": [258, 259], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 32}}, {"id": 258, "type": "primitive_type", "text": "har", "parent": 257, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 3}}, {"id": 259, "type": "function_declarator", "text": "*param,char *ip,int *port);", "parent": 257, "children": [260, 261], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 31}}, {"id": 260, "type": "identifier", "text": "*param,char *", "parent": 259, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 17}}, {"id": 261, "type": "parameter_list", "text": "ip,int *port);", "parent": 259, "children": [262], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 31}}, {"id": 262, "type": "parameter_declaration", "text": "p,int *port)", "parent": 261, "children": [263, 264], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 30}}, {"id": 263, "type": "primitive_type", "text": "p,i", "parent": 262, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 21}}, {"id": 264, "type": "identifier", "text": "t *port)", "parent": 262, "children": [], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 30}}, {"id": 265, "type": "declaration", "text": "", "parent": 0, "children": [266, 267], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 48}}, {"id": 266, "type": "primitive_type", "text": "", "parent": 265, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 3}}, {"id": 267, "type": "function_declarator", "text": "", "parent": 265, "children": [268, 269], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 47}}, {"id": 268, "type": "identifier", "text": "", "parent": 267, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 13}}, {"id": 269, "type": "parameter_list", "text": "", "parent": 267, "children": [270, 273, 278], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 47}}, {"id": 270, "type": "parameter_declaration", "text": "", "parent": 269, "children": [271, 272], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 24}}, {"id": 271, "type": "primitive_type", "text": "", "parent": 270, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 17}}, {"id": 272, "type": "identifier", "text": "", "parent": 270, "children": [], "start_point": {"row": 75, "column": 18}, "end_point": {"row": 75, "column": 24}}, {"id": 273, "type": "parameter_declaration", "text": "", "parent": 269, "children": [274, 275], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 34}}, {"id": 274, "type": "primitive_type", "text": "", "parent": 273, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 29}}, {"id": 275, "type": "pointer_declarator", "text": "", "parent": 273, "children": [276, 277], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 34}}, {"id": 276, "type": "*", "text": "", "parent": 275, "children": [], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 31}}, {"id": 277, "type": "identifier", "text": "", "parent": 275, "children": [], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 34}}, {"id": 278, "type": "parameter_declaration", "text": "", "parent": 269, "children": [279, 280], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 46}}, {"id": 279, "type": "primitive_type", "text": "", "parent": 278, "children": [], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 38}}, {"id": 280, "type": "identifier", "text": "", "parent": 278, "children": [], "start_point": {"row": 75, "column": 39}, "end_point": {"row": 75, "column": 46}}, {"id": 281, "type": "declaration", "text": "", "parent": 0, "children": [282, 283], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 60}}, {"id": 282, "type": "primitive_type", "text": "", "parent": 281, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 3}}, {"id": 283, "type": "function_declarator", "text": "", "parent": 281, "children": [284, 285], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 59}}, {"id": 284, "type": "identifier", "text": "", "parent": 283, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 13}}, {"id": 285, "type": "parameter_list", "text": "", "parent": 283, "children": [286, 291, 294, 299], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 59}}, {"id": 286, "type": "parameter_declaration", "text": "", "parent": 285, "children": [287, 288], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 26}}, {"id": 287, "type": "primitive_type", "text": "", "parent": 286, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 18}}, {"id": 288, "type": "pointer_declarator", "text": "", "parent": 286, "children": [289, 290], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 26}}, {"id": 289, "type": "*", "text": "", "parent": 288, "children": [], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 19}}, {"id": 290, "type": "identifier", "text": "", "parent": 288, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 26}}, {"id": 291, "type": "parameter_declaration", "text": "", "parent": 285, "children": [292, 293], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 36}}, {"id": 292, "type": "primitive_type", "text": "", "parent": 291, "children": [], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 31}}, {"id": 293, "type": "identifier", "text": "", "parent": 291, "children": [], "start_point": {"row": 78, "column": 32}, "end_point": {"row": 78, "column": 36}}, {"id": 294, "type": "parameter_declaration", "text": "", "parent": 285, "children": [295, 296], "start_point": {"row": 78, "column": 37}, "end_point": {"row": 78, "column": 46}}, {"id": 295, "type": "primitive_type", "text": "", "parent": 294, "children": [], "start_point": {"row": 78, "column": 37}, "end_point": {"row": 78, "column": 41}}, {"id": 296, "type": "pointer_declarator", "text": "", "parent": 294, "children": [297, 298], "start_point": {"row": 78, "column": 42}, "end_point": {"row": 78, "column": 46}}, {"id": 297, "type": "*", "text": "", "parent": 296, "children": [], "start_point": {"row": 78, "column": 42}, "end_point": {"row": 78, "column": 43}}, {"id": 298, "type": "identifier", "text": "", "parent": 296, "children": [], "start_point": {"row": 78, "column": 43}, "end_point": {"row": 78, "column": 46}}, {"id": 299, "type": "parameter_declaration", "text": "", "parent": 285, "children": [300, 301], "start_point": {"row": 78, "column": 47}, "end_point": {"row": 78, "column": 58}}, {"id": 300, "type": "primitive_type", "text": "", "parent": 299, "children": [], "start_point": {"row": 78, "column": 47}, "end_point": {"row": 78, "column": 51}}, {"id": 301, "type": "pointer_declarator", "text": "", "parent": 299, "children": [302, 303], "start_point": {"row": 78, "column": 52}, "end_point": {"row": 78, "column": 58}}, {"id": 302, "type": "*", "text": "", "parent": 301, "children": [], "start_point": {"row": 78, "column": 52}, "end_point": {"row": 78, "column": 53}}, {"id": 303, "type": "identifier", "text": "", "parent": 301, "children": [], "start_point": {"row": 78, "column": 53}, "end_point": {"row": 78, "column": 58}}, {"id": 304, "type": "declaration", "text": "", "parent": 0, "children": [305, 306], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 48}}, {"id": 305, "type": "primitive_type", "text": "", "parent": 304, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 3}}, {"id": 306, "type": "function_declarator", "text": "", "parent": 304, "children": [307, 308], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 47}}, {"id": 307, "type": "identifier", "text": "", "parent": 306, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 15}}, {"id": 308, "type": "parameter_list", "text": "", "parent": 306, "children": [309, 314, 319], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 47}}, {"id": 309, "type": "parameter_declaration", "text": "", "parent": 308, "children": [310, 311], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 27}}, {"id": 310, "type": "primitive_type", "text": "", "parent": 309, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 20}}, {"id": 311, "type": "pointer_declarator", "text": "", "parent": 309, "children": [312, 313], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 27}}, {"id": 312, "type": "*", "text": "", "parent": 311, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 22}}, {"id": 313, "type": "identifier", "text": "", "parent": 311, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 27}}, {"id": 314, "type": "parameter_declaration", "text": "", "parent": 308, "children": [315, 316], "start_point": {"row": 81, "column": 28}, "end_point": {"row": 81, "column": 36}}, {"id": 315, "type": "primitive_type", "text": "", "parent": 314, "children": [], "start_point": {"row": 81, "column": 28}, "end_point": {"row": 81, "column": 32}}, {"id": 316, "type": "pointer_declarator", "text": "", "parent": 314, "children": [317, 318], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 36}}, {"id": 317, "type": "*", "text": "", "parent": 316, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 34}}, {"id": 318, "type": "identifier", "text": "", "parent": 316, "children": [], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 36}}, {"id": 319, "type": "parameter_declaration", "text": "", "parent": 308, "children": [320, 321], "start_point": {"row": 81, "column": 37}, "end_point": {"row": 81, "column": 46}}, {"id": 320, "type": "primitive_type", "text": "", "parent": 319, "children": [], "start_point": {"row": 81, "column": 37}, "end_point": {"row": 81, "column": 40}}, {"id": 321, "type": "pointer_declarator", "text": "", "parent": 319, "children": [322, 323], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 46}}, {"id": 322, "type": "*", "text": "", "parent": 321, "children": [], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 42}}, {"id": 323, "type": "identifier", "text": "", "parent": 321, "children": [], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 46}}, {"id": 324, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 6}}]}, "node_categories": {"declarations": {"functions": [80, 95, 115, 138, 178, 216, 251, 259, 267, 283, 306], "variables": [53, 78, 83, 86, 93, 98, 103, 108, 113, 118, 121, 126, 131, 136, 141, 144, 149, 154, 157, 162, 165, 168, 173, 176, 181, 184, 189, 194, 197, 201, 204, 207, 211, 214, 219, 222, 227, 230, 235, 238, 241, 246, 249, 254, 257, 262, 265, 270, 273, 278, 281, 286, 291, 294, 299, 304, 309, 314, 319], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 47, 51, 58, 81, 85, 92, 96, 102, 107, 112, 116, 120, 125, 130, 135, 139, 143, 148, 153, 156, 161, 164, 167, 172, 175, 179, 183, 188, 193, 196, 200, 203, 206, 210, 213, 217, 221, 226, 229, 234, 237, 240, 245, 248, 252, 256, 260, 264, 268, 272, 277, 280, 284, 290, 293, 298, 303, 307, 313, 318, 323, 324], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "lient_port(char* param,char *ip,i"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "(int sockfd,char *buffer,char *ip,int *port"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "fd,char *buffer,char *param,int is_PORT,char *PORT_ip,i"}, {"node_id": 138, "universal_type": "function", "name": "client_stor", "text_snippet": "nt PASV_port);\n\n//\u5ba2\u6237\u7aefSTOR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char"}, {"node_id": 178, "universal_type": "function", "name": "client_list", "text_snippet": "\u5ba2\u6237\u7aefLIST\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is"}, {"node_id": 216, "universal_type": "function", "name": "create_socket", "text_snippet": "=================\n * \u57fa\u7840\u5904\u7406\u51fd\u6570\n * =============================================\n */\n//\u521b\u5efa\u5957\u63a5\u5b57\u5e76\u76d1\u542c\nint crea"}, {"node_id": 251, "universal_type": "function", "name": "unknown", "text_snippet": "ar *cmd,char *param);\n\n"}, {"node_id": 259, "universal_type": "function", "name": "unknown", "text_snippet": "*param,char *ip,int *port);"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <sys/socket.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <netinet/in.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <arpa/inet.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <netdb.h>"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <unistd.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <errno.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <ctype.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <string.h>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <memory.h>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include <stdio.h>\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include <stdlib.h>\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include <dirent.h>\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include <fcntl.h>\n"}, {"node_id": 43, "text": "#include"}]}, "original_source_code": "#ifndef CLIENT_H\n#define CLIENT_H\n\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n#include <netdb.h>\t\n\n#include <unistd.h>\n#include <errno.h>\n\n#include <ctype.h>\n#include <string.h>\n#include <memory.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <dirent.h>\n#include <fcntl.h>\n\n/* =============================================\n * \u4e00\u4e9b\u5b8f\u5b9a\u4e49\u6216\u5168\u5c40\u6570\u636e\n * =============================================\n */\n#define MAX_SIZE 1024\n#define COMMAND_NUM 17\n\nchar *CLIENT_INSTRUCTION[]=\n{\n\t\"USER\",\t\"PASS\", \n\t\"RETR\", \"STOR\", \n\t\"QUIT\", \"SYST\", \n\t\"TYPE\", \"PORT\", \n\t\"PASV\", \"MKD\", \n\t\"CWD\", \"PWD\",\n\t\"LIST\", \"RMD\", \n\t\"RNFR\", \"RNTO\",\n\t\"REST\" \n};\n\n\n/* =============================================\n * \u5ba2\u6237\u7aef\u76f8\u5173\u51fd\u6570\n * =============================================\n */\n\n//\u5ba2\u6237\u7aef\u8fd0\u884c\u7684\u4e3b\u8981\u63a7\u5236\u51fd\u6570\nint client_work(int argc,char **argv);\n\n//\u5ba2\u6237\u7aefPORT\u547d\u4ee4\u7684\u63a7\u5236\u51fd\u6570\nint client_port(char* param,char *ip,int *port);\n\n//\u5ba2\u6237\u7aefPASV\u547d\u4ee4\u7684\u63a7\u5236\u51fd\u6570\nint client_pasv(int sockfd,char *buffer,char *ip,int *port);\n\n//\u5ba2\u6237\u7aefRETR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_retr(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//\u5ba2\u6237\u7aefSTOR\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_stor(int sockfd,char *buffer,char *param,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n//\u5ba2\u6237\u7aefLIST\u547d\u4ee4\u63a7\u5236\u51fd\u6570\nint client_list(int sockfd,char *buffer,int is_PORT,char *PORT_ip,int PORT_port,int is_PASV,char * PASV_ip,int PASV_port);\n\n\n/* =============================================\n * \u57fa\u7840\u5904\u7406\u51fd\u6570\n * =============================================\n */\n//\u521b\u5efa\u5957\u63a5\u5b57\u5e76\u76d1\u542c\nint create_socket(int port);\n\n//\u5904\u7406\u5957\u63a5\u5b57\u63a5\u53d7\u8bf7\u6c42\nint accept_socket(int listenfd);\n\n//\u53d1\u9001\u6570\u636e\nint send_data(int sockfd,char *buf,int bufsize);\n\n//\u4ece\u547d\u4ee4\u884c\u4e2d\u8bfb\u53d6\u8f93\u5165\nint get_input(char* buffer, int size,char *cmd,char *param);\n\n//\u5f97\u5230ip\u5730\u5740\u548c\u7aef\u53e3port\nint get_ip_port(char *param,char *ip,int *port);\n\n#endif\n"}
283
c
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkSlicesInterpolator_h_Included #define QmitkSlicesInterpolator_h_Included #include "mitkSliceNavigationController.h" #include <MitkSegmentationUIExports.h> #include "mitkSegmentationInterpolationController.h" #include "mitkDataNode.h" #include "mitkDataStorage.h" #include "mitkWeakPointer.h" #include "mitkSurfaceInterpolationController.h" #include "mitkToolManager.h" #include <QWidget> #include <map> #include <QComboBox> #include <QFrame> #include <QRadioButton> #include <QGroupBox> #include <QCheckBox> #include "mitkVtkRepresentationProperty.h" #include "vtkProperty.h" //For running 3D interpolation in background #include <QtConcurrentRun> #include <QFuture> #include <QFutureWatcher> #include <QTimer> namespace mitk { class PlaneGeometry; class SliceNavigationController; } class QPushButton; /** \brief GUI for slices interpolation. \ingroup ToolManagerEtAl \ingroup Widgets \sa QmitkInteractiveSegmentation \sa mitk::SegmentationInterpolation There is a separate page describing the general design of QmitkInteractiveSegmentation: \ref QmitkInteractiveSegmentationTechnicalPage While mitk::SegmentationInterpolation does the bookkeeping of interpolation (keeping track of which slices contain how much segmentation) and the algorithmic work, QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently visible. It triggers generation of interpolation suggestions and also triggers acception of suggestions. \todo show/hide feedback on demand Last contributor: $Author: maleike $ */ class MitkSegmentationUI_EXPORT QmitkSlicesInterpolator : public QWidget { Q_OBJECT public: QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0); /** To be called once before real use. */ void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers); void Uninitialize(); virtual ~QmitkSlicesInterpolator(); void SetDataStorage( mitk::DataStorage::Pointer storage ); mitk::DataStorage* GetDataStorage(); /** Just public because it is called by itk::Commands. You should not need to call this. */ void OnToolManagerWorkingDataModified(); /** Just public because it is called by itk::Commands. You should not need to call this. */ void OnToolManagerReferenceDataModified(); void OnTimeChanged(itk::Object* sender, const itk::EventObject&); void OnSliceChanged(itk::Object* sender, const itk::EventObject&); void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& ); /** Just public because it is called by itk::Commands. You should not need to call this. */ void OnInterpolationInfoChanged(const itk::EventObject&); /** Just public because it is called by itk::Commands. You should not need to call this. */ void OnSurfaceInterpolationInfoChanged(const itk::EventObject&); /** * @brief Set the visibility of the 3d interpolation */ void Show3DInterpolationResult(bool); signals: void SignalRememberContourPositions(bool); void SignalShowMarkerNodes(bool); public slots: virtual void setEnabled( bool ); /** Call this from the outside to enable/disable interpolation */ void EnableInterpolation(bool); void Enable3DInterpolation(bool); /** Call this from the outside to accept all interpolations */ void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL); protected slots: /** Reaction to button clicks. */ void OnAcceptInterpolationClicked(); /* Opens popup to ask about which orientation should be interpolated */ void OnAcceptAllInterpolationsClicked(); /* Reaction to button clicks */ void OnAccept3DInterpolationClicked(); /* * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked) */ void OnAcceptAllPopupActivated(QAction* action); /** Called on activation/deactivation */ void OnInterpolationActivated(bool); void On3DInterpolationActivated(bool); void OnInterpolationMethodChanged(int index); //Enhancement for 3D interpolation void On2DInterpolationEnabled(bool); void On3DInterpolationEnabled(bool); void OnInterpolationDisabled(bool); void OnShowMarkers(bool); void Run3DInterpolation(); void OnSurfaceInterpolationFinished(); void StartUpdateInterpolationTimer(); void StopUpdateInterpolationTimer(); void ChangeSurfaceColor(); protected: const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension(); std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION; void AcceptAllInterpolations(mitk::SliceNavigationController* slicer); /** Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController and calls Interpolate to further process this PlaneGeometry into an interpolation. \param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController \param slice the SliceNavigationController */ bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer); /** Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager) should be interpolated. The actual work is then done by our SegmentationInterpolation object. */ void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer ); //void InterpolateSurface(); /** Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation. */ void UpdateVisibleSuggestion(); void SetCurrentContourListID(); private: void HideAllInterpolationControls(); void Show2DInterpolationControls(bool show); void Show3DInterpolationControls(bool show); void CheckSupportedImageDimension(); mitk::SegmentationInterpolationController::Pointer m_Interpolator; mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator; mitk::ToolManager::Pointer m_ToolManager; bool m_Initialized; QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag; QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag; QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag; unsigned int InterpolationInfoChangedObserverTag; unsigned int SurfaceInterpolationInfoChangedObserverTag; QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode; QComboBox* m_CmbInterpolation; QPushButton* m_BtnApply2D; QPushButton* m_BtnApplyForAllSlices2D; QPushButton* m_BtnApply3D; QCheckBox* m_ChkShowPositionNodes; mitk::DataNode::Pointer m_FeedbackNode; mitk::DataNode::Pointer m_InterpolatedSurfaceNode; mitk::DataNode::Pointer m_3DContourNode; mitk::Image* m_Segmentation; mitk::SliceNavigationController* m_LastSNC; unsigned int m_LastSliceIndex; QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep; bool m_2DInterpolationEnabled; bool m_3DInterpolationEnabled; //unsigned int m_CurrentListID; mitk::DataStorage::Pointer m_DataStorage; QFuture<void> m_Future; QFutureWatcher<void> m_Watcher; QTimer* m_Timer; }; #endif
39.7
199
(translation_unit) "/*===================================================================\n\nThe Medical Imaging Interaction Toolkit (MITK)\n\nCopyright (c) German Cancer Research Center,\nDivision of Medical and Biological Informatics.\nAll rights reserved.\n\nThis software is distributed WITHOUT ANY WARRANTY; without\neven the implied warranty of MERCHANTABILITY or FITNESS FOR\nA PARTICULAR PURPOSE.\n\nSee LICENSE.txt or http://www.mitk.org for details.\n\n===================================================================*/\n\n#ifndef QmitkSlicesInterpolator_h_Included\n#define QmitkSlicesInterpolator_h_Included\n\n#include "mitkSliceNavigationController.h"\n#include <MitkSegmentationUIExports.h>\n#include "mitkSegmentationInterpolationController.h"\n#include "mitkDataNode.h"\n#include "mitkDataStorage.h"\n#include "mitkWeakPointer.h"\n#include "mitkSurfaceInterpolationController.h"\n#include "mitkToolManager.h"\n\n#include <QWidget>\n#include <map>\n\n#include <QComboBox>\n#include <QFrame>\n#include <QRadioButton>\n#include <QGroupBox>\n#include <QCheckBox>\n\n#include "mitkVtkRepresentationProperty.h"\n#include "vtkProperty.h"\n\n//For running 3D interpolation in background\n#include <QtConcurrentRun>\n#include <QFuture>\n#include <QFutureWatcher>\n#include <QTimer>\n\n\nnamespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}\n\nclass QPushButton;\n\n\n/**\n \brief GUI for slices interpolation.\n\n \ingroup ToolManagerEtAl\n \ingroup Widgets\n\n \sa QmitkInteractiveSegmentation\n \sa mitk::SegmentationInterpolation\n\n There is a separate page describing the general design of QmitkInteractiveSegmentation: \ref QmitkInteractiveSegmentationTechnicalPage\n\n While mitk::SegmentationInterpolation does the bookkeeping of interpolation\n (keeping track of which slices contain how much segmentation) and the algorithmic work,\n QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently\n visible. It triggers generation of interpolation suggestions and also triggers acception of\n suggestions.\n\n \todo show/hide feedback on demand\n\n Last contributor: $Author: maleike $\n*/\nclass MitkSegmentationUI_EXPORT QmitkSlicesInterpolator : public QWidget\n{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n};\n\n#endif\n\n" (comment) "/*===================================================================\n\nThe Medical Imaging Interaction Toolkit (MITK)\n\nCopyright (c) German Cancer Research Center,\nDivision of Medical and Biological Informatics.\nAll rights reserved.\n\nThis software is distributed WITHOUT ANY WARRANTY; without\neven the implied warranty of MERCHANTABILITY or FITNESS FOR\nA PARTICULAR PURPOSE.\n\nSee LICENSE.txt or http://www.mitk.org for details.\n\n===================================================================*/" (preproc_ifdef) "#ifndef QmitkSlicesInterpolator_h_Included\n#define QmitkSlicesInterpolator_h_Included\n\n#include "mitkSliceNavigationController.h"\n#include <MitkSegmentationUIExports.h>\n#include "mitkSegmentationInterpolationController.h"\n#include "mitkDataNode.h"\n#include "mitkDataStorage.h"\n#include "mitkWeakPointer.h"\n#include "mitkSurfaceInterpolationController.h"\n#include "mitkToolManager.h"\n\n#include <QWidget>\n#include <map>\n\n#include <QComboBox>\n#include <QFrame>\n#include <QRadioButton>\n#include <QGroupBox>\n#include <QCheckBox>\n\n#include "mitkVtkRepresentationProperty.h"\n#include "vtkProperty.h"\n\n//For running 3D interpolation in background\n#include <QtConcurrentRun>\n#include <QFuture>\n#include <QFutureWatcher>\n#include <QTimer>\n\n\nnamespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}\n\nclass QPushButton;\n\n\n/**\n \brief GUI for slices interpolation.\n\n \ingroup ToolManagerEtAl\n \ingroup Widgets\n\n \sa QmitkInteractiveSegmentation\n \sa mitk::SegmentationInterpolation\n\n There is a separate page describing the general design of QmitkInteractiveSegmentation: \ref QmitkInteractiveSegmentationTechnicalPage\n\n While mitk::SegmentationInterpolation does the bookkeeping of interpolation\n (keeping track of which slices contain how much segmentation) and the algorithmic work,\n QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently\n visible. It triggers generation of interpolation suggestions and also triggers acception of\n suggestions.\n\n \todo show/hide feedback on demand\n\n Last contributor: $Author: maleike $\n*/\nclass MitkSegmentationUI_EXPORT QmitkSlicesInterpolator : public QWidget\n{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "QmitkSlicesInterpolator_h_Included" (preproc_def) "#define QmitkSlicesInterpolator_h_Included\n" (#define) "#define" (identifier) "QmitkSlicesInterpolator_h_Included" (preproc_include) "#include "mitkSliceNavigationController.h"\n" (#include) "#include" (string_literal) ""mitkSliceNavigationController.h"" (") """ (string_content) "mitkSliceNavigationController.h" (") """ (preproc_include) "#include <MitkSegmentationUIExports.h>\n" (#include) "#include" (system_lib_string) "<MitkSegmentationUIExports.h>" (preproc_include) "#include "mitkSegmentationInterpolationController.h"\n" (#include) "#include" (string_literal) ""mitkSegmentationInterpolationController.h"" (") """ (string_content) "mitkSegmentationInterpolationController.h" (") """ (preproc_include) "#include "mitkDataNode.h"\n" (#include) "#include" (string_literal) ""mitkDataNode.h"" (") """ (string_content) "mitkDataNode.h" (") """ (preproc_include) "#include "mitkDataStorage.h"\n" (#include) "#include" (string_literal) ""mitkDataStorage.h"" (") """ (string_content) "mitkDataStorage.h" (") """ (preproc_include) "#include "mitkWeakPointer.h"\n" (#include) "#include" (string_literal) ""mitkWeakPointer.h"" (") """ (string_content) "mitkWeakPointer.h" (") """ (preproc_include) "#include "mitkSurfaceInterpolationController.h"\n" (#include) "#include" (string_literal) ""mitkSurfaceInterpolationController.h"" (") """ (string_content) "mitkSurfaceInterpolationController.h" (") """ (preproc_include) "#include "mitkToolManager.h"\n" (#include) "#include" (string_literal) ""mitkToolManager.h"" (") """ (string_content) "mitkToolManager.h" (") """ (preproc_include) "#include <QWidget>\n" (#include) "#include" (system_lib_string) "<QWidget>" (preproc_include) "#include <map>\n" (#include) "#include" (system_lib_string) "<map>" (preproc_include) "#include <QComboBox>\n" (#include) "#include" (system_lib_string) "<QComboBox>" (preproc_include) "#include <QFrame>\n" (#include) "#include" (system_lib_string) "<QFrame>" (preproc_include) "#include <QRadioButton>\n" (#include) "#include" (system_lib_string) "<QRadioButton>" (preproc_include) "#include <QGroupBox>\n" (#include) "#include" (system_lib_string) "<QGroupBox>" (preproc_include) "#include <QCheckBox>\n" (#include) "#include" (system_lib_string) "<QCheckBox>" (preproc_include) "#include "mitkVtkRepresentationProperty.h"\n" (#include) "#include" (string_literal) ""mitkVtkRepresentationProperty.h"" (") """ (string_content) "mitkVtkRepresentationProperty.h" (") """ (preproc_include) "#include "vtkProperty.h"\n" (#include) "#include" (string_literal) ""vtkProperty.h"" (") """ (string_content) "vtkProperty.h" (") """ (comment) "//For running 3D interpolation in background" (preproc_include) "#include <QtConcurrentRun>\n" (#include) "#include" (system_lib_string) "<QtConcurrentRun>" (preproc_include) "#include <QFuture>\n" (#include) "#include" (system_lib_string) "<QFuture>" (preproc_include) "#include <QFutureWatcher>\n" (#include) "#include" (system_lib_string) "<QFutureWatcher>" (preproc_include) "#include <QTimer>\n" (#include) "#include" (system_lib_string) "<QTimer>" (function_definition) "namespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}" (type_identifier) "namespace" (identifier) "mitk" (compound_statement) "{\n class PlaneGeometry;\n class SliceNavigationController;\n}" ({) "{" (declaration) "class PlaneGeometry;" (type_identifier) "class" (identifier) "PlaneGeometry" (;) ";" (declaration) "class SliceNavigationController;" (type_identifier) "class" (identifier) "SliceNavigationController" (;) ";" (}) "}" (declaration) "class QPushButton;" (type_identifier) "class" (identifier) "QPushButton" (;) ";" (comment) "/**\n \brief GUI for slices interpolation.\n\n \ingroup ToolManagerEtAl\n \ingroup Widgets\n\n \sa QmitkInteractiveSegmentation\n \sa mitk::SegmentationInterpolation\n\n There is a separate page describing the general design of QmitkInteractiveSegmentation: \ref QmitkInteractiveSegmentationTechnicalPage\n\n While mitk::SegmentationInterpolation does the bookkeeping of interpolation\n (keeping track of which slices contain how much segmentation) and the algorithmic work,\n QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently\n visible. It triggers generation of interpolation suggestions and also triggers acception of\n suggestions.\n\n \todo show/hide feedback on demand\n\n Last contributor: $Author: maleike $\n*/" (declaration) "class MitkSegmentationUI_EXPORT" (type_identifier) "class" (identifier) "MitkSegmentationUI_EXPORT" (;) "" (labeled_statement) "QmitkSlicesInterpolator : public QWidget\n{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n}" (statement_identifier) "QmitkSlicesInterpolator" (:) ":" (ERROR) "public QWidget" (type_identifier) "public" (identifier) "QWidget" (compound_statement) "{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n}" ({) "{" (declaration) "Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);" (type_identifier) "Q_OBJECT" (ERROR) "public:" (identifier) "public" (:) ":" (init_declarator) "QmitkSlicesInterpolator(QWidget* parent = 0" (function_declarator) "QmitkSlicesInterpolator(QWidget* parent" (identifier) "QmitkSlicesInterpolator" (parameter_list) "(QWidget* parent" (() "(" (parameter_declaration) "QWidget* parent" (type_identifier) "QWidget" (pointer_declarator) "* parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (,) "," (ERROR) "const char" (identifier) "const" (identifier) "char" (init_declarator) "* name = 0" (pointer_declarator) "* name" (*) "*" (identifier) "name" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n To be called once before real use.\n */" (declaration) "void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);" (primitive_type) "void" (function_declarator) "Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers)" (identifier) "Initialize" (parameter_list) "(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers)" (() "(" (parameter_declaration) "mitk::ToolManager* toolManager" (type_identifier) "mitk" (ERROR) "::ToolManager" (:) ":" (:) ":" (identifier) "ToolManager" (pointer_declarator) "* toolManager" (*) "*" (identifier) "toolManager" (,) "," (parameter_declaration) "const QList<mitk::SliceNavigationController*> &controllers" (type_qualifier) "const" (const) "const" (type_identifier) "QList" (ERROR) "<mitk::SliceNavigationController*> &" (<) "<" (identifier) "mitk" (:) ":" (:) ":" (identifier) "SliceNavigationController" (*) "*" (>) ">" (&) "&" (identifier) "controllers" ()) ")" (;) ";" (declaration) "void Uninitialize();" (primitive_type) "void" (function_declarator) "Uninitialize()" (identifier) "Uninitialize" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~QmitkSlicesInterpolator();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "QmitkSlicesInterpolator()" (identifier) "QmitkSlicesInterpolator" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void SetDataStorage( mitk::DataStorage::Pointer storage );" (primitive_type) "void" (function_declarator) "SetDataStorage( mitk::DataStorage::Pointer storage )" (identifier) "SetDataStorage" (parameter_list) "( mitk::DataStorage::Pointer storage )" (() "(" (parameter_declaration) "mitk::DataStorage::Pointer storage" (type_identifier) "mitk" (ERROR) "::DataStorage::Pointer" (:) ":" (:) ":" (identifier) "DataStorage" (:) ":" (:) ":" (identifier) "Pointer" (identifier) "storage" ()) ")" (;) ";" (labeled_statement) "mitk::DataStorage* GetDataStorage();" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (declaration) "DataStorage* GetDataStorage();" (type_identifier) "DataStorage" (pointer_declarator) "* GetDataStorage()" (*) "*" (function_declarator) "GetDataStorage()" (identifier) "GetDataStorage" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n Just public because it is called by itk::Commands. You should not need to call this.\n */" (declaration) "void OnToolManagerWorkingDataModified();" (primitive_type) "void" (function_declarator) "OnToolManagerWorkingDataModified()" (identifier) "OnToolManagerWorkingDataModified" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n Just public because it is called by itk::Commands. You should not need to call this.\n */" (declaration) "void OnToolManagerReferenceDataModified();" (primitive_type) "void" (function_declarator) "OnToolManagerReferenceDataModified()" (identifier) "OnToolManagerReferenceDataModified" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnTimeChanged(itk::Object* sender, const itk::EventObject&);" (primitive_type) "void" (function_declarator) "OnTimeChanged(itk::Object* sender, const itk::EventObject&)" (identifier) "OnTimeChanged" (parameter_list) "(itk::Object* sender, const itk::EventObject&)" (() "(" (parameter_declaration) "itk::Object* sender" (type_identifier) "itk" (ERROR) "::Object" (:) ":" (:) ":" (identifier) "Object" (pointer_declarator) "* sender" (*) "*" (identifier) "sender" (,) "," (parameter_declaration) "const itk::EventObject" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::" (:) ":" (:) ":" (identifier) "EventObject" (ERROR) "&" (&) "&" ()) ")" (;) ";" (declaration) "void OnSliceChanged(itk::Object* sender, const itk::EventObject&);" (primitive_type) "void" (function_declarator) "OnSliceChanged(itk::Object* sender, const itk::EventObject&)" (identifier) "OnSliceChanged" (parameter_list) "(itk::Object* sender, const itk::EventObject&)" (() "(" (parameter_declaration) "itk::Object* sender" (type_identifier) "itk" (ERROR) "::Object" (:) ":" (:) ":" (identifier) "Object" (pointer_declarator) "* sender" (*) "*" (identifier) "sender" (,) "," (parameter_declaration) "const itk::EventObject" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::" (:) ":" (:) ":" (identifier) "EventObject" (ERROR) "&" (&) "&" ()) ")" (;) ";" (declaration) "void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );" (primitive_type) "void" (function_declarator) "OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& )" (identifier) "OnSliceNavigationControllerDeleted" (parameter_list) "(const itk::Object *sender, const itk::EventObject& )" (() "(" (parameter_declaration) "const itk::Object *sender" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::Object" (:) ":" (:) ":" (identifier) "Object" (pointer_declarator) "*sender" (*) "*" (identifier) "sender" (,) "," (parameter_declaration) "const itk::EventObject" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::" (:) ":" (:) ":" (identifier) "EventObject" (ERROR) "&" (&) "&" ()) ")" (;) ";" (comment) "/**\n Just public because it is called by itk::Commands. You should not need to call this.\n */" (declaration) "void OnInterpolationInfoChanged(const itk::EventObject&);" (primitive_type) "void" (function_declarator) "OnInterpolationInfoChanged(const itk::EventObject&)" (identifier) "OnInterpolationInfoChanged" (parameter_list) "(const itk::EventObject&)" (() "(" (parameter_declaration) "const itk::EventObject" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::" (:) ":" (:) ":" (identifier) "EventObject" (ERROR) "&" (&) "&" ()) ")" (;) ";" (comment) "/**\n Just public because it is called by itk::Commands. You should not need to call this.\n */" (declaration) "void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);" (primitive_type) "void" (function_declarator) "OnSurfaceInterpolationInfoChanged(const itk::EventObject&)" (identifier) "OnSurfaceInterpolationInfoChanged" (parameter_list) "(const itk::EventObject&)" (() "(" (parameter_declaration) "const itk::EventObject" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::" (:) ":" (:) ":" (identifier) "EventObject" (ERROR) "&" (&) "&" ()) ")" (;) ";" (comment) "/**\n * @brief Set the visibility of the 3d interpolation\n */" (declaration) "void Show3DInterpolationResult(bool);" (primitive_type) "void" (function_declarator) "Show3DInterpolationResult(bool)" (identifier) "Show3DInterpolationResult" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (labeled_statement) "signals:\n\n void SignalRememberContourPositions(bool);" (statement_identifier) "signals" (:) ":" (declaration) "void SignalRememberContourPositions(bool);" (primitive_type) "void" (function_declarator) "SignalRememberContourPositions(bool)" (identifier) "SignalRememberContourPositions" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void SignalShowMarkerNodes(bool);" (primitive_type) "void" (function_declarator) "SignalShowMarkerNodes(bool)" (identifier) "SignalShowMarkerNodes" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "public slots:\n\n virtual void setEnabled( bool );" (type_identifier) "public" (ERROR) "slots:\n\n virtual void" (identifier) "slots" (:) ":" (identifier) "virtual" (identifier) "void" (function_declarator) "setEnabled( bool )" (identifier) "setEnabled" (parameter_list) "( bool )" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (comment) "/**\n Call this from the outside to enable/disable interpolation\n */" (declaration) "void EnableInterpolation(bool);" (primitive_type) "void" (function_declarator) "EnableInterpolation(bool)" (identifier) "EnableInterpolation" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void Enable3DInterpolation(bool);" (primitive_type) "void" (function_declarator) "Enable3DInterpolation(bool)" (identifier) "Enable3DInterpolation" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (comment) "/**\n Call this from the outside to accept all interpolations\n */" (declaration) "void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);" (primitive_type) "void" (init_declarator) "FinishInterpolation(mitk::SliceNavigationController* slicer = NULL" (function_declarator) "FinishInterpolation(mitk::SliceNavigationController* slicer" (identifier) "FinishInterpolation" (parameter_list) "(mitk::SliceNavigationController* slicer" (() "(" (parameter_declaration) "mitk::SliceNavigationController* slicer" (type_identifier) "mitk" (ERROR) "::SliceNavigationController" (:) ":" (:) ":" (identifier) "SliceNavigationController" (pointer_declarator) "* slicer" (*) "*" (identifier) "slicer" ()) "" (=) "=" (null) "NULL" (NULL) "NULL" (ERROR) ")" ()) ")" (;) ";" (ERROR) "protected slots:" (type_identifier) "protected" (identifier) "slots" (:) ":" (comment) "/**\n Reaction to button clicks.\n */" (declaration) "void OnAcceptInterpolationClicked();" (primitive_type) "void" (function_declarator) "OnAcceptInterpolationClicked()" (identifier) "OnAcceptInterpolationClicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n Opens popup to ask about which orientation should be interpolated\n */" (declaration) "void OnAcceptAllInterpolationsClicked();" (primitive_type) "void" (function_declarator) "OnAcceptAllInterpolationsClicked()" (identifier) "OnAcceptAllInterpolationsClicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n Reaction to button clicks\n */" (declaration) "void OnAccept3DInterpolationClicked();" (primitive_type) "void" (function_declarator) "OnAccept3DInterpolationClicked()" (identifier) "OnAccept3DInterpolationClicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */" (declaration) "void OnAcceptAllPopupActivated(QAction* action);" (primitive_type) "void" (function_declarator) "OnAcceptAllPopupActivated(QAction* action)" (identifier) "OnAcceptAllPopupActivated" (parameter_list) "(QAction* action)" (() "(" (parameter_declaration) "QAction* action" (type_identifier) "QAction" (pointer_declarator) "* action" (*) "*" (identifier) "action" ()) ")" (;) ";" (comment) "/**\n Called on activation/deactivation\n */" (declaration) "void OnInterpolationActivated(bool);" (primitive_type) "void" (function_declarator) "OnInterpolationActivated(bool)" (identifier) "OnInterpolationActivated" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void On3DInterpolationActivated(bool);" (primitive_type) "void" (function_declarator) "On3DInterpolationActivated(bool)" (identifier) "On3DInterpolationActivated" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void OnInterpolationMethodChanged(int index);" (primitive_type) "void" (function_declarator) "OnInterpolationMethodChanged(int index)" (identifier) "OnInterpolationMethodChanged" (parameter_list) "(int index)" (() "(" (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" ()) ")" (;) ";" (comment) "//Enhancement for 3D interpolation" (declaration) "void On2DInterpolationEnabled(bool);" (primitive_type) "void" (function_declarator) "On2DInterpolationEnabled(bool)" (identifier) "On2DInterpolationEnabled" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void On3DInterpolationEnabled(bool);" (primitive_type) "void" (function_declarator) "On3DInterpolationEnabled(bool)" (identifier) "On3DInterpolationEnabled" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void OnInterpolationDisabled(bool);" (primitive_type) "void" (function_declarator) "OnInterpolationDisabled(bool)" (identifier) "OnInterpolationDisabled" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void OnShowMarkers(bool);" (primitive_type) "void" (function_declarator) "OnShowMarkers(bool)" (identifier) "OnShowMarkers" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (;) ";" (declaration) "void Run3DInterpolation();" (primitive_type) "void" (function_declarator) "Run3DInterpolation()" (identifier) "Run3DInterpolation" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void OnSurfaceInterpolationFinished();" (primitive_type) "void" (function_declarator) "OnSurfaceInterpolationFinished()" (identifier) "OnSurfaceInterpolationFinished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void StartUpdateInterpolationTimer();" (primitive_type) "void" (function_declarator) "StartUpdateInterpolationTimer()" (identifier) "StartUpdateInterpolationTimer" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void StopUpdateInterpolationTimer();" (primitive_type) "void" (function_declarator) "StopUpdateInterpolationTimer()" (identifier) "StopUpdateInterpolationTimer" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void ChangeSurfaceColor();" (primitive_type) "void" (function_declarator) "ChangeSurfaceColor()" (identifier) "ChangeSurfaceColor" (parameter_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();" (binary_expression) "protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension()" (identifier) "protected" (ERROR) ":\n\n const std::map<QAction*, mitk::SliceNavigationController*" (:) ":" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (comma_expression) "map<QAction*, mitk" (binary_expression) "map<QAction" (identifier) "map" (<) "<" (identifier) "QAction" (ERROR) "*" (*) "*" (,) "," (identifier) "mitk" (:) ":" (:) ":" (identifier) "SliceNavigationController" (*) "*" (>) ">" (call_expression) "createActionToSliceDimension()" (identifier) "createActionToSliceDimension" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;" (binary_expression) "std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION" (identifier) "std" (ERROR) "::map<QAction*, mitk::SliceNavigationController*" (:) ":" (:) ":" (comma_expression) "map<QAction*, mitk" (binary_expression) "map<QAction" (identifier) "map" (<) "<" (identifier) "QAction" (ERROR) "*" (*) "*" (,) "," (identifier) "mitk" (:) ":" (:) ":" (identifier) "SliceNavigationController" (*) "*" (>) ">" (identifier) "ACTION_TO_SLICEDIMENSION" (;) ";" (declaration) "void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);" (primitive_type) "void" (function_declarator) "AcceptAllInterpolations(mitk::SliceNavigationController* slicer)" (identifier) "AcceptAllInterpolations" (parameter_list) "(mitk::SliceNavigationController* slicer)" (() "(" (parameter_declaration) "mitk::SliceNavigationController* slicer" (type_identifier) "mitk" (ERROR) "::SliceNavigationController" (:) ":" (:) ":" (identifier) "SliceNavigationController" (pointer_declarator) "* slicer" (*) "*" (identifier) "slicer" ()) ")" (;) ";" (comment) "/**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \param slice the SliceNavigationController\n */" (declaration) "bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);" (primitive_type) "bool" (function_declarator) "TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer)" (identifier) "TranslateAndInterpolateChangedSlice" (parameter_list) "(const itk::EventObject& e, mitk::SliceNavigationController* slicer)" (() "(" (parameter_declaration) "const itk::EventObject& e" (type_qualifier) "const" (const) "const" (type_identifier) "itk" (ERROR) "::EventObject&" (:) ":" (:) ":" (identifier) "EventObject" (&) "&" (identifier) "e" (,) "," (parameter_declaration) "mitk::SliceNavigationController* slicer" (type_identifier) "mitk" (ERROR) "::SliceNavigationController" (:) ":" (:) ":" (identifier) "SliceNavigationController" (pointer_declarator) "* slicer" (*) "*" (identifier) "slicer" ()) ")" (;) ";" (comment) "/**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */" (declaration) "void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );" (primitive_type) "void" (function_declarator) "Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer )" (identifier) "Interpolate" (parameter_list) "( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer )" (() "(" (parameter_declaration) "mitk::PlaneGeometry* plane" (type_identifier) "mitk" (ERROR) "::PlaneGeometry" (:) ":" (:) ":" (identifier) "PlaneGeometry" (pointer_declarator) "* plane" (*) "*" (identifier) "plane" (,) "," (parameter_declaration) "unsigned int timeStep" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "timeStep" (,) "," (parameter_declaration) "mitk::SliceNavigationController *slicer" (type_identifier) "mitk" (ERROR) "::SliceNavigationController" (:) ":" (:) ":" (identifier) "SliceNavigationController" (pointer_declarator) "*slicer" (*) "*" (identifier) "slicer" ()) ")" (;) ";" (comment) "//void InterpolateSurface();" (comment) "/**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */" (declaration) "void UpdateVisibleSuggestion();" (primitive_type) "void" (function_declarator) "UpdateVisibleSuggestion()" (identifier) "UpdateVisibleSuggestion" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void SetCurrentContourListID();" (primitive_type) "void" (function_declarator) "SetCurrentContourListID()" (identifier) "SetCurrentContourListID" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n\n void HideAllInterpolationControls();" (statement_identifier) "private" (:) ":" (declaration) "void HideAllInterpolationControls();" (primitive_type) "void" (function_declarator) "HideAllInterpolationControls()" (identifier) "HideAllInterpolationControls" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void Show2DInterpolationControls(bool show);" (primitive_type) "void" (function_declarator) "Show2DInterpolationControls(bool show)" (identifier) "Show2DInterpolationControls" (parameter_list) "(bool show)" (() "(" (parameter_declaration) "bool show" (primitive_type) "bool" (identifier) "show" ()) ")" (;) ";" (declaration) "void Show3DInterpolationControls(bool show);" (primitive_type) "void" (function_declarator) "Show3DInterpolationControls(bool show)" (identifier) "Show3DInterpolationControls" (parameter_list) "(bool show)" (() "(" (parameter_declaration) "bool show" (primitive_type) "bool" (identifier) "show" ()) ")" (;) ";" (declaration) "void CheckSupportedImageDimension();" (primitive_type) "void" (function_declarator) "CheckSupportedImageDimension()" (identifier) "CheckSupportedImageDimension" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "mitk::SegmentationInterpolationController::Pointer m_Interpolator;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "SegmentationInterpolationController::Pointer m_Interpolator;" (statement_identifier) "SegmentationInterpolationController" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_Interpolator;" (type_identifier) "Pointer" (identifier) "m_Interpolator" (;) ";" (labeled_statement) "mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "SurfaceInterpolationController::Pointer m_SurfaceInterpolator;" (statement_identifier) "SurfaceInterpolationController" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_SurfaceInterpolator;" (type_identifier) "Pointer" (identifier) "m_SurfaceInterpolator" (;) ";" (labeled_statement) "mitk::ToolManager::Pointer m_ToolManager;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "ToolManager::Pointer m_ToolManager;" (statement_identifier) "ToolManager" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_ToolManager;" (type_identifier) "Pointer" (identifier) "m_ToolManager" (;) ";" (declaration) "bool m_Initialized;" (primitive_type) "bool" (identifier) "m_Initialized" (;) ";" (ERROR) "QHash<mitk::" (binary_expression) "QHash<mitk" (identifier) "QHash" (<) "<" (identifier) "mitk" (:) ":" (:) ":" (expression_statement) "SliceNavigationController*, int> m_ControllerToTimeObserverTag;" (comma_expression) "SliceNavigationController*, int> m_ControllerToTimeObserverTag" (binary_expression) "SliceNavigationController*" (identifier) "SliceNavigationController" (*) "*" (identifier) "" (,) "," (binary_expression) "int> m_ControllerToTimeObserverTag" (identifier) "int" (>) ">" (identifier) "m_ControllerToTimeObserverTag" (;) ";" (ERROR) "QHash<mitk::" (binary_expression) "QHash<mitk" (identifier) "QHash" (<) "<" (identifier) "mitk" (:) ":" (:) ":" (expression_statement) "SliceNavigationController*, int> m_ControllerToSliceObserverTag;" (comma_expression) "SliceNavigationController*, int> m_ControllerToSliceObserverTag" (binary_expression) "SliceNavigationController*" (identifier) "SliceNavigationController" (*) "*" (identifier) "" (,) "," (binary_expression) "int> m_ControllerToSliceObserverTag" (identifier) "int" (>) ">" (identifier) "m_ControllerToSliceObserverTag" (;) ";" (ERROR) "QHash<mitk::" (binary_expression) "QHash<mitk" (identifier) "QHash" (<) "<" (identifier) "mitk" (:) ":" (:) ":" (expression_statement) "SliceNavigationController*, int> m_ControllerToDeleteObserverTag;" (comma_expression) "SliceNavigationController*, int> m_ControllerToDeleteObserverTag" (binary_expression) "SliceNavigationController*" (identifier) "SliceNavigationController" (*) "*" (identifier) "" (,) "," (binary_expression) "int> m_ControllerToDeleteObserverTag" (identifier) "int" (>) ">" (identifier) "m_ControllerToDeleteObserverTag" (;) ";" (declaration) "unsigned int InterpolationInfoChangedObserverTag;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "InterpolationInfoChangedObserverTag" (;) ";" (declaration) "unsigned int SurfaceInterpolationInfoChangedObserverTag;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "SurfaceInterpolationInfoChangedObserverTag" (;) ";" (declaration) "QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;" (type_identifier) "QGroupBox" (pointer_declarator) "* m_GroupBoxEnableExclusiveInterpolationMode" (*) "*" (identifier) "m_GroupBoxEnableExclusiveInterpolationMode" (;) ";" (declaration) "QComboBox* m_CmbInterpolation;" (type_identifier) "QComboBox" (pointer_declarator) "* m_CmbInterpolation" (*) "*" (identifier) "m_CmbInterpolation" (;) ";" (declaration) "QPushButton* m_BtnApply2D;" (type_identifier) "QPushButton" (pointer_declarator) "* m_BtnApply2D" (*) "*" (identifier) "m_BtnApply2D" (;) ";" (declaration) "QPushButton* m_BtnApplyForAllSlices2D;" (type_identifier) "QPushButton" (pointer_declarator) "* m_BtnApplyForAllSlices2D" (*) "*" (identifier) "m_BtnApplyForAllSlices2D" (;) ";" (declaration) "QPushButton* m_BtnApply3D;" (type_identifier) "QPushButton" (pointer_declarator) "* m_BtnApply3D" (*) "*" (identifier) "m_BtnApply3D" (;) ";" (declaration) "QCheckBox* m_ChkShowPositionNodes;" (type_identifier) "QCheckBox" (pointer_declarator) "* m_ChkShowPositionNodes" (*) "*" (identifier) "m_ChkShowPositionNodes" (;) ";" (labeled_statement) "mitk::DataNode::Pointer m_FeedbackNode;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "DataNode::Pointer m_FeedbackNode;" (statement_identifier) "DataNode" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_FeedbackNode;" (type_identifier) "Pointer" (identifier) "m_FeedbackNode" (;) ";" (labeled_statement) "mitk::DataNode::Pointer m_InterpolatedSurfaceNode;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "DataNode::Pointer m_InterpolatedSurfaceNode;" (statement_identifier) "DataNode" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_InterpolatedSurfaceNode;" (type_identifier) "Pointer" (identifier) "m_InterpolatedSurfaceNode" (;) ";" (labeled_statement) "mitk::DataNode::Pointer m_3DContourNode;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "DataNode::Pointer m_3DContourNode;" (statement_identifier) "DataNode" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_3DContourNode;" (type_identifier) "Pointer" (identifier) "m_3DContourNode" (;) ";" (labeled_statement) "mitk::Image* m_Segmentation;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (declaration) "Image* m_Segmentation;" (type_identifier) "Image" (pointer_declarator) "* m_Segmentation" (*) "*" (identifier) "m_Segmentation" (;) ";" (labeled_statement) "mitk::SliceNavigationController* m_LastSNC;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (declaration) "SliceNavigationController* m_LastSNC;" (type_identifier) "SliceNavigationController" (pointer_declarator) "* m_LastSNC" (*) "*" (identifier) "m_LastSNC" (;) ";" (declaration) "unsigned int m_LastSliceIndex;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "m_LastSliceIndex" (;) ";" (ERROR) "QHash<mitk::SliceNavigationController*," (binary_expression) "QHash<mitk" (identifier) "QHash" (<) "<" (identifier) "mitk" (:) ":" (:) ":" (identifier) "SliceNavigationController" (*) "*" (,) "," (declaration) "unsigned int> m_TimeStep;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) ">" (>) ">" (identifier) "m_TimeStep" (;) ";" (declaration) "bool m_2DInterpolationEnabled;" (primitive_type) "bool" (identifier) "m_2DInterpolationEnabled" (;) ";" (declaration) "bool m_3DInterpolationEnabled;" (primitive_type) "bool" (identifier) "m_3DInterpolationEnabled" (;) ";" (comment) "//unsigned int m_CurrentListID;" (labeled_statement) "mitk::DataStorage::Pointer m_DataStorage;" (statement_identifier) "mitk" (:) ":" (ERROR) ":" (:) ":" (labeled_statement) "DataStorage::Pointer m_DataStorage;" (statement_identifier) "DataStorage" (:) ":" (ERROR) ":" (:) ":" (declaration) "Pointer m_DataStorage;" (type_identifier) "Pointer" (identifier) "m_DataStorage" (;) ";" (expression_statement) "QFuture<void> m_Future;" (binary_expression) "QFuture<void> m_Future" (binary_expression) "QFuture<void" (identifier) "QFuture" (<) "<" (identifier) "void" (>) ">" (identifier) "m_Future" (;) ";" (expression_statement) "QFutureWatcher<void> m_Watcher;" (binary_expression) "QFutureWatcher<void> m_Watcher" (binary_expression) "QFutureWatcher<void" (identifier) "QFutureWatcher" (<) "<" (identifier) "void" (>) ">" (identifier) "m_Watcher" (;) ";" (declaration) "QTimer* m_Timer;" (type_identifier) "QTimer" (pointer_declarator) "* m_Timer" (*) "*" (identifier) "m_Timer" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
1,120
56
{"language": "c", "success": true, "metadata": {"lines": 199, "avg_line_length": 39.7, "nodes": 710, "errors": 0, "source_hash": "9b802995fc8ec886fd065f5664763f4f9c42b15c84593fd506510b64f07b038c", "categorized_nodes": 466}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef QmitkSlicesInterpolator_h_Included\n#define QmitkSlicesInterpolator_h_Included\n\n#include \"mitkSliceNavigationController.h\"\n#include <MitkSegmentationUIExports.h>\n#include \"mitkSegmentationInterpolationController.h\"\n#include \"mitkDataNode.h\"\n#include \"mitkDataStorage.h\"\n#include \"mitkWeakPointer.h\"\n#include \"mitkSurfaceInterpolationController.h\"\n#include \"mitkToolManager.h\"\n\n#include <QWidget>\n#include <map>\n\n#include <QComboBox>\n#include <QFrame>\n#include <QRadioButton>\n#include <QGroupBox>\n#include <QCheckBox>\n\n#include \"mitkVtkRepresentationProperty.h\"\n#include \"vtkProperty.h\"\n\n//For running 3D interpolation in background\n#include <QtConcurrentRun>\n#include <QFuture>\n#include <QFutureWatcher>\n#include <QTimer>\n\n\nnamespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}\n\nclass QPushButton;\n\n\n/**\n \\brief GUI for slices interpolation.\n\n \\ingroup ToolManagerEtAl\n \\ingroup Widgets\n\n \\sa QmitkInteractiveSegmentation\n \\sa mitk::SegmentationInterpolation\n\n There is a separate page describing the general design of QmitkInteractiveSegmentation: \\ref QmitkInteractiveSegmentationTechnicalPage\n\n While mitk::SegmentationInterpolation does the bookkeeping of interpolation\n (keeping track of which slices contain how much segmentation) and the algorithmic work,\n QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently\n visible. It triggers generation of interpolation suggestions and also triggers acception of\n suggestions.\n\n \\todo show/hide feedback on demand\n\n Last contributor: $Author: maleike $\n*/\nclass MitkSegmentationUI_EXPORT QmitkSlicesInterpolator : public QWidget\n{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \\param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \\param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 76, 78, 80, 709], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 277, "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": "QmitkSlicesInterpolator_h_Included", "parent": 0, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 42}}, {"id": 3, "type": "preproc_def", "text": "#define QmitkSlicesInterpolator_h_Included\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": "QmitkSlicesInterpolator_h_Included", "parent": 3, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 42}}, {"id": 6, "type": "preproc_include", "text": "#include \"mitkSliceNavigationController.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"mitkSliceNavigationController.h\"", "parent": 6, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 42}}, {"id": 9, "type": "preproc_include", "text": "#include <MitkSegmentationUIExports.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": "system_lib_string", "text": "<MitkSegmentationUIExports.h>", "parent": 9, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 38}}, {"id": 12, "type": "preproc_include", "text": "#include \"mitkSegmentationInterpolationController.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"mitkSegmentationInterpolationController.h\"", "parent": 12, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 52}}, {"id": 15, "type": "preproc_include", "text": "#include \"mitkDataNode.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"mitkDataNode.h\"", "parent": 15, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 25}}, {"id": 18, "type": "preproc_include", "text": "#include \"mitkDataStorage.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"mitkDataStorage.h\"", "parent": 18, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 28}}, {"id": 21, "type": "preproc_include", "text": "#include \"mitkWeakPointer.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"mitkWeakPointer.h\"", "parent": 21, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 28}}, {"id": 24, "type": "preproc_include", "text": "#include \"mitkSurfaceInterpolationController.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"mitkSurfaceInterpolationController.h\"", "parent": 24, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 47}}, {"id": 27, "type": "preproc_include", "text": "#include \"mitkToolManager.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"mitkToolManager.h\"", "parent": 27, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 28}}, {"id": 30, "type": "preproc_include", "text": "#include <QWidget>\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": "system_lib_string", "text": "<QWidget>", "parent": 30, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 18}}, {"id": 33, "type": "preproc_include", "text": "#include <map>\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": "system_lib_string", "text": "<map>", "parent": 33, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 14}}, {"id": 36, "type": "preproc_include", "text": "#include <QComboBox>\n", "parent": 0, "children": [37, 38], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 38, "type": "system_lib_string", "text": "<QComboBox>", "parent": 36, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 20}}, {"id": 39, "type": "preproc_include", "text": "#include <QFrame>\n", "parent": 0, "children": [40, 41], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<QFrame>", "parent": 39, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 17}}, {"id": 42, "type": "preproc_include", "text": "#include <QRadioButton>\n", "parent": 0, "children": [43, 44], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 44, "type": "system_lib_string", "text": "<QRadioButton>", "parent": 42, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 23}}, {"id": 45, "type": "preproc_include", "text": "#include <QGroupBox>\n", "parent": 0, "children": [46, 47], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 46, "type": "#include", "text": "#include", "parent": 45, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 47, "type": "system_lib_string", "text": "<QGroupBox>", "parent": 45, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 20}}, {"id": 48, "type": "preproc_include", "text": "#include <QCheckBox>\n", "parent": 0, "children": [49, 50], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 49, "type": "#include", "text": "#include", "parent": 48, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 50, "type": "system_lib_string", "text": "<QCheckBox>", "parent": 48, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 20}}, {"id": 51, "type": "preproc_include", "text": "#include \"mitkVtkRepresentationProperty.h\"\n", "parent": 0, "children": [52, 53], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 52, "type": "#include", "text": "#include", "parent": 51, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 53, "type": "string_literal", "text": "\"mitkVtkRepresentationProperty.h\"", "parent": 51, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 42}}, {"id": 54, "type": "preproc_include", "text": "#include \"vtkProperty.h\"\n", "parent": 0, "children": [55, 56], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 55, "type": "#include", "text": "#include", "parent": 54, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 56, "type": "string_literal", "text": "\"vtkProperty.h\"", "parent": 54, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 24}}, {"id": 57, "type": "preproc_include", "text": "#include <QtConcurrentRun>\n", "parent": 0, "children": [58, 59], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 58, "type": "#include", "text": "#include", "parent": 57, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 59, "type": "system_lib_string", "text": "<QtConcurrentRun>", "parent": 57, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 26}}, {"id": 60, "type": "preproc_include", "text": "#include <QFuture>\n", "parent": 0, "children": [61, 62], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 61, "type": "#include", "text": "#include", "parent": 60, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 62, "type": "system_lib_string", "text": "<QFuture>", "parent": 60, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 18}}, {"id": 63, "type": "preproc_include", "text": "#include <QFutureWatcher>\n", "parent": 0, "children": [64, 65], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 64, "type": "#include", "text": "#include", "parent": 63, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 65, "type": "system_lib_string", "text": "<QFutureWatcher>", "parent": 63, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 25}}, {"id": 66, "type": "preproc_include", "text": "#include <QTimer>\n", "parent": 0, "children": [67, 68], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 67, "type": "#include", "text": "#include", "parent": 66, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 8}}, {"id": 68, "type": "system_lib_string", "text": "<QTimer>", "parent": 66, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 17}}, {"id": 69, "type": "function_definition", "text": "namespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}", "parent": 0, "children": [70, 71], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 70, "type": "type_identifier", "text": "namespace", "parent": 69, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 9}}, {"id": 71, "type": "identifier", "text": "mitk", "parent": 69, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 14}}, {"id": 72, "type": "declaration", "text": "class PlaneGeometry;", "parent": 69, "children": [73], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 22}}, {"id": 73, "type": "identifier", "text": "PlaneGeometry", "parent": 72, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 21}}, {"id": 74, "type": "declaration", "text": "class SliceNavigationController;", "parent": 69, "children": [75], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 34}}, {"id": 75, "type": "identifier", "text": "SliceNavigationController", "parent": 74, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 33}}, {"id": 76, "type": "declaration", "text": "class QPushButton;", "parent": 0, "children": [77], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 18}}, {"id": 77, "type": "identifier", "text": "QPushButton", "parent": 76, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 17}}, {"id": 78, "type": "declaration", "text": "class MitkSegmentationUI_EXPORT", "parent": 0, "children": [79], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 31}}, {"id": 79, "type": "identifier", "text": "MitkSegmentationUI_EXPORT", "parent": 78, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 31}}, {"id": 80, "type": "labeled_statement", "text": "QmitkSlicesInterpolator : public QWidget\n{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \\param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \\param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n}", "parent": 0, "children": [81, 82], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 275, "column": 1}}, {"id": 81, "type": "statement_identifier", "text": "QmitkSlicesInterpolator", "parent": 80, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 55}}, {"id": 82, "type": "ERROR", "text": "public QWidget", "parent": 80, "children": [83], "start_point": {"row": 77, "column": 58}, "end_point": {"row": 77, "column": 72}}, {"id": 83, "type": "identifier", "text": "QWidget", "parent": 82, "children": [], "start_point": {"row": 77, "column": 65}, "end_point": {"row": 77, "column": 72}}, {"id": 84, "type": "declaration", "text": "Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);", "parent": 80, "children": [85, 86, 87, 98, 100], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 83, "column": 71}}, {"id": 85, "type": "type_identifier", "text": "Q_OBJECT", "parent": 84, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 10}}, {"id": 86, "type": "ERROR", "text": "public:", "parent": 84, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 9}}, {"id": 87, "type": "init_declarator", "text": "QmitkSlicesInterpolator(QWidget* parent = 0", "parent": 84, "children": [88, 96, 97], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 47}}, {"id": 88, "type": "function_declarator", "text": "QmitkSlicesInterpolator(QWidget* parent", "parent": 87, "children": [89, 90], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 43}}, {"id": 89, "type": "identifier", "text": "QmitkSlicesInterpolator", "parent": 88, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 27}}, {"id": 90, "type": "parameter_list", "text": "(QWidget* parent", "parent": 88, "children": [91], "start_point": {"row": 83, "column": 27}, "end_point": {"row": 83, "column": 43}}, {"id": 91, "type": "parameter_declaration", "text": "QWidget* parent", "parent": 90, "children": [92, 93], "start_point": {"row": 83, "column": 28}, "end_point": {"row": 83, "column": 43}}, {"id": 92, "type": "type_identifier", "text": "QWidget", "parent": 91, "children": [], "start_point": {"row": 83, "column": 28}, "end_point": {"row": 83, "column": 35}}, {"id": 93, "type": "pointer_declarator", "text": "* parent", "parent": 91, "children": [94, 95], "start_point": {"row": 83, "column": 35}, "end_point": {"row": 83, "column": 43}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 83, "column": 35}, "end_point": {"row": 83, "column": 36}}, {"id": 95, "type": "identifier", "text": "parent", "parent": 93, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 43}}, {"id": 96, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 83, "column": 44}, "end_point": {"row": 83, "column": 45}}, {"id": 97, "type": "number_literal", "text": "0", "parent": 87, "children": [], "start_point": {"row": 83, "column": 46}, "end_point": {"row": 83, "column": 47}}, {"id": 98, "type": "ERROR", "text": "const char", "parent": 84, "children": [99], "start_point": {"row": 83, "column": 49}, "end_point": {"row": 83, "column": 59}}, {"id": 99, "type": "identifier", "text": "char", "parent": 98, "children": [], "start_point": {"row": 83, "column": 55}, "end_point": {"row": 83, "column": 59}}, {"id": 100, "type": "init_declarator", "text": "* name = 0", "parent": 84, "children": [101, 104, 105], "start_point": {"row": 83, "column": 59}, "end_point": {"row": 83, "column": 69}}, {"id": 101, "type": "pointer_declarator", "text": "* name", "parent": 100, "children": [102, 103], "start_point": {"row": 83, "column": 59}, "end_point": {"row": 83, "column": 65}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 83, "column": 59}, "end_point": {"row": 83, "column": 60}}, {"id": 103, "type": "identifier", "text": "name", "parent": 101, "children": [], "start_point": {"row": 83, "column": 61}, "end_point": {"row": 83, "column": 65}}, {"id": 104, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 83, "column": 66}, "end_point": {"row": 83, "column": 67}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 100, "children": [], "start_point": {"row": 83, "column": 68}, "end_point": {"row": 83, "column": 69}}, {"id": 106, "type": "declaration", "text": "void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);", "parent": 80, "children": [107, 108], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 112}}, {"id": 107, "type": "primitive_type", "text": "void", "parent": 106, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 8}}, {"id": 108, "type": "function_declarator", "text": "Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers)", "parent": 106, "children": [109, 110], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 111}}, {"id": 109, "type": "identifier", "text": "Initialize", "parent": 108, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 19}}, {"id": 110, "type": "parameter_list", "text": "(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers)", "parent": 108, "children": [111, 118], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 111}}, {"id": 111, "type": "parameter_declaration", "text": "mitk::ToolManager* toolManager", "parent": 110, "children": [112, 113, 115], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 50}}, {"id": 112, "type": "type_identifier", "text": "mitk", "parent": 111, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 24}}, {"id": 113, "type": "ERROR", "text": "::ToolManager", "parent": 111, "children": [114], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 37}}, {"id": 114, "type": "identifier", "text": "ToolManager", "parent": 113, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 37}}, {"id": 115, "type": "pointer_declarator", "text": "* toolManager", "parent": 111, "children": [116, 117], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 50}}, {"id": 116, "type": "*", "text": "*", "parent": 115, "children": [], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 38}}, {"id": 117, "type": "identifier", "text": "toolManager", "parent": 115, "children": [], "start_point": {"row": 88, "column": 39}, "end_point": {"row": 88, "column": 50}}, {"id": 118, "type": "parameter_declaration", "text": "const QList<mitk::SliceNavigationController*> &controllers", "parent": 110, "children": [119, 120, 126], "start_point": {"row": 88, "column": 52}, "end_point": {"row": 88, "column": 110}}, {"id": 119, "type": "type_identifier", "text": "QList", "parent": 118, "children": [], "start_point": {"row": 88, "column": 58}, "end_point": {"row": 88, "column": 63}}, {"id": 120, "type": "ERROR", "text": "<mitk::SliceNavigationController*> &", "parent": 118, "children": [121, 122, 123, 124, 125], "start_point": {"row": 88, "column": 63}, "end_point": {"row": 88, "column": 99}}, {"id": 121, "type": "<", "text": "<", "parent": 120, "children": [], "start_point": {"row": 88, "column": 63}, "end_point": {"row": 88, "column": 64}}, {"id": 122, "type": "identifier", "text": "mitk", "parent": 120, "children": [], "start_point": {"row": 88, "column": 64}, "end_point": {"row": 88, "column": 68}}, {"id": 123, "type": "identifier", "text": "SliceNavigationController", "parent": 120, "children": [], "start_point": {"row": 88, "column": 70}, "end_point": {"row": 88, "column": 95}}, {"id": 124, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 88, "column": 95}, "end_point": {"row": 88, "column": 96}}, {"id": 125, "type": ">", "text": ">", "parent": 120, "children": [], "start_point": {"row": 88, "column": 96}, "end_point": {"row": 88, "column": 97}}, {"id": 126, "type": "identifier", "text": "controllers", "parent": 118, "children": [], "start_point": {"row": 88, "column": 99}, "end_point": {"row": 88, "column": 110}}, {"id": 127, "type": "declaration", "text": "void Uninitialize();", "parent": 80, "children": [128, 129], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 24}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 8}}, {"id": 129, "type": "function_declarator", "text": "Uninitialize()", "parent": 127, "children": [130, 131], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 23}}, {"id": 130, "type": "identifier", "text": "Uninitialize", "parent": 129, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 21}}, {"id": 131, "type": "parameter_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 90, "column": 23}}, {"id": 132, "type": "declaration", "text": "virtual ~QmitkSlicesInterpolator();", "parent": 80, "children": [133, 134, 136], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 39}}, {"id": 133, "type": "type_identifier", "text": "virtual", "parent": 132, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 11}}, {"id": 134, "type": "ERROR", "text": "~", "parent": 132, "children": [135], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 13}}, {"id": 135, "type": "~", "text": "~", "parent": 134, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 13}}, {"id": 136, "type": "function_declarator", "text": "QmitkSlicesInterpolator()", "parent": 132, "children": [137, 138], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 38}}, {"id": 137, "type": "identifier", "text": "QmitkSlicesInterpolator", "parent": 136, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 36}}, {"id": 138, "type": "parameter_list", "text": "()", "parent": 136, "children": [], "start_point": {"row": 92, "column": 36}, "end_point": {"row": 92, "column": 38}}, {"id": 139, "type": "declaration", "text": "void SetDataStorage( mitk::DataStorage::Pointer storage );", "parent": 80, "children": [140, 141], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 62}}, {"id": 140, "type": "primitive_type", "text": "void", "parent": 139, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 8}}, {"id": 141, "type": "function_declarator", "text": "SetDataStorage( mitk::DataStorage::Pointer storage )", "parent": 139, "children": [142, 143], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 61}}, {"id": 142, "type": "identifier", "text": "SetDataStorage", "parent": 141, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 23}}, {"id": 143, "type": "parameter_list", "text": "( mitk::DataStorage::Pointer storage )", "parent": 141, "children": [144], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 61}}, {"id": 144, "type": "parameter_declaration", "text": "mitk::DataStorage::Pointer storage", "parent": 143, "children": [145, 146, 149], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 59}}, {"id": 145, "type": "type_identifier", "text": "mitk", "parent": 144, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 29}}, {"id": 146, "type": "ERROR", "text": "::DataStorage::Pointer", "parent": 144, "children": [147, 148], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 51}}, {"id": 147, "type": "identifier", "text": "DataStorage", "parent": 146, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 42}}, {"id": 148, "type": "identifier", "text": "Pointer", "parent": 146, "children": [], "start_point": {"row": 94, "column": 44}, "end_point": {"row": 94, "column": 51}}, {"id": 149, "type": "identifier", "text": "storage", "parent": 144, "children": [], "start_point": {"row": 94, "column": 52}, "end_point": {"row": 94, "column": 59}}, {"id": 150, "type": "labeled_statement", "text": "mitk::DataStorage* GetDataStorage();", "parent": 80, "children": [151, 152], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 40}}, {"id": 151, "type": "statement_identifier", "text": "mitk", "parent": 150, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 8}}, {"id": 152, "type": "declaration", "text": "DataStorage* GetDataStorage();", "parent": 150, "children": [153, 154], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 40}}, {"id": 153, "type": "type_identifier", "text": "DataStorage", "parent": 152, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 21}}, {"id": 154, "type": "pointer_declarator", "text": "* GetDataStorage()", "parent": 152, "children": [155, 156], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 39}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 22}}, {"id": 156, "type": "function_declarator", "text": "GetDataStorage()", "parent": 154, "children": [157, 158], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 39}}, {"id": 157, "type": "identifier", "text": "GetDataStorage", "parent": 156, "children": [], "start_point": {"row": 95, "column": 23}, "end_point": {"row": 95, "column": 37}}, {"id": 158, "type": "parameter_list", "text": "()", "parent": 156, "children": [], "start_point": {"row": 95, "column": 37}, "end_point": {"row": 95, "column": 39}}, {"id": 159, "type": "declaration", "text": "void OnToolManagerWorkingDataModified();", "parent": 80, "children": [160, 161], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 44}}, {"id": 160, "type": "primitive_type", "text": "void", "parent": 159, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 8}}, {"id": 161, "type": "function_declarator", "text": "OnToolManagerWorkingDataModified()", "parent": 159, "children": [162, 163], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 43}}, {"id": 162, "type": "identifier", "text": "OnToolManagerWorkingDataModified", "parent": 161, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 41}}, {"id": 163, "type": "parameter_list", "text": "()", "parent": 161, "children": [], "start_point": {"row": 100, "column": 41}, "end_point": {"row": 100, "column": 43}}, {"id": 164, "type": "declaration", "text": "void OnToolManagerReferenceDataModified();", "parent": 80, "children": [165, 166], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 46}}, {"id": 165, "type": "primitive_type", "text": "void", "parent": 164, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 8}}, {"id": 166, "type": "function_declarator", "text": "OnToolManagerReferenceDataModified()", "parent": 164, "children": [167, 168], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 45}}, {"id": 167, "type": "identifier", "text": "OnToolManagerReferenceDataModified", "parent": 166, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 43}}, {"id": 168, "type": "parameter_list", "text": "()", "parent": 166, "children": [], "start_point": {"row": 105, "column": 43}, "end_point": {"row": 105, "column": 45}}, {"id": 169, "type": "declaration", "text": "void OnTimeChanged(itk::Object* sender, const itk::EventObject&);", "parent": 80, "children": [170, 171], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 69}}, {"id": 170, "type": "primitive_type", "text": "void", "parent": 169, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 8}}, {"id": 171, "type": "function_declarator", "text": "OnTimeChanged(itk::Object* sender, const itk::EventObject&)", "parent": 169, "children": [172, 173], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 68}}, {"id": 172, "type": "identifier", "text": "OnTimeChanged", "parent": 171, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 22}}, {"id": 173, "type": "parameter_list", "text": "(itk::Object* sender, const itk::EventObject&)", "parent": 171, "children": [174, 181], "start_point": {"row": 107, "column": 22}, "end_point": {"row": 107, "column": 68}}, {"id": 174, "type": "parameter_declaration", "text": "itk::Object* sender", "parent": 173, "children": [175, 176, 178], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 42}}, {"id": 175, "type": "type_identifier", "text": "itk", "parent": 174, "children": [], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 26}}, {"id": 176, "type": "ERROR", "text": "::Object", "parent": 174, "children": [177], "start_point": {"row": 107, "column": 26}, "end_point": {"row": 107, "column": 34}}, {"id": 177, "type": "identifier", "text": "Object", "parent": 176, "children": [], "start_point": {"row": 107, "column": 28}, "end_point": {"row": 107, "column": 34}}, {"id": 178, "type": "pointer_declarator", "text": "* sender", "parent": 174, "children": [179, 180], "start_point": {"row": 107, "column": 34}, "end_point": {"row": 107, "column": 42}}, {"id": 179, "type": "*", "text": "*", "parent": 178, "children": [], "start_point": {"row": 107, "column": 34}, "end_point": {"row": 107, "column": 35}}, {"id": 180, "type": "identifier", "text": "sender", "parent": 178, "children": [], "start_point": {"row": 107, "column": 36}, "end_point": {"row": 107, "column": 42}}, {"id": 181, "type": "parameter_declaration", "text": "const itk::EventObject", "parent": 173, "children": [182, 183], "start_point": {"row": 107, "column": 44}, "end_point": {"row": 107, "column": 66}}, {"id": 182, "type": "type_identifier", "text": "itk", "parent": 181, "children": [], "start_point": {"row": 107, "column": 50}, "end_point": {"row": 107, "column": 53}}, {"id": 183, "type": "identifier", "text": "EventObject", "parent": 181, "children": [], "start_point": {"row": 107, "column": 55}, "end_point": {"row": 107, "column": 66}}, {"id": 184, "type": "declaration", "text": "void OnSliceChanged(itk::Object* sender, const itk::EventObject&);", "parent": 80, "children": [185, 186], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 70}}, {"id": 185, "type": "primitive_type", "text": "void", "parent": 184, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 8}}, {"id": 186, "type": "function_declarator", "text": "OnSliceChanged(itk::Object* sender, const itk::EventObject&)", "parent": 184, "children": [187, 188], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 69}}, {"id": 187, "type": "identifier", "text": "OnSliceChanged", "parent": 186, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 23}}, {"id": 188, "type": "parameter_list", "text": "(itk::Object* sender, const itk::EventObject&)", "parent": 186, "children": [189, 196], "start_point": {"row": 109, "column": 23}, "end_point": {"row": 109, "column": 69}}, {"id": 189, "type": "parameter_declaration", "text": "itk::Object* sender", "parent": 188, "children": [190, 191, 193], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 43}}, {"id": 190, "type": "type_identifier", "text": "itk", "parent": 189, "children": [], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 27}}, {"id": 191, "type": "ERROR", "text": "::Object", "parent": 189, "children": [192], "start_point": {"row": 109, "column": 27}, "end_point": {"row": 109, "column": 35}}, {"id": 192, "type": "identifier", "text": "Object", "parent": 191, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 35}}, {"id": 193, "type": "pointer_declarator", "text": "* sender", "parent": 189, "children": [194, 195], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 43}}, {"id": 194, "type": "*", "text": "*", "parent": 193, "children": [], "start_point": {"row": 109, "column": 35}, "end_point": {"row": 109, "column": 36}}, {"id": 195, "type": "identifier", "text": "sender", "parent": 193, "children": [], "start_point": {"row": 109, "column": 37}, "end_point": {"row": 109, "column": 43}}, {"id": 196, "type": "parameter_declaration", "text": "const itk::EventObject", "parent": 188, "children": [197, 198], "start_point": {"row": 109, "column": 45}, "end_point": {"row": 109, "column": 67}}, {"id": 197, "type": "type_identifier", "text": "itk", "parent": 196, "children": [], "start_point": {"row": 109, "column": 51}, "end_point": {"row": 109, "column": 54}}, {"id": 198, "type": "identifier", "text": "EventObject", "parent": 196, "children": [], "start_point": {"row": 109, "column": 56}, "end_point": {"row": 109, "column": 67}}, {"id": 199, "type": "declaration", "text": "void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );", "parent": 80, "children": [200, 201], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 97}}, {"id": 200, "type": "primitive_type", "text": "void", "parent": 199, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 8}}, {"id": 201, "type": "function_declarator", "text": "OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& )", "parent": 199, "children": [202, 203], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 96}}, {"id": 202, "type": "identifier", "text": "OnSliceNavigationControllerDeleted", "parent": 201, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 43}}, {"id": 203, "type": "parameter_list", "text": "(const itk::Object *sender, const itk::EventObject& )", "parent": 201, "children": [204, 211], "start_point": {"row": 111, "column": 43}, "end_point": {"row": 111, "column": 96}}, {"id": 204, "type": "parameter_declaration", "text": "const itk::Object *sender", "parent": 203, "children": [205, 206, 208], "start_point": {"row": 111, "column": 44}, "end_point": {"row": 111, "column": 69}}, {"id": 205, "type": "type_identifier", "text": "itk", "parent": 204, "children": [], "start_point": {"row": 111, "column": 50}, "end_point": {"row": 111, "column": 53}}, {"id": 206, "type": "ERROR", "text": "::Object", "parent": 204, "children": [207], "start_point": {"row": 111, "column": 53}, "end_point": {"row": 111, "column": 61}}, {"id": 207, "type": "identifier", "text": "Object", "parent": 206, "children": [], "start_point": {"row": 111, "column": 55}, "end_point": {"row": 111, "column": 61}}, {"id": 208, "type": "pointer_declarator", "text": "*sender", "parent": 204, "children": [209, 210], "start_point": {"row": 111, "column": 62}, "end_point": {"row": 111, "column": 69}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 111, "column": 62}, "end_point": {"row": 111, "column": 63}}, {"id": 210, "type": "identifier", "text": "sender", "parent": 208, "children": [], "start_point": {"row": 111, "column": 63}, "end_point": {"row": 111, "column": 69}}, {"id": 211, "type": "parameter_declaration", "text": "const itk::EventObject", "parent": 203, "children": [212, 213], "start_point": {"row": 111, "column": 71}, "end_point": {"row": 111, "column": 93}}, {"id": 212, "type": "type_identifier", "text": "itk", "parent": 211, "children": [], "start_point": {"row": 111, "column": 77}, "end_point": {"row": 111, "column": 80}}, {"id": 213, "type": "identifier", "text": "EventObject", "parent": 211, "children": [], "start_point": {"row": 111, "column": 82}, "end_point": {"row": 111, "column": 93}}, {"id": 214, "type": "declaration", "text": "void OnInterpolationInfoChanged(const itk::EventObject&);", "parent": 80, "children": [215, 216], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 61}}, {"id": 215, "type": "primitive_type", "text": "void", "parent": 214, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 8}}, {"id": 216, "type": "function_declarator", "text": "OnInterpolationInfoChanged(const itk::EventObject&)", "parent": 214, "children": [217, 218], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 60}}, {"id": 217, "type": "identifier", "text": "OnInterpolationInfoChanged", "parent": 216, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 35}}, {"id": 218, "type": "parameter_list", "text": "(const itk::EventObject&)", "parent": 216, "children": [219], "start_point": {"row": 116, "column": 35}, "end_point": {"row": 116, "column": 60}}, {"id": 219, "type": "parameter_declaration", "text": "const itk::EventObject", "parent": 218, "children": [220, 221], "start_point": {"row": 116, "column": 36}, "end_point": {"row": 116, "column": 58}}, {"id": 220, "type": "type_identifier", "text": "itk", "parent": 219, "children": [], "start_point": {"row": 116, "column": 42}, "end_point": {"row": 116, "column": 45}}, {"id": 221, "type": "identifier", "text": "EventObject", "parent": 219, "children": [], "start_point": {"row": 116, "column": 47}, "end_point": {"row": 116, "column": 58}}, {"id": 222, "type": "declaration", "text": "void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);", "parent": 80, "children": [223, 224], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 68}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 8}}, {"id": 224, "type": "function_declarator", "text": "OnSurfaceInterpolationInfoChanged(const itk::EventObject&)", "parent": 222, "children": [225, 226], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 67}}, {"id": 225, "type": "identifier", "text": "OnSurfaceInterpolationInfoChanged", "parent": 224, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 42}}, {"id": 226, "type": "parameter_list", "text": "(const itk::EventObject&)", "parent": 224, "children": [227], "start_point": {"row": 121, "column": 42}, "end_point": {"row": 121, "column": 67}}, {"id": 227, "type": "parameter_declaration", "text": "const itk::EventObject", "parent": 226, "children": [228, 229], "start_point": {"row": 121, "column": 43}, "end_point": {"row": 121, "column": 65}}, {"id": 228, "type": "type_identifier", "text": "itk", "parent": 227, "children": [], "start_point": {"row": 121, "column": 49}, "end_point": {"row": 121, "column": 52}}, {"id": 229, "type": "identifier", "text": "EventObject", "parent": 227, "children": [], "start_point": {"row": 121, "column": 54}, "end_point": {"row": 121, "column": 65}}, {"id": 230, "type": "declaration", "text": "void Show3DInterpolationResult(bool);", "parent": 80, "children": [231, 232], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 41}}, {"id": 231, "type": "primitive_type", "text": "void", "parent": 230, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 8}}, {"id": 232, "type": "function_declarator", "text": "Show3DInterpolationResult(bool)", "parent": 230, "children": [233, 234], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 40}}, {"id": 233, "type": "identifier", "text": "Show3DInterpolationResult", "parent": 232, "children": [], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 34}}, {"id": 234, "type": "parameter_list", "text": "(bool)", "parent": 232, "children": [235], "start_point": {"row": 126, "column": 34}, "end_point": {"row": 126, "column": 40}}, {"id": 235, "type": "parameter_declaration", "text": "bool", "parent": 234, "children": [236], "start_point": {"row": 126, "column": 35}, "end_point": {"row": 126, "column": 39}}, {"id": 236, "type": "primitive_type", "text": "bool", "parent": 235, "children": [], "start_point": {"row": 126, "column": 35}, "end_point": {"row": 126, "column": 39}}, {"id": 237, "type": "labeled_statement", "text": "signals:\n\n void SignalRememberContourPositions(bool);", "parent": 80, "children": [238, 239], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 130, "column": 46}}, {"id": 238, "type": "statement_identifier", "text": "signals", "parent": 237, "children": [], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 128, "column": 9}}, {"id": 239, "type": "declaration", "text": "void SignalRememberContourPositions(bool);", "parent": 237, "children": [240, 241], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 46}}, {"id": 240, "type": "primitive_type", "text": "void", "parent": 239, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 8}}, {"id": 241, "type": "function_declarator", "text": "SignalRememberContourPositions(bool)", "parent": 239, "children": [242, 243], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 45}}, {"id": 242, "type": "identifier", "text": "SignalRememberContourPositions", "parent": 241, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 39}}, {"id": 243, "type": "parameter_list", "text": "(bool)", "parent": 241, "children": [244], "start_point": {"row": 130, "column": 39}, "end_point": {"row": 130, "column": 45}}, {"id": 244, "type": "parameter_declaration", "text": "bool", "parent": 243, "children": [245], "start_point": {"row": 130, "column": 40}, "end_point": {"row": 130, "column": 44}}, {"id": 245, "type": "primitive_type", "text": "bool", "parent": 244, "children": [], "start_point": {"row": 130, "column": 40}, "end_point": {"row": 130, "column": 44}}, {"id": 246, "type": "declaration", "text": "void SignalShowMarkerNodes(bool);", "parent": 80, "children": [247, 248], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 37}}, {"id": 247, "type": "primitive_type", "text": "void", "parent": 246, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 8}}, {"id": 248, "type": "function_declarator", "text": "SignalShowMarkerNodes(bool)", "parent": 246, "children": [249, 250], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 36}}, {"id": 249, "type": "identifier", "text": "SignalShowMarkerNodes", "parent": 248, "children": [], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 30}}, {"id": 250, "type": "parameter_list", "text": "(bool)", "parent": 248, "children": [251], "start_point": {"row": 131, "column": 30}, "end_point": {"row": 131, "column": 36}}, {"id": 251, "type": "parameter_declaration", "text": "bool", "parent": 250, "children": [252], "start_point": {"row": 131, "column": 31}, "end_point": {"row": 131, "column": 35}}, {"id": 252, "type": "primitive_type", "text": "bool", "parent": 251, "children": [], "start_point": {"row": 131, "column": 31}, "end_point": {"row": 131, "column": 35}}, {"id": 253, "type": "declaration", "text": "public slots:\n\n virtual void setEnabled( bool );", "parent": 80, "children": [254, 258], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 135, "column": 36}}, {"id": 254, "type": "ERROR", "text": "slots:\n\n virtual void", "parent": 253, "children": [255, 256, 257], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 135, "column": 16}}, {"id": 255, "type": "identifier", "text": "slots", "parent": 254, "children": [], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 14}}, {"id": 256, "type": "identifier", "text": "virtual", "parent": 254, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 11}}, {"id": 257, "type": "identifier", "text": "void", "parent": 254, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 16}}, {"id": 258, "type": "function_declarator", "text": "setEnabled( bool )", "parent": 253, "children": [259, 260], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 35}}, {"id": 259, "type": "identifier", "text": "setEnabled", "parent": 258, "children": [], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 27}}, {"id": 260, "type": "parameter_list", "text": "( bool )", "parent": 258, "children": [261], "start_point": {"row": 135, "column": 27}, "end_point": {"row": 135, "column": 35}}, {"id": 261, "type": "parameter_declaration", "text": "bool", "parent": 260, "children": [262], "start_point": {"row": 135, "column": 29}, "end_point": {"row": 135, "column": 33}}, {"id": 262, "type": "primitive_type", "text": "bool", "parent": 261, "children": [], "start_point": {"row": 135, "column": 29}, "end_point": {"row": 135, "column": 33}}, {"id": 263, "type": "declaration", "text": "void EnableInterpolation(bool);", "parent": 80, "children": [264, 265], "start_point": {"row": 139, "column": 3}, "end_point": {"row": 139, "column": 34}}, {"id": 264, "type": "primitive_type", "text": "void", "parent": 263, "children": [], "start_point": {"row": 139, "column": 3}, "end_point": {"row": 139, "column": 7}}, {"id": 265, "type": "function_declarator", "text": "EnableInterpolation(bool)", "parent": 263, "children": [266, 267], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 33}}, {"id": 266, "type": "identifier", "text": "EnableInterpolation", "parent": 265, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 27}}, {"id": 267, "type": "parameter_list", "text": "(bool)", "parent": 265, "children": [268], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 33}}, {"id": 268, "type": "parameter_declaration", "text": "bool", "parent": 267, "children": [269], "start_point": {"row": 139, "column": 28}, "end_point": {"row": 139, "column": 32}}, {"id": 269, "type": "primitive_type", "text": "bool", "parent": 268, "children": [], "start_point": {"row": 139, "column": 28}, "end_point": {"row": 139, "column": 32}}, {"id": 270, "type": "declaration", "text": "void Enable3DInterpolation(bool);", "parent": 80, "children": [271, 272], "start_point": {"row": 141, "column": 3}, "end_point": {"row": 141, "column": 36}}, {"id": 271, "type": "primitive_type", "text": "void", "parent": 270, "children": [], "start_point": {"row": 141, "column": 3}, "end_point": {"row": 141, "column": 7}}, {"id": 272, "type": "function_declarator", "text": "Enable3DInterpolation(bool)", "parent": 270, "children": [273, 274], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 35}}, {"id": 273, "type": "identifier", "text": "Enable3DInterpolation", "parent": 272, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 29}}, {"id": 274, "type": "parameter_list", "text": "(bool)", "parent": 272, "children": [275], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 35}}, {"id": 275, "type": "parameter_declaration", "text": "bool", "parent": 274, "children": [276], "start_point": {"row": 141, "column": 30}, "end_point": {"row": 141, "column": 34}}, {"id": 276, "type": "primitive_type", "text": "bool", "parent": 275, "children": [], "start_point": {"row": 141, "column": 30}, "end_point": {"row": 141, "column": 34}}, {"id": 277, "type": "declaration", "text": "void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);", "parent": 80, "children": [278, 279], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 76}}, {"id": 278, "type": "primitive_type", "text": "void", "parent": 277, "children": [], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 7}}, {"id": 279, "type": "init_declarator", "text": "FinishInterpolation(mitk::SliceNavigationController* slicer = NULL", "parent": 277, "children": [280, 290, 291], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 74}}, {"id": 280, "type": "function_declarator", "text": "FinishInterpolation(mitk::SliceNavigationController* slicer", "parent": 279, "children": [281, 282], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 67}}, {"id": 281, "type": "identifier", "text": "FinishInterpolation", "parent": 280, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 27}}, {"id": 282, "type": "parameter_list", "text": "(mitk::SliceNavigationController* slicer", "parent": 280, "children": [283], "start_point": {"row": 148, "column": 27}, "end_point": {"row": 148, "column": 67}}, {"id": 283, "type": "parameter_declaration", "text": "mitk::SliceNavigationController* slicer", "parent": 282, "children": [284, 285, 287], "start_point": {"row": 148, "column": 28}, "end_point": {"row": 148, "column": 67}}, {"id": 284, "type": "type_identifier", "text": "mitk", "parent": 283, "children": [], "start_point": {"row": 148, "column": 28}, "end_point": {"row": 148, "column": 32}}, {"id": 285, "type": "ERROR", "text": "::SliceNavigationController", "parent": 283, "children": [286], "start_point": {"row": 148, "column": 32}, "end_point": {"row": 148, "column": 59}}, {"id": 286, "type": "identifier", "text": "SliceNavigationController", "parent": 285, "children": [], "start_point": {"row": 148, "column": 34}, "end_point": {"row": 148, "column": 59}}, {"id": 287, "type": "pointer_declarator", "text": "* slicer", "parent": 283, "children": [288, 289], "start_point": {"row": 148, "column": 59}, "end_point": {"row": 148, "column": 67}}, {"id": 288, "type": "*", "text": "*", "parent": 287, "children": [], "start_point": {"row": 148, "column": 59}, "end_point": {"row": 148, "column": 60}}, {"id": 289, "type": "identifier", "text": "slicer", "parent": 287, "children": [], "start_point": {"row": 148, "column": 61}, "end_point": {"row": 148, "column": 67}}, {"id": 290, "type": "=", "text": "=", "parent": 279, "children": [], "start_point": {"row": 148, "column": 68}, "end_point": {"row": 148, "column": 69}}, {"id": 291, "type": "null", "text": "NULL", "parent": 279, "children": [292], "start_point": {"row": 148, "column": 70}, "end_point": {"row": 148, "column": 74}}, {"id": 292, "type": "NULL", "text": "NULL", "parent": 291, "children": [], "start_point": {"row": 148, "column": 70}, "end_point": {"row": 148, "column": 74}}, {"id": 293, "type": "ERROR", "text": "protected slots:", "parent": 80, "children": [294], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 18}}, {"id": 294, "type": "identifier", "text": "slots", "parent": 293, "children": [], "start_point": {"row": 150, "column": 12}, "end_point": {"row": 150, "column": 17}}, {"id": 295, "type": "declaration", "text": "void OnAcceptInterpolationClicked();", "parent": 80, "children": [296, 297], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 40}}, {"id": 296, "type": "primitive_type", "text": "void", "parent": 295, "children": [], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 8}}, {"id": 297, "type": "function_declarator", "text": "OnAcceptInterpolationClicked()", "parent": 295, "children": [298, 299], "start_point": {"row": 155, "column": 9}, "end_point": {"row": 155, "column": 39}}, {"id": 298, "type": "identifier", "text": "OnAcceptInterpolationClicked", "parent": 297, "children": [], "start_point": {"row": 155, "column": 9}, "end_point": {"row": 155, "column": 37}}, {"id": 299, "type": "parameter_list", "text": "()", "parent": 297, "children": [], "start_point": {"row": 155, "column": 37}, "end_point": {"row": 155, "column": 39}}, {"id": 300, "type": "declaration", "text": "void OnAcceptAllInterpolationsClicked();", "parent": 80, "children": [301, 302], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 44}}, {"id": 301, "type": "primitive_type", "text": "void", "parent": 300, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 8}}, {"id": 302, "type": "function_declarator", "text": "OnAcceptAllInterpolationsClicked()", "parent": 300, "children": [303, 304], "start_point": {"row": 160, "column": 9}, "end_point": {"row": 160, "column": 43}}, {"id": 303, "type": "identifier", "text": "OnAcceptAllInterpolationsClicked", "parent": 302, "children": [], "start_point": {"row": 160, "column": 9}, "end_point": {"row": 160, "column": 41}}, {"id": 304, "type": "parameter_list", "text": "()", "parent": 302, "children": [], "start_point": {"row": 160, "column": 41}, "end_point": {"row": 160, "column": 43}}, {"id": 305, "type": "declaration", "text": "void OnAccept3DInterpolationClicked();", "parent": 80, "children": [306, 307], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 42}}, {"id": 306, "type": "primitive_type", "text": "void", "parent": 305, "children": [], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 8}}, {"id": 307, "type": "function_declarator", "text": "OnAccept3DInterpolationClicked()", "parent": 305, "children": [308, 309], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 41}}, {"id": 308, "type": "identifier", "text": "OnAccept3DInterpolationClicked", "parent": 307, "children": [], "start_point": {"row": 165, "column": 9}, "end_point": {"row": 165, "column": 39}}, {"id": 309, "type": "parameter_list", "text": "()", "parent": 307, "children": [], "start_point": {"row": 165, "column": 39}, "end_point": {"row": 165, "column": 41}}, {"id": 310, "type": "declaration", "text": "void OnAcceptAllPopupActivated(QAction* action);", "parent": 80, "children": [311, 312], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 52}}, {"id": 311, "type": "primitive_type", "text": "void", "parent": 310, "children": [], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 8}}, {"id": 312, "type": "function_declarator", "text": "OnAcceptAllPopupActivated(QAction* action)", "parent": 310, "children": [313, 314], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 51}}, {"id": 313, "type": "identifier", "text": "OnAcceptAllPopupActivated", "parent": 312, "children": [], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 34}}, {"id": 314, "type": "parameter_list", "text": "(QAction* action)", "parent": 312, "children": [315], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 51}}, {"id": 315, "type": "parameter_declaration", "text": "QAction* action", "parent": 314, "children": [316, 317], "start_point": {"row": 170, "column": 35}, "end_point": {"row": 170, "column": 50}}, {"id": 316, "type": "type_identifier", "text": "QAction", "parent": 315, "children": [], "start_point": {"row": 170, "column": 35}, "end_point": {"row": 170, "column": 42}}, {"id": 317, "type": "pointer_declarator", "text": "* action", "parent": 315, "children": [318, 319], "start_point": {"row": 170, "column": 42}, "end_point": {"row": 170, "column": 50}}, {"id": 318, "type": "*", "text": "*", "parent": 317, "children": [], "start_point": {"row": 170, "column": 42}, "end_point": {"row": 170, "column": 43}}, {"id": 319, "type": "identifier", "text": "action", "parent": 317, "children": [], "start_point": {"row": 170, "column": 44}, "end_point": {"row": 170, "column": 50}}, {"id": 320, "type": "declaration", "text": "void OnInterpolationActivated(bool);", "parent": 80, "children": [321, 322], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 40}}, {"id": 321, "type": "primitive_type", "text": "void", "parent": 320, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 8}}, {"id": 322, "type": "function_declarator", "text": "OnInterpolationActivated(bool)", "parent": 320, "children": [323, 324], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 39}}, {"id": 323, "type": "identifier", "text": "OnInterpolationActivated", "parent": 322, "children": [], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 33}}, {"id": 324, "type": "parameter_list", "text": "(bool)", "parent": 322, "children": [325], "start_point": {"row": 175, "column": 33}, "end_point": {"row": 175, "column": 39}}, {"id": 325, "type": "parameter_declaration", "text": "bool", "parent": 324, "children": [326], "start_point": {"row": 175, "column": 34}, "end_point": {"row": 175, "column": 38}}, {"id": 326, "type": "primitive_type", "text": "bool", "parent": 325, "children": [], "start_point": {"row": 175, "column": 34}, "end_point": {"row": 175, "column": 38}}, {"id": 327, "type": "declaration", "text": "void On3DInterpolationActivated(bool);", "parent": 80, "children": [328, 329], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 42}}, {"id": 328, "type": "primitive_type", "text": "void", "parent": 327, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 8}}, {"id": 329, "type": "function_declarator", "text": "On3DInterpolationActivated(bool)", "parent": 327, "children": [330, 331], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 41}}, {"id": 330, "type": "identifier", "text": "On3DInterpolationActivated", "parent": 329, "children": [], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 35}}, {"id": 331, "type": "parameter_list", "text": "(bool)", "parent": 329, "children": [332], "start_point": {"row": 177, "column": 35}, "end_point": {"row": 177, "column": 41}}, {"id": 332, "type": "parameter_declaration", "text": "bool", "parent": 331, "children": [333], "start_point": {"row": 177, "column": 36}, "end_point": {"row": 177, "column": 40}}, {"id": 333, "type": "primitive_type", "text": "bool", "parent": 332, "children": [], "start_point": {"row": 177, "column": 36}, "end_point": {"row": 177, "column": 40}}, {"id": 334, "type": "declaration", "text": "void OnInterpolationMethodChanged(int index);", "parent": 80, "children": [335, 336], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 49}}, {"id": 335, "type": "primitive_type", "text": "void", "parent": 334, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 8}}, {"id": 336, "type": "function_declarator", "text": "OnInterpolationMethodChanged(int index)", "parent": 334, "children": [337, 338], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 48}}, {"id": 337, "type": "identifier", "text": "OnInterpolationMethodChanged", "parent": 336, "children": [], "start_point": {"row": 179, "column": 9}, "end_point": {"row": 179, "column": 37}}, {"id": 338, "type": "parameter_list", "text": "(int index)", "parent": 336, "children": [339], "start_point": {"row": 179, "column": 37}, "end_point": {"row": 179, "column": 48}}, {"id": 339, "type": "parameter_declaration", "text": "int index", "parent": 338, "children": [340, 341], "start_point": {"row": 179, "column": 38}, "end_point": {"row": 179, "column": 47}}, {"id": 340, "type": "primitive_type", "text": "int", "parent": 339, "children": [], "start_point": {"row": 179, "column": 38}, "end_point": {"row": 179, "column": 41}}, {"id": 341, "type": "identifier", "text": "index", "parent": 339, "children": [], "start_point": {"row": 179, "column": 42}, "end_point": {"row": 179, "column": 47}}, {"id": 342, "type": "declaration", "text": "void On2DInterpolationEnabled(bool);", "parent": 80, "children": [343, 344], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 40}}, {"id": 343, "type": "primitive_type", "text": "void", "parent": 342, "children": [], "start_point": {"row": 182, "column": 4}, "end_point": {"row": 182, "column": 8}}, {"id": 344, "type": "function_declarator", "text": "On2DInterpolationEnabled(bool)", "parent": 342, "children": [345, 346], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 39}}, {"id": 345, "type": "identifier", "text": "On2DInterpolationEnabled", "parent": 344, "children": [], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 33}}, {"id": 346, "type": "parameter_list", "text": "(bool)", "parent": 344, "children": [347], "start_point": {"row": 182, "column": 33}, "end_point": {"row": 182, "column": 39}}, {"id": 347, "type": "parameter_declaration", "text": "bool", "parent": 346, "children": [348], "start_point": {"row": 182, "column": 34}, "end_point": {"row": 182, "column": 38}}, {"id": 348, "type": "primitive_type", "text": "bool", "parent": 347, "children": [], "start_point": {"row": 182, "column": 34}, "end_point": {"row": 182, "column": 38}}, {"id": 349, "type": "declaration", "text": "void On3DInterpolationEnabled(bool);", "parent": 80, "children": [350, 351], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 40}}, {"id": 350, "type": "primitive_type", "text": "void", "parent": 349, "children": [], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 8}}, {"id": 351, "type": "function_declarator", "text": "On3DInterpolationEnabled(bool)", "parent": 349, "children": [352, 353], "start_point": {"row": 183, "column": 9}, "end_point": {"row": 183, "column": 39}}, {"id": 352, "type": "identifier", "text": "On3DInterpolationEnabled", "parent": 351, "children": [], "start_point": {"row": 183, "column": 9}, "end_point": {"row": 183, "column": 33}}, {"id": 353, "type": "parameter_list", "text": "(bool)", "parent": 351, "children": [354], "start_point": {"row": 183, "column": 33}, "end_point": {"row": 183, "column": 39}}, {"id": 354, "type": "parameter_declaration", "text": "bool", "parent": 353, "children": [355], "start_point": {"row": 183, "column": 34}, "end_point": {"row": 183, "column": 38}}, {"id": 355, "type": "primitive_type", "text": "bool", "parent": 354, "children": [], "start_point": {"row": 183, "column": 34}, "end_point": {"row": 183, "column": 38}}, {"id": 356, "type": "declaration", "text": "void OnInterpolationDisabled(bool);", "parent": 80, "children": [357, 358], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 39}}, {"id": 357, "type": "primitive_type", "text": "void", "parent": 356, "children": [], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 8}}, {"id": 358, "type": "function_declarator", "text": "OnInterpolationDisabled(bool)", "parent": 356, "children": [359, 360], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 38}}, {"id": 359, "type": "identifier", "text": "OnInterpolationDisabled", "parent": 358, "children": [], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 32}}, {"id": 360, "type": "parameter_list", "text": "(bool)", "parent": 358, "children": [361], "start_point": {"row": 184, "column": 32}, "end_point": {"row": 184, "column": 38}}, {"id": 361, "type": "parameter_declaration", "text": "bool", "parent": 360, "children": [362], "start_point": {"row": 184, "column": 33}, "end_point": {"row": 184, "column": 37}}, {"id": 362, "type": "primitive_type", "text": "bool", "parent": 361, "children": [], "start_point": {"row": 184, "column": 33}, "end_point": {"row": 184, "column": 37}}, {"id": 363, "type": "declaration", "text": "void OnShowMarkers(bool);", "parent": 80, "children": [364, 365], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 29}}, {"id": 364, "type": "primitive_type", "text": "void", "parent": 363, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 8}}, {"id": 365, "type": "function_declarator", "text": "OnShowMarkers(bool)", "parent": 363, "children": [366, 367], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 28}}, {"id": 366, "type": "identifier", "text": "OnShowMarkers", "parent": 365, "children": [], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 22}}, {"id": 367, "type": "parameter_list", "text": "(bool)", "parent": 365, "children": [368], "start_point": {"row": 185, "column": 22}, "end_point": {"row": 185, "column": 28}}, {"id": 368, "type": "parameter_declaration", "text": "bool", "parent": 367, "children": [369], "start_point": {"row": 185, "column": 23}, "end_point": {"row": 185, "column": 27}}, {"id": 369, "type": "primitive_type", "text": "bool", "parent": 368, "children": [], "start_point": {"row": 185, "column": 23}, "end_point": {"row": 185, "column": 27}}, {"id": 370, "type": "declaration", "text": "void Run3DInterpolation();", "parent": 80, "children": [371, 372], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 30}}, {"id": 371, "type": "primitive_type", "text": "void", "parent": 370, "children": [], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 187, "column": 8}}, {"id": 372, "type": "function_declarator", "text": "Run3DInterpolation()", "parent": 370, "children": [373, 374], "start_point": {"row": 187, "column": 9}, "end_point": {"row": 187, "column": 29}}, {"id": 373, "type": "identifier", "text": "Run3DInterpolation", "parent": 372, "children": [], "start_point": {"row": 187, "column": 9}, "end_point": {"row": 187, "column": 27}}, {"id": 374, "type": "parameter_list", "text": "()", "parent": 372, "children": [], "start_point": {"row": 187, "column": 27}, "end_point": {"row": 187, "column": 29}}, {"id": 375, "type": "declaration", "text": "void OnSurfaceInterpolationFinished();", "parent": 80, "children": [376, 377], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 42}}, {"id": 376, "type": "primitive_type", "text": "void", "parent": 375, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 8}}, {"id": 377, "type": "function_declarator", "text": "OnSurfaceInterpolationFinished()", "parent": 375, "children": [378, 379], "start_point": {"row": 189, "column": 9}, "end_point": {"row": 189, "column": 41}}, {"id": 378, "type": "identifier", "text": "OnSurfaceInterpolationFinished", "parent": 377, "children": [], "start_point": {"row": 189, "column": 9}, "end_point": {"row": 189, "column": 39}}, {"id": 379, "type": "parameter_list", "text": "()", "parent": 377, "children": [], "start_point": {"row": 189, "column": 39}, "end_point": {"row": 189, "column": 41}}, {"id": 380, "type": "declaration", "text": "void StartUpdateInterpolationTimer();", "parent": 80, "children": [381, 382], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 41}}, {"id": 381, "type": "primitive_type", "text": "void", "parent": 380, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 8}}, {"id": 382, "type": "function_declarator", "text": "StartUpdateInterpolationTimer()", "parent": 380, "children": [383, 384], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 40}}, {"id": 383, "type": "identifier", "text": "StartUpdateInterpolationTimer", "parent": 382, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 38}}, {"id": 384, "type": "parameter_list", "text": "()", "parent": 382, "children": [], "start_point": {"row": 191, "column": 38}, "end_point": {"row": 191, "column": 40}}, {"id": 385, "type": "declaration", "text": "void StopUpdateInterpolationTimer();", "parent": 80, "children": [386, 387], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 40}}, {"id": 386, "type": "primitive_type", "text": "void", "parent": 385, "children": [], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 8}}, {"id": 387, "type": "function_declarator", "text": "StopUpdateInterpolationTimer()", "parent": 385, "children": [388, 389], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 39}}, {"id": 388, "type": "identifier", "text": "StopUpdateInterpolationTimer", "parent": 387, "children": [], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 37}}, {"id": 389, "type": "parameter_list", "text": "()", "parent": 387, "children": [], "start_point": {"row": 193, "column": 37}, "end_point": {"row": 193, "column": 39}}, {"id": 390, "type": "declaration", "text": "void ChangeSurfaceColor();", "parent": 80, "children": [391, 392], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 30}}, {"id": 391, "type": "primitive_type", "text": "void", "parent": 390, "children": [], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 8}}, {"id": 392, "type": "function_declarator", "text": "ChangeSurfaceColor()", "parent": 390, "children": [393, 394], "start_point": {"row": 195, "column": 9}, "end_point": {"row": 195, "column": 29}}, {"id": 393, "type": "identifier", "text": "ChangeSurfaceColor", "parent": 392, "children": [], "start_point": {"row": 195, "column": 9}, "end_point": {"row": 195, "column": 27}}, {"id": 394, "type": "parameter_list", "text": "()", "parent": 392, "children": [], "start_point": {"row": 195, "column": 27}, "end_point": {"row": 195, "column": 29}}, {"id": 395, "type": "binary_expression", "text": "protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension()", "parent": 80, "children": [396, 408, 409], "start_point": {"row": 197, "column": 2}, "end_point": {"row": 199, "column": 93}}, {"id": 396, "type": "ERROR", "text": ":\n\n const std::map<QAction*, mitk::SliceNavigationController*", "parent": 395, "children": [397, 398, 406, 407], "start_point": {"row": 197, "column": 11}, "end_point": {"row": 199, "column": 61}}, {"id": 397, "type": "type_identifier", "text": "std", "parent": 396, "children": [], "start_point": {"row": 199, "column": 10}, "end_point": {"row": 199, "column": 13}}, {"id": 398, "type": "comma_expression", "text": "map<QAction*, mitk", "parent": 396, "children": [399, 403, 405], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 33}}, {"id": 399, "type": "binary_expression", "text": "map<QAction", "parent": 398, "children": [400, 401, 402], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 26}}, {"id": 400, "type": "identifier", "text": "map", "parent": 399, "children": [], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 18}}, {"id": 401, "type": "<", "text": "<", "parent": 399, "children": [], "start_point": {"row": 199, "column": 18}, "end_point": {"row": 199, "column": 19}}, {"id": 402, "type": "identifier", "text": "QAction", "parent": 399, "children": [], "start_point": {"row": 199, "column": 19}, "end_point": {"row": 199, "column": 26}}, {"id": 403, "type": "ERROR", "text": "*", "parent": 398, "children": [404], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 27}}, {"id": 404, "type": "*", "text": "*", "parent": 403, "children": [], "start_point": {"row": 199, "column": 26}, "end_point": {"row": 199, "column": 27}}, {"id": 405, "type": "identifier", "text": "mitk", "parent": 398, "children": [], "start_point": {"row": 199, "column": 29}, "end_point": {"row": 199, "column": 33}}, {"id": 406, "type": "identifier", "text": "SliceNavigationController", "parent": 396, "children": [], "start_point": {"row": 199, "column": 35}, "end_point": {"row": 199, "column": 60}}, {"id": 407, "type": "*", "text": "*", "parent": 396, "children": [], "start_point": {"row": 199, "column": 60}, "end_point": {"row": 199, "column": 61}}, {"id": 408, "type": ">", "text": ">", "parent": 395, "children": [], "start_point": {"row": 199, "column": 61}, "end_point": {"row": 199, "column": 62}}, {"id": 409, "type": "call_expression", "text": "createActionToSliceDimension()", "parent": 395, "children": [410, 411], "start_point": {"row": 199, "column": 63}, "end_point": {"row": 199, "column": 93}}, {"id": 410, "type": "identifier", "text": "createActionToSliceDimension", "parent": 409, "children": [], "start_point": {"row": 199, "column": 63}, "end_point": {"row": 199, "column": 91}}, {"id": 411, "type": "argument_list", "text": "()", "parent": 409, "children": [], "start_point": {"row": 199, "column": 91}, "end_point": {"row": 199, "column": 93}}, {"id": 412, "type": "binary_expression", "text": "std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION", "parent": 80, "children": [413, 414, 425, 426], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 81}}, {"id": 413, "type": "identifier", "text": "std", "parent": 412, "children": [], "start_point": {"row": 200, "column": 4}, "end_point": {"row": 200, "column": 7}}, {"id": 414, "type": "ERROR", "text": "::map<QAction*, mitk::SliceNavigationController*", "parent": 412, "children": [415, 423, 424], "start_point": {"row": 200, "column": 7}, "end_point": {"row": 200, "column": 55}}, {"id": 415, "type": "comma_expression", "text": "map<QAction*, mitk", "parent": 414, "children": [416, 420, 422], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 27}}, {"id": 416, "type": "binary_expression", "text": "map<QAction", "parent": 415, "children": [417, 418, 419], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 20}}, {"id": 417, "type": "identifier", "text": "map", "parent": 416, "children": [], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 12}}, {"id": 418, "type": "<", "text": "<", "parent": 416, "children": [], "start_point": {"row": 200, "column": 12}, "end_point": {"row": 200, "column": 13}}, {"id": 419, "type": "identifier", "text": "QAction", "parent": 416, "children": [], "start_point": {"row": 200, "column": 13}, "end_point": {"row": 200, "column": 20}}, {"id": 420, "type": "ERROR", "text": "*", "parent": 415, "children": [421], "start_point": {"row": 200, "column": 20}, "end_point": {"row": 200, "column": 21}}, {"id": 421, "type": "*", "text": "*", "parent": 420, "children": [], "start_point": {"row": 200, "column": 20}, "end_point": {"row": 200, "column": 21}}, {"id": 422, "type": "identifier", "text": "mitk", "parent": 415, "children": [], "start_point": {"row": 200, "column": 23}, "end_point": {"row": 200, "column": 27}}, {"id": 423, "type": "identifier", "text": "SliceNavigationController", "parent": 414, "children": [], "start_point": {"row": 200, "column": 29}, "end_point": {"row": 200, "column": 54}}, {"id": 424, "type": "*", "text": "*", "parent": 414, "children": [], "start_point": {"row": 200, "column": 54}, "end_point": {"row": 200, "column": 55}}, {"id": 425, "type": ">", "text": ">", "parent": 412, "children": [], "start_point": {"row": 200, "column": 55}, "end_point": {"row": 200, "column": 56}}, {"id": 426, "type": "identifier", "text": "ACTION_TO_SLICEDIMENSION", "parent": 412, "children": [], "start_point": {"row": 200, "column": 57}, "end_point": {"row": 200, "column": 81}}, {"id": 427, "type": "declaration", "text": "void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);", "parent": 80, "children": [428, 429], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 74}}, {"id": 428, "type": "primitive_type", "text": "void", "parent": 427, "children": [], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 8}}, {"id": 429, "type": "function_declarator", "text": "AcceptAllInterpolations(mitk::SliceNavigationController* slicer)", "parent": 427, "children": [430, 431], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 73}}, {"id": 430, "type": "identifier", "text": "AcceptAllInterpolations", "parent": 429, "children": [], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 32}}, {"id": 431, "type": "parameter_list", "text": "(mitk::SliceNavigationController* slicer)", "parent": 429, "children": [432], "start_point": {"row": 202, "column": 32}, "end_point": {"row": 202, "column": 73}}, {"id": 432, "type": "parameter_declaration", "text": "mitk::SliceNavigationController* slicer", "parent": 431, "children": [433, 434, 436], "start_point": {"row": 202, "column": 33}, "end_point": {"row": 202, "column": 72}}, {"id": 433, "type": "type_identifier", "text": "mitk", "parent": 432, "children": [], "start_point": {"row": 202, "column": 33}, "end_point": {"row": 202, "column": 37}}, {"id": 434, "type": "ERROR", "text": "::SliceNavigationController", "parent": 432, "children": [435], "start_point": {"row": 202, "column": 37}, "end_point": {"row": 202, "column": 64}}, {"id": 435, "type": "identifier", "text": "SliceNavigationController", "parent": 434, "children": [], "start_point": {"row": 202, "column": 39}, "end_point": {"row": 202, "column": 64}}, {"id": 436, "type": "pointer_declarator", "text": "* slicer", "parent": 432, "children": [437, 438], "start_point": {"row": 202, "column": 64}, "end_point": {"row": 202, "column": 72}}, {"id": 437, "type": "*", "text": "*", "parent": 436, "children": [], "start_point": {"row": 202, "column": 64}, "end_point": {"row": 202, "column": 65}}, {"id": 438, "type": "identifier", "text": "slicer", "parent": 436, "children": [], "start_point": {"row": 202, "column": 66}, "end_point": {"row": 202, "column": 72}}, {"id": 439, "type": "declaration", "text": "bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);", "parent": 80, "children": [440, 441], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 211, "column": 113}}, {"id": 440, "type": "primitive_type", "text": "bool", "parent": 439, "children": [], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 211, "column": 8}}, {"id": 441, "type": "function_declarator", "text": "TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer)", "parent": 439, "children": [442, 443], "start_point": {"row": 211, "column": 9}, "end_point": {"row": 211, "column": 112}}, {"id": 442, "type": "identifier", "text": "TranslateAndInterpolateChangedSlice", "parent": 441, "children": [], "start_point": {"row": 211, "column": 9}, "end_point": {"row": 211, "column": 44}}, {"id": 443, "type": "parameter_list", "text": "(const itk::EventObject& e, mitk::SliceNavigationController* slicer)", "parent": 441, "children": [444, 449], "start_point": {"row": 211, "column": 44}, "end_point": {"row": 211, "column": 112}}, {"id": 444, "type": "parameter_declaration", "text": "const itk::EventObject& e", "parent": 443, "children": [445, 446, 448], "start_point": {"row": 211, "column": 45}, "end_point": {"row": 211, "column": 70}}, {"id": 445, "type": "type_identifier", "text": "itk", "parent": 444, "children": [], "start_point": {"row": 211, "column": 51}, "end_point": {"row": 211, "column": 54}}, {"id": 446, "type": "ERROR", "text": "::EventObject&", "parent": 444, "children": [447], "start_point": {"row": 211, "column": 54}, "end_point": {"row": 211, "column": 68}}, {"id": 447, "type": "identifier", "text": "EventObject", "parent": 446, "children": [], "start_point": {"row": 211, "column": 56}, "end_point": {"row": 211, "column": 67}}, {"id": 448, "type": "identifier", "text": "e", "parent": 444, "children": [], "start_point": {"row": 211, "column": 69}, "end_point": {"row": 211, "column": 70}}, {"id": 449, "type": "parameter_declaration", "text": "mitk::SliceNavigationController* slicer", "parent": 443, "children": [450, 451, 453], "start_point": {"row": 211, "column": 72}, "end_point": {"row": 211, "column": 111}}, {"id": 450, "type": "type_identifier", "text": "mitk", "parent": 449, "children": [], "start_point": {"row": 211, "column": 72}, "end_point": {"row": 211, "column": 76}}, {"id": 451, "type": "ERROR", "text": "::SliceNavigationController", "parent": 449, "children": [452], "start_point": {"row": 211, "column": 76}, "end_point": {"row": 211, "column": 103}}, {"id": 452, "type": "identifier", "text": "SliceNavigationController", "parent": 451, "children": [], "start_point": {"row": 211, "column": 78}, "end_point": {"row": 211, "column": 103}}, {"id": 453, "type": "pointer_declarator", "text": "* slicer", "parent": 449, "children": [454, 455], "start_point": {"row": 211, "column": 103}, "end_point": {"row": 211, "column": 111}}, {"id": 454, "type": "*", "text": "*", "parent": 453, "children": [], "start_point": {"row": 211, "column": 103}, "end_point": {"row": 211, "column": 104}}, {"id": 455, "type": "identifier", "text": "slicer", "parent": 453, "children": [], "start_point": {"row": 211, "column": 105}, "end_point": {"row": 211, "column": 111}}, {"id": 456, "type": "declaration", "text": "void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );", "parent": 80, "children": [457, 458], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 115}}, {"id": 457, "type": "primitive_type", "text": "void", "parent": 456, "children": [], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 8}}, {"id": 458, "type": "function_declarator", "text": "Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer )", "parent": 456, "children": [459, 460], "start_point": {"row": 217, "column": 9}, "end_point": {"row": 217, "column": 114}}, {"id": 459, "type": "identifier", "text": "Interpolate", "parent": 458, "children": [], "start_point": {"row": 217, "column": 9}, "end_point": {"row": 217, "column": 20}}, {"id": 460, "type": "parameter_list", "text": "( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer )", "parent": 458, "children": [461, 468, 473], "start_point": {"row": 217, "column": 20}, "end_point": {"row": 217, "column": 114}}, {"id": 461, "type": "parameter_declaration", "text": "mitk::PlaneGeometry* plane", "parent": 460, "children": [462, 463, 465], "start_point": {"row": 217, "column": 22}, "end_point": {"row": 217, "column": 48}}, {"id": 462, "type": "type_identifier", "text": "mitk", "parent": 461, "children": [], "start_point": {"row": 217, "column": 22}, "end_point": {"row": 217, "column": 26}}, {"id": 463, "type": "ERROR", "text": "::PlaneGeometry", "parent": 461, "children": [464], "start_point": {"row": 217, "column": 26}, "end_point": {"row": 217, "column": 41}}, {"id": 464, "type": "identifier", "text": "PlaneGeometry", "parent": 463, "children": [], "start_point": {"row": 217, "column": 28}, "end_point": {"row": 217, "column": 41}}, {"id": 465, "type": "pointer_declarator", "text": "* plane", "parent": 461, "children": [466, 467], "start_point": {"row": 217, "column": 41}, "end_point": {"row": 217, "column": 48}}, {"id": 466, "type": "*", "text": "*", "parent": 465, "children": [], "start_point": {"row": 217, "column": 41}, "end_point": {"row": 217, "column": 42}}, {"id": 467, "type": "identifier", "text": "plane", "parent": 465, "children": [], "start_point": {"row": 217, "column": 43}, "end_point": {"row": 217, "column": 48}}, {"id": 468, "type": "parameter_declaration", "text": "unsigned int timeStep", "parent": 460, "children": [469, 472], "start_point": {"row": 217, "column": 50}, "end_point": {"row": 217, "column": 71}}, {"id": 469, "type": "sized_type_specifier", "text": "unsigned int", "parent": 468, "children": [470, 471], "start_point": {"row": 217, "column": 50}, "end_point": {"row": 217, "column": 62}}, {"id": 470, "type": "unsigned", "text": "unsigned", "parent": 469, "children": [], "start_point": {"row": 217, "column": 50}, "end_point": {"row": 217, "column": 58}}, {"id": 471, "type": "primitive_type", "text": "int", "parent": 469, "children": [], "start_point": {"row": 217, "column": 59}, "end_point": {"row": 217, "column": 62}}, {"id": 472, "type": "identifier", "text": "timeStep", "parent": 468, "children": [], "start_point": {"row": 217, "column": 63}, "end_point": {"row": 217, "column": 71}}, {"id": 473, "type": "parameter_declaration", "text": "mitk::SliceNavigationController *slicer", "parent": 460, "children": [474, 475, 477], "start_point": {"row": 217, "column": 73}, "end_point": {"row": 217, "column": 112}}, {"id": 474, "type": "type_identifier", "text": "mitk", "parent": 473, "children": [], "start_point": {"row": 217, "column": 73}, "end_point": {"row": 217, "column": 77}}, {"id": 475, "type": "ERROR", "text": "::SliceNavigationController", "parent": 473, "children": [476], "start_point": {"row": 217, "column": 77}, "end_point": {"row": 217, "column": 104}}, {"id": 476, "type": "identifier", "text": "SliceNavigationController", "parent": 475, "children": [], "start_point": {"row": 217, "column": 79}, "end_point": {"row": 217, "column": 104}}, {"id": 477, "type": "pointer_declarator", "text": "*slicer", "parent": 473, "children": [478, 479], "start_point": {"row": 217, "column": 105}, "end_point": {"row": 217, "column": 112}}, {"id": 478, "type": "*", "text": "*", "parent": 477, "children": [], "start_point": {"row": 217, "column": 105}, "end_point": {"row": 217, "column": 106}}, {"id": 479, "type": "identifier", "text": "slicer", "parent": 477, "children": [], "start_point": {"row": 217, "column": 106}, "end_point": {"row": 217, "column": 112}}, {"id": 480, "type": "declaration", "text": "void UpdateVisibleSuggestion();", "parent": 80, "children": [481, 482], "start_point": {"row": 224, "column": 4}, "end_point": {"row": 224, "column": 35}}, {"id": 481, "type": "primitive_type", "text": "void", "parent": 480, "children": [], "start_point": {"row": 224, "column": 4}, "end_point": {"row": 224, "column": 8}}, {"id": 482, "type": "function_declarator", "text": "UpdateVisibleSuggestion()", "parent": 480, "children": [483, 484], "start_point": {"row": 224, "column": 9}, "end_point": {"row": 224, "column": 34}}, {"id": 483, "type": "identifier", "text": "UpdateVisibleSuggestion", "parent": 482, "children": [], "start_point": {"row": 224, "column": 9}, "end_point": {"row": 224, "column": 32}}, {"id": 484, "type": "parameter_list", "text": "()", "parent": 482, "children": [], "start_point": {"row": 224, "column": 32}, "end_point": {"row": 224, "column": 34}}, {"id": 485, "type": "declaration", "text": "void SetCurrentContourListID();", "parent": 80, "children": [486, 487], "start_point": {"row": 226, "column": 4}, "end_point": {"row": 226, "column": 35}}, {"id": 486, "type": "primitive_type", "text": "void", "parent": 485, "children": [], "start_point": {"row": 226, "column": 4}, "end_point": {"row": 226, "column": 8}}, {"id": 487, "type": "function_declarator", "text": "SetCurrentContourListID()", "parent": 485, "children": [488, 489], "start_point": {"row": 226, "column": 9}, "end_point": {"row": 226, "column": 34}}, {"id": 488, "type": "identifier", "text": "SetCurrentContourListID", "parent": 487, "children": [], "start_point": {"row": 226, "column": 9}, "end_point": {"row": 226, "column": 32}}, {"id": 489, "type": "parameter_list", "text": "()", "parent": 487, "children": [], "start_point": {"row": 226, "column": 32}, "end_point": {"row": 226, "column": 34}}, {"id": 490, "type": "labeled_statement", "text": "private:\n\n void HideAllInterpolationControls();", "parent": 80, "children": [491], "start_point": {"row": 228, "column": 0}, "end_point": {"row": 230, "column": 40}}, {"id": 491, "type": "declaration", "text": "void HideAllInterpolationControls();", "parent": 490, "children": [492, 493], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 230, "column": 40}}, {"id": 492, "type": "primitive_type", "text": "void", "parent": 491, "children": [], "start_point": {"row": 230, "column": 4}, "end_point": {"row": 230, "column": 8}}, {"id": 493, "type": "function_declarator", "text": "HideAllInterpolationControls()", "parent": 491, "children": [494, 495], "start_point": {"row": 230, "column": 9}, "end_point": {"row": 230, "column": 39}}, {"id": 494, "type": "identifier", "text": "HideAllInterpolationControls", "parent": 493, "children": [], "start_point": {"row": 230, "column": 9}, "end_point": {"row": 230, "column": 37}}, {"id": 495, "type": "parameter_list", "text": "()", "parent": 493, "children": [], "start_point": {"row": 230, "column": 37}, "end_point": {"row": 230, "column": 39}}, {"id": 496, "type": "declaration", "text": "void Show2DInterpolationControls(bool show);", "parent": 80, "children": [497, 498], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 48}}, {"id": 497, "type": "primitive_type", "text": "void", "parent": 496, "children": [], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 8}}, {"id": 498, "type": "function_declarator", "text": "Show2DInterpolationControls(bool show)", "parent": 496, "children": [499, 500], "start_point": {"row": 231, "column": 9}, "end_point": {"row": 231, "column": 47}}, {"id": 499, "type": "identifier", "text": "Show2DInterpolationControls", "parent": 498, "children": [], "start_point": {"row": 231, "column": 9}, "end_point": {"row": 231, "column": 36}}, {"id": 500, "type": "parameter_list", "text": "(bool show)", "parent": 498, "children": [501], "start_point": {"row": 231, "column": 36}, "end_point": {"row": 231, "column": 47}}, {"id": 501, "type": "parameter_declaration", "text": "bool show", "parent": 500, "children": [502, 503], "start_point": {"row": 231, "column": 37}, "end_point": {"row": 231, "column": 46}}, {"id": 502, "type": "primitive_type", "text": "bool", "parent": 501, "children": [], "start_point": {"row": 231, "column": 37}, "end_point": {"row": 231, "column": 41}}, {"id": 503, "type": "identifier", "text": "show", "parent": 501, "children": [], "start_point": {"row": 231, "column": 42}, "end_point": {"row": 231, "column": 46}}, {"id": 504, "type": "declaration", "text": "void Show3DInterpolationControls(bool show);", "parent": 80, "children": [505, 506], "start_point": {"row": 232, "column": 4}, "end_point": {"row": 232, "column": 48}}, {"id": 505, "type": "primitive_type", "text": "void", "parent": 504, "children": [], "start_point": {"row": 232, "column": 4}, "end_point": {"row": 232, "column": 8}}, {"id": 506, "type": "function_declarator", "text": "Show3DInterpolationControls(bool show)", "parent": 504, "children": [507, 508], "start_point": {"row": 232, "column": 9}, "end_point": {"row": 232, "column": 47}}, {"id": 507, "type": "identifier", "text": "Show3DInterpolationControls", "parent": 506, "children": [], "start_point": {"row": 232, "column": 9}, "end_point": {"row": 232, "column": 36}}, {"id": 508, "type": "parameter_list", "text": "(bool show)", "parent": 506, "children": [509], "start_point": {"row": 232, "column": 36}, "end_point": {"row": 232, "column": 47}}, {"id": 509, "type": "parameter_declaration", "text": "bool show", "parent": 508, "children": [510, 511], "start_point": {"row": 232, "column": 37}, "end_point": {"row": 232, "column": 46}}, {"id": 510, "type": "primitive_type", "text": "bool", "parent": 509, "children": [], "start_point": {"row": 232, "column": 37}, "end_point": {"row": 232, "column": 41}}, {"id": 511, "type": "identifier", "text": "show", "parent": 509, "children": [], "start_point": {"row": 232, "column": 42}, "end_point": {"row": 232, "column": 46}}, {"id": 512, "type": "declaration", "text": "void CheckSupportedImageDimension();", "parent": 80, "children": [513, 514], "start_point": {"row": 233, "column": 4}, "end_point": {"row": 233, "column": 40}}, {"id": 513, "type": "primitive_type", "text": "void", "parent": 512, "children": [], "start_point": {"row": 233, "column": 4}, "end_point": {"row": 233, "column": 8}}, {"id": 514, "type": "function_declarator", "text": "CheckSupportedImageDimension()", "parent": 512, "children": [515, 516], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 39}}, {"id": 515, "type": "identifier", "text": "CheckSupportedImageDimension", "parent": 514, "children": [], "start_point": {"row": 233, "column": 9}, "end_point": {"row": 233, "column": 37}}, {"id": 516, "type": "parameter_list", "text": "()", "parent": 514, "children": [], "start_point": {"row": 233, "column": 37}, "end_point": {"row": 233, "column": 39}}, {"id": 517, "type": "labeled_statement", "text": "mitk::SegmentationInterpolationController::Pointer m_Interpolator;", "parent": 80, "children": [518, 519], "start_point": {"row": 235, "column": 4}, "end_point": {"row": 235, "column": 70}}, {"id": 518, "type": "statement_identifier", "text": "mitk", "parent": 517, "children": [], "start_point": {"row": 235, "column": 4}, "end_point": {"row": 235, "column": 8}}, {"id": 519, "type": "labeled_statement", "text": "SegmentationInterpolationController::Pointer m_Interpolator;", "parent": 517, "children": [520, 521], "start_point": {"row": 235, "column": 10}, "end_point": {"row": 235, "column": 70}}, {"id": 520, "type": "statement_identifier", "text": "SegmentationInterpolationController", "parent": 519, "children": [], "start_point": {"row": 235, "column": 10}, "end_point": {"row": 235, "column": 45}}, {"id": 521, "type": "declaration", "text": "Pointer m_Interpolator;", "parent": 519, "children": [522, 523], "start_point": {"row": 235, "column": 47}, "end_point": {"row": 235, "column": 70}}, {"id": 522, "type": "type_identifier", "text": "Pointer", "parent": 521, "children": [], "start_point": {"row": 235, "column": 47}, "end_point": {"row": 235, "column": 54}}, {"id": 523, "type": "identifier", "text": "m_Interpolator", "parent": 521, "children": [], "start_point": {"row": 235, "column": 55}, "end_point": {"row": 235, "column": 69}}, {"id": 524, "type": "labeled_statement", "text": "mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;", "parent": 80, "children": [525, 526], "start_point": {"row": 236, "column": 4}, "end_point": {"row": 236, "column": 72}}, {"id": 525, "type": "statement_identifier", "text": "mitk", "parent": 524, "children": [], "start_point": {"row": 236, "column": 4}, "end_point": {"row": 236, "column": 8}}, {"id": 526, "type": "labeled_statement", "text": "SurfaceInterpolationController::Pointer m_SurfaceInterpolator;", "parent": 524, "children": [527, 528], "start_point": {"row": 236, "column": 10}, "end_point": {"row": 236, "column": 72}}, {"id": 527, "type": "statement_identifier", "text": "SurfaceInterpolationController", "parent": 526, "children": [], "start_point": {"row": 236, "column": 10}, "end_point": {"row": 236, "column": 40}}, {"id": 528, "type": "declaration", "text": "Pointer m_SurfaceInterpolator;", "parent": 526, "children": [529, 530], "start_point": {"row": 236, "column": 42}, "end_point": {"row": 236, "column": 72}}, {"id": 529, "type": "type_identifier", "text": "Pointer", "parent": 528, "children": [], "start_point": {"row": 236, "column": 42}, "end_point": {"row": 236, "column": 49}}, {"id": 530, "type": "identifier", "text": "m_SurfaceInterpolator", "parent": 528, "children": [], "start_point": {"row": 236, "column": 50}, "end_point": {"row": 236, "column": 71}}, {"id": 531, "type": "labeled_statement", "text": "mitk::ToolManager::Pointer m_ToolManager;", "parent": 80, "children": [532, 533], "start_point": {"row": 238, "column": 4}, "end_point": {"row": 238, "column": 45}}, {"id": 532, "type": "statement_identifier", "text": "mitk", "parent": 531, "children": [], "start_point": {"row": 238, "column": 4}, "end_point": {"row": 238, "column": 8}}, {"id": 533, "type": "labeled_statement", "text": "ToolManager::Pointer m_ToolManager;", "parent": 531, "children": [534, 535], "start_point": {"row": 238, "column": 10}, "end_point": {"row": 238, "column": 45}}, {"id": 534, "type": "statement_identifier", "text": "ToolManager", "parent": 533, "children": [], "start_point": {"row": 238, "column": 10}, "end_point": {"row": 238, "column": 21}}, {"id": 535, "type": "declaration", "text": "Pointer m_ToolManager;", "parent": 533, "children": [536, 537], "start_point": {"row": 238, "column": 23}, "end_point": {"row": 238, "column": 45}}, {"id": 536, "type": "type_identifier", "text": "Pointer", "parent": 535, "children": [], "start_point": {"row": 238, "column": 23}, "end_point": {"row": 238, "column": 30}}, {"id": 537, "type": "identifier", "text": "m_ToolManager", "parent": 535, "children": [], "start_point": {"row": 238, "column": 31}, "end_point": {"row": 238, "column": 44}}, {"id": 538, "type": "declaration", "text": "bool m_Initialized;", "parent": 80, "children": [539, 540], "start_point": {"row": 239, "column": 4}, "end_point": {"row": 239, "column": 23}}, {"id": 539, "type": "primitive_type", "text": "bool", "parent": 538, "children": [], "start_point": {"row": 239, "column": 4}, "end_point": {"row": 239, "column": 8}}, {"id": 540, "type": "identifier", "text": "m_Initialized", "parent": 538, "children": [], "start_point": {"row": 239, "column": 9}, "end_point": {"row": 239, "column": 22}}, {"id": 541, "type": "ERROR", "text": "QHash<mitk::", "parent": 80, "children": [542], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 16}}, {"id": 542, "type": "binary_expression", "text": "QHash<mitk", "parent": 541, "children": [543, 544, 545], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 14}}, {"id": 543, "type": "identifier", "text": "QHash", "parent": 542, "children": [], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 9}}, {"id": 544, "type": "<", "text": "<", "parent": 542, "children": [], "start_point": {"row": 241, "column": 9}, "end_point": {"row": 241, "column": 10}}, {"id": 545, "type": "identifier", "text": "mitk", "parent": 542, "children": [], "start_point": {"row": 241, "column": 10}, "end_point": {"row": 241, "column": 14}}, {"id": 546, "type": "comma_expression", "text": "SliceNavigationController*, int> m_ControllerToTimeObserverTag", "parent": 80, "children": [547, 551], "start_point": {"row": 241, "column": 16}, "end_point": {"row": 241, "column": 78}}, {"id": 547, "type": "binary_expression", "text": "SliceNavigationController*", "parent": 546, "children": [548, 549, 550], "start_point": {"row": 241, "column": 16}, "end_point": {"row": 241, "column": 42}}, {"id": 548, "type": "identifier", "text": "SliceNavigationController", "parent": 547, "children": [], "start_point": {"row": 241, "column": 16}, "end_point": {"row": 241, "column": 41}}, {"id": 549, "type": "*", "text": "*", "parent": 547, "children": [], "start_point": {"row": 241, "column": 41}, "end_point": {"row": 241, "column": 42}}, {"id": 550, "type": "identifier", "text": "", "parent": 547, "children": [], "start_point": {"row": 241, "column": 42}, "end_point": {"row": 241, "column": 42}}, {"id": 551, "type": "binary_expression", "text": "int> m_ControllerToTimeObserverTag", "parent": 546, "children": [552, 553, 554], "start_point": {"row": 241, "column": 44}, "end_point": {"row": 241, "column": 78}}, {"id": 552, "type": "identifier", "text": "int", "parent": 551, "children": [], "start_point": {"row": 241, "column": 44}, "end_point": {"row": 241, "column": 47}}, {"id": 553, "type": ">", "text": ">", "parent": 551, "children": [], "start_point": {"row": 241, "column": 47}, "end_point": {"row": 241, "column": 48}}, {"id": 554, "type": "identifier", "text": "m_ControllerToTimeObserverTag", "parent": 551, "children": [], "start_point": {"row": 241, "column": 49}, "end_point": {"row": 241, "column": 78}}, {"id": 555, "type": "ERROR", "text": "QHash<mitk::", "parent": 80, "children": [556], "start_point": {"row": 242, "column": 4}, "end_point": {"row": 242, "column": 16}}, {"id": 556, "type": "binary_expression", "text": "QHash<mitk", "parent": 555, "children": [557, 558, 559], "start_point": {"row": 242, "column": 4}, "end_point": {"row": 242, "column": 14}}, {"id": 557, "type": "identifier", "text": "QHash", "parent": 556, "children": [], "start_point": {"row": 242, "column": 4}, "end_point": {"row": 242, "column": 9}}, {"id": 558, "type": "<", "text": "<", "parent": 556, "children": [], "start_point": {"row": 242, "column": 9}, "end_point": {"row": 242, "column": 10}}, {"id": 559, "type": "identifier", "text": "mitk", "parent": 556, "children": [], "start_point": {"row": 242, "column": 10}, "end_point": {"row": 242, "column": 14}}, {"id": 560, "type": "comma_expression", "text": "SliceNavigationController*, int> m_ControllerToSliceObserverTag", "parent": 80, "children": [561, 565], "start_point": {"row": 242, "column": 16}, "end_point": {"row": 242, "column": 79}}, {"id": 561, "type": "binary_expression", "text": "SliceNavigationController*", "parent": 560, "children": [562, 563, 564], "start_point": {"row": 242, "column": 16}, "end_point": {"row": 242, "column": 42}}, {"id": 562, "type": "identifier", "text": "SliceNavigationController", "parent": 561, "children": [], "start_point": {"row": 242, "column": 16}, "end_point": {"row": 242, "column": 41}}, {"id": 563, "type": "*", "text": "*", "parent": 561, "children": [], "start_point": {"row": 242, "column": 41}, "end_point": {"row": 242, "column": 42}}, {"id": 564, "type": "identifier", "text": "", "parent": 561, "children": [], "start_point": {"row": 242, "column": 42}, "end_point": {"row": 242, "column": 42}}, {"id": 565, "type": "binary_expression", "text": "int> m_ControllerToSliceObserverTag", "parent": 560, "children": [566, 567, 568], "start_point": {"row": 242, "column": 44}, "end_point": {"row": 242, "column": 79}}, {"id": 566, "type": "identifier", "text": "int", "parent": 565, "children": [], "start_point": {"row": 242, "column": 44}, "end_point": {"row": 242, "column": 47}}, {"id": 567, "type": ">", "text": ">", "parent": 565, "children": [], "start_point": {"row": 242, "column": 47}, "end_point": {"row": 242, "column": 48}}, {"id": 568, "type": "identifier", "text": "m_ControllerToSliceObserverTag", "parent": 565, "children": [], "start_point": {"row": 242, "column": 49}, "end_point": {"row": 242, "column": 79}}, {"id": 569, "type": "ERROR", "text": "QHash<mitk::", "parent": 80, "children": [570], "start_point": {"row": 243, "column": 4}, "end_point": {"row": 243, "column": 16}}, {"id": 570, "type": "binary_expression", "text": "QHash<mitk", "parent": 569, "children": [571, 572, 573], "start_point": {"row": 243, "column": 4}, "end_point": {"row": 243, "column": 14}}, {"id": 571, "type": "identifier", "text": "QHash", "parent": 570, "children": [], "start_point": {"row": 243, "column": 4}, "end_point": {"row": 243, "column": 9}}, {"id": 572, "type": "<", "text": "<", "parent": 570, "children": [], "start_point": {"row": 243, "column": 9}, "end_point": {"row": 243, "column": 10}}, {"id": 573, "type": "identifier", "text": "mitk", "parent": 570, "children": [], "start_point": {"row": 243, "column": 10}, "end_point": {"row": 243, "column": 14}}, {"id": 574, "type": "comma_expression", "text": "SliceNavigationController*, int> m_ControllerToDeleteObserverTag", "parent": 80, "children": [575, 579], "start_point": {"row": 243, "column": 16}, "end_point": {"row": 243, "column": 80}}, {"id": 575, "type": "binary_expression", "text": "SliceNavigationController*", "parent": 574, "children": [576, 577, 578], "start_point": {"row": 243, "column": 16}, "end_point": {"row": 243, "column": 42}}, {"id": 576, "type": "identifier", "text": "SliceNavigationController", "parent": 575, "children": [], "start_point": {"row": 243, "column": 16}, "end_point": {"row": 243, "column": 41}}, {"id": 577, "type": "*", "text": "*", "parent": 575, "children": [], "start_point": {"row": 243, "column": 41}, "end_point": {"row": 243, "column": 42}}, {"id": 578, "type": "identifier", "text": "", "parent": 575, "children": [], "start_point": {"row": 243, "column": 42}, "end_point": {"row": 243, "column": 42}}, {"id": 579, "type": "binary_expression", "text": "int> m_ControllerToDeleteObserverTag", "parent": 574, "children": [580, 581, 582], "start_point": {"row": 243, "column": 44}, "end_point": {"row": 243, "column": 80}}, {"id": 580, "type": "identifier", "text": "int", "parent": 579, "children": [], "start_point": {"row": 243, "column": 44}, "end_point": {"row": 243, "column": 47}}, {"id": 581, "type": ">", "text": ">", "parent": 579, "children": [], "start_point": {"row": 243, "column": 47}, "end_point": {"row": 243, "column": 48}}, {"id": 582, "type": "identifier", "text": "m_ControllerToDeleteObserverTag", "parent": 579, "children": [], "start_point": {"row": 243, "column": 49}, "end_point": {"row": 243, "column": 80}}, {"id": 583, "type": "declaration", "text": "unsigned int InterpolationInfoChangedObserverTag;", "parent": 80, "children": [584, 587], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 53}}, {"id": 584, "type": "sized_type_specifier", "text": "unsigned int", "parent": 583, "children": [585, 586], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 16}}, {"id": 585, "type": "unsigned", "text": "unsigned", "parent": 584, "children": [], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 12}}, {"id": 586, "type": "primitive_type", "text": "int", "parent": 584, "children": [], "start_point": {"row": 245, "column": 13}, "end_point": {"row": 245, "column": 16}}, {"id": 587, "type": "identifier", "text": "InterpolationInfoChangedObserverTag", "parent": 583, "children": [], "start_point": {"row": 245, "column": 17}, "end_point": {"row": 245, "column": 52}}, {"id": 588, "type": "declaration", "text": "unsigned int SurfaceInterpolationInfoChangedObserverTag;", "parent": 80, "children": [589, 592], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 60}}, {"id": 589, "type": "sized_type_specifier", "text": "unsigned int", "parent": 588, "children": [590, 591], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 16}}, {"id": 590, "type": "unsigned", "text": "unsigned", "parent": 589, "children": [], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 12}}, {"id": 591, "type": "primitive_type", "text": "int", "parent": 589, "children": [], "start_point": {"row": 246, "column": 13}, "end_point": {"row": 246, "column": 16}}, {"id": 592, "type": "identifier", "text": "SurfaceInterpolationInfoChangedObserverTag", "parent": 588, "children": [], "start_point": {"row": 246, "column": 17}, "end_point": {"row": 246, "column": 59}}, {"id": 593, "type": "declaration", "text": "QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;", "parent": 80, "children": [594, 595], "start_point": {"row": 248, "column": 4}, "end_point": {"row": 248, "column": 58}}, {"id": 594, "type": "type_identifier", "text": "QGroupBox", "parent": 593, "children": [], "start_point": {"row": 248, "column": 4}, "end_point": {"row": 248, "column": 13}}, {"id": 595, "type": "pointer_declarator", "text": "* m_GroupBoxEnableExclusiveInterpolationMode", "parent": 593, "children": [596, 597], "start_point": {"row": 248, "column": 13}, "end_point": {"row": 248, "column": 57}}, {"id": 596, "type": "*", "text": "*", "parent": 595, "children": [], "start_point": {"row": 248, "column": 13}, "end_point": {"row": 248, "column": 14}}, {"id": 597, "type": "identifier", "text": "m_GroupBoxEnableExclusiveInterpolationMode", "parent": 595, "children": [], "start_point": {"row": 248, "column": 15}, "end_point": {"row": 248, "column": 57}}, {"id": 598, "type": "declaration", "text": "QComboBox* m_CmbInterpolation;", "parent": 80, "children": [599, 600], "start_point": {"row": 249, "column": 4}, "end_point": {"row": 249, "column": 34}}, {"id": 599, "type": "type_identifier", "text": "QComboBox", "parent": 598, "children": [], "start_point": {"row": 249, "column": 4}, "end_point": {"row": 249, "column": 13}}, {"id": 600, "type": "pointer_declarator", "text": "* m_CmbInterpolation", "parent": 598, "children": [601, 602], "start_point": {"row": 249, "column": 13}, "end_point": {"row": 249, "column": 33}}, {"id": 601, "type": "*", "text": "*", "parent": 600, "children": [], "start_point": {"row": 249, "column": 13}, "end_point": {"row": 249, "column": 14}}, {"id": 602, "type": "identifier", "text": "m_CmbInterpolation", "parent": 600, "children": [], "start_point": {"row": 249, "column": 15}, "end_point": {"row": 249, "column": 33}}, {"id": 603, "type": "declaration", "text": "QPushButton* m_BtnApply2D;", "parent": 80, "children": [604, 605], "start_point": {"row": 250, "column": 4}, "end_point": {"row": 250, "column": 30}}, {"id": 604, "type": "type_identifier", "text": "QPushButton", "parent": 603, "children": [], "start_point": {"row": 250, "column": 4}, "end_point": {"row": 250, "column": 15}}, {"id": 605, "type": "pointer_declarator", "text": "* m_BtnApply2D", "parent": 603, "children": [606, 607], "start_point": {"row": 250, "column": 15}, "end_point": {"row": 250, "column": 29}}, {"id": 606, "type": "*", "text": "*", "parent": 605, "children": [], "start_point": {"row": 250, "column": 15}, "end_point": {"row": 250, "column": 16}}, {"id": 607, "type": "identifier", "text": "m_BtnApply2D", "parent": 605, "children": [], "start_point": {"row": 250, "column": 17}, "end_point": {"row": 250, "column": 29}}, {"id": 608, "type": "declaration", "text": "QPushButton* m_BtnApplyForAllSlices2D;", "parent": 80, "children": [609, 610], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 251, "column": 42}}, {"id": 609, "type": "type_identifier", "text": "QPushButton", "parent": 608, "children": [], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 251, "column": 15}}, {"id": 610, "type": "pointer_declarator", "text": "* m_BtnApplyForAllSlices2D", "parent": 608, "children": [611, 612], "start_point": {"row": 251, "column": 15}, "end_point": {"row": 251, "column": 41}}, {"id": 611, "type": "*", "text": "*", "parent": 610, "children": [], "start_point": {"row": 251, "column": 15}, "end_point": {"row": 251, "column": 16}}, {"id": 612, "type": "identifier", "text": "m_BtnApplyForAllSlices2D", "parent": 610, "children": [], "start_point": {"row": 251, "column": 17}, "end_point": {"row": 251, "column": 41}}, {"id": 613, "type": "declaration", "text": "QPushButton* m_BtnApply3D;", "parent": 80, "children": [614, 615], "start_point": {"row": 252, "column": 4}, "end_point": {"row": 252, "column": 30}}, {"id": 614, "type": "type_identifier", "text": "QPushButton", "parent": 613, "children": [], "start_point": {"row": 252, "column": 4}, "end_point": {"row": 252, "column": 15}}, {"id": 615, "type": "pointer_declarator", "text": "* m_BtnApply3D", "parent": 613, "children": [616, 617], "start_point": {"row": 252, "column": 15}, "end_point": {"row": 252, "column": 29}}, {"id": 616, "type": "*", "text": "*", "parent": 615, "children": [], "start_point": {"row": 252, "column": 15}, "end_point": {"row": 252, "column": 16}}, {"id": 617, "type": "identifier", "text": "m_BtnApply3D", "parent": 615, "children": [], "start_point": {"row": 252, "column": 17}, "end_point": {"row": 252, "column": 29}}, {"id": 618, "type": "declaration", "text": "QCheckBox* m_ChkShowPositionNodes;", "parent": 80, "children": [619, 620], "start_point": {"row": 253, "column": 4}, "end_point": {"row": 253, "column": 38}}, {"id": 619, "type": "type_identifier", "text": "QCheckBox", "parent": 618, "children": [], "start_point": {"row": 253, "column": 4}, "end_point": {"row": 253, "column": 13}}, {"id": 620, "type": "pointer_declarator", "text": "* m_ChkShowPositionNodes", "parent": 618, "children": [621, 622], "start_point": {"row": 253, "column": 13}, "end_point": {"row": 253, "column": 37}}, {"id": 621, "type": "*", "text": "*", "parent": 620, "children": [], "start_point": {"row": 253, "column": 13}, "end_point": {"row": 253, "column": 14}}, {"id": 622, "type": "identifier", "text": "m_ChkShowPositionNodes", "parent": 620, "children": [], "start_point": {"row": 253, "column": 15}, "end_point": {"row": 253, "column": 37}}, {"id": 623, "type": "labeled_statement", "text": "mitk::DataNode::Pointer m_FeedbackNode;", "parent": 80, "children": [624, 625], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 255, "column": 43}}, {"id": 624, "type": "statement_identifier", "text": "mitk", "parent": 623, "children": [], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 255, "column": 8}}, {"id": 625, "type": "labeled_statement", "text": "DataNode::Pointer m_FeedbackNode;", "parent": 623, "children": [626, 627], "start_point": {"row": 255, "column": 10}, "end_point": {"row": 255, "column": 43}}, {"id": 626, "type": "statement_identifier", "text": "DataNode", "parent": 625, "children": [], "start_point": {"row": 255, "column": 10}, "end_point": {"row": 255, "column": 18}}, {"id": 627, "type": "declaration", "text": "Pointer m_FeedbackNode;", "parent": 625, "children": [628, 629], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 43}}, {"id": 628, "type": "type_identifier", "text": "Pointer", "parent": 627, "children": [], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 27}}, {"id": 629, "type": "identifier", "text": "m_FeedbackNode", "parent": 627, "children": [], "start_point": {"row": 255, "column": 28}, "end_point": {"row": 255, "column": 42}}, {"id": 630, "type": "labeled_statement", "text": "mitk::DataNode::Pointer m_InterpolatedSurfaceNode;", "parent": 80, "children": [631, 632], "start_point": {"row": 256, "column": 4}, "end_point": {"row": 256, "column": 54}}, {"id": 631, "type": "statement_identifier", "text": "mitk", "parent": 630, "children": [], "start_point": {"row": 256, "column": 4}, "end_point": {"row": 256, "column": 8}}, {"id": 632, "type": "labeled_statement", "text": "DataNode::Pointer m_InterpolatedSurfaceNode;", "parent": 630, "children": [633, 634], "start_point": {"row": 256, "column": 10}, "end_point": {"row": 256, "column": 54}}, {"id": 633, "type": "statement_identifier", "text": "DataNode", "parent": 632, "children": [], "start_point": {"row": 256, "column": 10}, "end_point": {"row": 256, "column": 18}}, {"id": 634, "type": "declaration", "text": "Pointer m_InterpolatedSurfaceNode;", "parent": 632, "children": [635, 636], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 54}}, {"id": 635, "type": "type_identifier", "text": "Pointer", "parent": 634, "children": [], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 27}}, {"id": 636, "type": "identifier", "text": "m_InterpolatedSurfaceNode", "parent": 634, "children": [], "start_point": {"row": 256, "column": 28}, "end_point": {"row": 256, "column": 53}}, {"id": 637, "type": "labeled_statement", "text": "mitk::DataNode::Pointer m_3DContourNode;", "parent": 80, "children": [638, 639], "start_point": {"row": 257, "column": 4}, "end_point": {"row": 257, "column": 44}}, {"id": 638, "type": "statement_identifier", "text": "mitk", "parent": 637, "children": [], "start_point": {"row": 257, "column": 4}, "end_point": {"row": 257, "column": 8}}, {"id": 639, "type": "labeled_statement", "text": "DataNode::Pointer m_3DContourNode;", "parent": 637, "children": [640, 641], "start_point": {"row": 257, "column": 10}, "end_point": {"row": 257, "column": 44}}, {"id": 640, "type": "statement_identifier", "text": "DataNode", "parent": 639, "children": [], "start_point": {"row": 257, "column": 10}, "end_point": {"row": 257, "column": 18}}, {"id": 641, "type": "declaration", "text": "Pointer m_3DContourNode;", "parent": 639, "children": [642, 643], "start_point": {"row": 257, "column": 20}, "end_point": {"row": 257, "column": 44}}, {"id": 642, "type": "type_identifier", "text": "Pointer", "parent": 641, "children": [], "start_point": {"row": 257, "column": 20}, "end_point": {"row": 257, "column": 27}}, {"id": 643, "type": "identifier", "text": "m_3DContourNode", "parent": 641, "children": [], "start_point": {"row": 257, "column": 28}, "end_point": {"row": 257, "column": 43}}, {"id": 644, "type": "labeled_statement", "text": "mitk::Image* m_Segmentation;", "parent": 80, "children": [645, 646], "start_point": {"row": 259, "column": 4}, "end_point": {"row": 259, "column": 32}}, {"id": 645, "type": "statement_identifier", "text": "mitk", "parent": 644, "children": [], "start_point": {"row": 259, "column": 4}, "end_point": {"row": 259, "column": 8}}, {"id": 646, "type": "declaration", "text": "Image* m_Segmentation;", "parent": 644, "children": [647, 648], "start_point": {"row": 259, "column": 10}, "end_point": {"row": 259, "column": 32}}, {"id": 647, "type": "type_identifier", "text": "Image", "parent": 646, "children": [], "start_point": {"row": 259, "column": 10}, "end_point": {"row": 259, "column": 15}}, {"id": 648, "type": "pointer_declarator", "text": "* m_Segmentation", "parent": 646, "children": [649, 650], "start_point": {"row": 259, "column": 15}, "end_point": {"row": 259, "column": 31}}, {"id": 649, "type": "*", "text": "*", "parent": 648, "children": [], "start_point": {"row": 259, "column": 15}, "end_point": {"row": 259, "column": 16}}, {"id": 650, "type": "identifier", "text": "m_Segmentation", "parent": 648, "children": [], "start_point": {"row": 259, "column": 17}, "end_point": {"row": 259, "column": 31}}, {"id": 651, "type": "labeled_statement", "text": "mitk::SliceNavigationController* m_LastSNC;", "parent": 80, "children": [652, 653], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 47}}, {"id": 652, "type": "statement_identifier", "text": "mitk", "parent": 651, "children": [], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 8}}, {"id": 653, "type": "declaration", "text": "SliceNavigationController* m_LastSNC;", "parent": 651, "children": [654, 655], "start_point": {"row": 261, "column": 10}, "end_point": {"row": 261, "column": 47}}, {"id": 654, "type": "type_identifier", "text": "SliceNavigationController", "parent": 653, "children": [], "start_point": {"row": 261, "column": 10}, "end_point": {"row": 261, "column": 35}}, {"id": 655, "type": "pointer_declarator", "text": "* m_LastSNC", "parent": 653, "children": [656, 657], "start_point": {"row": 261, "column": 35}, "end_point": {"row": 261, "column": 46}}, {"id": 656, "type": "*", "text": "*", "parent": 655, "children": [], "start_point": {"row": 261, "column": 35}, "end_point": {"row": 261, "column": 36}}, {"id": 657, "type": "identifier", "text": "m_LastSNC", "parent": 655, "children": [], "start_point": {"row": 261, "column": 37}, "end_point": {"row": 261, "column": 46}}, {"id": 658, "type": "declaration", "text": "unsigned int m_LastSliceIndex;", "parent": 80, "children": [659, 662], "start_point": {"row": 262, "column": 4}, "end_point": {"row": 262, "column": 34}}, {"id": 659, "type": "sized_type_specifier", "text": "unsigned int", "parent": 658, "children": [660, 661], "start_point": {"row": 262, "column": 4}, "end_point": {"row": 262, "column": 16}}, {"id": 660, "type": "unsigned", "text": "unsigned", "parent": 659, "children": [], "start_point": {"row": 262, "column": 4}, "end_point": {"row": 262, "column": 12}}, {"id": 661, "type": "primitive_type", "text": "int", "parent": 659, "children": [], "start_point": {"row": 262, "column": 13}, "end_point": {"row": 262, "column": 16}}, {"id": 662, "type": "identifier", "text": "m_LastSliceIndex", "parent": 658, "children": [], "start_point": {"row": 262, "column": 17}, "end_point": {"row": 262, "column": 33}}, {"id": 663, "type": "ERROR", "text": "QHash<mitk::SliceNavigationController*,", "parent": 80, "children": [664, 668, 669], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 43}}, {"id": 664, "type": "binary_expression", "text": "QHash<mitk", "parent": 663, "children": [665, 666, 667], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 14}}, {"id": 665, "type": "identifier", "text": "QHash", "parent": 664, "children": [], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 9}}, {"id": 666, "type": "<", "text": "<", "parent": 664, "children": [], "start_point": {"row": 264, "column": 9}, "end_point": {"row": 264, "column": 10}}, {"id": 667, "type": "identifier", "text": "mitk", "parent": 664, "children": [], "start_point": {"row": 264, "column": 10}, "end_point": {"row": 264, "column": 14}}, {"id": 668, "type": "identifier", "text": "SliceNavigationController", "parent": 663, "children": [], "start_point": {"row": 264, "column": 16}, "end_point": {"row": 264, "column": 41}}, {"id": 669, "type": "*", "text": "*", "parent": 663, "children": [], "start_point": {"row": 264, "column": 41}, "end_point": {"row": 264, "column": 42}}, {"id": 670, "type": "declaration", "text": "unsigned int> m_TimeStep;", "parent": 80, "children": [671, 674, 676], "start_point": {"row": 264, "column": 44}, "end_point": {"row": 264, "column": 69}}, {"id": 671, "type": "sized_type_specifier", "text": "unsigned int", "parent": 670, "children": [672, 673], "start_point": {"row": 264, "column": 44}, "end_point": {"row": 264, "column": 56}}, {"id": 672, "type": "unsigned", "text": "unsigned", "parent": 671, "children": [], "start_point": {"row": 264, "column": 44}, "end_point": {"row": 264, "column": 52}}, {"id": 673, "type": "primitive_type", "text": "int", "parent": 671, "children": [], "start_point": {"row": 264, "column": 53}, "end_point": {"row": 264, "column": 56}}, {"id": 674, "type": "ERROR", "text": ">", "parent": 670, "children": [675], "start_point": {"row": 264, "column": 56}, "end_point": {"row": 264, "column": 57}}, {"id": 675, "type": ">", "text": ">", "parent": 674, "children": [], "start_point": {"row": 264, "column": 56}, "end_point": {"row": 264, "column": 57}}, {"id": 676, "type": "identifier", "text": "m_TimeStep", "parent": 670, "children": [], "start_point": {"row": 264, "column": 58}, "end_point": {"row": 264, "column": 68}}, {"id": 677, "type": "declaration", "text": "bool m_2DInterpolationEnabled;", "parent": 80, "children": [678, 679], "start_point": {"row": 266, "column": 4}, "end_point": {"row": 266, "column": 34}}, {"id": 678, "type": "primitive_type", "text": "bool", "parent": 677, "children": [], "start_point": {"row": 266, "column": 4}, "end_point": {"row": 266, "column": 8}}, {"id": 679, "type": "identifier", "text": "m_2DInterpolationEnabled", "parent": 677, "children": [], "start_point": {"row": 266, "column": 9}, "end_point": {"row": 266, "column": 33}}, {"id": 680, "type": "declaration", "text": "bool m_3DInterpolationEnabled;", "parent": 80, "children": [681, 682], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 34}}, {"id": 681, "type": "primitive_type", "text": "bool", "parent": 680, "children": [], "start_point": {"row": 267, "column": 4}, "end_point": {"row": 267, "column": 8}}, {"id": 682, "type": "identifier", "text": "m_3DInterpolationEnabled", "parent": 680, "children": [], "start_point": {"row": 267, "column": 9}, "end_point": {"row": 267, "column": 33}}, {"id": 683, "type": "labeled_statement", "text": "mitk::DataStorage::Pointer m_DataStorage;", "parent": 80, "children": [684, 685], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 45}}, {"id": 684, "type": "statement_identifier", "text": "mitk", "parent": 683, "children": [], "start_point": {"row": 270, "column": 4}, "end_point": {"row": 270, "column": 8}}, {"id": 685, "type": "labeled_statement", "text": "DataStorage::Pointer m_DataStorage;", "parent": 683, "children": [686, 687], "start_point": {"row": 270, "column": 10}, "end_point": {"row": 270, "column": 45}}, {"id": 686, "type": "statement_identifier", "text": "DataStorage", "parent": 685, "children": [], "start_point": {"row": 270, "column": 10}, "end_point": {"row": 270, "column": 21}}, {"id": 687, "type": "declaration", "text": "Pointer m_DataStorage;", "parent": 685, "children": [688, 689], "start_point": {"row": 270, "column": 23}, "end_point": {"row": 270, "column": 45}}, {"id": 688, "type": "type_identifier", "text": "Pointer", "parent": 687, "children": [], "start_point": {"row": 270, "column": 23}, "end_point": {"row": 270, "column": 30}}, {"id": 689, "type": "identifier", "text": "m_DataStorage", "parent": 687, "children": [], "start_point": {"row": 270, "column": 31}, "end_point": {"row": 270, "column": 44}}, {"id": 690, "type": "binary_expression", "text": "QFuture<void> m_Future", "parent": 80, "children": [691, 695, 696], "start_point": {"row": 272, "column": 4}, "end_point": {"row": 272, "column": 26}}, {"id": 691, "type": "binary_expression", "text": "QFuture<void", "parent": 690, "children": [692, 693, 694], "start_point": {"row": 272, "column": 4}, "end_point": {"row": 272, "column": 16}}, {"id": 692, "type": "identifier", "text": "QFuture", "parent": 691, "children": [], "start_point": {"row": 272, "column": 4}, "end_point": {"row": 272, "column": 11}}, {"id": 693, "type": "<", "text": "<", "parent": 691, "children": [], "start_point": {"row": 272, "column": 11}, "end_point": {"row": 272, "column": 12}}, {"id": 694, "type": "identifier", "text": "void", "parent": 691, "children": [], "start_point": {"row": 272, "column": 12}, "end_point": {"row": 272, "column": 16}}, {"id": 695, "type": ">", "text": ">", "parent": 690, "children": [], "start_point": {"row": 272, "column": 16}, "end_point": {"row": 272, "column": 17}}, {"id": 696, "type": "identifier", "text": "m_Future", "parent": 690, "children": [], "start_point": {"row": 272, "column": 18}, "end_point": {"row": 272, "column": 26}}, {"id": 697, "type": "binary_expression", "text": "QFutureWatcher<void> m_Watcher", "parent": 80, "children": [698, 702, 703], "start_point": {"row": 273, "column": 4}, "end_point": {"row": 273, "column": 34}}, {"id": 698, "type": "binary_expression", "text": "QFutureWatcher<void", "parent": 697, "children": [699, 700, 701], "start_point": {"row": 273, "column": 4}, "end_point": {"row": 273, "column": 23}}, {"id": 699, "type": "identifier", "text": "QFutureWatcher", "parent": 698, "children": [], "start_point": {"row": 273, "column": 4}, "end_point": {"row": 273, "column": 18}}, {"id": 700, "type": "<", "text": "<", "parent": 698, "children": [], "start_point": {"row": 273, "column": 18}, "end_point": {"row": 273, "column": 19}}, {"id": 701, "type": "identifier", "text": "void", "parent": 698, "children": [], "start_point": {"row": 273, "column": 19}, "end_point": {"row": 273, "column": 23}}, {"id": 702, "type": ">", "text": ">", "parent": 697, "children": [], "start_point": {"row": 273, "column": 23}, "end_point": {"row": 273, "column": 24}}, {"id": 703, "type": "identifier", "text": "m_Watcher", "parent": 697, "children": [], "start_point": {"row": 273, "column": 25}, "end_point": {"row": 273, "column": 34}}, {"id": 704, "type": "declaration", "text": "QTimer* m_Timer;", "parent": 80, "children": [705, 706], "start_point": {"row": 274, "column": 4}, "end_point": {"row": 274, "column": 20}}, {"id": 705, "type": "type_identifier", "text": "QTimer", "parent": 704, "children": [], "start_point": {"row": 274, "column": 4}, "end_point": {"row": 274, "column": 10}}, {"id": 706, "type": "pointer_declarator", "text": "* m_Timer", "parent": 704, "children": [707, 708], "start_point": {"row": 274, "column": 10}, "end_point": {"row": 274, "column": 19}}, {"id": 707, "type": "*", "text": "*", "parent": 706, "children": [], "start_point": {"row": 274, "column": 10}, "end_point": {"row": 274, "column": 11}}, {"id": 708, "type": "identifier", "text": "m_Timer", "parent": 706, "children": [], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 19}}, {"id": 709, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 277, "column": 0}, "end_point": {"row": 277, "column": 6}}]}, "node_categories": {"declarations": {"functions": [69, 88, 108, 129, 136, 141, 156, 161, 166, 171, 186, 201, 216, 224, 232, 241, 248, 258, 265, 272, 280, 297, 302, 307, 312, 322, 329, 336, 344, 351, 358, 365, 372, 377, 382, 387, 392, 429, 441, 458, 482, 487, 493, 498, 506, 514], "variables": [72, 74, 76, 78, 84, 91, 106, 111, 118, 127, 132, 139, 144, 152, 159, 164, 169, 174, 181, 184, 189, 196, 199, 204, 211, 214, 219, 222, 227, 230, 235, 239, 244, 246, 251, 253, 261, 263, 268, 270, 275, 277, 283, 295, 300, 305, 310, 315, 320, 325, 327, 332, 334, 339, 342, 347, 349, 354, 356, 361, 363, 368, 370, 375, 380, 385, 390, 427, 432, 439, 444, 449, 456, 461, 468, 473, 480, 485, 491, 496, 501, 504, 509, 512, 521, 528, 535, 538, 583, 588, 593, 598, 603, 608, 613, 618, 627, 634, 641, 646, 653, 658, 670, 677, 680, 687, 704], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67], "modules": [], "enums": []}, "statements": {"expressions": [395, 398, 399, 409, 412, 415, 416, 542, 546, 547, 551, 556, 560, 561, 565, 570, 574, 575, 579, 664, 690, 691, 697, 698], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 70, 71, 73, 75, 77, 79, 81, 83, 85, 89, 92, 95, 99, 103, 109, 112, 114, 117, 119, 122, 123, 126, 130, 133, 137, 142, 145, 147, 148, 149, 151, 153, 157, 162, 167, 172, 175, 177, 180, 182, 183, 187, 190, 192, 195, 197, 198, 202, 205, 207, 210, 212, 213, 217, 220, 221, 225, 228, 229, 233, 238, 242, 249, 255, 256, 257, 259, 266, 273, 281, 284, 286, 289, 294, 298, 303, 308, 313, 316, 319, 323, 330, 337, 341, 345, 352, 359, 366, 373, 378, 383, 388, 393, 397, 400, 402, 405, 406, 410, 413, 417, 419, 422, 423, 426, 430, 433, 435, 438, 442, 445, 447, 448, 450, 452, 455, 459, 462, 464, 467, 469, 472, 474, 476, 479, 483, 488, 494, 499, 503, 507, 511, 515, 518, 520, 522, 523, 525, 527, 529, 530, 532, 534, 536, 537, 540, 543, 545, 548, 550, 552, 554, 557, 559, 562, 564, 566, 568, 571, 573, 576, 578, 580, 582, 584, 587, 589, 592, 594, 597, 599, 602, 604, 607, 609, 612, 614, 617, 619, 622, 624, 626, 628, 629, 631, 633, 635, 636, 638, 640, 642, 643, 645, 647, 650, 652, 654, 657, 659, 662, 665, 667, 668, 671, 676, 679, 682, 684, 686, 688, 689, 692, 694, 696, 699, 701, 703, 705, 708, 709], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 97, 105], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 69, "universal_type": "function", "name": "PlaneGeometry;", "text_snippet": "namespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "QmitkSlicesInterpolator(QWidget* parent"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controller"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "Uninitialize()"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "QmitkSlicesInterpolator()"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "SetDataStorage( mitk::DataStorage::Pointer storage )"}, {"node_id": 156, "universal_type": "function", "name": "unknown", "text_snippet": "GetDataStorage()"}, {"node_id": 161, "universal_type": "function", "name": "unknown", "text_snippet": "OnToolManagerWorkingDataModified()"}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "OnToolManagerReferenceDataModified()"}, {"node_id": 171, "universal_type": "function", "name": "unknown", "text_snippet": "OnTimeChanged(itk::Object* sender, const itk::EventObject&)"}, {"node_id": 186, "universal_type": "function", "name": "unknown", "text_snippet": "OnSliceChanged(itk::Object* sender, const itk::EventObject&)"}, {"node_id": 201, "universal_type": "function", "name": "unknown", "text_snippet": "OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& )"}, {"node_id": 216, "universal_type": "function", "name": "unknown", "text_snippet": "OnInterpolationInfoChanged(const itk::EventObject&)"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "OnSurfaceInterpolationInfoChanged(const itk::EventObject&)"}, {"node_id": 232, "universal_type": "function", "name": "unknown", "text_snippet": "Show3DInterpolationResult(bool)"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "SignalRememberContourPositions(bool)"}, {"node_id": 248, "universal_type": "function", "name": "unknown", "text_snippet": "SignalShowMarkerNodes(bool)"}, {"node_id": 258, "universal_type": "function", "name": ")", "text_snippet": "setEnabled( bool )"}, {"node_id": 265, "universal_type": "function", "name": "unknown", "text_snippet": "EnableInterpolation(bool)"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "Enable3DInterpolation(bool)"}, {"node_id": 280, "universal_type": "function", "name": "unknown", "text_snippet": "FinishInterpolation(mitk::SliceNavigationController* slicer"}, {"node_id": 297, "universal_type": "function", "name": "unknown", "text_snippet": "OnAcceptInterpolationClicked()"}, {"node_id": 302, "universal_type": "function", "name": "unknown", "text_snippet": "OnAcceptAllInterpolationsClicked()"}, {"node_id": 307, "universal_type": "function", "name": "unknown", "text_snippet": "OnAccept3DInterpolationClicked()"}, {"node_id": 312, "universal_type": "function", "name": "unknown", "text_snippet": "OnAcceptAllPopupActivated(QAction* action)"}, {"node_id": 322, "universal_type": "function", "name": "unknown", "text_snippet": "OnInterpolationActivated(bool)"}, {"node_id": 329, "universal_type": "function", "name": "unknown", "text_snippet": "On3DInterpolationActivated(bool)"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "OnInterpolationMethodChanged(int index)"}, {"node_id": 344, "universal_type": "function", "name": "unknown", "text_snippet": "On2DInterpolationEnabled(bool)"}, {"node_id": 351, "universal_type": "function", "name": "unknown", "text_snippet": "On3DInterpolationEnabled(bool)"}, {"node_id": 358, "universal_type": "function", "name": "unknown", "text_snippet": "OnInterpolationDisabled(bool)"}, {"node_id": 365, "universal_type": "function", "name": "unknown", "text_snippet": "OnShowMarkers(bool)"}, {"node_id": 372, "universal_type": "function", "name": "unknown", "text_snippet": "Run3DInterpolation()"}, {"node_id": 377, "universal_type": "function", "name": "unknown", "text_snippet": "OnSurfaceInterpolationFinished()"}, {"node_id": 382, "universal_type": "function", "name": "unknown", "text_snippet": "StartUpdateInterpolationTimer()"}, {"node_id": 387, "universal_type": "function", "name": "unknown", "text_snippet": "StopUpdateInterpolationTimer()"}, {"node_id": 392, "universal_type": "function", "name": "unknown", "text_snippet": "ChangeSurfaceColor()"}, {"node_id": 429, "universal_type": "function", "name": "unknown", "text_snippet": "AcceptAllInterpolations(mitk::SliceNavigationController* slicer)"}, {"node_id": 441, "universal_type": "function", "name": "unknown", "text_snippet": "TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slic"}, {"node_id": 458, "universal_type": "function", "name": "timeStep,", "text_snippet": "Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *sli"}, {"node_id": 482, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateVisibleSuggestion()"}, {"node_id": 487, "universal_type": "function", "name": "unknown", "text_snippet": "SetCurrentContourListID()"}, {"node_id": 493, "universal_type": "function", "name": "unknown", "text_snippet": "HideAllInterpolationControls()"}, {"node_id": 498, "universal_type": "function", "name": "unknown", "text_snippet": "Show2DInterpolationControls(bool show)"}, {"node_id": 506, "universal_type": "function", "name": "unknown", "text_snippet": "Show3DInterpolationControls(bool show)"}, {"node_id": 514, "universal_type": "function", "name": "unknown", "text_snippet": "CheckSupportedImageDimension()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"mitkSliceNavigationController.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <MitkSegmentationUIExports.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"mitkSegmentationInterpolationController.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"mitkDataNode.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"mitkDataStorage.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"mitkWeakPointer.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"mitkSurfaceInterpolationController.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"mitkToolManager.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <QWidget>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include <map>\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include <QComboBox>\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include <QFrame>\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include <QRadioButton>\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include <QGroupBox>\n"}, {"node_id": 46, "text": "#include"}, {"node_id": 48, "text": "#include <QCheckBox>\n"}, {"node_id": 49, "text": "#include"}, {"node_id": 51, "text": "#include \"mitkVtkRepresentationProperty.h\"\n"}, {"node_id": 52, "text": "#include"}, {"node_id": 54, "text": "#include \"vtkProperty.h\"\n"}, {"node_id": 55, "text": "#include"}, {"node_id": 57, "text": "#include <QtConcurrentRun>\n"}, {"node_id": 58, "text": "#include"}, {"node_id": 60, "text": "#include <QFuture>\n"}, {"node_id": 61, "text": "#include"}, {"node_id": 63, "text": "#include <QFutureWatcher>\n"}, {"node_id": 64, "text": "#include"}, {"node_id": 66, "text": "#include <QTimer>\n"}, {"node_id": 67, "text": "#include"}]}, "original_source_code": "/*===================================================================\n\nThe Medical Imaging Interaction Toolkit (MITK)\n\nCopyright (c) German Cancer Research Center,\nDivision of Medical and Biological Informatics.\nAll rights reserved.\n\nThis software is distributed WITHOUT ANY WARRANTY; without\neven the implied warranty of MERCHANTABILITY or FITNESS FOR\nA PARTICULAR PURPOSE.\n\nSee LICENSE.txt or http://www.mitk.org for details.\n\n===================================================================*/\n\n#ifndef QmitkSlicesInterpolator_h_Included\n#define QmitkSlicesInterpolator_h_Included\n\n#include \"mitkSliceNavigationController.h\"\n#include <MitkSegmentationUIExports.h>\n#include \"mitkSegmentationInterpolationController.h\"\n#include \"mitkDataNode.h\"\n#include \"mitkDataStorage.h\"\n#include \"mitkWeakPointer.h\"\n#include \"mitkSurfaceInterpolationController.h\"\n#include \"mitkToolManager.h\"\n\n#include <QWidget>\n#include <map>\n\n#include <QComboBox>\n#include <QFrame>\n#include <QRadioButton>\n#include <QGroupBox>\n#include <QCheckBox>\n\n#include \"mitkVtkRepresentationProperty.h\"\n#include \"vtkProperty.h\"\n\n//For running 3D interpolation in background\n#include <QtConcurrentRun>\n#include <QFuture>\n#include <QFutureWatcher>\n#include <QTimer>\n\n\nnamespace mitk\n{\n class PlaneGeometry;\n class SliceNavigationController;\n}\n\nclass QPushButton;\n\n\n/**\n \\brief GUI for slices interpolation.\n\n \\ingroup ToolManagerEtAl\n \\ingroup Widgets\n\n \\sa QmitkInteractiveSegmentation\n \\sa mitk::SegmentationInterpolation\n\n There is a separate page describing the general design of QmitkInteractiveSegmentation: \\ref QmitkInteractiveSegmentationTechnicalPage\n\n While mitk::SegmentationInterpolation does the bookkeeping of interpolation\n (keeping track of which slices contain how much segmentation) and the algorithmic work,\n QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently\n visible. It triggers generation of interpolation suggestions and also triggers acception of\n suggestions.\n\n \\todo show/hide feedback on demand\n\n Last contributor: $Author: maleike $\n*/\nclass MitkSegmentationUI_EXPORT QmitkSlicesInterpolator : public QWidget\n{\n Q_OBJECT\n\n public:\n\n QmitkSlicesInterpolator(QWidget* parent = 0, const char* name = 0);\n\n /**\n To be called once before real use.\n */\n void Initialize(mitk::ToolManager* toolManager, const QList<mitk::SliceNavigationController*> &controllers);\n\n void Uninitialize();\n\n virtual ~QmitkSlicesInterpolator();\n\n void SetDataStorage( mitk::DataStorage::Pointer storage );\n mitk::DataStorage* GetDataStorage();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerWorkingDataModified();\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnToolManagerReferenceDataModified();\n\n void OnTimeChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceChanged(itk::Object* sender, const itk::EventObject&);\n\n void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject& );\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n Just public because it is called by itk::Commands. You should not need to call this.\n */\n void OnSurfaceInterpolationInfoChanged(const itk::EventObject&);\n\n /**\n * @brief Set the visibility of the 3d interpolation\n */\n void Show3DInterpolationResult(bool);\n\n signals:\n\n void SignalRememberContourPositions(bool);\n void SignalShowMarkerNodes(bool);\n\n public slots:\n\n virtual void setEnabled( bool );\n /**\n Call this from the outside to enable/disable interpolation\n */\n void EnableInterpolation(bool);\n\n void Enable3DInterpolation(bool);\n\n\n\n /**\n Call this from the outside to accept all interpolations\n */\n void FinishInterpolation(mitk::SliceNavigationController* slicer = NULL);\n\n protected slots:\n\n /**\n Reaction to button clicks.\n */\n void OnAcceptInterpolationClicked();\n\n /*\n Opens popup to ask about which orientation should be interpolated\n */\n void OnAcceptAllInterpolationsClicked();\n\n /*\n Reaction to button clicks\n */\n void OnAccept3DInterpolationClicked();\n\n /*\n * Will trigger interpolation for all slices in given orientation (called from popup menu of OnAcceptAllInterpolationsClicked)\n */\n void OnAcceptAllPopupActivated(QAction* action);\n\n /**\n Called on activation/deactivation\n */\n void OnInterpolationActivated(bool);\n\n void On3DInterpolationActivated(bool);\n\n void OnInterpolationMethodChanged(int index);\n\n //Enhancement for 3D interpolation\n void On2DInterpolationEnabled(bool);\n void On3DInterpolationEnabled(bool);\n void OnInterpolationDisabled(bool);\n void OnShowMarkers(bool);\n\n void Run3DInterpolation();\n\n void OnSurfaceInterpolationFinished();\n\n void StartUpdateInterpolationTimer();\n\n void StopUpdateInterpolationTimer();\n\n void ChangeSurfaceColor();\n\n protected:\n\n const std::map<QAction*, mitk::SliceNavigationController*> createActionToSliceDimension();\n std::map<QAction*, mitk::SliceNavigationController*> ACTION_TO_SLICEDIMENSION;\n\n void AcceptAllInterpolations(mitk::SliceNavigationController* slicer);\n\n /**\n Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController\n and calls Interpolate to further process this PlaneGeometry into an interpolation.\n\n \\param e is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController\n \\param slice the SliceNavigationController\n */\n bool TranslateAndInterpolateChangedSlice(const itk::EventObject& e, mitk::SliceNavigationController* slicer);\n\n /**\n Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager)\n should be interpolated. The actual work is then done by our SegmentationInterpolation object.\n */\n void Interpolate( mitk::PlaneGeometry* plane, unsigned int timeStep, mitk::SliceNavigationController *slicer );\n\n //void InterpolateSurface();\n\n /**\n Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.\n */\n void UpdateVisibleSuggestion();\n\n void SetCurrentContourListID();\n\nprivate:\n\n void HideAllInterpolationControls();\n void Show2DInterpolationControls(bool show);\n void Show3DInterpolationControls(bool show);\n void CheckSupportedImageDimension();\n\n mitk::SegmentationInterpolationController::Pointer m_Interpolator;\n mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;\n\n mitk::ToolManager::Pointer m_ToolManager;\n bool m_Initialized;\n\n QHash<mitk::SliceNavigationController*, int> m_ControllerToTimeObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToSliceObserverTag;\n QHash<mitk::SliceNavigationController*, int> m_ControllerToDeleteObserverTag;\n\n unsigned int InterpolationInfoChangedObserverTag;\n unsigned int SurfaceInterpolationInfoChangedObserverTag;\n\n QGroupBox* m_GroupBoxEnableExclusiveInterpolationMode;\n QComboBox* m_CmbInterpolation;\n QPushButton* m_BtnApply2D;\n QPushButton* m_BtnApplyForAllSlices2D;\n QPushButton* m_BtnApply3D;\n QCheckBox* m_ChkShowPositionNodes;\n\n mitk::DataNode::Pointer m_FeedbackNode;\n mitk::DataNode::Pointer m_InterpolatedSurfaceNode;\n mitk::DataNode::Pointer m_3DContourNode;\n\n mitk::Image* m_Segmentation;\n\n mitk::SliceNavigationController* m_LastSNC;\n unsigned int m_LastSliceIndex;\n\n QHash<mitk::SliceNavigationController*, unsigned int> m_TimeStep;\n\n bool m_2DInterpolationEnabled;\n bool m_3DInterpolationEnabled;\n //unsigned int m_CurrentListID;\n\n mitk::DataStorage::Pointer m_DataStorage;\n\n QFuture<void> m_Future;\n QFutureWatcher<void> m_Watcher;\n QTimer* m_Timer;\n};\n\n#endif\n\n"}
284
c
/* * Copyright (c) 2018 Liming,Deng <<EMAIL>> * Author: <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef _KINT_H_ #define _KINT_H_ #include <ktypes.h> #define IDT_ENTRY_CNT 256 typedef enum _IRQ { IRQ0 = 32, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7, IRQ8, IRQ9, IRQ10, IRQ11, IRQ12, IRQ13, IRQ14, IRQ15 } IRQ; typedef struct _KPTRegs { u32 ds; // Save previous data segment u32 edi; // From edi to eax, all pushed by instruction: pusha u32 esi; u32 ebp; u32 esp; u32 ebx; u32 edx; u32 ecx; u32 eax; u32 int_id; // Interrupt id u32 error_code; // Push by CPU /* ---- pushed by CPU ---- */ u32 eip; u32 cs; u32 eflags; u32 useresp; u32 ss; } KPTRegs; typedef void (*KInterruptHandler)(KPTRegs *); // Register an interrupt handler function void kreg_int_handler(u32 int_id, KInterruptHandler handler); void kisr_handler(KPTRegs *pt_regs); void kirq_handler(KPTRegs *pt_regs); void isr0(); void isr1(); void isr2(); void isr3(); void isr4(); void isr5(); void isr6(); void isr7(); void isr8(); void isr9(); void isr10(); void isr11(); void isr12(); void isr13(); void isr14(); void isr15(); void isr16(); void isr17(); void isr18(); void isr19(); void isr20(); void isr21(); void isr22(); void isr23(); void isr24(); void isr25(); void isr26(); void isr27(); void isr28(); void isr29(); void isr30(); void isr31(); void irq0(); void irq1(); void irq2(); void irq3(); void irq4(); void irq5(); void irq6(); void irq7(); void irq8(); void irq9(); void irq10(); void irq11(); void irq12(); void irq13(); void irq14(); void irq15(); // System call void isr255(); void kcli(); void ksti(); #endif /* ifndef _KINT_H_ */
21.54
121
(translation_unit) "/*\n * Copyright (c) 2018 Liming,Deng <<EMAIL>>\n * Author: <NAME>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#ifndef _KINT_H_\n#define _KINT_H_\n\n#include <ktypes.h>\n\n#define IDT_ENTRY_CNT 256\n\ntypedef enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n} IRQ;\n\ntypedef struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n} KPTRegs;\n\ntypedef void (*KInterruptHandler)(KPTRegs *);\n\n// Register an interrupt handler function\nvoid kreg_int_handler(u32 int_id, KInterruptHandler handler);\n\nvoid kisr_handler(KPTRegs *pt_regs);\nvoid kirq_handler(KPTRegs *pt_regs);\n\nvoid isr0();\nvoid isr1();\nvoid isr2();\nvoid isr3();\nvoid isr4();\nvoid isr5();\nvoid isr6();\nvoid isr7();\nvoid isr8();\nvoid isr9();\nvoid isr10();\nvoid isr11();\nvoid isr12();\nvoid isr13();\nvoid isr14();\nvoid isr15();\nvoid isr16();\nvoid isr17();\nvoid isr18();\nvoid isr19();\nvoid isr20();\nvoid isr21();\nvoid isr22();\nvoid isr23();\nvoid isr24();\nvoid isr25();\nvoid isr26();\nvoid isr27();\nvoid isr28();\nvoid isr29();\nvoid isr30();\nvoid isr31();\n\nvoid irq0();\nvoid irq1();\nvoid irq2();\nvoid irq3();\nvoid irq4();\nvoid irq5();\nvoid irq6();\nvoid irq7();\nvoid irq8();\nvoid irq9();\nvoid irq10();\nvoid irq11();\nvoid irq12();\nvoid irq13();\nvoid irq14();\nvoid irq15();\n\n// System call\nvoid isr255();\n\nvoid kcli();\nvoid ksti();\n\n#endif /* ifndef _KINT_H_ */\n" (comment) "/*\n * Copyright (c) 2018 Liming,Deng <<EMAIL>>\n * Author: <NAME>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */" (preproc_ifdef) "#ifndef _KINT_H_\n#define _KINT_H_\n\n#include <ktypes.h>\n\n#define IDT_ENTRY_CNT 256\n\ntypedef enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n} IRQ;\n\ntypedef struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n} KPTRegs;\n\ntypedef void (*KInterruptHandler)(KPTRegs *);\n\n// Register an interrupt handler function\nvoid kreg_int_handler(u32 int_id, KInterruptHandler handler);\n\nvoid kisr_handler(KPTRegs *pt_regs);\nvoid kirq_handler(KPTRegs *pt_regs);\n\nvoid isr0();\nvoid isr1();\nvoid isr2();\nvoid isr3();\nvoid isr4();\nvoid isr5();\nvoid isr6();\nvoid isr7();\nvoid isr8();\nvoid isr9();\nvoid isr10();\nvoid isr11();\nvoid isr12();\nvoid isr13();\nvoid isr14();\nvoid isr15();\nvoid isr16();\nvoid isr17();\nvoid isr18();\nvoid isr19();\nvoid isr20();\nvoid isr21();\nvoid isr22();\nvoid isr23();\nvoid isr24();\nvoid isr25();\nvoid isr26();\nvoid isr27();\nvoid isr28();\nvoid isr29();\nvoid isr30();\nvoid isr31();\n\nvoid irq0();\nvoid irq1();\nvoid irq2();\nvoid irq3();\nvoid irq4();\nvoid irq5();\nvoid irq6();\nvoid irq7();\nvoid irq8();\nvoid irq9();\nvoid irq10();\nvoid irq11();\nvoid irq12();\nvoid irq13();\nvoid irq14();\nvoid irq15();\n\n// System call\nvoid isr255();\n\nvoid kcli();\nvoid ksti();\n\n#endif" (#ifndef) "#ifndef" (identifier) "_KINT_H_" (preproc_def) "#define _KINT_H_\n" (#define) "#define" (identifier) "_KINT_H_" (preproc_include) "#include <ktypes.h>\n" (#include) "#include" (system_lib_string) "<ktypes.h>" (preproc_def) "#define IDT_ENTRY_CNT 256\n" (#define) "#define" (identifier) "IDT_ENTRY_CNT" (preproc_arg) "256" (type_definition) "typedef enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n} IRQ;" (typedef) "typedef" (enum_specifier) "enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n}" (enum) "enum" (type_identifier) "_IRQ" (enumerator_list) "{\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n}" ({) "{" (enumerator) "IRQ0 = 32" (identifier) "IRQ0" (=) "=" (number_literal) "32" (,) "," (enumerator) "IRQ1" (identifier) "IRQ1" (,) "," (enumerator) "IRQ2" (identifier) "IRQ2" (,) "," (enumerator) "IRQ3" (identifier) "IRQ3" (,) "," (enumerator) "IRQ4" (identifier) "IRQ4" (,) "," (enumerator) "IRQ5" (identifier) "IRQ5" (,) "," (enumerator) "IRQ6" (identifier) "IRQ6" (,) "," (enumerator) "IRQ7" (identifier) "IRQ7" (,) "," (enumerator) "IRQ8" (identifier) "IRQ8" (,) "," (enumerator) "IRQ9" (identifier) "IRQ9" (,) "," (enumerator) "IRQ10" (identifier) "IRQ10" (,) "," (enumerator) "IRQ11" (identifier) "IRQ11" (,) "," (enumerator) "IRQ12" (identifier) "IRQ12" (,) "," (enumerator) "IRQ13" (identifier) "IRQ13" (,) "," (enumerator) "IRQ14" (identifier) "IRQ14" (,) "," (enumerator) "IRQ15" (identifier) "IRQ15" (}) "}" (type_identifier) "IRQ" (;) ";" (type_definition) "typedef struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n} KPTRegs;" (typedef) "typedef" (struct_specifier) "struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n}" (struct) "struct" (type_identifier) "_KPTRegs" (field_declaration_list) "{\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n}" ({) "{" (field_declaration) "u32 ds;" (type_identifier) "u32" (field_identifier) "ds" (;) ";" (comment) "// Save previous data segment" (field_declaration) "u32 edi;" (type_identifier) "u32" (field_identifier) "edi" (;) ";" (comment) "// From edi to eax, all pushed by instruction: pusha" (field_declaration) "u32 esi;" (type_identifier) "u32" (field_identifier) "esi" (;) ";" (field_declaration) "u32 ebp;" (type_identifier) "u32" (field_identifier) "ebp" (;) ";" (field_declaration) "u32 esp;" (type_identifier) "u32" (field_identifier) "esp" (;) ";" (field_declaration) "u32 ebx;" (type_identifier) "u32" (field_identifier) "ebx" (;) ";" (field_declaration) "u32 edx;" (type_identifier) "u32" (field_identifier) "edx" (;) ";" (field_declaration) "u32 ecx;" (type_identifier) "u32" (field_identifier) "ecx" (;) ";" (field_declaration) "u32 eax;" (type_identifier) "u32" (field_identifier) "eax" (;) ";" (field_declaration) "u32 int_id;" (type_identifier) "u32" (field_identifier) "int_id" (;) ";" (comment) "// Interrupt id" (field_declaration) "u32 error_code;" (type_identifier) "u32" (field_identifier) "error_code" (;) ";" (comment) "// Push by CPU" (comment) "/* ---- pushed by CPU ---- */" (field_declaration) "u32 eip;" (type_identifier) "u32" (field_identifier) "eip" (;) ";" (field_declaration) "u32 cs;" (type_identifier) "u32" (field_identifier) "cs" (;) ";" (field_declaration) "u32 eflags;" (type_identifier) "u32" (field_identifier) "eflags" (;) ";" (field_declaration) "u32 useresp;" (type_identifier) "u32" (field_identifier) "useresp" (;) ";" (field_declaration) "u32 ss;" (type_identifier) "u32" (field_identifier) "ss" (;) ";" (}) "}" (type_identifier) "KPTRegs" (;) ";" (type_definition) "typedef void (*KInterruptHandler)(KPTRegs *);" (typedef) "typedef" (primitive_type) "void" (function_declarator) "(*KInterruptHandler)(KPTRegs *)" (parenthesized_declarator) "(*KInterruptHandler)" (() "(" (pointer_declarator) "*KInterruptHandler" (*) "*" (type_identifier) "KInterruptHandler" ()) ")" (parameter_list) "(KPTRegs *)" (() "(" (parameter_declaration) "KPTRegs *" (type_identifier) "KPTRegs" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (comment) "// Register an interrupt handler function" (declaration) "void kreg_int_handler(u32 int_id, KInterruptHandler handler);" (primitive_type) "void" (function_declarator) "kreg_int_handler(u32 int_id, KInterruptHandler handler)" (identifier) "kreg_int_handler" (parameter_list) "(u32 int_id, KInterruptHandler handler)" (() "(" (parameter_declaration) "u32 int_id" (type_identifier) "u32" (identifier) "int_id" (,) "," (parameter_declaration) "KInterruptHandler handler" (type_identifier) "KInterruptHandler" (identifier) "handler" ()) ")" (;) ";" (declaration) "void kisr_handler(KPTRegs *pt_regs);" (primitive_type) "void" (function_declarator) "kisr_handler(KPTRegs *pt_regs)" (identifier) "kisr_handler" (parameter_list) "(KPTRegs *pt_regs)" (() "(" (parameter_declaration) "KPTRegs *pt_regs" (type_identifier) "KPTRegs" (pointer_declarator) "*pt_regs" (*) "*" (identifier) "pt_regs" ()) ")" (;) ";" (declaration) "void kirq_handler(KPTRegs *pt_regs);" (primitive_type) "void" (function_declarator) "kirq_handler(KPTRegs *pt_regs)" (identifier) "kirq_handler" (parameter_list) "(KPTRegs *pt_regs)" (() "(" (parameter_declaration) "KPTRegs *pt_regs" (type_identifier) "KPTRegs" (pointer_declarator) "*pt_regs" (*) "*" (identifier) "pt_regs" ()) ")" (;) ";" (declaration) "void isr0();" (primitive_type) "void" (function_declarator) "isr0()" (identifier) "isr0" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr1();" (primitive_type) "void" (function_declarator) "isr1()" (identifier) "isr1" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr2();" (primitive_type) "void" (function_declarator) "isr2()" (identifier) "isr2" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr3();" (primitive_type) "void" (function_declarator) "isr3()" (identifier) "isr3" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr4();" (primitive_type) "void" (function_declarator) "isr4()" (identifier) "isr4" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr5();" (primitive_type) "void" (function_declarator) "isr5()" (identifier) "isr5" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr6();" (primitive_type) "void" (function_declarator) "isr6()" (identifier) "isr6" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr7();" (primitive_type) "void" (function_declarator) "isr7()" (identifier) "isr7" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr8();" (primitive_type) "void" (function_declarator) "isr8()" (identifier) "isr8" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr9();" (primitive_type) "void" (function_declarator) "isr9()" (identifier) "isr9" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr10();" (primitive_type) "void" (function_declarator) "isr10()" (identifier) "isr10" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr11();" (primitive_type) "void" (function_declarator) "isr11()" (identifier) "isr11" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr12();" (primitive_type) "void" (function_declarator) "isr12()" (identifier) "isr12" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr13();" (primitive_type) "void" (function_declarator) "isr13()" (identifier) "isr13" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr14();" (primitive_type) "void" (function_declarator) "isr14()" (identifier) "isr14" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr15();" (primitive_type) "void" (function_declarator) "isr15()" (identifier) "isr15" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr16();" (primitive_type) "void" (function_declarator) "isr16()" (identifier) "isr16" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr17();" (primitive_type) "void" (function_declarator) "isr17()" (identifier) "isr17" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr18();" (primitive_type) "void" (function_declarator) "isr18()" (identifier) "isr18" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr19();" (primitive_type) "void" (function_declarator) "isr19()" (identifier) "isr19" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr20();" (primitive_type) "void" (function_declarator) "isr20()" (identifier) "isr20" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr21();" (primitive_type) "void" (function_declarator) "isr21()" (identifier) "isr21" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr22();" (primitive_type) "void" (function_declarator) "isr22()" (identifier) "isr22" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr23();" (primitive_type) "void" (function_declarator) "isr23()" (identifier) "isr23" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr24();" (primitive_type) "void" (function_declarator) "isr24()" (identifier) "isr24" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr25();" (primitive_type) "void" (function_declarator) "isr25()" (identifier) "isr25" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr26();" (primitive_type) "void" (function_declarator) "isr26()" (identifier) "isr26" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr27();" (primitive_type) "void" (function_declarator) "isr27()" (identifier) "isr27" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr28();" (primitive_type) "void" (function_declarator) "isr28()" (identifier) "isr28" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr29();" (primitive_type) "void" (function_declarator) "isr29()" (identifier) "isr29" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr30();" (primitive_type) "void" (function_declarator) "isr30()" (identifier) "isr30" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void isr31();" (primitive_type) "void" (function_declarator) "isr31()" (identifier) "isr31" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq0();" (primitive_type) "void" (function_declarator) "irq0()" (identifier) "irq0" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq1();" (primitive_type) "void" (function_declarator) "irq1()" (identifier) "irq1" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq2();" (primitive_type) "void" (function_declarator) "irq2()" (identifier) "irq2" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq3();" (primitive_type) "void" (function_declarator) "irq3()" (identifier) "irq3" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq4();" (primitive_type) "void" (function_declarator) "irq4()" (identifier) "irq4" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq5();" (primitive_type) "void" (function_declarator) "irq5()" (identifier) "irq5" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq6();" (primitive_type) "void" (function_declarator) "irq6()" (identifier) "irq6" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq7();" (primitive_type) "void" (function_declarator) "irq7()" (identifier) "irq7" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq8();" (primitive_type) "void" (function_declarator) "irq8()" (identifier) "irq8" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq9();" (primitive_type) "void" (function_declarator) "irq9()" (identifier) "irq9" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq10();" (primitive_type) "void" (function_declarator) "irq10()" (identifier) "irq10" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq11();" (primitive_type) "void" (function_declarator) "irq11()" (identifier) "irq11" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq12();" (primitive_type) "void" (function_declarator) "irq12()" (identifier) "irq12" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq13();" (primitive_type) "void" (function_declarator) "irq13()" (identifier) "irq13" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq14();" (primitive_type) "void" (function_declarator) "irq14()" (identifier) "irq14" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void irq15();" (primitive_type) "void" (function_declarator) "irq15()" (identifier) "irq15" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// System call" (declaration) "void isr255();" (primitive_type) "void" (function_declarator) "isr255()" (identifier) "isr255" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void kcli();" (primitive_type) "void" (function_declarator) "kcli()" (identifier) "kcli" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void ksti();" (primitive_type) "void" (function_declarator) "ksti()" (identifier) "ksti" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* ifndef _KINT_H_ */"
624
0
{"language": "c", "success": true, "metadata": {"lines": 121, "avg_line_length": 21.54, "nodes": 408, "errors": 0, "source_hash": "1185ff9a274d89af6ffdba6b4e51e24516513c34b799736f191b8d40688c8c69", "categorized_nodes": 280}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _KINT_H_\n#define _KINT_H_\n\n#include <ktypes.h>\n\n#define IDT_ENTRY_CNT 256\n\ntypedef enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n} IRQ;\n\ntypedef struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n} KPTRegs;\n\ntypedef void (*KInterruptHandler)(KPTRegs *);\n\n// Register an interrupt handler function\nvoid kreg_int_handler(u32 int_id, KInterruptHandler handler);\n\nvoid kisr_handler(KPTRegs *pt_regs);\nvoid kirq_handler(KPTRegs *pt_regs);\n\nvoid isr0();\nvoid isr1();\nvoid isr2();\nvoid isr3();\nvoid isr4();\nvoid isr5();\nvoid isr6();\nvoid isr7();\nvoid isr8();\nvoid isr9();\nvoid isr10();\nvoid isr11();\nvoid isr12();\nvoid isr13();\nvoid isr14();\nvoid isr15();\nvoid isr16();\nvoid isr17();\nvoid isr18();\nvoid isr19();\nvoid isr20();\nvoid isr21();\nvoid isr22();\nvoid isr23();\nvoid isr24();\nvoid isr25();\nvoid isr26();\nvoid isr27();\nvoid isr28();\nvoid isr29();\nvoid isr30();\nvoid isr31();\n\nvoid irq0();\nvoid irq1();\nvoid irq2();\nvoid irq3();\nvoid irq4();\nvoid irq5();\nvoid irq6();\nvoid irq7();\nvoid irq8();\nvoid irq9();\nvoid irq10();\nvoid irq11();\nvoid irq12();\nvoid irq13();\nvoid irq14();\nvoid irq15();\n\n// System call\nvoid isr255();\n\nvoid kcli();\nvoid ksti();\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 13, 54, 108, 121, 132, 142, 152, 157, 162, 167, 172, 177, 182, 187, 192, 197, 202, 207, 212, 217, 222, 227, 232, 237, 242, 247, 252, 257, 262, 267, 272, 277, 282, 287, 292, 297, 302, 307, 312, 317, 322, 327, 332, 337, 342, 347, 352, 357, 362, 367, 372, 377, 382, 387, 392, 397, 402, 407], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 136, "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": "_KINT_H_", "parent": 0, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define _KINT_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": "_KINT_H_", "parent": 3, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <ktypes.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<ktypes.h>", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 19}}, {"id": 9, "type": "preproc_def", "text": "#define IDT_ENTRY_CNT 256\n", "parent": 0, "children": [10, 11, 12], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 11, "type": "identifier", "text": "IDT_ENTRY_CNT", "parent": 9, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 21}}, {"id": 12, "type": "preproc_arg", "text": "256", "parent": 9, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 25}}, {"id": 13, "type": "type_definition", "text": "typedef enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n} IRQ;", "parent": 0, "children": [14, 15, 53], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 14, "type": "typedef", "text": "typedef", "parent": 13, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 15, "type": "enum_specifier", "text": "enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n}", "parent": 13, "children": [16, 17, 18], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 47, "column": 1}}, {"id": 16, "type": "enum", "text": "enum", "parent": 15, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 12}}, {"id": 17, "type": "type_identifier", "text": "_IRQ", "parent": 15, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 17}}, {"id": 18, "type": "enumerator_list", "text": "{\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n}", "parent": 15, "children": [19, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 47, "column": 1}}, {"id": 19, "type": "enumerator", "text": "IRQ0 = 32", "parent": 18, "children": [20, 21, 22], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 11}}, {"id": 20, "type": "identifier", "text": "IRQ0", "parent": 19, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 21, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 8}}, {"id": 22, "type": "number_literal", "text": "32", "parent": 19, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 11}}, {"id": 23, "type": "enumerator", "text": "IRQ1", "parent": 18, "children": [24], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 6}}, {"id": 24, "type": "identifier", "text": "IRQ1", "parent": 23, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 6}}, {"id": 25, "type": "enumerator", "text": "IRQ2", "parent": 18, "children": [26], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 6}}, {"id": 26, "type": "identifier", "text": "IRQ2", "parent": 25, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 6}}, {"id": 27, "type": "enumerator", "text": "IRQ3", "parent": 18, "children": [28], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 6}}, {"id": 28, "type": "identifier", "text": "IRQ3", "parent": 27, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 6}}, {"id": 29, "type": "enumerator", "text": "IRQ4", "parent": 18, "children": [30], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 6}}, {"id": 30, "type": "identifier", "text": "IRQ4", "parent": 29, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 6}}, {"id": 31, "type": "enumerator", "text": "IRQ5", "parent": 18, "children": [32], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 6}}, {"id": 32, "type": "identifier", "text": "IRQ5", "parent": 31, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 6}}, {"id": 33, "type": "enumerator", "text": "IRQ6", "parent": 18, "children": [34], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 34, "type": "identifier", "text": "IRQ6", "parent": 33, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 35, "type": "enumerator", "text": "IRQ7", "parent": 18, "children": [36], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 6}}, {"id": 36, "type": "identifier", "text": "IRQ7", "parent": 35, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 6}}, {"id": 37, "type": "enumerator", "text": "IRQ8", "parent": 18, "children": [38], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 38, "type": "identifier", "text": "IRQ8", "parent": 37, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 39, "type": "enumerator", "text": "IRQ9", "parent": 18, "children": [40], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 40, "type": "identifier", "text": "IRQ9", "parent": 39, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 41, "type": "enumerator", "text": "IRQ10", "parent": 18, "children": [42], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 7}}, {"id": 42, "type": "identifier", "text": "IRQ10", "parent": 41, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 7}}, {"id": 43, "type": "enumerator", "text": "IRQ11", "parent": 18, "children": [44], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 7}}, {"id": 44, "type": "identifier", "text": "IRQ11", "parent": 43, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 7}}, {"id": 45, "type": "enumerator", "text": "IRQ12", "parent": 18, "children": [46], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 7}}, {"id": 46, "type": "identifier", "text": "IRQ12", "parent": 45, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 7}}, {"id": 47, "type": "enumerator", "text": "IRQ13", "parent": 18, "children": [48], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 7}}, {"id": 48, "type": "identifier", "text": "IRQ13", "parent": 47, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 7}}, {"id": 49, "type": "enumerator", "text": "IRQ14", "parent": 18, "children": [50], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 7}}, {"id": 50, "type": "identifier", "text": "IRQ14", "parent": 49, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 7}}, {"id": 51, "type": "enumerator", "text": "IRQ15", "parent": 18, "children": [52], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 7}}, {"id": 52, "type": "identifier", "text": "IRQ15", "parent": 51, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 7}}, {"id": 53, "type": "type_identifier", "text": "IRQ", "parent": 13, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 5}}, {"id": 54, "type": "type_definition", "text": "typedef struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n} KPTRegs;", "parent": 0, "children": [55, 56, 107], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 70, "column": 10}}, {"id": 55, "type": "typedef", "text": "typedef", "parent": 54, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 56, "type": "struct_specifier", "text": "struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n}", "parent": 54, "children": [57, 58], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 70, "column": 1}}, {"id": 57, "type": "struct", "text": "struct", "parent": 56, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 58, "type": "type_identifier", "text": "_KPTRegs", "parent": 56, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 23}}, {"id": 59, "type": "field_declaration", "text": "u32 ds;", "parent": 56, "children": [60, 61], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 9}}, {"id": 60, "type": "type_identifier", "text": "u32", "parent": 59, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 5}}, {"id": 61, "type": "field_identifier", "text": "ds", "parent": 59, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 8}}, {"id": 62, "type": "field_declaration", "text": "u32 edi;", "parent": 56, "children": [63, 64], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 10}}, {"id": 63, "type": "type_identifier", "text": "u32", "parent": 62, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 5}}, {"id": 64, "type": "field_identifier", "text": "edi", "parent": 62, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 9}}, {"id": 65, "type": "field_declaration", "text": "u32 esi;", "parent": 56, "children": [66, 67], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 10}}, {"id": 66, "type": "type_identifier", "text": "u32", "parent": 65, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 5}}, {"id": 67, "type": "field_identifier", "text": "esi", "parent": 65, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 9}}, {"id": 68, "type": "field_declaration", "text": "u32 ebp;", "parent": 56, "children": [69, 70], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 10}}, {"id": 69, "type": "type_identifier", "text": "u32", "parent": 68, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 5}}, {"id": 70, "type": "field_identifier", "text": "ebp", "parent": 68, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 9}}, {"id": 71, "type": "field_declaration", "text": "u32 esp;", "parent": 56, "children": [72, 73], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 10}}, {"id": 72, "type": "type_identifier", "text": "u32", "parent": 71, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 5}}, {"id": 73, "type": "field_identifier", "text": "esp", "parent": 71, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 9}}, {"id": 74, "type": "field_declaration", "text": "u32 ebx;", "parent": 56, "children": [75, 76], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 10}}, {"id": 75, "type": "type_identifier", "text": "u32", "parent": 74, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 5}}, {"id": 76, "type": "field_identifier", "text": "ebx", "parent": 74, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 9}}, {"id": 77, "type": "field_declaration", "text": "u32 edx;", "parent": 56, "children": [78, 79], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 10}}, {"id": 78, "type": "type_identifier", "text": "u32", "parent": 77, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 5}}, {"id": 79, "type": "field_identifier", "text": "edx", "parent": 77, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 9}}, {"id": 80, "type": "field_declaration", "text": "u32 ecx;", "parent": 56, "children": [81, 82], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 10}}, {"id": 81, "type": "type_identifier", "text": "u32", "parent": 80, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 5}}, {"id": 82, "type": "field_identifier", "text": "ecx", "parent": 80, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 9}}, {"id": 83, "type": "field_declaration", "text": "u32 eax;", "parent": 56, "children": [84, 85], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 10}}, {"id": 84, "type": "type_identifier", "text": "u32", "parent": 83, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 5}}, {"id": 85, "type": "field_identifier", "text": "eax", "parent": 83, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 9}}, {"id": 86, "type": "field_declaration", "text": "u32 int_id;", "parent": 56, "children": [87, 88], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 13}}, {"id": 87, "type": "type_identifier", "text": "u32", "parent": 86, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 5}}, {"id": 88, "type": "field_identifier", "text": "int_id", "parent": 86, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 12}}, {"id": 89, "type": "field_declaration", "text": "u32 error_code;", "parent": 56, "children": [90, 91], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 17}}, {"id": 90, "type": "type_identifier", "text": "u32", "parent": 89, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 5}}, {"id": 91, "type": "field_identifier", "text": "error_code", "parent": 89, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 16}}, {"id": 92, "type": "field_declaration", "text": "u32 eip;", "parent": 56, "children": [93, 94], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 10}}, {"id": 93, "type": "type_identifier", "text": "u32", "parent": 92, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 5}}, {"id": 94, "type": "field_identifier", "text": "eip", "parent": 92, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 9}}, {"id": 95, "type": "field_declaration", "text": "u32 cs;", "parent": 56, "children": [96, 97], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 9}}, {"id": 96, "type": "type_identifier", "text": "u32", "parent": 95, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 5}}, {"id": 97, "type": "field_identifier", "text": "cs", "parent": 95, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 8}}, {"id": 98, "type": "field_declaration", "text": "u32 eflags;", "parent": 56, "children": [99, 100], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 13}}, {"id": 99, "type": "type_identifier", "text": "u32", "parent": 98, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 5}}, {"id": 100, "type": "field_identifier", "text": "eflags", "parent": 98, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 12}}, {"id": 101, "type": "field_declaration", "text": "u32 useresp;", "parent": 56, "children": [102, 103], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 14}}, {"id": 102, "type": "type_identifier", "text": "u32", "parent": 101, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 5}}, {"id": 103, "type": "field_identifier", "text": "useresp", "parent": 101, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 13}}, {"id": 104, "type": "field_declaration", "text": "u32 ss;", "parent": 56, "children": [105, 106], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 9}}, {"id": 105, "type": "type_identifier", "text": "u32", "parent": 104, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 5}}, {"id": 106, "type": "field_identifier", "text": "ss", "parent": 104, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 8}}, {"id": 107, "type": "type_identifier", "text": "KPTRegs", "parent": 54, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 9}}, {"id": 108, "type": "type_definition", "text": "typedef void (*KInterruptHandler)(KPTRegs *);", "parent": 0, "children": [109, 110, 111], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 45}}, {"id": 109, "type": "typedef", "text": "typedef", "parent": 108, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 7}}, {"id": 110, "type": "primitive_type", "text": "void", "parent": 108, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 12}}, {"id": 111, "type": "function_declarator", "text": "(*KInterruptHandler)(KPTRegs *)", "parent": 108, "children": [112, 116], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 44}}, {"id": 112, "type": "parenthesized_declarator", "text": "(*KInterruptHandler)", "parent": 111, "children": [113], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 33}}, {"id": 113, "type": "pointer_declarator", "text": "*KInterruptHandler", "parent": 112, "children": [114, 115], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 32}}, {"id": 114, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 15}}, {"id": 115, "type": "type_identifier", "text": "KInterruptHandler", "parent": 113, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 32}}, {"id": 116, "type": "parameter_list", "text": "(KPTRegs *)", "parent": 111, "children": [117], "start_point": {"row": 72, "column": 33}, "end_point": {"row": 72, "column": 44}}, {"id": 117, "type": "parameter_declaration", "text": "KPTRegs *", "parent": 116, "children": [118, 119], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 43}}, {"id": 118, "type": "type_identifier", "text": "KPTRegs", "parent": 117, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 41}}, {"id": 119, "type": "abstract_pointer_declarator", "text": "*", "parent": 117, "children": [120], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 43}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 43}}, {"id": 121, "type": "declaration", "text": "void kreg_int_handler(u32 int_id, KInterruptHandler handler);", "parent": 0, "children": [122, 123], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 61}}, {"id": 122, "type": "primitive_type", "text": "void", "parent": 121, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 123, "type": "function_declarator", "text": "kreg_int_handler(u32 int_id, KInterruptHandler handler)", "parent": 121, "children": [124, 125], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 60}}, {"id": 124, "type": "identifier", "text": "kreg_int_handler", "parent": 123, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 21}}, {"id": 125, "type": "parameter_list", "text": "(u32 int_id, KInterruptHandler handler)", "parent": 123, "children": [126, 129], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 60}}, {"id": 126, "type": "parameter_declaration", "text": "u32 int_id", "parent": 125, "children": [127, 128], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 32}}, {"id": 127, "type": "type_identifier", "text": "u32", "parent": 126, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 25}}, {"id": 128, "type": "identifier", "text": "int_id", "parent": 126, "children": [], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 32}}, {"id": 129, "type": "parameter_declaration", "text": "KInterruptHandler handler", "parent": 125, "children": [130, 131], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 59}}, {"id": 130, "type": "type_identifier", "text": "KInterruptHandler", "parent": 129, "children": [], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 51}}, {"id": 131, "type": "identifier", "text": "handler", "parent": 129, "children": [], "start_point": {"row": 75, "column": 52}, "end_point": {"row": 75, "column": 59}}, {"id": 132, "type": "declaration", "text": "void kisr_handler(KPTRegs *pt_regs);", "parent": 0, "children": [133, 134], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 36}}, {"id": 133, "type": "primitive_type", "text": "void", "parent": 132, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 4}}, {"id": 134, "type": "function_declarator", "text": "kisr_handler(KPTRegs *pt_regs)", "parent": 132, "children": [135, 136], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 35}}, {"id": 135, "type": "identifier", "text": "kisr_handler", "parent": 134, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 17}}, {"id": 136, "type": "parameter_list", "text": "(KPTRegs *pt_regs)", "parent": 134, "children": [137], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 35}}, {"id": 137, "type": "parameter_declaration", "text": "KPTRegs *pt_regs", "parent": 136, "children": [138, 139], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 34}}, {"id": 138, "type": "type_identifier", "text": "KPTRegs", "parent": 137, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 25}}, {"id": 139, "type": "pointer_declarator", "text": "*pt_regs", "parent": 137, "children": [140, 141], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 34}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 27}}, {"id": 141, "type": "identifier", "text": "pt_regs", "parent": 139, "children": [], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 34}}, {"id": 142, "type": "declaration", "text": "void kirq_handler(KPTRegs *pt_regs);", "parent": 0, "children": [143, 144], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 36}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 142, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 4}}, {"id": 144, "type": "function_declarator", "text": "kirq_handler(KPTRegs *pt_regs)", "parent": 142, "children": [145, 146], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 35}}, {"id": 145, "type": "identifier", "text": "kirq_handler", "parent": 144, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 17}}, {"id": 146, "type": "parameter_list", "text": "(KPTRegs *pt_regs)", "parent": 144, "children": [147], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 35}}, {"id": 147, "type": "parameter_declaration", "text": "KPTRegs *pt_regs", "parent": 146, "children": [148, 149], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 34}}, {"id": 148, "type": "type_identifier", "text": "KPTRegs", "parent": 147, "children": [], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 25}}, {"id": 149, "type": "pointer_declarator", "text": "*pt_regs", "parent": 147, "children": [150, 151], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 34}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 27}}, {"id": 151, "type": "identifier", "text": "pt_regs", "parent": 149, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 34}}, {"id": 152, "type": "declaration", "text": "void isr0();", "parent": 0, "children": [153, 154], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 12}}, {"id": 153, "type": "primitive_type", "text": "void", "parent": 152, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 4}}, {"id": 154, "type": "function_declarator", "text": "isr0()", "parent": 152, "children": [155, 156], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 11}}, {"id": 155, "type": "identifier", "text": "isr0", "parent": 154, "children": [], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 9}}, {"id": 156, "type": "parameter_list", "text": "()", "parent": 154, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 11}}, {"id": 157, "type": "declaration", "text": "void isr1();", "parent": 0, "children": [158, 159], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 12}}, {"id": 158, "type": "primitive_type", "text": "void", "parent": 157, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 4}}, {"id": 159, "type": "function_declarator", "text": "isr1()", "parent": 157, "children": [160, 161], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 11}}, {"id": 160, "type": "identifier", "text": "isr1", "parent": 159, "children": [], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 9}}, {"id": 161, "type": "parameter_list", "text": "()", "parent": 159, "children": [], "start_point": {"row": 81, "column": 9}, "end_point": {"row": 81, "column": 11}}, {"id": 162, "type": "declaration", "text": "void isr2();", "parent": 0, "children": [163, 164], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 12}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 4}}, {"id": 164, "type": "function_declarator", "text": "isr2()", "parent": 162, "children": [165, 166], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 11}}, {"id": 165, "type": "identifier", "text": "isr2", "parent": 164, "children": [], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 9}}, {"id": 166, "type": "parameter_list", "text": "()", "parent": 164, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 11}}, {"id": 167, "type": "declaration", "text": "void isr3();", "parent": 0, "children": [168, 169], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 12}}, {"id": 168, "type": "primitive_type", "text": "void", "parent": 167, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 4}}, {"id": 169, "type": "function_declarator", "text": "isr3()", "parent": 167, "children": [170, 171], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 11}}, {"id": 170, "type": "identifier", "text": "isr3", "parent": 169, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 9}}, {"id": 171, "type": "parameter_list", "text": "()", "parent": 169, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 11}}, {"id": 172, "type": "declaration", "text": "void isr4();", "parent": 0, "children": [173, 174], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 12}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 172, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 4}}, {"id": 174, "type": "function_declarator", "text": "isr4()", "parent": 172, "children": [175, 176], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 11}}, {"id": 175, "type": "identifier", "text": "isr4", "parent": 174, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 9}}, {"id": 176, "type": "parameter_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 11}}, {"id": 177, "type": "declaration", "text": "void isr5();", "parent": 0, "children": [178, 179], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 12}}, {"id": 178, "type": "primitive_type", "text": "void", "parent": 177, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 4}}, {"id": 179, "type": "function_declarator", "text": "isr5()", "parent": 177, "children": [180, 181], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 11}}, {"id": 180, "type": "identifier", "text": "isr5", "parent": 179, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 9}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 11}}, {"id": 182, "type": "declaration", "text": "void isr6();", "parent": 0, "children": [183, 184], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 12}}, {"id": 183, "type": "primitive_type", "text": "void", "parent": 182, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 4}}, {"id": 184, "type": "function_declarator", "text": "isr6()", "parent": 182, "children": [185, 186], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 11}}, {"id": 185, "type": "identifier", "text": "isr6", "parent": 184, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 9}}, {"id": 186, "type": "parameter_list", "text": "()", "parent": 184, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 11}}, {"id": 187, "type": "declaration", "text": "void isr7();", "parent": 0, "children": [188, 189], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 12}}, {"id": 188, "type": "primitive_type", "text": "void", "parent": 187, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 4}}, {"id": 189, "type": "function_declarator", "text": "isr7()", "parent": 187, "children": [190, 191], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 87, "column": 11}}, {"id": 190, "type": "identifier", "text": "isr7", "parent": 189, "children": [], "start_point": {"row": 87, "column": 5}, "end_point": {"row": 87, "column": 9}}, {"id": 191, "type": "parameter_list", "text": "()", "parent": 189, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 11}}, {"id": 192, "type": "declaration", "text": "void isr8();", "parent": 0, "children": [193, 194], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 12}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 4}}, {"id": 194, "type": "function_declarator", "text": "isr8()", "parent": 192, "children": [195, 196], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 11}}, {"id": 195, "type": "identifier", "text": "isr8", "parent": 194, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 9}}, {"id": 196, "type": "parameter_list", "text": "()", "parent": 194, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 11}}, {"id": 197, "type": "declaration", "text": "void isr9();", "parent": 0, "children": [198, 199], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 12}}, {"id": 198, "type": "primitive_type", "text": "void", "parent": 197, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 4}}, {"id": 199, "type": "function_declarator", "text": "isr9()", "parent": 197, "children": [200, 201], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 11}}, {"id": 200, "type": "identifier", "text": "isr9", "parent": 199, "children": [], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 9}}, {"id": 201, "type": "parameter_list", "text": "()", "parent": 199, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 11}}, {"id": 202, "type": "declaration", "text": "void isr10();", "parent": 0, "children": [203, 204], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 13}}, {"id": 203, "type": "primitive_type", "text": "void", "parent": 202, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 4}}, {"id": 204, "type": "function_declarator", "text": "isr10()", "parent": 202, "children": [205, 206], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 12}}, {"id": 205, "type": "identifier", "text": "isr10", "parent": 204, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 10}}, {"id": 206, "type": "parameter_list", "text": "()", "parent": 204, "children": [], "start_point": {"row": 90, "column": 10}, "end_point": {"row": 90, "column": 12}}, {"id": 207, "type": "declaration", "text": "void isr11();", "parent": 0, "children": [208, 209], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 13}}, {"id": 208, "type": "primitive_type", "text": "void", "parent": 207, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 4}}, {"id": 209, "type": "function_declarator", "text": "isr11()", "parent": 207, "children": [210, 211], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 12}}, {"id": 210, "type": "identifier", "text": "isr11", "parent": 209, "children": [], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 10}}, {"id": 211, "type": "parameter_list", "text": "()", "parent": 209, "children": [], "start_point": {"row": 91, "column": 10}, "end_point": {"row": 91, "column": 12}}, {"id": 212, "type": "declaration", "text": "void isr12();", "parent": 0, "children": [213, 214], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 13}}, {"id": 213, "type": "primitive_type", "text": "void", "parent": 212, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 4}}, {"id": 214, "type": "function_declarator", "text": "isr12()", "parent": 212, "children": [215, 216], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 12}}, {"id": 215, "type": "identifier", "text": "isr12", "parent": 214, "children": [], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 10}}, {"id": 216, "type": "parameter_list", "text": "()", "parent": 214, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 12}}, {"id": 217, "type": "declaration", "text": "void isr13();", "parent": 0, "children": [218, 219], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 13}}, {"id": 218, "type": "primitive_type", "text": "void", "parent": 217, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 4}}, {"id": 219, "type": "function_declarator", "text": "isr13()", "parent": 217, "children": [220, 221], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 12}}, {"id": 220, "type": "identifier", "text": "isr13", "parent": 219, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 10}}, {"id": 221, "type": "parameter_list", "text": "()", "parent": 219, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 12}}, {"id": 222, "type": "declaration", "text": "void isr14();", "parent": 0, "children": [223, 224], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 13}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 4}}, {"id": 224, "type": "function_declarator", "text": "isr14()", "parent": 222, "children": [225, 226], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 12}}, {"id": 225, "type": "identifier", "text": "isr14", "parent": 224, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 10}}, {"id": 226, "type": "parameter_list", "text": "()", "parent": 224, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 12}}, {"id": 227, "type": "declaration", "text": "void isr15();", "parent": 0, "children": [228, 229], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 13}}, {"id": 228, "type": "primitive_type", "text": "void", "parent": 227, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 4}}, {"id": 229, "type": "function_declarator", "text": "isr15()", "parent": 227, "children": [230, 231], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 12}}, {"id": 230, "type": "identifier", "text": "isr15", "parent": 229, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 10}}, {"id": 231, "type": "parameter_list", "text": "()", "parent": 229, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 12}}, {"id": 232, "type": "declaration", "text": "void isr16();", "parent": 0, "children": [233, 234], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 13}}, {"id": 233, "type": "primitive_type", "text": "void", "parent": 232, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 4}}, {"id": 234, "type": "function_declarator", "text": "isr16()", "parent": 232, "children": [235, 236], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 12}}, {"id": 235, "type": "identifier", "text": "isr16", "parent": 234, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 10}}, {"id": 236, "type": "parameter_list", "text": "()", "parent": 234, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 12}}, {"id": 237, "type": "declaration", "text": "void isr17();", "parent": 0, "children": [238, 239], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 13}}, {"id": 238, "type": "primitive_type", "text": "void", "parent": 237, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 4}}, {"id": 239, "type": "function_declarator", "text": "isr17()", "parent": 237, "children": [240, 241], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 12}}, {"id": 240, "type": "identifier", "text": "isr17", "parent": 239, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 10}}, {"id": 241, "type": "parameter_list", "text": "()", "parent": 239, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 12}}, {"id": 242, "type": "declaration", "text": "void isr18();", "parent": 0, "children": [243, 244], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 13}}, {"id": 243, "type": "primitive_type", "text": "void", "parent": 242, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 4}}, {"id": 244, "type": "function_declarator", "text": "isr18()", "parent": 242, "children": [245, 246], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 12}}, {"id": 245, "type": "identifier", "text": "isr18", "parent": 244, "children": [], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 10}}, {"id": 246, "type": "parameter_list", "text": "()", "parent": 244, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 12}}, {"id": 247, "type": "declaration", "text": "void isr19();", "parent": 0, "children": [248, 249], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 13}}, {"id": 248, "type": "primitive_type", "text": "void", "parent": 247, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 4}}, {"id": 249, "type": "function_declarator", "text": "isr19()", "parent": 247, "children": [250, 251], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 12}}, {"id": 250, "type": "identifier", "text": "isr19", "parent": 249, "children": [], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 10}}, {"id": 251, "type": "parameter_list", "text": "()", "parent": 249, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 12}}, {"id": 252, "type": "declaration", "text": "void isr20();", "parent": 0, "children": [253, 254], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 13}}, {"id": 253, "type": "primitive_type", "text": "void", "parent": 252, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 4}}, {"id": 254, "type": "function_declarator", "text": "isr20()", "parent": 252, "children": [255, 256], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 12}}, {"id": 255, "type": "identifier", "text": "isr20", "parent": 254, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 10}}, {"id": 256, "type": "parameter_list", "text": "()", "parent": 254, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 12}}, {"id": 257, "type": "declaration", "text": "void isr21();", "parent": 0, "children": [258, 259], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 13}}, {"id": 258, "type": "primitive_type", "text": "void", "parent": 257, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 4}}, {"id": 259, "type": "function_declarator", "text": "isr21()", "parent": 257, "children": [260, 261], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 12}}, {"id": 260, "type": "identifier", "text": "isr21", "parent": 259, "children": [], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 10}}, {"id": 261, "type": "parameter_list", "text": "()", "parent": 259, "children": [], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 12}}, {"id": 262, "type": "declaration", "text": "void isr22();", "parent": 0, "children": [263, 264], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 13}}, {"id": 263, "type": "primitive_type", "text": "void", "parent": 262, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 4}}, {"id": 264, "type": "function_declarator", "text": "isr22()", "parent": 262, "children": [265, 266], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 12}}, {"id": 265, "type": "identifier", "text": "isr22", "parent": 264, "children": [], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 10}}, {"id": 266, "type": "parameter_list", "text": "()", "parent": 264, "children": [], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 12}}, {"id": 267, "type": "declaration", "text": "void isr23();", "parent": 0, "children": [268, 269], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 13}}, {"id": 268, "type": "primitive_type", "text": "void", "parent": 267, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 4}}, {"id": 269, "type": "function_declarator", "text": "isr23()", "parent": 267, "children": [270, 271], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 12}}, {"id": 270, "type": "identifier", "text": "isr23", "parent": 269, "children": [], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 10}}, {"id": 271, "type": "parameter_list", "text": "()", "parent": 269, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 12}}, {"id": 272, "type": "declaration", "text": "void isr24();", "parent": 0, "children": [273, 274], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 13}}, {"id": 273, "type": "primitive_type", "text": "void", "parent": 272, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 4}}, {"id": 274, "type": "function_declarator", "text": "isr24()", "parent": 272, "children": [275, 276], "start_point": {"row": 104, "column": 5}, "end_point": {"row": 104, "column": 12}}, {"id": 275, "type": "identifier", "text": "isr24", "parent": 274, "children": [], "start_point": {"row": 104, "column": 5}, "end_point": {"row": 104, "column": 10}}, {"id": 276, "type": "parameter_list", "text": "()", "parent": 274, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 12}}, {"id": 277, "type": "declaration", "text": "void isr25();", "parent": 0, "children": [278, 279], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 13}}, {"id": 278, "type": "primitive_type", "text": "void", "parent": 277, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 4}}, {"id": 279, "type": "function_declarator", "text": "isr25()", "parent": 277, "children": [280, 281], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 12}}, {"id": 280, "type": "identifier", "text": "isr25", "parent": 279, "children": [], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 10}}, {"id": 281, "type": "parameter_list", "text": "()", "parent": 279, "children": [], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 12}}, {"id": 282, "type": "declaration", "text": "void isr26();", "parent": 0, "children": [283, 284], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 13}}, {"id": 283, "type": "primitive_type", "text": "void", "parent": 282, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 4}}, {"id": 284, "type": "function_declarator", "text": "isr26()", "parent": 282, "children": [285, 286], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 12}}, {"id": 285, "type": "identifier", "text": "isr26", "parent": 284, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 10}}, {"id": 286, "type": "parameter_list", "text": "()", "parent": 284, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 12}}, {"id": 287, "type": "declaration", "text": "void isr27();", "parent": 0, "children": [288, 289], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 13}}, {"id": 288, "type": "primitive_type", "text": "void", "parent": 287, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 4}}, {"id": 289, "type": "function_declarator", "text": "isr27()", "parent": 287, "children": [290, 291], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 12}}, {"id": 290, "type": "identifier", "text": "isr27", "parent": 289, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 10}}, {"id": 291, "type": "parameter_list", "text": "()", "parent": 289, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 12}}, {"id": 292, "type": "declaration", "text": "void isr28();", "parent": 0, "children": [293, 294], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 13}}, {"id": 293, "type": "primitive_type", "text": "void", "parent": 292, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 4}}, {"id": 294, "type": "function_declarator", "text": "isr28()", "parent": 292, "children": [295, 296], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 12}}, {"id": 295, "type": "identifier", "text": "isr28", "parent": 294, "children": [], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 10}}, {"id": 296, "type": "parameter_list", "text": "()", "parent": 294, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 12}}, {"id": 297, "type": "declaration", "text": "void isr29();", "parent": 0, "children": [298, 299], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 13}}, {"id": 298, "type": "primitive_type", "text": "void", "parent": 297, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 4}}, {"id": 299, "type": "function_declarator", "text": "isr29()", "parent": 297, "children": [300, 301], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 12}}, {"id": 300, "type": "identifier", "text": "isr29", "parent": 299, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 10}}, {"id": 301, "type": "parameter_list", "text": "()", "parent": 299, "children": [], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 12}}, {"id": 302, "type": "declaration", "text": "void isr30();", "parent": 0, "children": [303, 304], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 13}}, {"id": 303, "type": "primitive_type", "text": "void", "parent": 302, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 4}}, {"id": 304, "type": "function_declarator", "text": "isr30()", "parent": 302, "children": [305, 306], "start_point": {"row": 110, "column": 5}, "end_point": {"row": 110, "column": 12}}, {"id": 305, "type": "identifier", "text": "isr30", "parent": 304, "children": [], "start_point": {"row": 110, "column": 5}, "end_point": {"row": 110, "column": 10}}, {"id": 306, "type": "parameter_list", "text": "()", "parent": 304, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 12}}, {"id": 307, "type": "declaration", "text": "void isr31();", "parent": 0, "children": [308, 309], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 13}}, {"id": 308, "type": "primitive_type", "text": "void", "parent": 307, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 4}}, {"id": 309, "type": "function_declarator", "text": "isr31()", "parent": 307, "children": [310, 311], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 12}}, {"id": 310, "type": "identifier", "text": "isr31", "parent": 309, "children": [], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 10}}, {"id": 311, "type": "parameter_list", "text": "()", "parent": 309, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 12}}, {"id": 312, "type": "declaration", "text": "void irq0();", "parent": 0, "children": [313, 314], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 12}}, {"id": 313, "type": "primitive_type", "text": "void", "parent": 312, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 4}}, {"id": 314, "type": "function_declarator", "text": "irq0()", "parent": 312, "children": [315, 316], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 11}}, {"id": 315, "type": "identifier", "text": "irq0", "parent": 314, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 9}}, {"id": 316, "type": "parameter_list", "text": "()", "parent": 314, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 11}}, {"id": 317, "type": "declaration", "text": "void irq1();", "parent": 0, "children": [318, 319], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 12}}, {"id": 318, "type": "primitive_type", "text": "void", "parent": 317, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 4}}, {"id": 319, "type": "function_declarator", "text": "irq1()", "parent": 317, "children": [320, 321], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 11}}, {"id": 320, "type": "identifier", "text": "irq1", "parent": 319, "children": [], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 9}}, {"id": 321, "type": "parameter_list", "text": "()", "parent": 319, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 11}}, {"id": 322, "type": "declaration", "text": "void irq2();", "parent": 0, "children": [323, 324], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 12}}, {"id": 323, "type": "primitive_type", "text": "void", "parent": 322, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 4}}, {"id": 324, "type": "function_declarator", "text": "irq2()", "parent": 322, "children": [325, 326], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 11}}, {"id": 325, "type": "identifier", "text": "irq2", "parent": 324, "children": [], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 9}}, {"id": 326, "type": "parameter_list", "text": "()", "parent": 324, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 11}}, {"id": 327, "type": "declaration", "text": "void irq3();", "parent": 0, "children": [328, 329], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 12}}, {"id": 328, "type": "primitive_type", "text": "void", "parent": 327, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 4}}, {"id": 329, "type": "function_declarator", "text": "irq3()", "parent": 327, "children": [330, 331], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 11}}, {"id": 330, "type": "identifier", "text": "irq3", "parent": 329, "children": [], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 9}}, {"id": 331, "type": "parameter_list", "text": "()", "parent": 329, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 11}}, {"id": 332, "type": "declaration", "text": "void irq4();", "parent": 0, "children": [333, 334], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 12}}, {"id": 333, "type": "primitive_type", "text": "void", "parent": 332, "children": [], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 4}}, {"id": 334, "type": "function_declarator", "text": "irq4()", "parent": 332, "children": [335, 336], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 11}}, {"id": 335, "type": "identifier", "text": "irq4", "parent": 334, "children": [], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 9}}, {"id": 336, "type": "parameter_list", "text": "()", "parent": 334, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 11}}, {"id": 337, "type": "declaration", "text": "void irq5();", "parent": 0, "children": [338, 339], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 12}}, {"id": 338, "type": "primitive_type", "text": "void", "parent": 337, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 4}}, {"id": 339, "type": "function_declarator", "text": "irq5()", "parent": 337, "children": [340, 341], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 11}}, {"id": 340, "type": "identifier", "text": "irq5", "parent": 339, "children": [], "start_point": {"row": 118, "column": 5}, "end_point": {"row": 118, "column": 9}}, {"id": 341, "type": "parameter_list", "text": "()", "parent": 339, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 11}}, {"id": 342, "type": "declaration", "text": "void irq6();", "parent": 0, "children": [343, 344], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 12}}, {"id": 343, "type": "primitive_type", "text": "void", "parent": 342, "children": [], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 4}}, {"id": 344, "type": "function_declarator", "text": "irq6()", "parent": 342, "children": [345, 346], "start_point": {"row": 119, "column": 5}, "end_point": {"row": 119, "column": 11}}, {"id": 345, "type": "identifier", "text": "irq6", "parent": 344, "children": [], "start_point": {"row": 119, "column": 5}, "end_point": {"row": 119, "column": 9}}, {"id": 346, "type": "parameter_list", "text": "()", "parent": 344, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 11}}, {"id": 347, "type": "declaration", "text": "void irq7();", "parent": 0, "children": [348, 349], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 12}}, {"id": 348, "type": "primitive_type", "text": "void", "parent": 347, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 4}}, {"id": 349, "type": "function_declarator", "text": "irq7()", "parent": 347, "children": [350, 351], "start_point": {"row": 120, "column": 5}, "end_point": {"row": 120, "column": 11}}, {"id": 350, "type": "identifier", "text": "irq7", "parent": 349, "children": [], "start_point": {"row": 120, "column": 5}, "end_point": {"row": 120, "column": 9}}, {"id": 351, "type": "parameter_list", "text": "()", "parent": 349, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 11}}, {"id": 352, "type": "declaration", "text": "void irq8();", "parent": 0, "children": [353, 354], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 12}}, {"id": 353, "type": "primitive_type", "text": "void", "parent": 352, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 4}}, {"id": 354, "type": "function_declarator", "text": "irq8()", "parent": 352, "children": [355, 356], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 121, "column": 11}}, {"id": 355, "type": "identifier", "text": "irq8", "parent": 354, "children": [], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 121, "column": 9}}, {"id": 356, "type": "parameter_list", "text": "()", "parent": 354, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 11}}, {"id": 357, "type": "declaration", "text": "void irq9();", "parent": 0, "children": [358, 359], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 12}}, {"id": 358, "type": "primitive_type", "text": "void", "parent": 357, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 4}}, {"id": 359, "type": "function_declarator", "text": "irq9()", "parent": 357, "children": [360, 361], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 11}}, {"id": 360, "type": "identifier", "text": "irq9", "parent": 359, "children": [], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 9}}, {"id": 361, "type": "parameter_list", "text": "()", "parent": 359, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 11}}, {"id": 362, "type": "declaration", "text": "void irq10();", "parent": 0, "children": [363, 364], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 13}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 362, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 4}}, {"id": 364, "type": "function_declarator", "text": "irq10()", "parent": 362, "children": [365, 366], "start_point": {"row": 123, "column": 5}, "end_point": {"row": 123, "column": 12}}, {"id": 365, "type": "identifier", "text": "irq10", "parent": 364, "children": [], "start_point": {"row": 123, "column": 5}, "end_point": {"row": 123, "column": 10}}, {"id": 366, "type": "parameter_list", "text": "()", "parent": 364, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 12}}, {"id": 367, "type": "declaration", "text": "void irq11();", "parent": 0, "children": [368, 369], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 13}}, {"id": 368, "type": "primitive_type", "text": "void", "parent": 367, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 4}}, {"id": 369, "type": "function_declarator", "text": "irq11()", "parent": 367, "children": [370, 371], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 12}}, {"id": 370, "type": "identifier", "text": "irq11", "parent": 369, "children": [], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 10}}, {"id": 371, "type": "parameter_list", "text": "()", "parent": 369, "children": [], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 12}}, {"id": 372, "type": "declaration", "text": "void irq12();", "parent": 0, "children": [373, 374], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 13}}, {"id": 373, "type": "primitive_type", "text": "void", "parent": 372, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 4}}, {"id": 374, "type": "function_declarator", "text": "irq12()", "parent": 372, "children": [375, 376], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 12}}, {"id": 375, "type": "identifier", "text": "irq12", "parent": 374, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 10}}, {"id": 376, "type": "parameter_list", "text": "()", "parent": 374, "children": [], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 12}}, {"id": 377, "type": "declaration", "text": "void irq13();", "parent": 0, "children": [378, 379], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 13}}, {"id": 378, "type": "primitive_type", "text": "void", "parent": 377, "children": [], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 4}}, {"id": 379, "type": "function_declarator", "text": "irq13()", "parent": 377, "children": [380, 381], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 12}}, {"id": 380, "type": "identifier", "text": "irq13", "parent": 379, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 10}}, {"id": 381, "type": "parameter_list", "text": "()", "parent": 379, "children": [], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 12}}, {"id": 382, "type": "declaration", "text": "void irq14();", "parent": 0, "children": [383, 384], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 13}}, {"id": 383, "type": "primitive_type", "text": "void", "parent": 382, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 4}}, {"id": 384, "type": "function_declarator", "text": "irq14()", "parent": 382, "children": [385, 386], "start_point": {"row": 127, "column": 5}, "end_point": {"row": 127, "column": 12}}, {"id": 385, "type": "identifier", "text": "irq14", "parent": 384, "children": [], "start_point": {"row": 127, "column": 5}, "end_point": {"row": 127, "column": 10}}, {"id": 386, "type": "parameter_list", "text": "()", "parent": 384, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 12}}, {"id": 387, "type": "declaration", "text": "void irq15();", "parent": 0, "children": [388, 389], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 128, "column": 13}}, {"id": 388, "type": "primitive_type", "text": "void", "parent": 387, "children": [], "start_point": {"row": 128, "column": 0}, "end_point": {"row": 128, "column": 4}}, {"id": 389, "type": "function_declarator", "text": "irq15()", "parent": 387, "children": [390, 391], "start_point": {"row": 128, "column": 5}, "end_point": {"row": 128, "column": 12}}, {"id": 390, "type": "identifier", "text": "irq15", "parent": 389, "children": [], "start_point": {"row": 128, "column": 5}, "end_point": {"row": 128, "column": 10}}, {"id": 391, "type": "parameter_list", "text": "()", "parent": 389, "children": [], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 12}}, {"id": 392, "type": "declaration", "text": "void isr255();", "parent": 0, "children": [393, 394], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 14}}, {"id": 393, "type": "primitive_type", "text": "void", "parent": 392, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 4}}, {"id": 394, "type": "function_declarator", "text": "isr255()", "parent": 392, "children": [395, 396], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 13}}, {"id": 395, "type": "identifier", "text": "isr255", "parent": 394, "children": [], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 11}}, {"id": 396, "type": "parameter_list", "text": "()", "parent": 394, "children": [], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 13}}, {"id": 397, "type": "declaration", "text": "void kcli();", "parent": 0, "children": [398, 399], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 12}}, {"id": 398, "type": "primitive_type", "text": "void", "parent": 397, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 4}}, {"id": 399, "type": "function_declarator", "text": "kcli()", "parent": 397, "children": [400, 401], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 11}}, {"id": 400, "type": "identifier", "text": "kcli", "parent": 399, "children": [], "start_point": {"row": 133, "column": 5}, "end_point": {"row": 133, "column": 9}}, {"id": 401, "type": "parameter_list", "text": "()", "parent": 399, "children": [], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 11}}, {"id": 402, "type": "declaration", "text": "void ksti();", "parent": 0, "children": [403, 404], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 134, "column": 12}}, {"id": 403, "type": "primitive_type", "text": "void", "parent": 402, "children": [], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 134, "column": 4}}, {"id": 404, "type": "function_declarator", "text": "ksti()", "parent": 402, "children": [405, 406], "start_point": {"row": 134, "column": 5}, "end_point": {"row": 134, "column": 11}}, {"id": 405, "type": "identifier", "text": "ksti", "parent": 404, "children": [], "start_point": {"row": 134, "column": 5}, "end_point": {"row": 134, "column": 9}}, {"id": 406, "type": "parameter_list", "text": "()", "parent": 404, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 11}}, {"id": 407, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 136, "column": 6}}]}, "node_categories": {"declarations": {"functions": [111, 123, 134, 144, 154, 159, 164, 169, 174, 179, 184, 189, 194, 199, 204, 209, 214, 219, 224, 229, 234, 239, 244, 249, 254, 259, 264, 269, 274, 279, 284, 289, 294, 299, 304, 309, 314, 319, 324, 329, 334, 339, 344, 349, 354, 359, 364, 369, 374, 379, 384, 389, 394, 399, 404], "variables": [13, 54, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 108, 117, 121, 126, 129, 132, 137, 142, 147, 152, 157, 162, 167, 172, 177, 182, 187, 192, 197, 202, 207, 212, 217, 222, 227, 232, 237, 242, 247, 252, 257, 262, 267, 272, 277, 282, 287, 292, 297, 302, 307, 312, 317, 322, 327, 332, 337, 342, 347, 352, 357, 362, 367, 372, 377, 382, 387, 392, 397, 402], "classes": [56, 57], "imports": [6, 7], "modules": [], "enums": [15, 16, 18, 19, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 17, 20, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, 93, 94, 96, 97, 99, 100, 102, 103, 105, 106, 107, 115, 118, 124, 127, 128, 130, 131, 135, 138, 141, 145, 148, 151, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 370, 375, 380, 385, 390, 395, 400, 405, 407], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 22], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "(*KInterruptHandler)(KPTRegs *)"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "kreg_int_handler(u32 int_id, KInterruptHandler handler)"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "kisr_handler(KPTRegs *pt_regs)"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "kirq_handler(KPTRegs *pt_regs)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "isr0()"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "isr1()"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "isr2()"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "isr3()"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "isr4()"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "isr5()"}, {"node_id": 184, "universal_type": "function", "name": "unknown", "text_snippet": "isr6()"}, {"node_id": 189, "universal_type": "function", "name": "unknown", "text_snippet": "isr7()"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "isr8()"}, {"node_id": 199, "universal_type": "function", "name": "unknown", "text_snippet": "isr9()"}, {"node_id": 204, "universal_type": "function", "name": "unknown", "text_snippet": "isr10()"}, {"node_id": 209, "universal_type": "function", "name": "unknown", "text_snippet": "isr11()"}, {"node_id": 214, "universal_type": "function", "name": "unknown", "text_snippet": "isr12()"}, {"node_id": 219, "universal_type": "function", "name": "unknown", "text_snippet": "isr13()"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "isr14()"}, {"node_id": 229, "universal_type": "function", "name": "unknown", "text_snippet": "isr15()"}, {"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "isr16()"}, {"node_id": 239, "universal_type": "function", "name": "unknown", "text_snippet": "isr17()"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "isr18()"}, {"node_id": 249, "universal_type": "function", "name": "unknown", "text_snippet": "isr19()"}, {"node_id": 254, "universal_type": "function", "name": "unknown", "text_snippet": "isr20()"}, {"node_id": 259, "universal_type": "function", "name": "unknown", "text_snippet": "isr21()"}, {"node_id": 264, "universal_type": "function", "name": "unknown", "text_snippet": "isr22()"}, {"node_id": 269, "universal_type": "function", "name": "unknown", "text_snippet": "isr23()"}, {"node_id": 274, "universal_type": "function", "name": "unknown", "text_snippet": "isr24()"}, {"node_id": 279, "universal_type": "function", "name": "unknown", "text_snippet": "isr25()"}, {"node_id": 284, "universal_type": "function", "name": "unknown", "text_snippet": "isr26()"}, {"node_id": 289, "universal_type": "function", "name": "unknown", "text_snippet": "isr27()"}, {"node_id": 294, "universal_type": "function", "name": "unknown", "text_snippet": "isr28()"}, {"node_id": 299, "universal_type": "function", "name": "unknown", "text_snippet": "isr29()"}, {"node_id": 304, "universal_type": "function", "name": "unknown", "text_snippet": "isr30()"}, {"node_id": 309, "universal_type": "function", "name": "unknown", "text_snippet": "isr31()"}, {"node_id": 314, "universal_type": "function", "name": "unknown", "text_snippet": "irq0()"}, {"node_id": 319, "universal_type": "function", "name": "unknown", "text_snippet": "irq1()"}, {"node_id": 324, "universal_type": "function", "name": "unknown", "text_snippet": "irq2()"}, {"node_id": 329, "universal_type": "function", "name": "unknown", "text_snippet": "irq3()"}, {"node_id": 334, "universal_type": "function", "name": "unknown", "text_snippet": "irq4()"}, {"node_id": 339, "universal_type": "function", "name": "unknown", "text_snippet": "irq5()"}, {"node_id": 344, "universal_type": "function", "name": "unknown", "text_snippet": "irq6()"}, {"node_id": 349, "universal_type": "function", "name": "unknown", "text_snippet": "irq7()"}, {"node_id": 354, "universal_type": "function", "name": "unknown", "text_snippet": "irq8()"}, {"node_id": 359, "universal_type": "function", "name": "unknown", "text_snippet": "irq9()"}, {"node_id": 364, "universal_type": "function", "name": "unknown", "text_snippet": "irq10()"}, {"node_id": 369, "universal_type": "function", "name": "unknown", "text_snippet": "irq11()"}, {"node_id": 374, "universal_type": "function", "name": "unknown", "text_snippet": "irq12()"}, {"node_id": 379, "universal_type": "function", "name": "unknown", "text_snippet": "irq13()"}, {"node_id": 384, "universal_type": "function", "name": "unknown", "text_snippet": "irq14()"}, {"node_id": 389, "universal_type": "function", "name": "unknown", "text_snippet": "irq15()"}, {"node_id": 394, "universal_type": "function", "name": "unknown", "text_snippet": "isr255()"}, {"node_id": 399, "universal_type": "function", "name": "unknown", "text_snippet": "kcli()"}, {"node_id": 404, "universal_type": "function", "name": "unknown", "text_snippet": "ksti()"}], "class_declarations": [{"node_id": 56, "universal_type": "class", "name": "_KPTRegs", "text_snippet": "struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed"}, {"node_id": 57, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <ktypes.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2018 Liming,Deng <<EMAIL>>\n * Author: <NAME>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#ifndef _KINT_H_\n#define _KINT_H_\n\n#include <ktypes.h>\n\n#define IDT_ENTRY_CNT 256\n\ntypedef enum _IRQ {\n IRQ0 = 32,\n IRQ1,\n IRQ2,\n IRQ3,\n IRQ4,\n IRQ5,\n IRQ6,\n IRQ7,\n IRQ8,\n IRQ9,\n IRQ10,\n IRQ11,\n IRQ12,\n IRQ13,\n IRQ14,\n IRQ15\n} IRQ;\n\ntypedef struct _KPTRegs {\n u32 ds; // Save previous data segment\n\n u32 edi; // From edi to eax, all pushed by instruction: pusha\n u32 esi;\n u32 ebp;\n u32 esp;\n u32 ebx;\n u32 edx;\n u32 ecx;\n u32 eax;\n\n u32 int_id; // Interrupt id\n u32 error_code; // Push by CPU\n\n /* ---- pushed by CPU ---- */\n u32 eip;\n u32 cs;\n u32 eflags;\n u32 useresp;\n u32 ss;\n} KPTRegs;\n\ntypedef void (*KInterruptHandler)(KPTRegs *);\n\n// Register an interrupt handler function\nvoid kreg_int_handler(u32 int_id, KInterruptHandler handler);\n\nvoid kisr_handler(KPTRegs *pt_regs);\nvoid kirq_handler(KPTRegs *pt_regs);\n\nvoid isr0();\nvoid isr1();\nvoid isr2();\nvoid isr3();\nvoid isr4();\nvoid isr5();\nvoid isr6();\nvoid isr7();\nvoid isr8();\nvoid isr9();\nvoid isr10();\nvoid isr11();\nvoid isr12();\nvoid isr13();\nvoid isr14();\nvoid isr15();\nvoid isr16();\nvoid isr17();\nvoid isr18();\nvoid isr19();\nvoid isr20();\nvoid isr21();\nvoid isr22();\nvoid isr23();\nvoid isr24();\nvoid isr25();\nvoid isr26();\nvoid isr27();\nvoid isr28();\nvoid isr29();\nvoid isr30();\nvoid isr31();\n\nvoid irq0();\nvoid irq1();\nvoid irq2();\nvoid irq3();\nvoid irq4();\nvoid irq5();\nvoid irq6();\nvoid irq7();\nvoid irq8();\nvoid irq9();\nvoid irq10();\nvoid irq11();\nvoid irq12();\nvoid irq13();\nvoid irq14();\nvoid irq15();\n\n// System call\nvoid isr255();\n\nvoid kcli();\nvoid ksti();\n\n#endif /* ifndef _KINT_H_ */\n"}
285
c
/*! * @file main.c * @brief Altitude5 Click example * * # Description * This library contains API for Altitude 5 Click driver. * The demo application reads ADC value, calculate pressure and altitude. * * The demo application is composed of two sections : * * ## Application Init * Initializes I2C or analog driver and log UART. * After driver initialization the app set default settings. * * ## Application Task * This is an example that demonstrates the use of the Altitude 5 Click board™. * In this example, we read ADC values and * display the Pressure ( mBar ) and Altitude ( m ) data. * Results are being sent to the Usart Terminal where you can track their changes. * * @author <NAME> * */ #include "board.h" #include "log.h" #include "altitude5.h" static altitude5_t altitude5; static log_t logger; void application_init ( void ) { log_cfg_t log_cfg; /**< Logger config object. */ altitude5_cfg_t altitude5_cfg; /**< Click config object. */ /** * Logger initialization. * Default baud rate: 115200 * Default log level: LOG_LEVEL_DEBUG * @note If USB_UART_RX and USB_UART_TX * are defined as HAL_PIN_NC, you will * need to define them manually for log to work. * See @b LOG_MAP_USB_UART macro definition for detailed explanation. */ LOG_MAP_USB_UART( log_cfg ); log_init( &logger, &log_cfg ); log_info( &logger, " Application Init " ); // Click initialization. altitude5_cfg_setup( &altitude5_cfg ); ALTITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 ); err_t init_flag = altitude5_init( &altitude5, &altitude5_cfg ); if ( I2C_MASTER_ERROR == init_flag ) { log_error( &logger, " Application Init Error. " ); log_info( &logger, " Please, run program again... " ); for ( ; ; ); } altitude5_default_cfg ( &altitude5 ); log_info( &logger, " Application Task " ); log_printf( &logger, "----------------------------\r\n" ); Delay_ms( 100 ); } void application_task ( void ) { static float pressure; static float altitude; altitude5_get_pressure( &altitude5, &pressure ); log_printf( &logger, " Pressure : %.2f mBar \r\n", pressure ); Delay_ms( 100 ); altitude5_get_altitude( &altitude5, &altitude ); log_printf( &logger, " Altitude : %.2f m \r\n", altitude ); log_printf( &logger, "----------------------------\r\n" ); Delay_ms( 1000 ); } void main ( void ) { application_init( ); for ( ; ; ) { application_task( ); } } // ------------------------------------------------------------------------ END
31.35
82
(translation_unit) "/*!\n * @file main.c\n * @brief Altitude5 Click example\n *\n * # Description\n * This library contains API for Altitude 5 Click driver.\n * The demo application reads ADC value, calculate pressure and altitude.\n *\n * The demo application is composed of two sections :\n *\n * ## Application Init\n * Initializes I2C or analog driver and log UART.\n * After driver initialization the app set default settings.\n *\n * ## Application Task\n * This is an example that demonstrates the use of the Altitude 5 Click board™.\n * In this example, we read ADC values and \n * display the Pressure ( mBar ) and Altitude ( m ) data.\n * Results are being sent to the Usart Terminal where you can track their changes.\n *\n * @author <NAME>\n *\n */\n\n#include "board.h"\n#include "log.h"\n#include "altitude5.h"\n\nstatic altitude5_t altitude5;\nstatic log_t logger;\n\nvoid application_init ( void ) \n{\n log_cfg_t log_cfg; /**< Logger config object. */\n altitude5_cfg_t altitude5_cfg; /**< Click config object. */\n\n /** \n * Logger initialization.\n * Default baud rate: 115200\n * Default log level: LOG_LEVEL_DEBUG\n * @note If USB_UART_RX and USB_UART_TX \n * are defined as HAL_PIN_NC, you will \n * need to define them manually for log to work. \n * See @b LOG_MAP_USB_UART macro definition for detailed explanation.\n */\n LOG_MAP_USB_UART( log_cfg );\n log_init( &logger, &log_cfg );\n log_info( &logger, " Application Init " );\n\n // Click initialization.\n altitude5_cfg_setup( &altitude5_cfg );\n ALTITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n err_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n if ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, " Application Init Error. " );\n log_info( &logger, " Please, run program again... " );\n\n for ( ; ; );\n }\n\n altitude5_default_cfg ( &altitude5 );\n log_info( &logger, " Application Task " );\n log_printf( &logger, "----------------------------\r\n" );\n Delay_ms( 100 );\n}\n\nvoid application_task ( void ) \n{\n static float pressure;\n static float altitude;\n \n altitude5_get_pressure( &altitude5, &pressure );\n log_printf( &logger, " Pressure : %.2f mBar \r\n", pressure );\n Delay_ms( 100 );\n \n altitude5_get_altitude( &altitude5, &altitude );\n log_printf( &logger, " Altitude : %.2f m \r\n", altitude );\n log_printf( &logger, "----------------------------\r\n" );\n Delay_ms( 1000 );\n}\n\nvoid main ( void ) \n{\n application_init( );\n\n for ( ; ; ) \n {\n application_task( );\n }\n}\n\n// ------------------------------------------------------------------------ END\n" (comment) "/*!\n * @file main.c\n * @brief Altitude5 Click example\n *\n * # Description\n * This library contains API for Altitude 5 Click driver.\n * The demo application reads ADC value, calculate pressure and altitude.\n *\n * The demo application is composed of two sections :\n *\n * ## Application Init\n * Initializes I2C or analog driver and log UART.\n * After driver initialization the app set default settings.\n *\n * ## Application Task\n * This is an example that demonstrates the use of the Altitude 5 Click board™.\n * In this example, we read ADC values and \n * display the Pressure ( mBar ) and Altitude ( m ) data.\n * Results are being sent to the Usart Terminal where you can track their changes.\n *\n * @author <NAME>\n *\n */\n\n" (preproc_include) "nclude "board.h"\n#i" (#include) "nclude "" (string_literal) "oard.h"\n#" (") "o" (string_content) "ard.h"\n" (") "#" (preproc_include) "nclude "log.h"\n#i" (#include) "nclude "" (string_literal) "og.h"\n#" (") "o" (string_content) "g.h"\n" (") "#" (preproc_include) "nclude "altitude5.h"\n\ns" (#include) "nclude "" (string_literal) "ltitude5.h"\n\n" (") "l" (string_content) "titude5.h"\n" (") "\n" (declaration) "atic altitude5_t altitude5;\ns" (storage_class_specifier) "atic a" (static) "atic a" (type_identifier) "titude5_t a" (identifier) "titude5;\n" (;) "s" (declaration) "atic log_t logger;\n\n" (storage_class_specifier) "atic l" (static) "atic l" (type_identifier) "g_t l" (identifier) "gger;\n" (;) "\n" (function_definition) "id application_init ( void ) \n{\n log_cfg_t log_cfg; /**< Logger config object. */\n altitude5_cfg_t altitude5_cfg; /**< Click config object. */\n\n /** \n * Logger initialization.\n * Default baud rate: 115200\n * Default log level: LOG_LEVEL_DEBUG\n * @note If USB_UART_RX and USB_UART_TX \n * are defined as HAL_PIN_NC, you will \n * need to define them manually for log to work. \n * See @b LOG_MAP_USB_UART macro definition for detailed explanation.\n */\n LOG_MAP_USB_UART( log_cfg );\n log_init( &logger, &log_cfg );\n log_info( &logger, " Application Init " );\n\n // Click initialization.\n altitude5_cfg_setup( &altitude5_cfg );\n ALTITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n err_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n if ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, " Application Init Error. " );\n log_info( &logger, " Please, run program again... " );\n\n for ( ; ; );\n }\n\n altitude5_default_cfg ( &altitude5 );\n log_info( &logger, " Application Task " );\n log_printf( &logger, "----------------------------\r\n" );\n Delay_ms( 100 );\n}\n\n" (primitive_type) "id a" (function_declarator) "plication_init ( void ) \n" (identifier) "plication_init (" (parameter_list) "void ) \n" (() "v" (parameter_declaration) "id )" (primitive_type) "id )" ()) "\n" (compound_statement) " log_cfg_t log_cfg; /**< Logger config object. */\n altitude5_cfg_t altitude5_cfg; /**< Click config object. */\n\n /** \n * Logger initialization.\n * Default baud rate: 115200\n * Default log level: LOG_LEVEL_DEBUG\n * @note If USB_UART_RX and USB_UART_TX \n * are defined as HAL_PIN_NC, you will \n * need to define them manually for log to work. \n * See @b LOG_MAP_USB_UART macro definition for detailed explanation.\n */\n LOG_MAP_USB_UART( log_cfg );\n log_init( &logger, &log_cfg );\n log_info( &logger, " Application Init " );\n\n // Click initialization.\n altitude5_cfg_setup( &altitude5_cfg );\n ALTITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n err_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n if ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, " Application Init Error. " );\n log_info( &logger, " Please, run program again... " );\n\n for ( ; ; );\n }\n\n altitude5_default_cfg ( &altitude5 );\n log_info( &logger, " Application Task " );\n log_printf( &logger, "----------------------------\r\n" );\n Delay_ms( 100 );\n}\n\n" ({) " " (declaration) "g_cfg_t log_cfg; " (type_identifier) "g_cfg_t l" (identifier) "g_cfg; " (;) " " (comment) "*< Logger config object. */\n " (declaration) "titude5_cfg_t altitude5_cfg; " (type_identifier) "titude5_cfg_t a" (identifier) "titude5_cfg; " (;) " " (comment) "*< Click config object. */\n\n" (comment) "* \n * Logger initialization.\n * Default baud rate: 115200\n * Default log level: LOG_LEVEL_DEBUG\n * @note If USB_UART_RX and USB_UART_TX \n * are defined as HAL_PIN_NC, you will \n * need to define them manually for log to work. \n * See @b LOG_MAP_USB_UART macro definition for detailed explanation.\n */\n " (expression_statement) "G_MAP_USB_UART( log_cfg );\n " (call_expression) "G_MAP_USB_UART( log_cfg );\n" (identifier) "G_MAP_USB_UART( " (argument_list) "log_cfg );\n" (() "l" (identifier) "g_cfg )" ()) "\n" (;) " " (expression_statement) "g_init( &logger, &log_cfg );\n " (call_expression) "g_init( &logger, &log_cfg );\n" (identifier) "g_init( " (argument_list) "&logger, &log_cfg );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) "&" (pointer_expression) "og_cfg )" (&) "o" (identifier) "g_cfg )" ()) "\n" (;) " " (expression_statement) "g_info( &logger, " Application Init " );\n\n" (call_expression) "g_info( &logger, " Application Init " );\n" (identifier) "g_info( " (argument_list) "&logger, " Application Init " );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "Application Init " )" (") "A" (string_content) "pplication Init " " (") ")" ()) "\n" (;) "\n" (comment) " Click initialization.\n " (expression_statement) "titude5_cfg_setup( &altitude5_cfg );\n " (call_expression) "titude5_cfg_setup( &altitude5_cfg );\n" (identifier) "titude5_cfg_setup( " (argument_list) "&altitude5_cfg );\n" (() "&" (pointer_expression) "ltitude5_cfg )" (&) "l" (identifier) "titude5_cfg )" ()) "\n" (;) " " (expression_statement) "TITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n " (call_expression) "TITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n" (identifier) "TITUDE5_MAP_MIKROBUS( " (argument_list) "altitude5_cfg, MIKROBUS_1 );\n" (() "a" (identifier) "titude5_cfg, " (,) "M" (identifier) "KROBUS_1 )" ()) "\n" (;) " " (declaration) "r_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n " (type_identifier) "r_t i" (init_declarator) "it_flag = altitude5_init( &altitude5, &altitude5_cfg );\n" (identifier) "it_flag =" (=) "a" (call_expression) "titude5_init( &altitude5, &altitude5_cfg );\n" (identifier) "titude5_init( " (argument_list) "&altitude5, &altitude5_cfg );\n" (() "&" (pointer_expression) "ltitude5, " (&) "l" (identifier) "titude5, " (,) "&" (pointer_expression) "ltitude5_cfg )" (&) "l" (identifier) "titude5_cfg )" ()) "\n" (;) " " (if_statement) " ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, " Application Init Error. " );\n log_info( &logger, " Please, run program again... " );\n\n for ( ; ; );\n }\n\n" (if) " (" (parenthesized_expression) "I2C_MASTER_ERROR == init_flag ) \n" (() "I" (binary_expression) "C_MASTER_ERROR == init_flag )" (identifier) "C_MASTER_ERROR =" (==) " i" (identifier) "it_flag )" ()) "\n" (compound_statement) " log_error( &logger, " Application Init Error. " );\n log_info( &logger, " Please, run program again... " );\n\n for ( ; ; );\n }\n\n" ({) " " (expression_statement) "g_error( &logger, " Application Init Error. " );\n " (call_expression) "g_error( &logger, " Application Init Error. " );\n" (identifier) "g_error( " (argument_list) "&logger, " Application Init Error. " );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "Application Init Error. " )" (") "A" (string_content) "pplication Init Error. " " (") ")" ()) "\n" (;) " " (expression_statement) "g_info( &logger, " Please, run program again... " );\n\n" (call_expression) "g_info( &logger, " Please, run program again... " );\n" (identifier) "g_info( " (argument_list) "&logger, " Please, run program again... " );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "Please, run program again... " )" (") "P" (string_content) "lease, run program again... " " (") ")" ()) "\n" (;) "\n" (for_statement) "r ( ; ; );\n " (for) "r (" (() ";" (;) ";" (;) ")" ()) "\n" (expression_statement) " " (;) " " (}) "\n" (expression_statement) "titude5_default_cfg ( &altitude5 );\n " (call_expression) "titude5_default_cfg ( &altitude5 );\n" (identifier) "titude5_default_cfg (" (argument_list) "&altitude5 );\n" (() "&" (pointer_expression) "ltitude5 )" (&) "l" (identifier) "titude5 )" ()) "\n" (;) " " (expression_statement) "g_info( &logger, " Application Task " );\n " (call_expression) "g_info( &logger, " Application Task " );\n" (identifier) "g_info( " (argument_list) "&logger, " Application Task " );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "Application Task " )" (") "A" (string_content) "pplication Task " " (") ")" ()) "\n" (;) " " (expression_statement) "g_printf( &logger, "----------------------------\r\n" );\n " (call_expression) "g_printf( &logger, "----------------------------\r\n" );\n" (identifier) "g_printf( " (argument_list) "&logger, "----------------------------\r\n" );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "---------------------------\r\n" )" (") "-" (string_content) "--------------------------\r" (escape_sequence) "\n" (escape_sequence) "" " (") ")" ()) "\n" (;) " " (expression_statement) "lay_ms( 100 );\n}" (call_expression) "lay_ms( 100 );\n" (identifier) "lay_ms( " (argument_list) "100 );\n" (() "1" (number_literal) "0 )" ()) "\n" (;) "}" (}) "\n" (function_definition) "id application_task ( void ) \n{\n static float pressure;\n static float altitude;\n \n altitude5_get_pressure( &altitude5, &pressure );\n log_printf( &logger, " Pressure : %.2f mBar \r\n", pressure );\n Delay_ms( 100 );\n \n altitude5_get_altitude( &altitude5, &altitude );\n log_printf( &logger, " Altitude : %.2f m \r\n", altitude );\n log_printf( &logger, "----------------------------\r\n" );\n Delay_ms( 1000 );\n}\n\n" (primitive_type) "id a" (function_declarator) "plication_task ( void ) \n" (identifier) "plication_task (" (parameter_list) "void ) \n" (() "v" (parameter_declaration) "id )" (primitive_type) "id )" ()) "\n" (compound_statement) " static float pressure;\n static float altitude;\n \n altitude5_get_pressure( &altitude5, &pressure );\n log_printf( &logger, " Pressure : %.2f mBar \r\n", pressure );\n Delay_ms( 100 );\n \n altitude5_get_altitude( &altitude5, &altitude );\n log_printf( &logger, " Altitude : %.2f m \r\n", altitude );\n log_printf( &logger, "----------------------------\r\n" );\n Delay_ms( 1000 );\n}\n\n" ({) " " (declaration) "atic float pressure;\n " (storage_class_specifier) "atic f" (static) "atic f" (primitive_type) "oat p" (identifier) "essure;\n" (;) " " (declaration) "atic float altitude;\n " (storage_class_specifier) "atic f" (static) "atic f" (primitive_type) "oat a" (identifier) "titude;\n" (;) " " (expression_statement) "titude5_get_pressure( &altitude5, &pressure );\n " (call_expression) "titude5_get_pressure( &altitude5, &pressure );\n" (identifier) "titude5_get_pressure( " (argument_list) "&altitude5, &pressure );\n" (() "&" (pointer_expression) "ltitude5, " (&) "l" (identifier) "titude5, " (,) "&" (pointer_expression) "ressure )" (&) "r" (identifier) "essure )" ()) "\n" (;) " " (expression_statement) "g_printf( &logger, " Pressure : %.2f mBar \r\n", pressure );\n " (call_expression) "g_printf( &logger, " Pressure : %.2f mBar \r\n", pressure );\n" (identifier) "g_printf( " (argument_list) "&logger, " Pressure : %.2f mBar \r\n", pressure );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "Pressure : %.2f mBar \r\n", " (") "P" (string_content) "ressure : %.2f mBar \r" (escape_sequence) "\n" (escape_sequence) ""," (") " " (,) "p" (identifier) "essure )" ()) "\n" (;) " " (expression_statement) "lay_ms( 100 );\n " (call_expression) "lay_ms( 100 );\n" (identifier) "lay_ms( " (argument_list) "100 );\n" (() "1" (number_literal) "0 )" ()) "\n" (;) " " (expression_statement) "titude5_get_altitude( &altitude5, &altitude );\n " (call_expression) "titude5_get_altitude( &altitude5, &altitude );\n" (identifier) "titude5_get_altitude( " (argument_list) "&altitude5, &altitude );\n" (() "&" (pointer_expression) "ltitude5, " (&) "l" (identifier) "titude5, " (,) "&" (pointer_expression) "ltitude )" (&) "l" (identifier) "titude )" ()) "\n" (;) " " (expression_statement) "g_printf( &logger, " Altitude : %.2f m \r\n", altitude );\n " (call_expression) "g_printf( &logger, " Altitude : %.2f m \r\n", altitude );\n" (identifier) "g_printf( " (argument_list) "&logger, " Altitude : %.2f m \r\n", altitude );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "Altitude : %.2f m \r\n", " (") "A" (string_content) "ltitude : %.2f m \r" (escape_sequence) "\n" (escape_sequence) ""," (") " " (,) "a" (identifier) "titude )" ()) "\n" (;) " " (expression_statement) "g_printf( &logger, "----------------------------\r\n" );\n " (call_expression) "g_printf( &logger, "----------------------------\r\n" );\n" (identifier) "g_printf( " (argument_list) "&logger, "----------------------------\r\n" );\n" (() "&" (pointer_expression) "ogger, " (&) "o" (identifier) "gger, " (,) """ (string_literal) "---------------------------\r\n" )" (") "-" (string_content) "--------------------------\r" (escape_sequence) "\n" (escape_sequence) "" " (") ")" ()) "\n" (;) " " (expression_statement) "lay_ms( 1000 );\n}" (call_expression) "lay_ms( 1000 );\n" (identifier) "lay_ms( " (argument_list) "1000 );\n" (() "1" (number_literal) "00 )" ()) "\n" (;) "}" (}) "\n" (function_definition) "id main ( void ) \n{\n application_init( );\n\n for ( ; ; ) \n {\n application_task( );\n }\n}\n\n" (primitive_type) "id m" (function_declarator) "in ( void ) \n" (identifier) "in (" (parameter_list) "void ) \n" (() "v" (parameter_declaration) "id )" (primitive_type) "id )" ()) "\n" (compound_statement) " application_init( );\n\n for ( ; ; ) \n {\n application_task( );\n }\n}\n\n" ({) " " (expression_statement) "plication_init( );\n\n" (call_expression) "plication_init( );\n" (identifier) "plication_init( " (argument_list) ");\n" (() ")" ()) "\n" (;) "\n" (for_statement) "r ( ; ; ) \n {\n application_task( );\n }\n}" (for) "r (" (() ";" (;) ";" (;) ")" ()) "\n" (compound_statement) " application_task( );\n }\n}" ({) " " (expression_statement) "plication_task( );\n " (call_expression) "plication_task( );\n" (identifier) "plication_task( " (argument_list) ");\n" (() ")" ()) "\n" (;) " " (}) "}" (}) "\n" (comment) " ------------------------------------------------------------------------ END\n"
390
0
{"language": "c", "success": true, "metadata": {"lines": 82, "avg_line_length": 31.35, "nodes": 206, "errors": 0, "source_hash": "10257446a2568c2b4590eb0e4601b2faaa83ccf208d2d6ac2d633bde19a25c30", "categorized_nodes": 145}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "nclude \"board.h\"\n#i", "parent": null, "children": [1, 2], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 1, "type": "#include", "text": "nclude \"", "parent": 0, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 2, "type": "string_literal", "text": "oard.h\"\n#", "parent": 0, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "nclude \"log.h\"\n#i", "parent": null, "children": [4, 5], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 4, "type": "#include", "text": "nclude \"", "parent": 3, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 5, "type": "string_literal", "text": "og.h\"\n#", "parent": 3, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "nclude \"altitude5.h\"\n\ns", "parent": null, "children": [7, 8], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#include", "text": "nclude \"", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 8, "type": "string_literal", "text": "ltitude5.h\"\n\n", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 22}}, {"id": 9, "type": "declaration", "text": "atic altitude5_t altitude5;\ns", "parent": null, "children": [10, 11, 12], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 29}}, {"id": 10, "type": "storage_class_specifier", "text": "atic a", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 11, "type": "type_identifier", "text": "titude5_t a", "parent": 9, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 18}}, {"id": 12, "type": "identifier", "text": "titude5;\n", "parent": 9, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 28}}, {"id": 13, "type": "declaration", "text": "atic log_t logger;\n\n", "parent": null, "children": [14, 15, 16], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 20}}, {"id": 14, "type": "storage_class_specifier", "text": "atic l", "parent": 13, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 15, "type": "type_identifier", "text": "g_t l", "parent": 13, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 12}}, {"id": 16, "type": "identifier", "text": "gger;\n", "parent": 13, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 19}}, {"id": 17, "type": "function_definition", "text": "id application_init ( void ) \n{\n log_cfg_t log_cfg; /**< Logger config object. */\n altitude5_cfg_t altitude5_cfg; /**< Click config object. */\n\n /** \n * Logger initialization.\n * Default baud rate: 115200\n * Default log level: LOG_LEVEL_DEBUG\n * @note If USB_UART_RX and USB_UART_TX \n * are defined as HAL_PIN_NC, you will \n * need to define them manually for log to work. \n * See @b LOG_MAP_USB_UART macro definition for detailed explanation.\n */\n LOG_MAP_USB_UART( log_cfg );\n log_init( &logger, &log_cfg );\n log_info( &logger, \" Application Init \" );\n\n // Click initialization.\n altitude5_cfg_setup( &altitude5_cfg );\n ALTITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n err_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n if ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, \" Application Init Error. \" );\n log_info( &logger, \" Please, run program again... \" );\n\n for ( ; ; );\n }\n\n altitude5_default_cfg ( &altitude5 );\n log_info( &logger, \" Application Task \" );\n log_printf( &logger, \"----------------------------\\r\\n\" );\n Delay_ms( 100 );\n}\n\n", "parent": null, "children": [18, 19], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 18, "type": "primitive_type", "text": "id a", "parent": 17, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 4}}, {"id": 19, "type": "function_declarator", "text": "plication_init ( void ) \n", "parent": 17, "children": [20, 21], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 30}}, {"id": 20, "type": "identifier", "text": "plication_init (", "parent": 19, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 21}}, {"id": 21, "type": "parameter_list", "text": "void ) \n", "parent": 19, "children": [22], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 30}}, {"id": 22, "type": "parameter_declaration", "text": "id )", "parent": 21, "children": [23], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 28}}, {"id": 23, "type": "primitive_type", "text": "id )", "parent": 22, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 28}}, {"id": 24, "type": "declaration", "text": "g_cfg_t log_cfg; ", "parent": 17, "children": [25, 26], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 22}}, {"id": 25, "type": "type_identifier", "text": "g_cfg_t l", "parent": 24, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 13}}, {"id": 26, "type": "identifier", "text": "g_cfg; ", "parent": 24, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 21}}, {"id": 27, "type": "declaration", "text": "titude5_cfg_t altitude5_cfg; ", "parent": 17, "children": [28, 29], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 34}}, {"id": 28, "type": "type_identifier", "text": "titude5_cfg_t a", "parent": 27, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 19}}, {"id": 29, "type": "identifier", "text": "titude5_cfg; ", "parent": 27, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 33}}, {"id": 30, "type": "call_expression", "text": "G_MAP_USB_UART( log_cfg );\n", "parent": 17, "children": [31, 32], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 31}}, {"id": 31, "type": "identifier", "text": "G_MAP_USB_UART( ", "parent": 30, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 20}}, {"id": 32, "type": "argument_list", "text": "log_cfg );\n", "parent": 30, "children": [33], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 31}}, {"id": 33, "type": "identifier", "text": "g_cfg )", "parent": 32, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 29}}, {"id": 34, "type": "call_expression", "text": "g_init( &logger, &log_cfg );\n", "parent": 17, "children": [35, 36], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 33}}, {"id": 35, "type": "identifier", "text": "g_init( ", "parent": 34, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 12}}, {"id": 36, "type": "argument_list", "text": "&logger, &log_cfg );\n", "parent": 34, "children": [37, 40], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 33}}, {"id": 37, "type": "pointer_expression", "text": "ogger, ", "parent": 36, "children": [38, 39], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 21}}, {"id": 38, "type": "&", "text": "o", "parent": 37, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 15}}, {"id": 39, "type": "identifier", "text": "gger, ", "parent": 37, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 21}}, {"id": 40, "type": "pointer_expression", "text": "og_cfg )", "parent": 36, "children": [41, 42], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 31}}, {"id": 41, "type": "&", "text": "o", "parent": 40, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 24}}, {"id": 42, "type": "identifier", "text": "g_cfg )", "parent": 40, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 31}}, {"id": 43, "type": "call_expression", "text": "g_info( &logger, \" Application Init \" );\n", "parent": 17, "children": [44, 45], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 45}}, {"id": 44, "type": "identifier", "text": "g_info( ", "parent": 43, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 12}}, {"id": 45, "type": "argument_list", "text": "&logger, \" Application Init \" );\n", "parent": 43, "children": [46, 49], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 45}}, {"id": 46, "type": "pointer_expression", "text": "ogger, ", "parent": 45, "children": [47, 48], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 21}}, {"id": 47, "type": "&", "text": "o", "parent": 46, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 15}}, {"id": 48, "type": "identifier", "text": "gger, ", "parent": 46, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 21}}, {"id": 49, "type": "string_literal", "text": "Application Init \" )", "parent": 45, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 43}}, {"id": 50, "type": "call_expression", "text": "titude5_cfg_setup( &altitude5_cfg );\n", "parent": 17, "children": [51, 52], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 41}}, {"id": 51, "type": "identifier", "text": "titude5_cfg_setup( ", "parent": 50, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 23}}, {"id": 52, "type": "argument_list", "text": "&altitude5_cfg );\n", "parent": 50, "children": [53], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 41}}, {"id": 53, "type": "pointer_expression", "text": "ltitude5_cfg )", "parent": 52, "children": [54, 55], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 39}}, {"id": 54, "type": "&", "text": "l", "parent": 53, "children": [], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 26}}, {"id": 55, "type": "identifier", "text": "titude5_cfg )", "parent": 53, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 39}}, {"id": 56, "type": "call_expression", "text": "TITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n", "parent": 17, "children": [57, 58], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 55}}, {"id": 57, "type": "identifier", "text": "TITUDE5_MAP_MIKROBUS( ", "parent": 56, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 26}}, {"id": 58, "type": "argument_list", "text": "altitude5_cfg, MIKROBUS_1 );\n", "parent": 56, "children": [59, 60], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 55}}, {"id": 59, "type": "identifier", "text": "titude5_cfg, ", "parent": 58, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 41}}, {"id": 60, "type": "identifier", "text": "KROBUS_1 )", "parent": 58, "children": [], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 53}}, {"id": 61, "type": "declaration", "text": "r_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n ", "parent": 17, "children": [62, 63], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 67}}, {"id": 62, "type": "type_identifier", "text": "r_t i", "parent": 61, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 9}}, {"id": 63, "type": "init_declarator", "text": "it_flag = altitude5_init( &altitude5, &altitude5_cfg );\n", "parent": 61, "children": [64, 65, 66], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 66}}, {"id": 64, "type": "identifier", "text": "it_flag =", "parent": 63, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 19}}, {"id": 65, "type": "=", "text": "a", "parent": 63, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 21}}, {"id": 66, "type": "call_expression", "text": "titude5_init( &altitude5, &altitude5_cfg );\n", "parent": 63, "children": [67, 68], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 66}}, {"id": 67, "type": "identifier", "text": "titude5_init( ", "parent": 66, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 36}}, {"id": 68, "type": "argument_list", "text": "&altitude5, &altitude5_cfg );\n", "parent": 66, "children": [69, 72], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 66}}, {"id": 69, "type": "pointer_expression", "text": "ltitude5, ", "parent": 68, "children": [70, 71], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 48}}, {"id": 70, "type": "&", "text": "l", "parent": 69, "children": [], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 39}}, {"id": 71, "type": "identifier", "text": "titude5, ", "parent": 69, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 48}}, {"id": 72, "type": "pointer_expression", "text": "ltitude5_cfg )", "parent": 68, "children": [73, 74], "start_point": {"row": 52, "column": 50}, "end_point": {"row": 52, "column": 64}}, {"id": 73, "type": "&", "text": "l", "parent": 72, "children": [], "start_point": {"row": 52, "column": 50}, "end_point": {"row": 52, "column": 51}}, {"id": 74, "type": "identifier", "text": "titude5_cfg )", "parent": 72, "children": [], "start_point": {"row": 52, "column": 51}, "end_point": {"row": 52, "column": 64}}, {"id": 75, "type": "if_statement", "text": " ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, \" Application Init Error. \" );\n log_info( &logger, \" Please, run program again... \" );\n\n for ( ; ; );\n }\n\n", "parent": 17, "children": [76], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 59, "column": 5}}, {"id": 76, "type": "parenthesized_expression", "text": "I2C_MASTER_ERROR == init_flag ) \n", "parent": 75, "children": [77], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 40}}, {"id": 77, "type": "binary_expression", "text": "C_MASTER_ERROR == init_flag )", "parent": 76, "children": [78, 79, 80], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 38}}, {"id": 78, "type": "identifier", "text": "C_MASTER_ERROR =", "parent": 77, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 25}}, {"id": 79, "type": "==", "text": " i", "parent": 77, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 28}}, {"id": 80, "type": "identifier", "text": "it_flag )", "parent": 77, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 38}}, {"id": 81, "type": "call_expression", "text": "g_error( &logger, \" Application Init Error. \" );\n", "parent": 75, "children": [82, 83], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 57}}, {"id": 82, "type": "identifier", "text": "g_error( ", "parent": 81, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 17}}, {"id": 83, "type": "argument_list", "text": "&logger, \" Application Init Error. \" );\n", "parent": 81, "children": [84, 87], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 57}}, {"id": 84, "type": "pointer_expression", "text": "ogger, ", "parent": 83, "children": [85, 86], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 26}}, {"id": 85, "type": "&", "text": "o", "parent": 84, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 20}}, {"id": 86, "type": "identifier", "text": "gger, ", "parent": 84, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 26}}, {"id": 87, "type": "string_literal", "text": "Application Init Error. \" )", "parent": 83, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 55}}, {"id": 88, "type": "call_expression", "text": "g_info( &logger, \" Please, run program again... \" );\n", "parent": 75, "children": [89, 90], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 61}}, {"id": 89, "type": "identifier", "text": "g_info( ", "parent": 88, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 16}}, {"id": 90, "type": "argument_list", "text": "&logger, \" Please, run program again... \" );\n", "parent": 88, "children": [91, 94], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 61}}, {"id": 91, "type": "pointer_expression", "text": "ogger, ", "parent": 90, "children": [92, 93], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 25}}, {"id": 92, "type": "&", "text": "o", "parent": 91, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 19}}, {"id": 93, "type": "identifier", "text": "gger, ", "parent": 91, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 25}}, {"id": 94, "type": "string_literal", "text": "Please, run program again... \" )", "parent": 90, "children": [], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 59}}, {"id": 95, "type": "for_statement", "text": "r ( ; ; );\n ", "parent": 75, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 20}}, {"id": 96, "type": "call_expression", "text": "titude5_default_cfg ( &altitude5 );\n", "parent": 17, "children": [97, 98], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 40}}, {"id": 97, "type": "identifier", "text": "titude5_default_cfg (", "parent": 96, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 25}}, {"id": 98, "type": "argument_list", "text": "&altitude5 );\n", "parent": 96, "children": [99], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 40}}, {"id": 99, "type": "pointer_expression", "text": "ltitude5 )", "parent": 98, "children": [100, 101], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 38}}, {"id": 100, "type": "&", "text": "l", "parent": 99, "children": [], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 29}}, {"id": 101, "type": "identifier", "text": "titude5 )", "parent": 99, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 38}}, {"id": 102, "type": "call_expression", "text": "g_info( &logger, \" Application Task \" );\n", "parent": 17, "children": [103, 104], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 45}}, {"id": 103, "type": "identifier", "text": "g_info( ", "parent": 102, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 12}}, {"id": 104, "type": "argument_list", "text": "&logger, \" Application Task \" );\n", "parent": 102, "children": [105, 108], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 45}}, {"id": 105, "type": "pointer_expression", "text": "ogger, ", "parent": 104, "children": [106, 107], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 21}}, {"id": 106, "type": "&", "text": "o", "parent": 105, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 15}}, {"id": 107, "type": "identifier", "text": "gger, ", "parent": 105, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 21}}, {"id": 108, "type": "string_literal", "text": "Application Task \" )", "parent": 104, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 43}}, {"id": 109, "type": "call_expression", "text": "g_printf( &logger, \"----------------------------\\r\\n\" );\n", "parent": 17, "children": [110, 111], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 61}}, {"id": 110, "type": "identifier", "text": "g_printf( ", "parent": 109, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 14}}, {"id": 111, "type": "argument_list", "text": "&logger, \"----------------------------\\r\\n\" );\n", "parent": 109, "children": [112, 115], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 61}}, {"id": 112, "type": "pointer_expression", "text": "ogger, ", "parent": 111, "children": [113, 114], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 23}}, {"id": 113, "type": "&", "text": "o", "parent": 112, "children": [], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 17}}, {"id": 114, "type": "identifier", "text": "gger, ", "parent": 112, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 23}}, {"id": 115, "type": "string_literal", "text": "---------------------------\\r\\n\" )", "parent": 111, "children": [116, 117], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 59}}, {"id": 116, "type": "escape_sequence", "text": "\\n", "parent": 115, "children": [], "start_point": {"row": 63, "column": 54}, "end_point": {"row": 63, "column": 56}}, {"id": 117, "type": "escape_sequence", "text": "\" ", "parent": 115, "children": [], "start_point": {"row": 63, "column": 56}, "end_point": {"row": 63, "column": 58}}, {"id": 118, "type": "call_expression", "text": "lay_ms( 100 );\n", "parent": 17, "children": [119, 120], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 19}}, {"id": 119, "type": "identifier", "text": "lay_ms( ", "parent": 118, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 12}}, {"id": 120, "type": "argument_list", "text": "100 );\n", "parent": 118, "children": [121], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 19}}, {"id": 121, "type": "number_literal", "text": "0 )", "parent": 120, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 17}}, {"id": 122, "type": "function_definition", "text": "id application_task ( void ) \n{\n static float pressure;\n static float altitude;\n \n altitude5_get_pressure( &altitude5, &pressure );\n log_printf( &logger, \" Pressure : %.2f mBar \\r\\n\", pressure );\n Delay_ms( 100 );\n \n altitude5_get_altitude( &altitude5, &altitude );\n log_printf( &logger, \" Altitude : %.2f m \\r\\n\", altitude );\n log_printf( &logger, \"----------------------------\\r\\n\" );\n Delay_ms( 1000 );\n}\n\n", "parent": null, "children": [123, 124], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 123, "type": "primitive_type", "text": "id a", "parent": 122, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 4}}, {"id": 124, "type": "function_declarator", "text": "plication_task ( void ) \n", "parent": 122, "children": [125, 126], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 30}}, {"id": 125, "type": "identifier", "text": "plication_task (", "parent": 124, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 21}}, {"id": 126, "type": "parameter_list", "text": "void ) \n", "parent": 124, "children": [127], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 30}}, {"id": 127, "type": "parameter_declaration", "text": "id )", "parent": 126, "children": [128], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 28}}, {"id": 128, "type": "primitive_type", "text": "id )", "parent": 127, "children": [], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 28}}, {"id": 129, "type": "declaration", "text": "atic float pressure;\n ", "parent": 122, "children": [130, 131, 132], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 26}}, {"id": 130, "type": "storage_class_specifier", "text": "atic f", "parent": 129, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 10}}, {"id": 131, "type": "primitive_type", "text": "oat p", "parent": 129, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 16}}, {"id": 132, "type": "identifier", "text": "essure;\n", "parent": 129, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 25}}, {"id": 133, "type": "declaration", "text": "atic float altitude;\n ", "parent": 122, "children": [134, 135, 136], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 26}}, {"id": 134, "type": "storage_class_specifier", "text": "atic f", "parent": 133, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 135, "type": "primitive_type", "text": "oat a", "parent": 133, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 16}}, {"id": 136, "type": "identifier", "text": "titude;\n", "parent": 133, "children": [], "start_point": {"row": 70, "column": 17}, "end_point": {"row": 70, "column": 25}}, {"id": 137, "type": "call_expression", "text": "titude5_get_pressure( &altitude5, &pressure );\n", "parent": 122, "children": [138, 139], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 51}}, {"id": 138, "type": "identifier", "text": "titude5_get_pressure( ", "parent": 137, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 26}}, {"id": 139, "type": "argument_list", "text": "&altitude5, &pressure );\n", "parent": 137, "children": [140, 143], "start_point": {"row": 72, "column": 26}, "end_point": {"row": 72, "column": 51}}, {"id": 140, "type": "pointer_expression", "text": "ltitude5, ", "parent": 139, "children": [141, 142], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 38}}, {"id": 141, "type": "&", "text": "l", "parent": 140, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 29}}, {"id": 142, "type": "identifier", "text": "titude5, ", "parent": 140, "children": [], "start_point": {"row": 72, "column": 29}, "end_point": {"row": 72, "column": 38}}, {"id": 143, "type": "pointer_expression", "text": "ressure )", "parent": 139, "children": [144, 145], "start_point": {"row": 72, "column": 40}, "end_point": {"row": 72, "column": 49}}, {"id": 144, "type": "&", "text": "r", "parent": 143, "children": [], "start_point": {"row": 72, "column": 40}, "end_point": {"row": 72, "column": 41}}, {"id": 145, "type": "identifier", "text": "essure )", "parent": 143, "children": [], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 49}}, {"id": 146, "type": "call_expression", "text": "g_printf( &logger, \" Pressure : %.2f mBar \\r\\n\", pressure );\n", "parent": 122, "children": [147, 148], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 68}}, {"id": 147, "type": "identifier", "text": "g_printf( ", "parent": 146, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 14}}, {"id": 148, "type": "argument_list", "text": "&logger, \" Pressure : %.2f mBar \\r\\n\", pressure );\n", "parent": 146, "children": [149, 152, 155], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 68}}, {"id": 149, "type": "pointer_expression", "text": "ogger, ", "parent": 148, "children": [150, 151], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 23}}, {"id": 150, "type": "&", "text": "o", "parent": 149, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 17}}, {"id": 151, "type": "identifier", "text": "gger, ", "parent": 149, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 23}}, {"id": 152, "type": "string_literal", "text": "Pressure : %.2f mBar \\r\\n\", ", "parent": 148, "children": [153, 154], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 56}}, {"id": 153, "type": "escape_sequence", "text": "\\n", "parent": 152, "children": [], "start_point": {"row": 73, "column": 51}, "end_point": {"row": 73, "column": 53}}, {"id": 154, "type": "escape_sequence", "text": "\",", "parent": 152, "children": [], "start_point": {"row": 73, "column": 53}, "end_point": {"row": 73, "column": 55}}, {"id": 155, "type": "identifier", "text": "essure )", "parent": 148, "children": [], "start_point": {"row": 73, "column": 58}, "end_point": {"row": 73, "column": 66}}, {"id": 156, "type": "call_expression", "text": "lay_ms( 100 );\n", "parent": 122, "children": [157, 158], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 19}}, {"id": 157, "type": "identifier", "text": "lay_ms( ", "parent": 156, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 12}}, {"id": 158, "type": "argument_list", "text": "100 );\n", "parent": 156, "children": [159], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 19}}, {"id": 159, "type": "number_literal", "text": "0 )", "parent": 158, "children": [], "start_point": {"row": 74, "column": 14}, "end_point": {"row": 74, "column": 17}}, {"id": 160, "type": "call_expression", "text": "titude5_get_altitude( &altitude5, &altitude );\n", "parent": 122, "children": [161, 162], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 51}}, {"id": 161, "type": "identifier", "text": "titude5_get_altitude( ", "parent": 160, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 26}}, {"id": 162, "type": "argument_list", "text": "&altitude5, &altitude );\n", "parent": 160, "children": [163, 166], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 51}}, {"id": 163, "type": "pointer_expression", "text": "ltitude5, ", "parent": 162, "children": [164, 165], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 38}}, {"id": 164, "type": "&", "text": "l", "parent": 163, "children": [], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 29}}, {"id": 165, "type": "identifier", "text": "titude5, ", "parent": 163, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 38}}, {"id": 166, "type": "pointer_expression", "text": "ltitude )", "parent": 162, "children": [167, 168], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 49}}, {"id": 167, "type": "&", "text": "l", "parent": 166, "children": [], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 41}}, {"id": 168, "type": "identifier", "text": "titude )", "parent": 166, "children": [], "start_point": {"row": 76, "column": 41}, "end_point": {"row": 76, "column": 49}}, {"id": 169, "type": "call_expression", "text": "g_printf( &logger, \" Altitude : %.2f m \\r\\n\", altitude );\n", "parent": 122, "children": [170, 171], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 65}}, {"id": 170, "type": "identifier", "text": "g_printf( ", "parent": 169, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 14}}, {"id": 171, "type": "argument_list", "text": "&logger, \" Altitude : %.2f m \\r\\n\", altitude );\n", "parent": 169, "children": [172, 175, 178], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 65}}, {"id": 172, "type": "pointer_expression", "text": "ogger, ", "parent": 171, "children": [173, 174], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 23}}, {"id": 173, "type": "&", "text": "o", "parent": 172, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 17}}, {"id": 174, "type": "identifier", "text": "gger, ", "parent": 172, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 23}}, {"id": 175, "type": "string_literal", "text": "Altitude : %.2f m \\r\\n\", ", "parent": 171, "children": [176, 177], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 53}}, {"id": 176, "type": "escape_sequence", "text": "\\n", "parent": 175, "children": [], "start_point": {"row": 77, "column": 48}, "end_point": {"row": 77, "column": 50}}, {"id": 177, "type": "escape_sequence", "text": "\",", "parent": 175, "children": [], "start_point": {"row": 77, "column": 50}, "end_point": {"row": 77, "column": 52}}, {"id": 178, "type": "identifier", "text": "titude )", "parent": 171, "children": [], "start_point": {"row": 77, "column": 55}, "end_point": {"row": 77, "column": 63}}, {"id": 179, "type": "call_expression", "text": "g_printf( &logger, \"----------------------------\\r\\n\" );\n", "parent": 122, "children": [180, 181], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 61}}, {"id": 180, "type": "identifier", "text": "g_printf( ", "parent": 179, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 14}}, {"id": 181, "type": "argument_list", "text": "&logger, \"----------------------------\\r\\n\" );\n", "parent": 179, "children": [182, 185], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 61}}, {"id": 182, "type": "pointer_expression", "text": "ogger, ", "parent": 181, "children": [183, 184], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 23}}, {"id": 183, "type": "&", "text": "o", "parent": 182, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 17}}, {"id": 184, "type": "identifier", "text": "gger, ", "parent": 182, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 23}}, {"id": 185, "type": "string_literal", "text": "---------------------------\\r\\n\" )", "parent": 181, "children": [186, 187], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 59}}, {"id": 186, "type": "escape_sequence", "text": "\\n", "parent": 185, "children": [], "start_point": {"row": 78, "column": 54}, "end_point": {"row": 78, "column": 56}}, {"id": 187, "type": "escape_sequence", "text": "\" ", "parent": 185, "children": [], "start_point": {"row": 78, "column": 56}, "end_point": {"row": 78, "column": 58}}, {"id": 188, "type": "call_expression", "text": "lay_ms( 1000 );\n", "parent": 122, "children": [189, 190], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 20}}, {"id": 189, "type": "identifier", "text": "lay_ms( ", "parent": 188, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 12}}, {"id": 190, "type": "argument_list", "text": "1000 );\n", "parent": 188, "children": [191], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 20}}, {"id": 191, "type": "number_literal", "text": "00 )", "parent": 190, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 18}}, {"id": 192, "type": "function_definition", "text": "id main ( void ) \n{\n application_init( );\n\n for ( ; ; ) \n {\n application_task( );\n }\n}\n\n", "parent": null, "children": [193, 194], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 193, "type": "primitive_type", "text": "id m", "parent": 192, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 4}}, {"id": 194, "type": "function_declarator", "text": "in ( void ) \n", "parent": 192, "children": [195, 196], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 18}}, {"id": 195, "type": "identifier", "text": "in (", "parent": 194, "children": [], "start_point": {"row": 82, "column": 5}, "end_point": {"row": 82, "column": 9}}, {"id": 196, "type": "parameter_list", "text": "void ) \n", "parent": 194, "children": [197], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 18}}, {"id": 197, "type": "parameter_declaration", "text": "id )", "parent": 196, "children": [198], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 198, "type": "primitive_type", "text": "id )", "parent": 197, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 199, "type": "call_expression", "text": "plication_init( );\n", "parent": 192, "children": [200, 201], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 23}}, {"id": 200, "type": "identifier", "text": "plication_init( ", "parent": 199, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 20}}, {"id": 201, "type": "argument_list", "text": ");\n", "parent": 199, "children": [], "start_point": {"row": 84, "column": 20}, "end_point": {"row": 84, "column": 23}}, {"id": 202, "type": "for_statement", "text": "r ( ; ; ) \n {\n application_task( );\n }\n}", "parent": 192, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 89, "column": 5}}, {"id": 203, "type": "call_expression", "text": "plication_task( );\n", "parent": 202, "children": [204, 205], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 27}}, {"id": 204, "type": "identifier", "text": "plication_task( ", "parent": 203, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 24}}, {"id": 205, "type": "argument_list", "text": ");\n", "parent": 203, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 27}}]}, "node_categories": {"declarations": {"functions": [17, 19, 122, 124, 192, 194], "variables": [9, 13, 22, 24, 27, 61, 127, 129, 133, 197], "classes": [10, 14, 130, 134], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [30, 34, 37, 40, 43, 46, 50, 53, 56, 66, 69, 72, 76, 77, 81, 84, 88, 91, 96, 99, 102, 105, 109, 112, 118, 137, 140, 143, 146, 149, 156, 160, 163, 166, 169, 172, 179, 182, 188, 199, 203], "assignments": [], "loops": [95, 202], "conditionals": [11, 12, 15, 16, 20, 25, 26, 28, 29, 31, 33, 35, 39, 42, 44, 48, 51, 55, 57, 59, 60, 62, 64, 67, 71, 74, 75, 78, 80, 82, 86, 89, 93, 97, 101, 103, 107, 110, 114, 119, 125, 132, 136, 138, 142, 145, 147, 151, 155, 157, 161, 165, 168, 170, 174, 178, 180, 184, 189, 195, 200, 204], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 49, 87, 94, 108, 115, 121, 152, 159, 175, 185, 191], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": ")", "text_snippet": "id application_init ( void ) \n{\n log_cfg_t log_cfg; /**< Logger config object. */\n "}, {"node_id": 19, "universal_type": "function", "name": ")", "text_snippet": "plication_init ( void ) \n"}, {"node_id": 122, "universal_type": "function", "name": ")", "text_snippet": "id application_task ( void ) \n{\n static float pressure;\n static float altitude;\n \n altit"}, {"node_id": 124, "universal_type": "function", "name": ")", "text_snippet": "plication_task ( void ) \n"}, {"node_id": 192, "universal_type": "function", "name": ")", "text_snippet": "id main ( void ) \n{\n application_init( );\n\n for ( ; ; ) \n {\n application_task( );\n "}, {"node_id": 194, "universal_type": "function", "name": ")", "text_snippet": "in ( void ) \n"}], "class_declarations": [{"node_id": 10, "universal_type": "class", "name": "unknown", "text_snippet": "atic a"}, {"node_id": 14, "universal_type": "class", "name": "unknown", "text_snippet": "atic l"}, {"node_id": 130, "universal_type": "class", "name": "unknown", "text_snippet": "atic f"}, {"node_id": 134, "universal_type": "class", "name": "unknown", "text_snippet": "atic f"}], "import_statements": [{"node_id": 0, "text": "nclude \"board.h\"\n#i"}, {"node_id": 1, "text": "nclude \""}, {"node_id": 3, "text": "nclude \"log.h\"\n#i"}, {"node_id": 4, "text": "nclude \""}, {"node_id": 6, "text": "nclude \"altitude5.h\"\n\ns"}, {"node_id": 7, "text": "nclude \""}]}, "original_source_code": "/*!\n * @file main.c\n * @brief Altitude5 Click example\n *\n * # Description\n * This library contains API for Altitude 5 Click driver.\n * The demo application reads ADC value, calculate pressure and altitude.\n *\n * The demo application is composed of two sections :\n *\n * ## Application Init\n * Initializes I2C or analog driver and log UART.\n * After driver initialization the app set default settings.\n *\n * ## Application Task\n * This is an example that demonstrates the use of the Altitude 5 Click board\u2122.\n * In this example, we read ADC values and \n * display the Pressure ( mBar ) and Altitude ( m ) data.\n * Results are being sent to the Usart Terminal where you can track their changes.\n *\n * @author <NAME>\n *\n */\n\n#include \"board.h\"\n#include \"log.h\"\n#include \"altitude5.h\"\n\nstatic altitude5_t altitude5;\nstatic log_t logger;\n\nvoid application_init ( void ) \n{\n log_cfg_t log_cfg; /**< Logger config object. */\n altitude5_cfg_t altitude5_cfg; /**< Click config object. */\n\n /** \n * Logger initialization.\n * Default baud rate: 115200\n * Default log level: LOG_LEVEL_DEBUG\n * @note If USB_UART_RX and USB_UART_TX \n * are defined as HAL_PIN_NC, you will \n * need to define them manually for log to work. \n * See @b LOG_MAP_USB_UART macro definition for detailed explanation.\n */\n LOG_MAP_USB_UART( log_cfg );\n log_init( &logger, &log_cfg );\n log_info( &logger, \" Application Init \" );\n\n // Click initialization.\n altitude5_cfg_setup( &altitude5_cfg );\n ALTITUDE5_MAP_MIKROBUS( altitude5_cfg, MIKROBUS_1 );\n err_t init_flag = altitude5_init( &altitude5, &altitude5_cfg );\n if ( I2C_MASTER_ERROR == init_flag ) \n {\n log_error( &logger, \" Application Init Error. \" );\n log_info( &logger, \" Please, run program again... \" );\n\n for ( ; ; );\n }\n\n altitude5_default_cfg ( &altitude5 );\n log_info( &logger, \" Application Task \" );\n log_printf( &logger, \"----------------------------\\r\\n\" );\n Delay_ms( 100 );\n}\n\nvoid application_task ( void ) \n{\n static float pressure;\n static float altitude;\n \n altitude5_get_pressure( &altitude5, &pressure );\n log_printf( &logger, \" Pressure : %.2f mBar \\r\\n\", pressure );\n Delay_ms( 100 );\n \n altitude5_get_altitude( &altitude5, &altitude );\n log_printf( &logger, \" Altitude : %.2f m \\r\\n\", altitude );\n log_printf( &logger, \"----------------------------\\r\\n\" );\n Delay_ms( 1000 );\n}\n\nvoid main ( void ) \n{\n application_init( );\n\n for ( ; ; ) \n {\n application_task( );\n }\n}\n\n// ------------------------------------------------------------------------ END\n"}
286
c
#ifndef SERIALIZATION_LIBRARY #define SERIALIZATION_LIBRARY #include "std_include.h" #include <boost/serialization/split_free.hpp> #include <boost/serialization/vector.hpp> using namespace std; using namespace cv; BOOST_SERIALIZATION_SPLIT_FREE(Mat) namespace boost { namespace serialization { /** Serialization support for cv::Mat */ template <class Archive> void save(Archive &ar, const Mat &m, const unsigned int version) { size_t elem_size = m.elemSize(); size_t elem_type = m.type(); ar &m.cols; ar &m.rows; ar &elem_size; ar &elem_type; const size_t data_size = m.cols * m.rows * elem_size; ar &boost::serialization::make_array(m.ptr(), data_size); } /** Serialization support for cv::Mat */ template <class Archive> void load(Archive &ar, Mat &m, const unsigned int version) { int cols, rows; size_t elem_size, elem_type; ar &cols; ar &rows; ar &elem_size; ar &elem_type; m.create(rows, cols, elem_type); size_t data_size = m.cols * m.rows * elem_size; ar &boost::serialization::make_array(m.ptr(), data_size); } } // namespace serialization } // namespace boost #endif
31.83
42
(translation_unit) "#ifndef SERIALIZATION_LIBRARY\n#define SERIALIZATION_LIBRARY\n\n#include "std_include.h"\n\n#include <boost/serialization/split_free.hpp>\n#include <boost/serialization/vector.hpp>\n\nusing namespace std;\nusing namespace cv;\n\nBOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n} // namespace boost\n\n#endif\n" (preproc_ifdef) "#ifndef SERIALIZATION_LIBRARY\n#define SERIALIZATION_LIBRARY\n\n#include "std_include.h"\n\n#include <boost/serialization/split_free.hpp>\n#include <boost/serialization/vector.hpp>\n\nusing namespace std;\nusing namespace cv;\n\nBOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n} // namespace boost\n\n#endif" (#ifndef) "#ifndef" (identifier) "SERIALIZATION_LIBRARY" (preproc_def) "#define SERIALIZATION_LIBRARY\n" (#define) "#define" (identifier) "SERIALIZATION_LIBRARY" (preproc_include) "#include "std_include.h"\n" (#include) "#include" (string_literal) ""std_include.h"" (") """ (string_content) "std_include.h" (") """ (preproc_include) "#include <boost/serialization/split_free.hpp>\n" (#include) "#include" (system_lib_string) "<boost/serialization/split_free.hpp>" (preproc_include) "#include <boost/serialization/vector.hpp>\n" (#include) "#include" (system_lib_string) "<boost/serialization/vector.hpp>" (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (declaration) "using namespace cv;" (type_identifier) "using" (identifier) "namespace" (ERROR) "cv" (identifier) "cv" (;) ";" (function_definition) "BOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n}" (macro_type_specifier) "BOOST_SERIALIZATION_SPLIT_FREE(Mat)" (identifier) "BOOST_SERIALIZATION_SPLIT_FREE" (() "(" (type_descriptor) "Mat" (type_identifier) "Mat" ()) ")" (identifier) "namespace" (ERROR) "boost" (identifier) "boost" (compound_statement) "{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n}" ({) "{" (function_definition) "namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n }" (type_identifier) "namespace" (identifier) "serialization" (compound_statement) "{\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n }" ({) "{" (comment) "/** Serialization support for cv::Mat */" (expression_statement) "template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)" (binary_expression) "template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)" (binary_expression) "template <class Archive" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "Archive" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "save(Archive &ar, const Mat &m, const unsigned int version)" (identifier) "save" (argument_list) "(Archive &ar, const Mat &m, const unsigned int version)" (() "(" (binary_expression) "Archive &ar" (identifier) "Archive" (&) "&" (identifier) "ar" (,) "," (binary_expression) "const Mat &m" (identifier) "const" (ERROR) "Mat" (identifier) "Mat" (&) "&" (identifier) "m" (,) "," (ERROR) "const unsigned int" (identifier) "const" (identifier) "unsigned" (primitive_type) "int" (identifier) "version" ()) ")" (;) "" (compound_statement) "{\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }" ({) "{" (declaration) "size_t elem_size = m.elemSize();" (primitive_type) "size_t" (init_declarator) "elem_size = m.elemSize()" (identifier) "elem_size" (=) "=" (call_expression) "m.elemSize()" (field_expression) "m.elemSize" (identifier) "m" (.) "." (field_identifier) "elemSize" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "size_t elem_type = m.type();" (primitive_type) "size_t" (init_declarator) "elem_type = m.type()" (identifier) "elem_type" (=) "=" (call_expression) "m.type()" (field_expression) "m.type" (identifier) "m" (.) "." (field_identifier) "type" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "ar &m.cols;" (binary_expression) "ar &m.cols" (identifier) "ar" (&) "&" (field_expression) "m.cols" (identifier) "m" (.) "." (field_identifier) "cols" (;) ";" (expression_statement) "ar &m.rows;" (binary_expression) "ar &m.rows" (identifier) "ar" (&) "&" (field_expression) "m.rows" (identifier) "m" (.) "." (field_identifier) "rows" (;) ";" (expression_statement) "ar &elem_size;" (binary_expression) "ar &elem_size" (identifier) "ar" (&) "&" (identifier) "elem_size" (;) ";" (expression_statement) "ar &elem_type;" (binary_expression) "ar &elem_type" (identifier) "ar" (&) "&" (identifier) "elem_type" (;) ";" (declaration) "const size_t data_size = m.cols * m.rows * elem_size;" (type_qualifier) "const" (const) "const" (primitive_type) "size_t" (init_declarator) "data_size = m.cols * m.rows * elem_size" (identifier) "data_size" (=) "=" (binary_expression) "m.cols * m.rows * elem_size" (binary_expression) "m.cols * m.rows" (field_expression) "m.cols" (identifier) "m" (.) "." (field_identifier) "cols" (*) "*" (field_expression) "m.rows" (identifier) "m" (.) "." (field_identifier) "rows" (*) "*" (identifier) "elem_size" (;) ";" (ERROR) "ar &boost::" (binary_expression) "ar &boost" (identifier) "ar" (&) "&" (identifier) "boost" (:) ":" (:) ":" (labeled_statement) "serialization::make_array(m.ptr(), data_size);" (statement_identifier) "serialization" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "make_array(m.ptr(), data_size);" (call_expression) "make_array(m.ptr(), data_size)" (identifier) "make_array" (argument_list) "(m.ptr(), data_size)" (() "(" (call_expression) "m.ptr()" (field_expression) "m.ptr" (identifier) "m" (.) "." (field_identifier) "ptr" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "data_size" ()) ")" (;) ";" (}) "}" (comment) "/** Serialization support for cv::Mat */" (expression_statement) "template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)" (binary_expression) "template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)" (binary_expression) "template <class Archive" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "Archive" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "load(Archive &ar, Mat &m, const unsigned int version)" (identifier) "load" (argument_list) "(Archive &ar, Mat &m, const unsigned int version)" (() "(" (binary_expression) "Archive &ar" (identifier) "Archive" (&) "&" (identifier) "ar" (,) "," (binary_expression) "Mat &m" (identifier) "Mat" (&) "&" (identifier) "m" (,) "," (ERROR) "const unsigned int" (identifier) "const" (identifier) "unsigned" (primitive_type) "int" (identifier) "version" ()) ")" (;) "" (compound_statement) "{\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }" ({) "{" (declaration) "int cols, rows;" (primitive_type) "int" (identifier) "cols" (,) "," (identifier) "rows" (;) ";" (declaration) "size_t elem_size, elem_type;" (primitive_type) "size_t" (identifier) "elem_size" (,) "," (identifier) "elem_type" (;) ";" (expression_statement) "ar &cols;" (binary_expression) "ar &cols" (identifier) "ar" (&) "&" (identifier) "cols" (;) ";" (expression_statement) "ar &rows;" (binary_expression) "ar &rows" (identifier) "ar" (&) "&" (identifier) "rows" (;) ";" (expression_statement) "ar &elem_size;" (binary_expression) "ar &elem_size" (identifier) "ar" (&) "&" (identifier) "elem_size" (;) ";" (expression_statement) "ar &elem_type;" (binary_expression) "ar &elem_type" (identifier) "ar" (&) "&" (identifier) "elem_type" (;) ";" (expression_statement) "m.create(rows, cols, elem_type);" (call_expression) "m.create(rows, cols, elem_type)" (field_expression) "m.create" (identifier) "m" (.) "." (field_identifier) "create" (argument_list) "(rows, cols, elem_type)" (() "(" (identifier) "rows" (,) "," (identifier) "cols" (,) "," (identifier) "elem_type" ()) ")" (;) ";" (declaration) "size_t data_size = m.cols * m.rows * elem_size;" (primitive_type) "size_t" (init_declarator) "data_size = m.cols * m.rows * elem_size" (identifier) "data_size" (=) "=" (binary_expression) "m.cols * m.rows * elem_size" (binary_expression) "m.cols * m.rows" (field_expression) "m.cols" (identifier) "m" (.) "." (field_identifier) "cols" (*) "*" (field_expression) "m.rows" (identifier) "m" (.) "." (field_identifier) "rows" (*) "*" (identifier) "elem_size" (;) ";" (ERROR) "ar &boost::" (binary_expression) "ar &boost" (identifier) "ar" (&) "&" (identifier) "boost" (:) ":" (:) ":" (labeled_statement) "serialization::make_array(m.ptr(), data_size);" (statement_identifier) "serialization" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "make_array(m.ptr(), data_size);" (call_expression) "make_array(m.ptr(), data_size)" (identifier) "make_array" (argument_list) "(m.ptr(), data_size)" (() "(" (call_expression) "m.ptr()" (field_expression) "m.ptr" (identifier) "m" (.) "." (field_identifier) "ptr" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "data_size" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "// namespace serialization" (}) "}" (comment) "// namespace boost" (#endif) "#endif"
334
14
{"language": "c", "success": true, "metadata": {"lines": 42, "avg_line_length": 31.83, "nodes": 206, "errors": 0, "source_hash": "1a1ca29c1f9a925dda27d72dea15716d9d91e3a65e500f3f4d07d9d8c1494e65", "categorized_nodes": 158}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SERIALIZATION_LIBRARY\n#define SERIALIZATION_LIBRARY\n\n#include \"std_include.h\"\n\n#include <boost/serialization/split_free.hpp>\n#include <boost/serialization/vector.hpp>\n\nusing namespace std;\nusing namespace cv;\n\nBOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n} // namespace boost\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 20, 25, 205], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 53, "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": "SERIALIZATION_LIBRARY", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define SERIALIZATION_LIBRARY\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": "SERIALIZATION_LIBRARY", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include \"std_include.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": "\"std_include.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include <boost/serialization/split_free.hpp>\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": "<boost/serialization/split_free.hpp>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 45}}, {"id": 12, "type": "preproc_include", "text": "#include <boost/serialization/vector.hpp>\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": "<boost/serialization/vector.hpp>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 41}}, {"id": 15, "type": "declaration", "text": "using namespace std;", "parent": 0, "children": [16, 17, 18], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 20}}, {"id": 16, "type": "type_identifier", "text": "using", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 5}}, {"id": 17, "type": "identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 15}}, {"id": 18, "type": "ERROR", "text": "std", "parent": 15, "children": [19], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 19, "type": "identifier", "text": "std", "parent": 18, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 20, "type": "declaration", "text": "using namespace cv;", "parent": 0, "children": [21, 22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 19}}, {"id": 21, "type": "type_identifier", "text": "using", "parent": 20, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 5}}, {"id": 22, "type": "identifier", "text": "namespace", "parent": 20, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 15}}, {"id": 23, "type": "ERROR", "text": "cv", "parent": 20, "children": [24], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 18}}, {"id": 24, "type": "identifier", "text": "cv", "parent": 23, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 18}}, {"id": 25, "type": "function_definition", "text": "BOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n}", "parent": 0, "children": [26, 30, 31], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 26, "type": "macro_type_specifier", "text": "BOOST_SERIALIZATION_SPLIT_FREE(Mat)", "parent": 25, "children": [27, 28], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 35}}, {"id": 27, "type": "identifier", "text": "BOOST_SERIALIZATION_SPLIT_FREE", "parent": 26, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 30}}, {"id": 28, "type": "type_descriptor", "text": "Mat", "parent": 26, "children": [29], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 34}}, {"id": 29, "type": "type_identifier", "text": "Mat", "parent": 28, "children": [], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 34}}, {"id": 30, "type": "identifier", "text": "namespace", "parent": 25, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 31, "type": "ERROR", "text": "boost", "parent": 25, "children": [32], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 15}}, {"id": 32, "type": "identifier", "text": "boost", "parent": 31, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 15}}, {"id": 33, "type": "function_definition", "text": "namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n }", "parent": 25, "children": [34, 35], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 50, "column": 5}}, {"id": 34, "type": "type_identifier", "text": "namespace", "parent": 33, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 13}}, {"id": 35, "type": "identifier", "text": "serialization", "parent": 33, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 27}}, {"id": 36, "type": "binary_expression", "text": "template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)", "parent": 33, "children": [37, 41, 42, 44], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 18, "column": 72}}, {"id": 37, "type": "binary_expression", "text": "template <class Archive", "parent": 36, "children": [38, 39, 40], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 31}}, {"id": 38, "type": "identifier", "text": "template", "parent": 37, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 16}}, {"id": 39, "type": "<", "text": "<", "parent": 37, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 18}}, {"id": 40, "type": "identifier", "text": "Archive", "parent": 37, "children": [], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 31}}, {"id": 41, "type": ">", "text": ">", "parent": 36, "children": [], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 32}}, {"id": 42, "type": "ERROR", "text": "void", "parent": 36, "children": [43], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 12}}, {"id": 43, "type": "identifier", "text": "void", "parent": 42, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 12}}, {"id": 44, "type": "call_expression", "text": "save(Archive &ar, const Mat &m, const unsigned int version)", "parent": 36, "children": [45, 46], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 72}}, {"id": 45, "type": "identifier", "text": "save", "parent": 44, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 17}}, {"id": 46, "type": "argument_list", "text": "(Archive &ar, const Mat &m, const unsigned int version)", "parent": 44, "children": [47, 50, 54, 57], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 72}}, {"id": 47, "type": "binary_expression", "text": "Archive &ar", "parent": 46, "children": [48, 49], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 29}}, {"id": 48, "type": "identifier", "text": "Archive", "parent": 47, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 25}}, {"id": 49, "type": "identifier", "text": "ar", "parent": 47, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 29}}, {"id": 50, "type": "binary_expression", "text": "const Mat &m", "parent": 46, "children": [51, 53], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 43}}, {"id": 51, "type": "ERROR", "text": "Mat", "parent": 50, "children": [52], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 40}}, {"id": 52, "type": "identifier", "text": "Mat", "parent": 51, "children": [], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 40}}, {"id": 53, "type": "identifier", "text": "m", "parent": 50, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 43}}, {"id": 54, "type": "ERROR", "text": "const unsigned int", "parent": 46, "children": [55, 56], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 63}}, {"id": 55, "type": "identifier", "text": "unsigned", "parent": 54, "children": [], "start_point": {"row": 18, "column": 51}, "end_point": {"row": 18, "column": 59}}, {"id": 56, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 18, "column": 60}, "end_point": {"row": 18, "column": 63}}, {"id": 57, "type": "identifier", "text": "version", "parent": 46, "children": [], "start_point": {"row": 18, "column": 64}, "end_point": {"row": 18, "column": 71}}, {"id": 58, "type": "declaration", "text": "size_t elem_size = m.elemSize();", "parent": 33, "children": [59, 60], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 44}}, {"id": 59, "type": "primitive_type", "text": "size_t", "parent": 58, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 18}}, {"id": 60, "type": "init_declarator", "text": "elem_size = m.elemSize()", "parent": 58, "children": [61, 62, 63], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 43}}, {"id": 61, "type": "identifier", "text": "elem_size", "parent": 60, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 28}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 20, "column": 29}, "end_point": {"row": 20, "column": 30}}, {"id": 63, "type": "call_expression", "text": "m.elemSize()", "parent": 60, "children": [64, 67], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 43}}, {"id": 64, "type": "field_expression", "text": "m.elemSize", "parent": 63, "children": [65, 66], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 41}}, {"id": 65, "type": "identifier", "text": "m", "parent": 64, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 32}}, {"id": 66, "type": "field_identifier", "text": "elemSize", "parent": 64, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 41}}, {"id": 67, "type": "argument_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 20, "column": 41}, "end_point": {"row": 20, "column": 43}}, {"id": 68, "type": "declaration", "text": "size_t elem_type = m.type();", "parent": 33, "children": [69, 70], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 40}}, {"id": 69, "type": "primitive_type", "text": "size_t", "parent": 68, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 18}}, {"id": 70, "type": "init_declarator", "text": "elem_type = m.type()", "parent": 68, "children": [71, 72, 73], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 39}}, {"id": 71, "type": "identifier", "text": "elem_type", "parent": 70, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 28}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 30}}, {"id": 73, "type": "call_expression", "text": "m.type()", "parent": 70, "children": [74, 77], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 39}}, {"id": 74, "type": "field_expression", "text": "m.type", "parent": 73, "children": [75, 76], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 37}}, {"id": 75, "type": "identifier", "text": "m", "parent": 74, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 32}}, {"id": 76, "type": "field_identifier", "text": "type", "parent": 74, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 37}}, {"id": 77, "type": "argument_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 39}}, {"id": 78, "type": "binary_expression", "text": "ar &m.cols", "parent": 33, "children": [79, 80], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 22}}, {"id": 79, "type": "identifier", "text": "ar", "parent": 78, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 14}}, {"id": 80, "type": "field_expression", "text": "m.cols", "parent": 78, "children": [81, 82], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 22}}, {"id": 81, "type": "identifier", "text": "m", "parent": 80, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 17}}, {"id": 82, "type": "field_identifier", "text": "cols", "parent": 80, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 22}}, {"id": 83, "type": "binary_expression", "text": "ar &m.rows", "parent": 33, "children": [84, 85], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 22}}, {"id": 84, "type": "identifier", "text": "ar", "parent": 83, "children": [], "start_point": {"row": 24, "column": 12}, "end_point": {"row": 24, "column": 14}}, {"id": 85, "type": "field_expression", "text": "m.rows", "parent": 83, "children": [86, 87], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 22}}, {"id": 86, "type": "identifier", "text": "m", "parent": 85, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 17}}, {"id": 87, "type": "field_identifier", "text": "rows", "parent": 85, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 22}}, {"id": 88, "type": "binary_expression", "text": "ar &elem_size", "parent": 33, "children": [89, 90], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 25}}, {"id": 89, "type": "identifier", "text": "ar", "parent": 88, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 14}}, {"id": 90, "type": "identifier", "text": "elem_size", "parent": 88, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 25}}, {"id": 91, "type": "binary_expression", "text": "ar &elem_type", "parent": 33, "children": [92, 93], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 25}}, {"id": 92, "type": "identifier", "text": "ar", "parent": 91, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 14}}, {"id": 93, "type": "identifier", "text": "elem_type", "parent": 91, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 25}}, {"id": 94, "type": "declaration", "text": "const size_t data_size = m.cols * m.rows * elem_size;", "parent": 33, "children": [95, 96], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 65}}, {"id": 95, "type": "primitive_type", "text": "size_t", "parent": 94, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 24}}, {"id": 96, "type": "init_declarator", "text": "data_size = m.cols * m.rows * elem_size", "parent": 94, "children": [97, 98, 99], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 64}}, {"id": 97, "type": "identifier", "text": "data_size", "parent": 96, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 34}}, {"id": 98, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 28, "column": 35}, "end_point": {"row": 28, "column": 36}}, {"id": 99, "type": "binary_expression", "text": "m.cols * m.rows * elem_size", "parent": 96, "children": [100, 108, 109], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 64}}, {"id": 100, "type": "binary_expression", "text": "m.cols * m.rows", "parent": 99, "children": [101, 104, 105], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 52}}, {"id": 101, "type": "field_expression", "text": "m.cols", "parent": 100, "children": [102, 103], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 43}}, {"id": 102, "type": "identifier", "text": "m", "parent": 101, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 38}}, {"id": 103, "type": "field_identifier", "text": "cols", "parent": 101, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 43}}, {"id": 104, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 45}}, {"id": 105, "type": "field_expression", "text": "m.rows", "parent": 100, "children": [106, 107], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 52}}, {"id": 106, "type": "identifier", "text": "m", "parent": 105, "children": [], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 47}}, {"id": 107, "type": "field_identifier", "text": "rows", "parent": 105, "children": [], "start_point": {"row": 28, "column": 48}, "end_point": {"row": 28, "column": 52}}, {"id": 108, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 28, "column": 53}, "end_point": {"row": 28, "column": 54}}, {"id": 109, "type": "identifier", "text": "elem_size", "parent": 99, "children": [], "start_point": {"row": 28, "column": 55}, "end_point": {"row": 28, "column": 64}}, {"id": 110, "type": "ERROR", "text": "ar &boost::", "parent": 33, "children": [111], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 23}}, {"id": 111, "type": "binary_expression", "text": "ar &boost", "parent": 110, "children": [112, 113], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 21}}, {"id": 112, "type": "identifier", "text": "ar", "parent": 111, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 14}}, {"id": 113, "type": "identifier", "text": "boost", "parent": 111, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 21}}, {"id": 114, "type": "labeled_statement", "text": "serialization::make_array(m.ptr(), data_size);", "parent": 33, "children": [115], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 69}}, {"id": 115, "type": "statement_identifier", "text": "serialization", "parent": 114, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 36}}, {"id": 116, "type": "call_expression", "text": "make_array(m.ptr(), data_size)", "parent": 114, "children": [117, 118], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 68}}, {"id": 117, "type": "identifier", "text": "make_array", "parent": 116, "children": [], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 48}}, {"id": 118, "type": "argument_list", "text": "(m.ptr(), data_size)", "parent": 116, "children": [119, 124], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 68}}, {"id": 119, "type": "call_expression", "text": "m.ptr()", "parent": 118, "children": [120, 123], "start_point": {"row": 29, "column": 49}, "end_point": {"row": 29, "column": 56}}, {"id": 120, "type": "field_expression", "text": "m.ptr", "parent": 119, "children": [121, 122], "start_point": {"row": 29, "column": 49}, "end_point": {"row": 29, "column": 54}}, {"id": 121, "type": "identifier", "text": "m", "parent": 120, "children": [], "start_point": {"row": 29, "column": 49}, "end_point": {"row": 29, "column": 50}}, {"id": 122, "type": "field_identifier", "text": "ptr", "parent": 120, "children": [], "start_point": {"row": 29, "column": 51}, "end_point": {"row": 29, "column": 54}}, {"id": 123, "type": "argument_list", "text": "()", "parent": 119, "children": [], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 56}}, {"id": 124, "type": "identifier", "text": "data_size", "parent": 118, "children": [], "start_point": {"row": 29, "column": 58}, "end_point": {"row": 29, "column": 67}}, {"id": 125, "type": "binary_expression", "text": "template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)", "parent": 33, "children": [126, 130, 131, 133], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 34, "column": 66}}, {"id": 126, "type": "binary_expression", "text": "template <class Archive", "parent": 125, "children": [127, 128, 129], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 31}}, {"id": 127, "type": "identifier", "text": "template", "parent": 126, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 16}}, {"id": 128, "type": "<", "text": "<", "parent": 126, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 18}}, {"id": 129, "type": "identifier", "text": "Archive", "parent": 126, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 31}}, {"id": 130, "type": ">", "text": ">", "parent": 125, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 32}}, {"id": 131, "type": "ERROR", "text": "void", "parent": 125, "children": [132], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 12}}, {"id": 132, "type": "identifier", "text": "void", "parent": 131, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 12}}, {"id": 133, "type": "call_expression", "text": "load(Archive &ar, Mat &m, const unsigned int version)", "parent": 125, "children": [134, 135], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 66}}, {"id": 134, "type": "identifier", "text": "load", "parent": 133, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 17}}, {"id": 135, "type": "argument_list", "text": "(Archive &ar, Mat &m, const unsigned int version)", "parent": 133, "children": [136, 139, 142, 145], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 66}}, {"id": 136, "type": "binary_expression", "text": "Archive &ar", "parent": 135, "children": [137, 138], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 29}}, {"id": 137, "type": "identifier", "text": "Archive", "parent": 136, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 25}}, {"id": 138, "type": "identifier", "text": "ar", "parent": 136, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 29}}, {"id": 139, "type": "binary_expression", "text": "Mat &m", "parent": 135, "children": [140, 141], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 37}}, {"id": 140, "type": "identifier", "text": "Mat", "parent": 139, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 34}}, {"id": 141, "type": "identifier", "text": "m", "parent": 139, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 37}}, {"id": 142, "type": "ERROR", "text": "const unsigned int", "parent": 135, "children": [143, 144], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 57}}, {"id": 143, "type": "identifier", "text": "unsigned", "parent": 142, "children": [], "start_point": {"row": 34, "column": 45}, "end_point": {"row": 34, "column": 53}}, {"id": 144, "type": "primitive_type", "text": "int", "parent": 142, "children": [], "start_point": {"row": 34, "column": 54}, "end_point": {"row": 34, "column": 57}}, {"id": 145, "type": "identifier", "text": "version", "parent": 135, "children": [], "start_point": {"row": 34, "column": 58}, "end_point": {"row": 34, "column": 65}}, {"id": 146, "type": "declaration", "text": "int cols, rows;", "parent": 33, "children": [147, 148, 149], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 27}}, {"id": 147, "type": "primitive_type", "text": "int", "parent": 146, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 15}}, {"id": 148, "type": "identifier", "text": "cols", "parent": 146, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 20}}, {"id": 149, "type": "identifier", "text": "rows", "parent": 146, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 26}}, {"id": 150, "type": "declaration", "text": "size_t elem_size, elem_type;", "parent": 33, "children": [151, 152, 153], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 40}}, {"id": 151, "type": "primitive_type", "text": "size_t", "parent": 150, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 18}}, {"id": 152, "type": "identifier", "text": "elem_size", "parent": 150, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 28}}, {"id": 153, "type": "identifier", "text": "elem_type", "parent": 150, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 39}}, {"id": 154, "type": "binary_expression", "text": "ar &cols", "parent": 33, "children": [155, 156], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 20}}, {"id": 155, "type": "identifier", "text": "ar", "parent": 154, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 14}}, {"id": 156, "type": "identifier", "text": "cols", "parent": 154, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 20}}, {"id": 157, "type": "binary_expression", "text": "ar &rows", "parent": 33, "children": [158, 159], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 20}}, {"id": 158, "type": "identifier", "text": "ar", "parent": 157, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 14}}, {"id": 159, "type": "identifier", "text": "rows", "parent": 157, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 20}}, {"id": 160, "type": "binary_expression", "text": "ar &elem_size", "parent": 33, "children": [161, 162], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 25}}, {"id": 161, "type": "identifier", "text": "ar", "parent": 160, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 14}}, {"id": 162, "type": "identifier", "text": "elem_size", "parent": 160, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 25}}, {"id": 163, "type": "binary_expression", "text": "ar &elem_type", "parent": 33, "children": [164, 165], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 25}}, {"id": 164, "type": "identifier", "text": "ar", "parent": 163, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 14}}, {"id": 165, "type": "identifier", "text": "elem_type", "parent": 163, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 25}}, {"id": 166, "type": "call_expression", "text": "m.create(rows, cols, elem_type)", "parent": 33, "children": [167, 170], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 43}}, {"id": 167, "type": "field_expression", "text": "m.create", "parent": 166, "children": [168, 169], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 20}}, {"id": 168, "type": "identifier", "text": "m", "parent": 167, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 13}}, {"id": 169, "type": "field_identifier", "text": "create", "parent": 167, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 20}}, {"id": 170, "type": "argument_list", "text": "(rows, cols, elem_type)", "parent": 166, "children": [171, 172, 173], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 43}}, {"id": 171, "type": "identifier", "text": "rows", "parent": 170, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 25}}, {"id": 172, "type": "identifier", "text": "cols", "parent": 170, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 31}}, {"id": 173, "type": "identifier", "text": "elem_type", "parent": 170, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 42}}, {"id": 174, "type": "declaration", "text": "size_t data_size = m.cols * m.rows * elem_size;", "parent": 33, "children": [175, 176], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 59}}, {"id": 175, "type": "primitive_type", "text": "size_t", "parent": 174, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 18}}, {"id": 176, "type": "init_declarator", "text": "data_size = m.cols * m.rows * elem_size", "parent": 174, "children": [177, 178, 179], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 58}}, {"id": 177, "type": "identifier", "text": "data_size", "parent": 176, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 28}}, {"id": 178, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 179, "type": "binary_expression", "text": "m.cols * m.rows * elem_size", "parent": 176, "children": [180, 188, 189], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 58}}, {"id": 180, "type": "binary_expression", "text": "m.cols * m.rows", "parent": 179, "children": [181, 184, 185], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 46}}, {"id": 181, "type": "field_expression", "text": "m.cols", "parent": 180, "children": [182, 183], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 37}}, {"id": 182, "type": "identifier", "text": "m", "parent": 181, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 32}}, {"id": 183, "type": "field_identifier", "text": "cols", "parent": 181, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 37}}, {"id": 184, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 39}}, {"id": 185, "type": "field_expression", "text": "m.rows", "parent": 180, "children": [186, 187], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 46}}, {"id": 186, "type": "identifier", "text": "m", "parent": 185, "children": [], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 41}}, {"id": 187, "type": "field_identifier", "text": "rows", "parent": 185, "children": [], "start_point": {"row": 46, "column": 42}, "end_point": {"row": 46, "column": 46}}, {"id": 188, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 46, "column": 47}, "end_point": {"row": 46, "column": 48}}, {"id": 189, "type": "identifier", "text": "elem_size", "parent": 179, "children": [], "start_point": {"row": 46, "column": 49}, "end_point": {"row": 46, "column": 58}}, {"id": 190, "type": "ERROR", "text": "ar &boost::", "parent": 33, "children": [191], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 23}}, {"id": 191, "type": "binary_expression", "text": "ar &boost", "parent": 190, "children": [192, 193], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 21}}, {"id": 192, "type": "identifier", "text": "ar", "parent": 191, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 14}}, {"id": 193, "type": "identifier", "text": "boost", "parent": 191, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 21}}, {"id": 194, "type": "labeled_statement", "text": "serialization::make_array(m.ptr(), data_size);", "parent": 33, "children": [195], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 69}}, {"id": 195, "type": "statement_identifier", "text": "serialization", "parent": 194, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 36}}, {"id": 196, "type": "call_expression", "text": "make_array(m.ptr(), data_size)", "parent": 194, "children": [197, 198], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 68}}, {"id": 197, "type": "identifier", "text": "make_array", "parent": 196, "children": [], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 48}}, {"id": 198, "type": "argument_list", "text": "(m.ptr(), data_size)", "parent": 196, "children": [199, 204], "start_point": {"row": 47, "column": 48}, "end_point": {"row": 47, "column": 68}}, {"id": 199, "type": "call_expression", "text": "m.ptr()", "parent": 198, "children": [200, 203], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 56}}, {"id": 200, "type": "field_expression", "text": "m.ptr", "parent": 199, "children": [201, 202], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 54}}, {"id": 201, "type": "identifier", "text": "m", "parent": 200, "children": [], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 50}}, {"id": 202, "type": "field_identifier", "text": "ptr", "parent": 200, "children": [], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 54}}, {"id": 203, "type": "argument_list", "text": "()", "parent": 199, "children": [], "start_point": {"row": 47, "column": 54}, "end_point": {"row": 47, "column": 56}}, {"id": 204, "type": "identifier", "text": "data_size", "parent": 198, "children": [], "start_point": {"row": 47, "column": 58}, "end_point": {"row": 47, "column": 67}}, {"id": 205, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 6}}]}, "node_categories": {"declarations": {"functions": [25, 33], "variables": [15, 20, 58, 68, 94, 146, 150, 174], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [36, 37, 44, 47, 50, 63, 64, 73, 74, 78, 80, 83, 85, 88, 91, 99, 100, 101, 105, 111, 116, 119, 120, 125, 126, 133, 136, 139, 154, 157, 160, 163, 166, 167, 179, 180, 181, 185, 191, 196, 199, 200], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 21, 22, 24, 26, 27, 29, 30, 32, 34, 35, 38, 40, 43, 45, 48, 49, 52, 53, 55, 57, 61, 65, 66, 71, 75, 76, 79, 81, 82, 84, 86, 87, 89, 90, 92, 93, 97, 102, 103, 106, 107, 109, 112, 113, 115, 117, 121, 122, 124, 127, 129, 132, 134, 137, 138, 140, 141, 143, 145, 148, 149, 152, 153, 155, 156, 158, 159, 161, 162, 164, 165, 168, 169, 171, 172, 173, 177, 182, 183, 186, 187, 189, 192, 193, 195, 197, 201, 202, 204, 205], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 25, "universal_type": "function", "name": "save", "text_snippet": "BOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** "}, {"node_id": 33, "universal_type": "function", "name": "save", "text_snippet": "namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <cla"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"std_include.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <boost/serialization/split_free.hpp>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <boost/serialization/vector.hpp>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef SERIALIZATION_LIBRARY\n#define SERIALIZATION_LIBRARY\n\n#include \"std_include.h\"\n\n#include <boost/serialization/split_free.hpp>\n#include <boost/serialization/vector.hpp>\n\nusing namespace std;\nusing namespace cv;\n\nBOOST_SERIALIZATION_SPLIT_FREE(Mat)\nnamespace boost\n{\n namespace serialization\n {\n /** Serialization support for cv::Mat */\n template <class Archive>\n void save(Archive &ar, const Mat &m, const unsigned int version)\n {\n size_t elem_size = m.elemSize();\n size_t elem_type = m.type();\n\n ar &m.cols;\n ar &m.rows;\n ar &elem_size;\n ar &elem_type;\n\n const size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n /** Serialization support for cv::Mat */\n template <class Archive>\n void load(Archive &ar, Mat &m, const unsigned int version)\n {\n int cols, rows;\n size_t elem_size, elem_type;\n\n ar &cols;\n ar &rows;\n ar &elem_size;\n ar &elem_type;\n\n m.create(rows, cols, elem_type);\n\n size_t data_size = m.cols * m.rows * elem_size;\n ar &boost::serialization::make_array(m.ptr(), data_size);\n }\n\n } // namespace serialization\n} // namespace boost\n\n#endif\n"}
287
c
// // SelectCountryView.h // Connect // // Created by MoHuilin on 2016/12/6. // Copyright © 2016年 Connect - P2P Encrypted Instant Message. All rights reserved. // #import <UIKit/UIKit.h> @interface SelectCountryView : UIControl @property(strong, nonatomic) UILabel *countryInfoLabel; + (instancetype)viewWithCountryName:(NSString *)countryName countryCode:(int)code; - (void)updateCountryInfoWithCountryName:(NSString *)countryName countryCode:(int)code; @end
34.69
13
(ERROR) "//\n// SelectCountryView.h\n// Connect\n//\n// Created by MoHuilin on 2016/12/6.\n// Copyright © 2016年 Connect - P2P Encrypted Instant Message. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface SelectCountryView : UIControl\n\n@property(strong, nonatomic) UILabel *countryInfoLabel;\n\n+ (instancetype)viewWithCountryName:(NSString *)countryName countryCode:(int)code;\n\n- (void)updateCountryInfoWithCountryName:(NSString *)countryName countryCode:(int)code;\n\n@end\n" (comment) "//" (comment) "// SelectCountryView.h" (comment) "// Connect" (comment) "//" (comment) "// Created by MoHuilin on 2016/12/6." (comment) "// Copyright © 2016年 Connect - P2P Encrypted Instant Message. 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 SelectCountryView : UIControl\n\n@property(strong, nonatomic) UILabel *countryInfoLabel;\n\n+ (instancetype)viewWithCountryName:(NSS" (ERROR) "t" (type_identifier) "erface Se" (ERROR) "ectCountryView : UIControl\n\n@pro" (identifier) "ectCountryView : " (:) "I" (identifier) "ontrol\n\n@" (ERROR) "o" (function_declarator) "perty(strong, nonatomic) UI" (identifier) "perty(st" (parameter_list) "rong, nonatomic) UI" (() "r" (identifier) "ong, n" (,) "o" (identifier) "atomic) U" ()) "I" (declaration) "abel *countryInfoLabel;\n\n+" (type_identifier) "abel *c" (pointer_declarator) "untryInfoLabel;\n\n" (*) "u" (identifier) "ntryInfoLabel;\n\n" (;) "+" (unary_expression) "instancetype)viewWithCountryName:(N" (+) "i" (cast_expression) "stancetype)viewWithCountryName:(N" (() "s" (type_descriptor) "tancetype)vi" (type_identifier) "tancetype)vi" ()) "e" (identifier) "wWithCountryName:(N" (:) "S" (() "S" (binary_expression) "tring *)countryName co" (identifier) "tring *)" (*) "o" (ERROR) "u" ()) "u" (identifier) "ntryName co" (identifier) "ntryCode:(i" (:) "n" (() "t" (primitive_type) ")co" ()) "d" (identifier) "e;\n\n" (;) "-" (-) "v" (() "i" (primitive_type) "d)up" ()) "d" (identifier) "ateCountryInfoWithCountryName:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "o" ()) "u" (identifier) "ntryName co" (identifier) "ntryCode:(i" (:) "n" (() "t" (primitive_type) ")co" ()) "d" (identifier) "e;\n\n" (;) "@" (ERROR) "d" (identifier) "\n"
76
7
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 34.69, "nodes": 46, "errors": 0, "source_hash": "a248959b06aef9d7960ed55dbdbbce39ba2ec657e37157d60511e2f5eea0c4a9", "categorized_nodes": 26}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "//\n// SelectCountryView.h\n// Connect\n//\n// Created by MoHuilin on 2016/12/6.\n// Copyright \u00a9 2016\u5e74 Connect - P2P Encrypted Instant Message. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface SelectCountryView : UIControl\n\n@property(strong, nonatomic) UILabel *countryInfoLabel;\n\n+ (instancetype)viewWithCountryName:(NSString *)countryName countryCode:(int)code;\n\n- (void)updateCountryInfoWithCountryName:(NSString *)countryName countryCode:(int)code;\n\n@end\n", "parent": null, "children": [1, 4, 27, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "port <UIKit/UIKit.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 <U", "parent": 1, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "Kit/UIKit.h>\n\n@", "parent": 1, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 4, "type": "ERROR", "text": "terface SelectCountryView : UIControl\n\n@property(strong, nonatomic) UILabel *countryInfoLabel;\n\n+ (instancetype)viewWithCountryName:(NSS", "parent": 0, "children": [5, 6, 7, 11, 16, 21], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 14, "column": 37}}, {"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 Se", "parent": 4, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "ERROR", "text": "ectCountryView : UIControl\n\n@pro", "parent": 4, "children": [8, 9, 10], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 12, "column": 1}}, {"id": 8, "type": "identifier", "text": "ectCountryView : ", "parent": 7, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 28}}, {"id": 9, "type": "identifier", "text": "ontrol\n\n@", "parent": 7, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 40}}, {"id": 10, "type": "ERROR", "text": "o", "parent": 7, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 11, "type": "function_declarator", "text": "perty(strong, nonatomic) UI", "parent": 4, "children": [12, 13], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 28}}, {"id": 12, "type": "identifier", "text": "perty(st", "parent": 11, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 13, "type": "parameter_list", "text": "rong, nonatomic) UI", "parent": 11, "children": [14, 15], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 28}}, {"id": 14, "type": "identifier", "text": "ong, n", "parent": 13, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 16}}, {"id": 15, "type": "identifier", "text": "atomic) U", "parent": 13, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 27}}, {"id": 16, "type": "declaration", "text": "abel *countryInfoLabel;\n\n+", "parent": 4, "children": [17, 18], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 55}}, {"id": 17, "type": "type_identifier", "text": "abel *c", "parent": 16, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 36}}, {"id": 18, "type": "pointer_declarator", "text": "untryInfoLabel;\n\n", "parent": 16, "children": [19, 20], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 54}}, {"id": 19, "type": "*", "text": "u", "parent": 18, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 38}}, {"id": 20, "type": "identifier", "text": "ntryInfoLabel;\n\n", "parent": 18, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 54}}, {"id": 21, "type": "unary_expression", "text": "instancetype)viewWithCountryName:(N", "parent": 4, "children": [22, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 35}}, {"id": 22, "type": "+", "text": "i", "parent": 21, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 23, "type": "cast_expression", "text": "stancetype)viewWithCountryName:(N", "parent": 21, "children": [24, 26], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 35}}, {"id": 24, "type": "type_descriptor", "text": "tancetype)vi", "parent": 23, "children": [25], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 15}}, {"id": 25, "type": "type_identifier", "text": "tancetype)vi", "parent": 24, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 15}}, {"id": 26, "type": "identifier", "text": "wWithCountryName:(N", "parent": 23, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 35}}, {"id": 27, "type": "binary_expression", "text": "tring *)countryName co", "parent": 0, "children": [28, 29, 30, 31], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 59}}, {"id": 28, "type": "identifier", "text": "tring *)", "parent": 27, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 45}}, {"id": 29, "type": "*", "text": "o", "parent": 27, "children": [], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 47}}, {"id": 30, "type": "ERROR", "text": "u", "parent": 27, "children": [], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 48}}, {"id": 31, "type": "identifier", "text": "ntryName co", "parent": 27, "children": [], "start_point": {"row": 14, "column": 48}, "end_point": {"row": 14, "column": 59}}, {"id": 32, "type": "identifier", "text": "ntryCode:(i", "parent": 0, "children": [], "start_point": {"row": 14, "column": 60}, "end_point": {"row": 14, "column": 71}}, {"id": 33, "type": "primitive_type", "text": ")co", "parent": 0, "children": [], "start_point": {"row": 14, "column": 73}, "end_point": {"row": 14, "column": 76}}, {"id": 34, "type": "identifier", "text": "e;\n\n", "parent": 0, "children": [], "start_point": {"row": 14, "column": 77}, "end_point": {"row": 14, "column": 81}}, {"id": 35, "type": "-", "text": "v", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 36, "type": "primitive_type", "text": "d)up", "parent": 0, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 7}}, {"id": 37, "type": "identifier", "text": "ateCountryInfoWithCountryName:(N", "parent": 0, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 40}}, {"id": 38, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 50}}, {"id": 39, "type": "*", "text": "o", "parent": 0, "children": [], "start_point": {"row": 16, "column": 51}, "end_point": {"row": 16, "column": 52}}, {"id": 40, "type": "identifier", "text": "ntryName co", "parent": 0, "children": [], "start_point": {"row": 16, "column": 53}, "end_point": {"row": 16, "column": 64}}, {"id": 41, "type": "identifier", "text": "ntryCode:(i", "parent": 0, "children": [], "start_point": {"row": 16, "column": 65}, "end_point": {"row": 16, "column": 76}}, {"id": 42, "type": "primitive_type", "text": ")co", "parent": 0, "children": [], "start_point": {"row": 16, "column": 78}, "end_point": {"row": 16, "column": 81}}, {"id": 43, "type": "identifier", "text": "e;\n\n", "parent": 0, "children": [], "start_point": {"row": 16, "column": 82}, "end_point": {"row": 16, "column": 86}}, {"id": 44, "type": "ERROR", "text": "d", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 45, "type": "identifier", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 4}}]}, "node_categories": {"declarations": {"functions": [11], "variables": [16], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [21, 23, 27], "assignments": [], "loops": [], "conditionals": [6, 8, 9, 12, 14, 15, 17, 20, 25, 26, 28, 31, 32, 34, 37, 38, 40, 41, 43, 45], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "perty(strong, nonatomic) UI"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// SelectCountryView.h\n// Connect\n//\n// Created by MoHuilin on 2016/12/6.\n// Copyright \u00a9 2016\u5e74 Connect - P2P Encrypted Instant Message. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface SelectCountryView : UIControl\n\n@property(strong, nonatomic) UILabel *countryInfoLabel;\n\n+ (instancetype)viewWithCountryName:(NSString *)countryName countryCode:(int)code;\n\n- (void)updateCountryInfoWithCountryName:(NSString *)countryName countryCode:(int)code;\n\n@end\n"}
288
c
// // ShowShareView.h // wecoo // // Created by 屈小波 on 2016/11/21. // Copyright © 2016年 屈小波. All rights reserved. // #import <UIKit/UIKit.h> @interface ShowShareView : UIView @property (nonatomic, strong) UIView *bgclickview; @property (nonatomic, strong) UIImageView *wechatImageView; @property (nonatomic, strong) UILabel *wechatLabel; @property (nonatomic, strong) UIImageView *lineImageView; @property (nonatomic,strong) UIView *cancelView; @property (nonatomic,strong) UILabel *cancelLabel; @property (nonatomic,strong) NSString *sharefrom; -(void)showView; @end
29.37
19
(translation_unit) "//\n// ShowShareView.h\n// wecoo\n//\n// Created by 屈小波 on 2016/11/21.\n// Copyright © 2016年 屈小波. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ShowShareView : UIView\n@property (nonatomic, strong) UIView *bgclickview;\n@property (nonatomic, strong) UIImageView *wechatImageView;\n@property (nonatomic, strong) UILabel *wechatLabel;\n@property (nonatomic, strong) UIImageView *lineImageView;\n@property (nonatomic,strong) UIView *cancelView;\n@property (nonatomic,strong) UILabel *cancelLabel;\n\n\n@property (nonatomic,strong) NSString *sharefrom;\n-(void)showView;\n@end\n" (comment) "//" (comment) "// ShowShareView.h" (comment) "// wecoo" (comment) "//" (comment) "// Created by 屈小波 on 2016/11/21.\n// C" (comment) "pyright © 2016年 屈小波. All rights reserved.\n//\n\n#import <U" (comment) "Ki" (preproc_call) "UIKit.h>\n\n@interface Sho" (preproc_directive) "UIKit.h" (preproc_arg) "\n\n@interface Sh" (ERROR) "ShareView : UIView\n@property (nonatomic, strong) UIView *bgclickview;\n@property (nonatomic, strong) UIImageView *wechatImageView;\n@property (nonatomic, strong) UILabel *wechatLabel;\n@property (nonatomic, strong) UIImageView *lineImageView;\n@property (nonatomic,strong) UIView *cancelView;\n@property (nonatomic,strong) UILabel *cancelLabel;\n\n\n@property (nonatomic,strong) NSString *sharefrom;\n-(void)showView;\n@end\n" (ERROR) "S" (type_identifier) "hareView " (function_declarator) " UIView\n@property (nonatomic, strong) UIView *bgcli" (identifier) " UIView\n@prop" (ERROR) "rty (nonatomic, st" (:) "r" (identifier) "y (non" (ERROR) "t" (identifier) "omic, st" (parameter_list) "ong) UIView *bgcli" (() "o" (identifier) "ng) UIVie" (,) "w" (identifier) " *bgcl" ()) "i" (declaration) "kview;\n@property (non" (type_identifier) "kview;" (pointer_declarator) "property (no" (*) "p" (identifier) "roperty (no" (;) "n" (ERROR) "t" (ERROR) "t" (declaration) "omic, strong) UIImageView *wechatImageView;\n@property (non" (macro_type_specifier) "omic, strong) UIImageView *" (identifier) "omic, st" (() "o" (type_descriptor) "ng) UIIma" (type_identifier) "ng) UIIma" (ERROR) "geView " (,) "g" (identifier) "View " ()) "*" (ERROR) "echatImageV" (identifier) "echatImageV" (pointer_declarator) "w;\n@property (no" (*) "w" (identifier) ";\n@property (no" (;) "n" (ERROR) "t" (ERROR) "t" (declaration) "omic, strong) UILabel *wechatLabel;\n@property (non" (macro_type_specifier) "omic, strong) UILabel *wech" (identifier) "omic, st" (() "o" (type_descriptor) "ng) UILab" (type_identifier) "ng) UILab" (ERROR) "el *wec" (,) "e" (identifier) " *wec" ()) "h" (ERROR) "tLabel;" (identifier) "tLabel;" (pointer_declarator) "property (no" (*) "p" (identifier) "roperty (no" (;) "n" (ERROR) "t" (ERROR) "t" (declaration) "omic, strong) UIImageView *lineImageView;\n@property (non" (macro_type_specifier) "omic, strong) UIImageView *" (identifier) "omic, st" (() "o" (type_descriptor) "ng) UIIma" (type_identifier) "ng) UIIma" (ERROR) "geView " (,) "g" (identifier) "View " ()) "*" (ERROR) "ineImageVie" (identifier) "ineImageVie" (pointer_declarator) "\n@property (no" (*) "\n" (identifier) "@property (no" (;) "n" (ERROR) "t" (ERROR) "t" (declaration) "omic,strong) UIView *cancelView;\n@property (non" (macro_type_specifier) "omic,strong) UIView *cancel" (identifier) "omic,str" (() "n" (type_descriptor) "g) UIView" (type_identifier) "g) UIView" (ERROR) " *cance" (,) " " (identifier) "*cance" ()) "l" (ERROR) "iew;\n@" (identifier) "iew;\n@" (pointer_declarator) "roperty (no" (*) "r" (identifier) "operty (no" (;) "n" (ERROR) "t" (ERROR) "t" (declaration) "omic,strong) UILabel *cancelLabel;\n\n\n@property (n" (macro_type_specifier) "omic,strong) UILabel *cance" (identifier) "omic,str" (() "n" (type_descriptor) "g) UILabe" (type_identifier) "g) UILabe" (ERROR) "l *canc" (,) "l" (identifier) " *canc" ()) "e" (ERROR) "Label;\n" (identifier) "Label;\n" (pointer_declarator) "\n@property (" (*) "\n" (identifier) "@property (" (;) "n" (ERROR) "t" (ERROR) "t" (declaration) "omic,strong) NSString *sharefrom;\n-(void)showVie" (macro_type_specifier) "omic,strong) NSString *shar" (identifier) "omic,str" (() "n" (type_descriptor) "g) NSStri" (type_identifier) "g) NSStri" (ERROR) "ng *sha" (,) "n" (identifier) "g *sha" ()) "r" (ERROR) "from;\n-(" (identifier) "from;\n-(" (pointer_declarator) "oid)showVi" (*) "o" (identifier) "id)showVi" (;) "e" (ERROR) ";\n" (-) ";" (() "\n" (declaration) "@end\n" (primitive_type) "@end" (ERROR) "\n" ()) "\n" (identifier) "" (;) "" (ERROR) "" (ERROR) "" (identifier) ""
153
32
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 29.37, "nodes": 111, "errors": 0, "source_hash": "1150bfedae3574d41ad71ac476d6bab84a2da482d4181cfaae5d8ff72f36beb2", "categorized_nodes": 56}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "UIKit.h>\n\n@interface Sho", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "UIKit.h", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\n\n@interface Sh", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "ShareView : UIView\n@property (nonatomic, strong) UIView *bgclickview;\n@property (nonatomic, strong) UIImageView *wechatImageView;\n@property (nonatomic, strong) UILabel *wechatLabel;\n@property (nonatomic, strong) UIImageView *lineImageView;\n@property (nonatomic,strong) UIView *cancelView;\n@property (nonatomic,strong) UILabel *cancelLabel;\n\n\n@property (nonatomic,strong) NSString *sharefrom;\n-(void)showView;\n@end\n", "parent": null, "children": [4, 5, 6, 15, 20, 22, 34, 36, 48, 50, 62, 64, 76, 78, 90, 92, 104, 108, 110], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 21, "column": 4}}, {"id": 4, "type": "ERROR", "text": "S", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "hareView ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "function_declarator", "text": " UIView\n@property (nonatomic, strong) UIView *bgcli", "parent": 3, "children": [7, 8, 12], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 11, "column": 29}}, {"id": 7, "type": "identifier", "text": " UIView\n@prop", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 24}}, {"id": 8, "type": "ERROR", "text": "rty (nonatomic, st", "parent": 6, "children": [9, 10, 11], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 11, "column": 9}}, {"id": 9, "type": "identifier", "text": "y (non", "parent": 8, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 33}}, {"id": 10, "type": "ERROR", "text": "t", "parent": 8, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 11, "type": "identifier", "text": "omic, st", "parent": 8, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 12, "type": "parameter_list", "text": "ong) UIView *bgcli", "parent": 6, "children": [13, 14], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 29}}, {"id": 13, "type": "identifier", "text": "ng) UIVie", "parent": 12, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 20}}, {"id": 14, "type": "identifier", "text": " *bgcl", "parent": 12, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 28}}, {"id": 15, "type": "declaration", "text": "kview;\n@property (non", "parent": 3, "children": [16, 17], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 51}}, {"id": 16, "type": "type_identifier", "text": "kview;", "parent": 15, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 36}}, {"id": 17, "type": "pointer_declarator", "text": "property (no", "parent": 15, "children": [18, 19], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 50}}, {"id": 18, "type": "*", "text": "p", "parent": 17, "children": [], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 39}}, {"id": 19, "type": "identifier", "text": "roperty (no", "parent": 17, "children": [], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 50}}, {"id": 20, "type": "ERROR", "text": "t", "parent": 3, "children": [21], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 21, "type": "ERROR", "text": "t", "parent": 20, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 22, "type": "declaration", "text": "omic, strong) UIImageView *wechatImageView;\n@property (non", "parent": 3, "children": [23, 29, 31], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 60}}, {"id": 23, "type": "macro_type_specifier", "text": "omic, strong) UIImageView *", "parent": 22, "children": [24, 25, 27], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 29}}, {"id": 24, "type": "identifier", "text": "omic, st", "parent": 23, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 25, "type": "type_descriptor", "text": "ng) UIIma", "parent": 23, "children": [26], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 20}}, {"id": 26, "type": "type_identifier", "text": "ng) UIIma", "parent": 25, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 20}}, {"id": 27, "type": "ERROR", "text": "geView ", "parent": 23, "children": [28], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 28}}, {"id": 28, "type": "identifier", "text": "View ", "parent": 27, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 28}}, {"id": 29, "type": "ERROR", "text": "echatImageV", "parent": 22, "children": [30], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 41}}, {"id": 30, "type": "identifier", "text": "echatImageV", "parent": 29, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 41}}, {"id": 31, "type": "pointer_declarator", "text": "w;\n@property (no", "parent": 22, "children": [32, 33], "start_point": {"row": 12, "column": 43}, "end_point": {"row": 12, "column": 59}}, {"id": 32, "type": "*", "text": "w", "parent": 31, "children": [], "start_point": {"row": 12, "column": 43}, "end_point": {"row": 12, "column": 44}}, {"id": 33, "type": "identifier", "text": ";\n@property (no", "parent": 31, "children": [], "start_point": {"row": 12, "column": 44}, "end_point": {"row": 12, "column": 59}}, {"id": 34, "type": "ERROR", "text": "t", "parent": 3, "children": [35], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 35, "type": "ERROR", "text": "t", "parent": 34, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 36, "type": "declaration", "text": "omic, strong) UILabel *wechatLabel;\n@property (non", "parent": 3, "children": [37, 43, 45], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 52}}, {"id": 37, "type": "macro_type_specifier", "text": "omic, strong) UILabel *wech", "parent": 36, "children": [38, 39, 41], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 29}}, {"id": 38, "type": "identifier", "text": "omic, st", "parent": 37, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 39, "type": "type_descriptor", "text": "ng) UILab", "parent": 37, "children": [40], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 40, "type": "type_identifier", "text": "ng) UILab", "parent": 39, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 41, "type": "ERROR", "text": "el *wec", "parent": 37, "children": [42], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 28}}, {"id": 42, "type": "identifier", "text": " *wec", "parent": 41, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 28}}, {"id": 43, "type": "ERROR", "text": "tLabel;", "parent": 36, "children": [44], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 37}}, {"id": 44, "type": "identifier", "text": "tLabel;", "parent": 43, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 37}}, {"id": 45, "type": "pointer_declarator", "text": "property (no", "parent": 36, "children": [46, 47], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 51}}, {"id": 46, "type": "*", "text": "p", "parent": 45, "children": [], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 40}}, {"id": 47, "type": "identifier", "text": "roperty (no", "parent": 45, "children": [], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 51}}, {"id": 48, "type": "ERROR", "text": "t", "parent": 3, "children": [49], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 49, "type": "ERROR", "text": "t", "parent": 48, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 50, "type": "declaration", "text": "omic, strong) UIImageView *lineImageView;\n@property (non", "parent": 3, "children": [51, 57, 59], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 58}}, {"id": 51, "type": "macro_type_specifier", "text": "omic, strong) UIImageView *", "parent": 50, "children": [52, 53, 55], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 29}}, {"id": 52, "type": "identifier", "text": "omic, st", "parent": 51, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 53, "type": "type_descriptor", "text": "ng) UIIma", "parent": 51, "children": [54], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 54, "type": "type_identifier", "text": "ng) UIIma", "parent": 53, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 55, "type": "ERROR", "text": "geView ", "parent": 51, "children": [56], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 28}}, {"id": 56, "type": "identifier", "text": "View ", "parent": 55, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 28}}, {"id": 57, "type": "ERROR", "text": "ineImageVie", "parent": 50, "children": [58], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 41}}, {"id": 58, "type": "identifier", "text": "ineImageVie", "parent": 57, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 41}}, {"id": 59, "type": "pointer_declarator", "text": "\n@property (no", "parent": 50, "children": [60, 61], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 57}}, {"id": 60, "type": "*", "text": "\n", "parent": 59, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 44}}, {"id": 61, "type": "identifier", "text": "@property (no", "parent": 59, "children": [], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 57}}, {"id": 62, "type": "ERROR", "text": "t", "parent": 3, "children": [63], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 63, "type": "ERROR", "text": "t", "parent": 62, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 64, "type": "declaration", "text": "omic,strong) UIView *cancelView;\n@property (non", "parent": 3, "children": [65, 71, 73], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 48}}, {"id": 65, "type": "macro_type_specifier", "text": "omic,strong) UIView *cancel", "parent": 64, "children": [66, 67, 69], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 28}}, {"id": 66, "type": "identifier", "text": "omic,str", "parent": 65, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 67, "type": "type_descriptor", "text": "g) UIView", "parent": 65, "children": [68], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 68, "type": "type_identifier", "text": "g) UIView", "parent": 67, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 69, "type": "ERROR", "text": " *cance", "parent": 65, "children": [70], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 27}}, {"id": 70, "type": "identifier", "text": "*cance", "parent": 69, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 27}}, {"id": 71, "type": "ERROR", "text": "iew;\n@", "parent": 64, "children": [72], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 35}}, {"id": 72, "type": "identifier", "text": "iew;\n@", "parent": 71, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 35}}, {"id": 73, "type": "pointer_declarator", "text": "roperty (no", "parent": 64, "children": [74, 75], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 47}}, {"id": 74, "type": "*", "text": "r", "parent": 73, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 37}}, {"id": 75, "type": "identifier", "text": "operty (no", "parent": 73, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 47}}, {"id": 76, "type": "ERROR", "text": "t", "parent": 3, "children": [77], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 77, "type": "ERROR", "text": "t", "parent": 76, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 78, "type": "declaration", "text": "omic,strong) UILabel *cancelLabel;\n\n\n@property (n", "parent": 3, "children": [79, 85, 87], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 50}}, {"id": 79, "type": "macro_type_specifier", "text": "omic,strong) UILabel *cance", "parent": 78, "children": [80, 81, 83], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 28}}, {"id": 80, "type": "identifier", "text": "omic,str", "parent": 79, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 81, "type": "type_descriptor", "text": "g) UILabe", "parent": 79, "children": [82], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 82, "type": "type_identifier", "text": "g) UILabe", "parent": 81, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 83, "type": "ERROR", "text": "l *canc", "parent": 79, "children": [84], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 27}}, {"id": 84, "type": "identifier", "text": " *canc", "parent": 83, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 27}}, {"id": 85, "type": "ERROR", "text": "Label;\n", "parent": 78, "children": [86], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 36}}, {"id": 86, "type": "identifier", "text": "Label;\n", "parent": 85, "children": [], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 36}}, {"id": 87, "type": "pointer_declarator", "text": "\n@property (", "parent": 78, "children": [88, 89], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 49}}, {"id": 88, "type": "*", "text": "\n", "parent": 87, "children": [], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 38}}, {"id": 89, "type": "identifier", "text": "@property (", "parent": 87, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 49}}, {"id": 90, "type": "ERROR", "text": "t", "parent": 3, "children": [91], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 91, "type": "ERROR", "text": "t", "parent": 90, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 92, "type": "declaration", "text": "omic,strong) NSString *sharefrom;\n-(void)showVie", "parent": 3, "children": [93, 99, 101], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 49}}, {"id": 93, "type": "macro_type_specifier", "text": "omic,strong) NSString *shar", "parent": 92, "children": [94, 95, 97], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 28}}, {"id": 94, "type": "identifier", "text": "omic,str", "parent": 93, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 95, "type": "type_descriptor", "text": "g) NSStri", "parent": 93, "children": [96], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 96, "type": "type_identifier", "text": "g) NSStri", "parent": 95, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 97, "type": "ERROR", "text": "ng *sha", "parent": 93, "children": [98], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 27}}, {"id": 98, "type": "identifier", "text": "g *sha", "parent": 97, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 27}}, {"id": 99, "type": "ERROR", "text": "from;\n-(", "parent": 92, "children": [100], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 37}}, {"id": 100, "type": "identifier", "text": "from;\n-(", "parent": 99, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 37}}, {"id": 101, "type": "pointer_declarator", "text": "oid)showVi", "parent": 92, "children": [102, 103], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 48}}, {"id": 102, "type": "*", "text": "o", "parent": 101, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 39}}, {"id": 103, "type": "identifier", "text": "id)showVi", "parent": 101, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 48}}, {"id": 104, "type": "declaration", "text": "@end\n", "parent": 3, "children": [105, 106, 107], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 16}}, {"id": 105, "type": "primitive_type", "text": "@end", "parent": 104, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 106, "type": "ERROR", "text": "\n", "parent": 104, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 7}}, {"id": 107, "type": "identifier", "text": "", "parent": 104, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 15}}, {"id": 108, "type": "ERROR", "text": "", "parent": 3, "children": [109], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 109, "type": "ERROR", "text": "", "parent": 108, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 110, "type": "identifier", "text": "", "parent": 3, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 4}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [15, 22, 36, 50, 64, 78, 92, 104], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 11, 13, 14, 16, 19, 23, 24, 26, 28, 30, 33, 37, 38, 40, 42, 44, 47, 51, 52, 54, 56, 58, 61, 65, 66, 68, 70, 72, 75, 79, 80, 82, 84, 86, 89, 93, 94, 96, 98, 100, 103, 107, 110], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": " UIView\n@property (nonatomic, strong) UIView *bgcli"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// ShowShareView.h\n// wecoo\n//\n// Created by \u5c48\u5c0f\u6ce2 on 2016/11/21.\n// Copyright \u00a9 2016\u5e74 \u5c48\u5c0f\u6ce2. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface ShowShareView : UIView\n@property (nonatomic, strong) UIView *bgclickview;\n@property (nonatomic, strong) UIImageView *wechatImageView;\n@property (nonatomic, strong) UILabel *wechatLabel;\n@property (nonatomic, strong) UIImageView *lineImageView;\n@property (nonatomic,strong) UIView *cancelView;\n@property (nonatomic,strong) UILabel *cancelLabel;\n\n\n@property (nonatomic,strong) NSString *sharefrom;\n-(void)showView;\n@end\n"}
289
c
/* Copyright (C) 2016 <NAME>. All Rights Reserved. * Written by <NAME> (<EMAIL>) This file is part of Kung Foo Barracuda. Kung Foo Barracuda 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. Kung Foo Barracuda 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 Kung Foo Barracuda. If not, see <http://www.gnu.org/licenses/>. */ #pragma once //#include <boost/noncopyable.hpp> #include <sstream> #include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/ptree.hpp> #include <DescentEngine/src/PropertyTreeSupport.h> #include <DescentEngine/src/EntityEngine/EntityFactory.h> #include <DescentEngine/src/XmlTools.h> #include <DescentEngine/src/Engines.h> //#include <DescentLogic/src/GameState.h> #include <DescentLogic/src/Entities/WallEntity.h> #include <DescentLogic/src/Entities/WallCollisionEntity.h> #include <DescentLogic/src/Entities/FloorEntity.h> #include "Exceptions/LevelParsingException.h" #include <DescentLogic/src/Game/GameState.h> #include <DescentLogic/src/Game/Util/SafePlacement.h> //class GameState; struct LevelTile { LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type, std::string const& ent, bool collideOnJump) : Center(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) { } Vector2 Center; Vector2 Repeat; bool Collides; bool CollidesOnJump; std::string Type; std::string Entity; }; typedef std::string LevelConnection; /* struct LevelConnection { };*/ struct LevelFragment { std::vector<LevelTile> Tiles; Vector2 Size; std::string Name; std::vector<LevelConnection> ConnectionsIn; std::vector<LevelConnection> ConnectionsOut; }; class LevelLoader { public: void loadFragment(std::string const& json, LevelFragment & frag); template<class TGameState, class TEntFactory> void applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0) { for (auto const& tile : frag.Tiles) { for (int repX = 0; repX < tile.Repeat.x(); repX++) { for (int repY = 0; repY < tile.Repeat.y(); repY++) { //entFactory uniq<Entity> ent = nullptr; EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate( tile.Entity); const Rectangle2 entSize = entTemplate.VisualSize; const Rectangle2 boundSize = entTemplate.BoundingBox; const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY); if (tile.Type == "WallEntity") { ent = fact.template createFromTemplateName<WallEntity>(tile.Entity, tile.Center + offset); } if (tile.Type == "FloorEntity") { ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity, tile.Center + offset); } if (ent != nullptr) { gs.addStaticEntity(std::move(ent)); // create blocking ? if (tile.Collides == 1) { // todo : give correct angle here auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset, boundSize, LayerPriorityBottom, tile.CollidesOnJump); if (!tile.CollidesOnJump) { col->setCollisionGroup(GameCollisionGroups::StaticsJumpable); col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith); } gs.addStaticEntity(std::move(col)); } } else { logging::Fatal() << "Unknown entity type: " << tile.Type; } } } } } }; typedef std::vector<std::string> LevelFragmentsName; class LevelFactory: boost::noncopyable { public: LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) : m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0) { LevelLoader loader; for (std::string const & fr : fragments) { LevelFragment frag; frag.Name = fr; const std::string xmlInp = re.loadLevel(fr); try { loader.loadFragment(xmlInp, frag); } catch (LevelParsingException & ex) { logging::Error() << "Level " << fr << " can not be parsed"; } m_fragments.push_back(frag); } } void loadFragment(GameState & gs, std::string const& fragName); void nextLayers(GameState & gs, unsigned int amount); bool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const; void collisionTestLevel(GameState & gs); void renderTestLevel(GameState & gs); void reset(); template<class TEnemy> void addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius, LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact) { const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y())) + thisLayer; const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x())); const Vector2 idealPosition(locX, locY); // really ugly, but know of no other way right now //Vector2 bndBox = DefaultFighterBoundingBox; // bndBox.getRadius(); std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition, enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs); if (bestPlacement.first) { auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second); gs.addEnemyEntity(std::move(entEnemy)); } else { logging::Info() << "no valid placement found for enemy"; } } private: Engines m_engines; EntityFactory m_fact; LevelFragment const* m_lastFragment; std::vector<LevelFragment> m_fragments; unsigned int m_currentLayer; };
38.58
149
(translation_unit) "/*\nCopyright (C) 2016 <NAME>. All Rights Reserved.\n* Written by <NAME> (<EMAIL>)\n\nThis file is part of Kung Foo Barracuda.\n\nKung Foo Barracuda 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\nKung Foo Barracuda 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 Kung Foo Barracuda. If not, see <http://www.gnu.org/licenses/>.\n*/\n\n#pragma once\n\n//#include <boost/noncopyable.hpp>\n\n#include <sstream>\n\n#include <boost/property_tree/json_parser.hpp>\n#include <boost/property_tree/ptree.hpp>\n\n#include <DescentEngine/src/PropertyTreeSupport.h>\n#include <DescentEngine/src/EntityEngine/EntityFactory.h>\n#include <DescentEngine/src/XmlTools.h>\n\n#include <DescentEngine/src/Engines.h>\n//#include <DescentLogic/src/GameState.h>\n#include <DescentLogic/src/Entities/WallEntity.h>\n#include <DescentLogic/src/Entities/WallCollisionEntity.h>\n#include <DescentLogic/src/Entities/FloorEntity.h>\n\n#include "Exceptions/LevelParsingException.h"\n#include <DescentLogic/src/Game/GameState.h>\n\n#include <DescentLogic/src/Game/Util/SafePlacement.h>\n\n//class GameState;\n\nstruct LevelTile {\n\n LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n std::string const& ent, bool collideOnJump) :\n Center(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n }\n\n Vector2 Center;\n Vector2 Repeat;\n bool Collides;\n bool CollidesOnJump;\n std::string Type;\n std::string Entity;\n\n};\n\ntypedef std::string LevelConnection;\n/*\n struct LevelConnection {\n\n };*/\n\nstruct LevelFragment {\n std::vector<LevelTile> Tiles;\n Vector2 Size;\n std::string Name;\n std::vector<LevelConnection> ConnectionsIn;\n std::vector<LevelConnection> ConnectionsOut;\n};\n\nclass LevelLoader {\npublic:\n\n void loadFragment(std::string const& json, LevelFragment & frag);\n\n template<class TGameState, class TEntFactory>\n void applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0) {\n\n for (auto const& tile : frag.Tiles) {\n\n for (int repX = 0; repX < tile.Repeat.x(); repX++) {\n for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }\n }\n }\n }\n};\n\ntypedef std::vector<std::string> LevelFragmentsName;\n\nclass LevelFactory: boost::noncopyable {\npublic:\n\n LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0) {\n\n LevelLoader loader;\n\n for (std::string const & fr : fragments) {\n LevelFragment frag;\n frag.Name = fr;\n const std::string xmlInp = re.loadLevel(fr);\n\n try {\n loader.loadFragment(xmlInp, frag);\n } catch (LevelParsingException & ex) {\n logging::Error() << "Level " << fr << " can not be parsed";\n }\n m_fragments.push_back(frag);\n }\n }\n\n void loadFragment(GameState & gs, std::string const& fragName);\n\n void nextLayers(GameState & gs, unsigned int amount);\n\n bool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const;\n\n void collisionTestLevel(GameState & gs);\n\n void renderTestLevel(GameState & gs);\n\n void reset();\n\n template<class TEnemy>\n void addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact) {\n\n const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer;\n const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));\n\n const Vector2 idealPosition(locX, locY);\n // really ugly, but know of no other way right now\n //Vector2 bndBox = DefaultFighterBoundingBox;\n // bndBox.getRadius();\n\n std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);\n\n if (bestPlacement.first) {\n auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n gs.addEnemyEntity(std::move(entEnemy));\n } else {\n logging::Info() << "no valid placement found for enemy";\n }\n }\n\nprivate:\n Engines m_engines;\n EntityFactory m_fact;\n LevelFragment const* m_lastFragment;\n std::vector<LevelFragment> m_fragments;\n unsigned int m_currentLayer;\n};\n" (comment) "/*\nCopyright (C) 2016 <NAME>. All Rights Reserved.\n* Written by <NAME> (<EMAIL>)\n\nThis file is part of Kung Foo Barracuda.\n\nKung Foo Barracuda 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\nKung Foo Barracuda 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 Kung Foo Barracuda. If not, see <http://www.gnu.org/licenses/>.\n*/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (comment) "//#include <boost/noncopyable.hpp>" (preproc_include) "#include <sstream>\n" (#include) "#include" (system_lib_string) "<sstream>" (preproc_include) "#include <boost/property_tree/json_parser.hpp>\n" (#include) "#include" (system_lib_string) "<boost/property_tree/json_parser.hpp>" (preproc_include) "#include <boost/property_tree/ptree.hpp>\n" (#include) "#include" (system_lib_string) "<boost/property_tree/ptree.hpp>" (preproc_include) "#include <DescentEngine/src/PropertyTreeSupport.h>\n" (#include) "#include" (system_lib_string) "<DescentEngine/src/PropertyTreeSupport.h>" (preproc_include) "#include <DescentEngine/src/EntityEngine/EntityFactory.h>\n" (#include) "#include" (system_lib_string) "<DescentEngine/src/EntityEngine/EntityFactory.h>" (preproc_include) "#include <DescentEngine/src/XmlTools.h>\n" (#include) "#include" (system_lib_string) "<DescentEngine/src/XmlTools.h>" (preproc_include) "#include <DescentEngine/src/Engines.h>\n" (#include) "#include" (system_lib_string) "<DescentEngine/src/Engines.h>" (comment) "//#include <DescentLogic/src/GameState.h>" (preproc_include) "#include <DescentLogic/src/Entities/WallEntity.h>\n" (#include) "#include" (system_lib_string) "<DescentLogic/src/Entities/WallEntity.h>" (preproc_include) "#include <DescentLogic/src/Entities/WallCollisionEntity.h>\n" (#include) "#include" (system_lib_string) "<DescentLogic/src/Entities/WallCollisionEntity.h>" (preproc_include) "#include <DescentLogic/src/Entities/FloorEntity.h>\n" (#include) "#include" (system_lib_string) "<DescentLogic/src/Entities/FloorEntity.h>" (preproc_include) "#include "Exceptions/LevelParsingException.h"\n" (#include) "#include" (string_literal) ""Exceptions/LevelParsingException.h"" (") """ (string_content) "Exceptions/LevelParsingException.h" (") """ (preproc_include) "#include <DescentLogic/src/Game/GameState.h>\n" (#include) "#include" (system_lib_string) "<DescentLogic/src/Game/GameState.h>" (preproc_include) "#include <DescentLogic/src/Game/Util/SafePlacement.h>\n" (#include) "#include" (system_lib_string) "<DescentLogic/src/Game/Util/SafePlacement.h>" (comment) "//class GameState;" (struct_specifier) "struct LevelTile {\n\n LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n std::string const& ent, bool collideOnJump) :\n Center(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n }\n\n Vector2 Center;\n Vector2 Repeat;\n bool Collides;\n bool CollidesOnJump;\n std::string Type;\n std::string Entity;\n\n}" (struct) "struct" (type_identifier) "LevelTile" (field_declaration_list) "{\n\n LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n std::string const& ent, bool collideOnJump) :\n Center(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n }\n\n Vector2 Center;\n Vector2 Repeat;\n bool Collides;\n bool CollidesOnJump;\n std::string Type;\n std::string Entity;\n\n}" ({) "{" (field_declaration) "LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n std::string const& ent, bool collideOnJump) :\n Center(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n }\n\n Vector2 Center;" (macro_type_specifier) "LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n std::string const& ent, bool collideOnJump)" (identifier) "LevelTile" (() "(" (type_descriptor) "Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n std::string const" (type_identifier) "Vector2" (type_qualifier) "const" (const) "const" (ERROR) "& cen, Vector2" (&) "&" (identifier) "cen" (,) "," (identifier) "Vector2" (type_qualifier) "const" (const) "const" (ERROR) "& rep, bool col, std::string" (&) "&" (identifier) "rep" (,) "," (primitive_type) "bool" (identifier) "col" (,) "," (identifier) "std" (:) ":" (:) ":" (identifier) "string" (type_qualifier) "const" (const) "const" (ERROR) "& type,\n std::string" (&) "&" (identifier) "type" (,) "," (identifier) "std" (:) ":" (:) ":" (identifier) "string" (type_qualifier) "const" (const) "const" (ERROR) "& ent, bool collideOnJump" (&) "&" (identifier) "ent" (,) "," (primitive_type) "bool" (identifier) "collideOnJump" ()) ")" (ERROR) ":" (:) ":" (function_declarator) "Center(cen)" (field_identifier) "Center" (parameter_list) "(cen)" (() "(" (parameter_declaration) "cen" (type_identifier) "cen" ()) ")" (,) "," (function_declarator) "Repeat(rep)" (field_identifier) "Repeat" (parameter_list) "(rep)" (() "(" (parameter_declaration) "rep" (type_identifier) "rep" ()) ")" (,) "," (function_declarator) "Collides(col)" (field_identifier) "Collides" (parameter_list) "(col)" (() "(" (parameter_declaration) "col" (type_identifier) "col" ()) ")" (,) "," (function_declarator) "CollidesOnJump(collideOnJump)" (field_identifier) "CollidesOnJump" (parameter_list) "(collideOnJump)" (() "(" (parameter_declaration) "collideOnJump" (type_identifier) "collideOnJump" ()) ")" (,) "," (function_declarator) "Type(type)" (field_identifier) "Type" (parameter_list) "(type)" (() "(" (parameter_declaration) "type" (type_identifier) "type" ()) ")" (,) "," (ERROR) "Entity(ent) {\n }\n\n Vector2" (function_declarator) "Entity(ent)" (field_identifier) "Entity" (parameter_list) "(ent)" (() "(" (parameter_declaration) "ent" (type_identifier) "ent" ()) ")" ({) "{" (}) "}" (field_identifier) "Vector2" (field_identifier) "Center" (;) ";" (field_declaration) "Vector2 Repeat;" (type_identifier) "Vector2" (field_identifier) "Repeat" (;) ";" (field_declaration) "bool Collides;" (primitive_type) "bool" (field_identifier) "Collides" (;) ";" (field_declaration) "bool CollidesOnJump;" (primitive_type) "bool" (field_identifier) "CollidesOnJump" (;) ";" (field_declaration) "std::string Type;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "Type" (;) ";" (field_declaration) "std::string Entity;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "Entity" (;) ";" (}) "}" (;) ";" (type_definition) "typedef std::string LevelConnection;" (typedef) "typedef" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (type_identifier) "string" (type_identifier) "LevelConnection" (;) ";" (comment) "/*\n struct LevelConnection {\n\n };*/" (struct_specifier) "struct LevelFragment {\n std::vector<LevelTile> Tiles;\n Vector2 Size;\n std::string Name;\n std::vector<LevelConnection> ConnectionsIn;\n std::vector<LevelConnection> ConnectionsOut;\n}" (struct) "struct" (type_identifier) "LevelFragment" (field_declaration_list) "{\n std::vector<LevelTile> Tiles;\n Vector2 Size;\n std::string Name;\n std::vector<LevelConnection> ConnectionsIn;\n std::vector<LevelConnection> ConnectionsOut;\n}" ({) "{" (field_declaration) "std::vector<LevelTile> Tiles;" (type_identifier) "std" (ERROR) "::vector<LevelTile>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "LevelTile" (>) ">" (field_identifier) "Tiles" (;) ";" (field_declaration) "Vector2 Size;" (type_identifier) "Vector2" (field_identifier) "Size" (;) ";" (field_declaration) "std::string Name;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "Name" (;) ";" (field_declaration) "std::vector<LevelConnection> ConnectionsIn;" (type_identifier) "std" (ERROR) "::vector<LevelConnection>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "LevelConnection" (>) ">" (field_identifier) "ConnectionsIn" (;) ";" (field_declaration) "std::vector<LevelConnection> ConnectionsOut;" (type_identifier) "std" (ERROR) "::vector<LevelConnection>" (:) ":" (:) ":" (field_identifier) "vector" (<) "<" (field_identifier) "LevelConnection" (>) ">" (field_identifier) "ConnectionsOut" (;) ";" (}) "}" (;) ";" (function_definition) "class LevelLoader {\npublic:\n\n void loadFragment(std::string const& json, LevelFragment & frag);\n\n template<class TGameState, class TEntFactory>\n void applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0) {\n\n for (auto const& tile : frag.Tiles) {\n\n for (int repX = 0; repX < tile.Repeat.x(); repX++) {\n for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }\n }\n }\n }" (type_identifier) "class" (identifier) "LevelLoader" (compound_statement) "{\npublic:\n\n void loadFragment(std::string const& json, LevelFragment & frag);\n\n template<class TGameState, class TEntFactory>\n void applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0) {\n\n for (auto const& tile : frag.Tiles) {\n\n for (int repX = 0; repX < tile.Repeat.x(); repX++) {\n for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }\n }\n }\n }" ({) "{" (labeled_statement) "public:\n\n void loadFragment(std::string const& json, LevelFragment & frag);" (statement_identifier) "public" (:) ":" (declaration) "void loadFragment(std::string const& json, LevelFragment & frag);" (primitive_type) "void" (function_declarator) "loadFragment(std::string const& json, LevelFragment & frag)" (identifier) "loadFragment" (parameter_list) "(std::string const& json, LevelFragment & frag)" (() "(" (parameter_declaration) "std::string const& json" (type_identifier) "std" (ERROR) "::string const&" (:) ":" (:) ":" (identifier) "string" (identifier) "const" (&) "&" (identifier) "json" (,) "," (parameter_declaration) "LevelFragment & frag" (type_identifier) "LevelFragment" (ERROR) "&" (&) "&" (identifier) "frag" ()) ")" (;) ";" (expression_statement) "template<class TGameState, class TEntFactory>\n void" (comma_expression) "template<class TGameState, class TEntFactory>\n void" (binary_expression) "template<class TGameState" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "TGameState" (,) "," (ERROR) "class" (identifier) "class" (binary_expression) "TEntFactory>\n void" (identifier) "TEntFactory" (>) ">" (identifier) "void" (;) "" (ERROR) "applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0)" (comma_expression) "applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0" (binary_expression) "applyFragment(LevelFragment const& frag" (identifier) "applyFragment" (ERROR) "(LevelFragment const" (() "(" (type_descriptor) "LevelFragment const" (type_identifier) "LevelFragment" (type_qualifier) "const" (const) "const" (&) "&" (identifier) "frag" (,) "," (comma_expression) "TGameState & gs, TEntFactory & fact, int offsetY = 0" (binary_expression) "TGameState & gs" (identifier) "TGameState" (&) "&" (identifier) "gs" (,) "," (comma_expression) "TEntFactory & fact, int offsetY = 0" (binary_expression) "TEntFactory & fact" (identifier) "TEntFactory" (&) "&" (identifier) "fact" (,) "," (ERROR) "int" (identifier) "int" (assignment_expression) "offsetY = 0" (identifier) "offsetY" (=) "=" (number_literal) "0" ()) ")" (compound_statement) "{\n\n for (auto const& tile : frag.Tiles) {\n\n for (int repX = 0; repX < tile.Repeat.x(); repX++) {\n for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }\n }\n }" ({) "{" (for_statement) "for (auto const& tile : frag.Tiles) {\n\n for (int repX = 0; repX < tile.Repeat.x(); repX++) {\n for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }\n }" (for) "for" (() "(" (declaration) "auto const& tile : frag.Tiles) {\n\n for (int repX = 0;" (storage_class_specifier) "auto" (auto) "auto" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (type_identifier) "tile" (ERROR) ": frag." (:) ":" (identifier) "frag" (.) "." (init_declarator) "Tiles) {\n\n for (int repX = 0" (function_declarator) "Tiles) {\n\n for (int repX" (identifier) "Tiles" (ERROR) ") {\n\n for" ()) ")" ({) "{" (for) "for" (parameter_list) "(int repX" (() "(" (parameter_declaration) "int repX" (primitive_type) "int" (identifier) "repX" ()) "" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "repX < tile.Repeat.x()" (identifier) "repX" (<) "<" (call_expression) "tile.Repeat.x()" (field_expression) "tile.Repeat.x" (field_expression) "tile.Repeat" (identifier) "tile" (.) "." (field_identifier) "Repeat" (.) "." (field_identifier) "x" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "repX++" (identifier) "repX" (++) "++" ()) ")" (compound_statement) "{\n for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }\n }" ({) "{" (for_statement) "for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }" (for) "for" (() "(" (declaration) "int repY = 0;" (primitive_type) "int" (init_declarator) "repY = 0" (identifier) "repY" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "repY < tile.Repeat.y()" (identifier) "repY" (<) "<" (call_expression) "tile.Repeat.y()" (field_expression) "tile.Repeat.y" (field_expression) "tile.Repeat" (identifier) "tile" (.) "." (field_identifier) "Repeat" (.) "." (field_identifier) "y" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "repY++" (identifier) "repY" (++) "++" ()) ")" (compound_statement) "{\n //entFactory\n uniq<Entity> ent = nullptr;\n EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);\n const Rectangle2 entSize = entTemplate.VisualSize;\n const Rectangle2 boundSize = entTemplate.BoundingBox;\n const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }\n if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }\n\n if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }\n\n }" ({) "{" (comment) "//entFactory" (expression_statement) "uniq<Entity> ent = nullptr;" (binary_expression) "uniq<Entity> ent = nullptr" (binary_expression) "uniq<Entity" (identifier) "uniq" (<) "<" (identifier) "Entity" (>) ">" (assignment_expression) "ent = nullptr" (identifier) "ent" (=) "=" (null) "nullptr" (nullptr) "nullptr" (;) ";" (declaration) "EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity);" (type_identifier) "EntityTemplate" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (init_declarator) "entTemplate = gs.getEngines().entityEngine().getTemplate(\n tile.Entity)" (identifier) "entTemplate" (=) "=" (call_expression) "gs.getEngines().entityEngine().getTemplate(\n tile.Entity)" (field_expression) "gs.getEngines().entityEngine().getTemplate" (call_expression) "gs.getEngines().entityEngine()" (field_expression) "gs.getEngines().entityEngine" (call_expression) "gs.getEngines()" (field_expression) "gs.getEngines" (identifier) "gs" (.) "." (field_identifier) "getEngines" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "entityEngine" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "getTemplate" (argument_list) "(\n tile.Entity)" (() "(" (field_expression) "tile.Entity" (identifier) "tile" (.) "." (field_identifier) "Entity" ()) ")" (;) ";" (declaration) "const Rectangle2 entSize = entTemplate.VisualSize;" (type_qualifier) "const" (const) "const" (type_identifier) "Rectangle2" (init_declarator) "entSize = entTemplate.VisualSize" (identifier) "entSize" (=) "=" (field_expression) "entTemplate.VisualSize" (identifier) "entTemplate" (.) "." (field_identifier) "VisualSize" (;) ";" (declaration) "const Rectangle2 boundSize = entTemplate.BoundingBox;" (type_qualifier) "const" (const) "const" (type_identifier) "Rectangle2" (init_declarator) "boundSize = entTemplate.BoundingBox" (identifier) "boundSize" (=) "=" (field_expression) "entTemplate.BoundingBox" (identifier) "entTemplate" (.) "." (field_identifier) "BoundingBox" (;) ";" (declaration) "const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);" (type_qualifier) "const" (const) "const" (type_identifier) "Vector2" (function_declarator) "offset(repX * entSize.width(), repY * entSize.height() + offsetY)" (identifier) "offset" (parameter_list) "(repX * entSize.width(), repY * entSize.height() + offsetY)" (() "(" (parameter_declaration) "repX * entSize.width()" (type_identifier) "repX" (pointer_declarator) "* entSize.width()" (*) "*" (ERROR) "entSize." (identifier) "entSize" (.) "." (function_declarator) "width()" (identifier) "width" (parameter_list) "()" (() "(" ()) ")" (,) "," (parameter_declaration) "repY * entSize.height() + offsetY" (type_identifier) "repY" (pointer_declarator) "* entSize.height() + offsetY" (*) "*" (ERROR) "entSize." (identifier) "entSize" (.) "." (function_declarator) "height() + offsetY" (identifier) "height" (parameter_list) "()" (() "(" ()) ")" (ERROR) "+" (+) "+" (identifier) "offsetY" ()) ")" (;) ";" (if_statement) "if (tile.Type == "WallEntity") {\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }" (if) "if" (parenthesized_expression) "(tile.Type == "WallEntity")" (() "(" (binary_expression) "tile.Type == "WallEntity"" (field_expression) "tile.Type" (identifier) "tile" (.) "." (field_identifier) "Type" (==) "==" (string_literal) ""WallEntity"" (") """ (string_content) "WallEntity" (") """ ()) ")" (compound_statement) "{\n ent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);\n }" ({) "{" (expression_statement) "ent = fact.template" (assignment_expression) "ent = fact.template" (identifier) "ent" (=) "=" (field_expression) "fact.template" (identifier) "fact" (.) "." (field_identifier) "template" (;) "" (expression_statement) "createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset);" (binary_expression) "createFromTemplateName<WallEntity>(tile.Entity,\n tile.Center + offset)" (binary_expression) "createFromTemplateName<WallEntity" (identifier) "createFromTemplateName" (<) "<" (identifier) "WallEntity" (>) ">" (parenthesized_expression) "(tile.Entity,\n tile.Center + offset)" (() "(" (comma_expression) "tile.Entity,\n tile.Center + offset" (field_expression) "tile.Entity" (identifier) "tile" (.) "." (field_identifier) "Entity" (,) "," (binary_expression) "tile.Center + offset" (field_expression) "tile.Center" (identifier) "tile" (.) "." (field_identifier) "Center" (+) "+" (identifier) "offset" ()) ")" (;) ";" (}) "}" (if_statement) "if (tile.Type == "FloorEntity") {\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }" (if) "if" (parenthesized_expression) "(tile.Type == "FloorEntity")" (() "(" (binary_expression) "tile.Type == "FloorEntity"" (field_expression) "tile.Type" (identifier) "tile" (.) "." (field_identifier) "Type" (==) "==" (string_literal) ""FloorEntity"" (") """ (string_content) "FloorEntity" (") """ ()) ")" (compound_statement) "{\n ent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);\n }" ({) "{" (expression_statement) "ent = fact.template" (assignment_expression) "ent = fact.template" (identifier) "ent" (=) "=" (field_expression) "fact.template" (identifier) "fact" (.) "." (field_identifier) "template" (;) "" (expression_statement) "createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset);" (binary_expression) "createFromTemplateName<FloorEntity>(tile.Entity,\n tile.Center + offset)" (binary_expression) "createFromTemplateName<FloorEntity" (identifier) "createFromTemplateName" (<) "<" (identifier) "FloorEntity" (>) ">" (parenthesized_expression) "(tile.Entity,\n tile.Center + offset)" (() "(" (comma_expression) "tile.Entity,\n tile.Center + offset" (field_expression) "tile.Entity" (identifier) "tile" (.) "." (field_identifier) "Entity" (,) "," (binary_expression) "tile.Center + offset" (field_expression) "tile.Center" (identifier) "tile" (.) "." (field_identifier) "Center" (+) "+" (identifier) "offset" ()) ")" (;) ";" (}) "}" (if_statement) "if (ent != nullptr) {\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n } else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }" (if) "if" (parenthesized_expression) "(ent != nullptr)" (() "(" (binary_expression) "ent != nullptr" (identifier) "ent" (!=) "!=" (null) "nullptr" (nullptr) "nullptr" ()) ")" (compound_statement) "{\n gs.addStaticEntity(std::move(ent));\n\n // create blocking ?\n if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }\n }" ({) "{" (expression_statement) "gs.addStaticEntity(std::move(ent));" (call_expression) "gs.addStaticEntity(std::move(ent))" (field_expression) "gs.addStaticEntity" (identifier) "gs" (.) "." (field_identifier) "addStaticEntity" (argument_list) "(std::move(ent))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "move(ent)" (identifier) "move" (argument_list) "(ent)" (() "(" (identifier) "ent" ()) ")" ()) ")" (;) ";" (comment) "// create blocking ?" (if_statement) "if (tile.Collides == 1) {\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }" (if) "if" (parenthesized_expression) "(tile.Collides == 1)" (() "(" (binary_expression) "tile.Collides == 1" (field_expression) "tile.Collides" (identifier) "tile" (.) "." (field_identifier) "Collides" (==) "==" (number_literal) "1" ()) ")" (compound_statement) "{\n // todo : give correct angle here\n auto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }\n\n gs.addStaticEntity(std::move(col));\n }" ({) "{" (comment) "// todo : give correct angle here" (declaration) "auto col = fact.template" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "col" (init_declarator) " = fact.template" (identifier) "" (=) "=" (field_expression) "fact.template" (identifier) "fact" (.) "." (field_identifier) "template" (;) "" (expression_statement) "createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump);" (binary_expression) "createNonVisual<WallCollisionEntity>(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump)" (binary_expression) "createNonVisual<WallCollisionEntity" (identifier) "createNonVisual" (<) "<" (identifier) "WallCollisionEntity" (>) ">" (parenthesized_expression) "(tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump)" (() "(" (comma_expression) "tile.Center + offset,\n boundSize, LayerPriorityBottom, tile.CollidesOnJump" (binary_expression) "tile.Center + offset" (field_expression) "tile.Center" (identifier) "tile" (.) "." (field_identifier) "Center" (+) "+" (identifier) "offset" (,) "," (comma_expression) "boundSize, LayerPriorityBottom, tile.CollidesOnJump" (identifier) "boundSize" (,) "," (comma_expression) "LayerPriorityBottom, tile.CollidesOnJump" (identifier) "LayerPriorityBottom" (,) "," (field_expression) "tile.CollidesOnJump" (identifier) "tile" (.) "." (field_identifier) "CollidesOnJump" ()) ")" (;) ";" (if_statement) "if (!tile.CollidesOnJump) {\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }" (if) "if" (parenthesized_expression) "(!tile.CollidesOnJump)" (() "(" (unary_expression) "!tile.CollidesOnJump" (!) "!" (field_expression) "tile.CollidesOnJump" (identifier) "tile" (.) "." (field_identifier) "CollidesOnJump" ()) ")" (compound_statement) "{\n col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n }" ({) "{" (expression_statement) "col->setCollisionGroup(GameCollisionGroups::StaticsJumpable);" (call_expression) "col->setCollisionGroup(GameCollisionGroups::StaticsJumpable)" (field_expression) "col->setCollisionGroup" (identifier) "col" (->) "->" (field_identifier) "setCollisionGroup" (argument_list) "(GameCollisionGroups::StaticsJumpable)" (() "(" (identifier) "GameCollisionGroups" (ERROR) "::StaticsJumpable" (:) ":" (:) ":" (identifier) "StaticsJumpable" ()) ")" (;) ";" (expression_statement) "col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);" (call_expression) "col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith)" (field_expression) "col->setCollisionMask" (identifier) "col" (->) "->" (field_identifier) "setCollisionMask" (argument_list) "(GameCollisionGroups::StaticsJumpable_CollidesWith)" (() "(" (ERROR) "GameCollisionGroups::" (identifier) "GameCollisionGroups" (:) ":" (:) ":" (identifier) "StaticsJumpable_CollidesWith" ()) ")" (;) ";" (}) "}" (expression_statement) "gs.addStaticEntity(std::move(col));" (call_expression) "gs.addStaticEntity(std::move(col))" (field_expression) "gs.addStaticEntity" (identifier) "gs" (.) "." (field_identifier) "addStaticEntity" (argument_list) "(std::move(col))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "move(col)" (identifier) "move" (argument_list) "(col)" (() "(" (identifier) "col" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (else_clause) "else {\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }" (else) "else" (compound_statement) "{\n logging::Fatal() << "Unknown entity type: " << tile.Type;\n }" ({) "{" (labeled_statement) "logging::Fatal() << "Unknown entity type: " << tile.Type;" (statement_identifier) "logging" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Fatal() << "Unknown entity type: " << tile.Type;" (binary_expression) "Fatal() << "Unknown entity type: " << tile.Type" (binary_expression) "Fatal() << "Unknown entity type: "" (call_expression) "Fatal()" (identifier) "Fatal" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (string_literal) ""Unknown entity type: "" (") """ (string_content) "Unknown entity type: " (") """ (<<) "<<" (field_expression) "tile.Type" (identifier) "tile" (.) "." (field_identifier) "Type" (;) ";" (}) "}" (}) "}" (}) "}" (}) "}" (}) "}" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (type_definition) "typedef std::vector<std::string> LevelFragmentsName;" (typedef) "typedef" (type_identifier) "std" (ERROR) "::vector<std::string>" (:) ":" (:) ":" (type_identifier) "vector" (<) "<" (type_identifier) "std" (:) ":" (:) ":" (type_identifier) "string" (>) ">" (type_identifier) "LevelFragmentsName" (;) ";" (function_definition) "class LevelFactory: boost::noncopyable {\npublic:\n\n LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0) {\n\n LevelLoader loader;\n\n for (std::string const & fr : fragments) {\n LevelFragment frag;\n frag.Name = fr;\n const std::string xmlInp = re.loadLevel(fr);\n\n try {\n loader.loadFragment(xmlInp, frag);\n } catch (LevelParsingException & ex) {\n logging::Error() << "Level " << fr << " can not be parsed";\n }\n m_fragments.push_back(frag);\n }\n }\n\n void loadFragment(GameState & gs, std::string const& fragName);\n\n void nextLayers(GameState & gs, unsigned int amount);\n\n bool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const;\n\n void collisionTestLevel(GameState & gs);\n\n void renderTestLevel(GameState & gs);\n\n void reset();\n\n template<class TEnemy>\n void addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact) {\n\n const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer;\n const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));\n\n const Vector2 idealPosition(locX, locY);\n // really ugly, but know of no other way right now\n //Vector2 bndBox = DefaultFighterBoundingBox;\n // bndBox.getRadius();\n\n std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);\n\n if (bestPlacement.first) {\n auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n gs.addEnemyEntity(std::move(entEnemy));\n } else {\n logging::Info() << "no valid placement found for enemy";\n }\n }\n\nprivate:\n Engines m_engines;\n EntityFactory m_fact;\n LevelFragment const* m_lastFragment;\n std::vector<LevelFragment> m_fragments;\n unsigned int m_currentLayer;\n}" (type_identifier) "class" (identifier) "LevelFactory" (ERROR) ": boost::noncopyable" (:) ":" (identifier) "boost" (:) ":" (:) ":" (identifier) "noncopyable" (compound_statement) "{\npublic:\n\n LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0) {\n\n LevelLoader loader;\n\n for (std::string const & fr : fragments) {\n LevelFragment frag;\n frag.Name = fr;\n const std::string xmlInp = re.loadLevel(fr);\n\n try {\n loader.loadFragment(xmlInp, frag);\n } catch (LevelParsingException & ex) {\n logging::Error() << "Level " << fr << " can not be parsed";\n }\n m_fragments.push_back(frag);\n }\n }\n\n void loadFragment(GameState & gs, std::string const& fragName);\n\n void nextLayers(GameState & gs, unsigned int amount);\n\n bool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const;\n\n void collisionTestLevel(GameState & gs);\n\n void renderTestLevel(GameState & gs);\n\n void reset();\n\n template<class TEnemy>\n void addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact) {\n\n const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer;\n const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));\n\n const Vector2 idealPosition(locX, locY);\n // really ugly, but know of no other way right now\n //Vector2 bndBox = DefaultFighterBoundingBox;\n // bndBox.getRadius();\n\n std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);\n\n if (bestPlacement.first) {\n auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n gs.addEnemyEntity(std::move(entEnemy));\n } else {\n logging::Info() << "no valid placement found for enemy";\n }\n }\n\nprivate:\n Engines m_engines;\n EntityFactory m_fact;\n LevelFragment const* m_lastFragment;\n std::vector<LevelFragment> m_fragments;\n unsigned int m_currentLayer;\n}" ({) "{" (labeled_statement) "public:\n\n LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)" (statement_identifier) "public" (:) ":" (ERROR) "LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :" (call_expression) "LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re)" (identifier) "LevelFactory" (argument_list) "(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re)" (() "(" (binary_expression) "Engines & engines" (identifier) "Engines" (&) "&" (identifier) "engines" (,) "," (binary_expression) "LevelFragmentsName const& fragments" (identifier) "LevelFragmentsName" (ERROR) "const" (identifier) "const" (&) "&" (identifier) "fragments" (,) "," (binary_expression) "ResourceEngine & re" (identifier) "ResourceEngine" (&) "&" (identifier) "re" ()) ")" (:) ":" (expression_statement) "m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)" (comma_expression) "m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)" (call_expression) "m_engines(engines)" (identifier) "m_engines" (argument_list) "(engines)" (() "(" (identifier) "engines" ()) ")" (,) "," (comma_expression) "m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)" (call_expression) "m_fact(engines)" (identifier) "m_fact" (argument_list) "(engines)" (() "(" (identifier) "engines" ()) ")" (,) "," (comma_expression) "m_lastFragment(nullptr), m_currentLayer(0)" (call_expression) "m_lastFragment(nullptr)" (identifier) "m_lastFragment" (argument_list) "(nullptr)" (() "(" (null) "nullptr" (nullptr) "nullptr" ()) ")" (,) "," (call_expression) "m_currentLayer(0)" (identifier) "m_currentLayer" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) "" (compound_statement) "{\n\n LevelLoader loader;\n\n for (std::string const & fr : fragments) {\n LevelFragment frag;\n frag.Name = fr;\n const std::string xmlInp = re.loadLevel(fr);\n\n try {\n loader.loadFragment(xmlInp, frag);\n } catch (LevelParsingException & ex) {\n logging::Error() << "Level " << fr << " can not be parsed";\n }\n m_fragments.push_back(frag);\n }\n }" ({) "{" (declaration) "LevelLoader loader;" (type_identifier) "LevelLoader" (identifier) "loader" (;) ";" (ERROR) "for (std::string const & fr : fragments)" (for) "for" (() "(" (declaration) "std::string" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (identifier) "string" (;) "" (binary_expression) "const & fr" (identifier) "const" (&) "&" (identifier) "fr" (:) ":" (identifier) "fragments" ()) ")" (compound_statement) "{\n LevelFragment frag;\n frag.Name = fr;\n const std::string xmlInp = re.loadLevel(fr);\n\n try {\n loader.loadFragment(xmlInp, frag);\n } catch (LevelParsingException & ex) {\n logging::Error() << "Level " << fr << " can not be parsed";\n }\n m_fragments.push_back(frag);\n }" ({) "{" (declaration) "LevelFragment frag;" (type_identifier) "LevelFragment" (identifier) "frag" (;) ";" (expression_statement) "frag.Name = fr;" (assignment_expression) "frag.Name = fr" (field_expression) "frag.Name" (identifier) "frag" (.) "." (field_identifier) "Name" (=) "=" (identifier) "fr" (;) ";" (declaration) "const std::string xmlInp = re.loadLevel(fr);" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (init_declarator) "xmlInp = re.loadLevel(fr)" (identifier) "xmlInp" (=) "=" (call_expression) "re.loadLevel(fr)" (field_expression) "re.loadLevel" (identifier) "re" (.) "." (field_identifier) "loadLevel" (argument_list) "(fr)" (() "(" (identifier) "fr" ()) ")" (;) ";" (type_identifier) "try" (;) "" (compound_statement) "{\n loader.loadFragment(xmlInp, frag);\n }" ({) "{" (expression_statement) "loader.loadFragment(xmlInp, frag);" (call_expression) "loader.loadFragment(xmlInp, frag)" (field_expression) "loader.loadFragment" (identifier) "loader" (.) "." (field_identifier) "loadFragment" (argument_list) "(xmlInp, frag)" (() "(" (identifier) "xmlInp" (,) "," (identifier) "frag" ()) ")" (;) ";" (}) "}" (expression_statement) "catch (LevelParsingException & ex)" (call_expression) "catch (LevelParsingException & ex)" (identifier) "catch" (argument_list) "(LevelParsingException & ex)" (() "(" (binary_expression) "LevelParsingException & ex" (identifier) "LevelParsingException" (&) "&" (identifier) "ex" ()) ")" (;) "" (compound_statement) "{\n logging::Error() << "Level " << fr << " can not be parsed";\n }" ({) "{" (labeled_statement) "logging::Error() << "Level " << fr << " can not be parsed";" (statement_identifier) "logging" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Error() << "Level " << fr << " can not be parsed";" (binary_expression) "Error() << "Level " << fr << " can not be parsed"" (binary_expression) "Error() << "Level " << fr" (binary_expression) "Error() << "Level "" (call_expression) "Error()" (identifier) "Error" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (string_literal) ""Level "" (") """ (string_content) "Level " (") """ (<<) "<<" (identifier) "fr" (<<) "<<" (string_literal) "" can not be parsed"" (") """ (string_content) " can not be parsed" (") """ (;) ";" (}) "}" (expression_statement) "m_fragments.push_back(frag);" (call_expression) "m_fragments.push_back(frag)" (field_expression) "m_fragments.push_back" (identifier) "m_fragments" (.) "." (field_identifier) "push_back" (argument_list) "(frag)" (() "(" (identifier) "frag" ()) ")" (;) ";" (}) "}" (}) "}" (declaration) "void loadFragment(GameState & gs, std::string const& fragName);" (primitive_type) "void" (function_declarator) "loadFragment(GameState & gs, std::string const& fragName)" (identifier) "loadFragment" (parameter_list) "(GameState & gs, std::string const& fragName)" (() "(" (parameter_declaration) "GameState & gs" (type_identifier) "GameState" (ERROR) "&" (&) "&" (identifier) "gs" (,) "," (parameter_declaration) "std::string const& fragName" (type_identifier) "std" (ERROR) "::string const&" (:) ":" (:) ":" (identifier) "string" (identifier) "const" (&) "&" (identifier) "fragName" ()) ")" (;) ";" (declaration) "void nextLayers(GameState & gs, unsigned int amount);" (primitive_type) "void" (function_declarator) "nextLayers(GameState & gs, unsigned int amount)" (identifier) "nextLayers" (parameter_list) "(GameState & gs, unsigned int amount)" (() "(" (parameter_declaration) "GameState & gs" (type_identifier) "GameState" (ERROR) "&" (&) "&" (identifier) "gs" (,) "," (parameter_declaration) "unsigned int amount" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "amount" ()) ")" (;) ";" (ERROR) "bool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const" (primitive_type) "bool" (function_declarator) "canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const" (identifier) "canConnect" (parameter_list) "(LevelFragment const& prevFrag, LevelFragment const& nextFrag)" (() "(" (parameter_declaration) "LevelFragment const& prevFrag" (type_identifier) "LevelFragment" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "prevFrag" (,) "," (parameter_declaration) "LevelFragment const& nextFrag" (type_identifier) "LevelFragment" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "nextFrag" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (declaration) "void collisionTestLevel(GameState & gs);" (primitive_type) "void" (function_declarator) "collisionTestLevel(GameState & gs)" (identifier) "collisionTestLevel" (parameter_list) "(GameState & gs)" (() "(" (parameter_declaration) "GameState & gs" (type_identifier) "GameState" (ERROR) "&" (&) "&" (identifier) "gs" ()) ")" (;) ";" (declaration) "void renderTestLevel(GameState & gs);" (primitive_type) "void" (function_declarator) "renderTestLevel(GameState & gs)" (identifier) "renderTestLevel" (parameter_list) "(GameState & gs)" (() "(" (parameter_declaration) "GameState & gs" (type_identifier) "GameState" (ERROR) "&" (&) "&" (identifier) "gs" ()) ")" (;) ";" (declaration) "void reset();" (primitive_type) "void" (function_declarator) "reset()" (identifier) "reset" (parameter_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "template<class TEnemy>\n void addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)" (binary_expression) "template<class TEnemy>\n void addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)" (binary_expression) "template<class TEnemy" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "TEnemy" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)" (identifier) "addEnemy" (argument_list) "(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n LevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)" (() "(" (ERROR) "std::string" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (identifier) "name" (,) "," (ERROR) "float" (identifier) "float" (identifier) "enemyCollisionRadius" (,) "," (ERROR) "float" (identifier) "float" (identifier) "maxPlacementRadius" (,) "," (binary_expression) "LevelFragment const* frag" (identifier) "LevelFragment" (ERROR) "const" (identifier) "const" (*) "*" (identifier) "frag" (,) "," (ERROR) "int" (identifier) "int" (identifier) "thisLayer" (,) "," (binary_expression) "GameState & gs" (identifier) "GameState" (&) "&" (identifier) "gs" (,) "," (binary_expression) "EntityFactory & fact" (identifier) "EntityFactory" (&) "&" (identifier) "fact" ()) ")" (;) "" (compound_statement) "{\n\n const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer;\n const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));\n\n const Vector2 idealPosition(locX, locY);\n // really ugly, but know of no other way right now\n //Vector2 bndBox = DefaultFighterBoundingBox;\n // bndBox.getRadius();\n\n std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);\n\n if (bestPlacement.first) {\n auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n gs.addEnemyEntity(std::move(entEnemy));\n } else {\n logging::Info() << "no valid placement found for enemy";\n }\n }" ({) "{" (declaration) "const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer" (identifier) "locY" (=) "=" (binary_expression) "gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n + thisLayer" (call_expression) "gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))" (field_expression) "gs.getEngines().randomEngine().randomInt" (call_expression) "gs.getEngines().randomEngine()" (field_expression) "gs.getEngines().randomEngine" (call_expression) "gs.getEngines()" (field_expression) "gs.getEngines" (identifier) "gs" (.) "." (field_identifier) "getEngines" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "randomEngine" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "randomInt" (argument_list) "(RandomEngine::SpanInt(0, frag->Size.y()))" (() "(" (ERROR) "RandomEngine::" (identifier) "RandomEngine" (:) ":" (:) ":" (call_expression) "SpanInt(0, frag->Size.y())" (identifier) "SpanInt" (argument_list) "(0, frag->Size.y())" (() "(" (number_literal) "0" (,) "," (call_expression) "frag->Size.y()" (field_expression) "frag->Size.y" (field_expression) "frag->Size" (identifier) "frag" (->) "->" (field_identifier) "Size" (.) "." (field_identifier) "y" (argument_list) "()" (() "(" ()) ")" ()) ")" ()) ")" (+) "+" (identifier) "thisLayer" (;) ";" (declaration) "const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()))" (identifier) "locX" (=) "=" (call_expression) "gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()))" (field_expression) "gs.getEngines().randomEngine().randomInt" (call_expression) "gs.getEngines().randomEngine()" (field_expression) "gs.getEngines().randomEngine" (call_expression) "gs.getEngines()" (field_expression) "gs.getEngines" (identifier) "gs" (.) "." (field_identifier) "getEngines" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "randomEngine" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "randomInt" (argument_list) "(RandomEngine::SpanInt(0, frag->Size.x()))" (() "(" (ERROR) "RandomEngine::" (identifier) "RandomEngine" (:) ":" (:) ":" (call_expression) "SpanInt(0, frag->Size.x())" (identifier) "SpanInt" (argument_list) "(0, frag->Size.x())" (() "(" (number_literal) "0" (,) "," (call_expression) "frag->Size.x()" (field_expression) "frag->Size.x" (field_expression) "frag->Size" (identifier) "frag" (->) "->" (field_identifier) "Size" (.) "." (field_identifier) "x" (argument_list) "()" (() "(" ()) ")" ()) ")" ()) ")" (;) ";" (declaration) "const Vector2 idealPosition(locX, locY);" (type_qualifier) "const" (const) "const" (type_identifier) "Vector2" (function_declarator) "idealPosition(locX, locY)" (identifier) "idealPosition" (parameter_list) "(locX, locY)" (() "(" (parameter_declaration) "locX" (type_identifier) "locX" (,) "," (parameter_declaration) "locY" (type_identifier) "locY" ()) ")" (;) ";" (comment) "// really ugly, but know of no other way right now" (comment) "//Vector2 bndBox = DefaultFighterBoundingBox;" (comment) "// bndBox.getRadius();" (labeled_statement) "std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);" (statement_identifier) "std" (ERROR) "::pair<bool, Vector2> bestPlacement = game_util:" (:) ":" (:) ":" (comma_expression) "pair<bool, Vector2> bestPlacement = game_util" (binary_expression) "pair<bool" (identifier) "pair" (<) "<" (identifier) "bool" (,) "," (binary_expression) "Vector2> bestPlacement = game_util" (identifier) "Vector2" (>) ">" (assignment_expression) "bestPlacement = game_util" (identifier) "bestPlacement" (=) "=" (identifier) "game_util" (:) ":" (:) ":" (expression_statement) "findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);" (call_expression) "findSafePlacement(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs)" (identifier) "findSafePlacement" (argument_list) "(idealPosition,\n enemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs)" (() "(" (identifier) "idealPosition" (,) "," (identifier) "enemyCollisionRadius" (,) "," (identifier) "maxPlacementRadius" (,) "," (call_expression) "gs.getEngines()" (field_expression) "gs.getEngines" (identifier) "gs" (.) "." (field_identifier) "getEngines" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "gs" ()) ")" (;) ";" (if_statement) "if (bestPlacement.first) {\n auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n gs.addEnemyEntity(std::move(entEnemy));\n } else {\n logging::Info() << "no valid placement found for enemy";\n }" (if) "if" (parenthesized_expression) "(bestPlacement.first)" (() "(" (field_expression) "bestPlacement.first" (identifier) "bestPlacement" (.) "." (field_identifier) "first" ()) ")" (compound_statement) "{\n auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n gs.addEnemyEntity(std::move(entEnemy));\n }" ({) "{" (declaration) "auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "entEnemy" (init_declarator) " = fact.createMultiVisual<TEnemy>(name, bestPlacement.second)" (identifier) "" (=) "=" (binary_expression) "fact.createMultiVisual<TEnemy>(name, bestPlacement.second)" (binary_expression) "fact.createMultiVisual<TEnemy" (field_expression) "fact.createMultiVisual" (identifier) "fact" (.) "." (field_identifier) "createMultiVisual" (<) "<" (identifier) "TEnemy" (>) ">" (parenthesized_expression) "(name, bestPlacement.second)" (() "(" (comma_expression) "name, bestPlacement.second" (identifier) "name" (,) "," (field_expression) "bestPlacement.second" (identifier) "bestPlacement" (.) "." (field_identifier) "second" ()) ")" (;) ";" (expression_statement) "gs.addEnemyEntity(std::move(entEnemy));" (call_expression) "gs.addEnemyEntity(std::move(entEnemy))" (field_expression) "gs.addEnemyEntity" (identifier) "gs" (.) "." (field_identifier) "addEnemyEntity" (argument_list) "(std::move(entEnemy))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "move(entEnemy)" (identifier) "move" (argument_list) "(entEnemy)" (() "(" (identifier) "entEnemy" ()) ")" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n logging::Info() << "no valid placement found for enemy";\n }" (else) "else" (compound_statement) "{\n logging::Info() << "no valid placement found for enemy";\n }" ({) "{" (labeled_statement) "logging::Info() << "no valid placement found for enemy";" (statement_identifier) "logging" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Info() << "no valid placement found for enemy";" (binary_expression) "Info() << "no valid placement found for enemy"" (call_expression) "Info()" (identifier) "Info" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (string_literal) ""no valid placement found for enemy"" (") """ (string_content) "no valid placement found for enemy" (") """ (;) ";" (}) "}" (}) "}" (labeled_statement) "private:\n Engines m_engines;" (statement_identifier) "private" (:) ":" (declaration) "Engines m_engines;" (type_identifier) "Engines" (identifier) "m_engines" (;) ";" (declaration) "EntityFactory m_fact;" (type_identifier) "EntityFactory" (identifier) "m_fact" (;) ";" (declaration) "LevelFragment const* m_lastFragment;" (type_identifier) "LevelFragment" (type_qualifier) "const" (const) "const" (pointer_declarator) "* m_lastFragment" (*) "*" (identifier) "m_lastFragment" (;) ";" (labeled_statement) "std::vector<LevelFragment> m_fragments;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<LevelFragment> m_fragments;" (binary_expression) "vector<LevelFragment> m_fragments" (binary_expression) "vector<LevelFragment" (identifier) "vector" (<) "<" (identifier) "LevelFragment" (>) ">" (identifier) "m_fragments" (;) ";" (declaration) "unsigned int m_currentLayer;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "m_currentLayer" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
1,482
62
{"language": "c", "success": true, "metadata": {"lines": 149, "avg_line_length": 38.58, "nodes": 876, "errors": 0, "source_hash": "e92ad4b40c40b11747722a6e0c84d20dfa41c3ddc1cd7859a0c7d8a85df5f5e5", "categorized_nodes": 656}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <sstream>\n", "parent": null, "children": [4, 5], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<sstream>", "parent": 3, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <boost/property_tree/json_parser.hpp>\n", "parent": null, "children": [7, 8], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<boost/property_tree/json_parser.hpp>", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 46}}, {"id": 9, "type": "preproc_include", "text": "#include <boost/property_tree/ptree.hpp>\n", "parent": null, "children": [10, 11], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<boost/property_tree/ptree.hpp>", "parent": 9, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 40}}, {"id": 12, "type": "preproc_include", "text": "#include <DescentEngine/src/PropertyTreeSupport.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<DescentEngine/src/PropertyTreeSupport.h>", "parent": 12, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 50}}, {"id": 15, "type": "preproc_include", "text": "#include <DescentEngine/src/EntityEngine/EntityFactory.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<DescentEngine/src/EntityEngine/EntityFactory.h>", "parent": 15, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 57}}, {"id": 18, "type": "preproc_include", "text": "#include <DescentEngine/src/XmlTools.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<DescentEngine/src/XmlTools.h>", "parent": 18, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 39}}, {"id": 21, "type": "preproc_include", "text": "#include <DescentEngine/src/Engines.h>\n", "parent": null, "children": [22, 23], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<DescentEngine/src/Engines.h>", "parent": 21, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 38}}, {"id": 24, "type": "preproc_include", "text": "#include <DescentLogic/src/Entities/WallEntity.h>\n", "parent": null, "children": [25, 26], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<DescentLogic/src/Entities/WallEntity.h>", "parent": 24, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 49}}, {"id": 27, "type": "preproc_include", "text": "#include <DescentLogic/src/Entities/WallCollisionEntity.h>\n", "parent": null, "children": [28, 29], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<DescentLogic/src/Entities/WallCollisionEntity.h>", "parent": 27, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 58}}, {"id": 30, "type": "preproc_include", "text": "#include <DescentLogic/src/Entities/FloorEntity.h>\n", "parent": null, "children": [31, 32], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<DescentLogic/src/Entities/FloorEntity.h>", "parent": 30, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 50}}, {"id": 33, "type": "preproc_include", "text": "#include \"Exceptions/LevelParsingException.h\"\n", "parent": null, "children": [34, 35], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"Exceptions/LevelParsingException.h\"", "parent": 33, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 45}}, {"id": 36, "type": "preproc_include", "text": "#include <DescentLogic/src/Game/GameState.h>\n", "parent": null, "children": [37, 38], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 8}}, {"id": 38, "type": "system_lib_string", "text": "<DescentLogic/src/Game/GameState.h>", "parent": 36, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 44}}, {"id": 39, "type": "preproc_include", "text": "#include <DescentLogic/src/Game/Util/SafePlacement.h>\n", "parent": null, "children": [40, 41], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<DescentLogic/src/Game/Util/SafePlacement.h>", "parent": 39, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 53}}, {"id": 42, "type": "struct_specifier", "text": "struct LevelTile {\n\n\tLevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n\t\t\tstd::string const& ent, bool collideOnJump) :\n\t\t\tCenter(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n\t}\n\n\tVector2 Center;\n\tVector2 Repeat;\n\tbool Collides;\n\tbool CollidesOnJump;\n\tstd::string Type;\n\tstd::string Entity;\n\n}", "parent": null, "children": [43, 44], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 43, "type": "struct", "text": "struct", "parent": 42, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 44, "type": "type_identifier", "text": "LevelTile", "parent": 42, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 16}}, {"id": 45, "type": "field_declaration", "text": "LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n\t\t\tstd::string const& ent, bool collideOnJump) :\n\t\t\tCenter(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n\t}\n\n\tVector2 Center;", "parent": 42, "children": [46, 67, 72, 77, 82, 87, 92, 99], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 53, "column": 16}}, {"id": 46, "type": "macro_type_specifier", "text": "LevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n\t\t\tstd::string const& ent, bool collideOnJump)", "parent": 45, "children": [47, 48, 63], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 49, "column": 46}}, {"id": 47, "type": "identifier", "text": "LevelTile", "parent": 46, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 10}}, {"id": 48, "type": "type_descriptor", "text": "Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n\t\t\tstd::string const", "parent": 46, "children": [49, 50, 53, 59], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 49, "column": 20}}, {"id": 49, "type": "type_identifier", "text": "Vector2", "parent": 48, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 18}}, {"id": 50, "type": "ERROR", "text": "& cen, Vector2", "parent": 48, "children": [51, 52], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 38}}, {"id": 51, "type": "identifier", "text": "cen", "parent": 50, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 29}}, {"id": 52, "type": "identifier", "text": "Vector2", "parent": 50, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 38}}, {"id": 53, "type": "ERROR", "text": "& rep, bool col, std::string", "parent": 48, "children": [54, 55, 56, 57, 58], "start_point": {"row": 48, "column": 44}, "end_point": {"row": 48, "column": 72}}, {"id": 54, "type": "identifier", "text": "rep", "parent": 53, "children": [], "start_point": {"row": 48, "column": 46}, "end_point": {"row": 48, "column": 49}}, {"id": 55, "type": "primitive_type", "text": "bool", "parent": 53, "children": [], "start_point": {"row": 48, "column": 51}, "end_point": {"row": 48, "column": 55}}, {"id": 56, "type": "identifier", "text": "col", "parent": 53, "children": [], "start_point": {"row": 48, "column": 56}, "end_point": {"row": 48, "column": 59}}, {"id": 57, "type": "identifier", "text": "std", "parent": 53, "children": [], "start_point": {"row": 48, "column": 61}, "end_point": {"row": 48, "column": 64}}, {"id": 58, "type": "identifier", "text": "string", "parent": 53, "children": [], "start_point": {"row": 48, "column": 66}, "end_point": {"row": 48, "column": 72}}, {"id": 59, "type": "ERROR", "text": "& type,\n\t\t\tstd::string", "parent": 48, "children": [60, 61, 62], "start_point": {"row": 48, "column": 78}, "end_point": {"row": 49, "column": 14}}, {"id": 60, "type": "identifier", "text": "type", "parent": 59, "children": [], "start_point": {"row": 48, "column": 80}, "end_point": {"row": 48, "column": 84}}, {"id": 61, "type": "identifier", "text": "std", "parent": 59, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 6}}, {"id": 62, "type": "identifier", "text": "string", "parent": 59, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 63, "type": "ERROR", "text": "& ent, bool collideOnJump", "parent": 46, "children": [64, 65, 66], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 45}}, {"id": 64, "type": "identifier", "text": "ent", "parent": 63, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 25}}, {"id": 65, "type": "primitive_type", "text": "bool", "parent": 63, "children": [], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 31}}, {"id": 66, "type": "identifier", "text": "collideOnJump", "parent": 63, "children": [], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 45}}, {"id": 67, "type": "function_declarator", "text": "Center(cen)", "parent": 45, "children": [68, 69], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 14}}, {"id": 68, "type": "field_identifier", "text": "Center", "parent": 67, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 9}}, {"id": 69, "type": "parameter_list", "text": "(cen)", "parent": 67, "children": [70], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 14}}, {"id": 70, "type": "parameter_declaration", "text": "cen", "parent": 69, "children": [71], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 13}}, {"id": 71, "type": "type_identifier", "text": "cen", "parent": 70, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 13}}, {"id": 72, "type": "function_declarator", "text": "Repeat(rep)", "parent": 45, "children": [73, 74], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 27}}, {"id": 73, "type": "field_identifier", "text": "Repeat", "parent": 72, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 22}}, {"id": 74, "type": "parameter_list", "text": "(rep)", "parent": 72, "children": [75], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 27}}, {"id": 75, "type": "parameter_declaration", "text": "rep", "parent": 74, "children": [76], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 26}}, {"id": 76, "type": "type_identifier", "text": "rep", "parent": 75, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 26}}, {"id": 77, "type": "function_declarator", "text": "Collides(col)", "parent": 45, "children": [78, 79], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 42}}, {"id": 78, "type": "field_identifier", "text": "Collides", "parent": 77, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 37}}, {"id": 79, "type": "parameter_list", "text": "(col)", "parent": 77, "children": [80], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 50, "column": 42}}, {"id": 80, "type": "parameter_declaration", "text": "col", "parent": 79, "children": [81], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 41}}, {"id": 81, "type": "type_identifier", "text": "col", "parent": 80, "children": [], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 41}}, {"id": 82, "type": "function_declarator", "text": "CollidesOnJump(collideOnJump)", "parent": 45, "children": [83, 84], "start_point": {"row": 50, "column": 44}, "end_point": {"row": 50, "column": 73}}, {"id": 83, "type": "field_identifier", "text": "CollidesOnJump", "parent": 82, "children": [], "start_point": {"row": 50, "column": 44}, "end_point": {"row": 50, "column": 58}}, {"id": 84, "type": "parameter_list", "text": "(collideOnJump)", "parent": 82, "children": [85], "start_point": {"row": 50, "column": 58}, "end_point": {"row": 50, "column": 73}}, {"id": 85, "type": "parameter_declaration", "text": "collideOnJump", "parent": 84, "children": [86], "start_point": {"row": 50, "column": 59}, "end_point": {"row": 50, "column": 72}}, {"id": 86, "type": "type_identifier", "text": "collideOnJump", "parent": 85, "children": [], "start_point": {"row": 50, "column": 59}, "end_point": {"row": 50, "column": 72}}, {"id": 87, "type": "function_declarator", "text": "Type(type)", "parent": 45, "children": [88, 89], "start_point": {"row": 50, "column": 75}, "end_point": {"row": 50, "column": 85}}, {"id": 88, "type": "field_identifier", "text": "Type", "parent": 87, "children": [], "start_point": {"row": 50, "column": 75}, "end_point": {"row": 50, "column": 79}}, {"id": 89, "type": "parameter_list", "text": "(type)", "parent": 87, "children": [90], "start_point": {"row": 50, "column": 79}, "end_point": {"row": 50, "column": 85}}, {"id": 90, "type": "parameter_declaration", "text": "type", "parent": 89, "children": [91], "start_point": {"row": 50, "column": 80}, "end_point": {"row": 50, "column": 84}}, {"id": 91, "type": "type_identifier", "text": "type", "parent": 90, "children": [], "start_point": {"row": 50, "column": 80}, "end_point": {"row": 50, "column": 84}}, {"id": 92, "type": "ERROR", "text": "Entity(ent) {\n\t}\n\n\tVector2", "parent": 45, "children": [93, 98], "start_point": {"row": 50, "column": 87}, "end_point": {"row": 53, "column": 8}}, {"id": 93, "type": "function_declarator", "text": "Entity(ent)", "parent": 92, "children": [94, 95], "start_point": {"row": 50, "column": 87}, "end_point": {"row": 50, "column": 98}}, {"id": 94, "type": "field_identifier", "text": "Entity", "parent": 93, "children": [], "start_point": {"row": 50, "column": 87}, "end_point": {"row": 50, "column": 93}}, {"id": 95, "type": "parameter_list", "text": "(ent)", "parent": 93, "children": [96], "start_point": {"row": 50, "column": 93}, "end_point": {"row": 50, "column": 98}}, {"id": 96, "type": "parameter_declaration", "text": "ent", "parent": 95, "children": [97], "start_point": {"row": 50, "column": 94}, "end_point": {"row": 50, "column": 97}}, {"id": 97, "type": "type_identifier", "text": "ent", "parent": 96, "children": [], "start_point": {"row": 50, "column": 94}, "end_point": {"row": 50, "column": 97}}, {"id": 98, "type": "field_identifier", "text": "Vector2", "parent": 92, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 8}}, {"id": 99, "type": "field_identifier", "text": "Center", "parent": 45, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 15}}, {"id": 100, "type": "field_declaration", "text": "Vector2 Repeat;", "parent": 42, "children": [101, 102], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 16}}, {"id": 101, "type": "type_identifier", "text": "Vector2", "parent": 100, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 8}}, {"id": 102, "type": "field_identifier", "text": "Repeat", "parent": 100, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 15}}, {"id": 103, "type": "field_declaration", "text": "bool Collides;", "parent": 42, "children": [104, 105], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 15}}, {"id": 104, "type": "primitive_type", "text": "bool", "parent": 103, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 5}}, {"id": 105, "type": "field_identifier", "text": "Collides", "parent": 103, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 14}}, {"id": 106, "type": "field_declaration", "text": "bool CollidesOnJump;", "parent": 42, "children": [107, 108], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 21}}, {"id": 107, "type": "primitive_type", "text": "bool", "parent": 106, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 5}}, {"id": 108, "type": "field_identifier", "text": "CollidesOnJump", "parent": 106, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 20}}, {"id": 109, "type": "field_declaration", "text": "std::string Type;", "parent": 42, "children": [110, 111, 113], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 18}}, {"id": 110, "type": "type_identifier", "text": "std", "parent": 109, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 4}}, {"id": 111, "type": "ERROR", "text": "::string", "parent": 109, "children": [112], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 12}}, {"id": 112, "type": "field_identifier", "text": "string", "parent": 111, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 12}}, {"id": 113, "type": "field_identifier", "text": "Type", "parent": 109, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 17}}, {"id": 114, "type": "field_declaration", "text": "std::string Entity;", "parent": 42, "children": [115, 116, 118], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 20}}, {"id": 115, "type": "type_identifier", "text": "std", "parent": 114, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 4}}, {"id": 116, "type": "ERROR", "text": "::string", "parent": 114, "children": [117], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 12}}, {"id": 117, "type": "field_identifier", "text": "string", "parent": 116, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 12}}, {"id": 118, "type": "field_identifier", "text": "Entity", "parent": 114, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 19}}, {"id": 119, "type": "type_definition", "text": "typedef std::string LevelConnection;", "parent": null, "children": [120, 121, 122, 124], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 36}}, {"id": 120, "type": "typedef", "text": "typedef", "parent": 119, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 7}}, {"id": 121, "type": "type_identifier", "text": "std", "parent": 119, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 11}}, {"id": 122, "type": "ERROR", "text": "::string", "parent": 119, "children": [123], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 19}}, {"id": 123, "type": "type_identifier", "text": "string", "parent": 122, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 19}}, {"id": 124, "type": "type_identifier", "text": "LevelConnection", "parent": 119, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 35}}, {"id": 125, "type": "struct_specifier", "text": "struct LevelFragment {\n\tstd::vector<LevelTile> Tiles;\n\tVector2 Size;\n\tstd::string Name;\n\tstd::vector<LevelConnection> ConnectionsIn;\n\tstd::vector<LevelConnection> ConnectionsOut;\n}", "parent": null, "children": [126, 127], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 126, "type": "struct", "text": "struct", "parent": 125, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 127, "type": "type_identifier", "text": "LevelFragment", "parent": 125, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 20}}, {"id": 128, "type": "field_declaration", "text": "std::vector<LevelTile> Tiles;", "parent": 125, "children": [129, 130, 135], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 30}}, {"id": 129, "type": "type_identifier", "text": "std", "parent": 128, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 4}}, {"id": 130, "type": "ERROR", "text": "::vector<LevelTile>", "parent": 128, "children": [131, 132, 133, 134], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 23}}, {"id": 131, "type": "field_identifier", "text": "vector", "parent": 130, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 12}}, {"id": 132, "type": "<", "text": "<", "parent": 130, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 13}}, {"id": 133, "type": "field_identifier", "text": "LevelTile", "parent": 130, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 22}}, {"id": 134, "type": ">", "text": ">", "parent": 130, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 23}}, {"id": 135, "type": "field_identifier", "text": "Tiles", "parent": 128, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 29}}, {"id": 136, "type": "field_declaration", "text": "Vector2 Size;", "parent": 125, "children": [137, 138], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 14}}, {"id": 137, "type": "type_identifier", "text": "Vector2", "parent": 136, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 8}}, {"id": 138, "type": "field_identifier", "text": "Size", "parent": 136, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 13}}, {"id": 139, "type": "field_declaration", "text": "std::string Name;", "parent": 125, "children": [140, 141, 143], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 18}}, {"id": 140, "type": "type_identifier", "text": "std", "parent": 139, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 4}}, {"id": 141, "type": "ERROR", "text": "::string", "parent": 139, "children": [142], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 12}}, {"id": 142, "type": "field_identifier", "text": "string", "parent": 141, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 12}}, {"id": 143, "type": "field_identifier", "text": "Name", "parent": 139, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 17}}, {"id": 144, "type": "field_declaration", "text": "std::vector<LevelConnection> ConnectionsIn;", "parent": 125, "children": [145, 146, 151], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 44}}, {"id": 145, "type": "type_identifier", "text": "std", "parent": 144, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 4}}, {"id": 146, "type": "ERROR", "text": "::vector<LevelConnection>", "parent": 144, "children": [147, 148, 149, 150], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 29}}, {"id": 147, "type": "field_identifier", "text": "vector", "parent": 146, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 12}}, {"id": 148, "type": "<", "text": "<", "parent": 146, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 13}}, {"id": 149, "type": "field_identifier", "text": "LevelConnection", "parent": 146, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 28}}, {"id": 150, "type": ">", "text": ">", "parent": 146, "children": [], "start_point": {"row": 72, "column": 28}, "end_point": {"row": 72, "column": 29}}, {"id": 151, "type": "field_identifier", "text": "ConnectionsIn", "parent": 144, "children": [], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 72, "column": 43}}, {"id": 152, "type": "field_declaration", "text": "std::vector<LevelConnection> ConnectionsOut;", "parent": 125, "children": [153, 154, 159], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 45}}, {"id": 153, "type": "type_identifier", "text": "std", "parent": 152, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 4}}, {"id": 154, "type": "ERROR", "text": "::vector<LevelConnection>", "parent": 152, "children": [155, 156, 157, 158], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 29}}, {"id": 155, "type": "field_identifier", "text": "vector", "parent": 154, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 12}}, {"id": 156, "type": "<", "text": "<", "parent": 154, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 13}}, {"id": 157, "type": "field_identifier", "text": "LevelConnection", "parent": 154, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 28}}, {"id": 158, "type": ">", "text": ">", "parent": 154, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 29}}, {"id": 159, "type": "field_identifier", "text": "ConnectionsOut", "parent": 152, "children": [], "start_point": {"row": 73, "column": 30}, "end_point": {"row": 73, "column": 44}}, {"id": 160, "type": "function_definition", "text": "class LevelLoader {\npublic:\n\n\tvoid loadFragment(std::string const& json, LevelFragment & frag);\n\n\ttemplate<class TGameState, class TEntFactory>\n\tvoid applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0) {\n\n\t\tfor (auto const& tile : frag.Tiles) {\n\n\t\t\tfor (int repX = 0; repX < tile.Repeat.x(); repX++) {\n\t\t\t\tfor (int repY = 0; repY < tile.Repeat.y(); repY++) {\n\t\t\t\t\t//entFactory\n\t\t\t\t\tuniq<Entity> ent = nullptr;\n\t\t\t\t\tEntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity);\n\t\t\t\t\tconst Rectangle2 entSize = entTemplate.VisualSize;\n\t\t\t\t\tconst Rectangle2 boundSize = entTemplate.BoundingBox;\n\t\t\t\t\tconst Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n\t\t\t\t\tif (tile.Type == \"WallEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\t\t\t\t\tif (tile.Type == \"FloorEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ent != nullptr) {\n\t\t\t\t\t\tgs.addStaticEntity(std::move(ent));\n\n\t\t\t\t\t\t// create blocking ?\n\t\t\t\t\t\tif (tile.Collides == 1) {\n\t\t\t\t\t\t\t// todo : give correct angle here\n\t\t\t\t\t\t\tauto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n\t\t\t\t\t\t\tif (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgs.addStaticEntity(std::move(col));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogging::Fatal() << \"Unknown entity type: \" << tile.Type;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "parent": null, "children": [161], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 128, "column": 2}}, {"id": 161, "type": "identifier", "text": "LevelLoader", "parent": 160, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 17}}, {"id": 162, "type": "labeled_statement", "text": "public:\n\n\tvoid loadFragment(std::string const& json, LevelFragment & frag);", "parent": 160, "children": [163], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 79, "column": 66}}, {"id": 163, "type": "declaration", "text": "void loadFragment(std::string const& json, LevelFragment & frag);", "parent": 162, "children": [164, 165], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 66}}, {"id": 164, "type": "primitive_type", "text": "void", "parent": 163, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 5}}, {"id": 165, "type": "function_declarator", "text": "loadFragment(std::string const& json, LevelFragment & frag)", "parent": 163, "children": [166, 167], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 65}}, {"id": 166, "type": "identifier", "text": "loadFragment", "parent": 165, "children": [], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 18}}, {"id": 167, "type": "parameter_list", "text": "(std::string const& json, LevelFragment & frag)", "parent": 165, "children": [168, 173], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 65}}, {"id": 168, "type": "parameter_declaration", "text": "std::string const& json", "parent": 167, "children": [169, 170, 172], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 42}}, {"id": 169, "type": "type_identifier", "text": "std", "parent": 168, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 22}}, {"id": 170, "type": "ERROR", "text": "::string const&", "parent": 168, "children": [171], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 37}}, {"id": 171, "type": "identifier", "text": "string", "parent": 170, "children": [], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 30}}, {"id": 172, "type": "identifier", "text": "json", "parent": 168, "children": [], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 42}}, {"id": 173, "type": "parameter_declaration", "text": "LevelFragment & frag", "parent": 167, "children": [174, 175], "start_point": {"row": 79, "column": 44}, "end_point": {"row": 79, "column": 64}}, {"id": 174, "type": "type_identifier", "text": "LevelFragment", "parent": 173, "children": [], "start_point": {"row": 79, "column": 44}, "end_point": {"row": 79, "column": 57}}, {"id": 175, "type": "identifier", "text": "frag", "parent": 173, "children": [], "start_point": {"row": 79, "column": 60}, "end_point": {"row": 79, "column": 64}}, {"id": 176, "type": "comma_expression", "text": "template<class TGameState, class TEntFactory>\n\tvoid", "parent": 160, "children": [177, 181], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 82, "column": 5}}, {"id": 177, "type": "binary_expression", "text": "template<class TGameState", "parent": 176, "children": [178, 179, 180], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 26}}, {"id": 178, "type": "identifier", "text": "template", "parent": 177, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 9}}, {"id": 179, "type": "<", "text": "<", "parent": 177, "children": [], "start_point": {"row": 81, "column": 9}, "end_point": {"row": 81, "column": 10}}, {"id": 180, "type": "identifier", "text": "TGameState", "parent": 177, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 26}}, {"id": 181, "type": "binary_expression", "text": "TEntFactory>\n\tvoid", "parent": 176, "children": [182, 183, 184], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 82, "column": 5}}, {"id": 182, "type": "identifier", "text": "TEntFactory", "parent": 181, "children": [], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 45}}, {"id": 183, "type": ">", "text": ">", "parent": 181, "children": [], "start_point": {"row": 81, "column": 45}, "end_point": {"row": 81, "column": 46}}, {"id": 184, "type": "identifier", "text": "void", "parent": 181, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 5}}, {"id": 185, "type": "ERROR", "text": "applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0)", "parent": 160, "children": [186], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 100}}, {"id": 186, "type": "comma_expression", "text": "applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0", "parent": 185, "children": [187, 193], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 99}}, {"id": 187, "type": "binary_expression", "text": "applyFragment(LevelFragment const& frag", "parent": 186, "children": [188, 189, 192], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 45}}, {"id": 188, "type": "identifier", "text": "applyFragment", "parent": 187, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 19}}, {"id": 189, "type": "ERROR", "text": "(LevelFragment const", "parent": 187, "children": [190], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 39}}, {"id": 190, "type": "type_descriptor", "text": "LevelFragment const", "parent": 189, "children": [191], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 39}}, {"id": 191, "type": "type_identifier", "text": "LevelFragment", "parent": 190, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 33}}, {"id": 192, "type": "identifier", "text": "frag", "parent": 187, "children": [], "start_point": {"row": 82, "column": 41}, "end_point": {"row": 82, "column": 45}}, {"id": 193, "type": "comma_expression", "text": "TGameState & gs, TEntFactory & fact, int offsetY = 0", "parent": 186, "children": [194, 197], "start_point": {"row": 82, "column": 47}, "end_point": {"row": 82, "column": 99}}, {"id": 194, "type": "binary_expression", "text": "TGameState & gs", "parent": 193, "children": [195, 196], "start_point": {"row": 82, "column": 47}, "end_point": {"row": 82, "column": 62}}, {"id": 195, "type": "identifier", "text": "TGameState", "parent": 194, "children": [], "start_point": {"row": 82, "column": 47}, "end_point": {"row": 82, "column": 57}}, {"id": 196, "type": "identifier", "text": "gs", "parent": 194, "children": [], "start_point": {"row": 82, "column": 60}, "end_point": {"row": 82, "column": 62}}, {"id": 197, "type": "comma_expression", "text": "TEntFactory & fact, int offsetY = 0", "parent": 193, "children": [198, 201, 203], "start_point": {"row": 82, "column": 64}, "end_point": {"row": 82, "column": 99}}, {"id": 198, "type": "binary_expression", "text": "TEntFactory & fact", "parent": 197, "children": [199, 200], "start_point": {"row": 82, "column": 64}, "end_point": {"row": 82, "column": 82}}, {"id": 199, "type": "identifier", "text": "TEntFactory", "parent": 198, "children": [], "start_point": {"row": 82, "column": 64}, "end_point": {"row": 82, "column": 75}}, {"id": 200, "type": "identifier", "text": "fact", "parent": 198, "children": [], "start_point": {"row": 82, "column": 78}, "end_point": {"row": 82, "column": 82}}, {"id": 201, "type": "ERROR", "text": "int", "parent": 197, "children": [202], "start_point": {"row": 82, "column": 84}, "end_point": {"row": 82, "column": 87}}, {"id": 202, "type": "identifier", "text": "int", "parent": 201, "children": [], "start_point": {"row": 82, "column": 84}, "end_point": {"row": 82, "column": 87}}, {"id": 203, "type": "assignment_expression", "text": "offsetY = 0", "parent": 197, "children": [204, 205, 206], "start_point": {"row": 82, "column": 88}, "end_point": {"row": 82, "column": 99}}, {"id": 204, "type": "identifier", "text": "offsetY", "parent": 203, "children": [], "start_point": {"row": 82, "column": 88}, "end_point": {"row": 82, "column": 95}}, {"id": 205, "type": "=", "text": "=", "parent": 203, "children": [], "start_point": {"row": 82, "column": 96}, "end_point": {"row": 82, "column": 97}}, {"id": 206, "type": "number_literal", "text": "0", "parent": 203, "children": [], "start_point": {"row": 82, "column": 98}, "end_point": {"row": 82, "column": 99}}, {"id": 207, "type": "for_statement", "text": "for (auto const& tile : frag.Tiles) {\n\n\t\t\tfor (int repX = 0; repX < tile.Repeat.x(); repX++) {\n\t\t\t\tfor (int repY = 0; repY < tile.Repeat.y(); repY++) {\n\t\t\t\t\t//entFactory\n\t\t\t\t\tuniq<Entity> ent = nullptr;\n\t\t\t\t\tEntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity);\n\t\t\t\t\tconst Rectangle2 entSize = entTemplate.VisualSize;\n\t\t\t\t\tconst Rectangle2 boundSize = entTemplate.BoundingBox;\n\t\t\t\t\tconst Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n\t\t\t\t\tif (tile.Type == \"WallEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\t\t\t\t\tif (tile.Type == \"FloorEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ent != nullptr) {\n\t\t\t\t\t\tgs.addStaticEntity(std::move(ent));\n\n\t\t\t\t\t\t// create blocking ?\n\t\t\t\t\t\tif (tile.Collides == 1) {\n\t\t\t\t\t\t\t// todo : give correct angle here\n\t\t\t\t\t\t\tauto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n\t\t\t\t\t\t\tif (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgs.addStaticEntity(std::move(col));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogging::Fatal() << \"Unknown entity type: \" << tile.Type;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "parent": 160, "children": [208, 224, 234], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 126, "column": 4}}, {"id": 208, "type": "declaration", "text": "auto const& tile : frag.Tiles) {\n\n\t\t\tfor (int repX = 0;", "parent": 207, "children": [209, 211, 212, 214], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 86, "column": 21}}, {"id": 209, "type": "storage_class_specifier", "text": "auto", "parent": 208, "children": [210], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 11}}, {"id": 210, "type": "auto", "text": "auto", "parent": 209, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 11}}, {"id": 211, "type": "type_identifier", "text": "tile", "parent": 208, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 23}}, {"id": 212, "type": "ERROR", "text": ": frag.", "parent": 208, "children": [213], "start_point": {"row": 84, "column": 24}, "end_point": {"row": 84, "column": 31}}, {"id": 213, "type": "identifier", "text": "frag", "parent": 212, "children": [], "start_point": {"row": 84, "column": 26}, "end_point": {"row": 84, "column": 30}}, {"id": 214, "type": "init_declarator", "text": "Tiles) {\n\n\t\t\tfor (int repX = 0", "parent": 208, "children": [215, 222, 223], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 86, "column": 20}}, {"id": 215, "type": "function_declarator", "text": "Tiles) {\n\n\t\t\tfor (int repX", "parent": 214, "children": [216, 217, 218], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 86, "column": 16}}, {"id": 216, "type": "identifier", "text": "Tiles", "parent": 215, "children": [], "start_point": {"row": 84, "column": 31}, "end_point": {"row": 84, "column": 36}}, {"id": 217, "type": "ERROR", "text": ") {\n\n\t\t\tfor", "parent": 215, "children": [], "start_point": {"row": 84, "column": 36}, "end_point": {"row": 86, "column": 6}}, {"id": 218, "type": "parameter_list", "text": "(int repX", "parent": 215, "children": [219], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 16}}, {"id": 219, "type": "parameter_declaration", "text": "int repX", "parent": 218, "children": [220, 221], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 16}}, {"id": 220, "type": "primitive_type", "text": "int", "parent": 219, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 11}}, {"id": 221, "type": "identifier", "text": "repX", "parent": 219, "children": [], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 16}}, {"id": 222, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 18}}, {"id": 223, "type": "number_literal", "text": "0", "parent": 214, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 20}}, {"id": 224, "type": "binary_expression", "text": "repX < tile.Repeat.x()", "parent": 207, "children": [225, 226, 227], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 44}}, {"id": 225, "type": "identifier", "text": "repX", "parent": 224, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 26}}, {"id": 226, "type": "<", "text": "<", "parent": 224, "children": [], "start_point": {"row": 86, "column": 27}, "end_point": {"row": 86, "column": 28}}, {"id": 227, "type": "call_expression", "text": "tile.Repeat.x()", "parent": 224, "children": [228, 233], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 44}}, {"id": 228, "type": "field_expression", "text": "tile.Repeat.x", "parent": 227, "children": [229, 232], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 42}}, {"id": 229, "type": "field_expression", "text": "tile.Repeat", "parent": 228, "children": [230, 231], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 40}}, {"id": 230, "type": "identifier", "text": "tile", "parent": 229, "children": [], "start_point": {"row": 86, "column": 29}, "end_point": {"row": 86, "column": 33}}, {"id": 231, "type": "field_identifier", "text": "Repeat", "parent": 229, "children": [], "start_point": {"row": 86, "column": 34}, "end_point": {"row": 86, "column": 40}}, {"id": 232, "type": "field_identifier", "text": "x", "parent": 228, "children": [], "start_point": {"row": 86, "column": 41}, "end_point": {"row": 86, "column": 42}}, {"id": 233, "type": "argument_list", "text": "()", "parent": 227, "children": [], "start_point": {"row": 86, "column": 42}, "end_point": {"row": 86, "column": 44}}, {"id": 234, "type": "update_expression", "text": "repX++", "parent": 207, "children": [235, 236], "start_point": {"row": 86, "column": 46}, "end_point": {"row": 86, "column": 52}}, {"id": 235, "type": "identifier", "text": "repX", "parent": 234, "children": [], "start_point": {"row": 86, "column": 46}, "end_point": {"row": 86, "column": 50}}, {"id": 236, "type": "++", "text": "++", "parent": 234, "children": [], "start_point": {"row": 86, "column": 50}, "end_point": {"row": 86, "column": 52}}, {"id": 237, "type": "for_statement", "text": "for (int repY = 0; repY < tile.Repeat.y(); repY++) {\n\t\t\t\t\t//entFactory\n\t\t\t\t\tuniq<Entity> ent = nullptr;\n\t\t\t\t\tEntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity);\n\t\t\t\t\tconst Rectangle2 entSize = entTemplate.VisualSize;\n\t\t\t\t\tconst Rectangle2 boundSize = entTemplate.BoundingBox;\n\t\t\t\t\tconst Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n\t\t\t\t\tif (tile.Type == \"WallEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\t\t\t\t\tif (tile.Type == \"FloorEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ent != nullptr) {\n\t\t\t\t\t\tgs.addStaticEntity(std::move(ent));\n\n\t\t\t\t\t\t// create blocking ?\n\t\t\t\t\t\tif (tile.Collides == 1) {\n\t\t\t\t\t\t\t// todo : give correct angle here\n\t\t\t\t\t\t\tauto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n\t\t\t\t\t\t\tif (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgs.addStaticEntity(std::move(col));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogging::Fatal() << \"Unknown entity type: \" << tile.Type;\n\t\t\t\t\t}\n\n\t\t\t\t}", "parent": 207, "children": [238, 244, 254], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 125, "column": 5}}, {"id": 238, "type": "declaration", "text": "int repY = 0;", "parent": 237, "children": [239, 240], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 22}}, {"id": 239, "type": "primitive_type", "text": "int", "parent": 238, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 12}}, {"id": 240, "type": "init_declarator", "text": "repY = 0", "parent": 238, "children": [241, 242, 243], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 21}}, {"id": 241, "type": "identifier", "text": "repY", "parent": 240, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 17}}, {"id": 242, "type": "=", "text": "=", "parent": 240, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 19}}, {"id": 243, "type": "number_literal", "text": "0", "parent": 240, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 21}}, {"id": 244, "type": "binary_expression", "text": "repY < tile.Repeat.y()", "parent": 237, "children": [245, 246, 247], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 45}}, {"id": 245, "type": "identifier", "text": "repY", "parent": 244, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 27}}, {"id": 246, "type": "<", "text": "<", "parent": 244, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 29}}, {"id": 247, "type": "call_expression", "text": "tile.Repeat.y()", "parent": 244, "children": [248, 253], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 45}}, {"id": 248, "type": "field_expression", "text": "tile.Repeat.y", "parent": 247, "children": [249, 252], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 43}}, {"id": 249, "type": "field_expression", "text": "tile.Repeat", "parent": 248, "children": [250, 251], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 41}}, {"id": 250, "type": "identifier", "text": "tile", "parent": 249, "children": [], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 34}}, {"id": 251, "type": "field_identifier", "text": "Repeat", "parent": 249, "children": [], "start_point": {"row": 87, "column": 35}, "end_point": {"row": 87, "column": 41}}, {"id": 252, "type": "field_identifier", "text": "y", "parent": 248, "children": [], "start_point": {"row": 87, "column": 42}, "end_point": {"row": 87, "column": 43}}, {"id": 253, "type": "argument_list", "text": "()", "parent": 247, "children": [], "start_point": {"row": 87, "column": 43}, "end_point": {"row": 87, "column": 45}}, {"id": 254, "type": "update_expression", "text": "repY++", "parent": 237, "children": [255, 256], "start_point": {"row": 87, "column": 47}, "end_point": {"row": 87, "column": 53}}, {"id": 255, "type": "identifier", "text": "repY", "parent": 254, "children": [], "start_point": {"row": 87, "column": 47}, "end_point": {"row": 87, "column": 51}}, {"id": 256, "type": "++", "text": "++", "parent": 254, "children": [], "start_point": {"row": 87, "column": 51}, "end_point": {"row": 87, "column": 53}}, {"id": 257, "type": "binary_expression", "text": "uniq<Entity> ent = nullptr", "parent": 237, "children": [258, 262, 263], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 31}}, {"id": 258, "type": "binary_expression", "text": "uniq<Entity", "parent": 257, "children": [259, 260, 261], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 16}}, {"id": 259, "type": "identifier", "text": "uniq", "parent": 258, "children": [], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 9}}, {"id": 260, "type": "<", "text": "<", "parent": 258, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 10}}, {"id": 261, "type": "identifier", "text": "Entity", "parent": 258, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 16}}, {"id": 262, "type": ">", "text": ">", "parent": 257, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 17}}, {"id": 263, "type": "assignment_expression", "text": "ent = nullptr", "parent": 257, "children": [264, 265, 266], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 31}}, {"id": 264, "type": "identifier", "text": "ent", "parent": 263, "children": [], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 21}}, {"id": 265, "type": "=", "text": "=", "parent": 263, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 23}}, {"id": 266, "type": "null", "text": "nullptr", "parent": 263, "children": [267], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 31}}, {"id": 267, "type": "nullptr", "text": "nullptr", "parent": 266, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 31}}, {"id": 268, "type": "declaration", "text": "EntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity);", "parent": 237, "children": [269, 270], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 91, "column": 20}}, {"id": 269, "type": "type_identifier", "text": "EntityTemplate", "parent": 268, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 19}}, {"id": 270, "type": "init_declarator", "text": "entTemplate = gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity)", "parent": 268, "children": [271, 272, 273], "start_point": {"row": 90, "column": 27}, "end_point": {"row": 91, "column": 19}}, {"id": 271, "type": "identifier", "text": "entTemplate", "parent": 270, "children": [], "start_point": {"row": 90, "column": 27}, "end_point": {"row": 90, "column": 38}}, {"id": 272, "type": "=", "text": "=", "parent": 270, "children": [], "start_point": {"row": 90, "column": 39}, "end_point": {"row": 90, "column": 40}}, {"id": 273, "type": "call_expression", "text": "gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity)", "parent": 270, "children": [274, 285], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 91, "column": 19}}, {"id": 274, "type": "field_expression", "text": "gs.getEngines().entityEngine().getTemplate", "parent": 273, "children": [275, 284], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 83}}, {"id": 275, "type": "call_expression", "text": "gs.getEngines().entityEngine()", "parent": 274, "children": [276, 283], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 71}}, {"id": 276, "type": "field_expression", "text": "gs.getEngines().entityEngine", "parent": 275, "children": [277, 282], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 69}}, {"id": 277, "type": "call_expression", "text": "gs.getEngines()", "parent": 276, "children": [278, 281], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 56}}, {"id": 278, "type": "field_expression", "text": "gs.getEngines", "parent": 277, "children": [279, 280], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 54}}, {"id": 279, "type": "identifier", "text": "gs", "parent": 278, "children": [], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 43}}, {"id": 280, "type": "field_identifier", "text": "getEngines", "parent": 278, "children": [], "start_point": {"row": 90, "column": 44}, "end_point": {"row": 90, "column": 54}}, {"id": 281, "type": "argument_list", "text": "()", "parent": 277, "children": [], "start_point": {"row": 90, "column": 54}, "end_point": {"row": 90, "column": 56}}, {"id": 282, "type": "field_identifier", "text": "entityEngine", "parent": 276, "children": [], "start_point": {"row": 90, "column": 57}, "end_point": {"row": 90, "column": 69}}, {"id": 283, "type": "argument_list", "text": "()", "parent": 275, "children": [], "start_point": {"row": 90, "column": 69}, "end_point": {"row": 90, "column": 71}}, {"id": 284, "type": "field_identifier", "text": "getTemplate", "parent": 274, "children": [], "start_point": {"row": 90, "column": 72}, "end_point": {"row": 90, "column": 83}}, {"id": 285, "type": "argument_list", "text": "(\n\t\t\t\t\t\t\ttile.Entity)", "parent": 273, "children": [286], "start_point": {"row": 90, "column": 83}, "end_point": {"row": 91, "column": 19}}, {"id": 286, "type": "field_expression", "text": "tile.Entity", "parent": 285, "children": [287, 288], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 18}}, {"id": 287, "type": "identifier", "text": "tile", "parent": 286, "children": [], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 11}}, {"id": 288, "type": "field_identifier", "text": "Entity", "parent": 286, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 18}}, {"id": 289, "type": "declaration", "text": "const Rectangle2 entSize = entTemplate.VisualSize;", "parent": 237, "children": [290, 291], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 55}}, {"id": 290, "type": "type_identifier", "text": "Rectangle2", "parent": 289, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 21}}, {"id": 291, "type": "init_declarator", "text": "entSize = entTemplate.VisualSize", "parent": 289, "children": [292, 293, 294], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 54}}, {"id": 292, "type": "identifier", "text": "entSize", "parent": 291, "children": [], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 29}}, {"id": 293, "type": "=", "text": "=", "parent": 291, "children": [], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 31}}, {"id": 294, "type": "field_expression", "text": "entTemplate.VisualSize", "parent": 291, "children": [295, 296], "start_point": {"row": 92, "column": 32}, "end_point": {"row": 92, "column": 54}}, {"id": 295, "type": "identifier", "text": "entTemplate", "parent": 294, "children": [], "start_point": {"row": 92, "column": 32}, "end_point": {"row": 92, "column": 43}}, {"id": 296, "type": "field_identifier", "text": "VisualSize", "parent": 294, "children": [], "start_point": {"row": 92, "column": 44}, "end_point": {"row": 92, "column": 54}}, {"id": 297, "type": "declaration", "text": "const Rectangle2 boundSize = entTemplate.BoundingBox;", "parent": 237, "children": [298, 299], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 58}}, {"id": 298, "type": "type_identifier", "text": "Rectangle2", "parent": 297, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 21}}, {"id": 299, "type": "init_declarator", "text": "boundSize = entTemplate.BoundingBox", "parent": 297, "children": [300, 301, 302], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 57}}, {"id": 300, "type": "identifier", "text": "boundSize", "parent": 299, "children": [], "start_point": {"row": 93, "column": 22}, "end_point": {"row": 93, "column": 31}}, {"id": 301, "type": "=", "text": "=", "parent": 299, "children": [], "start_point": {"row": 93, "column": 32}, "end_point": {"row": 93, "column": 33}}, {"id": 302, "type": "field_expression", "text": "entTemplate.BoundingBox", "parent": 299, "children": [303, 304], "start_point": {"row": 93, "column": 34}, "end_point": {"row": 93, "column": 57}}, {"id": 303, "type": "identifier", "text": "entTemplate", "parent": 302, "children": [], "start_point": {"row": 93, "column": 34}, "end_point": {"row": 93, "column": 45}}, {"id": 304, "type": "field_identifier", "text": "BoundingBox", "parent": 302, "children": [], "start_point": {"row": 93, "column": 46}, "end_point": {"row": 93, "column": 57}}, {"id": 305, "type": "declaration", "text": "const Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);", "parent": 237, "children": [306, 307], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 85}}, {"id": 306, "type": "type_identifier", "text": "Vector2", "parent": 305, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 18}}, {"id": 307, "type": "function_declarator", "text": "offset(repX * entSize.width(), repY * entSize.height() + offsetY)", "parent": 305, "children": [308, 309], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 84}}, {"id": 308, "type": "identifier", "text": "offset", "parent": 307, "children": [], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 25}}, {"id": 309, "type": "parameter_list", "text": "(repX * entSize.width(), repY * entSize.height() + offsetY)", "parent": 307, "children": [310, 319], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 84}}, {"id": 310, "type": "parameter_declaration", "text": "repX * entSize.width()", "parent": 309, "children": [311, 312], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 48}}, {"id": 311, "type": "type_identifier", "text": "repX", "parent": 310, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 30}}, {"id": 312, "type": "pointer_declarator", "text": "* entSize.width()", "parent": 310, "children": [313, 314, 316], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 48}}, {"id": 313, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 32}}, {"id": 314, "type": "ERROR", "text": "entSize.", "parent": 312, "children": [315], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 41}}, {"id": 315, "type": "identifier", "text": "entSize", "parent": 314, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 40}}, {"id": 316, "type": "function_declarator", "text": "width()", "parent": 312, "children": [317, 318], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 48}}, {"id": 317, "type": "identifier", "text": "width", "parent": 316, "children": [], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 46}}, {"id": 318, "type": "parameter_list", "text": "()", "parent": 316, "children": [], "start_point": {"row": 94, "column": 46}, "end_point": {"row": 94, "column": 48}}, {"id": 319, "type": "parameter_declaration", "text": "repY * entSize.height() + offsetY", "parent": 309, "children": [320, 321], "start_point": {"row": 94, "column": 50}, "end_point": {"row": 94, "column": 83}}, {"id": 320, "type": "type_identifier", "text": "repY", "parent": 319, "children": [], "start_point": {"row": 94, "column": 50}, "end_point": {"row": 94, "column": 54}}, {"id": 321, "type": "pointer_declarator", "text": "* entSize.height() + offsetY", "parent": 319, "children": [322, 323, 325], "start_point": {"row": 94, "column": 55}, "end_point": {"row": 94, "column": 83}}, {"id": 322, "type": "*", "text": "*", "parent": 321, "children": [], "start_point": {"row": 94, "column": 55}, "end_point": {"row": 94, "column": 56}}, {"id": 323, "type": "ERROR", "text": "entSize.", "parent": 321, "children": [324], "start_point": {"row": 94, "column": 57}, "end_point": {"row": 94, "column": 65}}, {"id": 324, "type": "identifier", "text": "entSize", "parent": 323, "children": [], "start_point": {"row": 94, "column": 57}, "end_point": {"row": 94, "column": 64}}, {"id": 325, "type": "function_declarator", "text": "height() + offsetY", "parent": 321, "children": [326, 327, 328, 330], "start_point": {"row": 94, "column": 65}, "end_point": {"row": 94, "column": 83}}, {"id": 326, "type": "identifier", "text": "height", "parent": 325, "children": [], "start_point": {"row": 94, "column": 65}, "end_point": {"row": 94, "column": 71}}, {"id": 327, "type": "parameter_list", "text": "()", "parent": 325, "children": [], "start_point": {"row": 94, "column": 71}, "end_point": {"row": 94, "column": 73}}, {"id": 328, "type": "ERROR", "text": "+", "parent": 325, "children": [329], "start_point": {"row": 94, "column": 74}, "end_point": {"row": 94, "column": 75}}, {"id": 329, "type": "+", "text": "+", "parent": 328, "children": [], "start_point": {"row": 94, "column": 74}, "end_point": {"row": 94, "column": 75}}, {"id": 330, "type": "identifier", "text": "offsetY", "parent": 325, "children": [], "start_point": {"row": 94, "column": 76}, "end_point": {"row": 94, "column": 83}}, {"id": 331, "type": "if_statement", "text": "if (tile.Type == \"WallEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}", "parent": 237, "children": [332], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 99, "column": 6}}, {"id": 332, "type": "parenthesized_expression", "text": "(tile.Type == \"WallEntity\")", "parent": 331, "children": [333], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 35}}, {"id": 333, "type": "binary_expression", "text": "tile.Type == \"WallEntity\"", "parent": 332, "children": [334, 337, 338], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 34}}, {"id": 334, "type": "field_expression", "text": "tile.Type", "parent": 333, "children": [335, 336], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 18}}, {"id": 335, "type": "identifier", "text": "tile", "parent": 334, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 13}}, {"id": 336, "type": "field_identifier", "text": "Type", "parent": 334, "children": [], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 18}}, {"id": 337, "type": "==", "text": "==", "parent": 333, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 21}}, {"id": 338, "type": "string_literal", "text": "\"WallEntity\"", "parent": 333, "children": [], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 34}}, {"id": 339, "type": "assignment_expression", "text": "ent = fact.template", "parent": 331, "children": [340, 341, 342], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 25}}, {"id": 340, "type": "identifier", "text": "ent", "parent": 339, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 9}}, {"id": 341, "type": "=", "text": "=", "parent": 339, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 11}}, {"id": 342, "type": "field_expression", "text": "fact.template", "parent": 339, "children": [343, 344], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 25}}, {"id": 343, "type": "identifier", "text": "fact", "parent": 342, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 16}}, {"id": 344, "type": "field_identifier", "text": "template", "parent": 342, "children": [], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 25}}, {"id": 345, "type": "binary_expression", "text": "createFromTemplateName<WallEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset)", "parent": 331, "children": [346, 350, 351], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 98, "column": 29}}, {"id": 346, "type": "binary_expression", "text": "createFromTemplateName<WallEntity", "parent": 345, "children": [347, 348, 349], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 97, "column": 60}}, {"id": 347, "type": "identifier", "text": "createFromTemplateName", "parent": 346, "children": [], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 97, "column": 49}}, {"id": 348, "type": "<", "text": "<", "parent": 346, "children": [], "start_point": {"row": 97, "column": 49}, "end_point": {"row": 97, "column": 50}}, {"id": 349, "type": "identifier", "text": "WallEntity", "parent": 346, "children": [], "start_point": {"row": 97, "column": 50}, "end_point": {"row": 97, "column": 60}}, {"id": 350, "type": ">", "text": ">", "parent": 345, "children": [], "start_point": {"row": 97, "column": 60}, "end_point": {"row": 97, "column": 61}}, {"id": 351, "type": "parenthesized_expression", "text": "(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset)", "parent": 345, "children": [352], "start_point": {"row": 97, "column": 61}, "end_point": {"row": 98, "column": 29}}, {"id": 352, "type": "comma_expression", "text": "tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset", "parent": 351, "children": [353, 356], "start_point": {"row": 97, "column": 62}, "end_point": {"row": 98, "column": 28}}, {"id": 353, "type": "field_expression", "text": "tile.Entity", "parent": 352, "children": [354, 355], "start_point": {"row": 97, "column": 62}, "end_point": {"row": 97, "column": 73}}, {"id": 354, "type": "identifier", "text": "tile", "parent": 353, "children": [], "start_point": {"row": 97, "column": 62}, "end_point": {"row": 97, "column": 66}}, {"id": 355, "type": "field_identifier", "text": "Entity", "parent": 353, "children": [], "start_point": {"row": 97, "column": 67}, "end_point": {"row": 97, "column": 73}}, {"id": 356, "type": "binary_expression", "text": "tile.Center + offset", "parent": 352, "children": [357, 360, 361], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 28}}, {"id": 357, "type": "field_expression", "text": "tile.Center", "parent": 356, "children": [358, 359], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 19}}, {"id": 358, "type": "identifier", "text": "tile", "parent": 357, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 12}}, {"id": 359, "type": "field_identifier", "text": "Center", "parent": 357, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 19}}, {"id": 360, "type": "+", "text": "+", "parent": 356, "children": [], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 21}}, {"id": 361, "type": "identifier", "text": "offset", "parent": 356, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 28}}, {"id": 362, "type": "if_statement", "text": "if (tile.Type == \"FloorEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}", "parent": 237, "children": [363], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 103, "column": 6}}, {"id": 363, "type": "parenthesized_expression", "text": "(tile.Type == \"FloorEntity\")", "parent": 362, "children": [364], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 36}}, {"id": 364, "type": "binary_expression", "text": "tile.Type == \"FloorEntity\"", "parent": 363, "children": [365, 368, 369], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 35}}, {"id": 365, "type": "field_expression", "text": "tile.Type", "parent": 364, "children": [366, 367], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 18}}, {"id": 366, "type": "identifier", "text": "tile", "parent": 365, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 13}}, {"id": 367, "type": "field_identifier", "text": "Type", "parent": 365, "children": [], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 18}}, {"id": 368, "type": "==", "text": "==", "parent": 364, "children": [], "start_point": {"row": 100, "column": 19}, "end_point": {"row": 100, "column": 21}}, {"id": 369, "type": "string_literal", "text": "\"FloorEntity\"", "parent": 364, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 35}}, {"id": 370, "type": "assignment_expression", "text": "ent = fact.template", "parent": 362, "children": [371, 372, 373], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 25}}, {"id": 371, "type": "identifier", "text": "ent", "parent": 370, "children": [], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 9}}, {"id": 372, "type": "=", "text": "=", "parent": 370, "children": [], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 11}}, {"id": 373, "type": "field_expression", "text": "fact.template", "parent": 370, "children": [374, 375], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 25}}, {"id": 374, "type": "identifier", "text": "fact", "parent": 373, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 16}}, {"id": 375, "type": "field_identifier", "text": "template", "parent": 373, "children": [], "start_point": {"row": 101, "column": 17}, "end_point": {"row": 101, "column": 25}}, {"id": 376, "type": "binary_expression", "text": "createFromTemplateName<FloorEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset)", "parent": 362, "children": [377, 381, 382], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 102, "column": 29}}, {"id": 377, "type": "binary_expression", "text": "createFromTemplateName<FloorEntity", "parent": 376, "children": [378, 379, 380], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 61}}, {"id": 378, "type": "identifier", "text": "createFromTemplateName", "parent": 377, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 49}}, {"id": 379, "type": "<", "text": "<", "parent": 377, "children": [], "start_point": {"row": 101, "column": 49}, "end_point": {"row": 101, "column": 50}}, {"id": 380, "type": "identifier", "text": "FloorEntity", "parent": 377, "children": [], "start_point": {"row": 101, "column": 50}, "end_point": {"row": 101, "column": 61}}, {"id": 381, "type": ">", "text": ">", "parent": 376, "children": [], "start_point": {"row": 101, "column": 61}, "end_point": {"row": 101, "column": 62}}, {"id": 382, "type": "parenthesized_expression", "text": "(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset)", "parent": 376, "children": [383], "start_point": {"row": 101, "column": 62}, "end_point": {"row": 102, "column": 29}}, {"id": 383, "type": "comma_expression", "text": "tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset", "parent": 382, "children": [384, 387], "start_point": {"row": 101, "column": 63}, "end_point": {"row": 102, "column": 28}}, {"id": 384, "type": "field_expression", "text": "tile.Entity", "parent": 383, "children": [385, 386], "start_point": {"row": 101, "column": 63}, "end_point": {"row": 101, "column": 74}}, {"id": 385, "type": "identifier", "text": "tile", "parent": 384, "children": [], "start_point": {"row": 101, "column": 63}, "end_point": {"row": 101, "column": 67}}, {"id": 386, "type": "field_identifier", "text": "Entity", "parent": 384, "children": [], "start_point": {"row": 101, "column": 68}, "end_point": {"row": 101, "column": 74}}, {"id": 387, "type": "binary_expression", "text": "tile.Center + offset", "parent": 383, "children": [388, 391, 392], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 28}}, {"id": 388, "type": "field_expression", "text": "tile.Center", "parent": 387, "children": [389, 390], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 19}}, {"id": 389, "type": "identifier", "text": "tile", "parent": 388, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 12}}, {"id": 390, "type": "field_identifier", "text": "Center", "parent": 388, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 19}}, {"id": 391, "type": "+", "text": "+", "parent": 387, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 21}}, {"id": 392, "type": "identifier", "text": "offset", "parent": 387, "children": [], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 28}}, {"id": 393, "type": "if_statement", "text": "if (ent != nullptr) {\n\t\t\t\t\t\tgs.addStaticEntity(std::move(ent));\n\n\t\t\t\t\t\t// create blocking ?\n\t\t\t\t\t\tif (tile.Collides == 1) {\n\t\t\t\t\t\t\t// todo : give correct angle here\n\t\t\t\t\t\t\tauto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n\t\t\t\t\t\t\tif (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgs.addStaticEntity(std::move(col));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogging::Fatal() << \"Unknown entity type: \" << tile.Type;\n\t\t\t\t\t}", "parent": 237, "children": [394, 484], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 123, "column": 6}}, {"id": 394, "type": "parenthesized_expression", "text": "(ent != nullptr)", "parent": 393, "children": [395], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 24}}, {"id": 395, "type": "binary_expression", "text": "ent != nullptr", "parent": 394, "children": [396, 397, 398], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 23}}, {"id": 396, "type": "identifier", "text": "ent", "parent": 395, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 12}}, {"id": 397, "type": "!=", "text": "!=", "parent": 395, "children": [], "start_point": {"row": 105, "column": 13}, "end_point": {"row": 105, "column": 15}}, {"id": 398, "type": "null", "text": "nullptr", "parent": 395, "children": [399], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 23}}, {"id": 399, "type": "nullptr", "text": "nullptr", "parent": 398, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 23}}, {"id": 400, "type": "call_expression", "text": "gs.addStaticEntity(std::move(ent))", "parent": 393, "children": [401, 404], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 40}}, {"id": 401, "type": "field_expression", "text": "gs.addStaticEntity", "parent": 400, "children": [402, 403], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 24}}, {"id": 402, "type": "identifier", "text": "gs", "parent": 401, "children": [], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 8}}, {"id": 403, "type": "field_identifier", "text": "addStaticEntity", "parent": 401, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 24}}, {"id": 404, "type": "argument_list", "text": "(std::move(ent))", "parent": 400, "children": [405, 407], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 40}}, {"id": 405, "type": "ERROR", "text": "std::", "parent": 404, "children": [406], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 30}}, {"id": 406, "type": "identifier", "text": "std", "parent": 405, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 28}}, {"id": 407, "type": "call_expression", "text": "move(ent)", "parent": 404, "children": [408, 409], "start_point": {"row": 106, "column": 30}, "end_point": {"row": 106, "column": 39}}, {"id": 408, "type": "identifier", "text": "move", "parent": 407, "children": [], "start_point": {"row": 106, "column": 30}, "end_point": {"row": 106, "column": 34}}, {"id": 409, "type": "argument_list", "text": "(ent)", "parent": 407, "children": [410], "start_point": {"row": 106, "column": 34}, "end_point": {"row": 106, "column": 39}}, {"id": 410, "type": "identifier", "text": "ent", "parent": 409, "children": [], "start_point": {"row": 106, "column": 35}, "end_point": {"row": 106, "column": 38}}, {"id": 411, "type": "if_statement", "text": "if (tile.Collides == 1) {\n\t\t\t\t\t\t\t// todo : give correct angle here\n\t\t\t\t\t\t\tauto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n\t\t\t\t\t\t\tif (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgs.addStaticEntity(std::move(col));\n\t\t\t\t\t\t}", "parent": 393, "children": [412], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 120, "column": 7}}, {"id": 412, "type": "parenthesized_expression", "text": "(tile.Collides == 1)", "parent": 411, "children": [413], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 29}}, {"id": 413, "type": "binary_expression", "text": "tile.Collides == 1", "parent": 412, "children": [414, 417, 418], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 28}}, {"id": 414, "type": "field_expression", "text": "tile.Collides", "parent": 413, "children": [415, 416], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 23}}, {"id": 415, "type": "identifier", "text": "tile", "parent": 414, "children": [], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 14}}, {"id": 416, "type": "field_identifier", "text": "Collides", "parent": 414, "children": [], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 23}}, {"id": 417, "type": "==", "text": "==", "parent": 413, "children": [], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 26}}, {"id": 418, "type": "number_literal", "text": "1", "parent": 413, "children": [], "start_point": {"row": 109, "column": 27}, "end_point": {"row": 109, "column": 28}}, {"id": 419, "type": "declaration", "text": "auto col = fact.template", "parent": 411, "children": [420, 422, 423], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 31}}, {"id": 420, "type": "storage_class_specifier", "text": "auto", "parent": 419, "children": [421], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 11}}, {"id": 421, "type": "auto", "text": "auto", "parent": 420, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 11}}, {"id": 422, "type": "type_identifier", "text": "col", "parent": 419, "children": [], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 15}}, {"id": 423, "type": "init_declarator", "text": " = fact.template", "parent": 419, "children": [424, 425, 426], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 31}}, {"id": 424, "type": "identifier", "text": "", "parent": 423, "children": [], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 15}}, {"id": 425, "type": "=", "text": "=", "parent": 423, "children": [], "start_point": {"row": 111, "column": 16}, "end_point": {"row": 111, "column": 17}}, {"id": 426, "type": "field_expression", "text": "fact.template", "parent": 423, "children": [427, 428], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 31}}, {"id": 427, "type": "identifier", "text": "fact", "parent": 426, "children": [], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 22}}, {"id": 428, "type": "field_identifier", "text": "template", "parent": 426, "children": [], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 31}}, {"id": 429, "type": "binary_expression", "text": "createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump)", "parent": 411, "children": [430, 434, 435], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 112, "column": 61}}, {"id": 430, "type": "binary_expression", "text": "createNonVisual<WallCollisionEntity", "parent": 429, "children": [431, 432, 433], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 67}}, {"id": 431, "type": "identifier", "text": "createNonVisual", "parent": 430, "children": [], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 47}}, {"id": 432, "type": "<", "text": "<", "parent": 430, "children": [], "start_point": {"row": 111, "column": 47}, "end_point": {"row": 111, "column": 48}}, {"id": 433, "type": "identifier", "text": "WallCollisionEntity", "parent": 430, "children": [], "start_point": {"row": 111, "column": 48}, "end_point": {"row": 111, "column": 67}}, {"id": 434, "type": ">", "text": ">", "parent": 429, "children": [], "start_point": {"row": 111, "column": 67}, "end_point": {"row": 111, "column": 68}}, {"id": 435, "type": "parenthesized_expression", "text": "(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump)", "parent": 429, "children": [436], "start_point": {"row": 111, "column": 68}, "end_point": {"row": 112, "column": 61}}, {"id": 436, "type": "comma_expression", "text": "tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump", "parent": 435, "children": [437, 443], "start_point": {"row": 111, "column": 69}, "end_point": {"row": 112, "column": 60}}, {"id": 437, "type": "binary_expression", "text": "tile.Center + offset", "parent": 436, "children": [438, 441, 442], "start_point": {"row": 111, "column": 69}, "end_point": {"row": 111, "column": 89}}, {"id": 438, "type": "field_expression", "text": "tile.Center", "parent": 437, "children": [439, 440], "start_point": {"row": 111, "column": 69}, "end_point": {"row": 111, "column": 80}}, {"id": 439, "type": "identifier", "text": "tile", "parent": 438, "children": [], "start_point": {"row": 111, "column": 69}, "end_point": {"row": 111, "column": 73}}, {"id": 440, "type": "field_identifier", "text": "Center", "parent": 438, "children": [], "start_point": {"row": 111, "column": 74}, "end_point": {"row": 111, "column": 80}}, {"id": 441, "type": "+", "text": "+", "parent": 437, "children": [], "start_point": {"row": 111, "column": 81}, "end_point": {"row": 111, "column": 82}}, {"id": 442, "type": "identifier", "text": "offset", "parent": 437, "children": [], "start_point": {"row": 111, "column": 83}, "end_point": {"row": 111, "column": 89}}, {"id": 443, "type": "comma_expression", "text": "boundSize, LayerPriorityBottom, tile.CollidesOnJump", "parent": 436, "children": [444, 445], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 60}}, {"id": 444, "type": "identifier", "text": "boundSize", "parent": 443, "children": [], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 18}}, {"id": 445, "type": "comma_expression", "text": "LayerPriorityBottom, tile.CollidesOnJump", "parent": 443, "children": [446, 447], "start_point": {"row": 112, "column": 20}, "end_point": {"row": 112, "column": 60}}, {"id": 446, "type": "identifier", "text": "LayerPriorityBottom", "parent": 445, "children": [], "start_point": {"row": 112, "column": 20}, "end_point": {"row": 112, "column": 39}}, {"id": 447, "type": "field_expression", "text": "tile.CollidesOnJump", "parent": 445, "children": [448, 449], "start_point": {"row": 112, "column": 41}, "end_point": {"row": 112, "column": 60}}, {"id": 448, "type": "identifier", "text": "tile", "parent": 447, "children": [], "start_point": {"row": 112, "column": 41}, "end_point": {"row": 112, "column": 45}}, {"id": 449, "type": "field_identifier", "text": "CollidesOnJump", "parent": 447, "children": [], "start_point": {"row": 112, "column": 46}, "end_point": {"row": 112, "column": 60}}, {"id": 450, "type": "if_statement", "text": "if (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}", "parent": 411, "children": [451], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 117, "column": 8}}, {"id": 451, "type": "parenthesized_expression", "text": "(!tile.CollidesOnJump)", "parent": 450, "children": [452], "start_point": {"row": 114, "column": 10}, "end_point": {"row": 114, "column": 32}}, {"id": 452, "type": "unary_expression", "text": "!tile.CollidesOnJump", "parent": 451, "children": [453, 454], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 31}}, {"id": 453, "type": "!", "text": "!", "parent": 452, "children": [], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 12}}, {"id": 454, "type": "field_expression", "text": "tile.CollidesOnJump", "parent": 452, "children": [455, 456], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 31}}, {"id": 455, "type": "identifier", "text": "tile", "parent": 454, "children": [], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 16}}, {"id": 456, "type": "field_identifier", "text": "CollidesOnJump", "parent": 454, "children": [], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 114, "column": 31}}, {"id": 457, "type": "call_expression", "text": "col->setCollisionGroup(GameCollisionGroups::StaticsJumpable)", "parent": 450, "children": [458, 461], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 68}}, {"id": 458, "type": "field_expression", "text": "col->setCollisionGroup", "parent": 457, "children": [459, 460], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 30}}, {"id": 459, "type": "identifier", "text": "col", "parent": 458, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 11}}, {"id": 460, "type": "field_identifier", "text": "setCollisionGroup", "parent": 458, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 30}}, {"id": 461, "type": "argument_list", "text": "(GameCollisionGroups::StaticsJumpable)", "parent": 457, "children": [462, 463], "start_point": {"row": 115, "column": 30}, "end_point": {"row": 115, "column": 68}}, {"id": 462, "type": "identifier", "text": "GameCollisionGroups", "parent": 461, "children": [], "start_point": {"row": 115, "column": 31}, "end_point": {"row": 115, "column": 50}}, {"id": 463, "type": "ERROR", "text": "::StaticsJumpable", "parent": 461, "children": [464], "start_point": {"row": 115, "column": 50}, "end_point": {"row": 115, "column": 67}}, {"id": 464, "type": "identifier", "text": "StaticsJumpable", "parent": 463, "children": [], "start_point": {"row": 115, "column": 52}, "end_point": {"row": 115, "column": 67}}, {"id": 465, "type": "call_expression", "text": "col->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith)", "parent": 450, "children": [466, 469], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 80}}, {"id": 466, "type": "field_expression", "text": "col->setCollisionMask", "parent": 465, "children": [467, 468], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 29}}, {"id": 467, "type": "identifier", "text": "col", "parent": 466, "children": [], "start_point": {"row": 116, "column": 8}, "end_point": {"row": 116, "column": 11}}, {"id": 468, "type": "field_identifier", "text": "setCollisionMask", "parent": 466, "children": [], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 29}}, {"id": 469, "type": "argument_list", "text": "(GameCollisionGroups::StaticsJumpable_CollidesWith)", "parent": 465, "children": [470, 472], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 80}}, {"id": 470, "type": "ERROR", "text": "GameCollisionGroups::", "parent": 469, "children": [471], "start_point": {"row": 116, "column": 30}, "end_point": {"row": 116, "column": 51}}, {"id": 471, "type": "identifier", "text": "GameCollisionGroups", "parent": 470, "children": [], "start_point": {"row": 116, "column": 30}, "end_point": {"row": 116, "column": 49}}, {"id": 472, "type": "identifier", "text": "StaticsJumpable_CollidesWith", "parent": 469, "children": [], "start_point": {"row": 116, "column": 51}, "end_point": {"row": 116, "column": 79}}, {"id": 473, "type": "call_expression", "text": "gs.addStaticEntity(std::move(col))", "parent": 411, "children": [474, 477], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 41}}, {"id": 474, "type": "field_expression", "text": "gs.addStaticEntity", "parent": 473, "children": [475, 476], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 25}}, {"id": 475, "type": "identifier", "text": "gs", "parent": 474, "children": [], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 9}}, {"id": 476, "type": "field_identifier", "text": "addStaticEntity", "parent": 474, "children": [], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 25}}, {"id": 477, "type": "argument_list", "text": "(std::move(col))", "parent": 473, "children": [478, 480], "start_point": {"row": 119, "column": 25}, "end_point": {"row": 119, "column": 41}}, {"id": 478, "type": "ERROR", "text": "std::", "parent": 477, "children": [479], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 31}}, {"id": 479, "type": "identifier", "text": "std", "parent": 478, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 29}}, {"id": 480, "type": "call_expression", "text": "move(col)", "parent": 477, "children": [481, 482], "start_point": {"row": 119, "column": 31}, "end_point": {"row": 119, "column": 40}}, {"id": 481, "type": "identifier", "text": "move", "parent": 480, "children": [], "start_point": {"row": 119, "column": 31}, "end_point": {"row": 119, "column": 35}}, {"id": 482, "type": "argument_list", "text": "(col)", "parent": 480, "children": [483], "start_point": {"row": 119, "column": 35}, "end_point": {"row": 119, "column": 40}}, {"id": 483, "type": "identifier", "text": "col", "parent": 482, "children": [], "start_point": {"row": 119, "column": 36}, "end_point": {"row": 119, "column": 39}}, {"id": 484, "type": "else_clause", "text": "else {\n\t\t\t\t\t\tlogging::Fatal() << \"Unknown entity type: \" << tile.Type;\n\t\t\t\t\t}", "parent": 393, "children": [], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 123, "column": 6}}, {"id": 485, "type": "labeled_statement", "text": "logging::Fatal() << \"Unknown entity type: \" << tile.Type;", "parent": 484, "children": [486], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 63}}, {"id": 486, "type": "statement_identifier", "text": "logging", "parent": 485, "children": [], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 13}}, {"id": 487, "type": "binary_expression", "text": "Fatal() << \"Unknown entity type: \" << tile.Type", "parent": 485, "children": [488, 494, 495], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 62}}, {"id": 488, "type": "binary_expression", "text": "Fatal() << \"Unknown entity type: \"", "parent": 487, "children": [489, 492, 493], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 49}}, {"id": 489, "type": "call_expression", "text": "Fatal()", "parent": 488, "children": [490, 491], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 22}}, {"id": 490, "type": "identifier", "text": "Fatal", "parent": 489, "children": [], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 20}}, {"id": 491, "type": "argument_list", "text": "()", "parent": 489, "children": [], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 22}}, {"id": 492, "type": "<<", "text": "<<", "parent": 488, "children": [], "start_point": {"row": 122, "column": 23}, "end_point": {"row": 122, "column": 25}}, {"id": 493, "type": "string_literal", "text": "\"Unknown entity type: \"", "parent": 488, "children": [], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 49}}, {"id": 494, "type": "<<", "text": "<<", "parent": 487, "children": [], "start_point": {"row": 122, "column": 50}, "end_point": {"row": 122, "column": 52}}, {"id": 495, "type": "field_expression", "text": "tile.Type", "parent": 487, "children": [496, 497], "start_point": {"row": 122, "column": 53}, "end_point": {"row": 122, "column": 62}}, {"id": 496, "type": "identifier", "text": "tile", "parent": 495, "children": [], "start_point": {"row": 122, "column": 53}, "end_point": {"row": 122, "column": 57}}, {"id": 497, "type": "field_identifier", "text": "Type", "parent": 495, "children": [], "start_point": {"row": 122, "column": 58}, "end_point": {"row": 122, "column": 62}}, {"id": 498, "type": "type_definition", "text": "typedef std::vector<std::string> LevelFragmentsName;", "parent": null, "children": [499, 500, 501, 507], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 52}}, {"id": 499, "type": "typedef", "text": "typedef", "parent": 498, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 7}}, {"id": 500, "type": "type_identifier", "text": "std", "parent": 498, "children": [], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 11}}, {"id": 501, "type": "ERROR", "text": "::vector<std::string>", "parent": 498, "children": [502, 503, 504, 505, 506], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 32}}, {"id": 502, "type": "type_identifier", "text": "vector", "parent": 501, "children": [], "start_point": {"row": 131, "column": 13}, "end_point": {"row": 131, "column": 19}}, {"id": 503, "type": "<", "text": "<", "parent": 501, "children": [], "start_point": {"row": 131, "column": 19}, "end_point": {"row": 131, "column": 20}}, {"id": 504, "type": "type_identifier", "text": "std", "parent": 501, "children": [], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 23}}, {"id": 505, "type": "type_identifier", "text": "string", "parent": 501, "children": [], "start_point": {"row": 131, "column": 25}, "end_point": {"row": 131, "column": 31}}, {"id": 506, "type": ">", "text": ">", "parent": 501, "children": [], "start_point": {"row": 131, "column": 31}, "end_point": {"row": 131, "column": 32}}, {"id": 507, "type": "type_identifier", "text": "LevelFragmentsName", "parent": 498, "children": [], "start_point": {"row": 131, "column": 33}, "end_point": {"row": 131, "column": 51}}, {"id": 508, "type": "function_definition", "text": "class LevelFactory: boost::noncopyable {\npublic:\n\n\tLevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n\t\t\tm_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0) {\n\n\t\tLevelLoader loader;\n\n\t\tfor (std::string const & fr : fragments) {\n\t\t\tLevelFragment frag;\n\t\t\tfrag.Name = fr;\n\t\t\tconst std::string xmlInp = re.loadLevel(fr);\n\n\t\t\ttry {\n\t\t\t\tloader.loadFragment(xmlInp, frag);\n\t\t\t} catch (LevelParsingException & ex) {\n\t\t\t\tlogging::Error() << \"Level \" << fr << \" can not be parsed\";\n\t\t\t}\n\t\t\tm_fragments.push_back(frag);\n\t\t}\n\t}\n\n\tvoid loadFragment(GameState & gs, std::string const& fragName);\n\n\tvoid nextLayers(GameState & gs, unsigned int amount);\n\n\tbool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const;\n\n\tvoid collisionTestLevel(GameState & gs);\n\n\tvoid renderTestLevel(GameState & gs);\n\n\tvoid reset();\n\n\ttemplate<class TEnemy>\n\tvoid addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n\t\t\tLevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact) {\n\n\t\tconst int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n\t\t\t\t+ thisLayer;\n\t\tconst int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));\n\n\t\tconst Vector2 idealPosition(locX, locY);\n\t\t// really ugly, but know of no other way right now\n\t\t//Vector2 bndBox = DefaultFighterBoundingBox;\n\t\t// bndBox.getRadius();\n\n\t\tstd::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n\t\t\t\tenemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);\n\n\t\tif (bestPlacement.first) {\n\t\t\tauto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n\t\t\tgs.addEnemyEntity(std::move(entEnemy));\n\t\t} else {\n\t\t\tlogging::Info() << \"no valid placement found for enemy\";\n\t\t}\n\t}\n\nprivate:\n\tEngines m_engines;\n\tEntityFactory m_fact;\n\tLevelFragment const* m_lastFragment;\n\tstd::vector<LevelFragment> m_fragments;\n\tunsigned int m_currentLayer;\n}", "parent": null, "children": [509, 510], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 198, "column": 1}}, {"id": 509, "type": "identifier", "text": "LevelFactory", "parent": 508, "children": [], "start_point": {"row": 133, "column": 6}, "end_point": {"row": 133, "column": 18}}, {"id": 510, "type": "ERROR", "text": ": boost::noncopyable", "parent": 508, "children": [511, 512], "start_point": {"row": 133, "column": 18}, "end_point": {"row": 133, "column": 38}}, {"id": 511, "type": "identifier", "text": "boost", "parent": 510, "children": [], "start_point": {"row": 133, "column": 20}, "end_point": {"row": 133, "column": 25}}, {"id": 512, "type": "identifier", "text": "noncopyable", "parent": 510, "children": [], "start_point": {"row": 133, "column": 27}, "end_point": {"row": 133, "column": 38}}, {"id": 513, "type": "labeled_statement", "text": "public:\n\n\tLevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n\t\t\tm_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)", "parent": 508, "children": [514], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 137, "column": 82}}, {"id": 514, "type": "ERROR", "text": "LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :", "parent": 513, "children": [515], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 92}}, {"id": 515, "type": "call_expression", "text": "LevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re)", "parent": 514, "children": [516, 517], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 90}}, {"id": 516, "type": "identifier", "text": "LevelFactory", "parent": 515, "children": [], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 13}}, {"id": 517, "type": "argument_list", "text": "(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re)", "parent": 515, "children": [518, 521, 524], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 90}}, {"id": 518, "type": "binary_expression", "text": "Engines & engines", "parent": 517, "children": [519, 520], "start_point": {"row": 136, "column": 14}, "end_point": {"row": 136, "column": 31}}, {"id": 519, "type": "identifier", "text": "Engines", "parent": 518, "children": [], "start_point": {"row": 136, "column": 14}, "end_point": {"row": 136, "column": 21}}, {"id": 520, "type": "identifier", "text": "engines", "parent": 518, "children": [], "start_point": {"row": 136, "column": 24}, "end_point": {"row": 136, "column": 31}}, {"id": 521, "type": "binary_expression", "text": "LevelFragmentsName const& fragments", "parent": 517, "children": [522, 523], "start_point": {"row": 136, "column": 33}, "end_point": {"row": 136, "column": 68}}, {"id": 522, "type": "identifier", "text": "LevelFragmentsName", "parent": 521, "children": [], "start_point": {"row": 136, "column": 33}, "end_point": {"row": 136, "column": 51}}, {"id": 523, "type": "identifier", "text": "fragments", "parent": 521, "children": [], "start_point": {"row": 136, "column": 59}, "end_point": {"row": 136, "column": 68}}, {"id": 524, "type": "binary_expression", "text": "ResourceEngine & re", "parent": 517, "children": [525, 526], "start_point": {"row": 136, "column": 70}, "end_point": {"row": 136, "column": 89}}, {"id": 525, "type": "identifier", "text": "ResourceEngine", "parent": 524, "children": [], "start_point": {"row": 136, "column": 70}, "end_point": {"row": 136, "column": 84}}, {"id": 526, "type": "identifier", "text": "re", "parent": 524, "children": [], "start_point": {"row": 136, "column": 87}, "end_point": {"row": 136, "column": 89}}, {"id": 527, "type": "comma_expression", "text": "m_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)", "parent": 513, "children": [528, 532], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 137, "column": 82}}, {"id": 528, "type": "call_expression", "text": "m_engines(engines)", "parent": 527, "children": [529, 530], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 137, "column": 21}}, {"id": 529, "type": "identifier", "text": "m_engines", "parent": 528, "children": [], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 137, "column": 12}}, {"id": 530, "type": "argument_list", "text": "(engines)", "parent": 528, "children": [531], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 21}}, {"id": 531, "type": "identifier", "text": "engines", "parent": 530, "children": [], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 20}}, {"id": 532, "type": "comma_expression", "text": "m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0)", "parent": 527, "children": [533, 537], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 82}}, {"id": 533, "type": "call_expression", "text": "m_fact(engines)", "parent": 532, "children": [534, 535], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 38}}, {"id": 534, "type": "identifier", "text": "m_fact", "parent": 533, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 29}}, {"id": 535, "type": "argument_list", "text": "(engines)", "parent": 533, "children": [536], "start_point": {"row": 137, "column": 29}, "end_point": {"row": 137, "column": 38}}, {"id": 536, "type": "identifier", "text": "engines", "parent": 535, "children": [], "start_point": {"row": 137, "column": 30}, "end_point": {"row": 137, "column": 37}}, {"id": 537, "type": "comma_expression", "text": "m_lastFragment(nullptr), m_currentLayer(0)", "parent": 532, "children": [538, 543], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 82}}, {"id": 538, "type": "call_expression", "text": "m_lastFragment(nullptr)", "parent": 537, "children": [539, 540], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 63}}, {"id": 539, "type": "identifier", "text": "m_lastFragment", "parent": 538, "children": [], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 54}}, {"id": 540, "type": "argument_list", "text": "(nullptr)", "parent": 538, "children": [541], "start_point": {"row": 137, "column": 54}, "end_point": {"row": 137, "column": 63}}, {"id": 541, "type": "null", "text": "nullptr", "parent": 540, "children": [542], "start_point": {"row": 137, "column": 55}, "end_point": {"row": 137, "column": 62}}, {"id": 542, "type": "nullptr", "text": "nullptr", "parent": 541, "children": [], "start_point": {"row": 137, "column": 55}, "end_point": {"row": 137, "column": 62}}, {"id": 543, "type": "call_expression", "text": "m_currentLayer(0)", "parent": 537, "children": [544, 545], "start_point": {"row": 137, "column": 65}, "end_point": {"row": 137, "column": 82}}, {"id": 544, "type": "identifier", "text": "m_currentLayer", "parent": 543, "children": [], "start_point": {"row": 137, "column": 65}, "end_point": {"row": 137, "column": 79}}, {"id": 545, "type": "argument_list", "text": "(0)", "parent": 543, "children": [546], "start_point": {"row": 137, "column": 79}, "end_point": {"row": 137, "column": 82}}, {"id": 546, "type": "number_literal", "text": "0", "parent": 545, "children": [], "start_point": {"row": 137, "column": 80}, "end_point": {"row": 137, "column": 81}}, {"id": 547, "type": "declaration", "text": "LevelLoader loader;", "parent": 508, "children": [548, 549], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 21}}, {"id": 548, "type": "type_identifier", "text": "LevelLoader", "parent": 547, "children": [], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 13}}, {"id": 549, "type": "identifier", "text": "loader", "parent": 547, "children": [], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 20}}, {"id": 550, "type": "ERROR", "text": "for (std::string const & fr : fragments)", "parent": 508, "children": [551, 554, 556], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 42}}, {"id": 551, "type": "declaration", "text": "std::string", "parent": 550, "children": [552, 553], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 18}}, {"id": 552, "type": "type_identifier", "text": "std", "parent": 551, "children": [], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 10}}, {"id": 553, "type": "identifier", "text": "string", "parent": 551, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 18}}, {"id": 554, "type": "binary_expression", "text": "const & fr", "parent": 550, "children": [555], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 141, "column": 29}}, {"id": 555, "type": "identifier", "text": "fr", "parent": 554, "children": [], "start_point": {"row": 141, "column": 27}, "end_point": {"row": 141, "column": 29}}, {"id": 556, "type": "identifier", "text": "fragments", "parent": 550, "children": [], "start_point": {"row": 141, "column": 32}, "end_point": {"row": 141, "column": 41}}, {"id": 557, "type": "declaration", "text": "LevelFragment frag;", "parent": 508, "children": [558, 559], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 22}}, {"id": 558, "type": "type_identifier", "text": "LevelFragment", "parent": 557, "children": [], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 16}}, {"id": 559, "type": "identifier", "text": "frag", "parent": 557, "children": [], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 21}}, {"id": 560, "type": "assignment_expression", "text": "frag.Name = fr", "parent": 508, "children": [561, 564, 565], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 17}}, {"id": 561, "type": "field_expression", "text": "frag.Name", "parent": 560, "children": [562, 563], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 12}}, {"id": 562, "type": "identifier", "text": "frag", "parent": 561, "children": [], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 7}}, {"id": 563, "type": "field_identifier", "text": "Name", "parent": 561, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 12}}, {"id": 564, "type": "=", "text": "=", "parent": 560, "children": [], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 14}}, {"id": 565, "type": "identifier", "text": "fr", "parent": 560, "children": [], "start_point": {"row": 143, "column": 15}, "end_point": {"row": 143, "column": 17}}, {"id": 566, "type": "declaration", "text": "const std::string xmlInp = re.loadLevel(fr);", "parent": 508, "children": [567, 568, 570], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 47}}, {"id": 567, "type": "type_identifier", "text": "std", "parent": 566, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 12}}, {"id": 568, "type": "ERROR", "text": "::string", "parent": 566, "children": [569], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 20}}, {"id": 569, "type": "identifier", "text": "string", "parent": 568, "children": [], "start_point": {"row": 144, "column": 14}, "end_point": {"row": 144, "column": 20}}, {"id": 570, "type": "init_declarator", "text": "xmlInp = re.loadLevel(fr)", "parent": 566, "children": [571, 572, 573], "start_point": {"row": 144, "column": 21}, "end_point": {"row": 144, "column": 46}}, {"id": 571, "type": "identifier", "text": "xmlInp", "parent": 570, "children": [], "start_point": {"row": 144, "column": 21}, "end_point": {"row": 144, "column": 27}}, {"id": 572, "type": "=", "text": "=", "parent": 570, "children": [], "start_point": {"row": 144, "column": 28}, "end_point": {"row": 144, "column": 29}}, {"id": 573, "type": "call_expression", "text": "re.loadLevel(fr)", "parent": 570, "children": [574, 577], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 46}}, {"id": 574, "type": "field_expression", "text": "re.loadLevel", "parent": 573, "children": [575, 576], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 42}}, {"id": 575, "type": "identifier", "text": "re", "parent": 574, "children": [], "start_point": {"row": 144, "column": 30}, "end_point": {"row": 144, "column": 32}}, {"id": 576, "type": "field_identifier", "text": "loadLevel", "parent": 574, "children": [], "start_point": {"row": 144, "column": 33}, "end_point": {"row": 144, "column": 42}}, {"id": 577, "type": "argument_list", "text": "(fr)", "parent": 573, "children": [578], "start_point": {"row": 144, "column": 42}, "end_point": {"row": 144, "column": 46}}, {"id": 578, "type": "identifier", "text": "fr", "parent": 577, "children": [], "start_point": {"row": 144, "column": 43}, "end_point": {"row": 144, "column": 45}}, {"id": 579, "type": "call_expression", "text": "loader.loadFragment(xmlInp, frag)", "parent": 508, "children": [580, 583], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 37}}, {"id": 580, "type": "field_expression", "text": "loader.loadFragment", "parent": 579, "children": [581, 582], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 23}}, {"id": 581, "type": "identifier", "text": "loader", "parent": 580, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 10}}, {"id": 582, "type": "field_identifier", "text": "loadFragment", "parent": 580, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 23}}, {"id": 583, "type": "argument_list", "text": "(xmlInp, frag)", "parent": 579, "children": [584, 585], "start_point": {"row": 147, "column": 23}, "end_point": {"row": 147, "column": 37}}, {"id": 584, "type": "identifier", "text": "xmlInp", "parent": 583, "children": [], "start_point": {"row": 147, "column": 24}, "end_point": {"row": 147, "column": 30}}, {"id": 585, "type": "identifier", "text": "frag", "parent": 583, "children": [], "start_point": {"row": 147, "column": 32}, "end_point": {"row": 147, "column": 36}}, {"id": 586, "type": "call_expression", "text": "catch (LevelParsingException & ex)", "parent": 508, "children": [587], "start_point": {"row": 148, "column": 5}, "end_point": {"row": 148, "column": 39}}, {"id": 587, "type": "argument_list", "text": "(LevelParsingException & ex)", "parent": 586, "children": [588], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 39}}, {"id": 588, "type": "binary_expression", "text": "LevelParsingException & ex", "parent": 587, "children": [589, 590], "start_point": {"row": 148, "column": 12}, "end_point": {"row": 148, "column": 38}}, {"id": 589, "type": "identifier", "text": "LevelParsingException", "parent": 588, "children": [], "start_point": {"row": 148, "column": 12}, "end_point": {"row": 148, "column": 33}}, {"id": 590, "type": "identifier", "text": "ex", "parent": 588, "children": [], "start_point": {"row": 148, "column": 36}, "end_point": {"row": 148, "column": 38}}, {"id": 591, "type": "labeled_statement", "text": "logging::Error() << \"Level \" << fr << \" can not be parsed\";", "parent": 508, "children": [592], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 63}}, {"id": 592, "type": "statement_identifier", "text": "logging", "parent": 591, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 11}}, {"id": 593, "type": "binary_expression", "text": "Error() << \"Level \" << fr << \" can not be parsed\"", "parent": 591, "children": [594, 603, 604], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 62}}, {"id": 594, "type": "binary_expression", "text": "Error() << \"Level \" << fr", "parent": 593, "children": [595, 601, 602], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 38}}, {"id": 595, "type": "binary_expression", "text": "Error() << \"Level \"", "parent": 594, "children": [596, 599, 600], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 32}}, {"id": 596, "type": "call_expression", "text": "Error()", "parent": 595, "children": [597, 598], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 20}}, {"id": 597, "type": "identifier", "text": "Error", "parent": 596, "children": [], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 18}}, {"id": 598, "type": "argument_list", "text": "()", "parent": 596, "children": [], "start_point": {"row": 149, "column": 18}, "end_point": {"row": 149, "column": 20}}, {"id": 599, "type": "<<", "text": "<<", "parent": 595, "children": [], "start_point": {"row": 149, "column": 21}, "end_point": {"row": 149, "column": 23}}, {"id": 600, "type": "string_literal", "text": "\"Level \"", "parent": 595, "children": [], "start_point": {"row": 149, "column": 24}, "end_point": {"row": 149, "column": 32}}, {"id": 601, "type": "<<", "text": "<<", "parent": 594, "children": [], "start_point": {"row": 149, "column": 33}, "end_point": {"row": 149, "column": 35}}, {"id": 602, "type": "identifier", "text": "fr", "parent": 594, "children": [], "start_point": {"row": 149, "column": 36}, "end_point": {"row": 149, "column": 38}}, {"id": 603, "type": "<<", "text": "<<", "parent": 593, "children": [], "start_point": {"row": 149, "column": 39}, "end_point": {"row": 149, "column": 41}}, {"id": 604, "type": "string_literal", "text": "\" can not be parsed\"", "parent": 593, "children": [], "start_point": {"row": 149, "column": 42}, "end_point": {"row": 149, "column": 62}}, {"id": 605, "type": "call_expression", "text": "m_fragments.push_back(frag)", "parent": 508, "children": [606, 609], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 30}}, {"id": 606, "type": "field_expression", "text": "m_fragments.push_back", "parent": 605, "children": [607, 608], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 24}}, {"id": 607, "type": "identifier", "text": "m_fragments", "parent": 606, "children": [], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 14}}, {"id": 608, "type": "field_identifier", "text": "push_back", "parent": 606, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 24}}, {"id": 609, "type": "argument_list", "text": "(frag)", "parent": 605, "children": [610], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 30}}, {"id": 610, "type": "identifier", "text": "frag", "parent": 609, "children": [], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 29}}, {"id": 611, "type": "declaration", "text": "void loadFragment(GameState & gs, std::string const& fragName);", "parent": 508, "children": [612, 613], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 64}}, {"id": 612, "type": "primitive_type", "text": "void", "parent": 611, "children": [], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 5}}, {"id": 613, "type": "function_declarator", "text": "loadFragment(GameState & gs, std::string const& fragName)", "parent": 611, "children": [614, 615], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 63}}, {"id": 614, "type": "identifier", "text": "loadFragment", "parent": 613, "children": [], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 18}}, {"id": 615, "type": "parameter_list", "text": "(GameState & gs, std::string const& fragName)", "parent": 613, "children": [616, 619], "start_point": {"row": 155, "column": 18}, "end_point": {"row": 155, "column": 63}}, {"id": 616, "type": "parameter_declaration", "text": "GameState & gs", "parent": 615, "children": [617, 618], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 33}}, {"id": 617, "type": "type_identifier", "text": "GameState", "parent": 616, "children": [], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 28}}, {"id": 618, "type": "identifier", "text": "gs", "parent": 616, "children": [], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 33}}, {"id": 619, "type": "parameter_declaration", "text": "std::string const& fragName", "parent": 615, "children": [620, 621, 623], "start_point": {"row": 155, "column": 35}, "end_point": {"row": 155, "column": 62}}, {"id": 620, "type": "type_identifier", "text": "std", "parent": 619, "children": [], "start_point": {"row": 155, "column": 35}, "end_point": {"row": 155, "column": 38}}, {"id": 621, "type": "ERROR", "text": "::string const&", "parent": 619, "children": [622], "start_point": {"row": 155, "column": 38}, "end_point": {"row": 155, "column": 53}}, {"id": 622, "type": "identifier", "text": "string", "parent": 621, "children": [], "start_point": {"row": 155, "column": 40}, "end_point": {"row": 155, "column": 46}}, {"id": 623, "type": "identifier", "text": "fragName", "parent": 619, "children": [], "start_point": {"row": 155, "column": 54}, "end_point": {"row": 155, "column": 62}}, {"id": 624, "type": "declaration", "text": "void nextLayers(GameState & gs, unsigned int amount);", "parent": 508, "children": [625, 626], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 157, "column": 54}}, {"id": 625, "type": "primitive_type", "text": "void", "parent": 624, "children": [], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 157, "column": 5}}, {"id": 626, "type": "function_declarator", "text": "nextLayers(GameState & gs, unsigned int amount)", "parent": 624, "children": [627, 628], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 53}}, {"id": 627, "type": "identifier", "text": "nextLayers", "parent": 626, "children": [], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 16}}, {"id": 628, "type": "parameter_list", "text": "(GameState & gs, unsigned int amount)", "parent": 626, "children": [629, 632], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 53}}, {"id": 629, "type": "parameter_declaration", "text": "GameState & gs", "parent": 628, "children": [630, 631], "start_point": {"row": 157, "column": 17}, "end_point": {"row": 157, "column": 31}}, {"id": 630, "type": "type_identifier", "text": "GameState", "parent": 629, "children": [], "start_point": {"row": 157, "column": 17}, "end_point": {"row": 157, "column": 26}}, {"id": 631, "type": "identifier", "text": "gs", "parent": 629, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 31}}, {"id": 632, "type": "parameter_declaration", "text": "unsigned int amount", "parent": 628, "children": [633, 636], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 52}}, {"id": 633, "type": "sized_type_specifier", "text": "unsigned int", "parent": 632, "children": [634, 635], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 45}}, {"id": 634, "type": "unsigned", "text": "unsigned", "parent": 633, "children": [], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 41}}, {"id": 635, "type": "primitive_type", "text": "int", "parent": 633, "children": [], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 45}}, {"id": 636, "type": "identifier", "text": "amount", "parent": 632, "children": [], "start_point": {"row": 157, "column": 46}, "end_point": {"row": 157, "column": 52}}, {"id": 637, "type": "ERROR", "text": "bool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const", "parent": 508, "children": [638, 639], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 84}}, {"id": 638, "type": "primitive_type", "text": "bool", "parent": 637, "children": [], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 5}}, {"id": 639, "type": "function_declarator", "text": "canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const", "parent": 637, "children": [640, 641], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 84}}, {"id": 640, "type": "identifier", "text": "canConnect", "parent": 639, "children": [], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 16}}, {"id": 641, "type": "parameter_list", "text": "(LevelFragment const& prevFrag, LevelFragment const& nextFrag)", "parent": 639, "children": [642, 645], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 78}}, {"id": 642, "type": "parameter_declaration", "text": "LevelFragment const& prevFrag", "parent": 641, "children": [643, 644], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 46}}, {"id": 643, "type": "type_identifier", "text": "LevelFragment", "parent": 642, "children": [], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 30}}, {"id": 644, "type": "identifier", "text": "prevFrag", "parent": 642, "children": [], "start_point": {"row": 159, "column": 38}, "end_point": {"row": 159, "column": 46}}, {"id": 645, "type": "parameter_declaration", "text": "LevelFragment const& nextFrag", "parent": 641, "children": [646, 647], "start_point": {"row": 159, "column": 48}, "end_point": {"row": 159, "column": 77}}, {"id": 646, "type": "type_identifier", "text": "LevelFragment", "parent": 645, "children": [], "start_point": {"row": 159, "column": 48}, "end_point": {"row": 159, "column": 61}}, {"id": 647, "type": "identifier", "text": "nextFrag", "parent": 645, "children": [], "start_point": {"row": 159, "column": 69}, "end_point": {"row": 159, "column": 77}}, {"id": 648, "type": "declaration", "text": "void collisionTestLevel(GameState & gs);", "parent": 508, "children": [649, 650], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 41}}, {"id": 649, "type": "primitive_type", "text": "void", "parent": 648, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 5}}, {"id": 650, "type": "function_declarator", "text": "collisionTestLevel(GameState & gs)", "parent": 648, "children": [651, 652], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 40}}, {"id": 651, "type": "identifier", "text": "collisionTestLevel", "parent": 650, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 24}}, {"id": 652, "type": "parameter_list", "text": "(GameState & gs)", "parent": 650, "children": [653], "start_point": {"row": 161, "column": 24}, "end_point": {"row": 161, "column": 40}}, {"id": 653, "type": "parameter_declaration", "text": "GameState & gs", "parent": 652, "children": [654, 655], "start_point": {"row": 161, "column": 25}, "end_point": {"row": 161, "column": 39}}, {"id": 654, "type": "type_identifier", "text": "GameState", "parent": 653, "children": [], "start_point": {"row": 161, "column": 25}, "end_point": {"row": 161, "column": 34}}, {"id": 655, "type": "identifier", "text": "gs", "parent": 653, "children": [], "start_point": {"row": 161, "column": 37}, "end_point": {"row": 161, "column": 39}}, {"id": 656, "type": "declaration", "text": "void renderTestLevel(GameState & gs);", "parent": 508, "children": [657, 658], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 38}}, {"id": 657, "type": "primitive_type", "text": "void", "parent": 656, "children": [], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 5}}, {"id": 658, "type": "function_declarator", "text": "renderTestLevel(GameState & gs)", "parent": 656, "children": [659, 660], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 37}}, {"id": 659, "type": "identifier", "text": "renderTestLevel", "parent": 658, "children": [], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 21}}, {"id": 660, "type": "parameter_list", "text": "(GameState & gs)", "parent": 658, "children": [661], "start_point": {"row": 163, "column": 21}, "end_point": {"row": 163, "column": 37}}, {"id": 661, "type": "parameter_declaration", "text": "GameState & gs", "parent": 660, "children": [662, 663], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 36}}, {"id": 662, "type": "type_identifier", "text": "GameState", "parent": 661, "children": [], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 31}}, {"id": 663, "type": "identifier", "text": "gs", "parent": 661, "children": [], "start_point": {"row": 163, "column": 34}, "end_point": {"row": 163, "column": 36}}, {"id": 664, "type": "declaration", "text": "void reset();", "parent": 508, "children": [665, 666], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 14}}, {"id": 665, "type": "primitive_type", "text": "void", "parent": 664, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 5}}, {"id": 666, "type": "function_declarator", "text": "reset()", "parent": 664, "children": [667, 668], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 13}}, {"id": 667, "type": "identifier", "text": "reset", "parent": 666, "children": [], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 11}}, {"id": 668, "type": "parameter_list", "text": "()", "parent": 666, "children": [], "start_point": {"row": 165, "column": 11}, "end_point": {"row": 165, "column": 13}}, {"id": 669, "type": "binary_expression", "text": "template<class TEnemy>\n\tvoid addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n\t\t\tLevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)", "parent": 508, "children": [670, 674, 675, 677], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 169, "column": 82}}, {"id": 670, "type": "binary_expression", "text": "template<class TEnemy", "parent": 669, "children": [671, 672, 673], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 167, "column": 22}}, {"id": 671, "type": "identifier", "text": "template", "parent": 670, "children": [], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 167, "column": 9}}, {"id": 672, "type": "<", "text": "<", "parent": 670, "children": [], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 10}}, {"id": 673, "type": "identifier", "text": "TEnemy", "parent": 670, "children": [], "start_point": {"row": 167, "column": 16}, "end_point": {"row": 167, "column": 22}}, {"id": 674, "type": ">", "text": ">", "parent": 669, "children": [], "start_point": {"row": 167, "column": 22}, "end_point": {"row": 167, "column": 23}}, {"id": 675, "type": "ERROR", "text": "void", "parent": 669, "children": [676], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 5}}, {"id": 676, "type": "identifier", "text": "void", "parent": 675, "children": [], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 5}}, {"id": 677, "type": "call_expression", "text": "addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n\t\t\tLevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)", "parent": 669, "children": [678, 679], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 169, "column": 82}}, {"id": 678, "type": "identifier", "text": "addEnemy", "parent": 677, "children": [], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 14}}, {"id": 679, "type": "argument_list", "text": "(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n\t\t\tLevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact)", "parent": 677, "children": [680, 683, 684, 686, 687, 689, 690, 694, 696, 697, 700], "start_point": {"row": 168, "column": 14}, "end_point": {"row": 169, "column": 82}}, {"id": 680, "type": "ERROR", "text": "std::string", "parent": 679, "children": [681, 682], "start_point": {"row": 168, "column": 15}, "end_point": {"row": 168, "column": 26}}, {"id": 681, "type": "identifier", "text": "std", "parent": 680, "children": [], "start_point": {"row": 168, "column": 15}, "end_point": {"row": 168, "column": 18}}, {"id": 682, "type": "identifier", "text": "string", "parent": 680, "children": [], "start_point": {"row": 168, "column": 20}, "end_point": {"row": 168, "column": 26}}, {"id": 683, "type": "identifier", "text": "name", "parent": 679, "children": [], "start_point": {"row": 168, "column": 27}, "end_point": {"row": 168, "column": 31}}, {"id": 684, "type": "ERROR", "text": "float", "parent": 679, "children": [685], "start_point": {"row": 168, "column": 33}, "end_point": {"row": 168, "column": 38}}, {"id": 685, "type": "identifier", "text": "float", "parent": 684, "children": [], "start_point": {"row": 168, "column": 33}, "end_point": {"row": 168, "column": 38}}, {"id": 686, "type": "identifier", "text": "enemyCollisionRadius", "parent": 679, "children": [], "start_point": {"row": 168, "column": 39}, "end_point": {"row": 168, "column": 59}}, {"id": 687, "type": "ERROR", "text": "float", "parent": 679, "children": [688], "start_point": {"row": 168, "column": 61}, "end_point": {"row": 168, "column": 66}}, {"id": 688, "type": "identifier", "text": "float", "parent": 687, "children": [], "start_point": {"row": 168, "column": 61}, "end_point": {"row": 168, "column": 66}}, {"id": 689, "type": "identifier", "text": "maxPlacementRadius", "parent": 679, "children": [], "start_point": {"row": 168, "column": 67}, "end_point": {"row": 168, "column": 85}}, {"id": 690, "type": "binary_expression", "text": "LevelFragment const* frag", "parent": 679, "children": [691, 692, 693], "start_point": {"row": 169, "column": 3}, "end_point": {"row": 169, "column": 28}}, {"id": 691, "type": "identifier", "text": "LevelFragment", "parent": 690, "children": [], "start_point": {"row": 169, "column": 3}, "end_point": {"row": 169, "column": 16}}, {"id": 692, "type": "*", "text": "*", "parent": 690, "children": [], "start_point": {"row": 169, "column": 22}, "end_point": {"row": 169, "column": 23}}, {"id": 693, "type": "identifier", "text": "frag", "parent": 690, "children": [], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 28}}, {"id": 694, "type": "ERROR", "text": "int", "parent": 679, "children": [695], "start_point": {"row": 169, "column": 30}, "end_point": {"row": 169, "column": 33}}, {"id": 695, "type": "identifier", "text": "int", "parent": 694, "children": [], "start_point": {"row": 169, "column": 30}, "end_point": {"row": 169, "column": 33}}, {"id": 696, "type": "identifier", "text": "thisLayer", "parent": 679, "children": [], "start_point": {"row": 169, "column": 34}, "end_point": {"row": 169, "column": 43}}, {"id": 697, "type": "binary_expression", "text": "GameState & gs", "parent": 679, "children": [698, 699], "start_point": {"row": 169, "column": 45}, "end_point": {"row": 169, "column": 59}}, {"id": 698, "type": "identifier", "text": "GameState", "parent": 697, "children": [], "start_point": {"row": 169, "column": 45}, "end_point": {"row": 169, "column": 54}}, {"id": 699, "type": "identifier", "text": "gs", "parent": 697, "children": [], "start_point": {"row": 169, "column": 57}, "end_point": {"row": 169, "column": 59}}, {"id": 700, "type": "binary_expression", "text": "EntityFactory & fact", "parent": 679, "children": [701, 702], "start_point": {"row": 169, "column": 61}, "end_point": {"row": 169, "column": 81}}, {"id": 701, "type": "identifier", "text": "EntityFactory", "parent": 700, "children": [], "start_point": {"row": 169, "column": 61}, "end_point": {"row": 169, "column": 74}}, {"id": 702, "type": "identifier", "text": "fact", "parent": 700, "children": [], "start_point": {"row": 169, "column": 77}, "end_point": {"row": 169, "column": 81}}, {"id": 703, "type": "declaration", "text": "const int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n\t\t\t\t+ thisLayer;", "parent": 508, "children": [704, 705], "start_point": {"row": 171, "column": 2}, "end_point": {"row": 172, "column": 16}}, {"id": 704, "type": "primitive_type", "text": "int", "parent": 703, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 11}}, {"id": 705, "type": "init_declarator", "text": "locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n\t\t\t\t+ thisLayer", "parent": 703, "children": [706, 707, 708], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 172, "column": 15}}, {"id": 706, "type": "identifier", "text": "locY", "parent": 705, "children": [], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 16}}, {"id": 707, "type": "=", "text": "=", "parent": 705, "children": [], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 18}}, {"id": 708, "type": "binary_expression", "text": "gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n\t\t\t\t+ thisLayer", "parent": 705, "children": [709, 735, 736], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 172, "column": 15}}, {"id": 709, "type": "call_expression", "text": "gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))", "parent": 708, "children": [710, 721], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 101}}, {"id": 710, "type": "field_expression", "text": "gs.getEngines().randomEngine().randomInt", "parent": 709, "children": [711, 720], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 59}}, {"id": 711, "type": "call_expression", "text": "gs.getEngines().randomEngine()", "parent": 710, "children": [712, 719], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 49}}, {"id": 712, "type": "field_expression", "text": "gs.getEngines().randomEngine", "parent": 711, "children": [713, 718], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 47}}, {"id": 713, "type": "call_expression", "text": "gs.getEngines()", "parent": 712, "children": [714, 717], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 34}}, {"id": 714, "type": "field_expression", "text": "gs.getEngines", "parent": 713, "children": [715, 716], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 32}}, {"id": 715, "type": "identifier", "text": "gs", "parent": 714, "children": [], "start_point": {"row": 171, "column": 19}, "end_point": {"row": 171, "column": 21}}, {"id": 716, "type": "field_identifier", "text": "getEngines", "parent": 714, "children": [], "start_point": {"row": 171, "column": 22}, "end_point": {"row": 171, "column": 32}}, {"id": 717, "type": "argument_list", "text": "()", "parent": 713, "children": [], "start_point": {"row": 171, "column": 32}, "end_point": {"row": 171, "column": 34}}, {"id": 718, "type": "field_identifier", "text": "randomEngine", "parent": 712, "children": [], "start_point": {"row": 171, "column": 35}, "end_point": {"row": 171, "column": 47}}, {"id": 719, "type": "argument_list", "text": "()", "parent": 711, "children": [], "start_point": {"row": 171, "column": 47}, "end_point": {"row": 171, "column": 49}}, {"id": 720, "type": "field_identifier", "text": "randomInt", "parent": 710, "children": [], "start_point": {"row": 171, "column": 50}, "end_point": {"row": 171, "column": 59}}, {"id": 721, "type": "argument_list", "text": "(RandomEngine::SpanInt(0, frag->Size.y()))", "parent": 709, "children": [722, 724], "start_point": {"row": 171, "column": 59}, "end_point": {"row": 171, "column": 101}}, {"id": 722, "type": "ERROR", "text": "RandomEngine::", "parent": 721, "children": [723], "start_point": {"row": 171, "column": 60}, "end_point": {"row": 171, "column": 74}}, {"id": 723, "type": "identifier", "text": "RandomEngine", "parent": 722, "children": [], "start_point": {"row": 171, "column": 60}, "end_point": {"row": 171, "column": 72}}, {"id": 724, "type": "call_expression", "text": "SpanInt(0, frag->Size.y())", "parent": 721, "children": [725, 726], "start_point": {"row": 171, "column": 74}, "end_point": {"row": 171, "column": 100}}, {"id": 725, "type": "identifier", "text": "SpanInt", "parent": 724, "children": [], "start_point": {"row": 171, "column": 74}, "end_point": {"row": 171, "column": 81}}, {"id": 726, "type": "argument_list", "text": "(0, frag->Size.y())", "parent": 724, "children": [727, 728], "start_point": {"row": 171, "column": 81}, "end_point": {"row": 171, "column": 100}}, {"id": 727, "type": "number_literal", "text": "0", "parent": 726, "children": [], "start_point": {"row": 171, "column": 82}, "end_point": {"row": 171, "column": 83}}, {"id": 728, "type": "call_expression", "text": "frag->Size.y()", "parent": 726, "children": [729, 734], "start_point": {"row": 171, "column": 85}, "end_point": {"row": 171, "column": 99}}, {"id": 729, "type": "field_expression", "text": "frag->Size.y", "parent": 728, "children": [730, 733], "start_point": {"row": 171, "column": 85}, "end_point": {"row": 171, "column": 97}}, {"id": 730, "type": "field_expression", "text": "frag->Size", "parent": 729, "children": [731, 732], "start_point": {"row": 171, "column": 85}, "end_point": {"row": 171, "column": 95}}, {"id": 731, "type": "identifier", "text": "frag", "parent": 730, "children": [], "start_point": {"row": 171, "column": 85}, "end_point": {"row": 171, "column": 89}}, {"id": 732, "type": "field_identifier", "text": "Size", "parent": 730, "children": [], "start_point": {"row": 171, "column": 91}, "end_point": {"row": 171, "column": 95}}, {"id": 733, "type": "field_identifier", "text": "y", "parent": 729, "children": [], "start_point": {"row": 171, "column": 96}, "end_point": {"row": 171, "column": 97}}, {"id": 734, "type": "argument_list", "text": "()", "parent": 728, "children": [], "start_point": {"row": 171, "column": 97}, "end_point": {"row": 171, "column": 99}}, {"id": 735, "type": "+", "text": "+", "parent": 708, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 5}}, {"id": 736, "type": "identifier", "text": "thisLayer", "parent": 708, "children": [], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 15}}, {"id": 737, "type": "declaration", "text": "const int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));", "parent": 508, "children": [738, 739], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 102}}, {"id": 738, "type": "primitive_type", "text": "int", "parent": 737, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 11}}, {"id": 739, "type": "init_declarator", "text": "locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()))", "parent": 737, "children": [740, 741, 742], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 101}}, {"id": 740, "type": "identifier", "text": "locX", "parent": 739, "children": [], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 16}}, {"id": 741, "type": "=", "text": "=", "parent": 739, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 18}}, {"id": 742, "type": "call_expression", "text": "gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()))", "parent": 739, "children": [743, 754], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 101}}, {"id": 743, "type": "field_expression", "text": "gs.getEngines().randomEngine().randomInt", "parent": 742, "children": [744, 753], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 59}}, {"id": 744, "type": "call_expression", "text": "gs.getEngines().randomEngine()", "parent": 743, "children": [745, 752], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 49}}, {"id": 745, "type": "field_expression", "text": "gs.getEngines().randomEngine", "parent": 744, "children": [746, 751], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 47}}, {"id": 746, "type": "call_expression", "text": "gs.getEngines()", "parent": 745, "children": [747, 750], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 34}}, {"id": 747, "type": "field_expression", "text": "gs.getEngines", "parent": 746, "children": [748, 749], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 32}}, {"id": 748, "type": "identifier", "text": "gs", "parent": 747, "children": [], "start_point": {"row": 173, "column": 19}, "end_point": {"row": 173, "column": 21}}, {"id": 749, "type": "field_identifier", "text": "getEngines", "parent": 747, "children": [], "start_point": {"row": 173, "column": 22}, "end_point": {"row": 173, "column": 32}}, {"id": 750, "type": "argument_list", "text": "()", "parent": 746, "children": [], "start_point": {"row": 173, "column": 32}, "end_point": {"row": 173, "column": 34}}, {"id": 751, "type": "field_identifier", "text": "randomEngine", "parent": 745, "children": [], "start_point": {"row": 173, "column": 35}, "end_point": {"row": 173, "column": 47}}, {"id": 752, "type": "argument_list", "text": "()", "parent": 744, "children": [], "start_point": {"row": 173, "column": 47}, "end_point": {"row": 173, "column": 49}}, {"id": 753, "type": "field_identifier", "text": "randomInt", "parent": 743, "children": [], "start_point": {"row": 173, "column": 50}, "end_point": {"row": 173, "column": 59}}, {"id": 754, "type": "argument_list", "text": "(RandomEngine::SpanInt(0, frag->Size.x()))", "parent": 742, "children": [755, 757], "start_point": {"row": 173, "column": 59}, "end_point": {"row": 173, "column": 101}}, {"id": 755, "type": "ERROR", "text": "RandomEngine::", "parent": 754, "children": [756], "start_point": {"row": 173, "column": 60}, "end_point": {"row": 173, "column": 74}}, {"id": 756, "type": "identifier", "text": "RandomEngine", "parent": 755, "children": [], "start_point": {"row": 173, "column": 60}, "end_point": {"row": 173, "column": 72}}, {"id": 757, "type": "call_expression", "text": "SpanInt(0, frag->Size.x())", "parent": 754, "children": [758, 759], "start_point": {"row": 173, "column": 74}, "end_point": {"row": 173, "column": 100}}, {"id": 758, "type": "identifier", "text": "SpanInt", "parent": 757, "children": [], "start_point": {"row": 173, "column": 74}, "end_point": {"row": 173, "column": 81}}, {"id": 759, "type": "argument_list", "text": "(0, frag->Size.x())", "parent": 757, "children": [760, 761], "start_point": {"row": 173, "column": 81}, "end_point": {"row": 173, "column": 100}}, {"id": 760, "type": "number_literal", "text": "0", "parent": 759, "children": [], "start_point": {"row": 173, "column": 82}, "end_point": {"row": 173, "column": 83}}, {"id": 761, "type": "call_expression", "text": "frag->Size.x()", "parent": 759, "children": [762, 767], "start_point": {"row": 173, "column": 85}, "end_point": {"row": 173, "column": 99}}, {"id": 762, "type": "field_expression", "text": "frag->Size.x", "parent": 761, "children": [763, 766], "start_point": {"row": 173, "column": 85}, "end_point": {"row": 173, "column": 97}}, {"id": 763, "type": "field_expression", "text": "frag->Size", "parent": 762, "children": [764, 765], "start_point": {"row": 173, "column": 85}, "end_point": {"row": 173, "column": 95}}, {"id": 764, "type": "identifier", "text": "frag", "parent": 763, "children": [], "start_point": {"row": 173, "column": 85}, "end_point": {"row": 173, "column": 89}}, {"id": 765, "type": "field_identifier", "text": "Size", "parent": 763, "children": [], "start_point": {"row": 173, "column": 91}, "end_point": {"row": 173, "column": 95}}, {"id": 766, "type": "field_identifier", "text": "x", "parent": 762, "children": [], "start_point": {"row": 173, "column": 96}, "end_point": {"row": 173, "column": 97}}, {"id": 767, "type": "argument_list", "text": "()", "parent": 761, "children": [], "start_point": {"row": 173, "column": 97}, "end_point": {"row": 173, "column": 99}}, {"id": 768, "type": "declaration", "text": "const Vector2 idealPosition(locX, locY);", "parent": 508, "children": [769, 770], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 175, "column": 42}}, {"id": 769, "type": "type_identifier", "text": "Vector2", "parent": 768, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 15}}, {"id": 770, "type": "function_declarator", "text": "idealPosition(locX, locY)", "parent": 768, "children": [771, 772], "start_point": {"row": 175, "column": 16}, "end_point": {"row": 175, "column": 41}}, {"id": 771, "type": "identifier", "text": "idealPosition", "parent": 770, "children": [], "start_point": {"row": 175, "column": 16}, "end_point": {"row": 175, "column": 29}}, {"id": 772, "type": "parameter_list", "text": "(locX, locY)", "parent": 770, "children": [773, 775], "start_point": {"row": 175, "column": 29}, "end_point": {"row": 175, "column": 41}}, {"id": 773, "type": "parameter_declaration", "text": "locX", "parent": 772, "children": [774], "start_point": {"row": 175, "column": 30}, "end_point": {"row": 175, "column": 34}}, {"id": 774, "type": "type_identifier", "text": "locX", "parent": 773, "children": [], "start_point": {"row": 175, "column": 30}, "end_point": {"row": 175, "column": 34}}, {"id": 775, "type": "parameter_declaration", "text": "locY", "parent": 772, "children": [776], "start_point": {"row": 175, "column": 36}, "end_point": {"row": 175, "column": 40}}, {"id": 776, "type": "type_identifier", "text": "locY", "parent": 775, "children": [], "start_point": {"row": 175, "column": 36}, "end_point": {"row": 175, "column": 40}}, {"id": 777, "type": "labeled_statement", "text": "std::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n\t\t\t\tenemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);", "parent": 508, "children": [778, 779], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 181, "column": 67}}, {"id": 778, "type": "statement_identifier", "text": "std", "parent": 777, "children": [], "start_point": {"row": 180, "column": 2}, "end_point": {"row": 180, "column": 5}}, {"id": 779, "type": "ERROR", "text": "::pair<bool, Vector2> bestPlacement = game_util:", "parent": 777, "children": [780], "start_point": {"row": 180, "column": 5}, "end_point": {"row": 180, "column": 53}}, {"id": 780, "type": "comma_expression", "text": "pair<bool, Vector2> bestPlacement = game_util", "parent": 779, "children": [781, 785], "start_point": {"row": 180, "column": 7}, "end_point": {"row": 180, "column": 52}}, {"id": 781, "type": "binary_expression", "text": "pair<bool", "parent": 780, "children": [782, 783, 784], "start_point": {"row": 180, "column": 7}, "end_point": {"row": 180, "column": 16}}, {"id": 782, "type": "identifier", "text": "pair", "parent": 781, "children": [], "start_point": {"row": 180, "column": 7}, "end_point": {"row": 180, "column": 11}}, {"id": 783, "type": "<", "text": "<", "parent": 781, "children": [], "start_point": {"row": 180, "column": 11}, "end_point": {"row": 180, "column": 12}}, {"id": 784, "type": "identifier", "text": "bool", "parent": 781, "children": [], "start_point": {"row": 180, "column": 12}, "end_point": {"row": 180, "column": 16}}, {"id": 785, "type": "binary_expression", "text": "Vector2> bestPlacement = game_util", "parent": 780, "children": [786, 787, 788], "start_point": {"row": 180, "column": 18}, "end_point": {"row": 180, "column": 52}}, {"id": 786, "type": "identifier", "text": "Vector2", "parent": 785, "children": [], "start_point": {"row": 180, "column": 18}, "end_point": {"row": 180, "column": 25}}, {"id": 787, "type": ">", "text": ">", "parent": 785, "children": [], "start_point": {"row": 180, "column": 25}, "end_point": {"row": 180, "column": 26}}, {"id": 788, "type": "assignment_expression", "text": "bestPlacement = game_util", "parent": 785, "children": [789, 790, 791], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 180, "column": 52}}, {"id": 789, "type": "identifier", "text": "bestPlacement", "parent": 788, "children": [], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 180, "column": 40}}, {"id": 790, "type": "=", "text": "=", "parent": 788, "children": [], "start_point": {"row": 180, "column": 41}, "end_point": {"row": 180, "column": 42}}, {"id": 791, "type": "identifier", "text": "game_util", "parent": 788, "children": [], "start_point": {"row": 180, "column": 43}, "end_point": {"row": 180, "column": 52}}, {"id": 792, "type": "call_expression", "text": "findSafePlacement(idealPosition,\n\t\t\t\tenemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs)", "parent": 777, "children": [793, 794], "start_point": {"row": 180, "column": 54}, "end_point": {"row": 181, "column": 66}}, {"id": 793, "type": "identifier", "text": "findSafePlacement", "parent": 792, "children": [], "start_point": {"row": 180, "column": 54}, "end_point": {"row": 180, "column": 71}}, {"id": 794, "type": "argument_list", "text": "(idealPosition,\n\t\t\t\tenemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs)", "parent": 792, "children": [795, 796, 797, 798, 803], "start_point": {"row": 180, "column": 71}, "end_point": {"row": 181, "column": 66}}, {"id": 795, "type": "identifier", "text": "idealPosition", "parent": 794, "children": [], "start_point": {"row": 180, "column": 72}, "end_point": {"row": 180, "column": 85}}, {"id": 796, "type": "identifier", "text": "enemyCollisionRadius", "parent": 794, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 24}}, {"id": 797, "type": "identifier", "text": "maxPlacementRadius", "parent": 794, "children": [], "start_point": {"row": 181, "column": 26}, "end_point": {"row": 181, "column": 44}}, {"id": 798, "type": "call_expression", "text": "gs.getEngines()", "parent": 794, "children": [799, 802], "start_point": {"row": 181, "column": 46}, "end_point": {"row": 181, "column": 61}}, {"id": 799, "type": "field_expression", "text": "gs.getEngines", "parent": 798, "children": [800, 801], "start_point": {"row": 181, "column": 46}, "end_point": {"row": 181, "column": 59}}, {"id": 800, "type": "identifier", "text": "gs", "parent": 799, "children": [], "start_point": {"row": 181, "column": 46}, "end_point": {"row": 181, "column": 48}}, {"id": 801, "type": "field_identifier", "text": "getEngines", "parent": 799, "children": [], "start_point": {"row": 181, "column": 49}, "end_point": {"row": 181, "column": 59}}, {"id": 802, "type": "argument_list", "text": "()", "parent": 798, "children": [], "start_point": {"row": 181, "column": 59}, "end_point": {"row": 181, "column": 61}}, {"id": 803, "type": "identifier", "text": "gs", "parent": 794, "children": [], "start_point": {"row": 181, "column": 63}, "end_point": {"row": 181, "column": 65}}, {"id": 804, "type": "if_statement", "text": "if (bestPlacement.first) {\n\t\t\tauto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n\t\t\tgs.addEnemyEntity(std::move(entEnemy));\n\t\t} else {\n\t\t\tlogging::Info() << \"no valid placement found for enemy\";\n\t\t}", "parent": 508, "children": [805, 841], "start_point": {"row": 183, "column": 2}, "end_point": {"row": 189, "column": 3}}, {"id": 805, "type": "parenthesized_expression", "text": "(bestPlacement.first)", "parent": 804, "children": [806], "start_point": {"row": 183, "column": 5}, "end_point": {"row": 183, "column": 26}}, {"id": 806, "type": "field_expression", "text": "bestPlacement.first", "parent": 805, "children": [807, 808], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 25}}, {"id": 807, "type": "identifier", "text": "bestPlacement", "parent": 806, "children": [], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 19}}, {"id": 808, "type": "field_identifier", "text": "first", "parent": 806, "children": [], "start_point": {"row": 183, "column": 20}, "end_point": {"row": 183, "column": 25}}, {"id": 809, "type": "declaration", "text": "auto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);", "parent": 804, "children": [810, 812, 813], "start_point": {"row": 184, "column": 3}, "end_point": {"row": 184, "column": 78}}, {"id": 810, "type": "storage_class_specifier", "text": "auto", "parent": 809, "children": [811], "start_point": {"row": 184, "column": 3}, "end_point": {"row": 184, "column": 7}}, {"id": 811, "type": "auto", "text": "auto", "parent": 810, "children": [], "start_point": {"row": 184, "column": 3}, "end_point": {"row": 184, "column": 7}}, {"id": 812, "type": "type_identifier", "text": "entEnemy", "parent": 809, "children": [], "start_point": {"row": 184, "column": 8}, "end_point": {"row": 184, "column": 16}}, {"id": 813, "type": "init_declarator", "text": " = fact.createMultiVisual<TEnemy>(name, bestPlacement.second)", "parent": 809, "children": [814, 815, 816], "start_point": {"row": 184, "column": 16}, "end_point": {"row": 184, "column": 77}}, {"id": 814, "type": "identifier", "text": "", "parent": 813, "children": [], "start_point": {"row": 184, "column": 16}, "end_point": {"row": 184, "column": 16}}, {"id": 815, "type": "=", "text": "=", "parent": 813, "children": [], "start_point": {"row": 184, "column": 17}, "end_point": {"row": 184, "column": 18}}, {"id": 816, "type": "binary_expression", "text": "fact.createMultiVisual<TEnemy>(name, bestPlacement.second)", "parent": 813, "children": [817, 823, 824], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 77}}, {"id": 817, "type": "binary_expression", "text": "fact.createMultiVisual<TEnemy", "parent": 816, "children": [818, 821, 822], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 48}}, {"id": 818, "type": "field_expression", "text": "fact.createMultiVisual", "parent": 817, "children": [819, 820], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 41}}, {"id": 819, "type": "identifier", "text": "fact", "parent": 818, "children": [], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 23}}, {"id": 820, "type": "field_identifier", "text": "createMultiVisual", "parent": 818, "children": [], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 41}}, {"id": 821, "type": "<", "text": "<", "parent": 817, "children": [], "start_point": {"row": 184, "column": 41}, "end_point": {"row": 184, "column": 42}}, {"id": 822, "type": "identifier", "text": "TEnemy", "parent": 817, "children": [], "start_point": {"row": 184, "column": 42}, "end_point": {"row": 184, "column": 48}}, {"id": 823, "type": ">", "text": ">", "parent": 816, "children": [], "start_point": {"row": 184, "column": 48}, "end_point": {"row": 184, "column": 49}}, {"id": 824, "type": "parenthesized_expression", "text": "(name, bestPlacement.second)", "parent": 816, "children": [825], "start_point": {"row": 184, "column": 49}, "end_point": {"row": 184, "column": 77}}, {"id": 825, "type": "comma_expression", "text": "name, bestPlacement.second", "parent": 824, "children": [826, 827], "start_point": {"row": 184, "column": 50}, "end_point": {"row": 184, "column": 76}}, {"id": 826, "type": "identifier", "text": "name", "parent": 825, "children": [], "start_point": {"row": 184, "column": 50}, "end_point": {"row": 184, "column": 54}}, {"id": 827, "type": "field_expression", "text": "bestPlacement.second", "parent": 825, "children": [828, 829], "start_point": {"row": 184, "column": 56}, "end_point": {"row": 184, "column": 76}}, {"id": 828, "type": "identifier", "text": "bestPlacement", "parent": 827, "children": [], "start_point": {"row": 184, "column": 56}, "end_point": {"row": 184, "column": 69}}, {"id": 829, "type": "field_identifier", "text": "second", "parent": 827, "children": [], "start_point": {"row": 184, "column": 70}, "end_point": {"row": 184, "column": 76}}, {"id": 830, "type": "call_expression", "text": "gs.addEnemyEntity(std::move(entEnemy))", "parent": 804, "children": [831, 834], "start_point": {"row": 186, "column": 3}, "end_point": {"row": 186, "column": 41}}, {"id": 831, "type": "field_expression", "text": "gs.addEnemyEntity", "parent": 830, "children": [832, 833], "start_point": {"row": 186, "column": 3}, "end_point": {"row": 186, "column": 20}}, {"id": 832, "type": "identifier", "text": "gs", "parent": 831, "children": [], "start_point": {"row": 186, "column": 3}, "end_point": {"row": 186, "column": 5}}, {"id": 833, "type": "field_identifier", "text": "addEnemyEntity", "parent": 831, "children": [], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 186, "column": 20}}, {"id": 834, "type": "argument_list", "text": "(std::move(entEnemy))", "parent": 830, "children": [835, 837], "start_point": {"row": 186, "column": 20}, "end_point": {"row": 186, "column": 41}}, {"id": 835, "type": "ERROR", "text": "std::", "parent": 834, "children": [836], "start_point": {"row": 186, "column": 21}, "end_point": {"row": 186, "column": 26}}, {"id": 836, "type": "identifier", "text": "std", "parent": 835, "children": [], "start_point": {"row": 186, "column": 21}, "end_point": {"row": 186, "column": 24}}, {"id": 837, "type": "call_expression", "text": "move(entEnemy)", "parent": 834, "children": [838, 839], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 40}}, {"id": 838, "type": "identifier", "text": "move", "parent": 837, "children": [], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 30}}, {"id": 839, "type": "argument_list", "text": "(entEnemy)", "parent": 837, "children": [840], "start_point": {"row": 186, "column": 30}, "end_point": {"row": 186, "column": 40}}, {"id": 840, "type": "identifier", "text": "entEnemy", "parent": 839, "children": [], "start_point": {"row": 186, "column": 31}, "end_point": {"row": 186, "column": 39}}, {"id": 841, "type": "else_clause", "text": "else {\n\t\t\tlogging::Info() << \"no valid placement found for enemy\";\n\t\t}", "parent": 804, "children": [], "start_point": {"row": 187, "column": 4}, "end_point": {"row": 189, "column": 3}}, {"id": 842, "type": "labeled_statement", "text": "logging::Info() << \"no valid placement found for enemy\";", "parent": 841, "children": [843], "start_point": {"row": 188, "column": 3}, "end_point": {"row": 188, "column": 59}}, {"id": 843, "type": "statement_identifier", "text": "logging", "parent": 842, "children": [], "start_point": {"row": 188, "column": 3}, "end_point": {"row": 188, "column": 10}}, {"id": 844, "type": "binary_expression", "text": "Info() << \"no valid placement found for enemy\"", "parent": 842, "children": [845, 848, 849], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 58}}, {"id": 845, "type": "call_expression", "text": "Info()", "parent": 844, "children": [846, 847], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 18}}, {"id": 846, "type": "identifier", "text": "Info", "parent": 845, "children": [], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 16}}, {"id": 847, "type": "argument_list", "text": "()", "parent": 845, "children": [], "start_point": {"row": 188, "column": 16}, "end_point": {"row": 188, "column": 18}}, {"id": 848, "type": "<<", "text": "<<", "parent": 844, "children": [], "start_point": {"row": 188, "column": 19}, "end_point": {"row": 188, "column": 21}}, {"id": 849, "type": "string_literal", "text": "\"no valid placement found for enemy\"", "parent": 844, "children": [], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 58}}, {"id": 850, "type": "labeled_statement", "text": "private:\n\tEngines m_engines;", "parent": 508, "children": [851], "start_point": {"row": 192, "column": 0}, "end_point": {"row": 193, "column": 19}}, {"id": 851, "type": "declaration", "text": "Engines m_engines;", "parent": 850, "children": [852, 853], "start_point": {"row": 193, "column": 1}, "end_point": {"row": 193, "column": 19}}, {"id": 852, "type": "type_identifier", "text": "Engines", "parent": 851, "children": [], "start_point": {"row": 193, "column": 1}, "end_point": {"row": 193, "column": 8}}, {"id": 853, "type": "identifier", "text": "m_engines", "parent": 851, "children": [], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 18}}, {"id": 854, "type": "declaration", "text": "EntityFactory m_fact;", "parent": 508, "children": [855, 856], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 22}}, {"id": 855, "type": "type_identifier", "text": "EntityFactory", "parent": 854, "children": [], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 14}}, {"id": 856, "type": "identifier", "text": "m_fact", "parent": 854, "children": [], "start_point": {"row": 194, "column": 15}, "end_point": {"row": 194, "column": 21}}, {"id": 857, "type": "declaration", "text": "LevelFragment const* m_lastFragment;", "parent": 508, "children": [858, 859], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 195, "column": 37}}, {"id": 858, "type": "type_identifier", "text": "LevelFragment", "parent": 857, "children": [], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 195, "column": 14}}, {"id": 859, "type": "pointer_declarator", "text": "* m_lastFragment", "parent": 857, "children": [860, 861], "start_point": {"row": 195, "column": 20}, "end_point": {"row": 195, "column": 36}}, {"id": 860, "type": "*", "text": "*", "parent": 859, "children": [], "start_point": {"row": 195, "column": 20}, "end_point": {"row": 195, "column": 21}}, {"id": 861, "type": "identifier", "text": "m_lastFragment", "parent": 859, "children": [], "start_point": {"row": 195, "column": 22}, "end_point": {"row": 195, "column": 36}}, {"id": 862, "type": "labeled_statement", "text": "std::vector<LevelFragment> m_fragments;", "parent": 508, "children": [863], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 40}}, {"id": 863, "type": "statement_identifier", "text": "std", "parent": 862, "children": [], "start_point": {"row": 196, "column": 1}, "end_point": {"row": 196, "column": 4}}, {"id": 864, "type": "binary_expression", "text": "vector<LevelFragment> m_fragments", "parent": 862, "children": [865, 869, 870], "start_point": {"row": 196, "column": 6}, "end_point": {"row": 196, "column": 39}}, {"id": 865, "type": "binary_expression", "text": "vector<LevelFragment", "parent": 864, "children": [866, 867, 868], "start_point": {"row": 196, "column": 6}, "end_point": {"row": 196, "column": 26}}, {"id": 866, "type": "identifier", "text": "vector", "parent": 865, "children": [], "start_point": {"row": 196, "column": 6}, "end_point": {"row": 196, "column": 12}}, {"id": 867, "type": "<", "text": "<", "parent": 865, "children": [], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 13}}, {"id": 868, "type": "identifier", "text": "LevelFragment", "parent": 865, "children": [], "start_point": {"row": 196, "column": 13}, "end_point": {"row": 196, "column": 26}}, {"id": 869, "type": ">", "text": ">", "parent": 864, "children": [], "start_point": {"row": 196, "column": 26}, "end_point": {"row": 196, "column": 27}}, {"id": 870, "type": "identifier", "text": "m_fragments", "parent": 864, "children": [], "start_point": {"row": 196, "column": 28}, "end_point": {"row": 196, "column": 39}}, {"id": 871, "type": "declaration", "text": "unsigned int m_currentLayer;", "parent": 508, "children": [872, 875], "start_point": {"row": 197, "column": 1}, "end_point": {"row": 197, "column": 29}}, {"id": 872, "type": "sized_type_specifier", "text": "unsigned int", "parent": 871, "children": [873, 874], "start_point": {"row": 197, "column": 1}, "end_point": {"row": 197, "column": 13}}, {"id": 873, "type": "unsigned", "text": "unsigned", "parent": 872, "children": [], "start_point": {"row": 197, "column": 1}, "end_point": {"row": 197, "column": 9}}, {"id": 874, "type": "primitive_type", "text": "int", "parent": 872, "children": [], "start_point": {"row": 197, "column": 10}, "end_point": {"row": 197, "column": 13}}, {"id": 875, "type": "identifier", "text": "m_currentLayer", "parent": 871, "children": [], "start_point": {"row": 197, "column": 14}, "end_point": {"row": 197, "column": 28}}]}, "node_categories": {"declarations": {"functions": [67, 72, 77, 82, 87, 93, 160, 165, 215, 307, 316, 325, 508, 613, 626, 639, 650, 658, 666, 770], "variables": [45, 70, 75, 80, 85, 90, 96, 100, 103, 106, 109, 114, 119, 128, 136, 139, 144, 152, 163, 168, 173, 208, 219, 238, 268, 289, 297, 305, 310, 319, 419, 498, 547, 551, 557, 566, 611, 616, 619, 624, 629, 632, 642, 645, 648, 653, 656, 661, 664, 703, 737, 768, 773, 775, 809, 851, 854, 857, 871], "classes": [42, 43, 125, 126, 209, 420, 810], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40], "modules": [], "enums": []}, "statements": {"expressions": [176, 177, 181, 186, 187, 193, 194, 197, 198, 224, 227, 228, 229, 234, 244, 247, 248, 249, 254, 257, 258, 273, 274, 275, 276, 277, 278, 286, 294, 302, 332, 333, 334, 342, 345, 346, 351, 352, 353, 356, 357, 363, 364, 365, 373, 376, 377, 382, 383, 384, 387, 388, 394, 395, 400, 401, 407, 412, 413, 414, 426, 429, 430, 435, 436, 437, 438, 443, 445, 447, 451, 452, 454, 457, 458, 465, 466, 473, 474, 480, 487, 488, 489, 495, 515, 518, 521, 524, 527, 528, 532, 533, 537, 538, 543, 554, 561, 573, 574, 579, 580, 586, 588, 593, 594, 595, 596, 605, 606, 669, 670, 677, 690, 697, 700, 708, 709, 710, 711, 712, 713, 714, 724, 728, 729, 730, 742, 743, 744, 745, 746, 747, 757, 761, 762, 763, 780, 781, 785, 792, 798, 799, 805, 806, 816, 817, 818, 824, 825, 827, 830, 831, 837, 844, 845, 864, 865], "assignments": [203, 263, 339, 370, 560, 788], "loops": [207, 237], "conditionals": [44, 46, 47, 49, 51, 52, 54, 56, 57, 58, 60, 61, 62, 64, 66, 68, 71, 73, 76, 78, 81, 83, 86, 88, 91, 94, 97, 98, 99, 101, 102, 105, 108, 110, 112, 113, 115, 117, 118, 121, 123, 124, 127, 129, 131, 133, 135, 137, 138, 140, 142, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 166, 169, 171, 172, 174, 175, 178, 180, 182, 184, 188, 191, 192, 195, 196, 199, 200, 202, 204, 211, 213, 216, 221, 225, 230, 231, 232, 235, 241, 245, 250, 251, 252, 255, 259, 261, 264, 269, 271, 279, 280, 282, 284, 287, 288, 290, 292, 295, 296, 298, 300, 303, 304, 306, 308, 311, 315, 317, 320, 324, 326, 330, 331, 335, 336, 340, 343, 344, 347, 349, 354, 355, 358, 359, 361, 362, 366, 367, 371, 374, 375, 378, 380, 385, 386, 389, 390, 392, 393, 396, 402, 403, 406, 408, 410, 411, 415, 416, 422, 424, 427, 428, 431, 433, 439, 440, 442, 444, 446, 448, 449, 450, 455, 456, 459, 460, 462, 464, 467, 468, 471, 472, 475, 476, 479, 481, 483, 486, 490, 496, 497, 500, 502, 504, 505, 507, 509, 511, 512, 516, 519, 520, 522, 523, 525, 526, 529, 531, 534, 536, 539, 544, 548, 549, 552, 553, 555, 556, 558, 559, 562, 563, 565, 567, 569, 571, 575, 576, 578, 581, 582, 584, 585, 589, 590, 592, 597, 602, 607, 608, 610, 614, 617, 618, 620, 622, 623, 627, 630, 631, 633, 636, 640, 643, 644, 646, 647, 651, 654, 655, 659, 662, 663, 667, 671, 673, 676, 678, 681, 682, 683, 685, 686, 688, 689, 691, 693, 695, 696, 698, 699, 701, 702, 706, 715, 716, 718, 720, 723, 725, 731, 732, 733, 736, 740, 748, 749, 751, 753, 756, 758, 764, 765, 766, 769, 771, 774, 776, 778, 782, 784, 786, 789, 791, 793, 795, 796, 797, 800, 801, 803, 804, 807, 808, 812, 814, 819, 820, 822, 826, 828, 829, 832, 833, 836, 838, 840, 843, 846, 852, 853, 855, 856, 858, 861, 863, 866, 868, 870, 872, 875], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 206, 223, 243, 338, 369, 418, 493, 546, 600, 604, 727, 760, 849], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "Center(cen)"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "Repeat(rep)"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "Collides(col)"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "CollidesOnJump(collideOnJump)"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "Type(type)"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "Entity(ent)"}, {"node_id": 160, "universal_type": "function", "name": "LevelLoader", "text_snippet": "class LevelLoader {\npublic:\n\n\tvoid loadFragment(std::string const& json, LevelFragment & frag);\n\n\tte"}, {"node_id": 165, "universal_type": "function", "name": "unknown", "text_snippet": "loadFragment(std::string const& json, LevelFragment & frag)"}, {"node_id": 215, "universal_type": "function", "name": "unknown", "text_snippet": "Tiles) {\n\n\t\t\tfor (int repX"}, {"node_id": 307, "universal_type": "function", "name": "unknown", "text_snippet": "offset(repX * entSize.width(), repY * entSize.height() + offsetY)"}, {"node_id": 316, "universal_type": "function", "name": "unknown", "text_snippet": "width()"}, {"node_id": 325, "universal_type": "function", "name": "unknown", "text_snippet": "height() + offsetY"}, {"node_id": 508, "universal_type": "function", "name": "LevelFactory:", "text_snippet": "class LevelFactory: boost::noncopyable {\npublic:\n\n\tLevelFactory(Engines & engines, LevelFragmentsNam"}, {"node_id": 613, "universal_type": "function", "name": "unknown", "text_snippet": "loadFragment(GameState & gs, std::string const& fragName)"}, {"node_id": 626, "universal_type": "function", "name": "amount)", "text_snippet": "nextLayers(GameState & gs, unsigned int amount)"}, {"node_id": 639, "universal_type": "function", "name": "unknown", "text_snippet": "canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const"}, {"node_id": 650, "universal_type": "function", "name": "unknown", "text_snippet": "collisionTestLevel(GameState & gs)"}, {"node_id": 658, "universal_type": "function", "name": "unknown", "text_snippet": "renderTestLevel(GameState & gs)"}, {"node_id": 666, "universal_type": "function", "name": "unknown", "text_snippet": "reset()"}, {"node_id": 770, "universal_type": "function", "name": "unknown", "text_snippet": "idealPosition(locX, locY)"}], "class_declarations": [{"node_id": 42, "universal_type": "class", "name": "LevelTile", "text_snippet": "struct LevelTile {\n\n\tLevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& "}, {"node_id": 43, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 125, "universal_type": "class", "name": "LevelFragment", "text_snippet": "struct LevelFragment {\n\tstd::vector<LevelTile> Tiles;\n\tVector2 Size;\n\tstd::string Name;\n\tstd::vector"}, {"node_id": 126, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 209, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 420, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 810, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 3, "text": "#include <sstream>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <boost/property_tree/json_parser.hpp>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <boost/property_tree/ptree.hpp>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <DescentEngine/src/PropertyTreeSupport.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <DescentEngine/src/EntityEngine/EntityFactory.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <DescentEngine/src/XmlTools.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <DescentEngine/src/Engines.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <DescentLogic/src/Entities/WallEntity.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <DescentLogic/src/Entities/WallCollisionEntity.h>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <DescentLogic/src/Entities/FloorEntity.h>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"Exceptions/LevelParsingException.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include <DescentLogic/src/Game/GameState.h>\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include <DescentLogic/src/Game/Util/SafePlacement.h>\n"}, {"node_id": 40, "text": "#include"}]}, "original_source_code": "/*\nCopyright (C) 2016 <NAME>. All Rights Reserved.\n* Written by <NAME> (<EMAIL>)\n\nThis file is part of Kung Foo Barracuda.\n\nKung Foo Barracuda 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\nKung Foo Barracuda 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 Kung Foo Barracuda. If not, see <http://www.gnu.org/licenses/>.\n*/\n\n#pragma once\n\n//#include <boost/noncopyable.hpp>\n\n#include <sstream>\n\n#include <boost/property_tree/json_parser.hpp>\n#include <boost/property_tree/ptree.hpp>\n\n#include <DescentEngine/src/PropertyTreeSupport.h>\n#include <DescentEngine/src/EntityEngine/EntityFactory.h>\n#include <DescentEngine/src/XmlTools.h>\n\n#include <DescentEngine/src/Engines.h>\n//#include <DescentLogic/src/GameState.h>\n#include <DescentLogic/src/Entities/WallEntity.h>\n#include <DescentLogic/src/Entities/WallCollisionEntity.h>\n#include <DescentLogic/src/Entities/FloorEntity.h>\n\n#include \"Exceptions/LevelParsingException.h\"\n#include <DescentLogic/src/Game/GameState.h>\n\n#include <DescentLogic/src/Game/Util/SafePlacement.h>\n\n//class GameState;\n\nstruct LevelTile {\n\n\tLevelTile(Vector2 const& cen, Vector2 const& rep, bool col, std::string const& type,\n\t\t\tstd::string const& ent, bool collideOnJump) :\n\t\t\tCenter(cen), Repeat(rep), Collides(col), CollidesOnJump(collideOnJump), Type(type), Entity(ent) {\n\t}\n\n\tVector2 Center;\n\tVector2 Repeat;\n\tbool Collides;\n\tbool CollidesOnJump;\n\tstd::string Type;\n\tstd::string Entity;\n\n};\n\ntypedef std::string LevelConnection;\n/*\n struct LevelConnection {\n\n };*/\n\nstruct LevelFragment {\n\tstd::vector<LevelTile> Tiles;\n\tVector2 Size;\n\tstd::string Name;\n\tstd::vector<LevelConnection> ConnectionsIn;\n\tstd::vector<LevelConnection> ConnectionsOut;\n};\n\nclass LevelLoader {\npublic:\n\n\tvoid loadFragment(std::string const& json, LevelFragment & frag);\n\n\ttemplate<class TGameState, class TEntFactory>\n\tvoid applyFragment(LevelFragment const& frag, TGameState & gs, TEntFactory & fact, int offsetY = 0) {\n\n\t\tfor (auto const& tile : frag.Tiles) {\n\n\t\t\tfor (int repX = 0; repX < tile.Repeat.x(); repX++) {\n\t\t\t\tfor (int repY = 0; repY < tile.Repeat.y(); repY++) {\n\t\t\t\t\t//entFactory\n\t\t\t\t\tuniq<Entity> ent = nullptr;\n\t\t\t\t\tEntityTemplate const& entTemplate = gs.getEngines().entityEngine().getTemplate(\n\t\t\t\t\t\t\ttile.Entity);\n\t\t\t\t\tconst Rectangle2 entSize = entTemplate.VisualSize;\n\t\t\t\t\tconst Rectangle2 boundSize = entTemplate.BoundingBox;\n\t\t\t\t\tconst Vector2 offset(repX * entSize.width(), repY * entSize.height() + offsetY);\n\n\t\t\t\t\tif (tile.Type == \"WallEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<WallEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\t\t\t\t\tif (tile.Type == \"FloorEntity\") {\n\t\t\t\t\t\tent = fact.template createFromTemplateName<FloorEntity>(tile.Entity,\n\t\t\t\t\t\t\t\ttile.Center + offset);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (ent != nullptr) {\n\t\t\t\t\t\tgs.addStaticEntity(std::move(ent));\n\n\t\t\t\t\t\t// create blocking ?\n\t\t\t\t\t\tif (tile.Collides == 1) {\n\t\t\t\t\t\t\t// todo : give correct angle here\n\t\t\t\t\t\t\tauto col = fact.template createNonVisual<WallCollisionEntity>(tile.Center + offset,\n\t\t\t\t\t\t\t\t\tboundSize, LayerPriorityBottom, tile.CollidesOnJump);\n\n\t\t\t\t\t\t\tif (!tile.CollidesOnJump) {\n\t\t\t\t\t\t\t\tcol->setCollisionGroup(GameCollisionGroups::StaticsJumpable);\n\t\t\t\t\t\t\t\tcol->setCollisionMask(GameCollisionGroups::StaticsJumpable_CollidesWith);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgs.addStaticEntity(std::move(col));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogging::Fatal() << \"Unknown entity type: \" << tile.Type;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\ntypedef std::vector<std::string> LevelFragmentsName;\n\nclass LevelFactory: boost::noncopyable {\npublic:\n\n\tLevelFactory(Engines & engines, LevelFragmentsName const& fragments, ResourceEngine & re) :\n\t\t\tm_engines(engines), m_fact(engines), m_lastFragment(nullptr), m_currentLayer(0) {\n\n\t\tLevelLoader loader;\n\n\t\tfor (std::string const & fr : fragments) {\n\t\t\tLevelFragment frag;\n\t\t\tfrag.Name = fr;\n\t\t\tconst std::string xmlInp = re.loadLevel(fr);\n\n\t\t\ttry {\n\t\t\t\tloader.loadFragment(xmlInp, frag);\n\t\t\t} catch (LevelParsingException & ex) {\n\t\t\t\tlogging::Error() << \"Level \" << fr << \" can not be parsed\";\n\t\t\t}\n\t\t\tm_fragments.push_back(frag);\n\t\t}\n\t}\n\n\tvoid loadFragment(GameState & gs, std::string const& fragName);\n\n\tvoid nextLayers(GameState & gs, unsigned int amount);\n\n\tbool canConnect(LevelFragment const& prevFrag, LevelFragment const& nextFrag) const;\n\n\tvoid collisionTestLevel(GameState & gs);\n\n\tvoid renderTestLevel(GameState & gs);\n\n\tvoid reset();\n\n\ttemplate<class TEnemy>\n\tvoid addEnemy(std::string name, float enemyCollisionRadius, float maxPlacementRadius,\n\t\t\tLevelFragment const* frag, int thisLayer, GameState & gs, EntityFactory & fact) {\n\n\t\tconst int locY = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.y()))\n\t\t\t\t+ thisLayer;\n\t\tconst int locX = gs.getEngines().randomEngine().randomInt(RandomEngine::SpanInt(0, frag->Size.x()));\n\n\t\tconst Vector2 idealPosition(locX, locY);\n\t\t// really ugly, but know of no other way right now\n\t\t//Vector2 bndBox = DefaultFighterBoundingBox;\n\t\t// bndBox.getRadius();\n\n\t\tstd::pair<bool, Vector2> bestPlacement = game_util::findSafePlacement(idealPosition,\n\t\t\t\tenemyCollisionRadius, maxPlacementRadius, gs.getEngines(), gs);\n\n\t\tif (bestPlacement.first) {\n\t\t\tauto entEnemy = fact.createMultiVisual<TEnemy>(name, bestPlacement.second);\n\n\t\t\tgs.addEnemyEntity(std::move(entEnemy));\n\t\t} else {\n\t\t\tlogging::Info() << \"no valid placement found for enemy\";\n\t\t}\n\t}\n\nprivate:\n\tEngines m_engines;\n\tEntityFactory m_fact;\n\tLevelFragment const* m_lastFragment;\n\tstd::vector<LevelFragment> m_fragments;\n\tunsigned int m_currentLayer;\n};\n"}
290
c
#include "sliding_window.h" SlidingWindow SlidingWindow_create(uint16_t sequence_base, uint16_t window_size){ SlidingWindow window; window.sequence_base = sequence_base; window.sequence_max = window_size + 1; window.window_size = window_size; return window; } // Updates void SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr){ // If you receive a request number where Rn > Sb if(seqence_nr > window->sequence_base){ window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr; window->sequence_base = seqence_nr; } }
34.82
17
(translation_unit) "#include "sliding_window.h"\n\nSlidingWindow SlidingWindow_create(uint16_t sequence_base, uint16_t window_size){\n SlidingWindow window;\n window.sequence_base = sequence_base;\n window.sequence_max = window_size + 1;\n window.window_size = window_size;\n \n return window;\n}\n\n// Updates\nvoid SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr){\n // If you receive a request number where Rn > Sb \n if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }\n}" (preproc_include) "#include "sliding_window.h"\n" (#include) "#include" (string_literal) ""sliding_window.h"" (") """ (string_content) "sliding_window.h" (") """ (function_definition) "SlidingWindow SlidingWindow_create(uint16_t sequence_base, uint16_t window_size){\n SlidingWindow window;\n window.sequence_base = sequence_base;\n window.sequence_max = window_size + 1;\n window.window_size = window_size;\n \n return window;\n}" (type_identifier) "SlidingWindow" (function_declarator) "SlidingWindow_create(uint16_t sequence_base, uint16_t window_size)" (identifier) "SlidingWindow_create" (parameter_list) "(uint16_t sequence_base, uint16_t window_size)" (() "(" (parameter_declaration) "uint16_t sequence_base" (primitive_type) "uint16_t" (identifier) "sequence_base" (,) "," (parameter_declaration) "uint16_t window_size" (primitive_type) "uint16_t" (identifier) "window_size" ()) ")" (compound_statement) "{\n SlidingWindow window;\n window.sequence_base = sequence_base;\n window.sequence_max = window_size + 1;\n window.window_size = window_size;\n \n return window;\n}" ({) "{" (declaration) "SlidingWindow window;" (type_identifier) "SlidingWindow" (identifier) "window" (;) ";" (expression_statement) "window.sequence_base = sequence_base;" (assignment_expression) "window.sequence_base = sequence_base" (field_expression) "window.sequence_base" (identifier) "window" (.) "." (field_identifier) "sequence_base" (=) "=" (identifier) "sequence_base" (;) ";" (expression_statement) "window.sequence_max = window_size + 1;" (assignment_expression) "window.sequence_max = window_size + 1" (field_expression) "window.sequence_max" (identifier) "window" (.) "." (field_identifier) "sequence_max" (=) "=" (binary_expression) "window_size + 1" (identifier) "window_size" (+) "+" (number_literal) "1" (;) ";" (expression_statement) "window.window_size = window_size;" (assignment_expression) "window.window_size = window_size" (field_expression) "window.window_size" (identifier) "window" (.) "." (field_identifier) "window_size" (=) "=" (identifier) "window_size" (;) ";" (return_statement) "return window;" (return) "return" (identifier) "window" (;) ";" (}) "}" (comment) "// Updates" (function_definition) "void SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr){\n // If you receive a request number where Rn > Sb \n if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }\n}" (primitive_type) "void" (function_declarator) "SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr)" (identifier) "SlidingWindow_update" (parameter_list) "(SlidingWindow *window, uint16_t seqence_nr)" (() "(" (parameter_declaration) "SlidingWindow *window" (type_identifier) "SlidingWindow" (pointer_declarator) "*window" (*) "*" (identifier) "window" (,) "," (parameter_declaration) "uint16_t seqence_nr" (primitive_type) "uint16_t" (identifier) "seqence_nr" ()) ")" (compound_statement) "{\n // If you receive a request number where Rn > Sb \n if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }\n}" ({) "{" (comment) "// If you receive a request number where Rn > Sb " (if_statement) "if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }" (if) "if" (parenthesized_expression) "(seqence_nr > window->sequence_base)" (() "(" (binary_expression) "seqence_nr > window->sequence_base" (identifier) "seqence_nr" (>) ">" (field_expression) "window->sequence_base" (identifier) "window" (->) "->" (field_identifier) "sequence_base" ()) ")" (compound_statement) "{\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }" ({) "{" (expression_statement) "window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;" (assignment_expression) "window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr" (field_expression) "window->sequence_max" (identifier) "window" (->) "->" (field_identifier) "sequence_max" (=) "=" (binary_expression) "(window->sequence_max - window->sequence_base) + seqence_nr" (parenthesized_expression) "(window->sequence_max - window->sequence_base)" (() "(" (binary_expression) "window->sequence_max - window->sequence_base" (field_expression) "window->sequence_max" (identifier) "window" (->) "->" (field_identifier) "sequence_max" (-) "-" (field_expression) "window->sequence_base" (identifier) "window" (->) "->" (field_identifier) "sequence_base" ()) ")" (+) "+" (identifier) "seqence_nr" (;) ";" (expression_statement) "window->sequence_base = seqence_nr;" (assignment_expression) "window->sequence_base = seqence_nr" (field_expression) "window->sequence_base" (identifier) "window" (->) "->" (field_identifier) "sequence_base" (=) "=" (identifier) "seqence_nr" (;) ";" (}) "}" (}) "}"
131
0
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 34.82, "nodes": 84, "errors": 0, "source_hash": "116e60ce2a8a5e96b90030d8eed3ed00ac66ec78161032c87b975482d670b554", "categorized_nodes": 67}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"sliding_window.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": "\"sliding_window.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 27}}, {"id": 3, "type": "function_definition", "text": "SlidingWindow SlidingWindow_create(uint16_t sequence_base, uint16_t window_size){\n SlidingWindow window;\n window.sequence_base = sequence_base;\n window.sequence_max = window_size + 1;\n window.window_size = window_size;\n \n return window;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "SlidingWindow", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 13}}, {"id": 5, "type": "function_declarator", "text": "SlidingWindow_create(uint16_t sequence_base, uint16_t window_size)", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 80}}, {"id": 6, "type": "identifier", "text": "SlidingWindow_create", "parent": 5, "children": [], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 34}}, {"id": 7, "type": "parameter_list", "text": "(uint16_t sequence_base, uint16_t window_size)", "parent": 5, "children": [8, 11], "start_point": {"row": 2, "column": 34}, "end_point": {"row": 2, "column": 80}}, {"id": 8, "type": "parameter_declaration", "text": "uint16_t sequence_base", "parent": 7, "children": [9, 10], "start_point": {"row": 2, "column": 35}, "end_point": {"row": 2, "column": 57}}, {"id": 9, "type": "primitive_type", "text": "uint16_t", "parent": 8, "children": [], "start_point": {"row": 2, "column": 35}, "end_point": {"row": 2, "column": 43}}, {"id": 10, "type": "identifier", "text": "sequence_base", "parent": 8, "children": [], "start_point": {"row": 2, "column": 44}, "end_point": {"row": 2, "column": 57}}, {"id": 11, "type": "parameter_declaration", "text": "uint16_t window_size", "parent": 7, "children": [12, 13], "start_point": {"row": 2, "column": 59}, "end_point": {"row": 2, "column": 79}}, {"id": 12, "type": "primitive_type", "text": "uint16_t", "parent": 11, "children": [], "start_point": {"row": 2, "column": 59}, "end_point": {"row": 2, "column": 67}}, {"id": 13, "type": "identifier", "text": "window_size", "parent": 11, "children": [], "start_point": {"row": 2, "column": 68}, "end_point": {"row": 2, "column": 79}}, {"id": 14, "type": "declaration", "text": "SlidingWindow window;", "parent": 3, "children": [15, 16], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 25}}, {"id": 15, "type": "type_identifier", "text": "SlidingWindow", "parent": 14, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 17}}, {"id": 16, "type": "identifier", "text": "window", "parent": 14, "children": [], "start_point": {"row": 3, "column": 18}, "end_point": {"row": 3, "column": 24}}, {"id": 17, "type": "assignment_expression", "text": "window.sequence_base = sequence_base", "parent": 3, "children": [18, 21, 22], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 40}}, {"id": 18, "type": "field_expression", "text": "window.sequence_base", "parent": 17, "children": [19, 20], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 24}}, {"id": 19, "type": "identifier", "text": "window", "parent": 18, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 10}}, {"id": 20, "type": "field_identifier", "text": "sequence_base", "parent": 18, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 24}}, {"id": 21, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 4, "column": 26}}, {"id": 22, "type": "identifier", "text": "sequence_base", "parent": 17, "children": [], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 40}}, {"id": 23, "type": "assignment_expression", "text": "window.sequence_max = window_size + 1", "parent": 3, "children": [24, 27, 28], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 41}}, {"id": 24, "type": "field_expression", "text": "window.sequence_max", "parent": 23, "children": [25, 26], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 23}}, {"id": 25, "type": "identifier", "text": "window", "parent": 24, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 10}}, {"id": 26, "type": "field_identifier", "text": "sequence_max", "parent": 24, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 23}}, {"id": 27, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 5, "column": 24}, "end_point": {"row": 5, "column": 25}}, {"id": 28, "type": "binary_expression", "text": "window_size + 1", "parent": 23, "children": [29, 30, 31], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 41}}, {"id": 29, "type": "identifier", "text": "window_size", "parent": 28, "children": [], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 37}}, {"id": 30, "type": "+", "text": "+", "parent": 28, "children": [], "start_point": {"row": 5, "column": 38}, "end_point": {"row": 5, "column": 39}}, {"id": 31, "type": "number_literal", "text": "1", "parent": 28, "children": [], "start_point": {"row": 5, "column": 40}, "end_point": {"row": 5, "column": 41}}, {"id": 32, "type": "assignment_expression", "text": "window.window_size = window_size", "parent": 3, "children": [33, 36, 37], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 36}}, {"id": 33, "type": "field_expression", "text": "window.window_size", "parent": 32, "children": [34, 35], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 22}}, {"id": 34, "type": "identifier", "text": "window", "parent": 33, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 10}}, {"id": 35, "type": "field_identifier", "text": "window_size", "parent": 33, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 22}}, {"id": 36, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 24}}, {"id": 37, "type": "identifier", "text": "window_size", "parent": 32, "children": [], "start_point": {"row": 6, "column": 25}, "end_point": {"row": 6, "column": 36}}, {"id": 38, "type": "return_statement", "text": "return window;", "parent": 3, "children": [39], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 18}}, {"id": 39, "type": "identifier", "text": "window", "parent": 38, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 17}}, {"id": 40, "type": "function_definition", "text": "void SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr){\n // If you receive a request number where Rn > Sb \n if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }\n}", "parent": null, "children": [41, 42], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 41, "type": "primitive_type", "text": "void", "parent": 40, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 42, "type": "function_declarator", "text": "SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr)", "parent": 40, "children": [43, 44], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 69}}, {"id": 43, "type": "identifier", "text": "SlidingWindow_update", "parent": 42, "children": [], "start_point": {"row": 12, "column": 5}, "end_point": {"row": 12, "column": 25}}, {"id": 44, "type": "parameter_list", "text": "(SlidingWindow *window, uint16_t seqence_nr)", "parent": 42, "children": [45, 50], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 69}}, {"id": 45, "type": "parameter_declaration", "text": "SlidingWindow *window", "parent": 44, "children": [46, 47], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 47}}, {"id": 46, "type": "type_identifier", "text": "SlidingWindow", "parent": 45, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 39}}, {"id": 47, "type": "pointer_declarator", "text": "*window", "parent": 45, "children": [48, 49], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 47}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 41}}, {"id": 49, "type": "identifier", "text": "window", "parent": 47, "children": [], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 47}}, {"id": 50, "type": "parameter_declaration", "text": "uint16_t seqence_nr", "parent": 44, "children": [51, 52], "start_point": {"row": 12, "column": 49}, "end_point": {"row": 12, "column": 68}}, {"id": 51, "type": "primitive_type", "text": "uint16_t", "parent": 50, "children": [], "start_point": {"row": 12, "column": 49}, "end_point": {"row": 12, "column": 57}}, {"id": 52, "type": "identifier", "text": "seqence_nr", "parent": 50, "children": [], "start_point": {"row": 12, "column": 58}, "end_point": {"row": 12, "column": 68}}, {"id": 53, "type": "if_statement", "text": "if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }", "parent": 40, "children": [54], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 17, "column": 5}}, {"id": 54, "type": "parenthesized_expression", "text": "(seqence_nr > window->sequence_base)", "parent": 53, "children": [55], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 42}}, {"id": 55, "type": "binary_expression", "text": "seqence_nr > window->sequence_base", "parent": 54, "children": [56, 57, 58], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 41}}, {"id": 56, "type": "identifier", "text": "seqence_nr", "parent": 55, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 17}}, {"id": 57, "type": ">", "text": ">", "parent": 55, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 19}}, {"id": 58, "type": "field_expression", "text": "window->sequence_base", "parent": 55, "children": [59, 60], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 41}}, {"id": 59, "type": "identifier", "text": "window", "parent": 58, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 26}}, {"id": 60, "type": "field_identifier", "text": "sequence_base", "parent": 58, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 41}}, {"id": 61, "type": "assignment_expression", "text": "window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr", "parent": 53, "children": [62, 65, 66], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 90}}, {"id": 62, "type": "field_expression", "text": "window->sequence_max", "parent": 61, "children": [63, 64], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 28}}, {"id": 63, "type": "identifier", "text": "window", "parent": 62, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 14}}, {"id": 64, "type": "field_identifier", "text": "sequence_max", "parent": 62, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 28}}, {"id": 65, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 15, "column": 29}, "end_point": {"row": 15, "column": 30}}, {"id": 66, "type": "binary_expression", "text": "(window->sequence_max - window->sequence_base) + seqence_nr", "parent": 61, "children": [67, 76, 77], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 90}}, {"id": 67, "type": "parenthesized_expression", "text": "(window->sequence_max - window->sequence_base)", "parent": 66, "children": [68], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 77}}, {"id": 68, "type": "binary_expression", "text": "window->sequence_max - window->sequence_base", "parent": 67, "children": [69, 72, 73], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 76}}, {"id": 69, "type": "field_expression", "text": "window->sequence_max", "parent": 68, "children": [70, 71], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 52}}, {"id": 70, "type": "identifier", "text": "window", "parent": 69, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 38}}, {"id": 71, "type": "field_identifier", "text": "sequence_max", "parent": 69, "children": [], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 52}}, {"id": 72, "type": "-", "text": "-", "parent": 68, "children": [], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 54}}, {"id": 73, "type": "field_expression", "text": "window->sequence_base", "parent": 68, "children": [74, 75], "start_point": {"row": 15, "column": 55}, "end_point": {"row": 15, "column": 76}}, {"id": 74, "type": "identifier", "text": "window", "parent": 73, "children": [], "start_point": {"row": 15, "column": 55}, "end_point": {"row": 15, "column": 61}}, {"id": 75, "type": "field_identifier", "text": "sequence_base", "parent": 73, "children": [], "start_point": {"row": 15, "column": 63}, "end_point": {"row": 15, "column": 76}}, {"id": 76, "type": "+", "text": "+", "parent": 66, "children": [], "start_point": {"row": 15, "column": 78}, "end_point": {"row": 15, "column": 79}}, {"id": 77, "type": "identifier", "text": "seqence_nr", "parent": 66, "children": [], "start_point": {"row": 15, "column": 80}, "end_point": {"row": 15, "column": 90}}, {"id": 78, "type": "assignment_expression", "text": "window->sequence_base = seqence_nr", "parent": 53, "children": [79, 82, 83], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 42}}, {"id": 79, "type": "field_expression", "text": "window->sequence_base", "parent": 78, "children": [80, 81], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 29}}, {"id": 80, "type": "identifier", "text": "window", "parent": 79, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 81, "type": "field_identifier", "text": "sequence_base", "parent": 79, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 29}}, {"id": 82, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 31}}, {"id": 83, "type": "identifier", "text": "seqence_nr", "parent": 78, "children": [], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 42}}]}, "node_categories": {"declarations": {"functions": [3, 5, 40, 42], "variables": [8, 11, 14, 45, 50], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [18, 24, 28, 33, 54, 55, 58, 62, 66, 67, 68, 69, 73, 79], "assignments": [17, 23, 32, 61, 78], "loops": [], "conditionals": [4, 6, 10, 13, 15, 16, 19, 20, 22, 25, 26, 29, 34, 35, 37, 39, 43, 46, 49, 52, 53, 56, 59, 60, 63, 64, 70, 71, 74, 75, 77, 80, 81, 83], "returns": [38], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 31], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "SlidingWindow SlidingWindow_create(uint16_t sequence_base, uint16_t window_size){\n SlidingWindow "}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "SlidingWindow_create(uint16_t sequence_base, uint16_t window_size)"}, {"node_id": 40, "universal_type": "function", "name": "SlidingWindow_update", "text_snippet": "void SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr){\n // If you receive a reque"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"sliding_window.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"sliding_window.h\"\n\nSlidingWindow SlidingWindow_create(uint16_t sequence_base, uint16_t window_size){\n SlidingWindow window;\n window.sequence_base = sequence_base;\n window.sequence_max = window_size + 1;\n window.window_size = window_size;\n \n return window;\n}\n\n// Updates\nvoid SlidingWindow_update(SlidingWindow *window, uint16_t seqence_nr){\n // If you receive a request number where Rn > Sb \n if(seqence_nr > window->sequence_base){\n window->sequence_max = (window->sequence_max - window->sequence_base) + seqence_nr;\n window->sequence_base = seqence_nr;\n }\n}"}
291
c
/// @file system/diagnostics/file_version_info.h #ifndef _file_version_info_h_ #define _file_version_info_h_ #include "fwd.h" #include "system/string.h" namespace System { namespace Diagnostics { /// Provides information on file version. /// Objects of this class should only be allocated using System::MakeObject() function. /// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. /// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. class ASPOSECPP_SHARED_CLASS FileVersionInfo { public: /// Gets file version info; not implemented. /// @param fileName Path to file to get information for. static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName); /// Gets product version field. /// @return Product version string. String ASPOSECPP_SHARED_API get_ProductVersion() const; private: /// File name. String m_file_name; /// Company name. String m_company_name; /// File description. String m_file_description; /// File version. String m_file_version; /// Internal name. String m_internal_name; /// Legal copyright. String m_legal_copyright; /// Original filename. String m_original_filename; /// Product name. String m_product_name; /// Product version. String m_product_version; /// Comments. String m_comments; /// Trademarks. String m_legal_trademarks; /// Private build information. String m_private_build; /// Special build information. String m_special_build; /// Language information. String m_language; /// Major file version. int m_file_major; /// Minor file version. int m_file_minor; /// File build number. int m_file_build; /// File private version. int m_file_private; /// Major product version. int m_product_major; /// Minor product version. int m_product_minor; /// Product build number. int m_product_build; /// Product private version int m_product_private; /// Flags. int m_file_flags; }; }} #endif
30.8
70
(translation_unit) "/// @file system/diagnostics/file_version_info.h\n#ifndef _file_version_info_h_\n#define _file_version_info_h_\n\n#include "fwd.h"\n#include "system/string.h"\n\nnamespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}\n#endif\n" (comment) "/// @file system/diagnostics/file_version_info.h" (preproc_ifdef) "#ifndef _file_version_info_h_\n#define _file_version_info_h_\n\n#include "fwd.h"\n#include "system/string.h"\n\nnamespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}\n#endif" (#ifndef) "#ifndef" (identifier) "_file_version_info_h_" (preproc_def) "#define _file_version_info_h_\n" (#define) "#define" (identifier) "_file_version_info_h_" (preproc_include) "#include "fwd.h"\n" (#include) "#include" (string_literal) ""fwd.h"" (") """ (string_content) "fwd.h" (") """ (preproc_include) "#include "system/string.h"\n" (#include) "#include" (string_literal) ""system/string.h"" (") """ (string_content) "system/string.h" (") """ (function_definition) "namespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}" (type_identifier) "namespace" (identifier) "System" (compound_statement) "{ namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}" ({) "{" (function_definition) "namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}" (type_identifier) "namespace" (identifier) "Diagnostics" (compound_statement) "{ \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}" ({) "{" (comment) "/// Provides information on file version." (comment) "/// Objects of this class should only be allocated using System::MakeObject() function." (comment) "/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults." (comment) "/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument." (function_definition) "class ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n}" (type_identifier) "class" (identifier) "ASPOSECPP_SHARED_CLASS" (ERROR) "FileVersionInfo" (identifier) "FileVersionInfo" (compound_statement) "{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n}" ({) "{" (labeled_statement) "public:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);" (statement_identifier) "public" (:) ":" (comment) "/// Gets file version info; not implemented." (comment) "/// @param fileName Path to file to get information for." (declaration) "static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);" (storage_class_specifier) "static" (static) "static" (type_identifier) "ASPOSECPP_SHARED_API" (ERROR) "SharedPtr<System::Diagnostics::FileVersionInfo>" (identifier) "SharedPtr" (<) "<" (identifier) "System" (:) ":" (:) ":" (identifier) "Diagnostics" (:) ":" (:) ":" (identifier) "FileVersionInfo" (>) ">" (function_declarator) "GetVersionInfo(const String& fileName)" (identifier) "GetVersionInfo" (parameter_list) "(const String& fileName)" (() "(" (parameter_declaration) "const String& fileName" (type_qualifier) "const" (const) "const" (type_identifier) "String" (ERROR) "&" (&) "&" (identifier) "fileName" ()) ")" (;) ";" (comment) "/// Gets product version field." (comment) "/// @return Product version string." (ERROR) "String ASPOSECPP_SHARED_API get_ProductVersion() const" (type_identifier) "String" (ERROR) "ASPOSECPP_SHARED_API" (identifier) "ASPOSECPP_SHARED_API" (function_declarator) "get_ProductVersion()" (identifier) "get_ProductVersion" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (labeled_statement) "private:\n /// File name.\n String m_file_name;" (statement_identifier) "private" (:) ":" (comment) "/// File name." (declaration) "String m_file_name;" (type_identifier) "String" (identifier) "m_file_name" (;) ";" (comment) "/// Company name." (declaration) "String m_company_name;" (type_identifier) "String" (identifier) "m_company_name" (;) ";" (comment) "/// File description." (declaration) "String m_file_description;" (type_identifier) "String" (identifier) "m_file_description" (;) ";" (comment) "/// File version." (declaration) "String m_file_version;" (type_identifier) "String" (identifier) "m_file_version" (;) ";" (comment) "/// Internal name." (declaration) "String m_internal_name;" (type_identifier) "String" (identifier) "m_internal_name" (;) ";" (comment) "/// Legal copyright." (declaration) "String m_legal_copyright;" (type_identifier) "String" (identifier) "m_legal_copyright" (;) ";" (comment) "/// Original filename." (declaration) "String m_original_filename;" (type_identifier) "String" (identifier) "m_original_filename" (;) ";" (comment) "/// Product name." (declaration) "String m_product_name;" (type_identifier) "String" (identifier) "m_product_name" (;) ";" (comment) "/// Product version." (declaration) "String m_product_version;" (type_identifier) "String" (identifier) "m_product_version" (;) ";" (comment) "/// Comments." (declaration) "String m_comments;" (type_identifier) "String" (identifier) "m_comments" (;) ";" (comment) "/// Trademarks." (declaration) "String m_legal_trademarks;" (type_identifier) "String" (identifier) "m_legal_trademarks" (;) ";" (comment) "/// Private build information." (declaration) "String m_private_build;" (type_identifier) "String" (identifier) "m_private_build" (;) ";" (comment) "/// Special build information." (declaration) "String m_special_build;" (type_identifier) "String" (identifier) "m_special_build" (;) ";" (comment) "/// Language information." (declaration) "String m_language;" (type_identifier) "String" (identifier) "m_language" (;) ";" (comment) "/// Major file version." (declaration) "int m_file_major;" (primitive_type) "int" (identifier) "m_file_major" (;) ";" (comment) "/// Minor file version." (declaration) "int m_file_minor;" (primitive_type) "int" (identifier) "m_file_minor" (;) ";" (comment) "/// File build number." (declaration) "int m_file_build;" (primitive_type) "int" (identifier) "m_file_build" (;) ";" (comment) "/// File private version." (declaration) "int m_file_private;" (primitive_type) "int" (identifier) "m_file_private" (;) ";" (comment) "/// Major product version." (declaration) "int m_product_major;" (primitive_type) "int" (identifier) "m_product_major" (;) ";" (comment) "/// Minor product version." (declaration) "int m_product_minor;" (primitive_type) "int" (identifier) "m_product_minor" (;) ";" (comment) "/// Product build number." (declaration) "int m_product_build;" (primitive_type) "int" (identifier) "m_product_build" (;) ";" (comment) "/// Product private version" (declaration) "int m_product_private;" (primitive_type) "int" (identifier) "m_product_private" (;) ";" (comment) "/// Flags." (declaration) "int m_file_flags;" (primitive_type) "int" (identifier) "m_file_flags" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (#endif) "#endif"
213
5
{"language": "c", "success": true, "metadata": {"lines": 70, "avg_line_length": 30.8, "nodes": 116, "errors": 0, "source_hash": "d593f31ca5785360f38d16bdbf89ca4654d02946bc6e9aa7e0be6ab04637ff13", "categorized_nodes": 95}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _file_version_info_h_\n#define _file_version_info_h_\n\n#include \"fwd.h\"\n#include \"system/string.h\"\n\nnamespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 115], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 74, "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": "_file_version_info_h_", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define _file_version_info_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": "_file_version_info_h_", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include \"fwd.h\"\n", "parent": 0, "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": "\"fwd.h\"", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 16}}, {"id": 9, "type": "preproc_include", "text": "#include \"system/string.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": "string_literal", "text": "\"system/string.h\"", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 26}}, {"id": 12, "type": "function_definition", "text": "namespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}", "parent": 0, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 73, "column": 2}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 14, "type": "identifier", "text": "System", "parent": 12, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 16}}, {"id": 15, "type": "function_definition", "text": "namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}", "parent": 12, "children": [16, 17], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 73, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 28}}, {"id": 17, "type": "identifier", "text": "Diagnostics", "parent": 15, "children": [], "start_point": {"row": 7, "column": 29}, "end_point": {"row": 7, "column": 40}}, {"id": 18, "type": "function_definition", "text": "class ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n}", "parent": 15, "children": [19, 20], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 19, "type": "identifier", "text": "ASPOSECPP_SHARED_CLASS", "parent": 18, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 28}}, {"id": 20, "type": "ERROR", "text": "FileVersionInfo", "parent": 18, "children": [21], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 44}}, {"id": 21, "type": "identifier", "text": "FileVersionInfo", "parent": 20, "children": [], "start_point": {"row": 13, "column": 29}, "end_point": {"row": 13, "column": 44}}, {"id": 22, "type": "labeled_statement", "text": "public:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);", "parent": 18, "children": [23], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 18, "column": 119}}, {"id": 23, "type": "declaration", "text": "static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);", "parent": 22, "children": [24, 25, 32], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 119}}, {"id": 24, "type": "type_identifier", "text": "ASPOSECPP_SHARED_API", "parent": 23, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 31}}, {"id": 25, "type": "ERROR", "text": "SharedPtr<System::Diagnostics::FileVersionInfo>", "parent": 23, "children": [26, 27, 28, 29, 30, 31], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 79}}, {"id": 26, "type": "identifier", "text": "SharedPtr", "parent": 25, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 41}}, {"id": 27, "type": "<", "text": "<", "parent": 25, "children": [], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 42}}, {"id": 28, "type": "identifier", "text": "System", "parent": 25, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 48}}, {"id": 29, "type": "identifier", "text": "Diagnostics", "parent": 25, "children": [], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 61}}, {"id": 30, "type": "identifier", "text": "FileVersionInfo", "parent": 25, "children": [], "start_point": {"row": 18, "column": 63}, "end_point": {"row": 18, "column": 78}}, {"id": 31, "type": ">", "text": ">", "parent": 25, "children": [], "start_point": {"row": 18, "column": 78}, "end_point": {"row": 18, "column": 79}}, {"id": 32, "type": "function_declarator", "text": "GetVersionInfo(const String& fileName)", "parent": 23, "children": [33, 34], "start_point": {"row": 18, "column": 80}, "end_point": {"row": 18, "column": 118}}, {"id": 33, "type": "identifier", "text": "GetVersionInfo", "parent": 32, "children": [], "start_point": {"row": 18, "column": 80}, "end_point": {"row": 18, "column": 94}}, {"id": 34, "type": "parameter_list", "text": "(const String& fileName)", "parent": 32, "children": [35], "start_point": {"row": 18, "column": 94}, "end_point": {"row": 18, "column": 118}}, {"id": 35, "type": "parameter_declaration", "text": "const String& fileName", "parent": 34, "children": [36, 37], "start_point": {"row": 18, "column": 95}, "end_point": {"row": 18, "column": 117}}, {"id": 36, "type": "type_identifier", "text": "String", "parent": 35, "children": [], "start_point": {"row": 18, "column": 101}, "end_point": {"row": 18, "column": 107}}, {"id": 37, "type": "identifier", "text": "fileName", "parent": 35, "children": [], "start_point": {"row": 18, "column": 109}, "end_point": {"row": 18, "column": 117}}, {"id": 38, "type": "ERROR", "text": "String ASPOSECPP_SHARED_API get_ProductVersion() const", "parent": 18, "children": [39, 40, 42], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 58}}, {"id": 39, "type": "type_identifier", "text": "String", "parent": 38, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 40, "type": "ERROR", "text": "ASPOSECPP_SHARED_API", "parent": 38, "children": [41], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 31}}, {"id": 41, "type": "identifier", "text": "ASPOSECPP_SHARED_API", "parent": 40, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 31}}, {"id": 42, "type": "function_declarator", "text": "get_ProductVersion()", "parent": 38, "children": [43, 44], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 52}}, {"id": 43, "type": "identifier", "text": "get_ProductVersion", "parent": 42, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 50}}, {"id": 44, "type": "parameter_list", "text": "()", "parent": 42, "children": [], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 52}}, {"id": 45, "type": "labeled_statement", "text": "private:\n /// File name.\n String m_file_name;", "parent": 18, "children": [46], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 25, "column": 23}}, {"id": 46, "type": "declaration", "text": "String m_file_name;", "parent": 45, "children": [47, 48], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 23}}, {"id": 47, "type": "type_identifier", "text": "String", "parent": 46, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 48, "type": "identifier", "text": "m_file_name", "parent": 46, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 22}}, {"id": 49, "type": "declaration", "text": "String m_company_name;", "parent": 18, "children": [50, 51], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 26}}, {"id": 50, "type": "type_identifier", "text": "String", "parent": 49, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 10}}, {"id": 51, "type": "identifier", "text": "m_company_name", "parent": 49, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 25}}, {"id": 52, "type": "declaration", "text": "String m_file_description;", "parent": 18, "children": [53, 54], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 30}}, {"id": 53, "type": "type_identifier", "text": "String", "parent": 52, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 10}}, {"id": 54, "type": "identifier", "text": "m_file_description", "parent": 52, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 29}}, {"id": 55, "type": "declaration", "text": "String m_file_version;", "parent": 18, "children": [56, 57], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 26}}, {"id": 56, "type": "type_identifier", "text": "String", "parent": 55, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 10}}, {"id": 57, "type": "identifier", "text": "m_file_version", "parent": 55, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 25}}, {"id": 58, "type": "declaration", "text": "String m_internal_name;", "parent": 18, "children": [59, 60], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 27}}, {"id": 59, "type": "type_identifier", "text": "String", "parent": 58, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 10}}, {"id": 60, "type": "identifier", "text": "m_internal_name", "parent": 58, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 26}}, {"id": 61, "type": "declaration", "text": "String m_legal_copyright;", "parent": 18, "children": [62, 63], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 29}}, {"id": 62, "type": "type_identifier", "text": "String", "parent": 61, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 10}}, {"id": 63, "type": "identifier", "text": "m_legal_copyright", "parent": 61, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 28}}, {"id": 64, "type": "declaration", "text": "String m_original_filename;", "parent": 18, "children": [65, 66], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 31}}, {"id": 65, "type": "type_identifier", "text": "String", "parent": 64, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 10}}, {"id": 66, "type": "identifier", "text": "m_original_filename", "parent": 64, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 30}}, {"id": 67, "type": "declaration", "text": "String m_product_name;", "parent": 18, "children": [68, 69], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 26}}, {"id": 68, "type": "type_identifier", "text": "String", "parent": 67, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 69, "type": "identifier", "text": "m_product_name", "parent": 67, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 25}}, {"id": 70, "type": "declaration", "text": "String m_product_version;", "parent": 18, "children": [71, 72], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 29}}, {"id": 71, "type": "type_identifier", "text": "String", "parent": 70, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 10}}, {"id": 72, "type": "identifier", "text": "m_product_version", "parent": 70, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 28}}, {"id": 73, "type": "declaration", "text": "String m_comments;", "parent": 18, "children": [74, 75], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 22}}, {"id": 74, "type": "type_identifier", "text": "String", "parent": 73, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 10}}, {"id": 75, "type": "identifier", "text": "m_comments", "parent": 73, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 21}}, {"id": 76, "type": "declaration", "text": "String m_legal_trademarks;", "parent": 18, "children": [77, 78], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 30}}, {"id": 77, "type": "type_identifier", "text": "String", "parent": 76, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 10}}, {"id": 78, "type": "identifier", "text": "m_legal_trademarks", "parent": 76, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 29}}, {"id": 79, "type": "declaration", "text": "String m_private_build;", "parent": 18, "children": [80, 81], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 27}}, {"id": 80, "type": "type_identifier", "text": "String", "parent": 79, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 10}}, {"id": 81, "type": "identifier", "text": "m_private_build", "parent": 79, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 26}}, {"id": 82, "type": "declaration", "text": "String m_special_build;", "parent": 18, "children": [83, 84], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 27}}, {"id": 83, "type": "type_identifier", "text": "String", "parent": 82, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 10}}, {"id": 84, "type": "identifier", "text": "m_special_build", "parent": 82, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 26}}, {"id": 85, "type": "declaration", "text": "String m_language;", "parent": 18, "children": [86, 87], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 22}}, {"id": 86, "type": "type_identifier", "text": "String", "parent": 85, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 10}}, {"id": 87, "type": "identifier", "text": "m_language", "parent": 85, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 21}}, {"id": 88, "type": "declaration", "text": "int m_file_major;", "parent": 18, "children": [89, 90], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 21}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 7}}, {"id": 90, "type": "identifier", "text": "m_file_major", "parent": 88, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 20}}, {"id": 91, "type": "declaration", "text": "int m_file_minor;", "parent": 18, "children": [92, 93], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 21}}, {"id": 92, "type": "primitive_type", "text": "int", "parent": 91, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 7}}, {"id": 93, "type": "identifier", "text": "m_file_minor", "parent": 91, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 20}}, {"id": 94, "type": "declaration", "text": "int m_file_build;", "parent": 18, "children": [95, 96], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 21}}, {"id": 95, "type": "primitive_type", "text": "int", "parent": 94, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 7}}, {"id": 96, "type": "identifier", "text": "m_file_build", "parent": 94, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 20}}, {"id": 97, "type": "declaration", "text": "int m_file_private;", "parent": 18, "children": [98, 99], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 23}}, {"id": 98, "type": "primitive_type", "text": "int", "parent": 97, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 7}}, {"id": 99, "type": "identifier", "text": "m_file_private", "parent": 97, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 22}}, {"id": 100, "type": "declaration", "text": "int m_product_major;", "parent": 18, "children": [101, 102], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 24}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 7}}, {"id": 102, "type": "identifier", "text": "m_product_major", "parent": 100, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 23}}, {"id": 103, "type": "declaration", "text": "int m_product_minor;", "parent": 18, "children": [104, 105], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 24}}, {"id": 104, "type": "primitive_type", "text": "int", "parent": 103, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 7}}, {"id": 105, "type": "identifier", "text": "m_product_minor", "parent": 103, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 23}}, {"id": 106, "type": "declaration", "text": "int m_product_build;", "parent": 18, "children": [107, 108], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 24}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 106, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 7}}, {"id": 108, "type": "identifier", "text": "m_product_build", "parent": 106, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 23}}, {"id": 109, "type": "declaration", "text": "int m_product_private;", "parent": 18, "children": [110, 111], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 26}}, {"id": 110, "type": "primitive_type", "text": "int", "parent": 109, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 7}}, {"id": 111, "type": "identifier", "text": "m_product_private", "parent": 109, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 25}}, {"id": 112, "type": "declaration", "text": "int m_file_flags;", "parent": 18, "children": [113, 114], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 21}}, {"id": 113, "type": "primitive_type", "text": "int", "parent": 112, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 7}}, {"id": 114, "type": "identifier", "text": "m_file_flags", "parent": 112, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 20}}, {"id": 115, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 15, 18, 32, 42], "variables": [23, 35, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 14, 16, 17, 19, 21, 24, 26, 28, 29, 30, 33, 36, 37, 39, 41, 43, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 115], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "should", "text_snippet": "namespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects o"}, {"node_id": 15, "universal_type": "function", "name": "should", "text_snippet": "namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should"}, {"node_id": 18, "universal_type": "function", "name": "ASPOSECPP_SHARED_CLASS", "text_snippet": "class ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implement"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "GetVersionInfo(const String& fileName)"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "get_ProductVersion()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"fwd.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"system/string.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/// @file system/diagnostics/file_version_info.h\n#ifndef _file_version_info_h_\n#define _file_version_info_h_\n\n#include \"fwd.h\"\n#include \"system/string.h\"\n\nnamespace System { namespace Diagnostics { \n\n/// Provides information on file version.\n/// Objects of this class should only be allocated using System::MakeObject() function.\n/// Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults.\n/// Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.\nclass ASPOSECPP_SHARED_CLASS FileVersionInfo\n{\npublic:\n /// Gets file version info; not implemented.\n /// @param fileName Path to file to get information for.\n static ASPOSECPP_SHARED_API SharedPtr<System::Diagnostics::FileVersionInfo> GetVersionInfo(const String& fileName);\n /// Gets product version field.\n /// @return Product version string.\n String ASPOSECPP_SHARED_API get_ProductVersion() const;\n\nprivate:\n /// File name.\n String m_file_name;\n /// Company name.\n String m_company_name;\n /// File description.\n String m_file_description;\n /// File version.\n String m_file_version;\n /// Internal name.\n String m_internal_name;\n /// Legal copyright.\n String m_legal_copyright;\n /// Original filename.\n String m_original_filename;\n /// Product name.\n String m_product_name;\n /// Product version.\n String m_product_version;\n /// Comments.\n String m_comments;\n /// Trademarks.\n String m_legal_trademarks;\n /// Private build information.\n String m_private_build;\n /// Special build information.\n String m_special_build;\n /// Language information.\n String m_language;\n /// Major file version.\n int m_file_major;\n /// Minor file version.\n int m_file_minor;\n /// File build number.\n int m_file_build;\n /// File private version.\n int m_file_private;\n /// Major product version.\n int m_product_major;\n /// Minor product version.\n int m_product_minor;\n /// Product build number.\n int m_product_build;\n /// Product private version\n int m_product_private;\n /// Flags.\n int m_file_flags;\n\n};\n \n}}\n#endif\n"}
292
c
/* This file is part of VoltDB. * Copyright (C) 2019 VoltDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with VoltDB. If not, see <http://www.gnu.org/licenses/>. */ #ifndef VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_ #define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_ #include "stdint.h" #include "common/HiddenColumn.h" #include "common/TupleSchema.h" namespace voltdb { /** * Very basic hidden column filter which currently only can skip a single column at a specific index */ class HiddenColumnFilter { public: // Values must match those also in java enum HiddenColumnFilterType enum Type : uint8_t { ALL = 0, NONE = 1, EXCLUDE_MIGRATE = 2 }; inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) { uint8_t skip; uint8_t reduceCount = 0; switch (type) { case ALL: return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0); break; case EXCLUDE_MIGRATE: skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN); reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN; break; default: vassert(false); /* no break */ case NONE: skip = TupleSchema::UNSET_HIDDEN_COLUMN; } uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount; return HiddenColumnFilter(skip, hiddenCount); } inline bool include(uint16_t index) const { return index != m_skip && m_hiddenCount; } inline const uint8_t getHiddenColumnCount() const { return m_hiddenCount; } private: HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {} const uint8_t m_skip; const uint8_t m_hiddenCount; }; } #endif /* VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_ */
35.82
66
(translation_unit) "/* This file is part of VoltDB.\n * Copyright (C) 2019 VoltDB Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program 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 Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with VoltDB. If not, see <http://www.gnu.org/licenses/>.\n */\n\n#ifndef VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n#define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n\n#include "stdint.h"\n#include "common/HiddenColumn.h"\n#include "common/TupleSchema.h"\n\nnamespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}\n\n#endif /* VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_ */\n" (comment) "/* This file is part of VoltDB.\n * Copyright (C) 2019 VoltDB Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program 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 Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with VoltDB. If not, see <http://www.gnu.org/licenses/>.\n */" (preproc_ifdef) "#ifndef VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n#define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n\n#include "stdint.h"\n#include "common/HiddenColumn.h"\n#include "common/TupleSchema.h"\n\nnamespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_" (preproc_def) "#define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n" (#define) "#define" (identifier) "VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_" (preproc_include) "#include "stdint.h"\n" (#include) "#include" (string_literal) ""stdint.h"" (") """ (string_content) "stdint.h" (") """ (preproc_include) "#include "common/HiddenColumn.h"\n" (#include) "#include" (string_literal) ""common/HiddenColumn.h"" (") """ (string_content) "common/HiddenColumn.h" (") """ (preproc_include) "#include "common/TupleSchema.h"\n" (#include) "#include" (string_literal) ""common/TupleSchema.h"" (") """ (string_content) "common/TupleSchema.h" (") """ (function_definition) "namespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}" (type_identifier) "namespace" (identifier) "voltdb" (compound_statement) "{\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}" ({) "{" (comment) "/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */" (function_definition) "class HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n}" (type_identifier) "class" (identifier) "HiddenColumnFilter" (compound_statement) "{\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n}" ({) "{" (labeled_statement) "public:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };" (statement_identifier) "public" (:) ":" (comment) "// Values must match those also in java enum HiddenColumnFilterType" (declaration) "enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };" (enum_specifier) "enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n }" (enum) "enum" (type_identifier) "Type" (:) ":" (primitive_type) "uint8_t" (enumerator_list) "{\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n }" ({) "{" (enumerator) "ALL = 0" (identifier) "ALL" (=) "=" (number_literal) "0" (,) "," (enumerator) "NONE = 1" (identifier) "NONE" (=) "=" (number_literal) "1" (,) "," (enumerator) "EXCLUDE_MIGRATE = 2" (identifier) "EXCLUDE_MIGRATE" (=) "=" (number_literal) "2" (}) "}" (identifier) "" (;) ";" (function_definition) "inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }" (storage_class_specifier) "inline" (inline) "inline" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "HiddenColumnFilter" (function_declarator) "create(Type type, const TupleSchema *schema)" (identifier) "create" (parameter_list) "(Type type, const TupleSchema *schema)" (() "(" (parameter_declaration) "Type type" (type_identifier) "Type" (identifier) "type" (,) "," (parameter_declaration) "const TupleSchema *schema" (type_qualifier) "const" (const) "const" (type_identifier) "TupleSchema" (pointer_declarator) "*schema" (*) "*" (identifier) "schema" ()) ")" (compound_statement) "{\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }" ({) "{" (declaration) "uint8_t skip;" (primitive_type) "uint8_t" (identifier) "skip" (;) ";" (declaration) "uint8_t reduceCount = 0;" (primitive_type) "uint8_t" (init_declarator) "reduceCount = 0" (identifier) "reduceCount" (=) "=" (number_literal) "0" (;) ";" (switch_statement) "switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }" (switch) "switch" (parenthesized_expression) "(type)" (() "(" (identifier) "type" ()) ")" (compound_statement) "{\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }" ({) "{" (case_statement) "case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;" (case) "case" (identifier) "ALL" (:) ":" (return_statement) "return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);" (return) "return" (call_expression) "HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0)" (identifier) "HiddenColumnFilter" (argument_list) "(TupleSchema::UNSET_HIDDEN_COLUMN, 0)" (() "(" (ERROR) "TupleSchema::" (identifier) "TupleSchema" (:) ":" (:) ":" (identifier) "UNSET_HIDDEN_COLUMN" (,) "," (number_literal) "0" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;" (case) "case" (identifier) "EXCLUDE_MIGRATE" (:) ":" (expression_statement) "skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);" (assignment_expression) "skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN)" (identifier) "skip" (=) "=" (call_expression) "schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN)" (field_expression) "schema->getHiddenColumnIndex" (identifier) "schema" (->) "->" (field_identifier) "getHiddenColumnIndex" (argument_list) "(HiddenColumn::MIGRATE_TXN)" (() "(" (identifier) "HiddenColumn" (ERROR) "::MIGRATE_TXN" (:) ":" (:) ":" (identifier) "MIGRATE_TXN" ()) ")" (;) ";" (expression_statement) "reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;" (assignment_expression) "reduceCount = skip != TupleSchema" (identifier) "reduceCount" (=) "=" (binary_expression) "skip != TupleSchema" (identifier) "skip" (!=) "!=" (identifier) "TupleSchema" (ERROR) "::UNSET_HIDDEN_COLUMN" (:) ":" (:) ":" (identifier) "UNSET_HIDDEN_COLUMN" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n vassert(false);" (default) "default" (:) ":" (expression_statement) "vassert(false);" (call_expression) "vassert(false)" (identifier) "vassert" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (;) ";" (comment) "/* no break */" (case_statement) "case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;" (case) "case" (identifier) "NONE" (:) ":" (ERROR) "skip = TupleSchema::" (assignment_expression) "skip = TupleSchema" (identifier) "skip" (=) "=" (identifier) "TupleSchema" (:) ":" (:) ":" (expression_statement) "UNSET_HIDDEN_COLUMN;" (identifier) "UNSET_HIDDEN_COLUMN" (;) ";" (}) "}" (declaration) "uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;" (primitive_type) "uint8_t" (init_declarator) "hiddenCount = schema->hiddenColumnCount() - reduceCount" (identifier) "hiddenCount" (=) "=" (binary_expression) "schema->hiddenColumnCount() - reduceCount" (call_expression) "schema->hiddenColumnCount()" (field_expression) "schema->hiddenColumnCount" (identifier) "schema" (->) "->" (field_identifier) "hiddenColumnCount" (argument_list) "()" (() "(" ()) ")" (-) "-" (identifier) "reduceCount" (;) ";" (return_statement) "return HiddenColumnFilter(skip, hiddenCount);" (return) "return" (call_expression) "HiddenColumnFilter(skip, hiddenCount)" (identifier) "HiddenColumnFilter" (argument_list) "(skip, hiddenCount)" (() "(" (identifier) "skip" (,) "," (identifier) "hiddenCount" ()) ")" (;) ";" (}) "}" (function_definition) "inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "include(uint16_t index) const" (identifier) "include" (parameter_list) "(uint16_t index)" (() "(" (parameter_declaration) "uint16_t index" (primitive_type) "uint16_t" (identifier) "index" ()) ")" (identifier) "const" (compound_statement) "{\n return index != m_skip && m_hiddenCount;\n }" ({) "{" (return_statement) "return index != m_skip && m_hiddenCount;" (return) "return" (binary_expression) "index != m_skip && m_hiddenCount" (binary_expression) "index != m_skip" (identifier) "index" (!=) "!=" (identifier) "m_skip" (&&) "&&" (identifier) "m_hiddenCount" (;) ";" (}) "}" (ERROR) "inline const uint8_t getHiddenColumnCount() const" (storage_class_specifier) "inline" (inline) "inline" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (function_declarator) "getHiddenColumnCount()" (identifier) "getHiddenColumnCount" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return m_hiddenCount;\n }" ({) "{" (return_statement) "return m_hiddenCount;" (return) "return" (identifier) "m_hiddenCount" (;) ";" (}) "}" (labeled_statement) "private:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;" (statement_identifier) "private" (:) ":" (declaration) "HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;" (macro_type_specifier) "HiddenColumnFilter(uint8_t" (identifier) "HiddenColumnFilter" (() "(" (type_descriptor) "uint8_t" (primitive_type) "uint8_t" ()) "" (identifier) "skip" (,) "," (ERROR) "uint8_t hiddenCount) :" (identifier) "uint8_t" (identifier) "hiddenCount" ()) ")" (:) ":" (function_declarator) "m_skip(skip)" (identifier) "m_skip" (parameter_list) "(skip)" (() "(" (parameter_declaration) "skip" (type_identifier) "skip" ()) ")" (,) "," (ERROR) "m_hiddenCount(hiddenCount) {}\n\n const uint8_t" (function_declarator) "m_hiddenCount(hiddenCount)" (identifier) "m_hiddenCount" (parameter_list) "(hiddenCount)" (() "(" (parameter_declaration) "hiddenCount" (type_identifier) "hiddenCount" ()) ")" ({) "{" (}) "}" (const) "const" (primitive_type) "uint8_t" (identifier) "m_skip" (;) ";" (declaration) "const uint8_t m_hiddenCount;" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (identifier) "m_hiddenCount" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (#endif) "#endif" (comment) "/* VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_ */"
324
7
{"language": "c", "success": true, "metadata": {"lines": 66, "avg_line_length": 35.82, "nodes": 194, "errors": 0, "source_hash": "dafff3e8ada86359a62b17d797098f4030302562779c4650db88681c16d21471", "categorized_nodes": 137}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n#define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n\n#include \"stdint.h\"\n#include \"common/HiddenColumn.h\"\n#include \"common/TupleSchema.h\"\n\nnamespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 193], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 2, "type": "identifier", "text": "VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_", "parent": 0, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 46}}, {"id": 3, "type": "preproc_def", "text": "#define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 5, "type": "identifier", "text": "VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_", "parent": 3, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 46}}, {"id": 6, "type": "preproc_include", "text": "#include \"stdint.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"stdint.h\"", "parent": 6, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"common/HiddenColumn.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"common/HiddenColumn.h\"", "parent": 9, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 32}}, {"id": 12, "type": "preproc_include", "text": "#include \"common/TupleSchema.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"common/TupleSchema.h\"", "parent": 12, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 31}}, {"id": 15, "type": "function_definition", "text": "namespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 9}}, {"id": 17, "type": "identifier", "text": "voltdb", "parent": 15, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 16}}, {"id": 18, "type": "function_definition", "text": "class HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n}", "parent": 15, "children": [19], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 19, "type": "identifier", "text": "HiddenColumnFilter", "parent": 18, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 24}}, {"id": 20, "type": "labeled_statement", "text": "public:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };", "parent": 18, "children": [21], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 21, "type": "declaration", "text": "enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };", "parent": 20, "children": [22, 39], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 36, "column": 6}}, {"id": 22, "type": "enum_specifier", "text": "enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n }", "parent": 21, "children": [23, 24, 25, 26], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 23, "type": "enum", "text": "enum", "parent": 22, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 8}}, {"id": 24, "type": "type_identifier", "text": "Type", "parent": 22, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 13}}, {"id": 25, "type": "primitive_type", "text": "uint8_t", "parent": 22, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 23}}, {"id": 26, "type": "enumerator_list", "text": "{\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n }", "parent": 22, "children": [27, 31, 35], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 36, "column": 5}}, {"id": 27, "type": "enumerator", "text": "ALL = 0", "parent": 26, "children": [28, 29, 30], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 15}}, {"id": 28, "type": "identifier", "text": "ALL", "parent": 27, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 29, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 13}}, {"id": 30, "type": "number_literal", "text": "0", "parent": 27, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 15}}, {"id": 31, "type": "enumerator", "text": "NONE = 1", "parent": 26, "children": [32, 33, 34], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 16}}, {"id": 32, "type": "identifier", "text": "NONE", "parent": 31, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 12}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 34, "type": "number_literal", "text": "1", "parent": 31, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 16}}, {"id": 35, "type": "enumerator", "text": "EXCLUDE_MIGRATE = 2", "parent": 26, "children": [36, 37, 38], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 27}}, {"id": 36, "type": "identifier", "text": "EXCLUDE_MIGRATE", "parent": 35, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 23}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 25}}, {"id": 38, "type": "number_literal", "text": "2", "parent": 35, "children": [], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 27}}, {"id": 39, "type": "identifier", "text": "", "parent": 21, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 5}}, {"id": 40, "type": "function_definition", "text": "inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }", "parent": 18, "children": [41, 43, 44], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 59, "column": 5}}, {"id": 41, "type": "storage_class_specifier", "text": "inline", "parent": 40, "children": [42], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 42, "type": "inline", "text": "inline", "parent": 41, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 10}}, {"id": 43, "type": "type_identifier", "text": "HiddenColumnFilter", "parent": 40, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 42}}, {"id": 44, "type": "function_declarator", "text": "create(Type type, const TupleSchema *schema)", "parent": 40, "children": [45, 46], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 87}}, {"id": 45, "type": "identifier", "text": "create", "parent": 44, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 49}}, {"id": 46, "type": "parameter_list", "text": "(Type type, const TupleSchema *schema)", "parent": 44, "children": [47, 50], "start_point": {"row": 38, "column": 49}, "end_point": {"row": 38, "column": 87}}, {"id": 47, "type": "parameter_declaration", "text": "Type type", "parent": 46, "children": [48, 49], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 59}}, {"id": 48, "type": "type_identifier", "text": "Type", "parent": 47, "children": [], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 54}}, {"id": 49, "type": "identifier", "text": "type", "parent": 47, "children": [], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 59}}, {"id": 50, "type": "parameter_declaration", "text": "const TupleSchema *schema", "parent": 46, "children": [51, 52], "start_point": {"row": 38, "column": 61}, "end_point": {"row": 38, "column": 86}}, {"id": 51, "type": "type_identifier", "text": "TupleSchema", "parent": 50, "children": [], "start_point": {"row": 38, "column": 67}, "end_point": {"row": 38, "column": 78}}, {"id": 52, "type": "pointer_declarator", "text": "*schema", "parent": 50, "children": [53, 54], "start_point": {"row": 38, "column": 79}, "end_point": {"row": 38, "column": 86}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 38, "column": 79}, "end_point": {"row": 38, "column": 80}}, {"id": 54, "type": "identifier", "text": "schema", "parent": 52, "children": [], "start_point": {"row": 38, "column": 80}, "end_point": {"row": 38, "column": 86}}, {"id": 55, "type": "declaration", "text": "uint8_t skip;", "parent": 40, "children": [56, 57], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 21}}, {"id": 56, "type": "primitive_type", "text": "uint8_t", "parent": 55, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 15}}, {"id": 57, "type": "identifier", "text": "skip", "parent": 55, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 20}}, {"id": 58, "type": "declaration", "text": "uint8_t reduceCount = 0;", "parent": 40, "children": [59, 60], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 32}}, {"id": 59, "type": "primitive_type", "text": "uint8_t", "parent": 58, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 15}}, {"id": 60, "type": "init_declarator", "text": "reduceCount = 0", "parent": 58, "children": [61, 62, 63], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 31}}, {"id": 61, "type": "identifier", "text": "reduceCount", "parent": 60, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 27}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 29}}, {"id": 63, "type": "number_literal", "text": "0", "parent": 60, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 31}}, {"id": 64, "type": "switch_statement", "text": "switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }", "parent": 40, "children": [65, 66], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 55, "column": 9}}, {"id": 65, "type": "switch", "text": "switch", "parent": 64, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 14}}, {"id": 66, "type": "parenthesized_expression", "text": "(type)", "parent": 64, "children": [67], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 21}}, {"id": 67, "type": "identifier", "text": "type", "parent": 66, "children": [], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 20}}, {"id": 68, "type": "case_statement", "text": "case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;", "parent": 64, "children": [69, 70, 71, 79], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 45, "column": 18}}, {"id": 69, "type": "case", "text": "case", "parent": 68, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 70, "type": "identifier", "text": "ALL", "parent": 68, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 16}}, {"id": 71, "type": "return_statement", "text": "return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);", "parent": 68, "children": [72], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 75}}, {"id": 72, "type": "call_expression", "text": "HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0)", "parent": 71, "children": [73, 74], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 74}}, {"id": 73, "type": "identifier", "text": "HiddenColumnFilter", "parent": 72, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 37}}, {"id": 74, "type": "argument_list", "text": "(TupleSchema::UNSET_HIDDEN_COLUMN, 0)", "parent": 72, "children": [75, 77, 78], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 74}}, {"id": 75, "type": "ERROR", "text": "TupleSchema::", "parent": 74, "children": [76], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 51}}, {"id": 76, "type": "identifier", "text": "TupleSchema", "parent": 75, "children": [], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 49}}, {"id": 77, "type": "identifier", "text": "UNSET_HIDDEN_COLUMN", "parent": 74, "children": [], "start_point": {"row": 44, "column": 51}, "end_point": {"row": 44, "column": 70}}, {"id": 78, "type": "number_literal", "text": "0", "parent": 74, "children": [], "start_point": {"row": 44, "column": 72}, "end_point": {"row": 44, "column": 73}}, {"id": 79, "type": "break_statement", "text": "break;", "parent": 68, "children": [80], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 18}}, {"id": 80, "type": "break", "text": "break", "parent": 79, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 17}}, {"id": 81, "type": "case_statement", "text": "case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;", "parent": 64, "children": [82, 83, 104], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 49, "column": 18}}, {"id": 82, "type": "case", "text": "case", "parent": 81, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 12}}, {"id": 83, "type": "identifier", "text": "EXCLUDE_MIGRATE", "parent": 81, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 28}}, {"id": 84, "type": "assignment_expression", "text": "skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN)", "parent": 81, "children": [85, 86, 87], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 74}}, {"id": 85, "type": "identifier", "text": "skip", "parent": 84, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 16}}, {"id": 86, "type": "=", "text": "=", "parent": 84, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 18}}, {"id": 87, "type": "call_expression", "text": "schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN)", "parent": 84, "children": [88, 91], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 74}}, {"id": 88, "type": "field_expression", "text": "schema->getHiddenColumnIndex", "parent": 87, "children": [89, 90], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 47}}, {"id": 89, "type": "identifier", "text": "schema", "parent": 88, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 25}}, {"id": 90, "type": "field_identifier", "text": "getHiddenColumnIndex", "parent": 88, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 47}}, {"id": 91, "type": "argument_list", "text": "(HiddenColumn::MIGRATE_TXN)", "parent": 87, "children": [92, 93], "start_point": {"row": 47, "column": 47}, "end_point": {"row": 47, "column": 74}}, {"id": 92, "type": "identifier", "text": "HiddenColumn", "parent": 91, "children": [], "start_point": {"row": 47, "column": 48}, "end_point": {"row": 47, "column": 60}}, {"id": 93, "type": "ERROR", "text": "::MIGRATE_TXN", "parent": 91, "children": [94], "start_point": {"row": 47, "column": 60}, "end_point": {"row": 47, "column": 73}}, {"id": 94, "type": "identifier", "text": "MIGRATE_TXN", "parent": 93, "children": [], "start_point": {"row": 47, "column": 62}, "end_point": {"row": 47, "column": 73}}, {"id": 95, "type": "assignment_expression", "text": "reduceCount = skip != TupleSchema", "parent": 81, "children": [96, 97, 98], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 45}}, {"id": 96, "type": "identifier", "text": "reduceCount", "parent": 95, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 23}}, {"id": 97, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 98, "type": "binary_expression", "text": "skip != TupleSchema", "parent": 95, "children": [99, 100, 101], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 45}}, {"id": 99, "type": "identifier", "text": "skip", "parent": 98, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 30}}, {"id": 100, "type": "!=", "text": "!=", "parent": 98, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 33}}, {"id": 101, "type": "identifier", "text": "TupleSchema", "parent": 98, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 45}}, {"id": 102, "type": "ERROR", "text": "::UNSET_HIDDEN_COLUMN", "parent": 81, "children": [103], "start_point": {"row": 48, "column": 45}, "end_point": {"row": 48, "column": 66}}, {"id": 103, "type": "identifier", "text": "UNSET_HIDDEN_COLUMN", "parent": 102, "children": [], "start_point": {"row": 48, "column": 47}, "end_point": {"row": 48, "column": 66}}, {"id": 104, "type": "break_statement", "text": "break;", "parent": 81, "children": [105], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 18}}, {"id": 105, "type": "break", "text": "break", "parent": 104, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 17}}, {"id": 106, "type": "case_statement", "text": "default:\n vassert(false);", "parent": 64, "children": [107], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 51, "column": 27}}, {"id": 107, "type": "default", "text": "default", "parent": 106, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 15}}, {"id": 108, "type": "call_expression", "text": "vassert(false)", "parent": 106, "children": [109, 110], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 26}}, {"id": 109, "type": "identifier", "text": "vassert", "parent": 108, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 19}}, {"id": 110, "type": "argument_list", "text": "(false)", "parent": 108, "children": [111], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 26}}, {"id": 111, "type": "false", "text": "false", "parent": 110, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 25}}, {"id": 112, "type": "case_statement", "text": "case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;", "parent": 64, "children": [113, 114, 115], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 54, "column": 52}}, {"id": 113, "type": "case", "text": "case", "parent": 112, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 12}}, {"id": 114, "type": "identifier", "text": "NONE", "parent": 112, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 17}}, {"id": 115, "type": "ERROR", "text": "skip = TupleSchema::", "parent": 112, "children": [116], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 32}}, {"id": 116, "type": "assignment_expression", "text": "skip = TupleSchema", "parent": 115, "children": [117, 118, 119], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 30}}, {"id": 117, "type": "identifier", "text": "skip", "parent": 116, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 16}}, {"id": 118, "type": "=", "text": "=", "parent": 116, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 18}}, {"id": 119, "type": "identifier", "text": "TupleSchema", "parent": 116, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 30}}, {"id": 120, "type": "identifier", "text": "UNSET_HIDDEN_COLUMN", "parent": 112, "children": [], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 51}}, {"id": 121, "type": "declaration", "text": "uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;", "parent": 40, "children": [122, 123], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 72}}, {"id": 122, "type": "primitive_type", "text": "uint8_t", "parent": 121, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 15}}, {"id": 123, "type": "init_declarator", "text": "hiddenCount = schema->hiddenColumnCount() - reduceCount", "parent": 121, "children": [124, 125, 126], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 71}}, {"id": 124, "type": "identifier", "text": "hiddenCount", "parent": 123, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 27}}, {"id": 125, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 57, "column": 28}, "end_point": {"row": 57, "column": 29}}, {"id": 126, "type": "binary_expression", "text": "schema->hiddenColumnCount() - reduceCount", "parent": 123, "children": [127, 132, 133], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 71}}, {"id": 127, "type": "call_expression", "text": "schema->hiddenColumnCount()", "parent": 126, "children": [128, 131], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 57}}, {"id": 128, "type": "field_expression", "text": "schema->hiddenColumnCount", "parent": 127, "children": [129, 130], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 55}}, {"id": 129, "type": "identifier", "text": "schema", "parent": 128, "children": [], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 36}}, {"id": 130, "type": "field_identifier", "text": "hiddenColumnCount", "parent": 128, "children": [], "start_point": {"row": 57, "column": 38}, "end_point": {"row": 57, "column": 55}}, {"id": 131, "type": "argument_list", "text": "()", "parent": 127, "children": [], "start_point": {"row": 57, "column": 55}, "end_point": {"row": 57, "column": 57}}, {"id": 132, "type": "-", "text": "-", "parent": 126, "children": [], "start_point": {"row": 57, "column": 58}, "end_point": {"row": 57, "column": 59}}, {"id": 133, "type": "identifier", "text": "reduceCount", "parent": 126, "children": [], "start_point": {"row": 57, "column": 60}, "end_point": {"row": 57, "column": 71}}, {"id": 134, "type": "return_statement", "text": "return HiddenColumnFilter(skip, hiddenCount);", "parent": 40, "children": [135], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 53}}, {"id": 135, "type": "call_expression", "text": "HiddenColumnFilter(skip, hiddenCount)", "parent": 134, "children": [136, 137], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 52}}, {"id": 136, "type": "identifier", "text": "HiddenColumnFilter", "parent": 135, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 33}}, {"id": 137, "type": "argument_list", "text": "(skip, hiddenCount)", "parent": 135, "children": [138, 139], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 52}}, {"id": 138, "type": "identifier", "text": "skip", "parent": 137, "children": [], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 38}}, {"id": 139, "type": "identifier", "text": "hiddenCount", "parent": 137, "children": [], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 51}}, {"id": 140, "type": "function_definition", "text": "inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }", "parent": 18, "children": [141, 143, 144], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 63, "column": 5}}, {"id": 141, "type": "storage_class_specifier", "text": "inline", "parent": 140, "children": [142], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 142, "type": "inline", "text": "inline", "parent": 141, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 143, "type": "primitive_type", "text": "bool", "parent": 140, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 15}}, {"id": 144, "type": "function_declarator", "text": "include(uint16_t index) const", "parent": 140, "children": [145, 146], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 45}}, {"id": 145, "type": "identifier", "text": "include", "parent": 144, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 23}}, {"id": 146, "type": "parameter_list", "text": "(uint16_t index)", "parent": 144, "children": [147], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 39}}, {"id": 147, "type": "parameter_declaration", "text": "uint16_t index", "parent": 146, "children": [148, 149], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 38}}, {"id": 148, "type": "primitive_type", "text": "uint16_t", "parent": 147, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 32}}, {"id": 149, "type": "identifier", "text": "index", "parent": 147, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 38}}, {"id": 150, "type": "return_statement", "text": "return index != m_skip && m_hiddenCount;", "parent": 140, "children": [151], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 48}}, {"id": 151, "type": "binary_expression", "text": "index != m_skip && m_hiddenCount", "parent": 150, "children": [152, 156, 157], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 47}}, {"id": 152, "type": "binary_expression", "text": "index != m_skip", "parent": 151, "children": [153, 154, 155], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 30}}, {"id": 153, "type": "identifier", "text": "index", "parent": 152, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 20}}, {"id": 154, "type": "!=", "text": "!=", "parent": 152, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 23}}, {"id": 155, "type": "identifier", "text": "m_skip", "parent": 152, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 30}}, {"id": 156, "type": "&&", "text": "&&", "parent": 151, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 33}}, {"id": 157, "type": "identifier", "text": "m_hiddenCount", "parent": 151, "children": [], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 47}}, {"id": 158, "type": "ERROR", "text": "inline const uint8_t getHiddenColumnCount() const", "parent": 18, "children": [159, 161, 162], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 53}}, {"id": 159, "type": "storage_class_specifier", "text": "inline", "parent": 158, "children": [160], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 10}}, {"id": 160, "type": "inline", "text": "inline", "parent": 159, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 10}}, {"id": 161, "type": "primitive_type", "text": "uint8_t", "parent": 158, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 24}}, {"id": 162, "type": "function_declarator", "text": "getHiddenColumnCount()", "parent": 158, "children": [163, 164], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 47}}, {"id": 163, "type": "identifier", "text": "getHiddenColumnCount", "parent": 162, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 45}}, {"id": 164, "type": "parameter_list", "text": "()", "parent": 162, "children": [], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 47}}, {"id": 165, "type": "return_statement", "text": "return m_hiddenCount;", "parent": 18, "children": [166], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 29}}, {"id": 166, "type": "identifier", "text": "m_hiddenCount", "parent": 165, "children": [], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 28}}, {"id": 167, "type": "labeled_statement", "text": "private:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;", "parent": 18, "children": [168], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 72, "column": 25}}, {"id": 168, "type": "declaration", "text": "HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;", "parent": 167, "children": [169, 173, 174, 177, 182, 189], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 72, "column": 25}}, {"id": 169, "type": "macro_type_specifier", "text": "HiddenColumnFilter(uint8_t", "parent": 168, "children": [170, 171], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 30}}, {"id": 170, "type": "identifier", "text": "HiddenColumnFilter", "parent": 169, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 22}}, {"id": 171, "type": "type_descriptor", "text": "uint8_t", "parent": 169, "children": [172], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 30}}, {"id": 172, "type": "primitive_type", "text": "uint8_t", "parent": 171, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 30}}, {"id": 173, "type": "identifier", "text": "skip", "parent": 168, "children": [], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 35}}, {"id": 174, "type": "ERROR", "text": "uint8_t hiddenCount) :", "parent": 168, "children": [175, 176], "start_point": {"row": 70, "column": 37}, "end_point": {"row": 70, "column": 59}}, {"id": 175, "type": "identifier", "text": "uint8_t", "parent": 174, "children": [], "start_point": {"row": 70, "column": 37}, "end_point": {"row": 70, "column": 44}}, {"id": 176, "type": "identifier", "text": "hiddenCount", "parent": 174, "children": [], "start_point": {"row": 70, "column": 45}, "end_point": {"row": 70, "column": 56}}, {"id": 177, "type": "function_declarator", "text": "m_skip(skip)", "parent": 168, "children": [178, 179], "start_point": {"row": 70, "column": 60}, "end_point": {"row": 70, "column": 72}}, {"id": 178, "type": "identifier", "text": "m_skip", "parent": 177, "children": [], "start_point": {"row": 70, "column": 60}, "end_point": {"row": 70, "column": 66}}, {"id": 179, "type": "parameter_list", "text": "(skip)", "parent": 177, "children": [180], "start_point": {"row": 70, "column": 66}, "end_point": {"row": 70, "column": 72}}, {"id": 180, "type": "parameter_declaration", "text": "skip", "parent": 179, "children": [181], "start_point": {"row": 70, "column": 67}, "end_point": {"row": 70, "column": 71}}, {"id": 181, "type": "type_identifier", "text": "skip", "parent": 180, "children": [], "start_point": {"row": 70, "column": 67}, "end_point": {"row": 70, "column": 71}}, {"id": 182, "type": "ERROR", "text": "m_hiddenCount(hiddenCount) {}\n\n const uint8_t", "parent": 168, "children": [183, 188], "start_point": {"row": 70, "column": 74}, "end_point": {"row": 72, "column": 17}}, {"id": 183, "type": "function_declarator", "text": "m_hiddenCount(hiddenCount)", "parent": 182, "children": [184, 185], "start_point": {"row": 70, "column": 74}, "end_point": {"row": 70, "column": 100}}, {"id": 184, "type": "identifier", "text": "m_hiddenCount", "parent": 183, "children": [], "start_point": {"row": 70, "column": 74}, "end_point": {"row": 70, "column": 87}}, {"id": 185, "type": "parameter_list", "text": "(hiddenCount)", "parent": 183, "children": [186], "start_point": {"row": 70, "column": 87}, "end_point": {"row": 70, "column": 100}}, {"id": 186, "type": "parameter_declaration", "text": "hiddenCount", "parent": 185, "children": [187], "start_point": {"row": 70, "column": 88}, "end_point": {"row": 70, "column": 99}}, {"id": 187, "type": "type_identifier", "text": "hiddenCount", "parent": 186, "children": [], "start_point": {"row": 70, "column": 88}, "end_point": {"row": 70, "column": 99}}, {"id": 188, "type": "primitive_type", "text": "uint8_t", "parent": 182, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 17}}, {"id": 189, "type": "identifier", "text": "m_skip", "parent": 168, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 24}}, {"id": 190, "type": "declaration", "text": "const uint8_t m_hiddenCount;", "parent": 18, "children": [191, 192], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 32}}, {"id": 191, "type": "primitive_type", "text": "uint8_t", "parent": 190, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 17}}, {"id": 192, "type": "identifier", "text": "m_hiddenCount", "parent": 190, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 31}}, {"id": 193, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18, 40, 44, 140, 144, 162, 177, 183], "variables": [21, 47, 50, 55, 58, 121, 147, 168, 180, 186, 190], "classes": [41, 141, 159], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": [22, 23, 26, 27, 31, 35]}, "statements": {"expressions": [66, 72, 87, 88, 98, 108, 126, 127, 128, 135, 151, 152], "assignments": [84, 95, 116], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 24, 28, 32, 36, 39, 43, 45, 48, 49, 51, 54, 57, 61, 64, 65, 67, 68, 69, 70, 73, 76, 77, 81, 82, 83, 85, 89, 90, 92, 94, 96, 99, 101, 103, 106, 109, 112, 113, 114, 117, 119, 120, 124, 129, 130, 133, 136, 138, 139, 145, 149, 153, 155, 157, 163, 166, 169, 170, 173, 175, 176, 178, 181, 184, 187, 189, 192, 193], "returns": [71, 134, 150, 165], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 30, 34, 38, 63, 78], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "HiddenColumnFilter", "text_snippet": "namespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single co"}, {"node_id": 18, "universal_type": "function", "name": "HiddenColumnFilter", "text_snippet": "class HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilt"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "create(Type type, const TupleSchema *schema)"}, {"node_id": 140, "universal_type": "function", "name": "include", "text_snippet": "inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "include(uint16_t index) const"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "getHiddenColumnCount()"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "m_skip(skip)"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "m_hiddenCount(hiddenCount)"}], "class_declarations": [{"node_id": 41, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 141, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 159, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include \"stdint.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"common/HiddenColumn.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"common/TupleSchema.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/* This file is part of VoltDB.\n * Copyright (C) 2019 VoltDB Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program 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 Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with VoltDB. If not, see <http://www.gnu.org/licenses/>.\n */\n\n#ifndef VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n#define VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_\n\n#include \"stdint.h\"\n#include \"common/HiddenColumn.h\"\n#include \"common/TupleSchema.h\"\n\nnamespace voltdb {\n\n/**\n * Very basic hidden column filter which currently only can skip a single column at a specific index\n */\nclass HiddenColumnFilter {\npublic:\n // Values must match those also in java enum HiddenColumnFilterType\n enum Type : uint8_t {\n ALL = 0,\n NONE = 1,\n EXCLUDE_MIGRATE = 2\n };\n\n inline static const HiddenColumnFilter create(Type type, const TupleSchema *schema) {\n uint8_t skip;\n uint8_t reduceCount = 0;\n\n switch (type) {\n case ALL:\n return HiddenColumnFilter(TupleSchema::UNSET_HIDDEN_COLUMN, 0);\n break;\n case EXCLUDE_MIGRATE:\n skip = schema->getHiddenColumnIndex(HiddenColumn::MIGRATE_TXN);\n reduceCount = skip != TupleSchema::UNSET_HIDDEN_COLUMN;\n break;\n default:\n vassert(false);\n /* no break */\n case NONE:\n skip = TupleSchema::UNSET_HIDDEN_COLUMN;\n }\n\n uint8_t hiddenCount = schema->hiddenColumnCount() - reduceCount;\n return HiddenColumnFilter(skip, hiddenCount);\n }\n\n inline bool include(uint16_t index) const {\n return index != m_skip && m_hiddenCount;\n }\n\n inline const uint8_t getHiddenColumnCount() const {\n return m_hiddenCount;\n }\n\nprivate:\n HiddenColumnFilter(uint8_t skip, uint8_t hiddenCount) : m_skip(skip), m_hiddenCount(hiddenCount) {}\n\n const uint8_t m_skip;\n const uint8_t m_hiddenCount;\n};\n\n}\n\n#endif /* VOLTDB_EE_COMMON_HIDDENCOLUMNFILTER_H_ */\n"}
293
c
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2020 <NAME> <<EMAIL>> * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as published * by the Free Software Foundation. * See the COPYING file for more information. * **********************************************************************/ #pragma once #include <geos/export.h> #include <geos/operation/overlayng/InputGeometry.h> #include <geos/operation/overlayng/OverlayNG.h> #include <geos/geom/Location.h> #include <geos/geom/LineString.h> #include <vector> // Forward declarations namespace geos { namespace geom { class GeometryFactory; class LineString; } namespace operation { namespace overlayng { class OverlayEdge; class OverlayGraph; class OverlayLabel; class InputGeometry; } } } namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng /** * Finds and builds overlay result lines from the overlay graph. * Output linework has the following semantics: * * - Linework is fully noded * - Lines are as long as possible between nodes * * Various strategies are possible for how to * merge graph edges into lines. * This implementation uses the approach * of having output lines run contiguously from node to node. * For rings a node point is chosen arbitrarily. * * Another possible strategy would be to preserve input linework * as far as possible (i.e. any sections of input lines which are not * coincident with other linework would be preserved). * * It would also be possible to output LinearRings, * if the input is a LinearRing and is unchanged. * This will require additional info from the input linework. * * @author <NAME> */ class GEOS_DLL LineBuilder { private: // Members OverlayGraph* graph; int opCode; const geom::GeometryFactory* geometryFactory; bool hasResultArea; int inputAreaIndex; std::vector<std::unique_ptr<geom::LineString>> lines; /** * Indicates whether intersections are allowed to produce * heterogeneous results including proper boundary touches. * This does not control inclusion of touches along collapses. * True provides the original JTS semantics. */ bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT; /** * Allow lines created by area topology collapses * to appear in the result. * True provides the original JTS semantics. */ bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT; void markResultLines(); /** * Checks if the topology indicated by an edge label * determines that this edge should be part of a result line. * * Note that the logic here relies on the semantic * that for intersection lines are only returned if * there is no result area components. */ bool isResultLine(const OverlayLabel* lbl) const; /** * Determines the effective location for a line, * for the purpose of overlay operation evaluation. * Line edges and Collapses are reported as INTERIOR * so they may be included in the result * if warranted by the effect of the operation * on the two edges. * (For instance, the intersection of line edge and a collapsed boundary * is included in the result). */ geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const; void addResultLines(); void addResultLinesMerged(); std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge); void addResultLinesForNodes(); /** * Adds lines which form rings (i.e. have only degree-2 vertices). */ void addResultLinesRings(); /** * Traverses edges from edgeStart which * lie in a single line (have degree = 2). * * The direction of the linework is preserved as far as possible. * Specifically, the direction of the line is determined * by the start edge direction. This implies * that if all edges are reversed, the created line * will be reversed to match. * (Other more complex strategies would be possible. * E.g. using the direction of the majority of segments, * or preferring the direction of the A edges.) */ std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node); /* * Finds the next edge around a node which forms * part of a result line. */ OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const; /** * Computes the degree of the line edges incident on a node */ int degreeOfLines(OverlayEdge* node) const; public: LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact) : graph(p_graph) , opCode(p_opCode) , geometryFactory(geomFact) , hasResultArea(p_hasResultArea) , inputAreaIndex(inputGeom->getAreaIndex()) , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT) , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT) {} LineBuilder(const LineBuilder&) = delete; LineBuilder& operator=(const LineBuilder&) = delete; std::vector<std::unique_ptr<geom::LineString>> getLines(); void setStrictMode(bool p_isStrictResultMode) { isAllowCollapseLines = ! p_isStrictResultMode; isAllowMixedResult = ! p_isStrictResultMode; } }; } // namespace geos.operation.overlayng } // namespace geos.operation } // namespace geos
33.97
160
(translation_unit) "/**********************************************************************\n *\n * GEOS - Geometry Engine Open Source\n * http://geos.osgeo.org\n *\n * Copyright (C) 2020 <NAME> <<EMAIL>>\n *\n * This is free software; you can redistribute and/or modify it under\n * the terms of the GNU Lesser General Public Licence as published\n * by the Free Software Foundation.\n * See the COPYING file for more information.\n *\n **********************************************************************/\n\n#pragma once\n\n#include <geos/export.h>\n\n#include <geos/operation/overlayng/InputGeometry.h>\n#include <geos/operation/overlayng/OverlayNG.h>\n#include <geos/geom/Location.h>\n#include <geos/geom/LineString.h>\n\n#include <vector>\n\n\n// Forward declarations\nnamespace geos {\nnamespace geom {\nclass GeometryFactory;\nclass LineString;\n}\nnamespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}\n}\n\nnamespace geos { // geos.\nnamespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n} // namespace geos.operation\n} // namespace geos\n\n" (comment) "/**********************************************************************\n *\n * GEOS - Geometry Engine Open Source\n * http://geos.osgeo.org\n *\n * Copyright (C) 2020 <NAME> <<EMAIL>>\n *\n * This is free software; you can redistribute and/or modify it under\n * the terms of the GNU Lesser General Public Licence as published\n * by the Free Software Foundation.\n * See the COPYING file for more information.\n *\n **********************************************************************/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <geos/export.h>\n" (#include) "#include" (system_lib_string) "<geos/export.h>" (preproc_include) "#include <geos/operation/overlayng/InputGeometry.h>\n" (#include) "#include" (system_lib_string) "<geos/operation/overlayng/InputGeometry.h>" (preproc_include) "#include <geos/operation/overlayng/OverlayNG.h>\n" (#include) "#include" (system_lib_string) "<geos/operation/overlayng/OverlayNG.h>" (preproc_include) "#include <geos/geom/Location.h>\n" (#include) "#include" (system_lib_string) "<geos/geom/Location.h>" (preproc_include) "#include <geos/geom/LineString.h>\n" (#include) "#include" (system_lib_string) "<geos/geom/LineString.h>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (comment) "// Forward declarations" (function_definition) "namespace geos {\nnamespace geom {\nclass GeometryFactory;\nclass LineString;\n}\nnamespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}\n}" (type_identifier) "namespace" (identifier) "geos" (compound_statement) "{\nnamespace geom {\nclass GeometryFactory;\nclass LineString;\n}\nnamespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}\n}" ({) "{" (function_definition) "namespace geom {\nclass GeometryFactory;\nclass LineString;\n}" (type_identifier) "namespace" (identifier) "geom" (compound_statement) "{\nclass GeometryFactory;\nclass LineString;\n}" ({) "{" (declaration) "class GeometryFactory;" (type_identifier) "class" (identifier) "GeometryFactory" (;) ";" (declaration) "class LineString;" (type_identifier) "class" (identifier) "LineString" (;) ";" (}) "}" (function_definition) "namespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}" (type_identifier) "namespace" (identifier) "operation" (compound_statement) "{\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}" ({) "{" (function_definition) "namespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}" (type_identifier) "namespace" (identifier) "overlayng" (compound_statement) "{\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}" ({) "{" (declaration) "class OverlayEdge;" (type_identifier) "class" (identifier) "OverlayEdge" (;) ";" (declaration) "class OverlayGraph;" (type_identifier) "class" (identifier) "OverlayGraph" (;) ";" (declaration) "class OverlayLabel;" (type_identifier) "class" (identifier) "OverlayLabel" (;) ";" (declaration) "class InputGeometry;" (type_identifier) "class" (identifier) "InputGeometry" (;) ";" (}) "}" (}) "}" (}) "}" (function_definition) "namespace geos { // geos.\nnamespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n} // namespace geos.operation\n}" (type_identifier) "namespace" (identifier) "geos" (compound_statement) "{ // geos.\nnamespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n} // namespace geos.operation\n}" ({) "{" (comment) "// geos." (function_definition) "namespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n}" (type_identifier) "namespace" (identifier) "operation" (compound_statement) "{ // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n}" ({) "{" (comment) "// geos.operation" (function_definition) "namespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n}" (type_identifier) "namespace" (identifier) "overlayng" (compound_statement) "{ // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n}" ({) "{" (comment) "// geos.operation.overlayng" (comment) "/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */" (function_definition) "class GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n}" (type_identifier) "class" (ERROR) "GEOS_DLL" (identifier) "GEOS_DLL" (identifier) "LineBuilder" (compound_statement) "{\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n}" ({) "{" (labeled_statement) "private:\n\n // Members\n OverlayGraph* graph;" (statement_identifier) "private" (:) ":" (comment) "// Members" (declaration) "OverlayGraph* graph;" (type_identifier) "OverlayGraph" (pointer_declarator) "* graph" (*) "*" (identifier) "graph" (;) ";" (declaration) "int opCode;" (primitive_type) "int" (identifier) "opCode" (;) ";" (declaration) "const geom::GeometryFactory* geometryFactory;" (type_qualifier) "const" (const) "const" (type_identifier) "geom" (ERROR) "::GeometryFactory" (:) ":" (:) ":" (identifier) "GeometryFactory" (pointer_declarator) "* geometryFactory" (*) "*" (identifier) "geometryFactory" (;) ";" (declaration) "bool hasResultArea;" (primitive_type) "bool" (identifier) "hasResultArea" (;) ";" (declaration) "int inputAreaIndex;" (primitive_type) "int" (identifier) "inputAreaIndex" (;) ";" (labeled_statement) "std::vector<std::unique_ptr<geom::LineString>> lines;" (statement_identifier) "std" (ERROR) "::vector<std::unique_ptr<geom:" (:) ":" (:) ":" (binary_expression) "vector<std" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "unique_ptr<geom" (identifier) "unique_ptr" (<) "<" (identifier) "geom" (:) ":" (:) ":" (expression_statement) "LineString>> lines;" (binary_expression) "LineString>> lines" (identifier) "LineString" (>>) ">>" (identifier) "lines" (;) ";" (comment) "/**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */" (declaration) "bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;" (primitive_type) "bool" (init_declarator) "isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT" (identifier) "isAllowMixedResult" (=) "=" (ERROR) "! OverlayNG::" (unary_expression) "! OverlayNG" (!) "!" (identifier) "OverlayNG" (:) ":" (:) ":" (identifier) "STRICT_MODE_DEFAULT" (;) ";" (comment) "/**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */" (declaration) "bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;" (primitive_type) "bool" (init_declarator) "isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT" (identifier) "isAllowCollapseLines" (=) "=" (ERROR) "! OverlayNG::" (unary_expression) "! OverlayNG" (!) "!" (identifier) "OverlayNG" (:) ":" (:) ":" (identifier) "STRICT_MODE_DEFAULT" (;) ";" (declaration) "void markResultLines();" (primitive_type) "void" (function_declarator) "markResultLines()" (identifier) "markResultLines" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */" (ERROR) "bool isResultLine(const OverlayLabel* lbl) const" (primitive_type) "bool" (function_declarator) "isResultLine(const OverlayLabel* lbl) const" (identifier) "isResultLine" (parameter_list) "(const OverlayLabel* lbl)" (() "(" (parameter_declaration) "const OverlayLabel* lbl" (type_qualifier) "const" (const) "const" (type_identifier) "OverlayLabel" (pointer_declarator) "* lbl" (*) "*" (identifier) "lbl" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (comment) "/**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */" (labeled_statement) "geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;" (statement_identifier) "geom" (:) ":" (ERROR) ":Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const" (:) ":" (type_identifier) "Location" (function_declarator) "effectiveLocation(const OverlayLabel* lbl, int geomIndex) const" (identifier) "effectiveLocation" (parameter_list) "(const OverlayLabel* lbl, int geomIndex)" (() "(" (parameter_declaration) "const OverlayLabel* lbl" (type_qualifier) "const" (const) "const" (type_identifier) "OverlayLabel" (pointer_declarator) "* lbl" (*) "*" (identifier) "lbl" (,) "," (parameter_declaration) "int geomIndex" (primitive_type) "int" (identifier) "geomIndex" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (declaration) "void addResultLines();" (primitive_type) "void" (function_declarator) "addResultLines()" (identifier) "addResultLines" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void addResultLinesMerged();" (primitive_type) "void" (function_declarator) "addResultLinesMerged()" (identifier) "addResultLinesMerged" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);" (statement_identifier) "std" (ERROR) "::unique_ptr<geom:" (:) ":" (:) ":" (binary_expression) "unique_ptr<geom" (identifier) "unique_ptr" (<) "<" (identifier) "geom" (:) ":" (:) ":" (expression_statement) "LineString> toLine(OverlayEdge* edge);" (binary_expression) "LineString> toLine(OverlayEdge* edge)" (identifier) "LineString" (>) ">" (call_expression) "toLine(OverlayEdge* edge)" (identifier) "toLine" (argument_list) "(OverlayEdge* edge)" (() "(" (binary_expression) "OverlayEdge* edge" (identifier) "OverlayEdge" (*) "*" (identifier) "edge" ()) ")" (;) ";" (declaration) "void addResultLinesForNodes();" (primitive_type) "void" (function_declarator) "addResultLinesForNodes()" (identifier) "addResultLinesForNodes" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */" (declaration) "void addResultLinesRings();" (primitive_type) "void" (function_declarator) "addResultLinesRings()" (identifier) "addResultLinesRings" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */" (labeled_statement) "std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);" (statement_identifier) "std" (ERROR) "::unique_ptr<geom:" (:) ":" (:) ":" (binary_expression) "unique_ptr<geom" (identifier) "unique_ptr" (<) "<" (identifier) "geom" (:) ":" (:) ":" (expression_statement) "LineString> buildLine(OverlayEdge* node);" (binary_expression) "LineString> buildLine(OverlayEdge* node)" (identifier) "LineString" (>) ">" (call_expression) "buildLine(OverlayEdge* node)" (identifier) "buildLine" (argument_list) "(OverlayEdge* node)" (() "(" (binary_expression) "OverlayEdge* node" (identifier) "OverlayEdge" (*) "*" (identifier) "node" ()) ")" (;) ";" (comment) "/*\n * Finds the next edge around a node which forms\n * part of a result line.\n */" (declaration) "OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;" (type_identifier) "OverlayEdge" (pointer_declarator) "* nextLineEdgeUnvisited(OverlayEdge* node) const" (*) "*" (function_declarator) "nextLineEdgeUnvisited(OverlayEdge* node) const" (identifier) "nextLineEdgeUnvisited" (parameter_list) "(OverlayEdge* node)" (() "(" (parameter_declaration) "OverlayEdge* node" (type_identifier) "OverlayEdge" (pointer_declarator) "* node" (*) "*" (identifier) "node" ()) ")" (identifier) "const" (;) ";" (comment) "/**\n * Computes the degree of the line edges incident on a node\n */" (ERROR) "int degreeOfLines(OverlayEdge* node) const" (primitive_type) "int" (function_declarator) "degreeOfLines(OverlayEdge* node) const" (identifier) "degreeOfLines" (parameter_list) "(OverlayEdge* node)" (() "(" (parameter_declaration) "OverlayEdge* node" (type_identifier) "OverlayEdge" (pointer_declarator) "* node" (*) "*" (identifier) "node" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "public:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;" (statement_identifier) "public" (:) ":" (declaration) "LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;" (macro_type_specifier) "LineBuilder(const InputGeometry*" (identifier) "LineBuilder" (() "(" (type_descriptor) "const InputGeometry*" (type_qualifier) "const" (const) "const" (type_identifier) "InputGeometry" (abstract_pointer_declarator) "*" (*) "*" ()) "" (identifier) "inputGeom" (,) "," (ERROR) "OverlayGraph" (identifier) "OverlayGraph" (pointer_declarator) "* p_graph" (*) "*" (identifier) "p_graph" (,) "," (ERROR) "bool" (identifier) "bool" (identifier) "p_hasResultArea" (,) "," (ERROR) "int" (identifier) "int" (identifier) "p_opCode" (,) "," (ERROR) "const geom::GeometryFactory* geomFact)\n :" (identifier) "const" (identifier) "geom" (:) ":" (:) ":" (identifier) "GeometryFactory" (pointer_declarator) "* geomFact" (*) "*" (identifier) "geomFact" ()) ")" (:) ":" (function_declarator) "graph(p_graph)" (identifier) "graph" (parameter_list) "(p_graph)" (() "(" (parameter_declaration) "p_graph" (type_identifier) "p_graph" ()) ")" (,) "," (function_declarator) "opCode(p_opCode)" (identifier) "opCode" (parameter_list) "(p_opCode)" (() "(" (parameter_declaration) "p_opCode" (type_identifier) "p_opCode" ()) ")" (,) "," (function_declarator) "geometryFactory(geomFact)" (identifier) "geometryFactory" (parameter_list) "(geomFact)" (() "(" (parameter_declaration) "geomFact" (type_identifier) "geomFact" ()) ")" (,) "," (function_declarator) "hasResultArea(p_hasResultArea)" (identifier) "hasResultArea" (parameter_list) "(p_hasResultArea)" (() "(" (parameter_declaration) "p_hasResultArea" (type_identifier) "p_hasResultArea" ()) ")" (,) "," (function_declarator) "inputAreaIndex(inputGeom->getAreaIndex())" (identifier) "inputAreaIndex" (parameter_list) "(inputGeom->getAreaIndex())" (() "(" (parameter_declaration) "inputGeom->getAreaIndex()" (type_identifier) "inputGeom" (ERROR) "->" (->) "->" (function_declarator) "getAreaIndex()" (identifier) "getAreaIndex" (parameter_list) "()" (() "(" ()) ")" ()) ")" (,) "," (function_declarator) "isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)" (identifier) "isAllowMixedResult" (parameter_list) "(! OverlayNG::STRICT_MODE_DEFAULT)" (() "(" (ERROR) "!" (!) "!" (parameter_declaration) "OverlayNG::STRICT_MODE_DEFAULT" (type_identifier) "OverlayNG" (ERROR) "::" (:) ":" (:) ":" (identifier) "STRICT_MODE_DEFAULT" ()) ")" (,) "," (ERROR) "isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}" (function_declarator) "isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)" (identifier) "isAllowCollapseLines" (parameter_list) "(! OverlayNG::STRICT_MODE_DEFAULT)" (() "(" (ERROR) "!" (!) "!" (parameter_declaration) "OverlayNG::STRICT_MODE_DEFAULT" (type_identifier) "OverlayNG" (ERROR) "::" (:) ":" (:) ":" (identifier) "STRICT_MODE_DEFAULT" ()) ")" ({) "{" (}) "}" (init_declarator) "LineBuilder(const LineBuilder&) = delete" (function_declarator) "LineBuilder(const LineBuilder&)" (identifier) "LineBuilder" (parameter_list) "(const LineBuilder&)" (() "(" (parameter_declaration) "const LineBuilder" (type_qualifier) "const" (const) "const" (type_identifier) "LineBuilder" (ERROR) "&" (&) "&" ()) ")" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "LineBuilder& operator=(const LineBuilder&) = delete;" (binary_expression) "LineBuilder& operator=(const LineBuilder&) = delete" (identifier) "LineBuilder" (&) "&" (assignment_expression) "operator=(const LineBuilder&) = delete" (identifier) "operator" (=) "=" (cast_expression) "(const LineBuilder&) = delete" (() "(" (type_descriptor) "const LineBuilder" (type_qualifier) "const" (const) "const" (type_identifier) "LineBuilder" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (labeled_statement) "std::vector<std::unique_ptr<geom::LineString>> getLines();" (statement_identifier) "std" (ERROR) "::vector<std::unique_ptr<geom:" (:) ":" (:) ":" (binary_expression) "vector<std" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "unique_ptr<geom" (identifier) "unique_ptr" (<) "<" (identifier) "geom" (:) ":" (:) ":" (expression_statement) "LineString>> getLines();" (binary_expression) "LineString>> getLines()" (identifier) "LineString" (>>) ">>" (call_expression) "getLines()" (identifier) "getLines" (argument_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }" (primitive_type) "void" (function_declarator) "setStrictMode(bool p_isStrictResultMode)" (identifier) "setStrictMode" (parameter_list) "(bool p_isStrictResultMode)" (() "(" (parameter_declaration) "bool p_isStrictResultMode" (primitive_type) "bool" (identifier) "p_isStrictResultMode" ()) ")" (compound_statement) "{\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }" ({) "{" (expression_statement) "isAllowCollapseLines = ! p_isStrictResultMode;" (assignment_expression) "isAllowCollapseLines = ! p_isStrictResultMode" (identifier) "isAllowCollapseLines" (=) "=" (unary_expression) "! p_isStrictResultMode" (!) "!" (identifier) "p_isStrictResultMode" (;) ";" (expression_statement) "isAllowMixedResult = ! p_isStrictResultMode;" (assignment_expression) "isAllowMixedResult = ! p_isStrictResultMode" (identifier) "isAllowMixedResult" (=) "=" (unary_expression) "! p_isStrictResultMode" (!) "!" (identifier) "p_isStrictResultMode" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace geos.operation.overlayng" (}) "}" (comment) "// namespace geos.operation" (}) "}" (comment) "// namespace geos"
570
24
{"language": "c", "success": true, "metadata": {"lines": 160, "avg_line_length": 33.97, "nodes": 346, "errors": 0, "source_hash": "1094d46b6b726d21993b8ff987b096b61419f42032ba5071bdc6e361e2070042", "categorized_nodes": 231}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <geos/export.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<geos/export.h>", "parent": 3, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include <geos/operation/overlayng/InputGeometry.h>\n", "parent": null, "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": "<geos/operation/overlayng/InputGeometry.h>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 51}}, {"id": 9, "type": "preproc_include", "text": "#include <geos/operation/overlayng/OverlayNG.h>\n", "parent": null, "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": "<geos/operation/overlayng/OverlayNG.h>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 47}}, {"id": 12, "type": "preproc_include", "text": "#include <geos/geom/Location.h>\n", "parent": null, "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": "<geos/geom/Location.h>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 31}}, {"id": 15, "type": "preproc_include", "text": "#include <geos/geom/LineString.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<geos/geom/LineString.h>", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 33}}, {"id": 18, "type": "preproc_include", "text": "#include <vector>\n", "parent": null, "children": [19, 20], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<vector>", "parent": 18, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 17}}, {"id": 21, "type": "function_definition", "text": "namespace geos {\nnamespace geom {\nclass GeometryFactory;\nclass LineString;\n}\nnamespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}\n}", "parent": null, "children": [22, 23], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 9}}, {"id": 23, "type": "identifier", "text": "geos", "parent": 21, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 14}}, {"id": 24, "type": "function_definition", "text": "namespace geom {\nclass GeometryFactory;\nclass LineString;\n}", "parent": 21, "children": [25, 26], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 25, "type": "type_identifier", "text": "namespace", "parent": 24, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 9}}, {"id": 26, "type": "identifier", "text": "geom", "parent": 24, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 14}}, {"id": 27, "type": "declaration", "text": "class GeometryFactory;", "parent": 24, "children": [28], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 22}}, {"id": 28, "type": "identifier", "text": "GeometryFactory", "parent": 27, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 21}}, {"id": 29, "type": "declaration", "text": "class LineString;", "parent": 24, "children": [30], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 17}}, {"id": 30, "type": "identifier", "text": "LineString", "parent": 29, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 16}}, {"id": 31, "type": "function_definition", "text": "namespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}", "parent": 21, "children": [32, 33], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 32, "type": "type_identifier", "text": "namespace", "parent": 31, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 9}}, {"id": 33, "type": "identifier", "text": "operation", "parent": 31, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 19}}, {"id": 34, "type": "function_definition", "text": "namespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}", "parent": 31, "children": [35, 36], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 35, "type": "type_identifier", "text": "namespace", "parent": 34, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 9}}, {"id": 36, "type": "identifier", "text": "overlayng", "parent": 34, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 19}}, {"id": 37, "type": "declaration", "text": "class OverlayEdge;", "parent": 34, "children": [38], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 18}}, {"id": 38, "type": "identifier", "text": "OverlayEdge", "parent": 37, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 17}}, {"id": 39, "type": "declaration", "text": "class OverlayGraph;", "parent": 34, "children": [40], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 19}}, {"id": 40, "type": "identifier", "text": "OverlayGraph", "parent": 39, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 18}}, {"id": 41, "type": "declaration", "text": "class OverlayLabel;", "parent": 34, "children": [42], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 19}}, {"id": 42, "type": "identifier", "text": "OverlayLabel", "parent": 41, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 18}}, {"id": 43, "type": "declaration", "text": "class InputGeometry;", "parent": 34, "children": [44], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 20}}, {"id": 44, "type": "identifier", "text": "InputGeometry", "parent": 43, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 19}}, {"id": 45, "type": "function_definition", "text": "namespace geos { // geos.\nnamespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n} // namespace geos.operation\n}", "parent": null, "children": [46, 47], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 188, "column": 1}}, {"id": 46, "type": "type_identifier", "text": "namespace", "parent": 45, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 9}}, {"id": 47, "type": "identifier", "text": "geos", "parent": 45, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 14}}, {"id": 48, "type": "function_definition", "text": "namespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n}", "parent": 45, "children": [49, 50], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 187, "column": 1}}, {"id": 49, "type": "type_identifier", "text": "namespace", "parent": 48, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 9}}, {"id": 50, "type": "identifier", "text": "operation", "parent": 48, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 19}}, {"id": 51, "type": "function_definition", "text": "namespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n}", "parent": 48, "children": [52, 53], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 186, "column": 1}}, {"id": 52, "type": "type_identifier", "text": "namespace", "parent": 51, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 9}}, {"id": 53, "type": "identifier", "text": "overlayng", "parent": 51, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 19}}, {"id": 54, "type": "function_definition", "text": "class GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n}", "parent": 51, "children": [55, 57], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 183, "column": 1}}, {"id": 55, "type": "ERROR", "text": "GEOS_DLL", "parent": 54, "children": [56], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 14}}, {"id": 56, "type": "identifier", "text": "GEOS_DLL", "parent": 55, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 14}}, {"id": 57, "type": "identifier", "text": "LineBuilder", "parent": 54, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 26}}, {"id": 58, "type": "labeled_statement", "text": "private:\n\n // Members\n OverlayGraph* graph;", "parent": 54, "children": [59], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 74, "column": 24}}, {"id": 59, "type": "declaration", "text": "OverlayGraph* graph;", "parent": 58, "children": [60, 61], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 24}}, {"id": 60, "type": "type_identifier", "text": "OverlayGraph", "parent": 59, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 16}}, {"id": 61, "type": "pointer_declarator", "text": "* graph", "parent": 59, "children": [62, 63], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 74, "column": 23}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 74, "column": 17}}, {"id": 63, "type": "identifier", "text": "graph", "parent": 61, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 23}}, {"id": 64, "type": "declaration", "text": "int opCode;", "parent": 54, "children": [65, 66], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 15}}, {"id": 65, "type": "primitive_type", "text": "int", "parent": 64, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 7}}, {"id": 66, "type": "identifier", "text": "opCode", "parent": 64, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 14}}, {"id": 67, "type": "declaration", "text": "const geom::GeometryFactory* geometryFactory;", "parent": 54, "children": [68, 69, 71], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 49}}, {"id": 68, "type": "type_identifier", "text": "geom", "parent": 67, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 14}}, {"id": 69, "type": "ERROR", "text": "::GeometryFactory", "parent": 67, "children": [70], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 31}}, {"id": 70, "type": "identifier", "text": "GeometryFactory", "parent": 69, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 31}}, {"id": 71, "type": "pointer_declarator", "text": "* geometryFactory", "parent": 67, "children": [72, 73], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 48}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 32}}, {"id": 73, "type": "identifier", "text": "geometryFactory", "parent": 71, "children": [], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 48}}, {"id": 74, "type": "declaration", "text": "bool hasResultArea;", "parent": 54, "children": [75, 76], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 23}}, {"id": 75, "type": "primitive_type", "text": "bool", "parent": 74, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 8}}, {"id": 76, "type": "identifier", "text": "hasResultArea", "parent": 74, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 22}}, {"id": 77, "type": "declaration", "text": "int inputAreaIndex;", "parent": 54, "children": [78, 79], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 23}}, {"id": 78, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 7}}, {"id": 79, "type": "identifier", "text": "inputAreaIndex", "parent": 77, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 22}}, {"id": 80, "type": "labeled_statement", "text": "std::vector<std::unique_ptr<geom::LineString>> lines;", "parent": 54, "children": [81, 82], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 57}}, {"id": 81, "type": "statement_identifier", "text": "std", "parent": 80, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 7}}, {"id": 82, "type": "ERROR", "text": "::vector<std::unique_ptr<geom:", "parent": 80, "children": [83, 87], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 37}}, {"id": 83, "type": "binary_expression", "text": "vector<std", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 19}}, {"id": 84, "type": "identifier", "text": "vector", "parent": 83, "children": [], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 15}}, {"id": 85, "type": "<", "text": "<", "parent": 83, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 16}}, {"id": 86, "type": "identifier", "text": "std", "parent": 83, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 19}}, {"id": 87, "type": "binary_expression", "text": "unique_ptr<geom", "parent": 82, "children": [88, 89, 90], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 36}}, {"id": 88, "type": "identifier", "text": "unique_ptr", "parent": 87, "children": [], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 31}}, {"id": 89, "type": "<", "text": "<", "parent": 87, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 32}}, {"id": 90, "type": "identifier", "text": "geom", "parent": 87, "children": [], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 36}}, {"id": 91, "type": "binary_expression", "text": "LineString>> lines", "parent": 80, "children": [92, 93, 94], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 56}}, {"id": 92, "type": "identifier", "text": "LineString", "parent": 91, "children": [], "start_point": {"row": 79, "column": 38}, "end_point": {"row": 79, "column": 48}}, {"id": 93, "type": ">>", "text": ">>", "parent": 91, "children": [], "start_point": {"row": 79, "column": 48}, "end_point": {"row": 79, "column": 50}}, {"id": 94, "type": "identifier", "text": "lines", "parent": 91, "children": [], "start_point": {"row": 79, "column": 51}, "end_point": {"row": 79, "column": 56}}, {"id": 95, "type": "declaration", "text": "bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;", "parent": 54, "children": [96, 97], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 63}}, {"id": 96, "type": "primitive_type", "text": "bool", "parent": 95, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 8}}, {"id": 97, "type": "init_declarator", "text": "isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT", "parent": 95, "children": [98, 99, 100, 104], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 62}}, {"id": 98, "type": "identifier", "text": "isAllowMixedResult", "parent": 97, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 27}}, {"id": 99, "type": "=", "text": "=", "parent": 97, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 29}}, {"id": 100, "type": "ERROR", "text": "! OverlayNG::", "parent": 97, "children": [101], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 43}}, {"id": 101, "type": "unary_expression", "text": "! OverlayNG", "parent": 100, "children": [102, 103], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 41}}, {"id": 102, "type": "!", "text": "!", "parent": 101, "children": [], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 31}}, {"id": 103, "type": "identifier", "text": "OverlayNG", "parent": 101, "children": [], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 41}}, {"id": 104, "type": "identifier", "text": "STRICT_MODE_DEFAULT", "parent": 97, "children": [], "start_point": {"row": 87, "column": 43}, "end_point": {"row": 87, "column": 62}}, {"id": 105, "type": "declaration", "text": "bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;", "parent": 54, "children": [106, 107], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 65}}, {"id": 106, "type": "primitive_type", "text": "bool", "parent": 105, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 8}}, {"id": 107, "type": "init_declarator", "text": "isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT", "parent": 105, "children": [108, 109, 110, 114], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 64}}, {"id": 108, "type": "identifier", "text": "isAllowCollapseLines", "parent": 107, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 29}}, {"id": 109, "type": "=", "text": "=", "parent": 107, "children": [], "start_point": {"row": 94, "column": 30}, "end_point": {"row": 94, "column": 31}}, {"id": 110, "type": "ERROR", "text": "! OverlayNG::", "parent": 107, "children": [111], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 45}}, {"id": 111, "type": "unary_expression", "text": "! OverlayNG", "parent": 110, "children": [112, 113], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 43}}, {"id": 112, "type": "!", "text": "!", "parent": 111, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 33}}, {"id": 113, "type": "identifier", "text": "OverlayNG", "parent": 111, "children": [], "start_point": {"row": 94, "column": 34}, "end_point": {"row": 94, "column": 43}}, {"id": 114, "type": "identifier", "text": "STRICT_MODE_DEFAULT", "parent": 107, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 64}}, {"id": 115, "type": "declaration", "text": "void markResultLines();", "parent": 54, "children": [116, 117], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 27}}, {"id": 116, "type": "primitive_type", "text": "void", "parent": 115, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 8}}, {"id": 117, "type": "function_declarator", "text": "markResultLines()", "parent": 115, "children": [118, 119], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 26}}, {"id": 118, "type": "identifier", "text": "markResultLines", "parent": 117, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 24}}, {"id": 119, "type": "parameter_list", "text": "()", "parent": 117, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 26}}, {"id": 120, "type": "ERROR", "text": "bool isResultLine(const OverlayLabel* lbl) const", "parent": 54, "children": [121, 122], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 52}}, {"id": 121, "type": "primitive_type", "text": "bool", "parent": 120, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 122, "type": "function_declarator", "text": "isResultLine(const OverlayLabel* lbl) const", "parent": 120, "children": [123, 124], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 52}}, {"id": 123, "type": "identifier", "text": "isResultLine", "parent": 122, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 21}}, {"id": 124, "type": "parameter_list", "text": "(const OverlayLabel* lbl)", "parent": 122, "children": [125], "start_point": {"row": 106, "column": 21}, "end_point": {"row": 106, "column": 46}}, {"id": 125, "type": "parameter_declaration", "text": "const OverlayLabel* lbl", "parent": 124, "children": [126, 127], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 45}}, {"id": 126, "type": "type_identifier", "text": "OverlayLabel", "parent": 125, "children": [], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 40}}, {"id": 127, "type": "pointer_declarator", "text": "* lbl", "parent": 125, "children": [128, 129], "start_point": {"row": 106, "column": 40}, "end_point": {"row": 106, "column": 45}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 106, "column": 40}, "end_point": {"row": 106, "column": 41}}, {"id": 129, "type": "identifier", "text": "lbl", "parent": 127, "children": [], "start_point": {"row": 106, "column": 42}, "end_point": {"row": 106, "column": 45}}, {"id": 130, "type": "labeled_statement", "text": "geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;", "parent": 54, "children": [131, 132], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 83}}, {"id": 131, "type": "statement_identifier", "text": "geom", "parent": 130, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 8}}, {"id": 132, "type": "ERROR", "text": ":Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const", "parent": 130, "children": [133, 134], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 82}}, {"id": 133, "type": "type_identifier", "text": "Location", "parent": 132, "children": [], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 18}}, {"id": 134, "type": "function_declarator", "text": "effectiveLocation(const OverlayLabel* lbl, int geomIndex) const", "parent": 132, "children": [135, 136], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 82}}, {"id": 135, "type": "identifier", "text": "effectiveLocation", "parent": 134, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 36}}, {"id": 136, "type": "parameter_list", "text": "(const OverlayLabel* lbl, int geomIndex)", "parent": 134, "children": [137, 142], "start_point": {"row": 118, "column": 36}, "end_point": {"row": 118, "column": 76}}, {"id": 137, "type": "parameter_declaration", "text": "const OverlayLabel* lbl", "parent": 136, "children": [138, 139], "start_point": {"row": 118, "column": 37}, "end_point": {"row": 118, "column": 60}}, {"id": 138, "type": "type_identifier", "text": "OverlayLabel", "parent": 137, "children": [], "start_point": {"row": 118, "column": 43}, "end_point": {"row": 118, "column": 55}}, {"id": 139, "type": "pointer_declarator", "text": "* lbl", "parent": 137, "children": [140, 141], "start_point": {"row": 118, "column": 55}, "end_point": {"row": 118, "column": 60}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 118, "column": 55}, "end_point": {"row": 118, "column": 56}}, {"id": 141, "type": "identifier", "text": "lbl", "parent": 139, "children": [], "start_point": {"row": 118, "column": 57}, "end_point": {"row": 118, "column": 60}}, {"id": 142, "type": "parameter_declaration", "text": "int geomIndex", "parent": 136, "children": [143, 144], "start_point": {"row": 118, "column": 62}, "end_point": {"row": 118, "column": 75}}, {"id": 143, "type": "primitive_type", "text": "int", "parent": 142, "children": [], "start_point": {"row": 118, "column": 62}, "end_point": {"row": 118, "column": 65}}, {"id": 144, "type": "identifier", "text": "geomIndex", "parent": 142, "children": [], "start_point": {"row": 118, "column": 66}, "end_point": {"row": 118, "column": 75}}, {"id": 145, "type": "declaration", "text": "void addResultLines();", "parent": 54, "children": [146, 147], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 26}}, {"id": 146, "type": "primitive_type", "text": "void", "parent": 145, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 8}}, {"id": 147, "type": "function_declarator", "text": "addResultLines()", "parent": 145, "children": [148, 149], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 25}}, {"id": 148, "type": "identifier", "text": "addResultLines", "parent": 147, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 23}}, {"id": 149, "type": "parameter_list", "text": "()", "parent": 147, "children": [], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 25}}, {"id": 150, "type": "declaration", "text": "void addResultLinesMerged();", "parent": 54, "children": [151, 152], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 32}}, {"id": 151, "type": "primitive_type", "text": "void", "parent": 150, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 8}}, {"id": 152, "type": "function_declarator", "text": "addResultLinesMerged()", "parent": 150, "children": [153, 154], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 31}}, {"id": 153, "type": "identifier", "text": "addResultLinesMerged", "parent": 152, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 29}}, {"id": 154, "type": "parameter_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 121, "column": 29}, "end_point": {"row": 121, "column": 31}}, {"id": 155, "type": "labeled_statement", "text": "std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);", "parent": 54, "children": [156, 157], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 64}}, {"id": 156, "type": "statement_identifier", "text": "std", "parent": 155, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 7}}, {"id": 157, "type": "ERROR", "text": "::unique_ptr<geom:", "parent": 155, "children": [158], "start_point": {"row": 123, "column": 7}, "end_point": {"row": 123, "column": 25}}, {"id": 158, "type": "binary_expression", "text": "unique_ptr<geom", "parent": 157, "children": [159, 160, 161], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 24}}, {"id": 159, "type": "identifier", "text": "unique_ptr", "parent": 158, "children": [], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 19}}, {"id": 160, "type": "<", "text": "<", "parent": 158, "children": [], "start_point": {"row": 123, "column": 19}, "end_point": {"row": 123, "column": 20}}, {"id": 161, "type": "identifier", "text": "geom", "parent": 158, "children": [], "start_point": {"row": 123, "column": 20}, "end_point": {"row": 123, "column": 24}}, {"id": 162, "type": "binary_expression", "text": "LineString> toLine(OverlayEdge* edge)", "parent": 155, "children": [163, 164, 165], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 63}}, {"id": 163, "type": "identifier", "text": "LineString", "parent": 162, "children": [], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 36}}, {"id": 164, "type": ">", "text": ">", "parent": 162, "children": [], "start_point": {"row": 123, "column": 36}, "end_point": {"row": 123, "column": 37}}, {"id": 165, "type": "call_expression", "text": "toLine(OverlayEdge* edge)", "parent": 162, "children": [166, 167], "start_point": {"row": 123, "column": 38}, "end_point": {"row": 123, "column": 63}}, {"id": 166, "type": "identifier", "text": "toLine", "parent": 165, "children": [], "start_point": {"row": 123, "column": 38}, "end_point": {"row": 123, "column": 44}}, {"id": 167, "type": "argument_list", "text": "(OverlayEdge* edge)", "parent": 165, "children": [168], "start_point": {"row": 123, "column": 44}, "end_point": {"row": 123, "column": 63}}, {"id": 168, "type": "binary_expression", "text": "OverlayEdge* edge", "parent": 167, "children": [169, 170, 171], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 62}}, {"id": 169, "type": "identifier", "text": "OverlayEdge", "parent": 168, "children": [], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 56}}, {"id": 170, "type": "*", "text": "*", "parent": 168, "children": [], "start_point": {"row": 123, "column": 56}, "end_point": {"row": 123, "column": 57}}, {"id": 171, "type": "identifier", "text": "edge", "parent": 168, "children": [], "start_point": {"row": 123, "column": 58}, "end_point": {"row": 123, "column": 62}}, {"id": 172, "type": "declaration", "text": "void addResultLinesForNodes();", "parent": 54, "children": [173, 174], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 34}}, {"id": 173, "type": "primitive_type", "text": "void", "parent": 172, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 8}}, {"id": 174, "type": "function_declarator", "text": "addResultLinesForNodes()", "parent": 172, "children": [175, 176], "start_point": {"row": 125, "column": 9}, "end_point": {"row": 125, "column": 33}}, {"id": 175, "type": "identifier", "text": "addResultLinesForNodes", "parent": 174, "children": [], "start_point": {"row": 125, "column": 9}, "end_point": {"row": 125, "column": 31}}, {"id": 176, "type": "parameter_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 125, "column": 31}, "end_point": {"row": 125, "column": 33}}, {"id": 177, "type": "declaration", "text": "void addResultLinesRings();", "parent": 54, "children": [178, 179], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 31}}, {"id": 178, "type": "primitive_type", "text": "void", "parent": 177, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 8}}, {"id": 179, "type": "function_declarator", "text": "addResultLinesRings()", "parent": 177, "children": [180, 181], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 30}}, {"id": 180, "type": "identifier", "text": "addResultLinesRings", "parent": 179, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 28}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 130, "column": 28}, "end_point": {"row": 130, "column": 30}}, {"id": 182, "type": "labeled_statement", "text": "std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);", "parent": 54, "children": [183, 184], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 67}}, {"id": 183, "type": "statement_identifier", "text": "std", "parent": 182, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 7}}, {"id": 184, "type": "ERROR", "text": "::unique_ptr<geom:", "parent": 182, "children": [185], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 25}}, {"id": 185, "type": "binary_expression", "text": "unique_ptr<geom", "parent": 184, "children": [186, 187, 188], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 24}}, {"id": 186, "type": "identifier", "text": "unique_ptr", "parent": 185, "children": [], "start_point": {"row": 145, "column": 9}, "end_point": {"row": 145, "column": 19}}, {"id": 187, "type": "<", "text": "<", "parent": 185, "children": [], "start_point": {"row": 145, "column": 19}, "end_point": {"row": 145, "column": 20}}, {"id": 188, "type": "identifier", "text": "geom", "parent": 185, "children": [], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 24}}, {"id": 189, "type": "binary_expression", "text": "LineString> buildLine(OverlayEdge* node)", "parent": 182, "children": [190, 191, 192], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 66}}, {"id": 190, "type": "identifier", "text": "LineString", "parent": 189, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 36}}, {"id": 191, "type": ">", "text": ">", "parent": 189, "children": [], "start_point": {"row": 145, "column": 36}, "end_point": {"row": 145, "column": 37}}, {"id": 192, "type": "call_expression", "text": "buildLine(OverlayEdge* node)", "parent": 189, "children": [193, 194], "start_point": {"row": 145, "column": 38}, "end_point": {"row": 145, "column": 66}}, {"id": 193, "type": "identifier", "text": "buildLine", "parent": 192, "children": [], "start_point": {"row": 145, "column": 38}, "end_point": {"row": 145, "column": 47}}, {"id": 194, "type": "argument_list", "text": "(OverlayEdge* node)", "parent": 192, "children": [195], "start_point": {"row": 145, "column": 47}, "end_point": {"row": 145, "column": 66}}, {"id": 195, "type": "binary_expression", "text": "OverlayEdge* node", "parent": 194, "children": [196, 197, 198], "start_point": {"row": 145, "column": 48}, "end_point": {"row": 145, "column": 65}}, {"id": 196, "type": "identifier", "text": "OverlayEdge", "parent": 195, "children": [], "start_point": {"row": 145, "column": 48}, "end_point": {"row": 145, "column": 59}}, {"id": 197, "type": "*", "text": "*", "parent": 195, "children": [], "start_point": {"row": 145, "column": 59}, "end_point": {"row": 145, "column": 60}}, {"id": 198, "type": "identifier", "text": "node", "parent": 195, "children": [], "start_point": {"row": 145, "column": 61}, "end_point": {"row": 145, "column": 65}}, {"id": 199, "type": "declaration", "text": "OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;", "parent": 54, "children": [200, 201], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 64}}, {"id": 200, "type": "type_identifier", "text": "OverlayEdge", "parent": 199, "children": [], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 15}}, {"id": 201, "type": "pointer_declarator", "text": "* nextLineEdgeUnvisited(OverlayEdge* node) const", "parent": 199, "children": [202, 203], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 63}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 16}}, {"id": 203, "type": "function_declarator", "text": "nextLineEdgeUnvisited(OverlayEdge* node) const", "parent": 201, "children": [204, 205], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 63}}, {"id": 204, "type": "identifier", "text": "nextLineEdgeUnvisited", "parent": 203, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 38}}, {"id": 205, "type": "parameter_list", "text": "(OverlayEdge* node)", "parent": 203, "children": [206], "start_point": {"row": 151, "column": 38}, "end_point": {"row": 151, "column": 57}}, {"id": 206, "type": "parameter_declaration", "text": "OverlayEdge* node", "parent": 205, "children": [207, 208], "start_point": {"row": 151, "column": 39}, "end_point": {"row": 151, "column": 56}}, {"id": 207, "type": "type_identifier", "text": "OverlayEdge", "parent": 206, "children": [], "start_point": {"row": 151, "column": 39}, "end_point": {"row": 151, "column": 50}}, {"id": 208, "type": "pointer_declarator", "text": "* node", "parent": 206, "children": [209, 210], "start_point": {"row": 151, "column": 50}, "end_point": {"row": 151, "column": 56}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 151, "column": 50}, "end_point": {"row": 151, "column": 51}}, {"id": 210, "type": "identifier", "text": "node", "parent": 208, "children": [], "start_point": {"row": 151, "column": 52}, "end_point": {"row": 151, "column": 56}}, {"id": 211, "type": "ERROR", "text": "int degreeOfLines(OverlayEdge* node) const", "parent": 54, "children": [212, 213], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 46}}, {"id": 212, "type": "primitive_type", "text": "int", "parent": 211, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 7}}, {"id": 213, "type": "function_declarator", "text": "degreeOfLines(OverlayEdge* node) const", "parent": 211, "children": [214, 215], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 46}}, {"id": 214, "type": "identifier", "text": "degreeOfLines", "parent": 213, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 21}}, {"id": 215, "type": "parameter_list", "text": "(OverlayEdge* node)", "parent": 213, "children": [216], "start_point": {"row": 156, "column": 21}, "end_point": {"row": 156, "column": 40}}, {"id": 216, "type": "parameter_declaration", "text": "OverlayEdge* node", "parent": 215, "children": [217, 218], "start_point": {"row": 156, "column": 22}, "end_point": {"row": 156, "column": 39}}, {"id": 217, "type": "type_identifier", "text": "OverlayEdge", "parent": 216, "children": [], "start_point": {"row": 156, "column": 22}, "end_point": {"row": 156, "column": 33}}, {"id": 218, "type": "pointer_declarator", "text": "* node", "parent": 216, "children": [219, 220], "start_point": {"row": 156, "column": 33}, "end_point": {"row": 156, "column": 39}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 156, "column": 33}, "end_point": {"row": 156, "column": 34}}, {"id": 220, "type": "identifier", "text": "node", "parent": 218, "children": [], "start_point": {"row": 156, "column": 35}, "end_point": {"row": 156, "column": 39}}, {"id": 221, "type": "labeled_statement", "text": "public:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;", "parent": 54, "children": [222], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 172, "column": 45}}, {"id": 222, "type": "declaration", "text": "LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;", "parent": 221, "children": [223, 229, 230, 232, 235, 237, 238, 240, 241, 247, 252, 257, 262, 267, 275, 283, 292], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 172, "column": 45}}, {"id": 223, "type": "macro_type_specifier", "text": "LineBuilder(const InputGeometry*", "parent": 222, "children": [224, 225], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 36}}, {"id": 224, "type": "identifier", "text": "LineBuilder", "parent": 223, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 15}}, {"id": 225, "type": "type_descriptor", "text": "const InputGeometry*", "parent": 223, "children": [226, 227], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 36}}, {"id": 226, "type": "type_identifier", "text": "InputGeometry", "parent": 225, "children": [], "start_point": {"row": 162, "column": 22}, "end_point": {"row": 162, "column": 35}}, {"id": 227, "type": "abstract_pointer_declarator", "text": "*", "parent": 225, "children": [228], "start_point": {"row": 162, "column": 35}, "end_point": {"row": 162, "column": 36}}, {"id": 228, "type": "*", "text": "*", "parent": 227, "children": [], "start_point": {"row": 162, "column": 35}, "end_point": {"row": 162, "column": 36}}, {"id": 229, "type": "identifier", "text": "inputGeom", "parent": 222, "children": [], "start_point": {"row": 162, "column": 37}, "end_point": {"row": 162, "column": 46}}, {"id": 230, "type": "ERROR", "text": "OverlayGraph", "parent": 222, "children": [231], "start_point": {"row": 162, "column": 48}, "end_point": {"row": 162, "column": 60}}, {"id": 231, "type": "identifier", "text": "OverlayGraph", "parent": 230, "children": [], "start_point": {"row": 162, "column": 48}, "end_point": {"row": 162, "column": 60}}, {"id": 232, "type": "pointer_declarator", "text": "* p_graph", "parent": 222, "children": [233, 234], "start_point": {"row": 162, "column": 60}, "end_point": {"row": 162, "column": 69}}, {"id": 233, "type": "*", "text": "*", "parent": 232, "children": [], "start_point": {"row": 162, "column": 60}, "end_point": {"row": 162, "column": 61}}, {"id": 234, "type": "identifier", "text": "p_graph", "parent": 232, "children": [], "start_point": {"row": 162, "column": 62}, "end_point": {"row": 162, "column": 69}}, {"id": 235, "type": "ERROR", "text": "bool", "parent": 222, "children": [236], "start_point": {"row": 162, "column": 71}, "end_point": {"row": 162, "column": 75}}, {"id": 236, "type": "identifier", "text": "bool", "parent": 235, "children": [], "start_point": {"row": 162, "column": 71}, "end_point": {"row": 162, "column": 75}}, {"id": 237, "type": "identifier", "text": "p_hasResultArea", "parent": 222, "children": [], "start_point": {"row": 162, "column": 76}, "end_point": {"row": 162, "column": 91}}, {"id": 238, "type": "ERROR", "text": "int", "parent": 222, "children": [239], "start_point": {"row": 162, "column": 93}, "end_point": {"row": 162, "column": 96}}, {"id": 239, "type": "identifier", "text": "int", "parent": 238, "children": [], "start_point": {"row": 162, "column": 93}, "end_point": {"row": 162, "column": 96}}, {"id": 240, "type": "identifier", "text": "p_opCode", "parent": 222, "children": [], "start_point": {"row": 162, "column": 97}, "end_point": {"row": 162, "column": 105}}, {"id": 241, "type": "ERROR", "text": "const geom::GeometryFactory* geomFact)\n :", "parent": 222, "children": [242, 243, 244], "start_point": {"row": 162, "column": 107}, "end_point": {"row": 163, "column": 9}}, {"id": 242, "type": "identifier", "text": "geom", "parent": 241, "children": [], "start_point": {"row": 162, "column": 113}, "end_point": {"row": 162, "column": 117}}, {"id": 243, "type": "identifier", "text": "GeometryFactory", "parent": 241, "children": [], "start_point": {"row": 162, "column": 119}, "end_point": {"row": 162, "column": 134}}, {"id": 244, "type": "pointer_declarator", "text": "* geomFact", "parent": 241, "children": [245, 246], "start_point": {"row": 162, "column": 134}, "end_point": {"row": 162, "column": 144}}, {"id": 245, "type": "*", "text": "*", "parent": 244, "children": [], "start_point": {"row": 162, "column": 134}, "end_point": {"row": 162, "column": 135}}, {"id": 246, "type": "identifier", "text": "geomFact", "parent": 244, "children": [], "start_point": {"row": 162, "column": 136}, "end_point": {"row": 162, "column": 144}}, {"id": 247, "type": "function_declarator", "text": "graph(p_graph)", "parent": 222, "children": [248, 249], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 24}}, {"id": 248, "type": "identifier", "text": "graph", "parent": 247, "children": [], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 15}}, {"id": 249, "type": "parameter_list", "text": "(p_graph)", "parent": 247, "children": [250], "start_point": {"row": 163, "column": 15}, "end_point": {"row": 163, "column": 24}}, {"id": 250, "type": "parameter_declaration", "text": "p_graph", "parent": 249, "children": [251], "start_point": {"row": 163, "column": 16}, "end_point": {"row": 163, "column": 23}}, {"id": 251, "type": "type_identifier", "text": "p_graph", "parent": 250, "children": [], "start_point": {"row": 163, "column": 16}, "end_point": {"row": 163, "column": 23}}, {"id": 252, "type": "function_declarator", "text": "opCode(p_opCode)", "parent": 222, "children": [253, 254], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 26}}, {"id": 253, "type": "identifier", "text": "opCode", "parent": 252, "children": [], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 16}}, {"id": 254, "type": "parameter_list", "text": "(p_opCode)", "parent": 252, "children": [255], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 26}}, {"id": 255, "type": "parameter_declaration", "text": "p_opCode", "parent": 254, "children": [256], "start_point": {"row": 164, "column": 17}, "end_point": {"row": 164, "column": 25}}, {"id": 256, "type": "type_identifier", "text": "p_opCode", "parent": 255, "children": [], "start_point": {"row": 164, "column": 17}, "end_point": {"row": 164, "column": 25}}, {"id": 257, "type": "function_declarator", "text": "geometryFactory(geomFact)", "parent": 222, "children": [258, 259], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 35}}, {"id": 258, "type": "identifier", "text": "geometryFactory", "parent": 257, "children": [], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 25}}, {"id": 259, "type": "parameter_list", "text": "(geomFact)", "parent": 257, "children": [260], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 35}}, {"id": 260, "type": "parameter_declaration", "text": "geomFact", "parent": 259, "children": [261], "start_point": {"row": 165, "column": 26}, "end_point": {"row": 165, "column": 34}}, {"id": 261, "type": "type_identifier", "text": "geomFact", "parent": 260, "children": [], "start_point": {"row": 165, "column": 26}, "end_point": {"row": 165, "column": 34}}, {"id": 262, "type": "function_declarator", "text": "hasResultArea(p_hasResultArea)", "parent": 222, "children": [263, 264], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 40}}, {"id": 263, "type": "identifier", "text": "hasResultArea", "parent": 262, "children": [], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 23}}, {"id": 264, "type": "parameter_list", "text": "(p_hasResultArea)", "parent": 262, "children": [265], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 40}}, {"id": 265, "type": "parameter_declaration", "text": "p_hasResultArea", "parent": 264, "children": [266], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 39}}, {"id": 266, "type": "type_identifier", "text": "p_hasResultArea", "parent": 265, "children": [], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 39}}, {"id": 267, "type": "function_declarator", "text": "inputAreaIndex(inputGeom->getAreaIndex())", "parent": 222, "children": [268, 269], "start_point": {"row": 167, "column": 10}, "end_point": {"row": 167, "column": 51}}, {"id": 268, "type": "identifier", "text": "inputAreaIndex", "parent": 267, "children": [], "start_point": {"row": 167, "column": 10}, "end_point": {"row": 167, "column": 24}}, {"id": 269, "type": "parameter_list", "text": "(inputGeom->getAreaIndex())", "parent": 267, "children": [270], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 51}}, {"id": 270, "type": "parameter_declaration", "text": "inputGeom->getAreaIndex()", "parent": 269, "children": [271, 272], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 50}}, {"id": 271, "type": "type_identifier", "text": "inputGeom", "parent": 270, "children": [], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 34}}, {"id": 272, "type": "function_declarator", "text": "getAreaIndex()", "parent": 270, "children": [273, 274], "start_point": {"row": 167, "column": 36}, "end_point": {"row": 167, "column": 50}}, {"id": 273, "type": "identifier", "text": "getAreaIndex", "parent": 272, "children": [], "start_point": {"row": 167, "column": 36}, "end_point": {"row": 167, "column": 48}}, {"id": 274, "type": "parameter_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 167, "column": 48}, "end_point": {"row": 167, "column": 50}}, {"id": 275, "type": "function_declarator", "text": "isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)", "parent": 222, "children": [276, 277], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 62}}, {"id": 276, "type": "identifier", "text": "isAllowMixedResult", "parent": 275, "children": [], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 28}}, {"id": 277, "type": "parameter_list", "text": "(! OverlayNG::STRICT_MODE_DEFAULT)", "parent": 275, "children": [278, 280], "start_point": {"row": 168, "column": 28}, "end_point": {"row": 168, "column": 62}}, {"id": 278, "type": "ERROR", "text": "!", "parent": 277, "children": [279], "start_point": {"row": 168, "column": 29}, "end_point": {"row": 168, "column": 30}}, {"id": 279, "type": "!", "text": "!", "parent": 278, "children": [], "start_point": {"row": 168, "column": 29}, "end_point": {"row": 168, "column": 30}}, {"id": 280, "type": "parameter_declaration", "text": "OverlayNG::STRICT_MODE_DEFAULT", "parent": 277, "children": [281, 282], "start_point": {"row": 168, "column": 31}, "end_point": {"row": 168, "column": 61}}, {"id": 281, "type": "type_identifier", "text": "OverlayNG", "parent": 280, "children": [], "start_point": {"row": 168, "column": 31}, "end_point": {"row": 168, "column": 40}}, {"id": 282, "type": "identifier", "text": "STRICT_MODE_DEFAULT", "parent": 280, "children": [], "start_point": {"row": 168, "column": 42}, "end_point": {"row": 168, "column": 61}}, {"id": 283, "type": "ERROR", "text": "isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}", "parent": 222, "children": [284], "start_point": {"row": 169, "column": 10}, "end_point": {"row": 170, "column": 10}}, {"id": 284, "type": "function_declarator", "text": "isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)", "parent": 283, "children": [285, 286], "start_point": {"row": 169, "column": 10}, "end_point": {"row": 169, "column": 64}}, {"id": 285, "type": "identifier", "text": "isAllowCollapseLines", "parent": 284, "children": [], "start_point": {"row": 169, "column": 10}, "end_point": {"row": 169, "column": 30}}, {"id": 286, "type": "parameter_list", "text": "(! OverlayNG::STRICT_MODE_DEFAULT)", "parent": 284, "children": [287, 289], "start_point": {"row": 169, "column": 30}, "end_point": {"row": 169, "column": 64}}, {"id": 287, "type": "ERROR", "text": "!", "parent": 286, "children": [288], "start_point": {"row": 169, "column": 31}, "end_point": {"row": 169, "column": 32}}, {"id": 288, "type": "!", "text": "!", "parent": 287, "children": [], "start_point": {"row": 169, "column": 31}, "end_point": {"row": 169, "column": 32}}, {"id": 289, "type": "parameter_declaration", "text": "OverlayNG::STRICT_MODE_DEFAULT", "parent": 286, "children": [290, 291], "start_point": {"row": 169, "column": 33}, "end_point": {"row": 169, "column": 63}}, {"id": 290, "type": "type_identifier", "text": "OverlayNG", "parent": 289, "children": [], "start_point": {"row": 169, "column": 33}, "end_point": {"row": 169, "column": 42}}, {"id": 291, "type": "identifier", "text": "STRICT_MODE_DEFAULT", "parent": 289, "children": [], "start_point": {"row": 169, "column": 44}, "end_point": {"row": 169, "column": 63}}, {"id": 292, "type": "init_declarator", "text": "LineBuilder(const LineBuilder&) = delete", "parent": 222, "children": [293, 298], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 44}}, {"id": 293, "type": "function_declarator", "text": "LineBuilder(const LineBuilder&)", "parent": 292, "children": [294, 295], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 35}}, {"id": 294, "type": "identifier", "text": "LineBuilder", "parent": 293, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 15}}, {"id": 295, "type": "parameter_list", "text": "(const LineBuilder&)", "parent": 293, "children": [296], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 35}}, {"id": 296, "type": "parameter_declaration", "text": "const LineBuilder", "parent": 295, "children": [297], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 33}}, {"id": 297, "type": "type_identifier", "text": "LineBuilder", "parent": 296, "children": [], "start_point": {"row": 172, "column": 22}, "end_point": {"row": 172, "column": 33}}, {"id": 298, "type": "=", "text": "=", "parent": 292, "children": [], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 37}}, {"id": 299, "type": "binary_expression", "text": "LineBuilder& operator=(const LineBuilder&) = delete", "parent": 54, "children": [300, 301], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 55}}, {"id": 300, "type": "identifier", "text": "LineBuilder", "parent": 299, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 15}}, {"id": 301, "type": "assignment_expression", "text": "operator=(const LineBuilder&) = delete", "parent": 299, "children": [302, 303, 304], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 55}}, {"id": 302, "type": "identifier", "text": "operator", "parent": 301, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 25}}, {"id": 303, "type": "=", "text": "=", "parent": 301, "children": [], "start_point": {"row": 173, "column": 25}, "end_point": {"row": 173, "column": 26}}, {"id": 304, "type": "cast_expression", "text": "(const LineBuilder&) = delete", "parent": 301, "children": [305, 307], "start_point": {"row": 173, "column": 26}, "end_point": {"row": 173, "column": 55}}, {"id": 305, "type": "type_descriptor", "text": "const LineBuilder", "parent": 304, "children": [306], "start_point": {"row": 173, "column": 27}, "end_point": {"row": 173, "column": 44}}, {"id": 306, "type": "type_identifier", "text": "LineBuilder", "parent": 305, "children": [], "start_point": {"row": 173, "column": 33}, "end_point": {"row": 173, "column": 44}}, {"id": 307, "type": "ERROR", "text": "=", "parent": 304, "children": [308], "start_point": {"row": 173, "column": 47}, "end_point": {"row": 173, "column": 48}}, {"id": 308, "type": "=", "text": "=", "parent": 307, "children": [], "start_point": {"row": 173, "column": 47}, "end_point": {"row": 173, "column": 48}}, {"id": 309, "type": "labeled_statement", "text": "std::vector<std::unique_ptr<geom::LineString>> getLines();", "parent": 54, "children": [310, 311], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 62}}, {"id": 310, "type": "statement_identifier", "text": "std", "parent": 309, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 7}}, {"id": 311, "type": "ERROR", "text": "::vector<std::unique_ptr<geom:", "parent": 309, "children": [312, 316], "start_point": {"row": 175, "column": 7}, "end_point": {"row": 175, "column": 37}}, {"id": 312, "type": "binary_expression", "text": "vector<std", "parent": 311, "children": [313, 314, 315], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 19}}, {"id": 313, "type": "identifier", "text": "vector", "parent": 312, "children": [], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 15}}, {"id": 314, "type": "<", "text": "<", "parent": 312, "children": [], "start_point": {"row": 175, "column": 15}, "end_point": {"row": 175, "column": 16}}, {"id": 315, "type": "identifier", "text": "std", "parent": 312, "children": [], "start_point": {"row": 175, "column": 16}, "end_point": {"row": 175, "column": 19}}, {"id": 316, "type": "binary_expression", "text": "unique_ptr<geom", "parent": 311, "children": [317, 318, 319], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 36}}, {"id": 317, "type": "identifier", "text": "unique_ptr", "parent": 316, "children": [], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 31}}, {"id": 318, "type": "<", "text": "<", "parent": 316, "children": [], "start_point": {"row": 175, "column": 31}, "end_point": {"row": 175, "column": 32}}, {"id": 319, "type": "identifier", "text": "geom", "parent": 316, "children": [], "start_point": {"row": 175, "column": 32}, "end_point": {"row": 175, "column": 36}}, {"id": 320, "type": "binary_expression", "text": "LineString>> getLines()", "parent": 309, "children": [321, 322, 323], "start_point": {"row": 175, "column": 38}, "end_point": {"row": 175, "column": 61}}, {"id": 321, "type": "identifier", "text": "LineString", "parent": 320, "children": [], "start_point": {"row": 175, "column": 38}, "end_point": {"row": 175, "column": 48}}, {"id": 322, "type": ">>", "text": ">>", "parent": 320, "children": [], "start_point": {"row": 175, "column": 48}, "end_point": {"row": 175, "column": 50}}, {"id": 323, "type": "call_expression", "text": "getLines()", "parent": 320, "children": [324, 325], "start_point": {"row": 175, "column": 51}, "end_point": {"row": 175, "column": 61}}, {"id": 324, "type": "identifier", "text": "getLines", "parent": 323, "children": [], "start_point": {"row": 175, "column": 51}, "end_point": {"row": 175, "column": 59}}, {"id": 325, "type": "argument_list", "text": "()", "parent": 323, "children": [], "start_point": {"row": 175, "column": 59}, "end_point": {"row": 175, "column": 61}}, {"id": 326, "type": "function_definition", "text": "void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }", "parent": 54, "children": [327, 328], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 181, "column": 5}}, {"id": 327, "type": "primitive_type", "text": "void", "parent": 326, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 8}}, {"id": 328, "type": "function_declarator", "text": "setStrictMode(bool p_isStrictResultMode)", "parent": 326, "children": [329, 330], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 49}}, {"id": 329, "type": "identifier", "text": "setStrictMode", "parent": 328, "children": [], "start_point": {"row": 177, "column": 9}, "end_point": {"row": 177, "column": 22}}, {"id": 330, "type": "parameter_list", "text": "(bool p_isStrictResultMode)", "parent": 328, "children": [331], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 49}}, {"id": 331, "type": "parameter_declaration", "text": "bool p_isStrictResultMode", "parent": 330, "children": [332, 333], "start_point": {"row": 177, "column": 23}, "end_point": {"row": 177, "column": 48}}, {"id": 332, "type": "primitive_type", "text": "bool", "parent": 331, "children": [], "start_point": {"row": 177, "column": 23}, "end_point": {"row": 177, "column": 27}}, {"id": 333, "type": "identifier", "text": "p_isStrictResultMode", "parent": 331, "children": [], "start_point": {"row": 177, "column": 28}, "end_point": {"row": 177, "column": 48}}, {"id": 334, "type": "assignment_expression", "text": "isAllowCollapseLines = ! p_isStrictResultMode", "parent": 326, "children": [335, 336, 337], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 53}}, {"id": 335, "type": "identifier", "text": "isAllowCollapseLines", "parent": 334, "children": [], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 28}}, {"id": 336, "type": "=", "text": "=", "parent": 334, "children": [], "start_point": {"row": 179, "column": 29}, "end_point": {"row": 179, "column": 30}}, {"id": 337, "type": "unary_expression", "text": "! p_isStrictResultMode", "parent": 334, "children": [338, 339], "start_point": {"row": 179, "column": 31}, "end_point": {"row": 179, "column": 53}}, {"id": 338, "type": "!", "text": "!", "parent": 337, "children": [], "start_point": {"row": 179, "column": 31}, "end_point": {"row": 179, "column": 32}}, {"id": 339, "type": "identifier", "text": "p_isStrictResultMode", "parent": 337, "children": [], "start_point": {"row": 179, "column": 33}, "end_point": {"row": 179, "column": 53}}, {"id": 340, "type": "assignment_expression", "text": "isAllowMixedResult = ! p_isStrictResultMode", "parent": 326, "children": [341, 342, 343], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 51}}, {"id": 341, "type": "identifier", "text": "isAllowMixedResult", "parent": 340, "children": [], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 26}}, {"id": 342, "type": "=", "text": "=", "parent": 340, "children": [], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 180, "column": 28}}, {"id": 343, "type": "unary_expression", "text": "! p_isStrictResultMode", "parent": 340, "children": [344, 345], "start_point": {"row": 180, "column": 29}, "end_point": {"row": 180, "column": 51}}, {"id": 344, "type": "!", "text": "!", "parent": 343, "children": [], "start_point": {"row": 180, "column": 29}, "end_point": {"row": 180, "column": 30}}, {"id": 345, "type": "identifier", "text": "p_isStrictResultMode", "parent": 343, "children": [], "start_point": {"row": 180, "column": 31}, "end_point": {"row": 180, "column": 51}}]}, "node_categories": {"declarations": {"functions": [21, 24, 31, 34, 45, 48, 51, 54, 117, 122, 134, 147, 152, 174, 179, 203, 213, 247, 252, 257, 262, 267, 272, 275, 284, 293, 326, 328], "variables": [27, 29, 37, 39, 41, 43, 59, 64, 67, 74, 77, 95, 105, 115, 125, 137, 142, 145, 150, 172, 177, 199, 206, 216, 222, 250, 255, 260, 265, 270, 280, 289, 296, 331], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [83, 87, 91, 101, 111, 158, 162, 165, 168, 185, 189, 192, 195, 299, 304, 312, 316, 320, 323, 337, 343], "assignments": [301, 334, 340], "loops": [], "conditionals": [22, 23, 25, 26, 28, 30, 32, 33, 35, 36, 38, 40, 42, 44, 46, 47, 49, 50, 52, 53, 56, 57, 60, 63, 66, 68, 70, 73, 76, 79, 81, 84, 86, 88, 90, 92, 94, 98, 103, 104, 108, 113, 114, 118, 123, 126, 129, 131, 133, 135, 138, 141, 144, 148, 153, 156, 159, 161, 163, 166, 169, 171, 175, 180, 183, 186, 188, 190, 193, 196, 198, 200, 204, 207, 210, 214, 217, 220, 223, 224, 226, 229, 231, 234, 236, 237, 239, 240, 242, 243, 246, 248, 251, 253, 256, 258, 261, 263, 266, 268, 271, 273, 276, 281, 282, 285, 290, 291, 294, 297, 300, 302, 306, 310, 313, 315, 317, 319, 321, 324, 329, 333, 335, 339, 341, 345], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "GeometryFactory;", "text_snippet": "namespace geos {\nnamespace geom {\nclass GeometryFactory;\nclass LineString;\n}\nnamespace operation {\nn"}, {"node_id": 24, "universal_type": "function", "name": "GeometryFactory;", "text_snippet": "namespace geom {\nclass GeometryFactory;\nclass LineString;\n}"}, {"node_id": 31, "universal_type": "function", "name": "OverlayEdge;", "text_snippet": "namespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabe"}, {"node_id": 34, "universal_type": "function", "name": "OverlayEdge;", "text_snippet": "namespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry"}, {"node_id": 45, "universal_type": "function", "name": "GEOS_DLL", "text_snippet": "namespace geos { // geos.\nnamespace operation { // geos.operation\nnamespace overlayng { // geos"}, {"node_id": 48, "universal_type": "function", "name": "GEOS_DLL", "text_snippet": "namespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Fi"}, {"node_id": 51, "universal_type": "function", "name": "GEOS_DLL", "text_snippet": "namespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from"}, {"node_id": 54, "universal_type": "function", "name": "GEOS_DLL", "text_snippet": "class GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n "}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "markResultLines()"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "isResultLine(const OverlayLabel* lbl) const"}, {"node_id": 134, "universal_type": "function", "name": "geomIndex)", "text_snippet": "effectiveLocation(const OverlayLabel* lbl, int geomIndex) const"}, {"node_id": 147, "universal_type": "function", "name": "unknown", "text_snippet": "addResultLines()"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "addResultLinesMerged()"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "addResultLinesForNodes()"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "addResultLinesRings()"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "nextLineEdgeUnvisited(OverlayEdge* node) const"}, {"node_id": 213, "universal_type": "function", "name": "unknown", "text_snippet": "degreeOfLines(OverlayEdge* node) const"}, {"node_id": 247, "universal_type": "function", "name": "unknown", "text_snippet": "graph(p_graph)"}, {"node_id": 252, "universal_type": "function", "name": "unknown", "text_snippet": "opCode(p_opCode)"}, {"node_id": 257, "universal_type": "function", "name": "unknown", "text_snippet": "geometryFactory(geomFact)"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "hasResultArea(p_hasResultArea)"}, {"node_id": 267, "universal_type": "function", "name": "unknown", "text_snippet": "inputAreaIndex(inputGeom->getAreaIndex())"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "getAreaIndex()"}, {"node_id": 275, "universal_type": "function", "name": "unknown", "text_snippet": "isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)"}, {"node_id": 284, "universal_type": "function", "name": "unknown", "text_snippet": "isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)"}, {"node_id": 293, "universal_type": "function", "name": "unknown", "text_snippet": "LineBuilder(const LineBuilder&)"}, {"node_id": 326, "universal_type": "function", "name": "setStrictMode", "text_snippet": "void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResul"}, {"node_id": 328, "universal_type": "function", "name": "unknown", "text_snippet": "setStrictMode(bool p_isStrictResultMode)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <geos/export.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <geos/operation/overlayng/InputGeometry.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <geos/operation/overlayng/OverlayNG.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <geos/geom/Location.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <geos/geom/LineString.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <vector>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/**********************************************************************\n *\n * GEOS - Geometry Engine Open Source\n * http://geos.osgeo.org\n *\n * Copyright (C) 2020 <NAME> <<EMAIL>>\n *\n * This is free software; you can redistribute and/or modify it under\n * the terms of the GNU Lesser General Public Licence as published\n * by the Free Software Foundation.\n * See the COPYING file for more information.\n *\n **********************************************************************/\n\n#pragma once\n\n#include <geos/export.h>\n\n#include <geos/operation/overlayng/InputGeometry.h>\n#include <geos/operation/overlayng/OverlayNG.h>\n#include <geos/geom/Location.h>\n#include <geos/geom/LineString.h>\n\n#include <vector>\n\n\n// Forward declarations\nnamespace geos {\nnamespace geom {\nclass GeometryFactory;\nclass LineString;\n}\nnamespace operation {\nnamespace overlayng {\nclass OverlayEdge;\nclass OverlayGraph;\nclass OverlayLabel;\nclass InputGeometry;\n}\n}\n}\n\nnamespace geos { // geos.\nnamespace operation { // geos.operation\nnamespace overlayng { // geos.operation.overlayng\n\n/**\n * Finds and builds overlay result lines from the overlay graph.\n * Output linework has the following semantics:\n *\n * - Linework is fully noded\n * - Lines are as long as possible between nodes\n *\n * Various strategies are possible for how to\n * merge graph edges into lines.\n * This implementation uses the approach\n * of having output lines run contiguously from node to node.\n * For rings a node point is chosen arbitrarily.\n *\n * Another possible strategy would be to preserve input linework\n * as far as possible (i.e. any sections of input lines which are not\n * coincident with other linework would be preserved).\n *\n * It would also be possible to output LinearRings,\n * if the input is a LinearRing and is unchanged.\n * This will require additional info from the input linework.\n *\n * @author <NAME>\n */\nclass GEOS_DLL LineBuilder {\n\nprivate:\n\n // Members\n OverlayGraph* graph;\n int opCode;\n const geom::GeometryFactory* geometryFactory;\n bool hasResultArea;\n int inputAreaIndex;\n std::vector<std::unique_ptr<geom::LineString>> lines;\n\n /**\n * Indicates whether intersections are allowed to produce\n * heterogeneous results including proper boundary touches.\n * This does not control inclusion of touches along collapses.\n * True provides the original JTS semantics.\n */\n bool isAllowMixedResult = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n /**\n * Allow lines created by area topology collapses\n * to appear in the result.\n * True provides the original JTS semantics.\n */\n bool isAllowCollapseLines = ! OverlayNG::STRICT_MODE_DEFAULT;\n\n void markResultLines();\n\n /**\n * Checks if the topology indicated by an edge label\n * determines that this edge should be part of a result line.\n *\n * Note that the logic here relies on the semantic\n * that for intersection lines are only returned if\n * there is no result area components.\n */\n bool isResultLine(const OverlayLabel* lbl) const;\n\n /**\n * Determines the effective location for a line,\n * for the purpose of overlay operation evaluation.\n * Line edges and Collapses are reported as INTERIOR\n * so they may be included in the result\n * if warranted by the effect of the operation\n * on the two edges.\n * (For instance, the intersection of line edge and a collapsed boundary\n * is included in the result).\n */\n geom::Location effectiveLocation(const OverlayLabel* lbl, int geomIndex) const;\n\n void addResultLines();\n void addResultLinesMerged();\n\n std::unique_ptr<geom::LineString> toLine(OverlayEdge* edge);\n\n void addResultLinesForNodes();\n\n /**\n * Adds lines which form rings (i.e. have only degree-2 vertices).\n */\n void addResultLinesRings();\n\n /**\n * Traverses edges from edgeStart which\n * lie in a single line (have degree = 2).\n *\n * The direction of the linework is preserved as far as possible.\n * Specifically, the direction of the line is determined\n * by the start edge direction. This implies\n * that if all edges are reversed, the created line\n * will be reversed to match.\n * (Other more complex strategies would be possible.\n * E.g. using the direction of the majority of segments,\n * or preferring the direction of the A edges.)\n */\n std::unique_ptr<geom::LineString> buildLine(OverlayEdge* node);\n\n /*\n * Finds the next edge around a node which forms\n * part of a result line.\n */\n OverlayEdge* nextLineEdgeUnvisited(OverlayEdge* node) const;\n\n /**\n * Computes the degree of the line edges incident on a node\n */\n int degreeOfLines(OverlayEdge* node) const;\n\n\n\npublic:\n\n LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)\n : graph(p_graph)\n , opCode(p_opCode)\n , geometryFactory(geomFact)\n , hasResultArea(p_hasResultArea)\n , inputAreaIndex(inputGeom->getAreaIndex())\n , isAllowMixedResult(! OverlayNG::STRICT_MODE_DEFAULT)\n , isAllowCollapseLines(! OverlayNG::STRICT_MODE_DEFAULT)\n {}\n\n LineBuilder(const LineBuilder&) = delete;\n LineBuilder& operator=(const LineBuilder&) = delete;\n\n std::vector<std::unique_ptr<geom::LineString>> getLines();\n\n void setStrictMode(bool p_isStrictResultMode)\n {\n isAllowCollapseLines = ! p_isStrictResultMode;\n isAllowMixedResult = ! p_isStrictResultMode;\n }\n\n};\n\n\n} // namespace geos.operation.overlayng\n} // namespace geos.operation\n} // namespace geos\n\n"}
294
c
// // UIColor+Hexcolor.h // MTKIT // // Created by 鲁志刚 on 2017/9/26. // Copyright © 2017年 MTKIT. All rights reserved. // #import <UIKit/UIKit.h> #define HEXCOLOR(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0] @interface UIColor_Hexcolor : UIColor @end
27.36
11
(translation_unit) "//\n// UIColor+Hexcolor.h\n// MTKIT\n//\n// Created by 鲁志刚 on 2017/9/26.\n// Copyright © 2017年 MTKIT. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#define HEXCOLOR(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]\n\n@interface UIColor_Hexcolor : UIColor\n\n@end\n" (comment) "//" (comment) "// UIColor+Hexcolor.h" (comment) "// MTKIT" (comment) "//" (comment) "// Created by 鲁志刚 on 2017/9/26.\n// C" (comment) "pyright © 2017年 MTKIT. All rights reserved.\n//\n\n#imp" (comment) "rt" (preproc_call) "UIKit/UIKit.h>\n#define H" (preproc_directive) "UIKit/U" (preproc_arg) "Kit.h>\n#define " (preproc_function_def) "EXCOLOR(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]\n\n@interfa" (#define) "EXCOLOR" (identifier) "c) [UICo" (preproc_params) "lor" (() "l" (identifier) "o" ()) "r" (preproc_arg) "colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]\n\n@interf" (ERROR) "e UIColor_Hexcolor : UIColor\n\n@end\n" (ERROR) "e" (type_identifier) " UIColor_" (identifier) "excolor : UIColo" (:) "\n" (identifier) "@end\n" (ERROR) "" (identifier) ""
27
3
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 27.36, "nodes": 16, "errors": 0, "source_hash": "89c53983795a1d07b4d808d621985b967125b5e4bc134810f1bb98c51108355b", "categorized_nodes": 8}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "UIKit/UIKit.h>\n#define H", "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#define ", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "preproc_function_def", "text": "EXCOLOR(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]\n\n@interfa", "parent": null, "children": [4, 5, 6, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "#define", "text": "EXCOLOR", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "identifier", "text": "c) [UICo", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 16}}, {"id": 6, "type": "preproc_params", "text": "lor", "parent": 3, "children": [7], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 19}}, {"id": 7, "type": "identifier", "text": "o", "parent": 6, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 8, "type": "preproc_arg", "text": "colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]\n\n@interf", "parent": 3, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 119}}, {"id": 9, "type": "ERROR", "text": "e UIColor_Hexcolor : UIColor\n\n@end\n", "parent": null, "children": [10, 11, 12, 13, 14, 15], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 10, "type": "ERROR", "text": "e", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 11, "type": "type_identifier", "text": " UIColor_", "parent": 9, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 12, "type": "identifier", "text": "excolor : UIColo", "parent": 9, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 27}}, {"id": 13, "type": "identifier", "text": "@end\n", "parent": 9, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 37}}, {"id": 14, "type": "ERROR", "text": "", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 15, "type": "identifier", "text": "", "parent": 9, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 4}}]}, "node_categories": {"declarations": {"functions": [3], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 7, 11, 12, 13, 15], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "EXCOLOR(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 "}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// UIColor+Hexcolor.h\n// MTKIT\n//\n// Created by \u9c81\u5fd7\u521a on 2017/9/26.\n// Copyright \u00a9 2017\u5e74 MTKIT. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#define HEXCOLOR(c) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]\n\n@interface UIColor_Hexcolor : UIColor\n\n@end\n"}
295
c
/* SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <tilck/common/basic_defs.h> struct datetime { union { struct { u8 sec; /* Seconds (0-60) */ u8 min; /* Minutes (0-59) */ u8 hour; /* Hours (0-23) */ u8 weekday; /* Weekday (0-6, Sunday = 0) */ u8 day; /* Month day (1 - 31) */ u8 month; /* Month (1 - 12) */ u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */ }; u64 raw; }; }; int timestamp_to_datetime(int64_t t, struct datetime *d); int64_t datetime_to_timestamp(struct datetime d);
32.42
19
(translation_unit) "/* SPDX-License-Identifier: BSD-2-Clause */\n\n#pragma once\n#include <tilck/common/basic_defs.h>\n\nstruct datetime {\n\n union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };\n};\n\nint timestamp_to_datetime(int64_t t, struct datetime *d);\nint64_t datetime_to_timestamp(struct datetime d);\n" (comment) "/* SPDX-License-Identifier: BSD-2-Clause */" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <tilck/common/basic_defs.h>\n" (#include) "#include" (system_lib_string) "<tilck/common/basic_defs.h>" (struct_specifier) "struct datetime {\n\n union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };\n}" (struct) "struct" (type_identifier) "datetime" (field_declaration_list) "{\n\n union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };\n}" ({) "{" (field_declaration) "union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };" (union_specifier) "union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n }" (union) "union" (field_declaration_list) "{\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n }" ({) "{" (field_declaration) "struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };" (struct_specifier) "struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n }" (struct) "struct" (field_declaration_list) "{\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n }" ({) "{" (field_declaration) "u8 sec;" (type_identifier) "u8" (field_identifier) "sec" (;) ";" (comment) "/* Seconds (0-60) */" (field_declaration) "u8 min;" (type_identifier) "u8" (field_identifier) "min" (;) ";" (comment) "/* Minutes (0-59) */" (field_declaration) "u8 hour;" (type_identifier) "u8" (field_identifier) "hour" (;) ";" (comment) "/* Hours (0-23) */" (field_declaration) "u8 weekday;" (type_identifier) "u8" (field_identifier) "weekday" (;) ";" (comment) "/* Weekday (0-6, Sunday = 0) */" (field_declaration) "u8 day;" (type_identifier) "u8" (field_identifier) "day" (;) ";" (comment) "/* Month day (1 - 31) */" (field_declaration) "u8 month;" (type_identifier) "u8" (field_identifier) "month" (;) ";" (comment) "/* Month (1 - 12) */" (field_declaration) "u16 year;" (type_identifier) "u16" (field_identifier) "year" (;) ";" (comment) "/* Absolute year (e.g. 1542, 2019, 2059, ...) */" (}) "}" (;) ";" (field_declaration) "u64 raw;" (type_identifier) "u64" (field_identifier) "raw" (;) ";" (}) "}" (;) ";" (}) "}" (;) ";" (declaration) "int timestamp_to_datetime(int64_t t, struct datetime *d);" (primitive_type) "int" (function_declarator) "timestamp_to_datetime(int64_t t, struct datetime *d)" (identifier) "timestamp_to_datetime" (parameter_list) "(int64_t t, struct datetime *d)" (() "(" (parameter_declaration) "int64_t t" (primitive_type) "int64_t" (identifier) "t" (,) "," (parameter_declaration) "struct datetime *d" (struct_specifier) "struct datetime" (struct) "struct" (type_identifier) "datetime" (pointer_declarator) "*d" (*) "*" (identifier) "d" ()) ")" (;) ";" (declaration) "int64_t datetime_to_timestamp(struct datetime d);" (primitive_type) "int64_t" (function_declarator) "datetime_to_timestamp(struct datetime d)" (identifier) "datetime_to_timestamp" (parameter_list) "(struct datetime d)" (() "(" (parameter_declaration) "struct datetime d" (struct_specifier) "struct datetime" (struct) "struct" (type_identifier) "datetime" (identifier) "d" ()) ")" (;) ";"
100
0
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 32.42, "nodes": 64, "errors": 0, "source_hash": "f22676c6f101151b6dad2e16c30c79d5f9a99f7a481ad9785285205e507576c2", "categorized_nodes": 55}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <tilck/common/basic_defs.h>\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": "<tilck/common/basic_defs.h>", "parent": 3, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 36}}, {"id": 6, "type": "struct_specifier", "text": "struct datetime {\n\n union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };\n}", "parent": null, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 7, "type": "struct", "text": "struct", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 8, "type": "type_identifier", "text": "datetime", "parent": 6, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 15}}, {"id": 9, "type": "field_declaration", "text": "union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };", "parent": 6, "children": [10], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 20, "column": 5}}, {"id": 10, "type": "union_specifier", "text": "union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n }", "parent": 9, "children": [11], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 20, "column": 4}}, {"id": 11, "type": "union", "text": "union", "parent": 10, "children": [], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 8}}, {"id": 12, "type": "field_declaration", "text": "struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };", "parent": 10, "children": [13], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 17, "column": 8}}, {"id": 13, "type": "struct_specifier", "text": "struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n }", "parent": 12, "children": [14], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 17, "column": 7}}, {"id": 14, "type": "struct", "text": "struct", "parent": 13, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 12}}, {"id": 15, "type": "field_declaration", "text": "u8 sec;", "parent": 13, "children": [16, 17], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 16}}, {"id": 16, "type": "type_identifier", "text": "u8", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 11}}, {"id": 17, "type": "field_identifier", "text": "sec", "parent": 15, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 15}}, {"id": 18, "type": "field_declaration", "text": "u8 min;", "parent": 13, "children": [19, 20], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 16}}, {"id": 19, "type": "type_identifier", "text": "u8", "parent": 18, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 11}}, {"id": 20, "type": "field_identifier", "text": "min", "parent": 18, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 15}}, {"id": 21, "type": "field_declaration", "text": "u8 hour;", "parent": 13, "children": [22, 23], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 17}}, {"id": 22, "type": "type_identifier", "text": "u8", "parent": 21, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 11}}, {"id": 23, "type": "field_identifier", "text": "hour", "parent": 21, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 16}}, {"id": 24, "type": "field_declaration", "text": "u8 weekday;", "parent": 13, "children": [25, 26], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 25, "type": "type_identifier", "text": "u8", "parent": 24, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 11}}, {"id": 26, "type": "field_identifier", "text": "weekday", "parent": 24, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 19}}, {"id": 27, "type": "field_declaration", "text": "u8 day;", "parent": 13, "children": [28, 29], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 16}}, {"id": 28, "type": "type_identifier", "text": "u8", "parent": 27, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 11}}, {"id": 29, "type": "field_identifier", "text": "day", "parent": 27, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 15}}, {"id": 30, "type": "field_declaration", "text": "u8 month;", "parent": 13, "children": [31, 32], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 18}}, {"id": 31, "type": "type_identifier", "text": "u8", "parent": 30, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 11}}, {"id": 32, "type": "field_identifier", "text": "month", "parent": 30, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 17}}, {"id": 33, "type": "field_declaration", "text": "u16 year;", "parent": 13, "children": [34, 35], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 18}}, {"id": 34, "type": "type_identifier", "text": "u16", "parent": 33, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 12}}, {"id": 35, "type": "field_identifier", "text": "year", "parent": 33, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 17}}, {"id": 36, "type": "field_declaration", "text": "u64 raw;", "parent": 10, "children": [37, 38], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 14}}, {"id": 37, "type": "type_identifier", "text": "u64", "parent": 36, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 9}}, {"id": 38, "type": "field_identifier", "text": "raw", "parent": 36, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 13}}, {"id": 39, "type": "declaration", "text": "int timestamp_to_datetime(int64_t t, struct datetime *d);", "parent": null, "children": [40, 41], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 57}}, {"id": 40, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 3}}, {"id": 41, "type": "function_declarator", "text": "timestamp_to_datetime(int64_t t, struct datetime *d)", "parent": 39, "children": [42, 43], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 56}}, {"id": 42, "type": "identifier", "text": "timestamp_to_datetime", "parent": 41, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 25}}, {"id": 43, "type": "parameter_list", "text": "(int64_t t, struct datetime *d)", "parent": 41, "children": [44, 47], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 56}}, {"id": 44, "type": "parameter_declaration", "text": "int64_t t", "parent": 43, "children": [45, 46], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 35}}, {"id": 45, "type": "primitive_type", "text": "int64_t", "parent": 44, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 33}}, {"id": 46, "type": "identifier", "text": "t", "parent": 44, "children": [], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 35}}, {"id": 47, "type": "parameter_declaration", "text": "struct datetime *d", "parent": 43, "children": [48, 51], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 55}}, {"id": 48, "type": "struct_specifier", "text": "struct datetime", "parent": 47, "children": [49, 50], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 52}}, {"id": 49, "type": "struct", "text": "struct", "parent": 48, "children": [], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 43}}, {"id": 50, "type": "type_identifier", "text": "datetime", "parent": 48, "children": [], "start_point": {"row": 23, "column": 44}, "end_point": {"row": 23, "column": 52}}, {"id": 51, "type": "pointer_declarator", "text": "*d", "parent": 47, "children": [52, 53], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 55}}, {"id": 52, "type": "*", "text": "*", "parent": 51, "children": [], "start_point": {"row": 23, "column": 53}, "end_point": {"row": 23, "column": 54}}, {"id": 53, "type": "identifier", "text": "d", "parent": 51, "children": [], "start_point": {"row": 23, "column": 54}, "end_point": {"row": 23, "column": 55}}, {"id": 54, "type": "declaration", "text": "int64_t datetime_to_timestamp(struct datetime d);", "parent": null, "children": [55, 56], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 49}}, {"id": 55, "type": "primitive_type", "text": "int64_t", "parent": 54, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 56, "type": "function_declarator", "text": "datetime_to_timestamp(struct datetime d)", "parent": 54, "children": [57, 58], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 48}}, {"id": 57, "type": "identifier", "text": "datetime_to_timestamp", "parent": 56, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 29}}, {"id": 58, "type": "parameter_list", "text": "(struct datetime d)", "parent": 56, "children": [59], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 48}}, {"id": 59, "type": "parameter_declaration", "text": "struct datetime d", "parent": 58, "children": [60, 63], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 47}}, {"id": 60, "type": "struct_specifier", "text": "struct datetime", "parent": 59, "children": [61, 62], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 45}}, {"id": 61, "type": "struct", "text": "struct", "parent": 60, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 36}}, {"id": 62, "type": "type_identifier", "text": "datetime", "parent": 60, "children": [], "start_point": {"row": 24, "column": 37}, "end_point": {"row": 24, "column": 45}}, {"id": 63, "type": "identifier", "text": "d", "parent": 59, "children": [], "start_point": {"row": 24, "column": 46}, "end_point": {"row": 24, "column": 47}}]}, "node_categories": {"declarations": {"functions": [41, 56], "variables": [9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 44, 47, 54, 59], "classes": [6, 7, 10, 11, 13, 14, 48, 49, 60, 61], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 42, 46, 50, 53, 57, 62, 63], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 41, "universal_type": "function", "name": "datetime", "text_snippet": "timestamp_to_datetime(int64_t t, struct datetime *d)"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "datetime_to_timestamp(struct datetime d)"}], "class_declarations": [{"node_id": 6, "universal_type": "class", "name": "datetime", "text_snippet": "struct datetime {\n\n union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n "}, {"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 10, "universal_type": "class", "name": "{", "text_snippet": "union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minu"}, {"node_id": 11, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 13, "universal_type": "class", "name": "{", "text_snippet": "struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n "}, {"node_id": 14, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 48, "universal_type": "class", "name": "datetime", "text_snippet": "struct datetime"}, {"node_id": 49, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 60, "universal_type": "class", "name": "datetime", "text_snippet": "struct datetime"}, {"node_id": 61, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <tilck/common/basic_defs.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/* SPDX-License-Identifier: BSD-2-Clause */\n\n#pragma once\n#include <tilck/common/basic_defs.h>\n\nstruct datetime {\n\n union {\n\n struct {\n u8 sec; /* Seconds (0-60) */\n u8 min; /* Minutes (0-59) */\n u8 hour; /* Hours (0-23) */\n u8 weekday; /* Weekday (0-6, Sunday = 0) */\n u8 day; /* Month day (1 - 31) */\n u8 month; /* Month (1 - 12) */\n u16 year; /* Absolute year (e.g. 1542, 2019, 2059, ...) */\n };\n\n u64 raw;\n };\n};\n\nint timestamp_to_datetime(int64_t t, struct datetime *d);\nint64_t datetime_to_timestamp(struct datetime d);\n"}
296
c
#include <stdio.h> #include <espressif/esp_wifi.h> #include <espressif/esp_sta.h> #include <esp/uart.h> #include <esp8266.h> #include <FreeRTOS.h> #include <task.h> #include <homekit/homekit.h> #include <homekit/characteristics.h> //#include "wifi.h" #include <wifi_config.h> #include "i2c/i2c.h" #include "bmp280/bmp280.h" #define LED_GPIO 2 // In forced mode user initiate measurement each time. // In normal mode measurement is done continuously with specified standby time. // #define MODE_FORCED const uint8_t i2c_bus = 0; const uint8_t scl_pin = 0; const uint8_t sda_pin = 4; void led_write(bool on) { gpio_write(LED_GPIO, on ? 0 : 1); } void identify_task(void *_args) { for (int i=0; i<3; i++) { for (int j=0; j<3; j++) { led_write(true); vTaskDelay(150 / portTICK_PERIOD_MS); led_write(false); vTaskDelay(150 / portTICK_PERIOD_MS); } vTaskDelay(250 / portTICK_PERIOD_MS); } led_write(false); vTaskDelete(NULL); } void temperature_sensor_identify(homekit_value_t _value) { printf("Temperature sensor identify\n"); xTaskCreate(identify_task, "identify_task", 128, NULL, 2, NULL); } homekit_characteristic_t name = HOMEKIT_CHARACTERISTIC_(NAME, "Temperature"); homekit_characteristic_t current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0); homekit_characteristic_t current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0); #ifdef MODE_FORCED static void bmp280_task_forced(void *pvParameters) { bmp280_params_t params; float pressure, temperature, humidity; bmp280_init_default_params(&params); params.mode = BMP280_MODE_FORCED; bmp280_t bmp280_dev; bmp280_dev.i2c_dev.bus = i2c_bus; bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0; while (1) { while (!bmp280_init(&bmp280_dev, &params)) { printf("BMP280 initialization failed\n"); vTaskDelay(1000 / portTICK_PERIOD_MS); } bool bme280p = bmp280_dev.id == BME280_CHIP_ID; printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280"); while(1) { vTaskDelay(1000 / portTICK_PERIOD_MS); if (!bmp280_force_measurement(&bmp280_dev)) { printf("Failed initiating measurement\n"); break; } // wait for measurement to complete while (bmp280_is_measuring(&bmp280_dev)) {}; if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) { printf("Temperature/pressure reading failed\n"); break; } printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature); if (bme280p) printf(", Humidity: %.2f\n", humidity); else printf("\n"); current_temperature.value = HOMEKIT_FLOAT(temperature); current_humidity.value = HOMEKIT_FLOAT(humidity); homekit_characteristic_notify(&current_temperature, current_temperature.value); homekit_characteristic_notify(&current_humidity, current_humidity.value); } } } #else static void bmp280_task_normal(void *pvParameters) { bmp280_params_t params; float pressure, temperature, humidity; bmp280_init_default_params(&params); bmp280_t bmp280_dev; bmp280_dev.i2c_dev.bus = i2c_bus; bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0; while (1) { while (!bmp280_init(&bmp280_dev, &params)) { printf("BMP280 initialization failed\n"); vTaskDelay(1000 / portTICK_PERIOD_MS); } bool bme280p = bmp280_dev.id == BME280_CHIP_ID; printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280"); while(1) { vTaskDelay(1000 / portTICK_PERIOD_MS); if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) { printf("Temperature/pressure reading failed\n"); break; } printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature); if (bme280p) printf(", Humidity: %.2f\n", humidity); else printf("\n"); current_temperature.value = HOMEKIT_FLOAT(temperature); current_humidity.value = HOMEKIT_FLOAT(humidity); homekit_characteristic_notify(&current_temperature, current_temperature.value); homekit_characteristic_notify(&current_humidity, current_humidity.value); } } } #endif void temperature_sensor_init() { i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K); #ifdef MODE_FORCED xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL); #else xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL); #endif gpio_enable(LED_GPIO, GPIO_OUTPUT); led_write(false); } homekit_accessory_t *accessories[] = { HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) { HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) { HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"), HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"), HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"), HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"), HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"), HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify), NULL }), HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) { HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"), &current_temperature, NULL }), HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) { HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"), &current_humidity, NULL }), NULL }), NULL }; homekit_server_config_t config = { .accessories = accessories, .password = "<PASSWORD>" }; void on_wifi_ready() { homekit_server_init(&config); } void user_init(void) { uart_set_baud(0, 115200); uint8_t macaddr[6]; sdk_wifi_get_macaddr(STATION_IF, macaddr); int name_len = snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]); char *name_value = malloc(name_len + 1); snprintf(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]); name.value = HOMEKIT_STRING(name_value); wifi_config_init("Temperature Sensor", NULL, on_wifi_ready); temperature_sensor_init(); }
37.28
176
(translation_unit) "#include <stdio.h>\n#include <espressif/esp_wifi.h>\n#include <espressif/esp_sta.h>\n#include <esp/uart.h>\n#include <esp8266.h>\n#include <FreeRTOS.h>\n#include <task.h>\n\n#include <homekit/homekit.h>\n#include <homekit/characteristics.h>\n//#include "wifi.h"\n#include <wifi_config.h>\n#include "i2c/i2c.h"\n#include "bmp280/bmp280.h"\n\n#define LED_GPIO 2\n// In forced mode user initiate measurement each time.\n// In normal mode measurement is done continuously with specified standby time.\n// #define MODE_FORCED\nconst uint8_t i2c_bus = 0;\nconst uint8_t scl_pin = 0;\nconst uint8_t sda_pin = 4;\n\nvoid led_write(bool on)\n{\n gpio_write(LED_GPIO, on ? 0 : 1);\n}\n\nvoid identify_task(void *_args) {\n\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }\n\n led_write(false);\n\n vTaskDelete(NULL);\n}\n\nvoid temperature_sensor_identify(homekit_value_t _value) {\n printf("Temperature sensor identify\n");\n\n xTaskCreate(identify_task, "identify_task", 128, NULL, 2, NULL);\n\n}\nhomekit_characteristic_t name = HOMEKIT_CHARACTERISTIC_(NAME, "Temperature");\nhomekit_characteristic_t current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0);\nhomekit_characteristic_t current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0);\n\n\n#ifdef MODE_FORCED\nstatic void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#else\nstatic void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#endif\n\nvoid temperature_sensor_init() {\n\n i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);\n\n#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL);\n#endif\n\n gpio_enable(LED_GPIO, GPIO_OUTPUT);\n led_write(false);\n\n}\n\n\nhomekit_accessory_t *accessories[] = {\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n};\n\nhomekit_server_config_t config = {\n .accessories = accessories,\n .password = "<PASSWORD>"\n};\n\nvoid on_wifi_ready() {\n homekit_server_init(&config);\n}\n\nvoid user_init(void) {\n uart_set_baud(0, 115200);\n\n\n\n uint8_t macaddr[6];\n sdk_wifi_get_macaddr(STATION_IF, macaddr);\n int name_len = snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);\n char *name_value = malloc(name_len + 1);\n snprintf(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);\n name.value = HOMEKIT_STRING(name_value);\n\n wifi_config_init("Temperature Sensor", NULL, on_wifi_ready);\n\n temperature_sensor_init();\n}\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <espressif/esp_wifi.h>\n" (#include) "#include" (system_lib_string) "<espressif/esp_wifi.h>" (preproc_include) "#include <espressif/esp_sta.h>\n" (#include) "#include" (system_lib_string) "<espressif/esp_sta.h>" (preproc_include) "#include <esp/uart.h>\n" (#include) "#include" (system_lib_string) "<esp/uart.h>" (preproc_include) "#include <esp8266.h>\n" (#include) "#include" (system_lib_string) "<esp8266.h>" (preproc_include) "#include <FreeRTOS.h>\n" (#include) "#include" (system_lib_string) "<FreeRTOS.h>" (preproc_include) "#include <task.h>\n" (#include) "#include" (system_lib_string) "<task.h>" (preproc_include) "#include <homekit/homekit.h>\n" (#include) "#include" (system_lib_string) "<homekit/homekit.h>" (preproc_include) "#include <homekit/characteristics.h>\n" (#include) "#include" (system_lib_string) "<homekit/characteristics.h>" (comment) "//#include "wifi.h"" (preproc_include) "#include <wifi_config.h>\n" (#include) "#include" (system_lib_string) "<wifi_config.h>" (preproc_include) "#include "i2c/i2c.h"\n" (#include) "#include" (string_literal) ""i2c/i2c.h"" (") """ (string_content) "i2c/i2c.h" (") """ (preproc_include) "#include "bmp280/bmp280.h"\n" (#include) "#include" (string_literal) ""bmp280/bmp280.h"" (") """ (string_content) "bmp280/bmp280.h" (") """ (preproc_def) "#define LED_GPIO 2\n" (#define) "#define" (identifier) "LED_GPIO" (preproc_arg) "2" (comment) "// In forced mode user initiate measurement each time." (comment) "// In normal mode measurement is done continuously with specified standby time." (comment) "// #define MODE_FORCED" (declaration) "const uint8_t i2c_bus = 0;" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "i2c_bus = 0" (identifier) "i2c_bus" (=) "=" (number_literal) "0" (;) ";" (declaration) "const uint8_t scl_pin = 0;" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "scl_pin = 0" (identifier) "scl_pin" (=) "=" (number_literal) "0" (;) ";" (declaration) "const uint8_t sda_pin = 4;" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "sda_pin = 4" (identifier) "sda_pin" (=) "=" (number_literal) "4" (;) ";" (function_definition) "void led_write(bool on)\n{\n gpio_write(LED_GPIO, on ? 0 : 1);\n}" (primitive_type) "void" (function_declarator) "led_write(bool on)" (identifier) "led_write" (parameter_list) "(bool on)" (() "(" (parameter_declaration) "bool on" (primitive_type) "bool" (identifier) "on" ()) ")" (compound_statement) "{\n gpio_write(LED_GPIO, on ? 0 : 1);\n}" ({) "{" (expression_statement) "gpio_write(LED_GPIO, on ? 0 : 1);" (call_expression) "gpio_write(LED_GPIO, on ? 0 : 1)" (identifier) "gpio_write" (argument_list) "(LED_GPIO, on ? 0 : 1)" (() "(" (identifier) "LED_GPIO" (,) "," (conditional_expression) "on ? 0 : 1" (identifier) "on" (?) "?" (number_literal) "0" (:) ":" (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "void identify_task(void *_args) {\n\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }\n\n led_write(false);\n\n vTaskDelete(NULL);\n}" (primitive_type) "void" (function_declarator) "identify_task(void *_args)" (identifier) "identify_task" (parameter_list) "(void *_args)" (() "(" (parameter_declaration) "void *_args" (primitive_type) "void" (pointer_declarator) "*_args" (*) "*" (identifier) "_args" ()) ")" (compound_statement) "{\n\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }\n\n led_write(false);\n\n vTaskDelete(NULL);\n}" ({) "{" (for_statement) "for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }" (for) "for" (() "(" (declaration) "int i=0;" (primitive_type) "int" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<3" (identifier) "i" (<) "<" (number_literal) "3" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }" ({) "{" (for_statement) "for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }" (for) "for" (() "(" (declaration) "int j=0;" (primitive_type) "int" (init_declarator) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<3" (identifier) "j" (<) "<" (number_literal) "3" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }" ({) "{" (expression_statement) "led_write(true);" (call_expression) "led_write(true)" (identifier) "led_write" (argument_list) "(true)" (() "(" (true) "true" ()) ")" (;) ";" (expression_statement) "vTaskDelay(150 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(150 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(150 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "150 / portTICK_PERIOD_MS" (number_literal) "150" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (expression_statement) "led_write(false);" (call_expression) "led_write(false)" (identifier) "led_write" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (;) ";" (expression_statement) "vTaskDelay(150 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(150 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(150 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "150 / portTICK_PERIOD_MS" (number_literal) "150" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (}) "}" (expression_statement) "vTaskDelay(250 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(250 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(250 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "250 / portTICK_PERIOD_MS" (number_literal) "250" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (}) "}" (expression_statement) "led_write(false);" (call_expression) "led_write(false)" (identifier) "led_write" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (;) ";" (expression_statement) "vTaskDelete(NULL);" (call_expression) "vTaskDelete(NULL)" (identifier) "vTaskDelete" (argument_list) "(NULL)" (() "(" (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (}) "}" (function_definition) "void temperature_sensor_identify(homekit_value_t _value) {\n printf("Temperature sensor identify\n");\n\n xTaskCreate(identify_task, "identify_task", 128, NULL, 2, NULL);\n\n}" (primitive_type) "void" (function_declarator) "temperature_sensor_identify(homekit_value_t _value)" (identifier) "temperature_sensor_identify" (parameter_list) "(homekit_value_t _value)" (() "(" (parameter_declaration) "homekit_value_t _value" (type_identifier) "homekit_value_t" (identifier) "_value" ()) ")" (compound_statement) "{\n printf("Temperature sensor identify\n");\n\n xTaskCreate(identify_task, "identify_task", 128, NULL, 2, NULL);\n\n}" ({) "{" (expression_statement) "printf("Temperature sensor identify\n");" (call_expression) "printf("Temperature sensor identify\n")" (identifier) "printf" (argument_list) "("Temperature sensor identify\n")" (() "(" (string_literal) ""Temperature sensor identify\n"" (") """ (string_content) "Temperature sensor identify" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "xTaskCreate(identify_task, "identify_task", 128, NULL, 2, NULL);" (call_expression) "xTaskCreate(identify_task, "identify_task", 128, NULL, 2, NULL)" (identifier) "xTaskCreate" (argument_list) "(identify_task, "identify_task", 128, NULL, 2, NULL)" (() "(" (identifier) "identify_task" (,) "," (string_literal) ""identify_task"" (") """ (string_content) "identify_task" (") """ (,) "," (number_literal) "128" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "2" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (}) "}" (declaration) "homekit_characteristic_t name = HOMEKIT_CHARACTERISTIC_(NAME, "Temperature");" (type_identifier) "homekit_characteristic_t" (init_declarator) "name = HOMEKIT_CHARACTERISTIC_(NAME, "Temperature")" (identifier) "name" (=) "=" (call_expression) "HOMEKIT_CHARACTERISTIC_(NAME, "Temperature")" (identifier) "HOMEKIT_CHARACTERISTIC_" (argument_list) "(NAME, "Temperature")" (() "(" (identifier) "NAME" (,) "," (string_literal) ""Temperature"" (") """ (string_content) "Temperature" (") """ ()) ")" (;) ";" (declaration) "homekit_characteristic_t current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0);" (type_identifier) "homekit_characteristic_t" (init_declarator) "current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0)" (identifier) "current_temperature" (=) "=" (call_expression) "HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0)" (identifier) "HOMEKIT_CHARACTERISTIC_" (argument_list) "(CURRENT_TEMPERATURE, 0)" (() "(" (identifier) "CURRENT_TEMPERATURE" (,) "," (number_literal) "0" ()) ")" (;) ";" (declaration) "homekit_characteristic_t current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0);" (type_identifier) "homekit_characteristic_t" (init_declarator) "current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0)" (identifier) "current_humidity" (=) "=" (call_expression) "HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0)" (identifier) "HOMEKIT_CHARACTERISTIC_" (argument_list) "(CURRENT_RELATIVE_HUMIDITY, 0)" (() "(" (identifier) "CURRENT_RELATIVE_HUMIDITY" (,) "," (number_literal) "0" ()) ")" (;) ";" (preproc_ifdef) "#ifdef MODE_FORCED\nstatic void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#else\nstatic void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#endif" (#ifdef) "#ifdef" (identifier) "MODE_FORCED" (function_definition) "static void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "bmp280_task_forced(void *pvParameters)" (identifier) "bmp280_task_forced" (parameter_list) "(void *pvParameters)" (() "(" (parameter_declaration) "void *pvParameters" (primitive_type) "void" (pointer_declarator) "*pvParameters" (*) "*" (identifier) "pvParameters" ()) ")" (compound_statement) "{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}" ({) "{" (declaration) "bmp280_params_t params;" (type_identifier) "bmp280_params_t" (identifier) "params" (;) ";" (declaration) "float pressure, temperature, humidity;" (primitive_type) "float" (identifier) "pressure" (,) "," (identifier) "temperature" (,) "," (identifier) "humidity" (;) ";" (expression_statement) "bmp280_init_default_params(&params);" (call_expression) "bmp280_init_default_params(&params)" (identifier) "bmp280_init_default_params" (argument_list) "(&params)" (() "(" (pointer_expression) "&params" (&) "&" (identifier) "params" ()) ")" (;) ";" (expression_statement) "params.mode = BMP280_MODE_FORCED;" (assignment_expression) "params.mode = BMP280_MODE_FORCED" (field_expression) "params.mode" (identifier) "params" (.) "." (field_identifier) "mode" (=) "=" (identifier) "BMP280_MODE_FORCED" (;) ";" (declaration) "bmp280_t bmp280_dev;" (type_identifier) "bmp280_t" (identifier) "bmp280_dev" (;) ";" (expression_statement) "bmp280_dev.i2c_dev.bus = i2c_bus;" (assignment_expression) "bmp280_dev.i2c_dev.bus = i2c_bus" (field_expression) "bmp280_dev.i2c_dev.bus" (field_expression) "bmp280_dev.i2c_dev" (identifier) "bmp280_dev" (.) "." (field_identifier) "i2c_dev" (.) "." (field_identifier) "bus" (=) "=" (identifier) "i2c_bus" (;) ";" (expression_statement) "bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;" (assignment_expression) "bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0" (field_expression) "bmp280_dev.i2c_dev.addr" (field_expression) "bmp280_dev.i2c_dev" (identifier) "bmp280_dev" (.) "." (field_identifier) "i2c_dev" (.) "." (field_identifier) "addr" (=) "=" (identifier) "BMP280_I2C_ADDRESS_0" (;) ";" (while_statement) "while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }" ({) "{" (while_statement) "while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }" (while) "while" (parenthesized_expression) "(!bmp280_init(&bmp280_dev, &params))" (() "(" (unary_expression) "!bmp280_init(&bmp280_dev, &params)" (!) "!" (call_expression) "bmp280_init(&bmp280_dev, &params)" (identifier) "bmp280_init" (argument_list) "(&bmp280_dev, &params)" (() "(" (pointer_expression) "&bmp280_dev" (&) "&" (identifier) "bmp280_dev" (,) "," (pointer_expression) "&params" (&) "&" (identifier) "params" ()) ")" ()) ")" (compound_statement) "{\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }" ({) "{" (expression_statement) "printf("BMP280 initialization failed\n");" (call_expression) "printf("BMP280 initialization failed\n")" (identifier) "printf" (argument_list) "("BMP280 initialization failed\n")" (() "(" (string_literal) ""BMP280 initialization failed\n"" (") """ (string_content) "BMP280 initialization failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "vTaskDelay(1000 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(1000 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(1000 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "1000 / portTICK_PERIOD_MS" (number_literal) "1000" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (}) "}" (declaration) "bool bme280p = bmp280_dev.id == BME280_CHIP_ID;" (primitive_type) "bool" (init_declarator) "bme280p = bmp280_dev.id == BME280_CHIP_ID" (identifier) "bme280p" (=) "=" (binary_expression) "bmp280_dev.id == BME280_CHIP_ID" (field_expression) "bmp280_dev.id" (identifier) "bmp280_dev" (.) "." (field_identifier) "id" (==) "==" (identifier) "BME280_CHIP_ID" (;) ";" (expression_statement) "printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");" (call_expression) "printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280")" (identifier) "printf" (argument_list) "("BMP280: found %s\n", bme280p ? "BME280" : "BMP280")" (() "(" (string_literal) ""BMP280: found %s\n"" (") """ (string_content) "BMP280: found %s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "bme280p ? "BME280" : "BMP280"" (identifier) "bme280p" (?) "?" (string_literal) ""BME280"" (") """ (string_content) "BME280" (") """ (:) ":" (string_literal) ""BMP280"" (") """ (string_content) "BMP280" (") """ ()) ")" (;) ";" (while_statement) "while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }" ({) "{" (expression_statement) "vTaskDelay(1000 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(1000 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(1000 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "1000 / portTICK_PERIOD_MS" (number_literal) "1000" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (if_statement) "if (!bmp280_force_measurement(&bmp280_dev)) {\n printf("Failed initiating measurement\n");\n break;\n }" (if) "if" (parenthesized_expression) "(!bmp280_force_measurement(&bmp280_dev))" (() "(" (unary_expression) "!bmp280_force_measurement(&bmp280_dev)" (!) "!" (call_expression) "bmp280_force_measurement(&bmp280_dev)" (identifier) "bmp280_force_measurement" (argument_list) "(&bmp280_dev)" (() "(" (pointer_expression) "&bmp280_dev" (&) "&" (identifier) "bmp280_dev" ()) ")" ()) ")" (compound_statement) "{\n printf("Failed initiating measurement\n");\n break;\n }" ({) "{" (expression_statement) "printf("Failed initiating measurement\n");" (call_expression) "printf("Failed initiating measurement\n")" (identifier) "printf" (argument_list) "("Failed initiating measurement\n")" (() "(" (string_literal) ""Failed initiating measurement\n"" (") """ (string_content) "Failed initiating measurement" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (comment) "// wait for measurement to complete" (while_statement) "while (bmp280_is_measuring(&bmp280_dev)) {}" (while) "while" (parenthesized_expression) "(bmp280_is_measuring(&bmp280_dev))" (() "(" (call_expression) "bmp280_is_measuring(&bmp280_dev)" (identifier) "bmp280_is_measuring" (argument_list) "(&bmp280_dev)" (() "(" (pointer_expression) "&bmp280_dev" (&) "&" (identifier) "bmp280_dev" ()) ")" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (if_statement) "if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }" (if) "if" (parenthesized_expression) "(!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity))" (() "(" (unary_expression) "!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)" (!) "!" (call_expression) "bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)" (identifier) "bmp280_read_float" (argument_list) "(&bmp280_dev, &temperature, &pressure, &humidity)" (() "(" (pointer_expression) "&bmp280_dev" (&) "&" (identifier) "bmp280_dev" (,) "," (pointer_expression) "&temperature" (&) "&" (identifier) "temperature" (,) "," (pointer_expression) "&pressure" (&) "&" (identifier) "pressure" (,) "," (pointer_expression) "&humidity" (&) "&" (identifier) "humidity" ()) ")" ()) ")" (compound_statement) "{\n printf("Temperature/pressure reading failed\n");\n break;\n }" ({) "{" (expression_statement) "printf("Temperature/pressure reading failed\n");" (call_expression) "printf("Temperature/pressure reading failed\n")" (identifier) "printf" (argument_list) "("Temperature/pressure reading failed\n")" (() "(" (string_literal) ""Temperature/pressure reading failed\n"" (") """ (string_content) "Temperature/pressure reading failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);" (call_expression) "printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature)" (identifier) "printf" (argument_list) "("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature)" (() "(" (string_literal) ""Pressure: %.2f Pa, Temperature: %.2f C"" (") """ (string_content) "Pressure: %.2f Pa, Temperature: %.2f C" (") """ (,) "," (identifier) "pressure" (,) "," (identifier) "temperature" ()) ")" (;) ";" (if_statement) "if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");" (if) "if" (parenthesized_expression) "(bme280p)" (() "(" (identifier) "bme280p" ()) ")" (expression_statement) "printf(", Humidity: %.2f\n", humidity);" (call_expression) "printf(", Humidity: %.2f\n", humidity)" (identifier) "printf" (argument_list) "(", Humidity: %.2f\n", humidity)" (() "(" (string_literal) "", Humidity: %.2f\n"" (") """ (string_content) ", Humidity: %.2f" (escape_sequence) "\n" (") """ (,) "," (identifier) "humidity" ()) ")" (;) ";" (else_clause) "else\n printf("\n");" (else) "else" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "current_temperature.value = HOMEKIT_FLOAT(temperature);" (assignment_expression) "current_temperature.value = HOMEKIT_FLOAT(temperature)" (field_expression) "current_temperature.value" (identifier) "current_temperature" (.) "." (field_identifier) "value" (=) "=" (call_expression) "HOMEKIT_FLOAT(temperature)" (identifier) "HOMEKIT_FLOAT" (argument_list) "(temperature)" (() "(" (identifier) "temperature" ()) ")" (;) ";" (expression_statement) "current_humidity.value = HOMEKIT_FLOAT(humidity);" (assignment_expression) "current_humidity.value = HOMEKIT_FLOAT(humidity)" (field_expression) "current_humidity.value" (identifier) "current_humidity" (.) "." (field_identifier) "value" (=) "=" (call_expression) "HOMEKIT_FLOAT(humidity)" (identifier) "HOMEKIT_FLOAT" (argument_list) "(humidity)" (() "(" (identifier) "humidity" ()) ")" (;) ";" (expression_statement) "homekit_characteristic_notify(&current_temperature, current_temperature.value);" (call_expression) "homekit_characteristic_notify(&current_temperature, current_temperature.value)" (identifier) "homekit_characteristic_notify" (argument_list) "(&current_temperature, current_temperature.value)" (() "(" (pointer_expression) "&current_temperature" (&) "&" (identifier) "current_temperature" (,) "," (field_expression) "current_temperature.value" (identifier) "current_temperature" (.) "." (field_identifier) "value" ()) ")" (;) ";" (expression_statement) "homekit_characteristic_notify(&current_humidity, current_humidity.value);" (call_expression) "homekit_characteristic_notify(&current_humidity, current_humidity.value)" (identifier) "homekit_characteristic_notify" (argument_list) "(&current_humidity, current_humidity.value)" (() "(" (pointer_expression) "&current_humidity" (&) "&" (identifier) "current_humidity" (,) "," (field_expression) "current_humidity.value" (identifier) "current_humidity" (.) "." (field_identifier) "value" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (preproc_else) "#else\nstatic void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}" (#else) "#else" (function_definition) "static void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "bmp280_task_normal(void *pvParameters)" (identifier) "bmp280_task_normal" (parameter_list) "(void *pvParameters)" (() "(" (parameter_declaration) "void *pvParameters" (primitive_type) "void" (pointer_declarator) "*pvParameters" (*) "*" (identifier) "pvParameters" ()) ")" (compound_statement) "{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}" ({) "{" (declaration) "bmp280_params_t params;" (type_identifier) "bmp280_params_t" (identifier) "params" (;) ";" (declaration) "float pressure, temperature, humidity;" (primitive_type) "float" (identifier) "pressure" (,) "," (identifier) "temperature" (,) "," (identifier) "humidity" (;) ";" (expression_statement) "bmp280_init_default_params(&params);" (call_expression) "bmp280_init_default_params(&params)" (identifier) "bmp280_init_default_params" (argument_list) "(&params)" (() "(" (pointer_expression) "&params" (&) "&" (identifier) "params" ()) ")" (;) ";" (declaration) "bmp280_t bmp280_dev;" (type_identifier) "bmp280_t" (identifier) "bmp280_dev" (;) ";" (expression_statement) "bmp280_dev.i2c_dev.bus = i2c_bus;" (assignment_expression) "bmp280_dev.i2c_dev.bus = i2c_bus" (field_expression) "bmp280_dev.i2c_dev.bus" (field_expression) "bmp280_dev.i2c_dev" (identifier) "bmp280_dev" (.) "." (field_identifier) "i2c_dev" (.) "." (field_identifier) "bus" (=) "=" (identifier) "i2c_bus" (;) ";" (expression_statement) "bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;" (assignment_expression) "bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0" (field_expression) "bmp280_dev.i2c_dev.addr" (field_expression) "bmp280_dev.i2c_dev" (identifier) "bmp280_dev" (.) "." (field_identifier) "i2c_dev" (.) "." (field_identifier) "addr" (=) "=" (identifier) "BMP280_I2C_ADDRESS_0" (;) ";" (while_statement) "while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }" ({) "{" (while_statement) "while (!bmp280_init(&bmp280_dev, &params)) {\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }" (while) "while" (parenthesized_expression) "(!bmp280_init(&bmp280_dev, &params))" (() "(" (unary_expression) "!bmp280_init(&bmp280_dev, &params)" (!) "!" (call_expression) "bmp280_init(&bmp280_dev, &params)" (identifier) "bmp280_init" (argument_list) "(&bmp280_dev, &params)" (() "(" (pointer_expression) "&bmp280_dev" (&) "&" (identifier) "bmp280_dev" (,) "," (pointer_expression) "&params" (&) "&" (identifier) "params" ()) ")" ()) ")" (compound_statement) "{\n printf("BMP280 initialization failed\n");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }" ({) "{" (expression_statement) "printf("BMP280 initialization failed\n");" (call_expression) "printf("BMP280 initialization failed\n")" (identifier) "printf" (argument_list) "("BMP280 initialization failed\n")" (() "(" (string_literal) ""BMP280 initialization failed\n"" (") """ (string_content) "BMP280 initialization failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "vTaskDelay(1000 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(1000 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(1000 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "1000 / portTICK_PERIOD_MS" (number_literal) "1000" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (}) "}" (declaration) "bool bme280p = bmp280_dev.id == BME280_CHIP_ID;" (primitive_type) "bool" (init_declarator) "bme280p = bmp280_dev.id == BME280_CHIP_ID" (identifier) "bme280p" (=) "=" (binary_expression) "bmp280_dev.id == BME280_CHIP_ID" (field_expression) "bmp280_dev.id" (identifier) "bmp280_dev" (.) "." (field_identifier) "id" (==) "==" (identifier) "BME280_CHIP_ID" (;) ";" (expression_statement) "printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280");" (call_expression) "printf("BMP280: found %s\n", bme280p ? "BME280" : "BMP280")" (identifier) "printf" (argument_list) "("BMP280: found %s\n", bme280p ? "BME280" : "BMP280")" (() "(" (string_literal) ""BMP280: found %s\n"" (") """ (string_content) "BMP280: found %s" (escape_sequence) "\n" (") """ (,) "," (conditional_expression) "bme280p ? "BME280" : "BMP280"" (identifier) "bme280p" (?) "?" (string_literal) ""BME280"" (") """ (string_content) "BME280" (") """ (:) ":" (string_literal) ""BMP280"" (") """ (string_content) "BMP280" (") """ ()) ")" (;) ";" (while_statement) "while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }\n printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);\n if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }" ({) "{" (expression_statement) "vTaskDelay(1000 / portTICK_PERIOD_MS);" (call_expression) "vTaskDelay(1000 / portTICK_PERIOD_MS)" (identifier) "vTaskDelay" (argument_list) "(1000 / portTICK_PERIOD_MS)" (() "(" (binary_expression) "1000 / portTICK_PERIOD_MS" (number_literal) "1000" (/) "/" (identifier) "portTICK_PERIOD_MS" ()) ")" (;) ";" (if_statement) "if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf("Temperature/pressure reading failed\n");\n break;\n }" (if) "if" (parenthesized_expression) "(!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity))" (() "(" (unary_expression) "!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)" (!) "!" (call_expression) "bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)" (identifier) "bmp280_read_float" (argument_list) "(&bmp280_dev, &temperature, &pressure, &humidity)" (() "(" (pointer_expression) "&bmp280_dev" (&) "&" (identifier) "bmp280_dev" (,) "," (pointer_expression) "&temperature" (&) "&" (identifier) "temperature" (,) "," (pointer_expression) "&pressure" (&) "&" (identifier) "pressure" (,) "," (pointer_expression) "&humidity" (&) "&" (identifier) "humidity" ()) ")" ()) ")" (compound_statement) "{\n printf("Temperature/pressure reading failed\n");\n break;\n }" ({) "{" (expression_statement) "printf("Temperature/pressure reading failed\n");" (call_expression) "printf("Temperature/pressure reading failed\n")" (identifier) "printf" (argument_list) "("Temperature/pressure reading failed\n")" (() "(" (string_literal) ""Temperature/pressure reading failed\n"" (") """ (string_content) "Temperature/pressure reading failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature);" (call_expression) "printf("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature)" (identifier) "printf" (argument_list) "("Pressure: %.2f Pa, Temperature: %.2f C", pressure, temperature)" (() "(" (string_literal) ""Pressure: %.2f Pa, Temperature: %.2f C"" (") """ (string_content) "Pressure: %.2f Pa, Temperature: %.2f C" (") """ (,) "," (identifier) "pressure" (,) "," (identifier) "temperature" ()) ")" (;) ";" (if_statement) "if (bme280p)\n printf(", Humidity: %.2f\n", humidity);\n else\n printf("\n");" (if) "if" (parenthesized_expression) "(bme280p)" (() "(" (identifier) "bme280p" ()) ")" (expression_statement) "printf(", Humidity: %.2f\n", humidity);" (call_expression) "printf(", Humidity: %.2f\n", humidity)" (identifier) "printf" (argument_list) "(", Humidity: %.2f\n", humidity)" (() "(" (string_literal) "", Humidity: %.2f\n"" (") """ (string_content) ", Humidity: %.2f" (escape_sequence) "\n" (") """ (,) "," (identifier) "humidity" ()) ")" (;) ";" (else_clause) "else\n printf("\n");" (else) "else" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "current_temperature.value = HOMEKIT_FLOAT(temperature);" (assignment_expression) "current_temperature.value = HOMEKIT_FLOAT(temperature)" (field_expression) "current_temperature.value" (identifier) "current_temperature" (.) "." (field_identifier) "value" (=) "=" (call_expression) "HOMEKIT_FLOAT(temperature)" (identifier) "HOMEKIT_FLOAT" (argument_list) "(temperature)" (() "(" (identifier) "temperature" ()) ")" (;) ";" (expression_statement) "current_humidity.value = HOMEKIT_FLOAT(humidity);" (assignment_expression) "current_humidity.value = HOMEKIT_FLOAT(humidity)" (field_expression) "current_humidity.value" (identifier) "current_humidity" (.) "." (field_identifier) "value" (=) "=" (call_expression) "HOMEKIT_FLOAT(humidity)" (identifier) "HOMEKIT_FLOAT" (argument_list) "(humidity)" (() "(" (identifier) "humidity" ()) ")" (;) ";" (expression_statement) "homekit_characteristic_notify(&current_temperature, current_temperature.value);" (call_expression) "homekit_characteristic_notify(&current_temperature, current_temperature.value)" (identifier) "homekit_characteristic_notify" (argument_list) "(&current_temperature, current_temperature.value)" (() "(" (pointer_expression) "&current_temperature" (&) "&" (identifier) "current_temperature" (,) "," (field_expression) "current_temperature.value" (identifier) "current_temperature" (.) "." (field_identifier) "value" ()) ")" (;) ";" (expression_statement) "homekit_characteristic_notify(&current_humidity, current_humidity.value);" (call_expression) "homekit_characteristic_notify(&current_humidity, current_humidity.value)" (identifier) "homekit_characteristic_notify" (argument_list) "(&current_humidity, current_humidity.value)" (() "(" (pointer_expression) "&current_humidity" (&) "&" (identifier) "current_humidity" (,) "," (field_expression) "current_humidity.value" (identifier) "current_humidity" (.) "." (field_identifier) "value" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (#endif) "#endif" (function_definition) "void temperature_sensor_init() {\n\n i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);\n\n#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL);\n#endif\n\n gpio_enable(LED_GPIO, GPIO_OUTPUT);\n led_write(false);\n\n}" (primitive_type) "void" (function_declarator) "temperature_sensor_init()" (identifier) "temperature_sensor_init" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n\n i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);\n\n#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL);\n#endif\n\n gpio_enable(LED_GPIO, GPIO_OUTPUT);\n led_write(false);\n\n}" ({) "{" (expression_statement) "i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);" (call_expression) "i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K)" (identifier) "i2c_init" (argument_list) "(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K)" (() "(" (identifier) "i2c_bus" (,) "," (identifier) "scl_pin" (,) "," (identifier) "sda_pin" (,) "," (identifier) "I2C_FREQ_400K" ()) ")" (;) ";" (preproc_ifdef) "#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL);\n#endif" (#ifdef) "#ifdef" (identifier) "MODE_FORCED" (expression_statement) "xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL);" (call_expression) "xTaskCreate(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL)" (identifier) "xTaskCreate" (argument_list) "(bmp280_task_forced, "bmp280_task", 256, NULL, 2, NULL)" (() "(" (identifier) "bmp280_task_forced" (,) "," (string_literal) ""bmp280_task"" (") """ (string_content) "bmp280_task" (") """ (,) "," (number_literal) "256" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "2" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (preproc_else) "#else\n xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL);" (#else) "#else" (expression_statement) "xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL);" (call_expression) "xTaskCreate(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL)" (identifier) "xTaskCreate" (argument_list) "(bmp280_task_normal, "bmp280_task", 256, NULL, 2, NULL)" (() "(" (identifier) "bmp280_task_normal" (,) "," (string_literal) ""bmp280_task"" (") """ (string_content) "bmp280_task" (") """ (,) "," (number_literal) "256" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "2" (,) "," (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (#endif) "#endif" (expression_statement) "gpio_enable(LED_GPIO, GPIO_OUTPUT);" (call_expression) "gpio_enable(LED_GPIO, GPIO_OUTPUT)" (identifier) "gpio_enable" (argument_list) "(LED_GPIO, GPIO_OUTPUT)" (() "(" (identifier) "LED_GPIO" (,) "," (identifier) "GPIO_OUTPUT" ()) ")" (;) ";" (expression_statement) "led_write(false);" (call_expression) "led_write(false)" (identifier) "led_write" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (;) ";" (}) "}" (declaration) "homekit_accessory_t *accessories[] = {\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n};" (type_identifier) "homekit_accessory_t" (init_declarator) "*accessories[] = {\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n}" (pointer_declarator) "*accessories[]" (*) "*" (array_declarator) "accessories[]" (identifier) "accessories" ([) "[" (]) "]" (=) "=" (initializer_list) "{\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n}" ({) "{" (assignment_expression) "HOMEKIT_ACCESSORY(.id=1" (field_expression) "HOMEKIT_ACCESSORY(.id" (identifier) "HOMEKIT_ACCESSORY" (ERROR) "(" (() "(" (.) "." (field_identifier) "id" (=) "=" (number_literal) "1" (,) "," (initializer_pair) ".category=homekit_accessory_category_thermostat" (field_designator) ".category" (.) "." (field_identifier) "category" (=) "=" (identifier) "homekit_accessory_category_thermostat" (,) "," (initializer_pair) ".services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }" (field_designator) ".services" (.) "." (field_identifier) "services" (=) "=" (compound_literal_expression) "(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }" (() "(" (type_descriptor) "homekit_service_t*[]" (type_identifier) "homekit_service_t" (abstract_pointer_declarator) "*[]" (*) "*" (abstract_array_declarator) "[]" ([) "[" (]) "]" ()) ")" (initializer_list) "{\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }),\n NULL\n }" ({) "{" (call_expression) "HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n })" (identifier) "HOMEKIT_SERVICE" (argument_list) "(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n })" (() "(" (assignment_expression) "ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }" (field_expression) "ACCESSORY_INFORMATION, .characteristics" (identifier) "ACCESSORY_INFORMATION" (ERROR) "," (,) "," (.) "." (field_identifier) "characteristics" (=) "=" (compound_literal_expression) "(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }" (() "(" (type_descriptor) "homekit_characteristic_t*[]" (type_identifier) "homekit_characteristic_t" (abstract_pointer_declarator) "*[]" (*) "*" (abstract_array_declarator) "[]" ([) "[" (]) "]" ()) ")" (initializer_list) "{\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai"),\n HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }" ({) "{" (call_expression) "HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(NAME, "Temperature Sensor")" (() "(" (identifier) "NAME" (,) "," (string_literal) ""Temperature Sensor"" (") """ (string_content) "Temperature Sensor" (") """ ()) ")" (,) "," (call_expression) "HOMEKIT_CHARACTERISTIC(MANUFACTURER, "Alex_Khmelenko")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(MANUFACTURER, "Alex_Khmelenko")" (() "(" (identifier) "MANUFACTURER" (,) "," (string_literal) ""Alex_Khmelenko"" (") """ (string_content) "Alex_Khmelenko" (") """ ()) ")" (,) "," (call_expression) "HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, "Sprut.Ai")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(SERIAL_NUMBER, "Sprut.Ai")" (() "(" (identifier) "SERIAL_NUMBER" (,) "," (string_literal) ""Sprut.Ai"" (") """ (string_content) "Sprut.Ai" (") """ ()) ")" (,) "," (call_expression) "HOMEKIT_CHARACTERISTIC(MODEL, "BMP280/BME280")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(MODEL, "BMP280/BME280")" (() "(" (identifier) "MODEL" (,) "," (string_literal) ""BMP280/BME280"" (") """ (string_content) "BMP280/BME280" (") """ ()) ")" (,) "," (call_expression) "HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, "v0.1")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(FIRMWARE_REVISION, "v0.1")" (() "(" (identifier) "FIRMWARE_REVISION" (,) "," (string_literal) ""v0.1"" (") """ (string_content) "v0.1" (") """ ()) ")" (,) "," (call_expression) "HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify)" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(IDENTIFY, temperature_sensor_identify)" (() "(" (identifier) "IDENTIFY" (,) "," (identifier) "temperature_sensor_identify" ()) ")" (,) "," (null) "NULL" (NULL) "NULL" (}) "}" ()) ")" (,) "," (call_expression) "HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n })" (identifier) "HOMEKIT_SERVICE" (argument_list) "(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n })" (() "(" (assignment_expression) "TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }" (field_expression) "TEMPERATURE_SENSOR, .primary=true, .characteristics" (assignment_expression) "TEMPERATURE_SENSOR, .primary=true" (field_expression) "TEMPERATURE_SENSOR, .primary" (identifier) "TEMPERATURE_SENSOR" (ERROR) "," (,) "," (.) "." (field_identifier) "primary" (=) "=" (true) "true" (ERROR) "," (,) "," (.) "." (field_identifier) "characteristics" (=) "=" (compound_literal_expression) "(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }" (() "(" (type_descriptor) "homekit_characteristic_t*[]" (type_identifier) "homekit_characteristic_t" (abstract_pointer_declarator) "*[]" (*) "*" (abstract_array_declarator) "[]" ([) "[" (]) "]" ()) ")" (initializer_list) "{\n HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor"),\n &current_temperature,\n NULL\n }" ({) "{" (call_expression) "HOMEKIT_CHARACTERISTIC(NAME, "Temperature Sensor")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(NAME, "Temperature Sensor")" (() "(" (identifier) "NAME" (,) "," (string_literal) ""Temperature Sensor"" (") """ (string_content) "Temperature Sensor" (") """ ()) ")" (,) "," (pointer_expression) "&current_temperature" (&) "&" (identifier) "current_temperature" (,) "," (null) "NULL" (NULL) "NULL" (}) "}" ()) ")" (,) "," (call_expression) "HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n })" (identifier) "HOMEKIT_SERVICE" (argument_list) "(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n })" (() "(" (assignment_expression) "HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }" (field_expression) "HUMIDITY_SENSOR, .characteristics" (identifier) "HUMIDITY_SENSOR" (ERROR) "," (,) "," (.) "." (field_identifier) "characteristics" (=) "=" (compound_literal_expression) "(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }" (() "(" (type_descriptor) "homekit_characteristic_t*[]" (type_identifier) "homekit_characteristic_t" (abstract_pointer_declarator) "*[]" (*) "*" (abstract_array_declarator) "[]" ([) "[" (]) "]" ()) ")" (initializer_list) "{\n HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor"),\n &current_humidity,\n NULL\n }" ({) "{" (call_expression) "HOMEKIT_CHARACTERISTIC(NAME, "Humidity Sensor")" (identifier) "HOMEKIT_CHARACTERISTIC" (argument_list) "(NAME, "Humidity Sensor")" (() "(" (identifier) "NAME" (,) "," (string_literal) ""Humidity Sensor"" (") """ (string_content) "Humidity Sensor" (") """ ()) ")" (,) "," (pointer_expression) "&current_humidity" (&) "&" (identifier) "current_humidity" (,) "," (null) "NULL" (NULL) "NULL" (}) "}" ()) ")" (,) "," (null) "NULL" (NULL) "NULL" (}) "}" (ERROR) ")" ()) ")" (,) "," (null) "NULL" (NULL) "NULL" (}) "}" (;) ";" (declaration) "homekit_server_config_t config = {\n .accessories = accessories,\n .password = "<PASSWORD>"\n};" (type_identifier) "homekit_server_config_t" (init_declarator) "config = {\n .accessories = accessories,\n .password = "<PASSWORD>"\n}" (identifier) "config" (=) "=" (initializer_list) "{\n .accessories = accessories,\n .password = "<PASSWORD>"\n}" ({) "{" (initializer_pair) ".accessories = accessories" (field_designator) ".accessories" (.) "." (field_identifier) "accessories" (=) "=" (identifier) "accessories" (,) "," (initializer_pair) ".password = "<PASSWORD>"" (field_designator) ".password" (.) "." (field_identifier) "password" (=) "=" (string_literal) ""<PASSWORD>"" (") """ (string_content) "<PASSWORD>" (") """ (}) "}" (;) ";" (function_definition) "void on_wifi_ready() {\n homekit_server_init(&config);\n}" (primitive_type) "void" (function_declarator) "on_wifi_ready()" (identifier) "on_wifi_ready" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n homekit_server_init(&config);\n}" ({) "{" (expression_statement) "homekit_server_init(&config);" (call_expression) "homekit_server_init(&config)" (identifier) "homekit_server_init" (argument_list) "(&config)" (() "(" (pointer_expression) "&config" (&) "&" (identifier) "config" ()) ")" (;) ";" (}) "}" (function_definition) "void user_init(void) {\n uart_set_baud(0, 115200);\n\n\n\n uint8_t macaddr[6];\n sdk_wifi_get_macaddr(STATION_IF, macaddr);\n int name_len = snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);\n char *name_value = malloc(name_len + 1);\n snprintf(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);\n name.value = HOMEKIT_STRING(name_value);\n\n wifi_config_init("Temperature Sensor", NULL, on_wifi_ready);\n\n temperature_sensor_init();\n}" (primitive_type) "void" (function_declarator) "user_init(void)" (identifier) "user_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n uart_set_baud(0, 115200);\n\n\n\n uint8_t macaddr[6];\n sdk_wifi_get_macaddr(STATION_IF, macaddr);\n int name_len = snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);\n char *name_value = malloc(name_len + 1);\n snprintf(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);\n name.value = HOMEKIT_STRING(name_value);\n\n wifi_config_init("Temperature Sensor", NULL, on_wifi_ready);\n\n temperature_sensor_init();\n}" ({) "{" (expression_statement) "uart_set_baud(0, 115200);" (call_expression) "uart_set_baud(0, 115200)" (identifier) "uart_set_baud" (argument_list) "(0, 115200)" (() "(" (number_literal) "0" (,) "," (number_literal) "115200" ()) ")" (;) ";" (declaration) "uint8_t macaddr[6];" (primitive_type) "uint8_t" (array_declarator) "macaddr[6]" (identifier) "macaddr" ([) "[" (number_literal) "6" (]) "]" (;) ";" (expression_statement) "sdk_wifi_get_macaddr(STATION_IF, macaddr);" (call_expression) "sdk_wifi_get_macaddr(STATION_IF, macaddr)" (identifier) "sdk_wifi_get_macaddr" (argument_list) "(STATION_IF, macaddr)" (() "(" (identifier) "STATION_IF" (,) "," (identifier) "macaddr" ()) ")" (;) ";" (declaration) "int name_len = snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);" (primitive_type) "int" (init_declarator) "name_len = snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3])" (identifier) "name_len" (=) "=" (call_expression) "snprintf(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3])" (identifier) "snprintf" (argument_list) "(NULL, 0, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3])" (() "(" (null) "NULL" (NULL) "NULL" (,) "," (number_literal) "0" (,) "," (string_literal) ""Temperature Sensor-%02X%02X%02X"" (") """ (string_content) "Temperature Sensor-%02X%02X%02X" (") """ (,) "," (subscript_expression) "macaddr[1]" (identifier) "macaddr" ([) "[" (number_literal) "1" (]) "]" (,) "," (subscript_expression) "macaddr[2]" (identifier) "macaddr" ([) "[" (number_literal) "2" (]) "]" (,) "," (subscript_expression) "macaddr[3]" (identifier) "macaddr" ([) "[" (number_literal) "3" (]) "]" ()) ")" (;) ";" (declaration) "char *name_value = malloc(name_len + 1);" (primitive_type) "char" (init_declarator) "*name_value = malloc(name_len + 1)" (pointer_declarator) "*name_value" (*) "*" (identifier) "name_value" (=) "=" (call_expression) "malloc(name_len + 1)" (identifier) "malloc" (argument_list) "(name_len + 1)" (() "(" (binary_expression) "name_len + 1" (identifier) "name_len" (+) "+" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "snprintf(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3]);" (call_expression) "snprintf(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3])" (identifier) "snprintf" (argument_list) "(name_value, name_len + 1, "Temperature Sensor-%02X%02X%02X", macaddr[1], macaddr[2], macaddr[3])" (() "(" (identifier) "name_value" (,) "," (binary_expression) "name_len + 1" (identifier) "name_len" (+) "+" (number_literal) "1" (,) "," (string_literal) ""Temperature Sensor-%02X%02X%02X"" (") """ (string_content) "Temperature Sensor-%02X%02X%02X" (") """ (,) "," (subscript_expression) "macaddr[1]" (identifier) "macaddr" ([) "[" (number_literal) "1" (]) "]" (,) "," (subscript_expression) "macaddr[2]" (identifier) "macaddr" ([) "[" (number_literal) "2" (]) "]" (,) "," (subscript_expression) "macaddr[3]" (identifier) "macaddr" ([) "[" (number_literal) "3" (]) "]" ()) ")" (;) ";" (expression_statement) "name.value = HOMEKIT_STRING(name_value);" (assignment_expression) "name.value = HOMEKIT_STRING(name_value)" (field_expression) "name.value" (identifier) "name" (.) "." (field_identifier) "value" (=) "=" (call_expression) "HOMEKIT_STRING(name_value)" (identifier) "HOMEKIT_STRING" (argument_list) "(name_value)" (() "(" (identifier) "name_value" ()) ")" (;) ";" (expression_statement) "wifi_config_init("Temperature Sensor", NULL, on_wifi_ready);" (call_expression) "wifi_config_init("Temperature Sensor", NULL, on_wifi_ready)" (identifier) "wifi_config_init" (argument_list) "("Temperature Sensor", NULL, on_wifi_ready)" (() "(" (string_literal) ""Temperature Sensor"" (") """ (string_content) "Temperature Sensor" (") """ (,) "," (null) "NULL" (NULL) "NULL" (,) "," (identifier) "on_wifi_ready" ()) ")" (;) ";" (expression_statement) "temperature_sensor_init();" (call_expression) "temperature_sensor_init()" (identifier) "temperature_sensor_init" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}"
1,610
6
{"language": "c", "success": true, "metadata": {"lines": 176, "avg_line_length": 37.28, "nodes": 896, "errors": 0, "source_hash": "256b068ba818904f54e38eaed99fff924921d207926b3b02ab07dea61b69c067", "categorized_nodes": 624}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <espressif/esp_wifi.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": "<espressif/esp_wifi.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include <espressif/esp_sta.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": "<espressif/esp_sta.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 30}}, {"id": 9, "type": "preproc_include", "text": "#include <esp/uart.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<esp/uart.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"id": 12, "type": "preproc_include", "text": "#include <esp8266.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<esp8266.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 20}}, {"id": 15, "type": "preproc_include", "text": "#include <FreeRTOS.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<FreeRTOS.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 21}}, {"id": 18, "type": "preproc_include", "text": "#include <task.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<task.h>", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include <homekit/homekit.h>\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": "<homekit/homekit.h>", "parent": 21, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 28}}, {"id": 24, "type": "preproc_include", "text": "#include <homekit/characteristics.h>\n", "parent": null, "children": [25, 26], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<homekit/characteristics.h>", "parent": 24, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 36}}, {"id": 27, "type": "preproc_include", "text": "#include <wifi_config.h>\n", "parent": null, "children": [28, 29], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<wifi_config.h>", "parent": 27, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 24}}, {"id": 30, "type": "preproc_include", "text": "#include \"i2c/i2c.h\"\n", "parent": null, "children": [31, 32], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"i2c/i2c.h\"", "parent": 30, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 20}}, {"id": 33, "type": "preproc_include", "text": "#include \"bmp280/bmp280.h\"\n", "parent": null, "children": [34, 35], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"bmp280/bmp280.h\"", "parent": 33, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 26}}, {"id": 36, "type": "preproc_def", "text": "#define LED_GPIO 2\n", "parent": null, "children": [37, 38, 39], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 38, "type": "identifier", "text": "LED_GPIO", "parent": 36, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 16}}, {"id": 39, "type": "preproc_arg", "text": "2", "parent": 36, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 18}}, {"id": 40, "type": "declaration", "text": "const uint8_t i2c_bus = 0;", "parent": null, "children": [41, 42], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 26}}, {"id": 41, "type": "primitive_type", "text": "uint8_t", "parent": 40, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 13}}, {"id": 42, "type": "init_declarator", "text": "i2c_bus = 0", "parent": 40, "children": [43, 44, 45], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 25}}, {"id": 43, "type": "identifier", "text": "i2c_bus", "parent": 42, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 21}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 23}}, {"id": 45, "type": "number_literal", "text": "0", "parent": 42, "children": [], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 25}}, {"id": 46, "type": "declaration", "text": "const uint8_t scl_pin = 0;", "parent": null, "children": [47, 48], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 26}}, {"id": 47, "type": "primitive_type", "text": "uint8_t", "parent": 46, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 13}}, {"id": 48, "type": "init_declarator", "text": "scl_pin = 0", "parent": 46, "children": [49, 50, 51], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 25}}, {"id": 49, "type": "identifier", "text": "scl_pin", "parent": 48, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 21}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 23}}, {"id": 51, "type": "number_literal", "text": "0", "parent": 48, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 25}}, {"id": 52, "type": "declaration", "text": "const uint8_t sda_pin = 4;", "parent": null, "children": [53, 54], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 26}}, {"id": 53, "type": "primitive_type", "text": "uint8_t", "parent": 52, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 13}}, {"id": 54, "type": "init_declarator", "text": "sda_pin = 4", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 25}}, {"id": 55, "type": "identifier", "text": "sda_pin", "parent": 54, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 21}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 23}}, {"id": 57, "type": "number_literal", "text": "4", "parent": 54, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 58, "type": "function_definition", "text": "void led_write(bool on)\n{\n gpio_write(LED_GPIO, on ? 0 : 1);\n}", "parent": null, "children": [59, 60], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 60, "type": "function_declarator", "text": "led_write(bool on)", "parent": 58, "children": [61, 62], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 23}}, {"id": 61, "type": "identifier", "text": "led_write", "parent": 60, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 14}}, {"id": 62, "type": "parameter_list", "text": "(bool on)", "parent": 60, "children": [63], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 23}}, {"id": 63, "type": "parameter_declaration", "text": "bool on", "parent": 62, "children": [64, 65], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 22}}, {"id": 64, "type": "primitive_type", "text": "bool", "parent": 63, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 19}}, {"id": 65, "type": "identifier", "text": "on", "parent": 63, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 22}}, {"id": 66, "type": "call_expression", "text": "gpio_write(LED_GPIO, on ? 0 : 1)", "parent": 58, "children": [67, 68], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 36}}, {"id": 67, "type": "identifier", "text": "gpio_write", "parent": 66, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 14}}, {"id": 68, "type": "argument_list", "text": "(LED_GPIO, on ? 0 : 1)", "parent": 66, "children": [69, 70], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 36}}, {"id": 69, "type": "identifier", "text": "LED_GPIO", "parent": 68, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 23}}, {"id": 70, "type": "conditional_expression", "text": "on ? 0 : 1", "parent": 68, "children": [71, 72, 73, 74], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 35}}, {"id": 71, "type": "identifier", "text": "on", "parent": 70, "children": [], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 27}}, {"id": 72, "type": "?", "text": "?", "parent": 70, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 29}}, {"id": 73, "type": "number_literal", "text": "0", "parent": 70, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 31}}, {"id": 74, "type": "number_literal", "text": "1", "parent": 70, "children": [], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 35}}, {"id": 75, "type": "function_definition", "text": "void identify_task(void *_args) {\n\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }\n\n led_write(false);\n\n vTaskDelete(NULL);\n}", "parent": null, "children": [76, 77], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 4}}, {"id": 77, "type": "function_declarator", "text": "identify_task(void *_args)", "parent": 75, "children": [78, 79], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 31}}, {"id": 78, "type": "identifier", "text": "identify_task", "parent": 77, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 18}}, {"id": 79, "type": "parameter_list", "text": "(void *_args)", "parent": 77, "children": [80], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 31}}, {"id": 80, "type": "parameter_declaration", "text": "void *_args", "parent": 79, "children": [81, 82], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 30}}, {"id": 81, "type": "primitive_type", "text": "void", "parent": 80, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 23}}, {"id": 82, "type": "pointer_declarator", "text": "*_args", "parent": 80, "children": [83, 84], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 30}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 25}}, {"id": 84, "type": "identifier", "text": "_args", "parent": 82, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 30}}, {"id": 85, "type": "for_statement", "text": "for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }", "parent": 75, "children": [86, 92, 96], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 39, "column": 5}}, {"id": 86, "type": "declaration", "text": "int i=0;", "parent": 85, "children": [87, 88], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 17}}, {"id": 87, "type": "primitive_type", "text": "int", "parent": 86, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 12}}, {"id": 88, "type": "init_declarator", "text": "i=0", "parent": 86, "children": [89, 90, 91], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 16}}, {"id": 89, "type": "identifier", "text": "i", "parent": 88, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 14}}, {"id": 90, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 15}}, {"id": 91, "type": "number_literal", "text": "0", "parent": 88, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 16}}, {"id": 92, "type": "binary_expression", "text": "i<3", "parent": 85, "children": [93, 94, 95], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 21}}, {"id": 93, "type": "identifier", "text": "i", "parent": 92, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 19}}, {"id": 94, "type": "<", "text": "<", "parent": 92, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 95, "type": "number_literal", "text": "3", "parent": 92, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 21}}, {"id": 96, "type": "update_expression", "text": "i++", "parent": 85, "children": [97, 98], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 26}}, {"id": 97, "type": "identifier", "text": "i", "parent": 96, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 24}}, {"id": 98, "type": "++", "text": "++", "parent": 96, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 26}}, {"id": 99, "type": "for_statement", "text": "for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }", "parent": 85, "children": [100, 106, 110], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 36, "column": 9}}, {"id": 100, "type": "declaration", "text": "int j=0;", "parent": 99, "children": [101, 102], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 21}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 16}}, {"id": 102, "type": "init_declarator", "text": "j=0", "parent": 100, "children": [103, 104, 105], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 20}}, {"id": 103, "type": "identifier", "text": "j", "parent": 102, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 102, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 106, "type": "binary_expression", "text": "j<3", "parent": 99, "children": [107, 108, 109], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 25}}, {"id": 107, "type": "identifier", "text": "j", "parent": 106, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 23}}, {"id": 108, "type": "<", "text": "<", "parent": 106, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 24}}, {"id": 109, "type": "number_literal", "text": "3", "parent": 106, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 25}}, {"id": 110, "type": "update_expression", "text": "j++", "parent": 99, "children": [111, 112], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 30}}, {"id": 111, "type": "identifier", "text": "j", "parent": 110, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 28}}, {"id": 112, "type": "++", "text": "++", "parent": 110, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 113, "type": "call_expression", "text": "led_write(true)", "parent": 99, "children": [114, 115], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 27}}, {"id": 114, "type": "identifier", "text": "led_write", "parent": 113, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 21}}, {"id": 115, "type": "argument_list", "text": "(true)", "parent": 113, "children": [116], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 27}}, {"id": 116, "type": "true", "text": "true", "parent": 115, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 26}}, {"id": 117, "type": "call_expression", "text": "vTaskDelay(150 / portTICK_PERIOD_MS)", "parent": 99, "children": [118, 119], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 48}}, {"id": 118, "type": "identifier", "text": "vTaskDelay", "parent": 117, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 22}}, {"id": 119, "type": "argument_list", "text": "(150 / portTICK_PERIOD_MS)", "parent": 117, "children": [120], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 48}}, {"id": 120, "type": "binary_expression", "text": "150 / portTICK_PERIOD_MS", "parent": 119, "children": [121, 122, 123], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 47}}, {"id": 121, "type": "number_literal", "text": "150", "parent": 120, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 26}}, {"id": 122, "type": "/", "text": "/", "parent": 120, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 28}}, {"id": 123, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 120, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 47}}, {"id": 124, "type": "call_expression", "text": "led_write(false)", "parent": 99, "children": [125, 126], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 28}}, {"id": 125, "type": "identifier", "text": "led_write", "parent": 124, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 21}}, {"id": 126, "type": "argument_list", "text": "(false)", "parent": 124, "children": [127], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 28}}, {"id": 127, "type": "false", "text": "false", "parent": 126, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 27}}, {"id": 128, "type": "call_expression", "text": "vTaskDelay(150 / portTICK_PERIOD_MS)", "parent": 99, "children": [129, 130], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 48}}, {"id": 129, "type": "identifier", "text": "vTaskDelay", "parent": 128, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 22}}, {"id": 130, "type": "argument_list", "text": "(150 / portTICK_PERIOD_MS)", "parent": 128, "children": [131], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 48}}, {"id": 131, "type": "binary_expression", "text": "150 / portTICK_PERIOD_MS", "parent": 130, "children": [132, 133, 134], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 47}}, {"id": 132, "type": "number_literal", "text": "150", "parent": 131, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 26}}, {"id": 133, "type": "/", "text": "/", "parent": 131, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 28}}, {"id": 134, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 131, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 47}}, {"id": 135, "type": "call_expression", "text": "vTaskDelay(250 / portTICK_PERIOD_MS)", "parent": 85, "children": [136, 137], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 44}}, {"id": 136, "type": "identifier", "text": "vTaskDelay", "parent": 135, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 18}}, {"id": 137, "type": "argument_list", "text": "(250 / portTICK_PERIOD_MS)", "parent": 135, "children": [138], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 44}}, {"id": 138, "type": "binary_expression", "text": "250 / portTICK_PERIOD_MS", "parent": 137, "children": [139, 140, 141], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 43}}, {"id": 139, "type": "number_literal", "text": "250", "parent": 138, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 22}}, {"id": 140, "type": "/", "text": "/", "parent": 138, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 24}}, {"id": 141, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 138, "children": [], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 43}}, {"id": 142, "type": "call_expression", "text": "led_write(false)", "parent": 75, "children": [143, 144], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 20}}, {"id": 143, "type": "identifier", "text": "led_write", "parent": 142, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 13}}, {"id": 144, "type": "argument_list", "text": "(false)", "parent": 142, "children": [145], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 20}}, {"id": 145, "type": "false", "text": "false", "parent": 144, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 19}}, {"id": 146, "type": "call_expression", "text": "vTaskDelete(NULL)", "parent": 75, "children": [147, 148], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 21}}, {"id": 147, "type": "identifier", "text": "vTaskDelete", "parent": 146, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 15}}, {"id": 148, "type": "argument_list", "text": "(NULL)", "parent": 146, "children": [149], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 21}}, {"id": 149, "type": "null", "text": "NULL", "parent": 148, "children": [150], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 20}}, {"id": 150, "type": "NULL", "text": "NULL", "parent": 149, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 20}}, {"id": 151, "type": "function_definition", "text": "void temperature_sensor_identify(homekit_value_t _value) {\n printf(\"Temperature sensor identify\\n\");\n\n xTaskCreate(identify_task, \"identify_task\", 128, NULL, 2, NULL);\n\n}", "parent": null, "children": [152, 153], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 4}}, {"id": 153, "type": "function_declarator", "text": "temperature_sensor_identify(homekit_value_t _value)", "parent": 151, "children": [154, 155], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 56}}, {"id": 154, "type": "identifier", "text": "temperature_sensor_identify", "parent": 153, "children": [], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 32}}, {"id": 155, "type": "parameter_list", "text": "(homekit_value_t _value)", "parent": 153, "children": [156], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 56}}, {"id": 156, "type": "parameter_declaration", "text": "homekit_value_t _value", "parent": 155, "children": [157, 158], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 55}}, {"id": 157, "type": "type_identifier", "text": "homekit_value_t", "parent": 156, "children": [], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 48}}, {"id": 158, "type": "identifier", "text": "_value", "parent": 156, "children": [], "start_point": {"row": 46, "column": 49}, "end_point": {"row": 46, "column": 55}}, {"id": 159, "type": "call_expression", "text": "printf(\"Temperature sensor identify\\n\")", "parent": 151, "children": [160, 161], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 43}}, {"id": 160, "type": "identifier", "text": "printf", "parent": 159, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 10}}, {"id": 161, "type": "argument_list", "text": "(\"Temperature sensor identify\\n\")", "parent": 159, "children": [162], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 43}}, {"id": 162, "type": "string_literal", "text": "\"Temperature sensor identify\\n\"", "parent": 161, "children": [163], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 42}}, {"id": 163, "type": "escape_sequence", "text": "\\n", "parent": 162, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 41}}, {"id": 164, "type": "call_expression", "text": "xTaskCreate(identify_task, \"identify_task\", 128, NULL, 2, NULL)", "parent": 151, "children": [165, 166], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 67}}, {"id": 165, "type": "identifier", "text": "xTaskCreate", "parent": 164, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 15}}, {"id": 166, "type": "argument_list", "text": "(identify_task, \"identify_task\", 128, NULL, 2, NULL)", "parent": 164, "children": [167, 168, 169, 170, 172, 173], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 67}}, {"id": 167, "type": "identifier", "text": "identify_task", "parent": 166, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 29}}, {"id": 168, "type": "string_literal", "text": "\"identify_task\"", "parent": 166, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 46}}, {"id": 169, "type": "number_literal", "text": "128", "parent": 166, "children": [], "start_point": {"row": 49, "column": 48}, "end_point": {"row": 49, "column": 51}}, {"id": 170, "type": "null", "text": "NULL", "parent": 166, "children": [171], "start_point": {"row": 49, "column": 53}, "end_point": {"row": 49, "column": 57}}, {"id": 171, "type": "NULL", "text": "NULL", "parent": 170, "children": [], "start_point": {"row": 49, "column": 53}, "end_point": {"row": 49, "column": 57}}, {"id": 172, "type": "number_literal", "text": "2", "parent": 166, "children": [], "start_point": {"row": 49, "column": 59}, "end_point": {"row": 49, "column": 60}}, {"id": 173, "type": "null", "text": "NULL", "parent": 166, "children": [174], "start_point": {"row": 49, "column": 62}, "end_point": {"row": 49, "column": 66}}, {"id": 174, "type": "NULL", "text": "NULL", "parent": 173, "children": [], "start_point": {"row": 49, "column": 62}, "end_point": {"row": 49, "column": 66}}, {"id": 175, "type": "declaration", "text": "homekit_characteristic_t name = HOMEKIT_CHARACTERISTIC_(NAME, \"Temperature\");", "parent": null, "children": [176, 177], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 77}}, {"id": 176, "type": "type_identifier", "text": "homekit_characteristic_t", "parent": 175, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 24}}, {"id": 177, "type": "init_declarator", "text": "name = HOMEKIT_CHARACTERISTIC_(NAME, \"Temperature\")", "parent": 175, "children": [178, 179, 180], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 76}}, {"id": 178, "type": "identifier", "text": "name", "parent": 177, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 29}}, {"id": 179, "type": "=", "text": "=", "parent": 177, "children": [], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 31}}, {"id": 180, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC_(NAME, \"Temperature\")", "parent": 177, "children": [181, 182], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 76}}, {"id": 181, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC_", "parent": 180, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 55}}, {"id": 182, "type": "argument_list", "text": "(NAME, \"Temperature\")", "parent": 180, "children": [183, 184], "start_point": {"row": 52, "column": 55}, "end_point": {"row": 52, "column": 76}}, {"id": 183, "type": "identifier", "text": "NAME", "parent": 182, "children": [], "start_point": {"row": 52, "column": 56}, "end_point": {"row": 52, "column": 60}}, {"id": 184, "type": "string_literal", "text": "\"Temperature\"", "parent": 182, "children": [], "start_point": {"row": 52, "column": 62}, "end_point": {"row": 52, "column": 75}}, {"id": 185, "type": "declaration", "text": "homekit_characteristic_t current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0);", "parent": null, "children": [186, 187], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 95}}, {"id": 186, "type": "type_identifier", "text": "homekit_characteristic_t", "parent": 185, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 24}}, {"id": 187, "type": "init_declarator", "text": "current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0)", "parent": 185, "children": [188, 189, 190], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 94}}, {"id": 188, "type": "identifier", "text": "current_temperature", "parent": 187, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 44}}, {"id": 189, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 53, "column": 45}, "end_point": {"row": 53, "column": 46}}, {"id": 190, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0)", "parent": 187, "children": [191, 192], "start_point": {"row": 53, "column": 47}, "end_point": {"row": 53, "column": 94}}, {"id": 191, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC_", "parent": 190, "children": [], "start_point": {"row": 53, "column": 47}, "end_point": {"row": 53, "column": 70}}, {"id": 192, "type": "argument_list", "text": "(CURRENT_TEMPERATURE, 0)", "parent": 190, "children": [193, 194], "start_point": {"row": 53, "column": 70}, "end_point": {"row": 53, "column": 94}}, {"id": 193, "type": "identifier", "text": "CURRENT_TEMPERATURE", "parent": 192, "children": [], "start_point": {"row": 53, "column": 71}, "end_point": {"row": 53, "column": 90}}, {"id": 194, "type": "number_literal", "text": "0", "parent": 192, "children": [], "start_point": {"row": 53, "column": 92}, "end_point": {"row": 53, "column": 93}}, {"id": 195, "type": "declaration", "text": "homekit_characteristic_t current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0);", "parent": null, "children": [196, 197], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 101}}, {"id": 196, "type": "type_identifier", "text": "homekit_characteristic_t", "parent": 195, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 24}}, {"id": 197, "type": "init_declarator", "text": "current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0)", "parent": 195, "children": [198, 199, 200], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 100}}, {"id": 198, "type": "identifier", "text": "current_humidity", "parent": 197, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 41}}, {"id": 199, "type": "=", "text": "=", "parent": 197, "children": [], "start_point": {"row": 54, "column": 45}, "end_point": {"row": 54, "column": 46}}, {"id": 200, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0)", "parent": 197, "children": [201, 202], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 100}}, {"id": 201, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC_", "parent": 200, "children": [], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 70}}, {"id": 202, "type": "argument_list", "text": "(CURRENT_RELATIVE_HUMIDITY, 0)", "parent": 200, "children": [203, 204], "start_point": {"row": 54, "column": 70}, "end_point": {"row": 54, "column": 100}}, {"id": 203, "type": "identifier", "text": "CURRENT_RELATIVE_HUMIDITY", "parent": 202, "children": [], "start_point": {"row": 54, "column": 71}, "end_point": {"row": 54, "column": 96}}, {"id": 204, "type": "number_literal", "text": "0", "parent": 202, "children": [], "start_point": {"row": 54, "column": 98}, "end_point": {"row": 54, "column": 99}}, {"id": 205, "type": "preproc_ifdef", "text": "#ifdef MODE_FORCED\nstatic void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf(\"Failed initiating measurement\\n\");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#else\nstatic void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#endif", "parent": null, "children": [206, 207, 208, 413, 591], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 147, "column": 6}}, {"id": 206, "type": "#ifdef", "text": "#ifdef", "parent": 205, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 207, "type": "identifier", "text": "MODE_FORCED", "parent": 205, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 18}}, {"id": 208, "type": "function_definition", "text": "static void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf(\"Failed initiating measurement\\n\");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}", "parent": 205, "children": [209, 210], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 209, "type": "primitive_type", "text": "void", "parent": 208, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 11}}, {"id": 210, "type": "function_declarator", "text": "bmp280_task_forced(void *pvParameters)", "parent": 208, "children": [211, 212], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 50}}, {"id": 211, "type": "identifier", "text": "bmp280_task_forced", "parent": 210, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 30}}, {"id": 212, "type": "parameter_list", "text": "(void *pvParameters)", "parent": 210, "children": [213], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 50}}, {"id": 213, "type": "parameter_declaration", "text": "void *pvParameters", "parent": 212, "children": [214, 215], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 49}}, {"id": 214, "type": "primitive_type", "text": "void", "parent": 213, "children": [], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 35}}, {"id": 215, "type": "pointer_declarator", "text": "*pvParameters", "parent": 213, "children": [216, 217], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 49}}, {"id": 216, "type": "*", "text": "*", "parent": 215, "children": [], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 37}}, {"id": 217, "type": "identifier", "text": "pvParameters", "parent": 215, "children": [], "start_point": {"row": 58, "column": 37}, "end_point": {"row": 58, "column": 49}}, {"id": 218, "type": "declaration", "text": "bmp280_params_t params;", "parent": 208, "children": [219, 220], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 28}}, {"id": 219, "type": "type_identifier", "text": "bmp280_params_t", "parent": 218, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 19}}, {"id": 220, "type": "identifier", "text": "params", "parent": 218, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 27}}, {"id": 221, "type": "declaration", "text": "float pressure, temperature, humidity;", "parent": 208, "children": [222, 223, 224, 225], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 42}}, {"id": 222, "type": "primitive_type", "text": "float", "parent": 221, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 9}}, {"id": 223, "type": "identifier", "text": "pressure", "parent": 221, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 18}}, {"id": 224, "type": "identifier", "text": "temperature", "parent": 221, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 31}}, {"id": 225, "type": "identifier", "text": "humidity", "parent": 221, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 41}}, {"id": 226, "type": "call_expression", "text": "bmp280_init_default_params(&params)", "parent": 208, "children": [227, 228], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 39}}, {"id": 227, "type": "identifier", "text": "bmp280_init_default_params", "parent": 226, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 30}}, {"id": 228, "type": "argument_list", "text": "(&params)", "parent": 226, "children": [229], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 39}}, {"id": 229, "type": "pointer_expression", "text": "&params", "parent": 228, "children": [230], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 38}}, {"id": 230, "type": "identifier", "text": "params", "parent": 229, "children": [], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 38}}, {"id": 231, "type": "assignment_expression", "text": "params.mode = BMP280_MODE_FORCED", "parent": 208, "children": [232, 235, 236], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 36}}, {"id": 232, "type": "field_expression", "text": "params.mode", "parent": 231, "children": [233, 234], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 15}}, {"id": 233, "type": "identifier", "text": "params", "parent": 232, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 10}}, {"id": 234, "type": "field_identifier", "text": "mode", "parent": 232, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 15}}, {"id": 235, "type": "=", "text": "=", "parent": 231, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 17}}, {"id": 236, "type": "identifier", "text": "BMP280_MODE_FORCED", "parent": 231, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 36}}, {"id": 237, "type": "declaration", "text": "bmp280_t bmp280_dev;", "parent": 208, "children": [238, 239], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 24}}, {"id": 238, "type": "type_identifier", "text": "bmp280_t", "parent": 237, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 12}}, {"id": 239, "type": "identifier", "text": "bmp280_dev", "parent": 237, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 23}}, {"id": 240, "type": "assignment_expression", "text": "bmp280_dev.i2c_dev.bus = i2c_bus", "parent": 208, "children": [241, 246, 247], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 36}}, {"id": 241, "type": "field_expression", "text": "bmp280_dev.i2c_dev.bus", "parent": 240, "children": [242, 245], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 26}}, {"id": 242, "type": "field_expression", "text": "bmp280_dev.i2c_dev", "parent": 241, "children": [243, 244], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 22}}, {"id": 243, "type": "identifier", "text": "bmp280_dev", "parent": 242, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 14}}, {"id": 244, "type": "field_identifier", "text": "i2c_dev", "parent": 242, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 22}}, {"id": 245, "type": "field_identifier", "text": "bus", "parent": 241, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 26}}, {"id": 246, "type": "=", "text": "=", "parent": 240, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 28}}, {"id": 247, "type": "identifier", "text": "i2c_bus", "parent": 240, "children": [], "start_point": {"row": 67, "column": 29}, "end_point": {"row": 67, "column": 36}}, {"id": 248, "type": "assignment_expression", "text": "bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0", "parent": 208, "children": [249, 254, 255], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 50}}, {"id": 249, "type": "field_expression", "text": "bmp280_dev.i2c_dev.addr", "parent": 248, "children": [250, 253], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 27}}, {"id": 250, "type": "field_expression", "text": "bmp280_dev.i2c_dev", "parent": 249, "children": [251, 252], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 22}}, {"id": 251, "type": "identifier", "text": "bmp280_dev", "parent": 250, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 14}}, {"id": 252, "type": "field_identifier", "text": "i2c_dev", "parent": 250, "children": [], "start_point": {"row": 68, "column": 15}, "end_point": {"row": 68, "column": 22}}, {"id": 253, "type": "field_identifier", "text": "addr", "parent": 249, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 27}}, {"id": 254, "type": "=", "text": "=", "parent": 248, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 29}}, {"id": 255, "type": "identifier", "text": "BMP280_I2C_ADDRESS_0", "parent": 248, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 50}}, {"id": 256, "type": "while_statement", "text": "while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf(\"Failed initiating measurement\\n\");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }", "parent": 208, "children": [257], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 104, "column": 5}}, {"id": 257, "type": "parenthesized_expression", "text": "(1)", "parent": 256, "children": [258], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 13}}, {"id": 258, "type": "number_literal", "text": "1", "parent": 257, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 12}}, {"id": 259, "type": "while_statement", "text": "while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }", "parent": 256, "children": [260], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 74, "column": 9}}, {"id": 260, "type": "parenthesized_expression", "text": "(!bmp280_init(&bmp280_dev, &params))", "parent": 259, "children": [261], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 50}}, {"id": 261, "type": "unary_expression", "text": "!bmp280_init(&bmp280_dev, &params)", "parent": 260, "children": [262, 263], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 49}}, {"id": 262, "type": "!", "text": "!", "parent": 261, "children": [], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 16}}, {"id": 263, "type": "call_expression", "text": "bmp280_init(&bmp280_dev, &params)", "parent": 261, "children": [264, 265], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 49}}, {"id": 264, "type": "identifier", "text": "bmp280_init", "parent": 263, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 27}}, {"id": 265, "type": "argument_list", "text": "(&bmp280_dev, &params)", "parent": 263, "children": [266, 268], "start_point": {"row": 71, "column": 27}, "end_point": {"row": 71, "column": 49}}, {"id": 266, "type": "pointer_expression", "text": "&bmp280_dev", "parent": 265, "children": [267], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 39}}, {"id": 267, "type": "identifier", "text": "bmp280_dev", "parent": 266, "children": [], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 39}}, {"id": 268, "type": "pointer_expression", "text": "&params", "parent": 265, "children": [269], "start_point": {"row": 71, "column": 41}, "end_point": {"row": 71, "column": 48}}, {"id": 269, "type": "identifier", "text": "params", "parent": 268, "children": [], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 48}}, {"id": 270, "type": "call_expression", "text": "printf(\"BMP280 initialization failed\\n\")", "parent": 259, "children": [271, 272], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 52}}, {"id": 271, "type": "identifier", "text": "printf", "parent": 270, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 18}}, {"id": 272, "type": "argument_list", "text": "(\"BMP280 initialization failed\\n\")", "parent": 270, "children": [273], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 52}}, {"id": 273, "type": "string_literal", "text": "\"BMP280 initialization failed\\n\"", "parent": 272, "children": [274], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 51}}, {"id": 274, "type": "escape_sequence", "text": "\\n", "parent": 273, "children": [], "start_point": {"row": 72, "column": 48}, "end_point": {"row": 72, "column": 50}}, {"id": 275, "type": "call_expression", "text": "vTaskDelay(1000 / portTICK_PERIOD_MS)", "parent": 259, "children": [276, 277], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 49}}, {"id": 276, "type": "identifier", "text": "vTaskDelay", "parent": 275, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 22}}, {"id": 277, "type": "argument_list", "text": "(1000 / portTICK_PERIOD_MS)", "parent": 275, "children": [278], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 49}}, {"id": 278, "type": "binary_expression", "text": "1000 / portTICK_PERIOD_MS", "parent": 277, "children": [279, 280, 281], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 48}}, {"id": 279, "type": "number_literal", "text": "1000", "parent": 278, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 27}}, {"id": 280, "type": "/", "text": "/", "parent": 278, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 29}}, {"id": 281, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 278, "children": [], "start_point": {"row": 73, "column": 30}, "end_point": {"row": 73, "column": 48}}, {"id": 282, "type": "declaration", "text": "bool bme280p = bmp280_dev.id == BME280_CHIP_ID;", "parent": 256, "children": [283, 284], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 55}}, {"id": 283, "type": "primitive_type", "text": "bool", "parent": 282, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 12}}, {"id": 284, "type": "init_declarator", "text": "bme280p = bmp280_dev.id == BME280_CHIP_ID", "parent": 282, "children": [285, 286, 287], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 54}}, {"id": 285, "type": "identifier", "text": "bme280p", "parent": 284, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 20}}, {"id": 286, "type": "=", "text": "=", "parent": 284, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 22}}, {"id": 287, "type": "binary_expression", "text": "bmp280_dev.id == BME280_CHIP_ID", "parent": 284, "children": [288, 291, 292], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 54}}, {"id": 288, "type": "field_expression", "text": "bmp280_dev.id", "parent": 287, "children": [289, 290], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 36}}, {"id": 289, "type": "identifier", "text": "bmp280_dev", "parent": 288, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 33}}, {"id": 290, "type": "field_identifier", "text": "id", "parent": 288, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 36}}, {"id": 291, "type": "==", "text": "==", "parent": 287, "children": [], "start_point": {"row": 76, "column": 37}, "end_point": {"row": 76, "column": 39}}, {"id": 292, "type": "identifier", "text": "BME280_CHIP_ID", "parent": 287, "children": [], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 54}}, {"id": 293, "type": "call_expression", "text": "printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\")", "parent": 256, "children": [294, 295], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 67}}, {"id": 294, "type": "identifier", "text": "printf", "parent": 293, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 14}}, {"id": 295, "type": "argument_list", "text": "(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\")", "parent": 293, "children": [296, 298], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 67}}, {"id": 296, "type": "string_literal", "text": "\"BMP280: found %s\\n\"", "parent": 295, "children": [297], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 35}}, {"id": 297, "type": "escape_sequence", "text": "\\n", "parent": 296, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 34}}, {"id": 298, "type": "conditional_expression", "text": "bme280p ? \"BME280\" : \"BMP280\"", "parent": 295, "children": [299, 300, 301, 302], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 66}}, {"id": 299, "type": "identifier", "text": "bme280p", "parent": 298, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 44}}, {"id": 300, "type": "?", "text": "?", "parent": 298, "children": [], "start_point": {"row": 77, "column": 45}, "end_point": {"row": 77, "column": 46}}, {"id": 301, "type": "string_literal", "text": "\"BME280\"", "parent": 298, "children": [], "start_point": {"row": 77, "column": 47}, "end_point": {"row": 77, "column": 55}}, {"id": 302, "type": "string_literal", "text": "\"BMP280\"", "parent": 298, "children": [], "start_point": {"row": 77, "column": 58}, "end_point": {"row": 77, "column": 66}}, {"id": 303, "type": "while_statement", "text": "while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf(\"Failed initiating measurement\\n\");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }", "parent": 256, "children": [304], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 103, "column": 9}}, {"id": 304, "type": "parenthesized_expression", "text": "(1)", "parent": 303, "children": [305], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 16}}, {"id": 305, "type": "number_literal", "text": "1", "parent": 304, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 15}}, {"id": 306, "type": "call_expression", "text": "vTaskDelay(1000 / portTICK_PERIOD_MS)", "parent": 303, "children": [307, 308], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 49}}, {"id": 307, "type": "identifier", "text": "vTaskDelay", "parent": 306, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 22}}, {"id": 308, "type": "argument_list", "text": "(1000 / portTICK_PERIOD_MS)", "parent": 306, "children": [309], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 49}}, {"id": 309, "type": "binary_expression", "text": "1000 / portTICK_PERIOD_MS", "parent": 308, "children": [310, 311, 312], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 48}}, {"id": 310, "type": "number_literal", "text": "1000", "parent": 309, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 27}}, {"id": 311, "type": "/", "text": "/", "parent": 309, "children": [], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 29}}, {"id": 312, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 309, "children": [], "start_point": {"row": 80, "column": 30}, "end_point": {"row": 80, "column": 48}}, {"id": 313, "type": "if_statement", "text": "if (!bmp280_force_measurement(&bmp280_dev)) {\n printf(\"Failed initiating measurement\\n\");\n break;\n }", "parent": 303, "children": [314], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 84, "column": 13}}, {"id": 314, "type": "parenthesized_expression", "text": "(!bmp280_force_measurement(&bmp280_dev))", "parent": 313, "children": [315], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 55}}, {"id": 315, "type": "unary_expression", "text": "!bmp280_force_measurement(&bmp280_dev)", "parent": 314, "children": [316, 317], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 54}}, {"id": 316, "type": "!", "text": "!", "parent": 315, "children": [], "start_point": {"row": 81, "column": 16}, "end_point": {"row": 81, "column": 17}}, {"id": 317, "type": "call_expression", "text": "bmp280_force_measurement(&bmp280_dev)", "parent": 315, "children": [318, 319], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 54}}, {"id": 318, "type": "identifier", "text": "bmp280_force_measurement", "parent": 317, "children": [], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 41}}, {"id": 319, "type": "argument_list", "text": "(&bmp280_dev)", "parent": 317, "children": [320], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 54}}, {"id": 320, "type": "pointer_expression", "text": "&bmp280_dev", "parent": 319, "children": [321], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 53}}, {"id": 321, "type": "identifier", "text": "bmp280_dev", "parent": 320, "children": [], "start_point": {"row": 81, "column": 43}, "end_point": {"row": 81, "column": 53}}, {"id": 322, "type": "call_expression", "text": "printf(\"Failed initiating measurement\\n\")", "parent": 313, "children": [323, 324], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 57}}, {"id": 323, "type": "identifier", "text": "printf", "parent": 322, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 22}}, {"id": 324, "type": "argument_list", "text": "(\"Failed initiating measurement\\n\")", "parent": 322, "children": [325], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 57}}, {"id": 325, "type": "string_literal", "text": "\"Failed initiating measurement\\n\"", "parent": 324, "children": [326], "start_point": {"row": 82, "column": 23}, "end_point": {"row": 82, "column": 56}}, {"id": 326, "type": "escape_sequence", "text": "\\n", "parent": 325, "children": [], "start_point": {"row": 82, "column": 53}, "end_point": {"row": 82, "column": 55}}, {"id": 327, "type": "break_statement", "text": "break;", "parent": 313, "children": [328], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 22}}, {"id": 328, "type": "break", "text": "break", "parent": 327, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 21}}, {"id": 329, "type": "while_statement", "text": "while (bmp280_is_measuring(&bmp280_dev)) {}", "parent": 303, "children": [330], "start_point": {"row": 86, "column": 12}, "end_point": {"row": 86, "column": 55}}, {"id": 330, "type": "parenthesized_expression", "text": "(bmp280_is_measuring(&bmp280_dev))", "parent": 329, "children": [331], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 52}}, {"id": 331, "type": "call_expression", "text": "bmp280_is_measuring(&bmp280_dev)", "parent": 330, "children": [332, 333], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 51}}, {"id": 332, "type": "identifier", "text": "bmp280_is_measuring", "parent": 331, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 38}}, {"id": 333, "type": "argument_list", "text": "(&bmp280_dev)", "parent": 331, "children": [334], "start_point": {"row": 86, "column": 38}, "end_point": {"row": 86, "column": 51}}, {"id": 334, "type": "pointer_expression", "text": "&bmp280_dev", "parent": 333, "children": [335], "start_point": {"row": 86, "column": 39}, "end_point": {"row": 86, "column": 50}}, {"id": 335, "type": "identifier", "text": "bmp280_dev", "parent": 334, "children": [], "start_point": {"row": 86, "column": 40}, "end_point": {"row": 86, "column": 50}}, {"id": 336, "type": "if_statement", "text": "if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }", "parent": 303, "children": [337], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 91, "column": 13}}, {"id": 337, "type": "parenthesized_expression", "text": "(!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity))", "parent": 336, "children": [338], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 84}}, {"id": 338, "type": "unary_expression", "text": "!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)", "parent": 337, "children": [339, 340], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 83}}, {"id": 339, "type": "!", "text": "!", "parent": 338, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 17}}, {"id": 340, "type": "call_expression", "text": "bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)", "parent": 338, "children": [341, 342], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 83}}, {"id": 341, "type": "identifier", "text": "bmp280_read_float", "parent": 340, "children": [], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 34}}, {"id": 342, "type": "argument_list", "text": "(&bmp280_dev, &temperature, &pressure, &humidity)", "parent": 340, "children": [343, 345, 347, 349], "start_point": {"row": 88, "column": 34}, "end_point": {"row": 88, "column": 83}}, {"id": 343, "type": "pointer_expression", "text": "&bmp280_dev", "parent": 342, "children": [344], "start_point": {"row": 88, "column": 35}, "end_point": {"row": 88, "column": 46}}, {"id": 344, "type": "identifier", "text": "bmp280_dev", "parent": 343, "children": [], "start_point": {"row": 88, "column": 36}, "end_point": {"row": 88, "column": 46}}, {"id": 345, "type": "pointer_expression", "text": "&temperature", "parent": 342, "children": [346], "start_point": {"row": 88, "column": 48}, "end_point": {"row": 88, "column": 60}}, {"id": 346, "type": "identifier", "text": "temperature", "parent": 345, "children": [], "start_point": {"row": 88, "column": 49}, "end_point": {"row": 88, "column": 60}}, {"id": 347, "type": "pointer_expression", "text": "&pressure", "parent": 342, "children": [348], "start_point": {"row": 88, "column": 62}, "end_point": {"row": 88, "column": 71}}, {"id": 348, "type": "identifier", "text": "pressure", "parent": 347, "children": [], "start_point": {"row": 88, "column": 63}, "end_point": {"row": 88, "column": 71}}, {"id": 349, "type": "pointer_expression", "text": "&humidity", "parent": 342, "children": [350], "start_point": {"row": 88, "column": 73}, "end_point": {"row": 88, "column": 82}}, {"id": 350, "type": "identifier", "text": "humidity", "parent": 349, "children": [], "start_point": {"row": 88, "column": 74}, "end_point": {"row": 88, "column": 82}}, {"id": 351, "type": "call_expression", "text": "printf(\"Temperature/pressure reading failed\\n\")", "parent": 336, "children": [352, 353], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 63}}, {"id": 352, "type": "identifier", "text": "printf", "parent": 351, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 22}}, {"id": 353, "type": "argument_list", "text": "(\"Temperature/pressure reading failed\\n\")", "parent": 351, "children": [354], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 63}}, {"id": 354, "type": "string_literal", "text": "\"Temperature/pressure reading failed\\n\"", "parent": 353, "children": [355], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 62}}, {"id": 355, "type": "escape_sequence", "text": "\\n", "parent": 354, "children": [], "start_point": {"row": 89, "column": 59}, "end_point": {"row": 89, "column": 61}}, {"id": 356, "type": "break_statement", "text": "break;", "parent": 336, "children": [357], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 22}}, {"id": 357, "type": "break", "text": "break", "parent": 356, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 21}}, {"id": 358, "type": "call_expression", "text": "printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature)", "parent": 303, "children": [359, 360], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 83}}, {"id": 359, "type": "identifier", "text": "printf", "parent": 358, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 18}}, {"id": 360, "type": "argument_list", "text": "(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature)", "parent": 358, "children": [361, 362, 363], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 83}}, {"id": 361, "type": "string_literal", "text": "\"Pressure: %.2f Pa, Temperature: %.2f C\"", "parent": 360, "children": [], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 59}}, {"id": 362, "type": "identifier", "text": "pressure", "parent": 360, "children": [], "start_point": {"row": 92, "column": 61}, "end_point": {"row": 92, "column": 69}}, {"id": 363, "type": "identifier", "text": "temperature", "parent": 360, "children": [], "start_point": {"row": 92, "column": 71}, "end_point": {"row": 92, "column": 82}}, {"id": 364, "type": "if_statement", "text": "if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");", "parent": 303, "children": [365, 373], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 96, "column": 29}}, {"id": 365, "type": "parenthesized_expression", "text": "(bme280p)", "parent": 364, "children": [366], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 24}}, {"id": 366, "type": "identifier", "text": "bme280p", "parent": 365, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 23}}, {"id": 367, "type": "call_expression", "text": "printf(\", Humidity: %.2f\\n\", humidity)", "parent": 364, "children": [368, 369], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 54}}, {"id": 368, "type": "identifier", "text": "printf", "parent": 367, "children": [], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 22}}, {"id": 369, "type": "argument_list", "text": "(\", Humidity: %.2f\\n\", humidity)", "parent": 367, "children": [370, 372], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 54}}, {"id": 370, "type": "string_literal", "text": "\", Humidity: %.2f\\n\"", "parent": 369, "children": [371], "start_point": {"row": 94, "column": 23}, "end_point": {"row": 94, "column": 43}}, {"id": 371, "type": "escape_sequence", "text": "\\n", "parent": 370, "children": [], "start_point": {"row": 94, "column": 40}, "end_point": {"row": 94, "column": 42}}, {"id": 372, "type": "identifier", "text": "humidity", "parent": 369, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 53}}, {"id": 373, "type": "else_clause", "text": "else\n printf(\"\\n\");", "parent": 364, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 96, "column": 29}}, {"id": 374, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 373, "children": [375, 376], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 28}}, {"id": 375, "type": "identifier", "text": "printf", "parent": 374, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 22}}, {"id": 376, "type": "argument_list", "text": "(\"\\n\")", "parent": 374, "children": [377], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 28}}, {"id": 377, "type": "string_literal", "text": "\"\\n\"", "parent": 376, "children": [378], "start_point": {"row": 96, "column": 23}, "end_point": {"row": 96, "column": 27}}, {"id": 378, "type": "escape_sequence", "text": "\\n", "parent": 377, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 26}}, {"id": 379, "type": "assignment_expression", "text": "current_temperature.value = HOMEKIT_FLOAT(temperature)", "parent": 303, "children": [380, 383, 384], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 66}}, {"id": 380, "type": "field_expression", "text": "current_temperature.value", "parent": 379, "children": [381, 382], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 37}}, {"id": 381, "type": "identifier", "text": "current_temperature", "parent": 380, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 31}}, {"id": 382, "type": "field_identifier", "text": "value", "parent": 380, "children": [], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 37}}, {"id": 383, "type": "=", "text": "=", "parent": 379, "children": [], "start_point": {"row": 98, "column": 38}, "end_point": {"row": 98, "column": 39}}, {"id": 384, "type": "call_expression", "text": "HOMEKIT_FLOAT(temperature)", "parent": 379, "children": [385, 386], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 66}}, {"id": 385, "type": "identifier", "text": "HOMEKIT_FLOAT", "parent": 384, "children": [], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 53}}, {"id": 386, "type": "argument_list", "text": "(temperature)", "parent": 384, "children": [387], "start_point": {"row": 98, "column": 53}, "end_point": {"row": 98, "column": 66}}, {"id": 387, "type": "identifier", "text": "temperature", "parent": 386, "children": [], "start_point": {"row": 98, "column": 54}, "end_point": {"row": 98, "column": 65}}, {"id": 388, "type": "assignment_expression", "text": "current_humidity.value = HOMEKIT_FLOAT(humidity)", "parent": 303, "children": [389, 392, 393], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 60}}, {"id": 389, "type": "field_expression", "text": "current_humidity.value", "parent": 388, "children": [390, 391], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 34}}, {"id": 390, "type": "identifier", "text": "current_humidity", "parent": 389, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 28}}, {"id": 391, "type": "field_identifier", "text": "value", "parent": 389, "children": [], "start_point": {"row": 99, "column": 29}, "end_point": {"row": 99, "column": 34}}, {"id": 392, "type": "=", "text": "=", "parent": 388, "children": [], "start_point": {"row": 99, "column": 35}, "end_point": {"row": 99, "column": 36}}, {"id": 393, "type": "call_expression", "text": "HOMEKIT_FLOAT(humidity)", "parent": 388, "children": [394, 395], "start_point": {"row": 99, "column": 37}, "end_point": {"row": 99, "column": 60}}, {"id": 394, "type": "identifier", "text": "HOMEKIT_FLOAT", "parent": 393, "children": [], "start_point": {"row": 99, "column": 37}, "end_point": {"row": 99, "column": 50}}, {"id": 395, "type": "argument_list", "text": "(humidity)", "parent": 393, "children": [396], "start_point": {"row": 99, "column": 50}, "end_point": {"row": 99, "column": 60}}, {"id": 396, "type": "identifier", "text": "humidity", "parent": 395, "children": [], "start_point": {"row": 99, "column": 51}, "end_point": {"row": 99, "column": 59}}, {"id": 397, "type": "call_expression", "text": "homekit_characteristic_notify(&current_temperature, current_temperature.value)", "parent": 303, "children": [398, 399], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 90}}, {"id": 398, "type": "identifier", "text": "homekit_characteristic_notify", "parent": 397, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 41}}, {"id": 399, "type": "argument_list", "text": "(&current_temperature, current_temperature.value)", "parent": 397, "children": [400, 402], "start_point": {"row": 101, "column": 41}, "end_point": {"row": 101, "column": 90}}, {"id": 400, "type": "pointer_expression", "text": "&current_temperature", "parent": 399, "children": [401], "start_point": {"row": 101, "column": 42}, "end_point": {"row": 101, "column": 62}}, {"id": 401, "type": "identifier", "text": "current_temperature", "parent": 400, "children": [], "start_point": {"row": 101, "column": 43}, "end_point": {"row": 101, "column": 62}}, {"id": 402, "type": "field_expression", "text": "current_temperature.value", "parent": 399, "children": [403, 404], "start_point": {"row": 101, "column": 64}, "end_point": {"row": 101, "column": 89}}, {"id": 403, "type": "identifier", "text": "current_temperature", "parent": 402, "children": [], "start_point": {"row": 101, "column": 64}, "end_point": {"row": 101, "column": 83}}, {"id": 404, "type": "field_identifier", "text": "value", "parent": 402, "children": [], "start_point": {"row": 101, "column": 84}, "end_point": {"row": 101, "column": 89}}, {"id": 405, "type": "call_expression", "text": "homekit_characteristic_notify(&current_humidity, current_humidity.value)", "parent": 303, "children": [406, 407], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 84}}, {"id": 406, "type": "identifier", "text": "homekit_characteristic_notify", "parent": 405, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 41}}, {"id": 407, "type": "argument_list", "text": "(&current_humidity, current_humidity.value)", "parent": 405, "children": [408, 410], "start_point": {"row": 102, "column": 41}, "end_point": {"row": 102, "column": 84}}, {"id": 408, "type": "pointer_expression", "text": "&current_humidity", "parent": 407, "children": [409], "start_point": {"row": 102, "column": 42}, "end_point": {"row": 102, "column": 59}}, {"id": 409, "type": "identifier", "text": "current_humidity", "parent": 408, "children": [], "start_point": {"row": 102, "column": 43}, "end_point": {"row": 102, "column": 59}}, {"id": 410, "type": "field_expression", "text": "current_humidity.value", "parent": 407, "children": [411, 412], "start_point": {"row": 102, "column": 61}, "end_point": {"row": 102, "column": 83}}, {"id": 411, "type": "identifier", "text": "current_humidity", "parent": 410, "children": [], "start_point": {"row": 102, "column": 61}, "end_point": {"row": 102, "column": 77}}, {"id": 412, "type": "field_identifier", "text": "value", "parent": 410, "children": [], "start_point": {"row": 102, "column": 78}, "end_point": {"row": 102, "column": 83}}, {"id": 413, "type": "preproc_else", "text": "#else\nstatic void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}", "parent": 205, "children": [414, 415], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 146, "column": 1}}, {"id": 414, "type": "#else", "text": "#else", "parent": 413, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 5}}, {"id": 415, "type": "function_definition", "text": "static void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}", "parent": 413, "children": [416, 417], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 146, "column": 1}}, {"id": 416, "type": "primitive_type", "text": "void", "parent": 415, "children": [], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 11}}, {"id": 417, "type": "function_declarator", "text": "bmp280_task_normal(void *pvParameters)", "parent": 415, "children": [418, 419], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 50}}, {"id": 418, "type": "identifier", "text": "bmp280_task_normal", "parent": 417, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 30}}, {"id": 419, "type": "parameter_list", "text": "(void *pvParameters)", "parent": 417, "children": [420], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 107, "column": 50}}, {"id": 420, "type": "parameter_declaration", "text": "void *pvParameters", "parent": 419, "children": [421, 422], "start_point": {"row": 107, "column": 31}, "end_point": {"row": 107, "column": 49}}, {"id": 421, "type": "primitive_type", "text": "void", "parent": 420, "children": [], "start_point": {"row": 107, "column": 31}, "end_point": {"row": 107, "column": 35}}, {"id": 422, "type": "pointer_declarator", "text": "*pvParameters", "parent": 420, "children": [423, 424], "start_point": {"row": 107, "column": 36}, "end_point": {"row": 107, "column": 49}}, {"id": 423, "type": "*", "text": "*", "parent": 422, "children": [], "start_point": {"row": 107, "column": 36}, "end_point": {"row": 107, "column": 37}}, {"id": 424, "type": "identifier", "text": "pvParameters", "parent": 422, "children": [], "start_point": {"row": 107, "column": 37}, "end_point": {"row": 107, "column": 49}}, {"id": 425, "type": "declaration", "text": "bmp280_params_t params;", "parent": 415, "children": [426, 427], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 28}}, {"id": 426, "type": "type_identifier", "text": "bmp280_params_t", "parent": 425, "children": [], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 19}}, {"id": 427, "type": "identifier", "text": "params", "parent": 425, "children": [], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 27}}, {"id": 428, "type": "declaration", "text": "float pressure, temperature, humidity;", "parent": 415, "children": [429, 430, 431, 432], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 42}}, {"id": 429, "type": "primitive_type", "text": "float", "parent": 428, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 9}}, {"id": 430, "type": "identifier", "text": "pressure", "parent": 428, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 18}}, {"id": 431, "type": "identifier", "text": "temperature", "parent": 428, "children": [], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 31}}, {"id": 432, "type": "identifier", "text": "humidity", "parent": 428, "children": [], "start_point": {"row": 110, "column": 33}, "end_point": {"row": 110, "column": 41}}, {"id": 433, "type": "call_expression", "text": "bmp280_init_default_params(&params)", "parent": 415, "children": [434, 435], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 39}}, {"id": 434, "type": "identifier", "text": "bmp280_init_default_params", "parent": 433, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 30}}, {"id": 435, "type": "argument_list", "text": "(&params)", "parent": 433, "children": [436], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 39}}, {"id": 436, "type": "pointer_expression", "text": "&params", "parent": 435, "children": [437], "start_point": {"row": 112, "column": 31}, "end_point": {"row": 112, "column": 38}}, {"id": 437, "type": "identifier", "text": "params", "parent": 436, "children": [], "start_point": {"row": 112, "column": 32}, "end_point": {"row": 112, "column": 38}}, {"id": 438, "type": "declaration", "text": "bmp280_t bmp280_dev;", "parent": 415, "children": [439, 440], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 24}}, {"id": 439, "type": "type_identifier", "text": "bmp280_t", "parent": 438, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 12}}, {"id": 440, "type": "identifier", "text": "bmp280_dev", "parent": 438, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 23}}, {"id": 441, "type": "assignment_expression", "text": "bmp280_dev.i2c_dev.bus = i2c_bus", "parent": 415, "children": [442, 447, 448], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 36}}, {"id": 442, "type": "field_expression", "text": "bmp280_dev.i2c_dev.bus", "parent": 441, "children": [443, 446], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 26}}, {"id": 443, "type": "field_expression", "text": "bmp280_dev.i2c_dev", "parent": 442, "children": [444, 445], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 22}}, {"id": 444, "type": "identifier", "text": "bmp280_dev", "parent": 443, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 14}}, {"id": 445, "type": "field_identifier", "text": "i2c_dev", "parent": 443, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 22}}, {"id": 446, "type": "field_identifier", "text": "bus", "parent": 442, "children": [], "start_point": {"row": 115, "column": 23}, "end_point": {"row": 115, "column": 26}}, {"id": 447, "type": "=", "text": "=", "parent": 441, "children": [], "start_point": {"row": 115, "column": 27}, "end_point": {"row": 115, "column": 28}}, {"id": 448, "type": "identifier", "text": "i2c_bus", "parent": 441, "children": [], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 36}}, {"id": 449, "type": "assignment_expression", "text": "bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0", "parent": 415, "children": [450, 455, 456], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 50}}, {"id": 450, "type": "field_expression", "text": "bmp280_dev.i2c_dev.addr", "parent": 449, "children": [451, 454], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 27}}, {"id": 451, "type": "field_expression", "text": "bmp280_dev.i2c_dev", "parent": 450, "children": [452, 453], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 22}}, {"id": 452, "type": "identifier", "text": "bmp280_dev", "parent": 451, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 14}}, {"id": 453, "type": "field_identifier", "text": "i2c_dev", "parent": 451, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 22}}, {"id": 454, "type": "field_identifier", "text": "addr", "parent": 450, "children": [], "start_point": {"row": 116, "column": 23}, "end_point": {"row": 116, "column": 27}}, {"id": 455, "type": "=", "text": "=", "parent": 449, "children": [], "start_point": {"row": 116, "column": 28}, "end_point": {"row": 116, "column": 29}}, {"id": 456, "type": "identifier", "text": "BMP280_I2C_ADDRESS_0", "parent": 449, "children": [], "start_point": {"row": 116, "column": 30}, "end_point": {"row": 116, "column": 50}}, {"id": 457, "type": "while_statement", "text": "while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }", "parent": 415, "children": [458], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 145, "column": 5}}, {"id": 458, "type": "parenthesized_expression", "text": "(1)", "parent": 457, "children": [459], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 13}}, {"id": 459, "type": "number_literal", "text": "1", "parent": 458, "children": [], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 12}}, {"id": 460, "type": "while_statement", "text": "while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }", "parent": 457, "children": [461], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 122, "column": 9}}, {"id": 461, "type": "parenthesized_expression", "text": "(!bmp280_init(&bmp280_dev, &params))", "parent": 460, "children": [462], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 50}}, {"id": 462, "type": "unary_expression", "text": "!bmp280_init(&bmp280_dev, &params)", "parent": 461, "children": [463, 464], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 49}}, {"id": 463, "type": "!", "text": "!", "parent": 462, "children": [], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 16}}, {"id": 464, "type": "call_expression", "text": "bmp280_init(&bmp280_dev, &params)", "parent": 462, "children": [465, 466], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 49}}, {"id": 465, "type": "identifier", "text": "bmp280_init", "parent": 464, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 27}}, {"id": 466, "type": "argument_list", "text": "(&bmp280_dev, &params)", "parent": 464, "children": [467, 469], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 49}}, {"id": 467, "type": "pointer_expression", "text": "&bmp280_dev", "parent": 466, "children": [468], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 39}}, {"id": 468, "type": "identifier", "text": "bmp280_dev", "parent": 467, "children": [], "start_point": {"row": 119, "column": 29}, "end_point": {"row": 119, "column": 39}}, {"id": 469, "type": "pointer_expression", "text": "&params", "parent": 466, "children": [470], "start_point": {"row": 119, "column": 41}, "end_point": {"row": 119, "column": 48}}, {"id": 470, "type": "identifier", "text": "params", "parent": 469, "children": [], "start_point": {"row": 119, "column": 42}, "end_point": {"row": 119, "column": 48}}, {"id": 471, "type": "call_expression", "text": "printf(\"BMP280 initialization failed\\n\")", "parent": 460, "children": [472, 473], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 52}}, {"id": 472, "type": "identifier", "text": "printf", "parent": 471, "children": [], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 18}}, {"id": 473, "type": "argument_list", "text": "(\"BMP280 initialization failed\\n\")", "parent": 471, "children": [474], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 52}}, {"id": 474, "type": "string_literal", "text": "\"BMP280 initialization failed\\n\"", "parent": 473, "children": [475], "start_point": {"row": 120, "column": 19}, "end_point": {"row": 120, "column": 51}}, {"id": 475, "type": "escape_sequence", "text": "\\n", "parent": 474, "children": [], "start_point": {"row": 120, "column": 48}, "end_point": {"row": 120, "column": 50}}, {"id": 476, "type": "call_expression", "text": "vTaskDelay(1000 / portTICK_PERIOD_MS)", "parent": 460, "children": [477, 478], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 49}}, {"id": 477, "type": "identifier", "text": "vTaskDelay", "parent": 476, "children": [], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 22}}, {"id": 478, "type": "argument_list", "text": "(1000 / portTICK_PERIOD_MS)", "parent": 476, "children": [479], "start_point": {"row": 121, "column": 22}, "end_point": {"row": 121, "column": 49}}, {"id": 479, "type": "binary_expression", "text": "1000 / portTICK_PERIOD_MS", "parent": 478, "children": [480, 481, 482], "start_point": {"row": 121, "column": 23}, "end_point": {"row": 121, "column": 48}}, {"id": 480, "type": "number_literal", "text": "1000", "parent": 479, "children": [], "start_point": {"row": 121, "column": 23}, "end_point": {"row": 121, "column": 27}}, {"id": 481, "type": "/", "text": "/", "parent": 479, "children": [], "start_point": {"row": 121, "column": 28}, "end_point": {"row": 121, "column": 29}}, {"id": 482, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 479, "children": [], "start_point": {"row": 121, "column": 30}, "end_point": {"row": 121, "column": 48}}, {"id": 483, "type": "declaration", "text": "bool bme280p = bmp280_dev.id == BME280_CHIP_ID;", "parent": 457, "children": [484, 485], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 55}}, {"id": 484, "type": "primitive_type", "text": "bool", "parent": 483, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 12}}, {"id": 485, "type": "init_declarator", "text": "bme280p = bmp280_dev.id == BME280_CHIP_ID", "parent": 483, "children": [486, 487, 488], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 54}}, {"id": 486, "type": "identifier", "text": "bme280p", "parent": 485, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 20}}, {"id": 487, "type": "=", "text": "=", "parent": 485, "children": [], "start_point": {"row": 124, "column": 21}, "end_point": {"row": 124, "column": 22}}, {"id": 488, "type": "binary_expression", "text": "bmp280_dev.id == BME280_CHIP_ID", "parent": 485, "children": [489, 492, 493], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 54}}, {"id": 489, "type": "field_expression", "text": "bmp280_dev.id", "parent": 488, "children": [490, 491], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 36}}, {"id": 490, "type": "identifier", "text": "bmp280_dev", "parent": 489, "children": [], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 33}}, {"id": 491, "type": "field_identifier", "text": "id", "parent": 489, "children": [], "start_point": {"row": 124, "column": 34}, "end_point": {"row": 124, "column": 36}}, {"id": 492, "type": "==", "text": "==", "parent": 488, "children": [], "start_point": {"row": 124, "column": 37}, "end_point": {"row": 124, "column": 39}}, {"id": 493, "type": "identifier", "text": "BME280_CHIP_ID", "parent": 488, "children": [], "start_point": {"row": 124, "column": 40}, "end_point": {"row": 124, "column": 54}}, {"id": 494, "type": "call_expression", "text": "printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\")", "parent": 457, "children": [495, 496], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 67}}, {"id": 495, "type": "identifier", "text": "printf", "parent": 494, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 14}}, {"id": 496, "type": "argument_list", "text": "(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\")", "parent": 494, "children": [497, 499], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 67}}, {"id": 497, "type": "string_literal", "text": "\"BMP280: found %s\\n\"", "parent": 496, "children": [498], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 35}}, {"id": 498, "type": "escape_sequence", "text": "\\n", "parent": 497, "children": [], "start_point": {"row": 125, "column": 32}, "end_point": {"row": 125, "column": 34}}, {"id": 499, "type": "conditional_expression", "text": "bme280p ? \"BME280\" : \"BMP280\"", "parent": 496, "children": [500, 501, 502, 503], "start_point": {"row": 125, "column": 37}, "end_point": {"row": 125, "column": 66}}, {"id": 500, "type": "identifier", "text": "bme280p", "parent": 499, "children": [], "start_point": {"row": 125, "column": 37}, "end_point": {"row": 125, "column": 44}}, {"id": 501, "type": "?", "text": "?", "parent": 499, "children": [], "start_point": {"row": 125, "column": 45}, "end_point": {"row": 125, "column": 46}}, {"id": 502, "type": "string_literal", "text": "\"BME280\"", "parent": 499, "children": [], "start_point": {"row": 125, "column": 47}, "end_point": {"row": 125, "column": 55}}, {"id": 503, "type": "string_literal", "text": "\"BMP280\"", "parent": 499, "children": [], "start_point": {"row": 125, "column": 58}, "end_point": {"row": 125, "column": 66}}, {"id": 504, "type": "while_statement", "text": "while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }", "parent": 457, "children": [505], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 144, "column": 9}}, {"id": 505, "type": "parenthesized_expression", "text": "(1)", "parent": 504, "children": [506], "start_point": {"row": 127, "column": 13}, "end_point": {"row": 127, "column": 16}}, {"id": 506, "type": "number_literal", "text": "1", "parent": 505, "children": [], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 15}}, {"id": 507, "type": "call_expression", "text": "vTaskDelay(1000 / portTICK_PERIOD_MS)", "parent": 504, "children": [508, 509], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 49}}, {"id": 508, "type": "identifier", "text": "vTaskDelay", "parent": 507, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 22}}, {"id": 509, "type": "argument_list", "text": "(1000 / portTICK_PERIOD_MS)", "parent": 507, "children": [510], "start_point": {"row": 128, "column": 22}, "end_point": {"row": 128, "column": 49}}, {"id": 510, "type": "binary_expression", "text": "1000 / portTICK_PERIOD_MS", "parent": 509, "children": [511, 512, 513], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 48}}, {"id": 511, "type": "number_literal", "text": "1000", "parent": 510, "children": [], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 27}}, {"id": 512, "type": "/", "text": "/", "parent": 510, "children": [], "start_point": {"row": 128, "column": 28}, "end_point": {"row": 128, "column": 29}}, {"id": 513, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 510, "children": [], "start_point": {"row": 128, "column": 30}, "end_point": {"row": 128, "column": 48}}, {"id": 514, "type": "if_statement", "text": "if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }", "parent": 504, "children": [515], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 132, "column": 13}}, {"id": 515, "type": "parenthesized_expression", "text": "(!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity))", "parent": 514, "children": [516], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 84}}, {"id": 516, "type": "unary_expression", "text": "!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)", "parent": 515, "children": [517, 518], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 83}}, {"id": 517, "type": "!", "text": "!", "parent": 516, "children": [], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 17}}, {"id": 518, "type": "call_expression", "text": "bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)", "parent": 516, "children": [519, 520], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 83}}, {"id": 519, "type": "identifier", "text": "bmp280_read_float", "parent": 518, "children": [], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 34}}, {"id": 520, "type": "argument_list", "text": "(&bmp280_dev, &temperature, &pressure, &humidity)", "parent": 518, "children": [521, 523, 525, 527], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 83}}, {"id": 521, "type": "pointer_expression", "text": "&bmp280_dev", "parent": 520, "children": [522], "start_point": {"row": 129, "column": 35}, "end_point": {"row": 129, "column": 46}}, {"id": 522, "type": "identifier", "text": "bmp280_dev", "parent": 521, "children": [], "start_point": {"row": 129, "column": 36}, "end_point": {"row": 129, "column": 46}}, {"id": 523, "type": "pointer_expression", "text": "&temperature", "parent": 520, "children": [524], "start_point": {"row": 129, "column": 48}, "end_point": {"row": 129, "column": 60}}, {"id": 524, "type": "identifier", "text": "temperature", "parent": 523, "children": [], "start_point": {"row": 129, "column": 49}, "end_point": {"row": 129, "column": 60}}, {"id": 525, "type": "pointer_expression", "text": "&pressure", "parent": 520, "children": [526], "start_point": {"row": 129, "column": 62}, "end_point": {"row": 129, "column": 71}}, {"id": 526, "type": "identifier", "text": "pressure", "parent": 525, "children": [], "start_point": {"row": 129, "column": 63}, "end_point": {"row": 129, "column": 71}}, {"id": 527, "type": "pointer_expression", "text": "&humidity", "parent": 520, "children": [528], "start_point": {"row": 129, "column": 73}, "end_point": {"row": 129, "column": 82}}, {"id": 528, "type": "identifier", "text": "humidity", "parent": 527, "children": [], "start_point": {"row": 129, "column": 74}, "end_point": {"row": 129, "column": 82}}, {"id": 529, "type": "call_expression", "text": "printf(\"Temperature/pressure reading failed\\n\")", "parent": 514, "children": [530, 531], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 63}}, {"id": 530, "type": "identifier", "text": "printf", "parent": 529, "children": [], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 22}}, {"id": 531, "type": "argument_list", "text": "(\"Temperature/pressure reading failed\\n\")", "parent": 529, "children": [532], "start_point": {"row": 130, "column": 22}, "end_point": {"row": 130, "column": 63}}, {"id": 532, "type": "string_literal", "text": "\"Temperature/pressure reading failed\\n\"", "parent": 531, "children": [533], "start_point": {"row": 130, "column": 23}, "end_point": {"row": 130, "column": 62}}, {"id": 533, "type": "escape_sequence", "text": "\\n", "parent": 532, "children": [], "start_point": {"row": 130, "column": 59}, "end_point": {"row": 130, "column": 61}}, {"id": 534, "type": "break_statement", "text": "break;", "parent": 514, "children": [535], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 22}}, {"id": 535, "type": "break", "text": "break", "parent": 534, "children": [], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 21}}, {"id": 536, "type": "call_expression", "text": "printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature)", "parent": 504, "children": [537, 538], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 83}}, {"id": 537, "type": "identifier", "text": "printf", "parent": 536, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 18}}, {"id": 538, "type": "argument_list", "text": "(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature)", "parent": 536, "children": [539, 540, 541], "start_point": {"row": 133, "column": 18}, "end_point": {"row": 133, "column": 83}}, {"id": 539, "type": "string_literal", "text": "\"Pressure: %.2f Pa, Temperature: %.2f C\"", "parent": 538, "children": [], "start_point": {"row": 133, "column": 19}, "end_point": {"row": 133, "column": 59}}, {"id": 540, "type": "identifier", "text": "pressure", "parent": 538, "children": [], "start_point": {"row": 133, "column": 61}, "end_point": {"row": 133, "column": 69}}, {"id": 541, "type": "identifier", "text": "temperature", "parent": 538, "children": [], "start_point": {"row": 133, "column": 71}, "end_point": {"row": 133, "column": 82}}, {"id": 542, "type": "if_statement", "text": "if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");", "parent": 504, "children": [543, 551], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 137, "column": 29}}, {"id": 543, "type": "parenthesized_expression", "text": "(bme280p)", "parent": 542, "children": [544], "start_point": {"row": 134, "column": 15}, "end_point": {"row": 134, "column": 24}}, {"id": 544, "type": "identifier", "text": "bme280p", "parent": 543, "children": [], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 23}}, {"id": 545, "type": "call_expression", "text": "printf(\", Humidity: %.2f\\n\", humidity)", "parent": 542, "children": [546, 547], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 54}}, {"id": 546, "type": "identifier", "text": "printf", "parent": 545, "children": [], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 22}}, {"id": 547, "type": "argument_list", "text": "(\", Humidity: %.2f\\n\", humidity)", "parent": 545, "children": [548, 550], "start_point": {"row": 135, "column": 22}, "end_point": {"row": 135, "column": 54}}, {"id": 548, "type": "string_literal", "text": "\", Humidity: %.2f\\n\"", "parent": 547, "children": [549], "start_point": {"row": 135, "column": 23}, "end_point": {"row": 135, "column": 43}}, {"id": 549, "type": "escape_sequence", "text": "\\n", "parent": 548, "children": [], "start_point": {"row": 135, "column": 40}, "end_point": {"row": 135, "column": 42}}, {"id": 550, "type": "identifier", "text": "humidity", "parent": 547, "children": [], "start_point": {"row": 135, "column": 45}, "end_point": {"row": 135, "column": 53}}, {"id": 551, "type": "else_clause", "text": "else\n printf(\"\\n\");", "parent": 542, "children": [], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 137, "column": 29}}, {"id": 552, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 551, "children": [553, 554], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 28}}, {"id": 553, "type": "identifier", "text": "printf", "parent": 552, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 22}}, {"id": 554, "type": "argument_list", "text": "(\"\\n\")", "parent": 552, "children": [555], "start_point": {"row": 137, "column": 22}, "end_point": {"row": 137, "column": 28}}, {"id": 555, "type": "string_literal", "text": "\"\\n\"", "parent": 554, "children": [556], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 27}}, {"id": 556, "type": "escape_sequence", "text": "\\n", "parent": 555, "children": [], "start_point": {"row": 137, "column": 24}, "end_point": {"row": 137, "column": 26}}, {"id": 557, "type": "assignment_expression", "text": "current_temperature.value = HOMEKIT_FLOAT(temperature)", "parent": 504, "children": [558, 561, 562], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 66}}, {"id": 558, "type": "field_expression", "text": "current_temperature.value", "parent": 557, "children": [559, 560], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 37}}, {"id": 559, "type": "identifier", "text": "current_temperature", "parent": 558, "children": [], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 31}}, {"id": 560, "type": "field_identifier", "text": "value", "parent": 558, "children": [], "start_point": {"row": 139, "column": 32}, "end_point": {"row": 139, "column": 37}}, {"id": 561, "type": "=", "text": "=", "parent": 557, "children": [], "start_point": {"row": 139, "column": 38}, "end_point": {"row": 139, "column": 39}}, {"id": 562, "type": "call_expression", "text": "HOMEKIT_FLOAT(temperature)", "parent": 557, "children": [563, 564], "start_point": {"row": 139, "column": 40}, "end_point": {"row": 139, "column": 66}}, {"id": 563, "type": "identifier", "text": "HOMEKIT_FLOAT", "parent": 562, "children": [], "start_point": {"row": 139, "column": 40}, "end_point": {"row": 139, "column": 53}}, {"id": 564, "type": "argument_list", "text": "(temperature)", "parent": 562, "children": [565], "start_point": {"row": 139, "column": 53}, "end_point": {"row": 139, "column": 66}}, {"id": 565, "type": "identifier", "text": "temperature", "parent": 564, "children": [], "start_point": {"row": 139, "column": 54}, "end_point": {"row": 139, "column": 65}}, {"id": 566, "type": "assignment_expression", "text": "current_humidity.value = HOMEKIT_FLOAT(humidity)", "parent": 504, "children": [567, 570, 571], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 60}}, {"id": 567, "type": "field_expression", "text": "current_humidity.value", "parent": 566, "children": [568, 569], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 34}}, {"id": 568, "type": "identifier", "text": "current_humidity", "parent": 567, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 28}}, {"id": 569, "type": "field_identifier", "text": "value", "parent": 567, "children": [], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 34}}, {"id": 570, "type": "=", "text": "=", "parent": 566, "children": [], "start_point": {"row": 140, "column": 35}, "end_point": {"row": 140, "column": 36}}, {"id": 571, "type": "call_expression", "text": "HOMEKIT_FLOAT(humidity)", "parent": 566, "children": [572, 573], "start_point": {"row": 140, "column": 37}, "end_point": {"row": 140, "column": 60}}, {"id": 572, "type": "identifier", "text": "HOMEKIT_FLOAT", "parent": 571, "children": [], "start_point": {"row": 140, "column": 37}, "end_point": {"row": 140, "column": 50}}, {"id": 573, "type": "argument_list", "text": "(humidity)", "parent": 571, "children": [574], "start_point": {"row": 140, "column": 50}, "end_point": {"row": 140, "column": 60}}, {"id": 574, "type": "identifier", "text": "humidity", "parent": 573, "children": [], "start_point": {"row": 140, "column": 51}, "end_point": {"row": 140, "column": 59}}, {"id": 575, "type": "call_expression", "text": "homekit_characteristic_notify(&current_temperature, current_temperature.value)", "parent": 504, "children": [576, 577], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 90}}, {"id": 576, "type": "identifier", "text": "homekit_characteristic_notify", "parent": 575, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 41}}, {"id": 577, "type": "argument_list", "text": "(&current_temperature, current_temperature.value)", "parent": 575, "children": [578, 580], "start_point": {"row": 142, "column": 41}, "end_point": {"row": 142, "column": 90}}, {"id": 578, "type": "pointer_expression", "text": "&current_temperature", "parent": 577, "children": [579], "start_point": {"row": 142, "column": 42}, "end_point": {"row": 142, "column": 62}}, {"id": 579, "type": "identifier", "text": "current_temperature", "parent": 578, "children": [], "start_point": {"row": 142, "column": 43}, "end_point": {"row": 142, "column": 62}}, {"id": 580, "type": "field_expression", "text": "current_temperature.value", "parent": 577, "children": [581, 582], "start_point": {"row": 142, "column": 64}, "end_point": {"row": 142, "column": 89}}, {"id": 581, "type": "identifier", "text": "current_temperature", "parent": 580, "children": [], "start_point": {"row": 142, "column": 64}, "end_point": {"row": 142, "column": 83}}, {"id": 582, "type": "field_identifier", "text": "value", "parent": 580, "children": [], "start_point": {"row": 142, "column": 84}, "end_point": {"row": 142, "column": 89}}, {"id": 583, "type": "call_expression", "text": "homekit_characteristic_notify(&current_humidity, current_humidity.value)", "parent": 504, "children": [584, 585], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 84}}, {"id": 584, "type": "identifier", "text": "homekit_characteristic_notify", "parent": 583, "children": [], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 41}}, {"id": 585, "type": "argument_list", "text": "(&current_humidity, current_humidity.value)", "parent": 583, "children": [586, 588], "start_point": {"row": 143, "column": 41}, "end_point": {"row": 143, "column": 84}}, {"id": 586, "type": "pointer_expression", "text": "&current_humidity", "parent": 585, "children": [587], "start_point": {"row": 143, "column": 42}, "end_point": {"row": 143, "column": 59}}, {"id": 587, "type": "identifier", "text": "current_humidity", "parent": 586, "children": [], "start_point": {"row": 143, "column": 43}, "end_point": {"row": 143, "column": 59}}, {"id": 588, "type": "field_expression", "text": "current_humidity.value", "parent": 585, "children": [589, 590], "start_point": {"row": 143, "column": 61}, "end_point": {"row": 143, "column": 83}}, {"id": 589, "type": "identifier", "text": "current_humidity", "parent": 588, "children": [], "start_point": {"row": 143, "column": 61}, "end_point": {"row": 143, "column": 77}}, {"id": 590, "type": "field_identifier", "text": "value", "parent": 588, "children": [], "start_point": {"row": 143, "column": 78}, "end_point": {"row": 143, "column": 83}}, {"id": 591, "type": "#endif", "text": "#endif", "parent": 205, "children": [], "start_point": {"row": 147, "column": 0}, "end_point": {"row": 147, "column": 6}}, {"id": 592, "type": "function_definition", "text": "void temperature_sensor_init() {\n\n\t i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);\n\n#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, \"bmp280_task\", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, \"bmp280_task\", 256, NULL, 2, NULL);\n#endif\n\n\t gpio_enable(LED_GPIO, GPIO_OUTPUT);\n led_write(false);\n\n}", "parent": null, "children": [593, 594], "start_point": {"row": 149, "column": 0}, "end_point": {"row": 162, "column": 1}}, {"id": 593, "type": "primitive_type", "text": "void", "parent": 592, "children": [], "start_point": {"row": 149, "column": 0}, "end_point": {"row": 149, "column": 4}}, {"id": 594, "type": "function_declarator", "text": "temperature_sensor_init()", "parent": 592, "children": [595, 596], "start_point": {"row": 149, "column": 5}, "end_point": {"row": 149, "column": 30}}, {"id": 595, "type": "identifier", "text": "temperature_sensor_init", "parent": 594, "children": [], "start_point": {"row": 149, "column": 5}, "end_point": {"row": 149, "column": 28}}, {"id": 596, "type": "parameter_list", "text": "()", "parent": 594, "children": [], "start_point": {"row": 149, "column": 28}, "end_point": {"row": 149, "column": 30}}, {"id": 597, "type": "call_expression", "text": "i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K)", "parent": 592, "children": [598, 599], "start_point": {"row": 151, "column": 5}, "end_point": {"row": 151, "column": 55}}, {"id": 598, "type": "identifier", "text": "i2c_init", "parent": 597, "children": [], "start_point": {"row": 151, "column": 5}, "end_point": {"row": 151, "column": 13}}, {"id": 599, "type": "argument_list", "text": "(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K)", "parent": 597, "children": [600, 601, 602, 603], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 55}}, {"id": 600, "type": "identifier", "text": "i2c_bus", "parent": 599, "children": [], "start_point": {"row": 151, "column": 14}, "end_point": {"row": 151, "column": 21}}, {"id": 601, "type": "identifier", "text": "scl_pin", "parent": 599, "children": [], "start_point": {"row": 151, "column": 23}, "end_point": {"row": 151, "column": 30}}, {"id": 602, "type": "identifier", "text": "sda_pin", "parent": 599, "children": [], "start_point": {"row": 151, "column": 32}, "end_point": {"row": 151, "column": 39}}, {"id": 603, "type": "identifier", "text": "I2C_FREQ_400K", "parent": 599, "children": [], "start_point": {"row": 151, "column": 41}, "end_point": {"row": 151, "column": 54}}, {"id": 604, "type": "preproc_ifdef", "text": "#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, \"bmp280_task\", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, \"bmp280_task\", 256, NULL, 2, NULL);\n#endif", "parent": 592, "children": [605, 606, 618, 631], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 157, "column": 6}}, {"id": 605, "type": "#ifdef", "text": "#ifdef", "parent": 604, "children": [], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 153, "column": 6}}, {"id": 606, "type": "identifier", "text": "MODE_FORCED", "parent": 604, "children": [], "start_point": {"row": 153, "column": 7}, "end_point": {"row": 153, "column": 18}}, {"id": 607, "type": "call_expression", "text": "xTaskCreate(bmp280_task_forced, \"bmp280_task\", 256, NULL, 2, NULL)", "parent": 604, "children": [608, 609], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 70}}, {"id": 608, "type": "identifier", "text": "xTaskCreate", "parent": 607, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 15}}, {"id": 609, "type": "argument_list", "text": "(bmp280_task_forced, \"bmp280_task\", 256, NULL, 2, NULL)", "parent": 607, "children": [610, 611, 612, 613, 615, 616], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 70}}, {"id": 610, "type": "identifier", "text": "bmp280_task_forced", "parent": 609, "children": [], "start_point": {"row": 154, "column": 16}, "end_point": {"row": 154, "column": 34}}, {"id": 611, "type": "string_literal", "text": "\"bmp280_task\"", "parent": 609, "children": [], "start_point": {"row": 154, "column": 36}, "end_point": {"row": 154, "column": 49}}, {"id": 612, "type": "number_literal", "text": "256", "parent": 609, "children": [], "start_point": {"row": 154, "column": 51}, "end_point": {"row": 154, "column": 54}}, {"id": 613, "type": "null", "text": "NULL", "parent": 609, "children": [614], "start_point": {"row": 154, "column": 56}, "end_point": {"row": 154, "column": 60}}, {"id": 614, "type": "NULL", "text": "NULL", "parent": 613, "children": [], "start_point": {"row": 154, "column": 56}, "end_point": {"row": 154, "column": 60}}, {"id": 615, "type": "number_literal", "text": "2", "parent": 609, "children": [], "start_point": {"row": 154, "column": 62}, "end_point": {"row": 154, "column": 63}}, {"id": 616, "type": "null", "text": "NULL", "parent": 609, "children": [617], "start_point": {"row": 154, "column": 65}, "end_point": {"row": 154, "column": 69}}, {"id": 617, "type": "NULL", "text": "NULL", "parent": 616, "children": [], "start_point": {"row": 154, "column": 65}, "end_point": {"row": 154, "column": 69}}, {"id": 618, "type": "preproc_else", "text": "#else\n xTaskCreate(bmp280_task_normal, \"bmp280_task\", 256, NULL, 2, NULL);", "parent": 604, "children": [619], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 156, "column": 71}}, {"id": 619, "type": "#else", "text": "#else", "parent": 618, "children": [], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 155, "column": 5}}, {"id": 620, "type": "call_expression", "text": "xTaskCreate(bmp280_task_normal, \"bmp280_task\", 256, NULL, 2, NULL)", "parent": 618, "children": [621, 622], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 70}}, {"id": 621, "type": "identifier", "text": "xTaskCreate", "parent": 620, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 15}}, {"id": 622, "type": "argument_list", "text": "(bmp280_task_normal, \"bmp280_task\", 256, NULL, 2, NULL)", "parent": 620, "children": [623, 624, 625, 626, 628, 629], "start_point": {"row": 156, "column": 15}, "end_point": {"row": 156, "column": 70}}, {"id": 623, "type": "identifier", "text": "bmp280_task_normal", "parent": 622, "children": [], "start_point": {"row": 156, "column": 16}, "end_point": {"row": 156, "column": 34}}, {"id": 624, "type": "string_literal", "text": "\"bmp280_task\"", "parent": 622, "children": [], "start_point": {"row": 156, "column": 36}, "end_point": {"row": 156, "column": 49}}, {"id": 625, "type": "number_literal", "text": "256", "parent": 622, "children": [], "start_point": {"row": 156, "column": 51}, "end_point": {"row": 156, "column": 54}}, {"id": 626, "type": "null", "text": "NULL", "parent": 622, "children": [627], "start_point": {"row": 156, "column": 56}, "end_point": {"row": 156, "column": 60}}, {"id": 627, "type": "NULL", "text": "NULL", "parent": 626, "children": [], "start_point": {"row": 156, "column": 56}, "end_point": {"row": 156, "column": 60}}, {"id": 628, "type": "number_literal", "text": "2", "parent": 622, "children": [], "start_point": {"row": 156, "column": 62}, "end_point": {"row": 156, "column": 63}}, {"id": 629, "type": "null", "text": "NULL", "parent": 622, "children": [630], "start_point": {"row": 156, "column": 65}, "end_point": {"row": 156, "column": 69}}, {"id": 630, "type": "NULL", "text": "NULL", "parent": 629, "children": [], "start_point": {"row": 156, "column": 65}, "end_point": {"row": 156, "column": 69}}, {"id": 631, "type": "#endif", "text": "#endif", "parent": 604, "children": [], "start_point": {"row": 157, "column": 0}, "end_point": {"row": 157, "column": 6}}, {"id": 632, "type": "call_expression", "text": "gpio_enable(LED_GPIO, GPIO_OUTPUT)", "parent": 592, "children": [633, 634], "start_point": {"row": 159, "column": 2}, "end_point": {"row": 159, "column": 36}}, {"id": 633, "type": "identifier", "text": "gpio_enable", "parent": 632, "children": [], "start_point": {"row": 159, "column": 2}, "end_point": {"row": 159, "column": 13}}, {"id": 634, "type": "argument_list", "text": "(LED_GPIO, GPIO_OUTPUT)", "parent": 632, "children": [635, 636], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 36}}, {"id": 635, "type": "identifier", "text": "LED_GPIO", "parent": 634, "children": [], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 22}}, {"id": 636, "type": "identifier", "text": "GPIO_OUTPUT", "parent": 634, "children": [], "start_point": {"row": 159, "column": 24}, "end_point": {"row": 159, "column": 35}}, {"id": 637, "type": "call_expression", "text": "led_write(false)", "parent": 592, "children": [638, 639], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 20}}, {"id": 638, "type": "identifier", "text": "led_write", "parent": 637, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 13}}, {"id": 639, "type": "argument_list", "text": "(false)", "parent": 637, "children": [640], "start_point": {"row": 160, "column": 13}, "end_point": {"row": 160, "column": 20}}, {"id": 640, "type": "false", "text": "false", "parent": 639, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 19}}, {"id": 641, "type": "declaration", "text": "homekit_accessory_t *accessories[] = {\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n};", "parent": null, "children": [642, 643], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 189, "column": 2}}, {"id": 642, "type": "type_identifier", "text": "homekit_accessory_t", "parent": 641, "children": [], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 19}}, {"id": 643, "type": "init_declarator", "text": "*accessories[] = {\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n}", "parent": 641, "children": [644, 648, 649], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 189, "column": 1}}, {"id": 644, "type": "pointer_declarator", "text": "*accessories[]", "parent": 643, "children": [645, 646], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 165, "column": 34}}, {"id": 645, "type": "*", "text": "*", "parent": 644, "children": [], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 165, "column": 21}}, {"id": 646, "type": "array_declarator", "text": "accessories[]", "parent": 644, "children": [647], "start_point": {"row": 165, "column": 21}, "end_point": {"row": 165, "column": 34}}, {"id": 647, "type": "identifier", "text": "accessories", "parent": 646, "children": [], "start_point": {"row": 165, "column": 21}, "end_point": {"row": 165, "column": 32}}, {"id": 648, "type": "=", "text": "=", "parent": 643, "children": [], "start_point": {"row": 165, "column": 35}, "end_point": {"row": 165, "column": 36}}, {"id": 649, "type": "initializer_list", "text": "{\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n}", "parent": 643, "children": [650, 656, 661, 774], "start_point": {"row": 165, "column": 37}, "end_point": {"row": 189, "column": 1}}, {"id": 650, "type": "assignment_expression", "text": "HOMEKIT_ACCESSORY(.id=1", "parent": 649, "children": [651, 654, 655], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 27}}, {"id": 651, "type": "field_expression", "text": "HOMEKIT_ACCESSORY(.id", "parent": 650, "children": [652, 653], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 25}}, {"id": 652, "type": "identifier", "text": "HOMEKIT_ACCESSORY", "parent": 651, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 21}}, {"id": 653, "type": "field_identifier", "text": "id", "parent": 651, "children": [], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 25}}, {"id": 654, "type": "=", "text": "=", "parent": 650, "children": [], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 26}}, {"id": 655, "type": "number_literal", "text": "1", "parent": 650, "children": [], "start_point": {"row": 166, "column": 26}, "end_point": {"row": 166, "column": 27}}, {"id": 656, "type": "initializer_pair", "text": ".category=homekit_accessory_category_thermostat", "parent": 649, "children": [657, 659, 660], "start_point": {"row": 166, "column": 29}, "end_point": {"row": 166, "column": 76}}, {"id": 657, "type": "field_designator", "text": ".category", "parent": 656, "children": [658], "start_point": {"row": 166, "column": 29}, "end_point": {"row": 166, "column": 38}}, {"id": 658, "type": "field_identifier", "text": "category", "parent": 657, "children": [], "start_point": {"row": 166, "column": 30}, "end_point": {"row": 166, "column": 38}}, {"id": 659, "type": "=", "text": "=", "parent": 656, "children": [], "start_point": {"row": 166, "column": 38}, "end_point": {"row": 166, "column": 39}}, {"id": 660, "type": "identifier", "text": "homekit_accessory_category_thermostat", "parent": 656, "children": [], "start_point": {"row": 166, "column": 39}, "end_point": {"row": 166, "column": 76}}, {"id": 661, "type": "initializer_pair", "text": ".services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }", "parent": 649, "children": [662, 664, 665], "start_point": {"row": 166, "column": 78}, "end_point": {"row": 187, "column": 5}}, {"id": 662, "type": "field_designator", "text": ".services", "parent": 661, "children": [663], "start_point": {"row": 166, "column": 78}, "end_point": {"row": 166, "column": 87}}, {"id": 663, "type": "field_identifier", "text": "services", "parent": 662, "children": [], "start_point": {"row": 166, "column": 79}, "end_point": {"row": 166, "column": 87}}, {"id": 664, "type": "=", "text": "=", "parent": 661, "children": [], "start_point": {"row": 166, "column": 87}, "end_point": {"row": 166, "column": 88}}, {"id": 665, "type": "compound_literal_expression", "text": "(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }", "parent": 661, "children": [666, 671], "start_point": {"row": 166, "column": 88}, "end_point": {"row": 187, "column": 5}}, {"id": 666, "type": "type_descriptor", "text": "homekit_service_t*[]", "parent": 665, "children": [667, 668], "start_point": {"row": 166, "column": 89}, "end_point": {"row": 166, "column": 109}}, {"id": 667, "type": "type_identifier", "text": "homekit_service_t", "parent": 666, "children": [], "start_point": {"row": 166, "column": 89}, "end_point": {"row": 166, "column": 106}}, {"id": 668, "type": "abstract_pointer_declarator", "text": "*[]", "parent": 666, "children": [669, 670], "start_point": {"row": 166, "column": 106}, "end_point": {"row": 166, "column": 109}}, {"id": 669, "type": "*", "text": "*", "parent": 668, "children": [], "start_point": {"row": 166, "column": 106}, "end_point": {"row": 166, "column": 107}}, {"id": 670, "type": "abstract_array_declarator", "text": "[]", "parent": 668, "children": [], "start_point": {"row": 166, "column": 107}, "end_point": {"row": 166, "column": 109}}, {"id": 671, "type": "initializer_list", "text": "{\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }", "parent": 665, "children": [672, 719, 748, 772], "start_point": {"row": 166, "column": 111}, "end_point": {"row": 187, "column": 5}}, {"id": 672, "type": "call_expression", "text": "HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n })", "parent": 671, "children": [673, 674], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 175, "column": 10}}, {"id": 673, "type": "identifier", "text": "HOMEKIT_SERVICE", "parent": 672, "children": [], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 167, "column": 23}}, {"id": 674, "type": "argument_list", "text": "(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n })", "parent": 672, "children": [675], "start_point": {"row": 167, "column": 23}, "end_point": {"row": 175, "column": 10}}, {"id": 675, "type": "assignment_expression", "text": "ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }", "parent": 674, "children": [676, 679, 680], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 175, "column": 9}}, {"id": 676, "type": "field_expression", "text": "ACCESSORY_INFORMATION, .characteristics", "parent": 675, "children": [677, 678], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 63}}, {"id": 677, "type": "identifier", "text": "ACCESSORY_INFORMATION", "parent": 676, "children": [], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 45}}, {"id": 678, "type": "field_identifier", "text": "characteristics", "parent": 676, "children": [], "start_point": {"row": 167, "column": 48}, "end_point": {"row": 167, "column": 63}}, {"id": 679, "type": "=", "text": "=", "parent": 675, "children": [], "start_point": {"row": 167, "column": 63}, "end_point": {"row": 167, "column": 64}}, {"id": 680, "type": "compound_literal_expression", "text": "(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }", "parent": 675, "children": [681, 686], "start_point": {"row": 167, "column": 64}, "end_point": {"row": 175, "column": 9}}, {"id": 681, "type": "type_descriptor", "text": "homekit_characteristic_t*[]", "parent": 680, "children": [682, 683], "start_point": {"row": 167, "column": 65}, "end_point": {"row": 167, "column": 92}}, {"id": 682, "type": "type_identifier", "text": "homekit_characteristic_t", "parent": 681, "children": [], "start_point": {"row": 167, "column": 65}, "end_point": {"row": 167, "column": 89}}, {"id": 683, "type": "abstract_pointer_declarator", "text": "*[]", "parent": 681, "children": [684, 685], "start_point": {"row": 167, "column": 89}, "end_point": {"row": 167, "column": 92}}, {"id": 684, "type": "*", "text": "*", "parent": 683, "children": [], "start_point": {"row": 167, "column": 89}, "end_point": {"row": 167, "column": 90}}, {"id": 685, "type": "abstract_array_declarator", "text": "[]", "parent": 683, "children": [], "start_point": {"row": 167, "column": 90}, "end_point": {"row": 167, "column": 92}}, {"id": 686, "type": "initializer_list", "text": "{\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }", "parent": 680, "children": [687, 692, 697, 702, 707, 712, 717], "start_point": {"row": 167, "column": 94}, "end_point": {"row": 175, "column": 9}}, {"id": 687, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\")", "parent": 686, "children": [688, 689], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 62}}, {"id": 688, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 687, "children": [], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 34}}, {"id": 689, "type": "argument_list", "text": "(NAME, \"Temperature Sensor\")", "parent": 687, "children": [690, 691], "start_point": {"row": 168, "column": 34}, "end_point": {"row": 168, "column": 62}}, {"id": 690, "type": "identifier", "text": "NAME", "parent": 689, "children": [], "start_point": {"row": 168, "column": 35}, "end_point": {"row": 168, "column": 39}}, {"id": 691, "type": "string_literal", "text": "\"Temperature Sensor\"", "parent": 689, "children": [], "start_point": {"row": 168, "column": 41}, "end_point": {"row": 168, "column": 61}}, {"id": 692, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\")", "parent": 686, "children": [693, 694], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 66}}, {"id": 693, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 692, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 34}}, {"id": 694, "type": "argument_list", "text": "(MANUFACTURER, \"Alex_Khmelenko\")", "parent": 692, "children": [695, 696], "start_point": {"row": 169, "column": 34}, "end_point": {"row": 169, "column": 66}}, {"id": 695, "type": "identifier", "text": "MANUFACTURER", "parent": 694, "children": [], "start_point": {"row": 169, "column": 35}, "end_point": {"row": 169, "column": 47}}, {"id": 696, "type": "string_literal", "text": "\"Alex_Khmelenko\"", "parent": 694, "children": [], "start_point": {"row": 169, "column": 49}, "end_point": {"row": 169, "column": 65}}, {"id": 697, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\")", "parent": 686, "children": [698, 699], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 61}}, {"id": 698, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 697, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 34}}, {"id": 699, "type": "argument_list", "text": "(SERIAL_NUMBER, \"Sprut.Ai\")", "parent": 697, "children": [700, 701], "start_point": {"row": 170, "column": 34}, "end_point": {"row": 170, "column": 61}}, {"id": 700, "type": "identifier", "text": "SERIAL_NUMBER", "parent": 699, "children": [], "start_point": {"row": 170, "column": 35}, "end_point": {"row": 170, "column": 48}}, {"id": 701, "type": "string_literal", "text": "\"Sprut.Ai\"", "parent": 699, "children": [], "start_point": {"row": 170, "column": 50}, "end_point": {"row": 170, "column": 60}}, {"id": 702, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\")", "parent": 686, "children": [703, 704], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 58}}, {"id": 703, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 702, "children": [], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 34}}, {"id": 704, "type": "argument_list", "text": "(MODEL, \"BMP280/BME280\")", "parent": 702, "children": [705, 706], "start_point": {"row": 171, "column": 34}, "end_point": {"row": 171, "column": 58}}, {"id": 705, "type": "identifier", "text": "MODEL", "parent": 704, "children": [], "start_point": {"row": 171, "column": 35}, "end_point": {"row": 171, "column": 40}}, {"id": 706, "type": "string_literal", "text": "\"BMP280/BME280\"", "parent": 704, "children": [], "start_point": {"row": 171, "column": 42}, "end_point": {"row": 171, "column": 57}}, {"id": 707, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\")", "parent": 686, "children": [708, 709], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 61}}, {"id": 708, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 707, "children": [], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 34}}, {"id": 709, "type": "argument_list", "text": "(FIRMWARE_REVISION, \"v0.1\")", "parent": 707, "children": [710, 711], "start_point": {"row": 172, "column": 34}, "end_point": {"row": 172, "column": 61}}, {"id": 710, "type": "identifier", "text": "FIRMWARE_REVISION", "parent": 709, "children": [], "start_point": {"row": 172, "column": 35}, "end_point": {"row": 172, "column": 52}}, {"id": 711, "type": "string_literal", "text": "\"v0.1\"", "parent": 709, "children": [], "start_point": {"row": 172, "column": 54}, "end_point": {"row": 172, "column": 60}}, {"id": 712, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify)", "parent": 686, "children": [713, 714], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 73}}, {"id": 713, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 712, "children": [], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 34}}, {"id": 714, "type": "argument_list", "text": "(IDENTIFY, temperature_sensor_identify)", "parent": 712, "children": [715, 716], "start_point": {"row": 173, "column": 34}, "end_point": {"row": 173, "column": 73}}, {"id": 715, "type": "identifier", "text": "IDENTIFY", "parent": 714, "children": [], "start_point": {"row": 173, "column": 35}, "end_point": {"row": 173, "column": 43}}, {"id": 716, "type": "identifier", "text": "temperature_sensor_identify", "parent": 714, "children": [], "start_point": {"row": 173, "column": 45}, "end_point": {"row": 173, "column": 72}}, {"id": 717, "type": "null", "text": "NULL", "parent": 686, "children": [718], "start_point": {"row": 174, "column": 12}, "end_point": {"row": 174, "column": 16}}, {"id": 718, "type": "NULL", "text": "NULL", "parent": 717, "children": [], "start_point": {"row": 174, "column": 12}, "end_point": {"row": 174, "column": 16}}, {"id": 719, "type": "call_expression", "text": "HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n })", "parent": 671, "children": [720, 721], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 180, "column": 10}}, {"id": 720, "type": "identifier", "text": "HOMEKIT_SERVICE", "parent": 719, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 23}}, {"id": 721, "type": "argument_list", "text": "(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n })", "parent": 719, "children": [722], "start_point": {"row": 176, "column": 23}, "end_point": {"row": 180, "column": 10}}, {"id": 722, "type": "assignment_expression", "text": "TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }", "parent": 721, "children": [723, 731, 732], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 180, "column": 9}}, {"id": 723, "type": "field_expression", "text": "TEMPERATURE_SENSOR, .primary=true, .characteristics", "parent": 722, "children": [724, 730], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 75}}, {"id": 724, "type": "assignment_expression", "text": "TEMPERATURE_SENSOR, .primary=true", "parent": 723, "children": [725, 728, 729], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 57}}, {"id": 725, "type": "field_expression", "text": "TEMPERATURE_SENSOR, .primary", "parent": 724, "children": [726, 727], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 52}}, {"id": 726, "type": "identifier", "text": "TEMPERATURE_SENSOR", "parent": 725, "children": [], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 42}}, {"id": 727, "type": "field_identifier", "text": "primary", "parent": 725, "children": [], "start_point": {"row": 176, "column": 45}, "end_point": {"row": 176, "column": 52}}, {"id": 728, "type": "=", "text": "=", "parent": 724, "children": [], "start_point": {"row": 176, "column": 52}, "end_point": {"row": 176, "column": 53}}, {"id": 729, "type": "true", "text": "true", "parent": 724, "children": [], "start_point": {"row": 176, "column": 53}, "end_point": {"row": 176, "column": 57}}, {"id": 730, "type": "field_identifier", "text": "characteristics", "parent": 723, "children": [], "start_point": {"row": 176, "column": 60}, "end_point": {"row": 176, "column": 75}}, {"id": 731, "type": "=", "text": "=", "parent": 722, "children": [], "start_point": {"row": 176, "column": 75}, "end_point": {"row": 176, "column": 76}}, {"id": 732, "type": "compound_literal_expression", "text": "(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }", "parent": 722, "children": [733, 738], "start_point": {"row": 176, "column": 76}, "end_point": {"row": 180, "column": 9}}, {"id": 733, "type": "type_descriptor", "text": "homekit_characteristic_t*[]", "parent": 732, "children": [734, 735], "start_point": {"row": 176, "column": 77}, "end_point": {"row": 176, "column": 104}}, {"id": 734, "type": "type_identifier", "text": "homekit_characteristic_t", "parent": 733, "children": [], "start_point": {"row": 176, "column": 77}, "end_point": {"row": 176, "column": 101}}, {"id": 735, "type": "abstract_pointer_declarator", "text": "*[]", "parent": 733, "children": [736, 737], "start_point": {"row": 176, "column": 101}, "end_point": {"row": 176, "column": 104}}, {"id": 736, "type": "*", "text": "*", "parent": 735, "children": [], "start_point": {"row": 176, "column": 101}, "end_point": {"row": 176, "column": 102}}, {"id": 737, "type": "abstract_array_declarator", "text": "[]", "parent": 735, "children": [], "start_point": {"row": 176, "column": 102}, "end_point": {"row": 176, "column": 104}}, {"id": 738, "type": "initializer_list", "text": "{\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }", "parent": 732, "children": [739, 744, 746], "start_point": {"row": 176, "column": 106}, "end_point": {"row": 180, "column": 9}}, {"id": 739, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\")", "parent": 738, "children": [740, 741], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 62}}, {"id": 740, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 739, "children": [], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 34}}, {"id": 741, "type": "argument_list", "text": "(NAME, \"Temperature Sensor\")", "parent": 739, "children": [742, 743], "start_point": {"row": 177, "column": 34}, "end_point": {"row": 177, "column": 62}}, {"id": 742, "type": "identifier", "text": "NAME", "parent": 741, "children": [], "start_point": {"row": 177, "column": 35}, "end_point": {"row": 177, "column": 39}}, {"id": 743, "type": "string_literal", "text": "\"Temperature Sensor\"", "parent": 741, "children": [], "start_point": {"row": 177, "column": 41}, "end_point": {"row": 177, "column": 61}}, {"id": 744, "type": "pointer_expression", "text": "&current_temperature", "parent": 738, "children": [745], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 32}}, {"id": 745, "type": "identifier", "text": "current_temperature", "parent": 744, "children": [], "start_point": {"row": 178, "column": 13}, "end_point": {"row": 178, "column": 32}}, {"id": 746, "type": "null", "text": "NULL", "parent": 738, "children": [747], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 16}}, {"id": 747, "type": "NULL", "text": "NULL", "parent": 746, "children": [], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 16}}, {"id": 748, "type": "call_expression", "text": "HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n })", "parent": 671, "children": [749, 750], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 185, "column": 10}}, {"id": 749, "type": "identifier", "text": "HOMEKIT_SERVICE", "parent": 748, "children": [], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 23}}, {"id": 750, "type": "argument_list", "text": "(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n })", "parent": 748, "children": [751], "start_point": {"row": 181, "column": 23}, "end_point": {"row": 185, "column": 10}}, {"id": 751, "type": "assignment_expression", "text": "HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }", "parent": 750, "children": [752, 755, 756], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 185, "column": 9}}, {"id": 752, "type": "field_expression", "text": "HUMIDITY_SENSOR, .characteristics", "parent": 751, "children": [753, 754], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 57}}, {"id": 753, "type": "identifier", "text": "HUMIDITY_SENSOR", "parent": 752, "children": [], "start_point": {"row": 181, "column": 24}, "end_point": {"row": 181, "column": 39}}, {"id": 754, "type": "field_identifier", "text": "characteristics", "parent": 752, "children": [], "start_point": {"row": 181, "column": 42}, "end_point": {"row": 181, "column": 57}}, {"id": 755, "type": "=", "text": "=", "parent": 751, "children": [], "start_point": {"row": 181, "column": 57}, "end_point": {"row": 181, "column": 58}}, {"id": 756, "type": "compound_literal_expression", "text": "(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }", "parent": 751, "children": [757, 762], "start_point": {"row": 181, "column": 58}, "end_point": {"row": 185, "column": 9}}, {"id": 757, "type": "type_descriptor", "text": "homekit_characteristic_t*[]", "parent": 756, "children": [758, 759], "start_point": {"row": 181, "column": 59}, "end_point": {"row": 181, "column": 86}}, {"id": 758, "type": "type_identifier", "text": "homekit_characteristic_t", "parent": 757, "children": [], "start_point": {"row": 181, "column": 59}, "end_point": {"row": 181, "column": 83}}, {"id": 759, "type": "abstract_pointer_declarator", "text": "*[]", "parent": 757, "children": [760, 761], "start_point": {"row": 181, "column": 83}, "end_point": {"row": 181, "column": 86}}, {"id": 760, "type": "*", "text": "*", "parent": 759, "children": [], "start_point": {"row": 181, "column": 83}, "end_point": {"row": 181, "column": 84}}, {"id": 761, "type": "abstract_array_declarator", "text": "[]", "parent": 759, "children": [], "start_point": {"row": 181, "column": 84}, "end_point": {"row": 181, "column": 86}}, {"id": 762, "type": "initializer_list", "text": "{\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }", "parent": 756, "children": [763, 768, 770], "start_point": {"row": 181, "column": 88}, "end_point": {"row": 185, "column": 9}}, {"id": 763, "type": "call_expression", "text": "HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\")", "parent": 762, "children": [764, 765], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 59}}, {"id": 764, "type": "identifier", "text": "HOMEKIT_CHARACTERISTIC", "parent": 763, "children": [], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 34}}, {"id": 765, "type": "argument_list", "text": "(NAME, \"Humidity Sensor\")", "parent": 763, "children": [766, 767], "start_point": {"row": 182, "column": 34}, "end_point": {"row": 182, "column": 59}}, {"id": 766, "type": "identifier", "text": "NAME", "parent": 765, "children": [], "start_point": {"row": 182, "column": 35}, "end_point": {"row": 182, "column": 39}}, {"id": 767, "type": "string_literal", "text": "\"Humidity Sensor\"", "parent": 765, "children": [], "start_point": {"row": 182, "column": 41}, "end_point": {"row": 182, "column": 58}}, {"id": 768, "type": "pointer_expression", "text": "&current_humidity", "parent": 762, "children": [769], "start_point": {"row": 183, "column": 12}, "end_point": {"row": 183, "column": 29}}, {"id": 769, "type": "identifier", "text": "current_humidity", "parent": 768, "children": [], "start_point": {"row": 183, "column": 13}, "end_point": {"row": 183, "column": 29}}, {"id": 770, "type": "null", "text": "NULL", "parent": 762, "children": [771], "start_point": {"row": 184, "column": 12}, "end_point": {"row": 184, "column": 16}}, {"id": 771, "type": "NULL", "text": "NULL", "parent": 770, "children": [], "start_point": {"row": 184, "column": 12}, "end_point": {"row": 184, "column": 16}}, {"id": 772, "type": "null", "text": "NULL", "parent": 671, "children": [773], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 12}}, {"id": 773, "type": "NULL", "text": "NULL", "parent": 772, "children": [], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 12}}, {"id": 774, "type": "null", "text": "NULL", "parent": 649, "children": [775], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 8}}, {"id": 775, "type": "NULL", "text": "NULL", "parent": 774, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 8}}, {"id": 776, "type": "declaration", "text": "homekit_server_config_t config = {\n .accessories = accessories,\n .password = \"<PASSWORD>\"\n};", "parent": null, "children": [777, 778], "start_point": {"row": 191, "column": 0}, "end_point": {"row": 194, "column": 2}}, {"id": 777, "type": "type_identifier", "text": "homekit_server_config_t", "parent": 776, "children": [], "start_point": {"row": 191, "column": 0}, "end_point": {"row": 191, "column": 23}}, {"id": 778, "type": "init_declarator", "text": "config = {\n .accessories = accessories,\n .password = \"<PASSWORD>\"\n}", "parent": 776, "children": [779, 780, 781], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 194, "column": 1}}, {"id": 779, "type": "identifier", "text": "config", "parent": 778, "children": [], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 30}}, {"id": 780, "type": "=", "text": "=", "parent": 778, "children": [], "start_point": {"row": 191, "column": 31}, "end_point": {"row": 191, "column": 32}}, {"id": 781, "type": "initializer_list", "text": "{\n .accessories = accessories,\n .password = \"<PASSWORD>\"\n}", "parent": 778, "children": [782, 787], "start_point": {"row": 191, "column": 33}, "end_point": {"row": 194, "column": 1}}, {"id": 782, "type": "initializer_pair", "text": ".accessories = accessories", "parent": 781, "children": [783, 785, 786], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 30}}, {"id": 783, "type": "field_designator", "text": ".accessories", "parent": 782, "children": [784], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 16}}, {"id": 784, "type": "field_identifier", "text": "accessories", "parent": 783, "children": [], "start_point": {"row": 192, "column": 5}, "end_point": {"row": 192, "column": 16}}, {"id": 785, "type": "=", "text": "=", "parent": 782, "children": [], "start_point": {"row": 192, "column": 17}, "end_point": {"row": 192, "column": 18}}, {"id": 786, "type": "identifier", "text": "accessories", "parent": 782, "children": [], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 30}}, {"id": 787, "type": "initializer_pair", "text": ".password = \"<PASSWORD>\"", "parent": 781, "children": [788, 790, 791], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 28}}, {"id": 788, "type": "field_designator", "text": ".password", "parent": 787, "children": [789], "start_point": {"row": 193, "column": 4}, "end_point": {"row": 193, "column": 13}}, {"id": 789, "type": "field_identifier", "text": "password", "parent": 788, "children": [], "start_point": {"row": 193, "column": 5}, "end_point": {"row": 193, "column": 13}}, {"id": 790, "type": "=", "text": "=", "parent": 787, "children": [], "start_point": {"row": 193, "column": 14}, "end_point": {"row": 193, "column": 15}}, {"id": 791, "type": "string_literal", "text": "\"<PASSWORD>\"", "parent": 787, "children": [], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 28}}, {"id": 792, "type": "function_definition", "text": "void on_wifi_ready() {\n homekit_server_init(&config);\n}", "parent": null, "children": [793, 794], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 198, "column": 1}}, {"id": 793, "type": "primitive_type", "text": "void", "parent": 792, "children": [], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 196, "column": 4}}, {"id": 794, "type": "function_declarator", "text": "on_wifi_ready()", "parent": 792, "children": [795, 796], "start_point": {"row": 196, "column": 5}, "end_point": {"row": 196, "column": 20}}, {"id": 795, "type": "identifier", "text": "on_wifi_ready", "parent": 794, "children": [], "start_point": {"row": 196, "column": 5}, "end_point": {"row": 196, "column": 18}}, {"id": 796, "type": "parameter_list", "text": "()", "parent": 794, "children": [], "start_point": {"row": 196, "column": 18}, "end_point": {"row": 196, "column": 20}}, {"id": 797, "type": "call_expression", "text": "homekit_server_init(&config)", "parent": 792, "children": [798, 799], "start_point": {"row": 197, "column": 4}, "end_point": {"row": 197, "column": 32}}, {"id": 798, "type": "identifier", "text": "homekit_server_init", "parent": 797, "children": [], "start_point": {"row": 197, "column": 4}, "end_point": {"row": 197, "column": 23}}, {"id": 799, "type": "argument_list", "text": "(&config)", "parent": 797, "children": [800], "start_point": {"row": 197, "column": 23}, "end_point": {"row": 197, "column": 32}}, {"id": 800, "type": "pointer_expression", "text": "&config", "parent": 799, "children": [801], "start_point": {"row": 197, "column": 24}, "end_point": {"row": 197, "column": 31}}, {"id": 801, "type": "identifier", "text": "config", "parent": 800, "children": [], "start_point": {"row": 197, "column": 25}, "end_point": {"row": 197, "column": 31}}, {"id": 802, "type": "function_definition", "text": "void user_init(void) {\n uart_set_baud(0, 115200);\n\n\n\n\t uint8_t macaddr[6];\n sdk_wifi_get_macaddr(STATION_IF, macaddr);\n int name_len = snprintf(NULL, 0, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3]);\n char *name_value = malloc(name_len + 1);\n snprintf(name_value, name_len + 1, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3]);\n name.value = HOMEKIT_STRING(name_value);\n\n wifi_config_init(\"Temperature Sensor\", NULL, on_wifi_ready);\n\n temperature_sensor_init();\n}", "parent": null, "children": [803, 804], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 215, "column": 1}}, {"id": 803, "type": "primitive_type", "text": "void", "parent": 802, "children": [], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 200, "column": 4}}, {"id": 804, "type": "function_declarator", "text": "user_init(void)", "parent": 802, "children": [805, 806], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 20}}, {"id": 805, "type": "identifier", "text": "user_init", "parent": 804, "children": [], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 14}}, {"id": 806, "type": "parameter_list", "text": "(void)", "parent": 804, "children": [807], "start_point": {"row": 200, "column": 14}, "end_point": {"row": 200, "column": 20}}, {"id": 807, "type": "parameter_declaration", "text": "void", "parent": 806, "children": [808], "start_point": {"row": 200, "column": 15}, "end_point": {"row": 200, "column": 19}}, {"id": 808, "type": "primitive_type", "text": "void", "parent": 807, "children": [], "start_point": {"row": 200, "column": 15}, "end_point": {"row": 200, "column": 19}}, {"id": 809, "type": "call_expression", "text": "uart_set_baud(0, 115200)", "parent": 802, "children": [810, 811], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 28}}, {"id": 810, "type": "identifier", "text": "uart_set_baud", "parent": 809, "children": [], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 17}}, {"id": 811, "type": "argument_list", "text": "(0, 115200)", "parent": 809, "children": [812, 813], "start_point": {"row": 201, "column": 17}, "end_point": {"row": 201, "column": 28}}, {"id": 812, "type": "number_literal", "text": "0", "parent": 811, "children": [], "start_point": {"row": 201, "column": 18}, "end_point": {"row": 201, "column": 19}}, {"id": 813, "type": "number_literal", "text": "115200", "parent": 811, "children": [], "start_point": {"row": 201, "column": 21}, "end_point": {"row": 201, "column": 27}}, {"id": 814, "type": "declaration", "text": "uint8_t macaddr[6];", "parent": 802, "children": [815, 816], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 205, "column": 21}}, {"id": 815, "type": "primitive_type", "text": "uint8_t", "parent": 814, "children": [], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 205, "column": 9}}, {"id": 816, "type": "array_declarator", "text": "macaddr[6]", "parent": 814, "children": [817, 818], "start_point": {"row": 205, "column": 10}, "end_point": {"row": 205, "column": 20}}, {"id": 817, "type": "identifier", "text": "macaddr", "parent": 816, "children": [], "start_point": {"row": 205, "column": 10}, "end_point": {"row": 205, "column": 17}}, {"id": 818, "type": "number_literal", "text": "6", "parent": 816, "children": [], "start_point": {"row": 205, "column": 18}, "end_point": {"row": 205, "column": 19}}, {"id": 819, "type": "call_expression", "text": "sdk_wifi_get_macaddr(STATION_IF, macaddr)", "parent": 802, "children": [820, 821], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 45}}, {"id": 820, "type": "identifier", "text": "sdk_wifi_get_macaddr", "parent": 819, "children": [], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 24}}, {"id": 821, "type": "argument_list", "text": "(STATION_IF, macaddr)", "parent": 819, "children": [822, 823], "start_point": {"row": 206, "column": 24}, "end_point": {"row": 206, "column": 45}}, {"id": 822, "type": "identifier", "text": "STATION_IF", "parent": 821, "children": [], "start_point": {"row": 206, "column": 25}, "end_point": {"row": 206, "column": 35}}, {"id": 823, "type": "identifier", "text": "macaddr", "parent": 821, "children": [], "start_point": {"row": 206, "column": 37}, "end_point": {"row": 206, "column": 44}}, {"id": 824, "type": "declaration", "text": "int name_len = snprintf(NULL, 0, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3]);", "parent": 802, "children": [825, 826], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 108}}, {"id": 825, "type": "primitive_type", "text": "int", "parent": 824, "children": [], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 7}}, {"id": 826, "type": "init_declarator", "text": "name_len = snprintf(NULL, 0, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3])", "parent": 824, "children": [827, 828, 829], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 207, "column": 107}}, {"id": 827, "type": "identifier", "text": "name_len", "parent": 826, "children": [], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 207, "column": 16}}, {"id": 828, "type": "=", "text": "=", "parent": 826, "children": [], "start_point": {"row": 207, "column": 17}, "end_point": {"row": 207, "column": 18}}, {"id": 829, "type": "call_expression", "text": "snprintf(NULL, 0, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3])", "parent": 826, "children": [830, 831], "start_point": {"row": 207, "column": 19}, "end_point": {"row": 207, "column": 107}}, {"id": 830, "type": "identifier", "text": "snprintf", "parent": 829, "children": [], "start_point": {"row": 207, "column": 19}, "end_point": {"row": 207, "column": 27}}, {"id": 831, "type": "argument_list", "text": "(NULL, 0, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3])", "parent": 829, "children": [832, 834, 835, 836, 839, 842], "start_point": {"row": 207, "column": 27}, "end_point": {"row": 207, "column": 107}}, {"id": 832, "type": "null", "text": "NULL", "parent": 831, "children": [833], "start_point": {"row": 207, "column": 28}, "end_point": {"row": 207, "column": 32}}, {"id": 833, "type": "NULL", "text": "NULL", "parent": 832, "children": [], "start_point": {"row": 207, "column": 28}, "end_point": {"row": 207, "column": 32}}, {"id": 834, "type": "number_literal", "text": "0", "parent": 831, "children": [], "start_point": {"row": 207, "column": 34}, "end_point": {"row": 207, "column": 35}}, {"id": 835, "type": "string_literal", "text": "\"Temperature Sensor-%02X%02X%02X\"", "parent": 831, "children": [], "start_point": {"row": 207, "column": 37}, "end_point": {"row": 207, "column": 70}}, {"id": 836, "type": "subscript_expression", "text": "macaddr[1]", "parent": 831, "children": [837, 838], "start_point": {"row": 207, "column": 72}, "end_point": {"row": 207, "column": 82}}, {"id": 837, "type": "identifier", "text": "macaddr", "parent": 836, "children": [], "start_point": {"row": 207, "column": 72}, "end_point": {"row": 207, "column": 79}}, {"id": 838, "type": "number_literal", "text": "1", "parent": 836, "children": [], "start_point": {"row": 207, "column": 80}, "end_point": {"row": 207, "column": 81}}, {"id": 839, "type": "subscript_expression", "text": "macaddr[2]", "parent": 831, "children": [840, 841], "start_point": {"row": 207, "column": 84}, "end_point": {"row": 207, "column": 94}}, {"id": 840, "type": "identifier", "text": "macaddr", "parent": 839, "children": [], "start_point": {"row": 207, "column": 84}, "end_point": {"row": 207, "column": 91}}, {"id": 841, "type": "number_literal", "text": "2", "parent": 839, "children": [], "start_point": {"row": 207, "column": 92}, "end_point": {"row": 207, "column": 93}}, {"id": 842, "type": "subscript_expression", "text": "macaddr[3]", "parent": 831, "children": [843, 844], "start_point": {"row": 207, "column": 96}, "end_point": {"row": 207, "column": 106}}, {"id": 843, "type": "identifier", "text": "macaddr", "parent": 842, "children": [], "start_point": {"row": 207, "column": 96}, "end_point": {"row": 207, "column": 103}}, {"id": 844, "type": "number_literal", "text": "3", "parent": 842, "children": [], "start_point": {"row": 207, "column": 104}, "end_point": {"row": 207, "column": 105}}, {"id": 845, "type": "declaration", "text": "char *name_value = malloc(name_len + 1);", "parent": 802, "children": [846, 847], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 44}}, {"id": 846, "type": "primitive_type", "text": "char", "parent": 845, "children": [], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 8}}, {"id": 847, "type": "init_declarator", "text": "*name_value = malloc(name_len + 1)", "parent": 845, "children": [848, 851, 852], "start_point": {"row": 208, "column": 9}, "end_point": {"row": 208, "column": 43}}, {"id": 848, "type": "pointer_declarator", "text": "*name_value", "parent": 847, "children": [849, 850], "start_point": {"row": 208, "column": 9}, "end_point": {"row": 208, "column": 20}}, {"id": 849, "type": "*", "text": "*", "parent": 848, "children": [], "start_point": {"row": 208, "column": 9}, "end_point": {"row": 208, "column": 10}}, {"id": 850, "type": "identifier", "text": "name_value", "parent": 848, "children": [], "start_point": {"row": 208, "column": 10}, "end_point": {"row": 208, "column": 20}}, {"id": 851, "type": "=", "text": "=", "parent": 847, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 22}}, {"id": 852, "type": "call_expression", "text": "malloc(name_len + 1)", "parent": 847, "children": [853, 854], "start_point": {"row": 208, "column": 23}, "end_point": {"row": 208, "column": 43}}, {"id": 853, "type": "identifier", "text": "malloc", "parent": 852, "children": [], "start_point": {"row": 208, "column": 23}, "end_point": {"row": 208, "column": 29}}, {"id": 854, "type": "argument_list", "text": "(name_len + 1)", "parent": 852, "children": [855], "start_point": {"row": 208, "column": 29}, "end_point": {"row": 208, "column": 43}}, {"id": 855, "type": "binary_expression", "text": "name_len + 1", "parent": 854, "children": [856, 857, 858], "start_point": {"row": 208, "column": 30}, "end_point": {"row": 208, "column": 42}}, {"id": 856, "type": "identifier", "text": "name_len", "parent": 855, "children": [], "start_point": {"row": 208, "column": 30}, "end_point": {"row": 208, "column": 38}}, {"id": 857, "type": "+", "text": "+", "parent": 855, "children": [], "start_point": {"row": 208, "column": 39}, "end_point": {"row": 208, "column": 40}}, {"id": 858, "type": "number_literal", "text": "1", "parent": 855, "children": [], "start_point": {"row": 208, "column": 41}, "end_point": {"row": 208, "column": 42}}, {"id": 859, "type": "call_expression", "text": "snprintf(name_value, name_len + 1, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3])", "parent": 802, "children": [860, 861], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 109}}, {"id": 860, "type": "identifier", "text": "snprintf", "parent": 859, "children": [], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 12}}, {"id": 861, "type": "argument_list", "text": "(name_value, name_len + 1, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3])", "parent": 859, "children": [862, 863, 867, 868, 871, 874], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 109}}, {"id": 862, "type": "identifier", "text": "name_value", "parent": 861, "children": [], "start_point": {"row": 209, "column": 13}, "end_point": {"row": 209, "column": 23}}, {"id": 863, "type": "binary_expression", "text": "name_len + 1", "parent": 861, "children": [864, 865, 866], "start_point": {"row": 209, "column": 25}, "end_point": {"row": 209, "column": 37}}, {"id": 864, "type": "identifier", "text": "name_len", "parent": 863, "children": [], "start_point": {"row": 209, "column": 25}, "end_point": {"row": 209, "column": 33}}, {"id": 865, "type": "+", "text": "+", "parent": 863, "children": [], "start_point": {"row": 209, "column": 34}, "end_point": {"row": 209, "column": 35}}, {"id": 866, "type": "number_literal", "text": "1", "parent": 863, "children": [], "start_point": {"row": 209, "column": 36}, "end_point": {"row": 209, "column": 37}}, {"id": 867, "type": "string_literal", "text": "\"Temperature Sensor-%02X%02X%02X\"", "parent": 861, "children": [], "start_point": {"row": 209, "column": 39}, "end_point": {"row": 209, "column": 72}}, {"id": 868, "type": "subscript_expression", "text": "macaddr[1]", "parent": 861, "children": [869, 870], "start_point": {"row": 209, "column": 74}, "end_point": {"row": 209, "column": 84}}, {"id": 869, "type": "identifier", "text": "macaddr", "parent": 868, "children": [], "start_point": {"row": 209, "column": 74}, "end_point": {"row": 209, "column": 81}}, {"id": 870, "type": "number_literal", "text": "1", "parent": 868, "children": [], "start_point": {"row": 209, "column": 82}, "end_point": {"row": 209, "column": 83}}, {"id": 871, "type": "subscript_expression", "text": "macaddr[2]", "parent": 861, "children": [872, 873], "start_point": {"row": 209, "column": 86}, "end_point": {"row": 209, "column": 96}}, {"id": 872, "type": "identifier", "text": "macaddr", "parent": 871, "children": [], "start_point": {"row": 209, "column": 86}, "end_point": {"row": 209, "column": 93}}, {"id": 873, "type": "number_literal", "text": "2", "parent": 871, "children": [], "start_point": {"row": 209, "column": 94}, "end_point": {"row": 209, "column": 95}}, {"id": 874, "type": "subscript_expression", "text": "macaddr[3]", "parent": 861, "children": [875, 876], "start_point": {"row": 209, "column": 98}, "end_point": {"row": 209, "column": 108}}, {"id": 875, "type": "identifier", "text": "macaddr", "parent": 874, "children": [], "start_point": {"row": 209, "column": 98}, "end_point": {"row": 209, "column": 105}}, {"id": 876, "type": "number_literal", "text": "3", "parent": 874, "children": [], "start_point": {"row": 209, "column": 106}, "end_point": {"row": 209, "column": 107}}, {"id": 877, "type": "assignment_expression", "text": "name.value = HOMEKIT_STRING(name_value)", "parent": 802, "children": [878, 881, 882], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 43}}, {"id": 878, "type": "field_expression", "text": "name.value", "parent": 877, "children": [879, 880], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 14}}, {"id": 879, "type": "identifier", "text": "name", "parent": 878, "children": [], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 8}}, {"id": 880, "type": "field_identifier", "text": "value", "parent": 878, "children": [], "start_point": {"row": 210, "column": 9}, "end_point": {"row": 210, "column": 14}}, {"id": 881, "type": "=", "text": "=", "parent": 877, "children": [], "start_point": {"row": 210, "column": 15}, "end_point": {"row": 210, "column": 16}}, {"id": 882, "type": "call_expression", "text": "HOMEKIT_STRING(name_value)", "parent": 877, "children": [883, 884], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 43}}, {"id": 883, "type": "identifier", "text": "HOMEKIT_STRING", "parent": 882, "children": [], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 31}}, {"id": 884, "type": "argument_list", "text": "(name_value)", "parent": 882, "children": [885], "start_point": {"row": 210, "column": 31}, "end_point": {"row": 210, "column": 43}}, {"id": 885, "type": "identifier", "text": "name_value", "parent": 884, "children": [], "start_point": {"row": 210, "column": 32}, "end_point": {"row": 210, "column": 42}}, {"id": 886, "type": "call_expression", "text": "wifi_config_init(\"Temperature Sensor\", NULL, on_wifi_ready)", "parent": 802, "children": [887, 888], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 63}}, {"id": 887, "type": "identifier", "text": "wifi_config_init", "parent": 886, "children": [], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 20}}, {"id": 888, "type": "argument_list", "text": "(\"Temperature Sensor\", NULL, on_wifi_ready)", "parent": 886, "children": [889, 890, 892], "start_point": {"row": 212, "column": 20}, "end_point": {"row": 212, "column": 63}}, {"id": 889, "type": "string_literal", "text": "\"Temperature Sensor\"", "parent": 888, "children": [], "start_point": {"row": 212, "column": 21}, "end_point": {"row": 212, "column": 41}}, {"id": 890, "type": "null", "text": "NULL", "parent": 888, "children": [891], "start_point": {"row": 212, "column": 43}, "end_point": {"row": 212, "column": 47}}, {"id": 891, "type": "NULL", "text": "NULL", "parent": 890, "children": [], "start_point": {"row": 212, "column": 43}, "end_point": {"row": 212, "column": 47}}, {"id": 892, "type": "identifier", "text": "on_wifi_ready", "parent": 888, "children": [], "start_point": {"row": 212, "column": 49}, "end_point": {"row": 212, "column": 62}}, {"id": 893, "type": "call_expression", "text": "temperature_sensor_init()", "parent": 802, "children": [894, 895], "start_point": {"row": 214, "column": 4}, "end_point": {"row": 214, "column": 29}}, {"id": 894, "type": "identifier", "text": "temperature_sensor_init", "parent": 893, "children": [], "start_point": {"row": 214, "column": 4}, "end_point": {"row": 214, "column": 27}}, {"id": 895, "type": "argument_list", "text": "()", "parent": 893, "children": [], "start_point": {"row": 214, "column": 27}, "end_point": {"row": 214, "column": 29}}]}, "node_categories": {"declarations": {"functions": [58, 60, 75, 77, 151, 153, 208, 210, 415, 417, 592, 594, 792, 794, 802, 804], "variables": [40, 46, 52, 63, 80, 86, 100, 156, 175, 185, 195, 213, 218, 221, 237, 282, 420, 425, 428, 438, 483, 641, 776, 807, 814, 824, 845], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34], "modules": [], "enums": []}, "statements": {"expressions": [66, 92, 96, 106, 110, 113, 117, 120, 124, 128, 131, 135, 138, 142, 146, 159, 164, 180, 190, 200, 226, 229, 232, 241, 242, 249, 250, 257, 260, 261, 263, 266, 268, 270, 275, 278, 287, 288, 293, 304, 306, 309, 314, 315, 317, 320, 322, 330, 331, 334, 337, 338, 340, 343, 345, 347, 349, 351, 358, 365, 367, 374, 380, 384, 389, 393, 397, 400, 402, 405, 408, 410, 433, 436, 442, 443, 450, 451, 458, 461, 462, 464, 467, 469, 471, 476, 479, 488, 489, 494, 505, 507, 510, 515, 516, 518, 521, 523, 525, 527, 529, 536, 543, 545, 552, 558, 562, 567, 571, 575, 578, 580, 583, 586, 588, 597, 607, 620, 632, 637, 651, 665, 672, 676, 680, 687, 692, 697, 702, 707, 712, 719, 723, 725, 732, 739, 744, 748, 752, 756, 763, 768, 797, 800, 809, 819, 829, 836, 839, 842, 852, 855, 859, 863, 868, 871, 874, 878, 882, 886, 893], "assignments": [231, 240, 248, 379, 388, 441, 449, 557, 566, 650, 675, 722, 724, 751, 877], "loops": [85, 99, 256, 259, 303, 329, 457, 460, 504], "conditionals": [38, 43, 49, 55, 61, 65, 67, 69, 70, 71, 78, 84, 89, 93, 97, 103, 107, 111, 114, 118, 123, 125, 129, 134, 136, 141, 143, 147, 154, 157, 158, 160, 165, 167, 176, 178, 181, 183, 186, 188, 191, 193, 196, 198, 201, 203, 205, 206, 207, 211, 217, 219, 220, 223, 224, 225, 227, 230, 233, 234, 236, 238, 239, 243, 244, 245, 247, 251, 252, 253, 255, 264, 267, 269, 271, 276, 281, 285, 289, 290, 292, 294, 298, 299, 307, 312, 313, 318, 321, 323, 332, 335, 336, 341, 344, 346, 348, 350, 352, 359, 362, 363, 364, 366, 368, 372, 375, 381, 382, 385, 387, 390, 391, 394, 396, 398, 401, 403, 404, 406, 409, 411, 412, 418, 424, 426, 427, 430, 431, 432, 434, 437, 439, 440, 444, 445, 446, 448, 452, 453, 454, 456, 465, 468, 470, 472, 477, 482, 486, 490, 491, 493, 495, 499, 500, 508, 513, 514, 519, 522, 524, 526, 528, 530, 537, 540, 541, 542, 544, 546, 550, 553, 559, 560, 563, 565, 568, 569, 572, 574, 576, 579, 581, 582, 584, 587, 589, 590, 591, 595, 598, 600, 601, 602, 603, 604, 605, 606, 608, 610, 621, 623, 631, 633, 635, 636, 638, 642, 647, 652, 653, 658, 660, 663, 667, 673, 677, 678, 682, 688, 690, 693, 695, 698, 700, 703, 705, 708, 710, 713, 715, 716, 720, 726, 727, 730, 734, 740, 742, 745, 749, 753, 754, 758, 764, 766, 769, 777, 779, 784, 786, 789, 795, 798, 801, 805, 810, 817, 820, 822, 823, 827, 830, 837, 840, 843, 850, 853, 856, 860, 862, 864, 869, 872, 875, 879, 880, 883, 885, 887, 892, 894], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 45, 51, 57, 73, 74, 91, 95, 105, 109, 121, 132, 139, 162, 168, 169, 172, 184, 194, 204, 258, 273, 279, 296, 301, 302, 305, 310, 325, 354, 361, 370, 377, 459, 474, 480, 497, 502, 503, 506, 511, 532, 539, 548, 555, 611, 612, 615, 624, 625, 628, 655, 691, 696, 701, 706, 711, 743, 767, 791, 812, 813, 818, 834, 835, 838, 841, 844, 858, 866, 867, 870, 873, 876, 889], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [657, 662, 783, 788]}}, "cross_language_map": {"function_declarations": [{"node_id": 58, "universal_type": "function", "name": "led_write", "text_snippet": "void led_write(bool on)\n{\n gpio_write(LED_GPIO, on ? 0 : 1);\n}"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "led_write(bool on)"}, {"node_id": 75, "universal_type": "function", "name": "identify_task", "text_snippet": "void identify_task(void *_args) {\n\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n "}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "identify_task(void *_args)"}, {"node_id": 151, "universal_type": "function", "name": "temperature_sensor_identify", "text_snippet": "void temperature_sensor_identify(homekit_value_t _value) {\n printf(\"Temperature sensor identify\\n"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "temperature_sensor_identify(homekit_value_t _value)"}, {"node_id": 208, "universal_type": "function", "name": "bmp280_task_forced", "text_snippet": "static void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure"}, {"node_id": 210, "universal_type": "function", "name": "unknown", "text_snippet": "bmp280_task_forced(void *pvParameters)"}, {"node_id": 415, "universal_type": "function", "name": "bmp280_task_normal", "text_snippet": "static void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure"}, {"node_id": 417, "universal_type": "function", "name": "unknown", "text_snippet": "bmp280_task_normal(void *pvParameters)"}, {"node_id": 592, "universal_type": "function", "name": "temperature_sensor_init", "text_snippet": "void temperature_sensor_init() {\n\n\t i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);\n\n#ifdef M"}, {"node_id": 594, "universal_type": "function", "name": "unknown", "text_snippet": "temperature_sensor_init()"}, {"node_id": 792, "universal_type": "function", "name": "on_wifi_ready", "text_snippet": "void on_wifi_ready() {\n homekit_server_init(&config);\n}"}, {"node_id": 794, "universal_type": "function", "name": "unknown", "text_snippet": "on_wifi_ready()"}, {"node_id": 802, "universal_type": "function", "name": "user_init", "text_snippet": "void user_init(void) {\n uart_set_baud(0, 115200);\n\n\n\n\t uint8_t macaddr[6];\n sdk_wifi_get_macad"}, {"node_id": 804, "universal_type": "function", "name": "unknown", "text_snippet": "user_init(void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <espressif/esp_wifi.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <espressif/esp_sta.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <esp/uart.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <esp8266.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <FreeRTOS.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <task.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <homekit/homekit.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <homekit/characteristics.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <wifi_config.h>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"i2c/i2c.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"bmp280/bmp280.h\"\n"}, {"node_id": 34, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <espressif/esp_wifi.h>\n#include <espressif/esp_sta.h>\n#include <esp/uart.h>\n#include <esp8266.h>\n#include <FreeRTOS.h>\n#include <task.h>\n\n#include <homekit/homekit.h>\n#include <homekit/characteristics.h>\n//#include \"wifi.h\"\n#include <wifi_config.h>\n#include \"i2c/i2c.h\"\n#include \"bmp280/bmp280.h\"\n\n#define LED_GPIO 2\n// In forced mode user initiate measurement each time.\n// In normal mode measurement is done continuously with specified standby time.\n// #define MODE_FORCED\nconst uint8_t i2c_bus = 0;\nconst uint8_t scl_pin = 0;\nconst uint8_t sda_pin = 4;\n\nvoid led_write(bool on)\n{\n gpio_write(LED_GPIO, on ? 0 : 1);\n}\n\nvoid identify_task(void *_args) {\n\n for (int i=0; i<3; i++) {\n for (int j=0; j<3; j++) {\n led_write(true);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n led_write(false);\n vTaskDelay(150 / portTICK_PERIOD_MS);\n }\n\n vTaskDelay(250 / portTICK_PERIOD_MS);\n }\n\n led_write(false);\n\n vTaskDelete(NULL);\n}\n\nvoid temperature_sensor_identify(homekit_value_t _value) {\n printf(\"Temperature sensor identify\\n\");\n\n xTaskCreate(identify_task, \"identify_task\", 128, NULL, 2, NULL);\n\n}\nhomekit_characteristic_t name = HOMEKIT_CHARACTERISTIC_(NAME, \"Temperature\");\nhomekit_characteristic_t current_temperature = HOMEKIT_CHARACTERISTIC_(CURRENT_TEMPERATURE, 0);\nhomekit_characteristic_t current_humidity = HOMEKIT_CHARACTERISTIC_(CURRENT_RELATIVE_HUMIDITY, 0);\n\n\n#ifdef MODE_FORCED\nstatic void bmp280_task_forced(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n params.mode = BMP280_MODE_FORCED;\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_force_measurement(&bmp280_dev)) {\n printf(\"Failed initiating measurement\\n\");\n break;\n }\n // wait for measurement to complete\n while (bmp280_is_measuring(&bmp280_dev)) {};\n\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#else\nstatic void bmp280_task_normal(void *pvParameters)\n{\n bmp280_params_t params;\n float pressure, temperature, humidity;\n\n bmp280_init_default_params(&params);\n\n bmp280_t bmp280_dev;\n bmp280_dev.i2c_dev.bus = i2c_bus;\n bmp280_dev.i2c_dev.addr = BMP280_I2C_ADDRESS_0;\n\n while (1) {\n while (!bmp280_init(&bmp280_dev, &params)) {\n printf(\"BMP280 initialization failed\\n\");\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n }\n\n bool bme280p = bmp280_dev.id == BME280_CHIP_ID;\n printf(\"BMP280: found %s\\n\", bme280p ? \"BME280\" : \"BMP280\");\n\n while(1) {\n vTaskDelay(1000 / portTICK_PERIOD_MS);\n if (!bmp280_read_float(&bmp280_dev, &temperature, &pressure, &humidity)) {\n printf(\"Temperature/pressure reading failed\\n\");\n break;\n }\n printf(\"Pressure: %.2f Pa, Temperature: %.2f C\", pressure, temperature);\n if (bme280p)\n printf(\", Humidity: %.2f\\n\", humidity);\n else\n printf(\"\\n\");\n\n current_temperature.value = HOMEKIT_FLOAT(temperature);\n current_humidity.value = HOMEKIT_FLOAT(humidity);\n\n homekit_characteristic_notify(&current_temperature, current_temperature.value);\n homekit_characteristic_notify(&current_humidity, current_humidity.value);\n }\n }\n}\n#endif\n\nvoid temperature_sensor_init() {\n\n\t i2c_init(i2c_bus, scl_pin, sda_pin, I2C_FREQ_400K);\n\n#ifdef MODE_FORCED\n xTaskCreate(bmp280_task_forced, \"bmp280_task\", 256, NULL, 2, NULL);\n#else\n xTaskCreate(bmp280_task_normal, \"bmp280_task\", 256, NULL, 2, NULL);\n#endif\n\n\t gpio_enable(LED_GPIO, GPIO_OUTPUT);\n led_write(false);\n\n}\n\n\nhomekit_accessory_t *accessories[] = {\n HOMEKIT_ACCESSORY(.id=1, .category=homekit_accessory_category_thermostat, .services=(homekit_service_t*[]) {\n HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n HOMEKIT_CHARACTERISTIC(MANUFACTURER, \"Alex_Khmelenko\"),\n HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, \"Sprut.Ai\"),\n HOMEKIT_CHARACTERISTIC(MODEL, \"BMP280/BME280\"),\n HOMEKIT_CHARACTERISTIC(FIRMWARE_REVISION, \"v0.1\"),\n HOMEKIT_CHARACTERISTIC(IDENTIFY, temperature_sensor_identify),\n NULL\n }),\n HOMEKIT_SERVICE(TEMPERATURE_SENSOR, .primary=true, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Temperature Sensor\"),\n &current_temperature,\n NULL\n }),\n HOMEKIT_SERVICE(HUMIDITY_SENSOR, .characteristics=(homekit_characteristic_t*[]) {\n HOMEKIT_CHARACTERISTIC(NAME, \"Humidity Sensor\"),\n &current_humidity,\n NULL\n }),\n NULL\n }),\n NULL\n};\n\nhomekit_server_config_t config = {\n .accessories = accessories,\n .password = \"<PASSWORD>\"\n};\n\nvoid on_wifi_ready() {\n homekit_server_init(&config);\n}\n\nvoid user_init(void) {\n uart_set_baud(0, 115200);\n\n\n\n\t uint8_t macaddr[6];\n sdk_wifi_get_macaddr(STATION_IF, macaddr);\n int name_len = snprintf(NULL, 0, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3]);\n char *name_value = malloc(name_len + 1);\n snprintf(name_value, name_len + 1, \"Temperature Sensor-%02X%02X%02X\", macaddr[1], macaddr[2], macaddr[3]);\n name.value = HOMEKIT_STRING(name_value);\n\n wifi_config_init(\"Temperature Sensor\", NULL, on_wifi_ready);\n\n temperature_sensor_init();\n}\n"}
297
c
#ifndef _M68K_CHECKSUM_H #define _M68K_CHECKSUM_H /* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) * * returns a 32-bit number suitable for feeding into itself * or csum_tcpudp_magic * * this function must be called with even lengths, except * for the last fragment, which may be odd * * it's best to have buff aligned on a 32-bit boundary */ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum); /* * the same as csum_partial, but copies from src while it * checksums * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary */ unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); /* * the same as csum_partial_copy, but copies from user space. * * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary */ extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *csum_err); #define csum_partial_copy_nocheck(src, dst, len, sum) \ csum_partial_copy((src), (dst), (len), (sum)) unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl); #if 0 /* DAVIDM - these are in arch/m68knommu/lib */ /* * This is a version of ip_compute_csum() optimized for IP headers, * which always checksum on 4 octet boundaries. * */ static inline unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) { unsigned int sum = 0; __asm__ ("subqw #1,%2\n" "1:\t" "movel %1@+,%/d0\n\t" "addxl %/d0,%0\n\t" "dbra %2,1b\n\t" "movel %0,%/d0\n\t" "swap %/d0\n\t" "addxw %/d0,%0\n\t" "clrw %/d0\n\t" "addxw %/d0,%0\n\t" : "=d" (sum), "=a" (iph), "=d" (ihl) : "0" (sum), "1" (iph), "2" (ihl) : "d0"); return ~sum; } #endif /* * Fold a partial checksum */ static inline unsigned int csum_fold(unsigned int sum) { #ifdef CONFIG_COLDFIRE sum = (sum & 0xffff) + (sum >> 16); sum = (sum & 0xffff) + (sum >> 16); #else unsigned int tmp = sum; __asm__("swap %1\n\t" "addw %1, %0\n\t" "clrw %1\n\t" "addxw %1, %0" : "=&d" (sum), "=&d" (tmp) : "0" (sum), "1" (sum)); #endif return ~sum; } /* * computes the checksum of the TCP/UDP pseudo-header * returns a 16-bit checksum, already complemented */ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, unsigned int sum) { __asm__ ("addl %1,%0\n\t" "addxl %4,%0\n\t" "addxl %5,%0\n\t" "clrl %1\n\t" "addxl %1,%0" : "=&d" (sum), "=&d" (saddr) : "0" (daddr), "1" (saddr), "d" (len + proto), "d"(sum)); return sum; } static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, unsigned int sum) { return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); } /* * this routine is used for miscellaneous IP-like checksums, mainly * in icmp.c */ #if 0 /* DAVIDM - these are in arch/m68knommu/lib */ static inline unsigned short ip_compute_csum(unsigned char * buff, int len) { return csum_fold (csum_partial(buff, len, 0)); } #else extern unsigned short ip_compute_csum(const unsigned char * buff, int len); #endif #define _HAVE_ARCH_IPV6_CSUM static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, __u32 len, unsigned short proto, unsigned int sum) { register unsigned long tmp; __asm__("addl %2@,%0\n\t" "movel %2@(4),%1\n\t" "addxl %1,%0\n\t" "movel %2@(8),%1\n\t" "addxl %1,%0\n\t" "movel %2@(12),%1\n\t" "addxl %1,%0\n\t" "movel %3@,%1\n\t" "addxl %1,%0\n\t" "movel %3@(4),%1\n\t" "addxl %1,%0\n\t" "movel %3@(8),%1\n\t" "addxl %1,%0\n\t" "movel %3@(12),%1\n\t" "addxl %1,%0\n\t" "addxl %4,%0\n\t" "clrl %1\n\t" "addxl %1,%0" : "=&d" (sum), "=&d" (tmp) : "a" (saddr), "a" (daddr), "d" (len + proto), "0" (sum)); return csum_fold(sum); } #endif /* _M68K_CHECKSUM_H */
26.01
148
(translation_unit) "#ifndef _M68K_CHECKSUM_H\n#define _M68K_CHECKSUM_H\n\n/*\n * computes the checksum of a memory block at buff, length len,\n * and adds in "sum" (32-bit)\n *\n * returns a 32-bit number suitable for feeding into itself\n * or csum_tcpudp_magic\n *\n * this function must be called with even lengths, except\n * for the last fragment, which may be odd\n *\n * it's best to have buff aligned on a 32-bit boundary\n */\nunsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);\n\n/*\n * the same as csum_partial, but copies from src while it\n * checksums\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nunsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);\n\n\n/*\n * the same as csum_partial_copy, but copies from user space.\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nextern unsigned int csum_partial_copy_from_user(const char *src, char *dst,\n int len, int sum, int *csum_err);\n\n#define csum_partial_copy_nocheck(src, dst, len, sum) \\n csum_partial_copy((src), (dst), (len), (sum))\n\nunsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\n/*\n * This is a version of ip_compute_csum() optimized for IP headers,\n * which always checksum on 4 octet boundaries.\n *\n */\nstatic inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n unsigned int sum = 0;\n\n __asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0");\n return ~sum;\n}\n#endif\n\n/*\n * Fold a partial checksum\n */\n\nstatic inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n sum = (sum & 0xffff) + (sum >> 16);\n sum = (sum & 0xffff) + (sum >> 16);\n#else\n unsigned int tmp = sum;\n __asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));\n#endif\n return ~sum;\n}\n\n\n/*\n * computes the checksum of the TCP/UDP pseudo-header\n * returns a 16-bit checksum, already complemented\n */\n\nstatic inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)\n{\n __asm__ ("addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (saddr)\n : "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum));\n return sum;\n}\n\nstatic inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)\n{\n return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}\n\n/*\n * this routine is used for miscellaneous IP-like checksums, mainly\n * in icmp.c\n */\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\nstatic inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n return csum_fold (csum_partial(buff, len, 0));\n}\n#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);\n#endif\n\n#define _HAVE_ARCH_IPV6_CSUM\nstatic __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n __u32 len, unsigned short proto, unsigned int sum) \n{\n register unsigned long tmp;\n __asm__("addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (tmp)\n : "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum));\n\n return csum_fold(sum);\n}\n\n#endif /* _M68K_CHECKSUM_H */\n" (preproc_ifdef) "#ifndef _M68K_CHECKSUM_H\n#define _M68K_CHECKSUM_H\n\n/*\n * computes the checksum of a memory block at buff, length len,\n * and adds in "sum" (32-bit)\n *\n * returns a 32-bit number suitable for feeding into itself\n * or csum_tcpudp_magic\n *\n * this function must be called with even lengths, except\n * for the last fragment, which may be odd\n *\n * it's best to have buff aligned on a 32-bit boundary\n */\nunsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);\n\n/*\n * the same as csum_partial, but copies from src while it\n * checksums\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nunsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);\n\n\n/*\n * the same as csum_partial_copy, but copies from user space.\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nextern unsigned int csum_partial_copy_from_user(const char *src, char *dst,\n int len, int sum, int *csum_err);\n\n#define csum_partial_copy_nocheck(src, dst, len, sum) \\n csum_partial_copy((src), (dst), (len), (sum))\n\nunsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\n/*\n * This is a version of ip_compute_csum() optimized for IP headers,\n * which always checksum on 4 octet boundaries.\n *\n */\nstatic inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n unsigned int sum = 0;\n\n __asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0");\n return ~sum;\n}\n#endif\n\n/*\n * Fold a partial checksum\n */\n\nstatic inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n sum = (sum & 0xffff) + (sum >> 16);\n sum = (sum & 0xffff) + (sum >> 16);\n#else\n unsigned int tmp = sum;\n __asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));\n#endif\n return ~sum;\n}\n\n\n/*\n * computes the checksum of the TCP/UDP pseudo-header\n * returns a 16-bit checksum, already complemented\n */\n\nstatic inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)\n{\n __asm__ ("addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (saddr)\n : "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum));\n return sum;\n}\n\nstatic inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)\n{\n return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}\n\n/*\n * this routine is used for miscellaneous IP-like checksums, mainly\n * in icmp.c\n */\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\nstatic inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n return csum_fold (csum_partial(buff, len, 0));\n}\n#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);\n#endif\n\n#define _HAVE_ARCH_IPV6_CSUM\nstatic __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n __u32 len, unsigned short proto, unsigned int sum) \n{\n register unsigned long tmp;\n __asm__("addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (tmp)\n : "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum));\n\n return csum_fold(sum);\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "_M68K_CHECKSUM_H" (preproc_def) "#define _M68K_CHECKSUM_H\n" (#define) "#define" (identifier) "_M68K_CHECKSUM_H" (comment) "/*\n * computes the checksum of a memory block at buff, length len,\n * and adds in "sum" (32-bit)\n *\n * returns a 32-bit number suitable for feeding into itself\n * or csum_tcpudp_magic\n *\n * this function must be called with even lengths, except\n * for the last fragment, which may be odd\n *\n * it's best to have buff aligned on a 32-bit boundary\n */" (declaration) "unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "csum_partial(const unsigned char * buff, int len, unsigned int sum)" (identifier) "csum_partial" (parameter_list) "(const unsigned char * buff, int len, unsigned int sum)" (() "(" (parameter_declaration) "const unsigned char * buff" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "* buff" (*) "*" (identifier) "buff" (,) "," (parameter_declaration) "int len" (primitive_type) "int" (identifier) "len" (,) "," (parameter_declaration) "unsigned int sum" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "sum" ()) ")" (;) ";" (comment) "/*\n * the same as csum_partial, but copies from src while it\n * checksums\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */" (declaration) "unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "csum_partial_copy(const char *src, char *dst, int len, int sum)" (identifier) "csum_partial_copy" (parameter_list) "(const char *src, char *dst, int len, int sum)" (() "(" (parameter_declaration) "const char *src" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*src" (*) "*" (identifier) "src" (,) "," (parameter_declaration) "char *dst" (primitive_type) "char" (pointer_declarator) "*dst" (*) "*" (identifier) "dst" (,) "," (parameter_declaration) "int len" (primitive_type) "int" (identifier) "len" (,) "," (parameter_declaration) "int sum" (primitive_type) "int" (identifier) "sum" ()) ")" (;) ";" (comment) "/*\n * the same as csum_partial_copy, but copies from user space.\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */" (declaration) "extern unsigned int csum_partial_copy_from_user(const char *src, char *dst,\n int len, int sum, int *csum_err);" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "csum_partial_copy_from_user(const char *src, char *dst,\n int len, int sum, int *csum_err)" (identifier) "csum_partial_copy_from_user" (parameter_list) "(const char *src, char *dst,\n int len, int sum, int *csum_err)" (() "(" (parameter_declaration) "const char *src" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*src" (*) "*" (identifier) "src" (,) "," (parameter_declaration) "char *dst" (primitive_type) "char" (pointer_declarator) "*dst" (*) "*" (identifier) "dst" (,) "," (parameter_declaration) "int len" (primitive_type) "int" (identifier) "len" (,) "," (parameter_declaration) "int sum" (primitive_type) "int" (identifier) "sum" (,) "," (parameter_declaration) "int *csum_err" (primitive_type) "int" (pointer_declarator) "*csum_err" (*) "*" (identifier) "csum_err" ()) ")" (;) ";" (preproc_function_def) "#define csum_partial_copy_nocheck(src, dst, len, sum) \\n csum_partial_copy((src), (dst), (len), (sum))\n" (#define) "#define" (identifier) "csum_partial_copy_nocheck" (preproc_params) "(src, dst, len, sum)" (() "(" (identifier) "src" (,) "," (identifier) "dst" (,) "," (identifier) "len" (,) "," (identifier) "sum" ()) ")" (preproc_arg) "csum_partial_copy((src), (dst), (len), (sum))" (declaration) "unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (function_declarator) "ip_fast_csum(unsigned char *iph, unsigned int ihl)" (identifier) "ip_fast_csum" (parameter_list) "(unsigned char *iph, unsigned int ihl)" (() "(" (parameter_declaration) "unsigned char *iph" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*iph" (*) "*" (identifier) "iph" (,) "," (parameter_declaration) "unsigned int ihl" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "ihl" ()) ")" (;) ";" (preproc_if) "#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\n/*\n * This is a version of ip_compute_csum() optimized for IP headers,\n * which always checksum on 4 octet boundaries.\n *\n */\nstatic inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n unsigned int sum = 0;\n\n __asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0");\n return ~sum;\n}\n#endif" (#if) "#if" (number_literal) "0" (comment) "/* DAVIDM - these are in arch/m68knommu/lib */" ( ) "\n" (comment) "/*\n * This is a version of ip_compute_csum() optimized for IP headers,\n * which always checksum on 4 octet boundaries.\n *\n */" (function_definition) "static inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n unsigned int sum = 0;\n\n __asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0");\n return ~sum;\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (function_declarator) "ip_fast_csum(unsigned char *iph, unsigned int ihl)" (identifier) "ip_fast_csum" (parameter_list) "(unsigned char *iph, unsigned int ihl)" (() "(" (parameter_declaration) "unsigned char *iph" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*iph" (*) "*" (identifier) "iph" (,) "," (parameter_declaration) "unsigned int ihl" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "ihl" ()) ")" (compound_statement) "{\n unsigned int sum = 0;\n\n __asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0");\n return ~sum;\n}" ({) "{" (declaration) "unsigned int sum = 0;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "sum = 0" (identifier) "sum" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "__asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0");" (gnu_asm_expression) "__asm__ ("subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"\n : "=d" (sum), "=a" (iph), "=d" (ihl)\n : "0" (sum), "1" (iph), "2" (ihl)\n : "d0")" (__asm__) "__asm__" (() "(" (concatenated_string) ""subqw #1,%2\n"\n "1:\t"\n "movel %1@+,%/d0\n\t"\n "addxl %/d0,%0\n\t"\n "dbra %2,1b\n\t"\n "movel %0,%/d0\n\t"\n "swap %/d0\n\t"\n "addxw %/d0,%0\n\t"\n "clrw %/d0\n\t"\n "addxw %/d0,%0\n\t"" (string_literal) ""subqw #1,%2\n"" (") """ (string_content) "subqw #1,%2" (escape_sequence) "\n" (") """ (string_literal) ""1:\t"" (") """ (string_content) "1:" (escape_sequence) "\t" (") """ (string_literal) ""movel %1@+,%/d0\n\t"" (") """ (string_content) "movel %1@+,%/d0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %/d0,%0\n\t"" (") """ (string_content) "addxl %/d0,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""dbra %2,1b\n\t"" (") """ (string_content) "dbra %2,1b" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %0,%/d0\n\t"" (") """ (string_content) "movel %0,%/d0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""swap %/d0\n\t"" (") """ (string_content) "swap %/d0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxw %/d0,%0\n\t"" (") """ (string_content) "addxw %/d0,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""clrw %/d0\n\t"" (") """ (string_content) "clrw %/d0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxw %/d0,%0\n\t"" (") """ (string_content) "addxw %/d0,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (gnu_asm_output_operand_list) ": "=d" (sum), "=a" (iph), "=d" (ihl)" (:) ":" (gnu_asm_output_operand) ""=d" (sum)" (string_literal) ""=d"" (") """ (string_content) "=d" (") """ (() "(" (identifier) "sum" ()) ")" (,) "," (gnu_asm_output_operand) ""=a" (iph)" (string_literal) ""=a"" (") """ (string_content) "=a" (") """ (() "(" (identifier) "iph" ()) ")" (,) "," (gnu_asm_output_operand) ""=d" (ihl)" (string_literal) ""=d"" (") """ (string_content) "=d" (") """ (() "(" (identifier) "ihl" ()) ")" (gnu_asm_input_operand_list) ": "0" (sum), "1" (iph), "2" (ihl)" (:) ":" (gnu_asm_input_operand) ""0" (sum)" (string_literal) ""0"" (") """ (string_content) "0" (") """ (() "(" (identifier) "sum" ()) ")" (,) "," (gnu_asm_input_operand) ""1" (iph)" (string_literal) ""1"" (") """ (string_content) "1" (") """ (() "(" (identifier) "iph" ()) ")" (,) "," (gnu_asm_input_operand) ""2" (ihl)" (string_literal) ""2"" (") """ (string_content) "2" (") """ (() "(" (identifier) "ihl" ()) ")" (gnu_asm_clobber_list) ": "d0"" (:) ":" (string_literal) ""d0"" (") """ (string_content) "d0" (") """ ()) ")" (;) ";" (return_statement) "return ~sum;" (return) "return" (unary_expression) "~sum" (~) "~" (identifier) "sum" (;) ";" (}) "}" (#endif) "#endif" (comment) "/*\n * Fold a partial checksum\n */" (function_definition) "static inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n sum = (sum & 0xffff) + (sum >> 16);\n sum = (sum & 0xffff) + (sum >> 16);\n#else\n unsigned int tmp = sum;\n __asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));\n#endif\n return ~sum;\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "csum_fold(unsigned int sum)" (identifier) "csum_fold" (parameter_list) "(unsigned int sum)" (() "(" (parameter_declaration) "unsigned int sum" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "sum" ()) ")" (compound_statement) "{\n#ifdef CONFIG_COLDFIRE\n sum = (sum & 0xffff) + (sum >> 16);\n sum = (sum & 0xffff) + (sum >> 16);\n#else\n unsigned int tmp = sum;\n __asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));\n#endif\n return ~sum;\n}" ({) "{" (preproc_ifdef) "#ifdef CONFIG_COLDFIRE\n sum = (sum & 0xffff) + (sum >> 16);\n sum = (sum & 0xffff) + (sum >> 16);\n#else\n unsigned int tmp = sum;\n __asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));\n#endif" (#ifdef) "#ifdef" (identifier) "CONFIG_COLDFIRE" (expression_statement) "sum = (sum & 0xffff) + (sum >> 16);" (assignment_expression) "sum = (sum & 0xffff) + (sum >> 16)" (identifier) "sum" (=) "=" (binary_expression) "(sum & 0xffff) + (sum >> 16)" (parenthesized_expression) "(sum & 0xffff)" (() "(" (binary_expression) "sum & 0xffff" (identifier) "sum" (&) "&" (number_literal) "0xffff" ()) ")" (+) "+" (parenthesized_expression) "(sum >> 16)" (() "(" (binary_expression) "sum >> 16" (identifier) "sum" (>>) ">>" (number_literal) "16" ()) ")" (;) ";" (expression_statement) "sum = (sum & 0xffff) + (sum >> 16);" (assignment_expression) "sum = (sum & 0xffff) + (sum >> 16)" (identifier) "sum" (=) "=" (binary_expression) "(sum & 0xffff) + (sum >> 16)" (parenthesized_expression) "(sum & 0xffff)" (() "(" (binary_expression) "sum & 0xffff" (identifier) "sum" (&) "&" (number_literal) "0xffff" ()) ")" (+) "+" (parenthesized_expression) "(sum >> 16)" (() "(" (binary_expression) "sum >> 16" (identifier) "sum" (>>) ">>" (number_literal) "16" ()) ")" (;) ";" (preproc_else) "#else\n unsigned int tmp = sum;\n __asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));" (#else) "#else" (declaration) "unsigned int tmp = sum;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "tmp = sum" (identifier) "tmp" (=) "=" (identifier) "sum" (;) ";" (expression_statement) "__asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum));" (gnu_asm_expression) "__asm__("swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"\n : "=&d" (sum), "=&d" (tmp)\n : "0" (sum), "1" (sum))" (__asm__) "__asm__" (() "(" (concatenated_string) ""swap %1\n\t"\n "addw %1, %0\n\t"\n "clrw %1\n\t"\n "addxw %1, %0"" (string_literal) ""swap %1\n\t"" (") """ (string_content) "swap %1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addw %1, %0\n\t"" (") """ (string_content) "addw %1, %0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""clrw %1\n\t"" (") """ (string_content) "clrw %1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxw %1, %0"" (") """ (string_content) "addxw %1, %0" (") """ (gnu_asm_output_operand_list) ": "=&d" (sum), "=&d" (tmp)" (:) ":" (gnu_asm_output_operand) ""=&d" (sum)" (string_literal) ""=&d"" (") """ (string_content) "=&d" (") """ (() "(" (identifier) "sum" ()) ")" (,) "," (gnu_asm_output_operand) ""=&d" (tmp)" (string_literal) ""=&d"" (") """ (string_content) "=&d" (") """ (() "(" (identifier) "tmp" ()) ")" (gnu_asm_input_operand_list) ": "0" (sum), "1" (sum)" (:) ":" (gnu_asm_input_operand) ""0" (sum)" (string_literal) ""0"" (") """ (string_content) "0" (") """ (() "(" (identifier) "sum" ()) ")" (,) "," (gnu_asm_input_operand) ""1" (sum)" (string_literal) ""1"" (") """ (string_content) "1" (") """ (() "(" (identifier) "sum" ()) ")" ()) ")" (;) ";" (#endif) "#endif" (return_statement) "return ~sum;" (return) "return" (unary_expression) "~sum" (~) "~" (identifier) "sum" (;) ";" (}) "}" (comment) "/*\n * computes the checksum of the TCP/UDP pseudo-header\n * returns a 16-bit checksum, already complemented\n */" (function_definition) "static inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)\n{\n __asm__ ("addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (saddr)\n : "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum));\n return sum;\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)" (identifier) "csum_tcpudp_nofold" (parameter_list) "(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)" (() "(" (parameter_declaration) "unsigned long saddr" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "saddr" (,) "," (parameter_declaration) "unsigned long daddr" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "daddr" (,) "," (parameter_declaration) "unsigned short len" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (identifier) "len" (,) "," (parameter_declaration) "unsigned short proto" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (identifier) "proto" (,) "," (parameter_declaration) "unsigned int sum" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "sum" ()) ")" (compound_statement) "{\n __asm__ ("addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (saddr)\n : "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum));\n return sum;\n}" ({) "{" (expression_statement) "__asm__ ("addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (saddr)\n : "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum));" (gnu_asm_expression) "__asm__ ("addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (saddr)\n : "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum))" (__asm__) "__asm__" (() "(" (concatenated_string) ""addl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "addxl %5,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"" (string_literal) ""addl %1,%0\n\t"" (") """ (string_content) "addl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %4,%0\n\t"" (") """ (string_content) "addxl %4,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %5,%0\n\t"" (") """ (string_content) "addxl %5,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""clrl %1\n\t"" (") """ (string_content) "clrl %1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0"" (") """ (string_content) "addxl %1,%0" (") """ (gnu_asm_output_operand_list) ": "=&d" (sum), "=&d" (saddr)" (:) ":" (gnu_asm_output_operand) ""=&d" (sum)" (string_literal) ""=&d"" (") """ (string_content) "=&d" (") """ (() "(" (identifier) "sum" ()) ")" (,) "," (gnu_asm_output_operand) ""=&d" (saddr)" (string_literal) ""=&d"" (") """ (string_content) "=&d" (") """ (() "(" (identifier) "saddr" ()) ")" (gnu_asm_input_operand_list) ": "0" (daddr), "1" (saddr), "d" (len + proto),\n "d"(sum)" (:) ":" (gnu_asm_input_operand) ""0" (daddr)" (string_literal) ""0"" (") """ (string_content) "0" (") """ (() "(" (identifier) "daddr" ()) ")" (,) "," (gnu_asm_input_operand) ""1" (saddr)" (string_literal) ""1"" (") """ (string_content) "1" (") """ (() "(" (identifier) "saddr" ()) ")" (,) "," (gnu_asm_input_operand) ""d" (len + proto)" (string_literal) ""d"" (") """ (string_content) "d" (") """ (() "(" (binary_expression) "len + proto" (identifier) "len" (+) "+" (identifier) "proto" ()) ")" (,) "," (gnu_asm_input_operand) ""d"(sum)" (string_literal) ""d"" (") """ (string_content) "d" (") """ (() "(" (identifier) "sum" ()) ")" ()) ")" (;) ";" (return_statement) "return sum;" (return) "return" (identifier) "sum" (;) ";" (}) "}" (function_definition) "static inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)\n{\n return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned short int" (unsigned) "unsigned" (short) "short" (primitive_type) "int" (function_declarator) "csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)" (identifier) "csum_tcpudp_magic" (parameter_list) "(unsigned long saddr, unsigned long daddr, unsigned short len,\n unsigned short proto, unsigned int sum)" (() "(" (parameter_declaration) "unsigned long saddr" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "saddr" (,) "," (parameter_declaration) "unsigned long daddr" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "daddr" (,) "," (parameter_declaration) "unsigned short len" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (identifier) "len" (,) "," (parameter_declaration) "unsigned short proto" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (identifier) "proto" (,) "," (parameter_declaration) "unsigned int sum" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "sum" ()) ")" (compound_statement) "{\n return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}" ({) "{" (return_statement) "return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));" (return) "return" (call_expression) "csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum))" (identifier) "csum_fold" (argument_list) "(csum_tcpudp_nofold(saddr,daddr,len,proto,sum))" (() "(" (call_expression) "csum_tcpudp_nofold(saddr,daddr,len,proto,sum)" (identifier) "csum_tcpudp_nofold" (argument_list) "(saddr,daddr,len,proto,sum)" (() "(" (identifier) "saddr" (,) "," (identifier) "daddr" (,) "," (identifier) "len" (,) "," (identifier) "proto" (,) "," (identifier) "sum" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "/*\n * this routine is used for miscellaneous IP-like checksums, mainly\n * in icmp.c\n */" (preproc_if) "#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\nstatic inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n return csum_fold (csum_partial(buff, len, 0));\n}\n#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);\n#endif" (#if) "#if" (number_literal) "0" (comment) "/* DAVIDM - these are in arch/m68knommu/lib */" ( ) "\n" (function_definition) "static inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n return csum_fold (csum_partial(buff, len, 0));\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (function_declarator) "ip_compute_csum(unsigned char * buff, int len)" (identifier) "ip_compute_csum" (parameter_list) "(unsigned char * buff, int len)" (() "(" (parameter_declaration) "unsigned char * buff" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "* buff" (*) "*" (identifier) "buff" (,) "," (parameter_declaration) "int len" (primitive_type) "int" (identifier) "len" ()) ")" (compound_statement) "{\n return csum_fold (csum_partial(buff, len, 0));\n}" ({) "{" (return_statement) "return csum_fold (csum_partial(buff, len, 0));" (return) "return" (call_expression) "csum_fold (csum_partial(buff, len, 0))" (identifier) "csum_fold" (argument_list) "(csum_partial(buff, len, 0))" (() "(" (call_expression) "csum_partial(buff, len, 0)" (identifier) "csum_partial" (argument_list) "(buff, len, 0)" (() "(" (identifier) "buff" (,) "," (identifier) "len" (,) "," (number_literal) "0" ()) ")" ()) ")" (;) ";" (}) "}" (preproc_else) "#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);" (#else) "#else" (declaration) "extern unsigned short ip_compute_csum(const unsigned char * buff, int len);" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (function_declarator) "ip_compute_csum(const unsigned char * buff, int len)" (identifier) "ip_compute_csum" (parameter_list) "(const unsigned char * buff, int len)" (() "(" (parameter_declaration) "const unsigned char * buff" (type_qualifier) "const" (const) "const" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "* buff" (*) "*" (identifier) "buff" (,) "," (parameter_declaration) "int len" (primitive_type) "int" (identifier) "len" ()) ")" (;) ";" (#endif) "#endif" (preproc_def) "#define _HAVE_ARCH_IPV6_CSUM\n" (#define) "#define" (identifier) "_HAVE_ARCH_IPV6_CSUM" (function_definition) "static __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n __u32 len, unsigned short proto, unsigned int sum) \n{\n register unsigned long tmp;\n __asm__("addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (tmp)\n : "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum));\n\n return csum_fold(sum);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "__inline__" (__inline__) "__inline__" (sized_type_specifier) "unsigned short int" (unsigned) "unsigned" (short) "short" (primitive_type) "int" (function_declarator) "csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n __u32 len, unsigned short proto, unsigned int sum)" (identifier) "csum_ipv6_magic" (parameter_list) "(struct in6_addr *saddr, struct in6_addr *daddr,\n __u32 len, unsigned short proto, unsigned int sum)" (() "(" (parameter_declaration) "struct in6_addr *saddr" (struct_specifier) "struct in6_addr" (struct) "struct" (type_identifier) "in6_addr" (pointer_declarator) "*saddr" (*) "*" (identifier) "saddr" (,) "," (parameter_declaration) "struct in6_addr *daddr" (struct_specifier) "struct in6_addr" (struct) "struct" (type_identifier) "in6_addr" (pointer_declarator) "*daddr" (*) "*" (identifier) "daddr" (,) "," (parameter_declaration) "__u32 len" (type_identifier) "__u32" (identifier) "len" (,) "," (parameter_declaration) "unsigned short proto" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (identifier) "proto" (,) "," (parameter_declaration) "unsigned int sum" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "sum" ()) ")" (compound_statement) "{\n register unsigned long tmp;\n __asm__("addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (tmp)\n : "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum));\n\n return csum_fold(sum);\n}" ({) "{" (declaration) "register unsigned long tmp;" (storage_class_specifier) "register" (register) "register" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "tmp" (;) ";" (expression_statement) "__asm__("addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (tmp)\n : "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum));" (gnu_asm_expression) "__asm__("addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"\n : "=&d" (sum), "=&d" (tmp)\n : "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum))" (__asm__) "__asm__" (() "(" (concatenated_string) ""addl %2@,%0\n\t"\n "movel %2@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %2@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@,%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(4),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(8),%1\n\t"\n "addxl %1,%0\n\t"\n "movel %3@(12),%1\n\t"\n "addxl %1,%0\n\t"\n "addxl %4,%0\n\t"\n "clrl %1\n\t"\n "addxl %1,%0"" (string_literal) ""addl %2@,%0\n\t"" (") """ (string_content) "addl %2@,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %2@(4),%1\n\t"" (") """ (string_content) "movel %2@(4),%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %2@(8),%1\n\t"" (") """ (string_content) "movel %2@(8),%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %2@(12),%1\n\t"" (") """ (string_content) "movel %2@(12),%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %3@,%1\n\t"" (") """ (string_content) "movel %3@,%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %3@(4),%1\n\t"" (") """ (string_content) "movel %3@(4),%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %3@(8),%1\n\t"" (") """ (string_content) "movel %3@(8),%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""movel %3@(12),%1\n\t"" (") """ (string_content) "movel %3@(12),%1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0\n\t"" (") """ (string_content) "addxl %1,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %4,%0\n\t"" (") """ (string_content) "addxl %4,%0" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""clrl %1\n\t"" (") """ (string_content) "clrl %1" (escape_sequence) "\n" (escape_sequence) "\t" (") """ (string_literal) ""addxl %1,%0"" (") """ (string_content) "addxl %1,%0" (") """ (gnu_asm_output_operand_list) ": "=&d" (sum), "=&d" (tmp)" (:) ":" (gnu_asm_output_operand) ""=&d" (sum)" (string_literal) ""=&d"" (") """ (string_content) "=&d" (") """ (() "(" (identifier) "sum" ()) ")" (,) "," (gnu_asm_output_operand) ""=&d" (tmp)" (string_literal) ""=&d"" (") """ (string_content) "=&d" (") """ (() "(" (identifier) "tmp" ()) ")" (gnu_asm_input_operand_list) ": "a" (saddr), "a" (daddr), "d" (len + proto),\n "0" (sum)" (:) ":" (gnu_asm_input_operand) ""a" (saddr)" (string_literal) ""a"" (") """ (string_content) "a" (") """ (() "(" (identifier) "saddr" ()) ")" (,) "," (gnu_asm_input_operand) ""a" (daddr)" (string_literal) ""a"" (") """ (string_content) "a" (") """ (() "(" (identifier) "daddr" ()) ")" (,) "," (gnu_asm_input_operand) ""d" (len + proto)" (string_literal) ""d"" (") """ (string_content) "d" (") """ (() "(" (binary_expression) "len + proto" (identifier) "len" (+) "+" (identifier) "proto" ()) ")" (,) "," (gnu_asm_input_operand) ""0" (sum)" (string_literal) ""0"" (") """ (string_content) "0" (") """ (() "(" (identifier) "sum" ()) ")" ()) ")" (;) ";" (return_statement) "return csum_fold(sum);" (return) "return" (call_expression) "csum_fold(sum)" (identifier) "csum_fold" (argument_list) "(sum)" (() "(" (identifier) "sum" ()) ")" (;) ";" (}) "}" (#endif) "#endif" (comment) "/* _M68K_CHECKSUM_H */"
1,009
0
{"language": "c", "success": true, "metadata": {"lines": 148, "avg_line_length": 26.01, "nodes": 595, "errors": 0, "source_hash": "1d62dd04905a57b6039a50a731b90570ffbc6124db2cfd3483b15c12af9dcdf7", "categorized_nodes": 334}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _M68K_CHECKSUM_H\n#define _M68K_CHECKSUM_H\n\n/*\n * computes the checksum of a memory block at buff, length len,\n * and adds in \"sum\" (32-bit)\n *\n * returns a 32-bit number suitable for feeding into itself\n * or csum_tcpudp_magic\n *\n * this function must be called with even lengths, except\n * for the last fragment, which may be odd\n *\n * it's best to have buff aligned on a 32-bit boundary\n */\nunsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);\n\n/*\n * the same as csum_partial, but copies from src while it\n * checksums\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nunsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);\n\n\n/*\n * the same as csum_partial_copy, but copies from user space.\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nextern unsigned int csum_partial_copy_from_user(const char *src, char *dst,\n\t\t\t\t\t\tint len, int sum, int *csum_err);\n\n#define csum_partial_copy_nocheck(src, dst, len, sum)\t\\\n\tcsum_partial_copy((src), (dst), (len), (sum))\n\nunsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\n/*\n *\tThis is a version of ip_compute_csum() optimized for IP headers,\n *\twhich always checksum on 4 octet boundaries.\n *\n */\nstatic inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n\tunsigned int sum = 0;\n\n\t__asm__ (\"subqw #1,%2\\n\"\n\t\t \"1:\\t\"\n\t\t \"movel %1@+,%/d0\\n\\t\"\n\t\t \"addxl %/d0,%0\\n\\t\"\n\t\t \"dbra %2,1b\\n\\t\"\n\t\t \"movel %0,%/d0\\n\\t\"\n\t\t \"swap %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t \"clrw %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t : \"=d\" (sum), \"=a\" (iph), \"=d\" (ihl)\n\t\t : \"0\" (sum), \"1\" (iph), \"2\" (ihl)\n\t\t : \"d0\");\n\treturn ~sum;\n}\n#endif\n\n/*\n *\tFold a partial checksum\n */\n\nstatic inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n\tsum = (sum & 0xffff) + (sum >> 16);\n\tsum = (sum & 0xffff) + (sum >> 16);\n#else\n\tunsigned int tmp = sum;\n\t__asm__(\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"0\" (sum), \"1\" (sum));\n#endif\n\treturn ~sum;\n}\n\n\n/*\n * computes the checksum of the TCP/UDP pseudo-header\n * returns a 16-bit checksum, already complemented\n */\n\nstatic inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)\n{\n\t__asm__ (\"addl %1,%0\\n\\t\"\n\t\t \"addxl %4,%0\\n\\t\"\n\t\t \"addxl %5,%0\\n\\t\"\n\t\t \"clrl %1\\n\\t\"\n\t\t \"addxl %1,%0\"\n\t\t : \"=&d\" (sum), \"=&d\" (saddr)\n\t\t : \"0\" (daddr), \"1\" (saddr), \"d\" (len + proto),\n\t\t \"d\"(sum));\n\treturn sum;\n}\n\nstatic inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)\n{\n\treturn csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}\n\n/*\n * this routine is used for miscellaneous IP-like checksums, mainly\n * in icmp.c\n */\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\nstatic inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n\treturn csum_fold (csum_partial(buff, len, 0));\n}\n#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);\n#endif\n\n#define _HAVE_ARCH_IPV6_CSUM\nstatic __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n\t\t__u32 len, unsigned short proto, unsigned int sum) \n{\n\tregister unsigned long tmp;\n\t__asm__(\"addl %2@,%0\\n\\t\"\n\t\t\"movel %2@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@,%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"addxl %4,%0\\n\\t\"\n\t\t\"clrl %1\\n\\t\"\n\t\t\"addxl %1,%0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"a\" (saddr), \"a\" (daddr), \"d\" (len + proto),\n\t\t \"0\" (sum));\n\n\treturn csum_fold(sum);\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 28, 51, 81, 90, 109, 200, 287, 362, 409, 464, 467, 594], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 166, "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": "_M68K_CHECKSUM_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define _M68K_CHECKSUM_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": "_M68K_CHECKSUM_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 6, "type": "declaration", "text": "unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);", "parent": 0, "children": [7, 10], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 81}}, {"id": 7, "type": "sized_type_specifier", "text": "unsigned int", "parent": 6, "children": [8, 9], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 12}}, {"id": 8, "type": "unsigned", "text": "unsigned", "parent": 7, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 7, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 12}}, {"id": 10, "type": "function_declarator", "text": "csum_partial(const unsigned char * buff, int len, unsigned int sum)", "parent": 6, "children": [11, 12], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 80}}, {"id": 11, "type": "identifier", "text": "csum_partial", "parent": 10, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 25}}, {"id": 12, "type": "parameter_list", "text": "(const unsigned char * buff, int len, unsigned int sum)", "parent": 10, "children": [13, 20, 23], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 80}}, {"id": 13, "type": "parameter_declaration", "text": "const unsigned char * buff", "parent": 12, "children": [14, 17], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 52}}, {"id": 14, "type": "sized_type_specifier", "text": "unsigned char", "parent": 13, "children": [15, 16], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 45}}, {"id": 15, "type": "unsigned", "text": "unsigned", "parent": 14, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 40}}, {"id": 16, "type": "primitive_type", "text": "char", "parent": 14, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 45}}, {"id": 17, "type": "pointer_declarator", "text": "* buff", "parent": 13, "children": [18, 19], "start_point": {"row": 15, "column": 46}, "end_point": {"row": 15, "column": 52}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 15, "column": 46}, "end_point": {"row": 15, "column": 47}}, {"id": 19, "type": "identifier", "text": "buff", "parent": 17, "children": [], "start_point": {"row": 15, "column": 48}, "end_point": {"row": 15, "column": 52}}, {"id": 20, "type": "parameter_declaration", "text": "int len", "parent": 12, "children": [21, 22], "start_point": {"row": 15, "column": 54}, "end_point": {"row": 15, "column": 61}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 15, "column": 54}, "end_point": {"row": 15, "column": 57}}, {"id": 22, "type": "identifier", "text": "len", "parent": 20, "children": [], "start_point": {"row": 15, "column": 58}, "end_point": {"row": 15, "column": 61}}, {"id": 23, "type": "parameter_declaration", "text": "unsigned int sum", "parent": 12, "children": [24, 27], "start_point": {"row": 15, "column": 63}, "end_point": {"row": 15, "column": 79}}, {"id": 24, "type": "sized_type_specifier", "text": "unsigned int", "parent": 23, "children": [25, 26], "start_point": {"row": 15, "column": 63}, "end_point": {"row": 15, "column": 75}}, {"id": 25, "type": "unsigned", "text": "unsigned", "parent": 24, "children": [], "start_point": {"row": 15, "column": 63}, "end_point": {"row": 15, "column": 71}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 15, "column": 72}, "end_point": {"row": 15, "column": 75}}, {"id": 27, "type": "identifier", "text": "sum", "parent": 23, "children": [], "start_point": {"row": 15, "column": 76}, "end_point": {"row": 15, "column": 79}}, {"id": 28, "type": "declaration", "text": "unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);", "parent": 0, "children": [29, 32], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 77}}, {"id": 29, "type": "sized_type_specifier", "text": "unsigned int", "parent": 28, "children": [30, 31], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 12}}, {"id": 30, "type": "unsigned", "text": "unsigned", "parent": 29, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 12}}, {"id": 32, "type": "function_declarator", "text": "csum_partial_copy(const char *src, char *dst, int len, int sum)", "parent": 28, "children": [33, 34], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 76}}, {"id": 33, "type": "identifier", "text": "csum_partial_copy", "parent": 32, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 30}}, {"id": 34, "type": "parameter_list", "text": "(const char *src, char *dst, int len, int sum)", "parent": 32, "children": [35, 40, 45, 48], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 76}}, {"id": 35, "type": "parameter_declaration", "text": "const char *src", "parent": 34, "children": [36, 37], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 46}}, {"id": 36, "type": "primitive_type", "text": "char", "parent": 35, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 41}}, {"id": 37, "type": "pointer_declarator", "text": "*src", "parent": 35, "children": [38, 39], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 46}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 43}}, {"id": 39, "type": "identifier", "text": "src", "parent": 37, "children": [], "start_point": {"row": 25, "column": 43}, "end_point": {"row": 25, "column": 46}}, {"id": 40, "type": "parameter_declaration", "text": "char *dst", "parent": 34, "children": [41, 42], "start_point": {"row": 25, "column": 48}, "end_point": {"row": 25, "column": 57}}, {"id": 41, "type": "primitive_type", "text": "char", "parent": 40, "children": [], "start_point": {"row": 25, "column": 48}, "end_point": {"row": 25, "column": 52}}, {"id": 42, "type": "pointer_declarator", "text": "*dst", "parent": 40, "children": [43, 44], "start_point": {"row": 25, "column": 53}, "end_point": {"row": 25, "column": 57}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 25, "column": 53}, "end_point": {"row": 25, "column": 54}}, {"id": 44, "type": "identifier", "text": "dst", "parent": 42, "children": [], "start_point": {"row": 25, "column": 54}, "end_point": {"row": 25, "column": 57}}, {"id": 45, "type": "parameter_declaration", "text": "int len", "parent": 34, "children": [46, 47], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 66}}, {"id": 46, "type": "primitive_type", "text": "int", "parent": 45, "children": [], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 62}}, {"id": 47, "type": "identifier", "text": "len", "parent": 45, "children": [], "start_point": {"row": 25, "column": 63}, "end_point": {"row": 25, "column": 66}}, {"id": 48, "type": "parameter_declaration", "text": "int sum", "parent": 34, "children": [49, 50], "start_point": {"row": 25, "column": 68}, "end_point": {"row": 25, "column": 75}}, {"id": 49, "type": "primitive_type", "text": "int", "parent": 48, "children": [], "start_point": {"row": 25, "column": 68}, "end_point": {"row": 25, "column": 71}}, {"id": 50, "type": "identifier", "text": "sum", "parent": 48, "children": [], "start_point": {"row": 25, "column": 72}, "end_point": {"row": 25, "column": 75}}, {"id": 51, "type": "declaration", "text": "extern unsigned int csum_partial_copy_from_user(const char *src, char *dst,\n\t\t\t\t\t\tint len, int sum, int *csum_err);", "parent": 0, "children": [52, 54, 57], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 39}}, {"id": 52, "type": "storage_class_specifier", "text": "extern", "parent": 51, "children": [53], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 53, "type": "extern", "text": "extern", "parent": 52, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 54, "type": "sized_type_specifier", "text": "unsigned int", "parent": 51, "children": [55, 56], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 19}}, {"id": 55, "type": "unsigned", "text": "unsigned", "parent": 54, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 15}}, {"id": 56, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 19}}, {"id": 57, "type": "function_declarator", "text": "csum_partial_copy_from_user(const char *src, char *dst,\n\t\t\t\t\t\tint len, int sum, int *csum_err)", "parent": 51, "children": [58, 59], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 36, "column": 38}}, {"id": 58, "type": "identifier", "text": "csum_partial_copy_from_user", "parent": 57, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 47}}, {"id": 59, "type": "parameter_list", "text": "(const char *src, char *dst,\n\t\t\t\t\t\tint len, int sum, int *csum_err)", "parent": 57, "children": [60, 65, 70, 73, 76], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 36, "column": 38}}, {"id": 60, "type": "parameter_declaration", "text": "const char *src", "parent": 59, "children": [61, 62], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 63}}, {"id": 61, "type": "primitive_type", "text": "char", "parent": 60, "children": [], "start_point": {"row": 35, "column": 54}, "end_point": {"row": 35, "column": 58}}, {"id": 62, "type": "pointer_declarator", "text": "*src", "parent": 60, "children": [63, 64], "start_point": {"row": 35, "column": 59}, "end_point": {"row": 35, "column": 63}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 35, "column": 59}, "end_point": {"row": 35, "column": 60}}, {"id": 64, "type": "identifier", "text": "src", "parent": 62, "children": [], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 63}}, {"id": 65, "type": "parameter_declaration", "text": "char *dst", "parent": 59, "children": [66, 67], "start_point": {"row": 35, "column": 65}, "end_point": {"row": 35, "column": 74}}, {"id": 66, "type": "primitive_type", "text": "char", "parent": 65, "children": [], "start_point": {"row": 35, "column": 65}, "end_point": {"row": 35, "column": 69}}, {"id": 67, "type": "pointer_declarator", "text": "*dst", "parent": 65, "children": [68, 69], "start_point": {"row": 35, "column": 70}, "end_point": {"row": 35, "column": 74}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 35, "column": 70}, "end_point": {"row": 35, "column": 71}}, {"id": 69, "type": "identifier", "text": "dst", "parent": 67, "children": [], "start_point": {"row": 35, "column": 71}, "end_point": {"row": 35, "column": 74}}, {"id": 70, "type": "parameter_declaration", "text": "int len", "parent": 59, "children": [71, 72], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 13}}, {"id": 71, "type": "primitive_type", "text": "int", "parent": 70, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 9}}, {"id": 72, "type": "identifier", "text": "len", "parent": 70, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 13}}, {"id": 73, "type": "parameter_declaration", "text": "int sum", "parent": 59, "children": [74, 75], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 22}}, {"id": 74, "type": "primitive_type", "text": "int", "parent": 73, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 18}}, {"id": 75, "type": "identifier", "text": "sum", "parent": 73, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 22}}, {"id": 76, "type": "parameter_declaration", "text": "int *csum_err", "parent": 59, "children": [77, 78], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 37}}, {"id": 77, "type": "primitive_type", "text": "int", "parent": 76, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 27}}, {"id": 78, "type": "pointer_declarator", "text": "*csum_err", "parent": 76, "children": [79, 80], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 37}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 29}}, {"id": 80, "type": "identifier", "text": "csum_err", "parent": 78, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 37}}, {"id": 81, "type": "preproc_function_def", "text": "#define csum_partial_copy_nocheck(src, dst, len, sum)\t\\\n\tcsum_partial_copy((src), (dst), (len), (sum))\n", "parent": 0, "children": [82, 83, 84, 89], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 82, "type": "#define", "text": "#define", "parent": 81, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 83, "type": "identifier", "text": "csum_partial_copy_nocheck", "parent": 81, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 33}}, {"id": 84, "type": "preproc_params", "text": "(src, dst, len, sum)", "parent": 81, "children": [85, 86, 87, 88], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 53}}, {"id": 85, "type": "identifier", "text": "src", "parent": 84, "children": [], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 37}}, {"id": 86, "type": "identifier", "text": "dst", "parent": 84, "children": [], "start_point": {"row": 38, "column": 39}, "end_point": {"row": 38, "column": 42}}, {"id": 87, "type": "identifier", "text": "len", "parent": 84, "children": [], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 47}}, {"id": 88, "type": "identifier", "text": "sum", "parent": 84, "children": [], "start_point": {"row": 38, "column": 49}, "end_point": {"row": 38, "column": 52}}, {"id": 89, "type": "preproc_arg", "text": "csum_partial_copy((src), (dst), (len), (sum))", "parent": 81, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 46}}, {"id": 90, "type": "declaration", "text": "unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);", "parent": 0, "children": [91, 94], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 66}}, {"id": 91, "type": "sized_type_specifier", "text": "unsigned short", "parent": 90, "children": [92, 93], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 14}}, {"id": 92, "type": "unsigned", "text": "unsigned", "parent": 91, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 93, "type": "short", "text": "short", "parent": 91, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 14}}, {"id": 94, "type": "function_declarator", "text": "ip_fast_csum(unsigned char *iph, unsigned int ihl)", "parent": 90, "children": [95, 96], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 65}}, {"id": 95, "type": "identifier", "text": "ip_fast_csum", "parent": 94, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 27}}, {"id": 96, "type": "parameter_list", "text": "(unsigned char *iph, unsigned int ihl)", "parent": 94, "children": [97, 104], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 65}}, {"id": 97, "type": "parameter_declaration", "text": "unsigned char *iph", "parent": 96, "children": [98, 101], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 46}}, {"id": 98, "type": "sized_type_specifier", "text": "unsigned char", "parent": 97, "children": [99, 100], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 41}}, {"id": 99, "type": "unsigned", "text": "unsigned", "parent": 98, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 36}}, {"id": 100, "type": "primitive_type", "text": "char", "parent": 98, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 41}}, {"id": 101, "type": "pointer_declarator", "text": "*iph", "parent": 97, "children": [102, 103], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 46}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 43}}, {"id": 103, "type": "identifier", "text": "iph", "parent": 101, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 46}}, {"id": 104, "type": "parameter_declaration", "text": "unsigned int ihl", "parent": 96, "children": [105, 108], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 64}}, {"id": 105, "type": "sized_type_specifier", "text": "unsigned int", "parent": 104, "children": [106, 107], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 60}}, {"id": 106, "type": "unsigned", "text": "unsigned", "parent": 105, "children": [], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 56}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 105, "children": [], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 60}}, {"id": 108, "type": "identifier", "text": "ihl", "parent": 104, "children": [], "start_point": {"row": 41, "column": 61}, "end_point": {"row": 41, "column": 64}}, {"id": 109, "type": "preproc_if", "text": "#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\n/*\n *\tThis is a version of ip_compute_csum() optimized for IP headers,\n *\twhich always checksum on 4 octet boundaries.\n *\n */\nstatic inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n\tunsigned int sum = 0;\n\n\t__asm__ (\"subqw #1,%2\\n\"\n\t\t \"1:\\t\"\n\t\t \"movel %1@+,%/d0\\n\\t\"\n\t\t \"addxl %/d0,%0\\n\\t\"\n\t\t \"dbra %2,1b\\n\\t\"\n\t\t \"movel %0,%/d0\\n\\t\"\n\t\t \"swap %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t \"clrw %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t : \"=d\" (sum), \"=a\" (iph), \"=d\" (ihl)\n\t\t : \"0\" (sum), \"1\" (iph), \"2\" (ihl)\n\t\t : \"d0\");\n\treturn ~sum;\n}\n#endif", "parent": 0, "children": [110, 111, 112, 113, 199], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 110, "type": "#if", "text": "#if", "parent": 109, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 3}}, {"id": 111, "type": "number_literal", "text": "0", "parent": 109, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 5}}, {"id": 112, "type": "\n", "text": "\n", "parent": 109, "children": [], "start_point": {"row": 43, "column": 52}, "end_point": {"row": 44, "column": 0}}, {"id": 113, "type": "function_definition", "text": "static inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n\tunsigned int sum = 0;\n\n\t__asm__ (\"subqw #1,%2\\n\"\n\t\t \"1:\\t\"\n\t\t \"movel %1@+,%/d0\\n\\t\"\n\t\t \"addxl %/d0,%0\\n\\t\"\n\t\t \"dbra %2,1b\\n\\t\"\n\t\t \"movel %0,%/d0\\n\\t\"\n\t\t \"swap %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t \"clrw %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t : \"=d\" (sum), \"=a\" (iph), \"=d\" (ihl)\n\t\t : \"0\" (sum), \"1\" (iph), \"2\" (ihl)\n\t\t : \"d0\");\n\treturn ~sum;\n}", "parent": 109, "children": [114, 116, 119], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 114, "type": "storage_class_specifier", "text": "inline", "parent": 113, "children": [115], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 13}}, {"id": 115, "type": "inline", "text": "inline", "parent": 114, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 13}}, {"id": 116, "type": "sized_type_specifier", "text": "unsigned short", "parent": 113, "children": [117, 118], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 28}}, {"id": 117, "type": "unsigned", "text": "unsigned", "parent": 116, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 22}}, {"id": 118, "type": "short", "text": "short", "parent": 116, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 28}}, {"id": 119, "type": "function_declarator", "text": "ip_fast_csum(unsigned char *iph, unsigned int ihl)", "parent": 113, "children": [120, 121], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 50}}, {"id": 120, "type": "identifier", "text": "ip_fast_csum", "parent": 119, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 12}}, {"id": 121, "type": "parameter_list", "text": "(unsigned char *iph, unsigned int ihl)", "parent": 119, "children": [122, 129], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 50}}, {"id": 122, "type": "parameter_declaration", "text": "unsigned char *iph", "parent": 121, "children": [123, 126], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 31}}, {"id": 123, "type": "sized_type_specifier", "text": "unsigned char", "parent": 122, "children": [124, 125], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 26}}, {"id": 124, "type": "unsigned", "text": "unsigned", "parent": 123, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 21}}, {"id": 125, "type": "primitive_type", "text": "char", "parent": 123, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 26}}, {"id": 126, "type": "pointer_declarator", "text": "*iph", "parent": 122, "children": [127, 128], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 31}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 28}}, {"id": 128, "type": "identifier", "text": "iph", "parent": 126, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 31}}, {"id": 129, "type": "parameter_declaration", "text": "unsigned int ihl", "parent": 121, "children": [130, 133], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 49}}, {"id": 130, "type": "sized_type_specifier", "text": "unsigned int", "parent": 129, "children": [131, 132], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 45}}, {"id": 131, "type": "unsigned", "text": "unsigned", "parent": 130, "children": [], "start_point": {"row": 50, "column": 33}, "end_point": {"row": 50, "column": 41}}, {"id": 132, "type": "primitive_type", "text": "int", "parent": 130, "children": [], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 45}}, {"id": 133, "type": "identifier", "text": "ihl", "parent": 129, "children": [], "start_point": {"row": 50, "column": 46}, "end_point": {"row": 50, "column": 49}}, {"id": 134, "type": "declaration", "text": "unsigned int sum = 0;", "parent": 113, "children": [135, 138], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 22}}, {"id": 135, "type": "sized_type_specifier", "text": "unsigned int", "parent": 134, "children": [136, 137], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 13}}, {"id": 136, "type": "unsigned", "text": "unsigned", "parent": 135, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 9}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 135, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 13}}, {"id": 138, "type": "init_declarator", "text": "sum = 0", "parent": 134, "children": [139, 140, 141], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 21}}, {"id": 139, "type": "identifier", "text": "sum", "parent": 138, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 17}}, {"id": 140, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 19}}, {"id": 141, "type": "number_literal", "text": "0", "parent": 138, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 21}}, {"id": 142, "type": "gnu_asm_expression", "text": "__asm__ (\"subqw #1,%2\\n\"\n\t\t \"1:\\t\"\n\t\t \"movel %1@+,%/d0\\n\\t\"\n\t\t \"addxl %/d0,%0\\n\\t\"\n\t\t \"dbra %2,1b\\n\\t\"\n\t\t \"movel %0,%/d0\\n\\t\"\n\t\t \"swap %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t \"clrw %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t : \"=d\" (sum), \"=a\" (iph), \"=d\" (ihl)\n\t\t : \"0\" (sum), \"1\" (iph), \"2\" (ihl)\n\t\t : \"d0\")", "parent": 113, "children": [143, 144, 173, 183, 193], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 66, "column": 10}}, {"id": 143, "type": "__asm__", "text": "__asm__", "parent": 142, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 8}}, {"id": 144, "type": "concatenated_string", "text": "\"subqw #1,%2\\n\"\n\t\t \"1:\\t\"\n\t\t \"movel %1@+,%/d0\\n\\t\"\n\t\t \"addxl %/d0,%0\\n\\t\"\n\t\t \"dbra %2,1b\\n\\t\"\n\t\t \"movel %0,%/d0\\n\\t\"\n\t\t \"swap %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t \"clrw %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"", "parent": 142, "children": [145, 147, 149, 152, 155, 158, 161, 164, 167, 170], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 63, "column": 22}}, {"id": 145, "type": "string_literal", "text": "\"subqw #1,%2\\n\"", "parent": 144, "children": [146], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 25}}, {"id": 146, "type": "escape_sequence", "text": "\\n", "parent": 145, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 24}}, {"id": 147, "type": "string_literal", "text": "\"1:\\t\"", "parent": 144, "children": [148], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 9}}, {"id": 148, "type": "escape_sequence", "text": "\\t", "parent": 147, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 8}}, {"id": 149, "type": "string_literal", "text": "\"movel %1@+,%/d0\\n\\t\"", "parent": 144, "children": [150, 151], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 24}}, {"id": 150, "type": "escape_sequence", "text": "\\n", "parent": 149, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 21}}, {"id": 151, "type": "escape_sequence", "text": "\\t", "parent": 149, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 23}}, {"id": 152, "type": "string_literal", "text": "\"addxl %/d0,%0\\n\\t\"", "parent": 144, "children": [153, 154], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 22}}, {"id": 153, "type": "escape_sequence", "text": "\\n", "parent": 152, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 19}}, {"id": 154, "type": "escape_sequence", "text": "\\t", "parent": 152, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 21}}, {"id": 155, "type": "string_literal", "text": "\"dbra %2,1b\\n\\t\"", "parent": 144, "children": [156, 157], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 20}}, {"id": 156, "type": "escape_sequence", "text": "\\n", "parent": 155, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 17}}, {"id": 157, "type": "escape_sequence", "text": "\\t", "parent": 155, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 19}}, {"id": 158, "type": "string_literal", "text": "\"movel %0,%/d0\\n\\t\"", "parent": 144, "children": [159, 160], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 22}}, {"id": 159, "type": "escape_sequence", "text": "\\n", "parent": 158, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 19}}, {"id": 160, "type": "escape_sequence", "text": "\\t", "parent": 158, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 21}}, {"id": 161, "type": "string_literal", "text": "\"swap %/d0\\n\\t\"", "parent": 144, "children": [162, 163], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 19}}, {"id": 162, "type": "escape_sequence", "text": "\\n", "parent": 161, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 16}}, {"id": 163, "type": "escape_sequence", "text": "\\t", "parent": 161, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 18}}, {"id": 164, "type": "string_literal", "text": "\"addxw %/d0,%0\\n\\t\"", "parent": 144, "children": [165, 166], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 22}}, {"id": 165, "type": "escape_sequence", "text": "\\n", "parent": 164, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 19}}, {"id": 166, "type": "escape_sequence", "text": "\\t", "parent": 164, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 21}}, {"id": 167, "type": "string_literal", "text": "\"clrw %/d0\\n\\t\"", "parent": 144, "children": [168, 169], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 19}}, {"id": 168, "type": "escape_sequence", "text": "\\n", "parent": 167, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 16}}, {"id": 169, "type": "escape_sequence", "text": "\\t", "parent": 167, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 18}}, {"id": 170, "type": "string_literal", "text": "\"addxw %/d0,%0\\n\\t\"", "parent": 144, "children": [171, 172], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 22}}, {"id": 171, "type": "escape_sequence", "text": "\\n", "parent": 170, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 19}}, {"id": 172, "type": "escape_sequence", "text": "\\t", "parent": 170, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 21}}, {"id": 173, "type": "gnu_asm_output_operand_list", "text": ": \"=d\" (sum), \"=a\" (iph), \"=d\" (ihl)", "parent": 142, "children": [174, 177, 180], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 39}}, {"id": 174, "type": "gnu_asm_output_operand", "text": "\"=d\" (sum)", "parent": 173, "children": [175, 176], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 15}}, {"id": 175, "type": "string_literal", "text": "\"=d\"", "parent": 174, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 9}}, {"id": 176, "type": "identifier", "text": "sum", "parent": 174, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 14}}, {"id": 177, "type": "gnu_asm_output_operand", "text": "\"=a\" (iph)", "parent": 173, "children": [178, 179], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 27}}, {"id": 178, "type": "string_literal", "text": "\"=a\"", "parent": 177, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 21}}, {"id": 179, "type": "identifier", "text": "iph", "parent": 177, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 26}}, {"id": 180, "type": "gnu_asm_output_operand", "text": "\"=d\" (ihl)", "parent": 173, "children": [181, 182], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 39}}, {"id": 181, "type": "string_literal", "text": "\"=d\"", "parent": 180, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 33}}, {"id": 182, "type": "identifier", "text": "ihl", "parent": 180, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 38}}, {"id": 183, "type": "gnu_asm_input_operand_list", "text": ": \"0\" (sum), \"1\" (iph), \"2\" (ihl)", "parent": 142, "children": [184, 187, 190], "start_point": {"row": 65, "column": 3}, "end_point": {"row": 65, "column": 36}}, {"id": 184, "type": "gnu_asm_input_operand", "text": "\"0\" (sum)", "parent": 183, "children": [185, 186], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 14}}, {"id": 185, "type": "string_literal", "text": "\"0\"", "parent": 184, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 8}}, {"id": 186, "type": "identifier", "text": "sum", "parent": 184, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 13}}, {"id": 187, "type": "gnu_asm_input_operand", "text": "\"1\" (iph)", "parent": 183, "children": [188, 189], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 25}}, {"id": 188, "type": "string_literal", "text": "\"1\"", "parent": 187, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 19}}, {"id": 189, "type": "identifier", "text": "iph", "parent": 187, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 24}}, {"id": 190, "type": "gnu_asm_input_operand", "text": "\"2\" (ihl)", "parent": 183, "children": [191, 192], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 36}}, {"id": 191, "type": "string_literal", "text": "\"2\"", "parent": 190, "children": [], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 30}}, {"id": 192, "type": "identifier", "text": "ihl", "parent": 190, "children": [], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 35}}, {"id": 193, "type": "gnu_asm_clobber_list", "text": ": \"d0\"", "parent": 142, "children": [194], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 9}}, {"id": 194, "type": "string_literal", "text": "\"d0\"", "parent": 193, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 9}}, {"id": 195, "type": "return_statement", "text": "return ~sum;", "parent": 113, "children": [196], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 13}}, {"id": 196, "type": "unary_expression", "text": "~sum", "parent": 195, "children": [197, 198], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 12}}, {"id": 197, "type": "~", "text": "~", "parent": 196, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 9}}, {"id": 198, "type": "identifier", "text": "sum", "parent": 196, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 12}}, {"id": 199, "type": "#endif", "text": "#endif", "parent": 109, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 200, "type": "function_definition", "text": "static inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n\tsum = (sum & 0xffff) + (sum >> 16);\n\tsum = (sum & 0xffff) + (sum >> 16);\n#else\n\tunsigned int tmp = sum;\n\t__asm__(\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"0\" (sum), \"1\" (sum));\n#endif\n\treturn ~sum;\n}", "parent": 0, "children": [201, 203, 206], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 201, "type": "storage_class_specifier", "text": "inline", "parent": 200, "children": [202], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 13}}, {"id": 202, "type": "inline", "text": "inline", "parent": 201, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 13}}, {"id": 203, "type": "sized_type_specifier", "text": "unsigned int", "parent": 200, "children": [204, 205], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 26}}, {"id": 204, "type": "unsigned", "text": "unsigned", "parent": 203, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 22}}, {"id": 205, "type": "primitive_type", "text": "int", "parent": 203, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 26}}, {"id": 206, "type": "function_declarator", "text": "csum_fold(unsigned int sum)", "parent": 200, "children": [207, 208], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 54}}, {"id": 207, "type": "identifier", "text": "csum_fold", "parent": 206, "children": [], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 36}}, {"id": 208, "type": "parameter_list", "text": "(unsigned int sum)", "parent": 206, "children": [209], "start_point": {"row": 75, "column": 36}, "end_point": {"row": 75, "column": 54}}, {"id": 209, "type": "parameter_declaration", "text": "unsigned int sum", "parent": 208, "children": [210, 213], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 53}}, {"id": 210, "type": "sized_type_specifier", "text": "unsigned int", "parent": 209, "children": [211, 212], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 49}}, {"id": 211, "type": "unsigned", "text": "unsigned", "parent": 210, "children": [], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 45}}, {"id": 212, "type": "primitive_type", "text": "int", "parent": 210, "children": [], "start_point": {"row": 75, "column": 46}, "end_point": {"row": 75, "column": 49}}, {"id": 213, "type": "identifier", "text": "sum", "parent": 209, "children": [], "start_point": {"row": 75, "column": 50}, "end_point": {"row": 75, "column": 53}}, {"id": 214, "type": "preproc_ifdef", "text": "#ifdef CONFIG_COLDFIRE\n\tsum = (sum & 0xffff) + (sum >> 16);\n\tsum = (sum & 0xffff) + (sum >> 16);\n#else\n\tunsigned int tmp = sum;\n\t__asm__(\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"0\" (sum), \"1\" (sum));\n#endif", "parent": 200, "children": [215, 216, 245, 282], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 215, "type": "#ifdef", "text": "#ifdef", "parent": 214, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 216, "type": "identifier", "text": "CONFIG_COLDFIRE", "parent": 214, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 22}}, {"id": 217, "type": "assignment_expression", "text": "sum = (sum & 0xffff) + (sum >> 16)", "parent": 214, "children": [218, 219, 220], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 35}}, {"id": 218, "type": "identifier", "text": "sum", "parent": 217, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 4}}, {"id": 219, "type": "=", "text": "=", "parent": 217, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 6}}, {"id": 220, "type": "binary_expression", "text": "(sum & 0xffff) + (sum >> 16)", "parent": 217, "children": [221, 225, 226], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 35}}, {"id": 221, "type": "parenthesized_expression", "text": "(sum & 0xffff)", "parent": 220, "children": [222], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 21}}, {"id": 222, "type": "binary_expression", "text": "sum & 0xffff", "parent": 221, "children": [223, 224], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 20}}, {"id": 223, "type": "identifier", "text": "sum", "parent": 222, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 11}}, {"id": 224, "type": "number_literal", "text": "0xffff", "parent": 222, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 20}}, {"id": 225, "type": "+", "text": "+", "parent": 220, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 23}}, {"id": 226, "type": "parenthesized_expression", "text": "(sum >> 16)", "parent": 220, "children": [227], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 35}}, {"id": 227, "type": "binary_expression", "text": "sum >> 16", "parent": 226, "children": [228, 229, 230], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 34}}, {"id": 228, "type": "identifier", "text": "sum", "parent": 227, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 28}}, {"id": 229, "type": ">>", "text": ">>", "parent": 227, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 31}}, {"id": 230, "type": "number_literal", "text": "16", "parent": 227, "children": [], "start_point": {"row": 78, "column": 32}, "end_point": {"row": 78, "column": 34}}, {"id": 231, "type": "assignment_expression", "text": "sum = (sum & 0xffff) + (sum >> 16)", "parent": 214, "children": [232, 233, 234], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 35}}, {"id": 232, "type": "identifier", "text": "sum", "parent": 231, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 4}}, {"id": 233, "type": "=", "text": "=", "parent": 231, "children": [], "start_point": {"row": 79, "column": 5}, "end_point": {"row": 79, "column": 6}}, {"id": 234, "type": "binary_expression", "text": "(sum & 0xffff) + (sum >> 16)", "parent": 231, "children": [235, 239, 240], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 35}}, {"id": 235, "type": "parenthesized_expression", "text": "(sum & 0xffff)", "parent": 234, "children": [236], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 21}}, {"id": 236, "type": "binary_expression", "text": "sum & 0xffff", "parent": 235, "children": [237, 238], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 20}}, {"id": 237, "type": "identifier", "text": "sum", "parent": 236, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 11}}, {"id": 238, "type": "number_literal", "text": "0xffff", "parent": 236, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 20}}, {"id": 239, "type": "+", "text": "+", "parent": 234, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 23}}, {"id": 240, "type": "parenthesized_expression", "text": "(sum >> 16)", "parent": 234, "children": [241], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 35}}, {"id": 241, "type": "binary_expression", "text": "sum >> 16", "parent": 240, "children": [242, 243, 244], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 34}}, {"id": 242, "type": "identifier", "text": "sum", "parent": 241, "children": [], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 28}}, {"id": 243, "type": ">>", "text": ">>", "parent": 241, "children": [], "start_point": {"row": 79, "column": 29}, "end_point": {"row": 79, "column": 31}}, {"id": 244, "type": "number_literal", "text": "16", "parent": 241, "children": [], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 34}}, {"id": 245, "type": "preproc_else", "text": "#else\n\tunsigned int tmp = sum;\n\t__asm__(\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"0\" (sum), \"1\" (sum));", "parent": 214, "children": [246, 247], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 87, "column": 26}}, {"id": 246, "type": "#else", "text": "#else", "parent": 245, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 5}}, {"id": 247, "type": "declaration", "text": "unsigned int tmp = sum;", "parent": 245, "children": [248, 251], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 24}}, {"id": 248, "type": "sized_type_specifier", "text": "unsigned int", "parent": 247, "children": [249, 250], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 13}}, {"id": 249, "type": "unsigned", "text": "unsigned", "parent": 248, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 9}}, {"id": 250, "type": "primitive_type", "text": "int", "parent": 248, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 13}}, {"id": 251, "type": "init_declarator", "text": "tmp = sum", "parent": 247, "children": [252, 253, 254], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 23}}, {"id": 252, "type": "identifier", "text": "tmp", "parent": 251, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 17}}, {"id": 253, "type": "=", "text": "=", "parent": 251, "children": [], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 19}}, {"id": 254, "type": "identifier", "text": "sum", "parent": 251, "children": [], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 23}}, {"id": 255, "type": "gnu_asm_expression", "text": "__asm__(\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"0\" (sum), \"1\" (sum))", "parent": 245, "children": [256, 257, 268, 275], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 87, "column": 25}}, {"id": 256, "type": "__asm__", "text": "__asm__", "parent": 255, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 8}}, {"id": 257, "type": "concatenated_string", "text": "\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"", "parent": 255, "children": [258, 261, 264, 267], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 85, "column": 16}}, {"id": 258, "type": "string_literal", "text": "\"swap %1\\n\\t\"", "parent": 257, "children": [259, 260], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 22}}, {"id": 259, "type": "escape_sequence", "text": "\\n", "parent": 258, "children": [], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 19}}, {"id": 260, "type": "escape_sequence", "text": "\\t", "parent": 258, "children": [], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 21}}, {"id": 261, "type": "string_literal", "text": "\"addw %1, %0\\n\\t\"", "parent": 257, "children": [262, 263], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 19}}, {"id": 262, "type": "escape_sequence", "text": "\\n", "parent": 261, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 16}}, {"id": 263, "type": "escape_sequence", "text": "\\t", "parent": 261, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 18}}, {"id": 264, "type": "string_literal", "text": "\"clrw %1\\n\\t\"", "parent": 257, "children": [265, 266], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 15}}, {"id": 265, "type": "escape_sequence", "text": "\\n", "parent": 264, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 12}}, {"id": 266, "type": "escape_sequence", "text": "\\t", "parent": 264, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 14}}, {"id": 267, "type": "string_literal", "text": "\"addxw %1, %0\"", "parent": 257, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 16}}, {"id": 268, "type": "gnu_asm_output_operand_list", "text": ": \"=&d\" (sum), \"=&d\" (tmp)", "parent": 255, "children": [269, 272], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 28}}, {"id": 269, "type": "gnu_asm_output_operand", "text": "\"=&d\" (sum)", "parent": 268, "children": [270, 271], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 15}}, {"id": 270, "type": "string_literal", "text": "\"=&d\"", "parent": 269, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 9}}, {"id": 271, "type": "identifier", "text": "sum", "parent": 269, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 14}}, {"id": 272, "type": "gnu_asm_output_operand", "text": "\"=&d\" (tmp)", "parent": 268, "children": [273, 274], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 28}}, {"id": 273, "type": "string_literal", "text": "\"=&d\"", "parent": 272, "children": [], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 22}}, {"id": 274, "type": "identifier", "text": "tmp", "parent": 272, "children": [], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 27}}, {"id": 275, "type": "gnu_asm_input_operand_list", "text": ": \"0\" (sum), \"1\" (sum)", "parent": 255, "children": [276, 279], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 24}}, {"id": 276, "type": "gnu_asm_input_operand", "text": "\"0\" (sum)", "parent": 275, "children": [277, 278], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 13}}, {"id": 277, "type": "string_literal", "text": "\"0\"", "parent": 276, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 7}}, {"id": 278, "type": "identifier", "text": "sum", "parent": 276, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 12}}, {"id": 279, "type": "gnu_asm_input_operand", "text": "\"1\" (sum)", "parent": 275, "children": [280, 281], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 24}}, {"id": 280, "type": "string_literal", "text": "\"1\"", "parent": 279, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 18}}, {"id": 281, "type": "identifier", "text": "sum", "parent": 279, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 23}}, {"id": 282, "type": "#endif", "text": "#endif", "parent": 214, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 283, "type": "return_statement", "text": "return ~sum;", "parent": 200, "children": [284], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 13}}, {"id": 284, "type": "unary_expression", "text": "~sum", "parent": 283, "children": [285, 286], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 12}}, {"id": 285, "type": "~", "text": "~", "parent": 284, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 9}}, {"id": 286, "type": "identifier", "text": "sum", "parent": 284, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 12}}, {"id": 287, "type": "function_definition", "text": "static inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)\n{\n\t__asm__ (\"addl %1,%0\\n\\t\"\n\t\t \"addxl %4,%0\\n\\t\"\n\t\t \"addxl %5,%0\\n\\t\"\n\t\t \"clrl %1\\n\\t\"\n\t\t \"addxl %1,%0\"\n\t\t : \"=&d\" (sum), \"=&d\" (saddr)\n\t\t : \"0\" (daddr), \"1\" (saddr), \"d\" (len + proto),\n\t\t \"d\"(sum));\n\treturn sum;\n}", "parent": 0, "children": [288, 290, 293], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 288, "type": "storage_class_specifier", "text": "inline", "parent": 287, "children": [289], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 13}}, {"id": 289, "type": "inline", "text": "inline", "parent": 288, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 13}}, {"id": 290, "type": "sized_type_specifier", "text": "unsigned int", "parent": 287, "children": [291, 292], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 26}}, {"id": 291, "type": "unsigned", "text": "unsigned", "parent": 290, "children": [], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 22}}, {"id": 292, "type": "primitive_type", "text": "int", "parent": 290, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 26}}, {"id": 293, "type": "function_declarator", "text": "csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)", "parent": 287, "children": [294, 295], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 100, "column": 43}}, {"id": 294, "type": "identifier", "text": "csum_tcpudp_nofold", "parent": 293, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 18}}, {"id": 295, "type": "parameter_list", "text": "(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)", "parent": 293, "children": [296, 301, 306, 311, 316], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 100, "column": 43}}, {"id": 296, "type": "parameter_declaration", "text": "unsigned long saddr", "parent": 295, "children": [297, 300], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 38}}, {"id": 297, "type": "sized_type_specifier", "text": "unsigned long", "parent": 296, "children": [298, 299], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 32}}, {"id": 298, "type": "unsigned", "text": "unsigned", "parent": 297, "children": [], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 27}}, {"id": 299, "type": "long", "text": "long", "parent": 297, "children": [], "start_point": {"row": 99, "column": 28}, "end_point": {"row": 99, "column": 32}}, {"id": 300, "type": "identifier", "text": "saddr", "parent": 296, "children": [], "start_point": {"row": 99, "column": 33}, "end_point": {"row": 99, "column": 38}}, {"id": 301, "type": "parameter_declaration", "text": "unsigned long daddr", "parent": 295, "children": [302, 305], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 59}}, {"id": 302, "type": "sized_type_specifier", "text": "unsigned long", "parent": 301, "children": [303, 304], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 53}}, {"id": 303, "type": "unsigned", "text": "unsigned", "parent": 302, "children": [], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 48}}, {"id": 304, "type": "long", "text": "long", "parent": 302, "children": [], "start_point": {"row": 99, "column": 49}, "end_point": {"row": 99, "column": 53}}, {"id": 305, "type": "identifier", "text": "daddr", "parent": 301, "children": [], "start_point": {"row": 99, "column": 54}, "end_point": {"row": 99, "column": 59}}, {"id": 306, "type": "parameter_declaration", "text": "unsigned short len", "parent": 295, "children": [307, 310], "start_point": {"row": 99, "column": 61}, "end_point": {"row": 99, "column": 79}}, {"id": 307, "type": "sized_type_specifier", "text": "unsigned short", "parent": 306, "children": [308, 309], "start_point": {"row": 99, "column": 61}, "end_point": {"row": 99, "column": 75}}, {"id": 308, "type": "unsigned", "text": "unsigned", "parent": 307, "children": [], "start_point": {"row": 99, "column": 61}, "end_point": {"row": 99, "column": 69}}, {"id": 309, "type": "short", "text": "short", "parent": 307, "children": [], "start_point": {"row": 99, "column": 70}, "end_point": {"row": 99, "column": 75}}, {"id": 310, "type": "identifier", "text": "len", "parent": 306, "children": [], "start_point": {"row": 99, "column": 76}, "end_point": {"row": 99, "column": 79}}, {"id": 311, "type": "parameter_declaration", "text": "unsigned short proto", "parent": 295, "children": [312, 315], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 24}}, {"id": 312, "type": "sized_type_specifier", "text": "unsigned short", "parent": 311, "children": [313, 314], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 18}}, {"id": 313, "type": "unsigned", "text": "unsigned", "parent": 312, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 12}}, {"id": 314, "type": "short", "text": "short", "parent": 312, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 18}}, {"id": 315, "type": "identifier", "text": "proto", "parent": 311, "children": [], "start_point": {"row": 100, "column": 19}, "end_point": {"row": 100, "column": 24}}, {"id": 316, "type": "parameter_declaration", "text": "unsigned int sum", "parent": 295, "children": [317, 320], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 42}}, {"id": 317, "type": "sized_type_specifier", "text": "unsigned int", "parent": 316, "children": [318, 319], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 38}}, {"id": 318, "type": "unsigned", "text": "unsigned", "parent": 317, "children": [], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 34}}, {"id": 319, "type": "primitive_type", "text": "int", "parent": 317, "children": [], "start_point": {"row": 100, "column": 35}, "end_point": {"row": 100, "column": 38}}, {"id": 320, "type": "identifier", "text": "sum", "parent": 316, "children": [], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 42}}, {"id": 321, "type": "gnu_asm_expression", "text": "__asm__ (\"addl %1,%0\\n\\t\"\n\t\t \"addxl %4,%0\\n\\t\"\n\t\t \"addxl %5,%0\\n\\t\"\n\t\t \"clrl %1\\n\\t\"\n\t\t \"addxl %1,%0\"\n\t\t : \"=&d\" (sum), \"=&d\" (saddr)\n\t\t : \"0\" (daddr), \"1\" (saddr), \"d\" (len + proto),\n\t\t \"d\"(sum))", "parent": 287, "children": [322, 323, 337, 344], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 109, "column": 14}}, {"id": 322, "type": "__asm__", "text": "__asm__", "parent": 321, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 8}}, {"id": 323, "type": "concatenated_string", "text": "\"addl %1,%0\\n\\t\"\n\t\t \"addxl %4,%0\\n\\t\"\n\t\t \"addxl %5,%0\\n\\t\"\n\t\t \"clrl %1\\n\\t\"\n\t\t \"addxl %1,%0\"", "parent": 321, "children": [324, 327, 330, 333, 336], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 106, "column": 16}}, {"id": 324, "type": "string_literal", "text": "\"addl %1,%0\\n\\t\"", "parent": 323, "children": [325, 326], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 27}}, {"id": 325, "type": "escape_sequence", "text": "\\n", "parent": 324, "children": [], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 24}}, {"id": 326, "type": "escape_sequence", "text": "\\t", "parent": 324, "children": [], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 26}}, {"id": 327, "type": "string_literal", "text": "\"addxl %4,%0\\n\\t\"", "parent": 323, "children": [328, 329], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 20}}, {"id": 328, "type": "escape_sequence", "text": "\\n", "parent": 327, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 17}}, {"id": 329, "type": "escape_sequence", "text": "\\t", "parent": 327, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 19}}, {"id": 330, "type": "string_literal", "text": "\"addxl %5,%0\\n\\t\"", "parent": 323, "children": [331, 332], "start_point": {"row": 104, "column": 3}, "end_point": {"row": 104, "column": 20}}, {"id": 331, "type": "escape_sequence", "text": "\\n", "parent": 330, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 17}}, {"id": 332, "type": "escape_sequence", "text": "\\t", "parent": 330, "children": [], "start_point": {"row": 104, "column": 17}, "end_point": {"row": 104, "column": 19}}, {"id": 333, "type": "string_literal", "text": "\"clrl %1\\n\\t\"", "parent": 323, "children": [334, 335], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 16}}, {"id": 334, "type": "escape_sequence", "text": "\\n", "parent": 333, "children": [], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 13}}, {"id": 335, "type": "escape_sequence", "text": "\\t", "parent": 333, "children": [], "start_point": {"row": 105, "column": 13}, "end_point": {"row": 105, "column": 15}}, {"id": 336, "type": "string_literal", "text": "\"addxl %1,%0\"", "parent": 323, "children": [], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 16}}, {"id": 337, "type": "gnu_asm_output_operand_list", "text": ": \"=&d\" (sum), \"=&d\" (saddr)", "parent": 321, "children": [338, 341], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 31}}, {"id": 338, "type": "gnu_asm_output_operand", "text": "\"=&d\" (sum)", "parent": 337, "children": [339, 340], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 16}}, {"id": 339, "type": "string_literal", "text": "\"=&d\"", "parent": 338, "children": [], "start_point": {"row": 107, "column": 5}, "end_point": {"row": 107, "column": 10}}, {"id": 340, "type": "identifier", "text": "sum", "parent": 338, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 15}}, {"id": 341, "type": "gnu_asm_output_operand", "text": "\"=&d\" (saddr)", "parent": 337, "children": [342, 343], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 31}}, {"id": 342, "type": "string_literal", "text": "\"=&d\"", "parent": 341, "children": [], "start_point": {"row": 107, "column": 18}, "end_point": {"row": 107, "column": 23}}, {"id": 343, "type": "identifier", "text": "saddr", "parent": 341, "children": [], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 30}}, {"id": 344, "type": "gnu_asm_input_operand_list", "text": ": \"0\" (daddr), \"1\" (saddr), \"d\" (len + proto),\n\t\t \"d\"(sum)", "parent": 321, "children": [345, 348, 351, 357], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 109, "column": 13}}, {"id": 345, "type": "gnu_asm_input_operand", "text": "\"0\" (daddr)", "parent": 344, "children": [346, 347], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 16}}, {"id": 346, "type": "string_literal", "text": "\"0\"", "parent": 345, "children": [], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 8}}, {"id": 347, "type": "identifier", "text": "daddr", "parent": 345, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 15}}, {"id": 348, "type": "gnu_asm_input_operand", "text": "\"1\" (saddr)", "parent": 344, "children": [349, 350], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 29}}, {"id": 349, "type": "string_literal", "text": "\"1\"", "parent": 348, "children": [], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 21}}, {"id": 350, "type": "identifier", "text": "saddr", "parent": 348, "children": [], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 28}}, {"id": 351, "type": "gnu_asm_input_operand", "text": "\"d\" (len + proto)", "parent": 344, "children": [352, 353], "start_point": {"row": 108, "column": 31}, "end_point": {"row": 108, "column": 48}}, {"id": 352, "type": "string_literal", "text": "\"d\"", "parent": 351, "children": [], "start_point": {"row": 108, "column": 31}, "end_point": {"row": 108, "column": 34}}, {"id": 353, "type": "binary_expression", "text": "len + proto", "parent": 351, "children": [354, 355, 356], "start_point": {"row": 108, "column": 36}, "end_point": {"row": 108, "column": 47}}, {"id": 354, "type": "identifier", "text": "len", "parent": 353, "children": [], "start_point": {"row": 108, "column": 36}, "end_point": {"row": 108, "column": 39}}, {"id": 355, "type": "+", "text": "+", "parent": 353, "children": [], "start_point": {"row": 108, "column": 40}, "end_point": {"row": 108, "column": 41}}, {"id": 356, "type": "identifier", "text": "proto", "parent": 353, "children": [], "start_point": {"row": 108, "column": 42}, "end_point": {"row": 108, "column": 47}}, {"id": 357, "type": "gnu_asm_input_operand", "text": "\"d\"(sum)", "parent": 344, "children": [358, 359], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 13}}, {"id": 358, "type": "string_literal", "text": "\"d\"", "parent": 357, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 8}}, {"id": 359, "type": "identifier", "text": "sum", "parent": 357, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 12}}, {"id": 360, "type": "return_statement", "text": "return sum;", "parent": 287, "children": [361], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 12}}, {"id": 361, "type": "identifier", "text": "sum", "parent": 360, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 11}}, {"id": 362, "type": "function_definition", "text": "static inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)\n{\n\treturn csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}", "parent": 0, "children": [363, 365, 369], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 363, "type": "storage_class_specifier", "text": "inline", "parent": 362, "children": [364], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 13}}, {"id": 364, "type": "inline", "text": "inline", "parent": 363, "children": [], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 13}}, {"id": 365, "type": "sized_type_specifier", "text": "unsigned short int", "parent": 362, "children": [366, 367, 368], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 32}}, {"id": 366, "type": "unsigned", "text": "unsigned", "parent": 365, "children": [], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 22}}, {"id": 367, "type": "short", "text": "short", "parent": 365, "children": [], "start_point": {"row": 113, "column": 23}, "end_point": {"row": 113, "column": 28}}, {"id": 368, "type": "primitive_type", "text": "int", "parent": 365, "children": [], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 32}}, {"id": 369, "type": "function_declarator", "text": "csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)", "parent": 362, "children": [370, 371], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 115, "column": 43}}, {"id": 370, "type": "identifier", "text": "csum_tcpudp_magic", "parent": 369, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 17}}, {"id": 371, "type": "parameter_list", "text": "(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)", "parent": 369, "children": [372, 377, 382, 387, 392], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 115, "column": 43}}, {"id": 372, "type": "parameter_declaration", "text": "unsigned long saddr", "parent": 371, "children": [373, 376], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 37}}, {"id": 373, "type": "sized_type_specifier", "text": "unsigned long", "parent": 372, "children": [374, 375], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 31}}, {"id": 374, "type": "unsigned", "text": "unsigned", "parent": 373, "children": [], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 26}}, {"id": 375, "type": "long", "text": "long", "parent": 373, "children": [], "start_point": {"row": 114, "column": 27}, "end_point": {"row": 114, "column": 31}}, {"id": 376, "type": "identifier", "text": "saddr", "parent": 372, "children": [], "start_point": {"row": 114, "column": 32}, "end_point": {"row": 114, "column": 37}}, {"id": 377, "type": "parameter_declaration", "text": "unsigned long daddr", "parent": 371, "children": [378, 381], "start_point": {"row": 114, "column": 39}, "end_point": {"row": 114, "column": 58}}, {"id": 378, "type": "sized_type_specifier", "text": "unsigned long", "parent": 377, "children": [379, 380], "start_point": {"row": 114, "column": 39}, "end_point": {"row": 114, "column": 52}}, {"id": 379, "type": "unsigned", "text": "unsigned", "parent": 378, "children": [], "start_point": {"row": 114, "column": 39}, "end_point": {"row": 114, "column": 47}}, {"id": 380, "type": "long", "text": "long", "parent": 378, "children": [], "start_point": {"row": 114, "column": 48}, "end_point": {"row": 114, "column": 52}}, {"id": 381, "type": "identifier", "text": "daddr", "parent": 377, "children": [], "start_point": {"row": 114, "column": 53}, "end_point": {"row": 114, "column": 58}}, {"id": 382, "type": "parameter_declaration", "text": "unsigned short len", "parent": 371, "children": [383, 386], "start_point": {"row": 114, "column": 60}, "end_point": {"row": 114, "column": 78}}, {"id": 383, "type": "sized_type_specifier", "text": "unsigned short", "parent": 382, "children": [384, 385], "start_point": {"row": 114, "column": 60}, "end_point": {"row": 114, "column": 74}}, {"id": 384, "type": "unsigned", "text": "unsigned", "parent": 383, "children": [], "start_point": {"row": 114, "column": 60}, "end_point": {"row": 114, "column": 68}}, {"id": 385, "type": "short", "text": "short", "parent": 383, "children": [], "start_point": {"row": 114, "column": 69}, "end_point": {"row": 114, "column": 74}}, {"id": 386, "type": "identifier", "text": "len", "parent": 382, "children": [], "start_point": {"row": 114, "column": 75}, "end_point": {"row": 114, "column": 78}}, {"id": 387, "type": "parameter_declaration", "text": "unsigned short proto", "parent": 371, "children": [388, 391], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 24}}, {"id": 388, "type": "sized_type_specifier", "text": "unsigned short", "parent": 387, "children": [389, 390], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 18}}, {"id": 389, "type": "unsigned", "text": "unsigned", "parent": 388, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 12}}, {"id": 390, "type": "short", "text": "short", "parent": 388, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 18}}, {"id": 391, "type": "identifier", "text": "proto", "parent": 387, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 24}}, {"id": 392, "type": "parameter_declaration", "text": "unsigned int sum", "parent": 371, "children": [393, 396], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 42}}, {"id": 393, "type": "sized_type_specifier", "text": "unsigned int", "parent": 392, "children": [394, 395], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 38}}, {"id": 394, "type": "unsigned", "text": "unsigned", "parent": 393, "children": [], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 34}}, {"id": 395, "type": "primitive_type", "text": "int", "parent": 393, "children": [], "start_point": {"row": 115, "column": 35}, "end_point": {"row": 115, "column": 38}}, {"id": 396, "type": "identifier", "text": "sum", "parent": 392, "children": [], "start_point": {"row": 115, "column": 39}, "end_point": {"row": 115, "column": 42}}, {"id": 397, "type": "return_statement", "text": "return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));", "parent": 362, "children": [398], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 65}}, {"id": 398, "type": "call_expression", "text": "csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum))", "parent": 397, "children": [399, 400], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 64}}, {"id": 399, "type": "identifier", "text": "csum_fold", "parent": 398, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 17}}, {"id": 400, "type": "argument_list", "text": "(csum_tcpudp_nofold(saddr,daddr,len,proto,sum))", "parent": 398, "children": [401], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 64}}, {"id": 401, "type": "call_expression", "text": "csum_tcpudp_nofold(saddr,daddr,len,proto,sum)", "parent": 400, "children": [402, 403], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 63}}, {"id": 402, "type": "identifier", "text": "csum_tcpudp_nofold", "parent": 401, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 36}}, {"id": 403, "type": "argument_list", "text": "(saddr,daddr,len,proto,sum)", "parent": 401, "children": [404, 405, 406, 407, 408], "start_point": {"row": 117, "column": 36}, "end_point": {"row": 117, "column": 63}}, {"id": 404, "type": "identifier", "text": "saddr", "parent": 403, "children": [], "start_point": {"row": 117, "column": 37}, "end_point": {"row": 117, "column": 42}}, {"id": 405, "type": "identifier", "text": "daddr", "parent": 403, "children": [], "start_point": {"row": 117, "column": 43}, "end_point": {"row": 117, "column": 48}}, {"id": 406, "type": "identifier", "text": "len", "parent": 403, "children": [], "start_point": {"row": 117, "column": 49}, "end_point": {"row": 117, "column": 52}}, {"id": 407, "type": "identifier", "text": "proto", "parent": 403, "children": [], "start_point": {"row": 117, "column": 53}, "end_point": {"row": 117, "column": 58}}, {"id": 408, "type": "identifier", "text": "sum", "parent": 403, "children": [], "start_point": {"row": 117, "column": 59}, "end_point": {"row": 117, "column": 62}}, {"id": 409, "type": "preproc_if", "text": "#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\nstatic inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n\treturn csum_fold (csum_partial(buff, len, 0));\n}\n#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);\n#endif", "parent": 0, "children": [410, 411, 412, 413, 442, 463], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 133, "column": 6}}, {"id": 410, "type": "#if", "text": "#if", "parent": 409, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 3}}, {"id": 411, "type": "number_literal", "text": "0", "parent": 409, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 5}}, {"id": 412, "type": "\n", "text": "\n", "parent": 409, "children": [], "start_point": {"row": 125, "column": 52}, "end_point": {"row": 126, "column": 0}}, {"id": 413, "type": "function_definition", "text": "static inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n\treturn csum_fold (csum_partial(buff, len, 0));\n}", "parent": 409, "children": [414, 416, 419], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 130, "column": 1}}, {"id": 414, "type": "storage_class_specifier", "text": "inline", "parent": 413, "children": [415], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 13}}, {"id": 415, "type": "inline", "text": "inline", "parent": 414, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 13}}, {"id": 416, "type": "sized_type_specifier", "text": "unsigned short", "parent": 413, "children": [417, 418], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 28}}, {"id": 417, "type": "unsigned", "text": "unsigned", "parent": 416, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 22}}, {"id": 418, "type": "short", "text": "short", "parent": 416, "children": [], "start_point": {"row": 126, "column": 23}, "end_point": {"row": 126, "column": 28}}, {"id": 419, "type": "function_declarator", "text": "ip_compute_csum(unsigned char * buff, int len)", "parent": 413, "children": [420, 421], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 46}}, {"id": 420, "type": "identifier", "text": "ip_compute_csum", "parent": 419, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 15}}, {"id": 421, "type": "parameter_list", "text": "(unsigned char * buff, int len)", "parent": 419, "children": [422, 429], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 46}}, {"id": 422, "type": "parameter_declaration", "text": "unsigned char * buff", "parent": 421, "children": [423, 426], "start_point": {"row": 127, "column": 16}, "end_point": {"row": 127, "column": 36}}, {"id": 423, "type": "sized_type_specifier", "text": "unsigned char", "parent": 422, "children": [424, 425], "start_point": {"row": 127, "column": 16}, "end_point": {"row": 127, "column": 29}}, {"id": 424, "type": "unsigned", "text": "unsigned", "parent": 423, "children": [], "start_point": {"row": 127, "column": 16}, "end_point": {"row": 127, "column": 24}}, {"id": 425, "type": "primitive_type", "text": "char", "parent": 423, "children": [], "start_point": {"row": 127, "column": 25}, "end_point": {"row": 127, "column": 29}}, {"id": 426, "type": "pointer_declarator", "text": "* buff", "parent": 422, "children": [427, 428], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 36}}, {"id": 427, "type": "*", "text": "*", "parent": 426, "children": [], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 31}}, {"id": 428, "type": "identifier", "text": "buff", "parent": 426, "children": [], "start_point": {"row": 127, "column": 32}, "end_point": {"row": 127, "column": 36}}, {"id": 429, "type": "parameter_declaration", "text": "int len", "parent": 421, "children": [430, 431], "start_point": {"row": 127, "column": 38}, "end_point": {"row": 127, "column": 45}}, {"id": 430, "type": "primitive_type", "text": "int", "parent": 429, "children": [], "start_point": {"row": 127, "column": 38}, "end_point": {"row": 127, "column": 41}}, {"id": 431, "type": "identifier", "text": "len", "parent": 429, "children": [], "start_point": {"row": 127, "column": 42}, "end_point": {"row": 127, "column": 45}}, {"id": 432, "type": "return_statement", "text": "return csum_fold (csum_partial(buff, len, 0));", "parent": 413, "children": [433], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 47}}, {"id": 433, "type": "call_expression", "text": "csum_fold (csum_partial(buff, len, 0))", "parent": 432, "children": [434, 435], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 46}}, {"id": 434, "type": "identifier", "text": "csum_fold", "parent": 433, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 17}}, {"id": 435, "type": "argument_list", "text": "(csum_partial(buff, len, 0))", "parent": 433, "children": [436], "start_point": {"row": 129, "column": 18}, "end_point": {"row": 129, "column": 46}}, {"id": 436, "type": "call_expression", "text": "csum_partial(buff, len, 0)", "parent": 435, "children": [437, 438], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 45}}, {"id": 437, "type": "identifier", "text": "csum_partial", "parent": 436, "children": [], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 31}}, {"id": 438, "type": "argument_list", "text": "(buff, len, 0)", "parent": 436, "children": [439, 440, 441], "start_point": {"row": 129, "column": 31}, "end_point": {"row": 129, "column": 45}}, {"id": 439, "type": "identifier", "text": "buff", "parent": 438, "children": [], "start_point": {"row": 129, "column": 32}, "end_point": {"row": 129, "column": 36}}, {"id": 440, "type": "identifier", "text": "len", "parent": 438, "children": [], "start_point": {"row": 129, "column": 38}, "end_point": {"row": 129, "column": 41}}, {"id": 441, "type": "number_literal", "text": "0", "parent": 438, "children": [], "start_point": {"row": 129, "column": 43}, "end_point": {"row": 129, "column": 44}}, {"id": 442, "type": "preproc_else", "text": "#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);", "parent": 409, "children": [443, 444], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 132, "column": 75}}, {"id": 443, "type": "#else", "text": "#else", "parent": 442, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 5}}, {"id": 444, "type": "declaration", "text": "extern unsigned short ip_compute_csum(const unsigned char * buff, int len);", "parent": 442, "children": [445, 447, 450], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 75}}, {"id": 445, "type": "storage_class_specifier", "text": "extern", "parent": 444, "children": [446], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 6}}, {"id": 446, "type": "extern", "text": "extern", "parent": 445, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 6}}, {"id": 447, "type": "sized_type_specifier", "text": "unsigned short", "parent": 444, "children": [448, 449], "start_point": {"row": 132, "column": 7}, "end_point": {"row": 132, "column": 21}}, {"id": 448, "type": "unsigned", "text": "unsigned", "parent": 447, "children": [], "start_point": {"row": 132, "column": 7}, "end_point": {"row": 132, "column": 15}}, {"id": 449, "type": "short", "text": "short", "parent": 447, "children": [], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 21}}, {"id": 450, "type": "function_declarator", "text": "ip_compute_csum(const unsigned char * buff, int len)", "parent": 444, "children": [451, 452], "start_point": {"row": 132, "column": 22}, "end_point": {"row": 132, "column": 74}}, {"id": 451, "type": "identifier", "text": "ip_compute_csum", "parent": 450, "children": [], "start_point": {"row": 132, "column": 22}, "end_point": {"row": 132, "column": 37}}, {"id": 452, "type": "parameter_list", "text": "(const unsigned char * buff, int len)", "parent": 450, "children": [453, 460], "start_point": {"row": 132, "column": 37}, "end_point": {"row": 132, "column": 74}}, {"id": 453, "type": "parameter_declaration", "text": "const unsigned char * buff", "parent": 452, "children": [454, 457], "start_point": {"row": 132, "column": 38}, "end_point": {"row": 132, "column": 64}}, {"id": 454, "type": "sized_type_specifier", "text": "unsigned char", "parent": 453, "children": [455, 456], "start_point": {"row": 132, "column": 44}, "end_point": {"row": 132, "column": 57}}, {"id": 455, "type": "unsigned", "text": "unsigned", "parent": 454, "children": [], "start_point": {"row": 132, "column": 44}, "end_point": {"row": 132, "column": 52}}, {"id": 456, "type": "primitive_type", "text": "char", "parent": 454, "children": [], "start_point": {"row": 132, "column": 53}, "end_point": {"row": 132, "column": 57}}, {"id": 457, "type": "pointer_declarator", "text": "* buff", "parent": 453, "children": [458, 459], "start_point": {"row": 132, "column": 58}, "end_point": {"row": 132, "column": 64}}, {"id": 458, "type": "*", "text": "*", "parent": 457, "children": [], "start_point": {"row": 132, "column": 58}, "end_point": {"row": 132, "column": 59}}, {"id": 459, "type": "identifier", "text": "buff", "parent": 457, "children": [], "start_point": {"row": 132, "column": 60}, "end_point": {"row": 132, "column": 64}}, {"id": 460, "type": "parameter_declaration", "text": "int len", "parent": 452, "children": [461, 462], "start_point": {"row": 132, "column": 66}, "end_point": {"row": 132, "column": 73}}, {"id": 461, "type": "primitive_type", "text": "int", "parent": 460, "children": [], "start_point": {"row": 132, "column": 66}, "end_point": {"row": 132, "column": 69}}, {"id": 462, "type": "identifier", "text": "len", "parent": 460, "children": [], "start_point": {"row": 132, "column": 70}, "end_point": {"row": 132, "column": 73}}, {"id": 463, "type": "#endif", "text": "#endif", "parent": 409, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 6}}, {"id": 464, "type": "preproc_def", "text": "#define _HAVE_ARCH_IPV6_CSUM\n", "parent": 0, "children": [465, 466], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 136, "column": 0}}, {"id": 465, "type": "#define", "text": "#define", "parent": 464, "children": [], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 135, "column": 7}}, {"id": 466, "type": "identifier", "text": "_HAVE_ARCH_IPV6_CSUM", "parent": 464, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 28}}, {"id": 467, "type": "function_definition", "text": "static __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n\t\t__u32 len, unsigned short proto, unsigned int sum) \n{\n\tregister unsigned long tmp;\n\t__asm__(\"addl %2@,%0\\n\\t\"\n\t\t\"movel %2@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@,%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"addxl %4,%0\\n\\t\"\n\t\t\"clrl %1\\n\\t\"\n\t\t\"addxl %1,%0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"a\" (saddr), \"a\" (daddr), \"d\" (len + proto),\n\t\t \"0\" (sum));\n\n\treturn csum_fold(sum);\n}", "parent": 0, "children": [468, 470, 474], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 164, "column": 1}}, {"id": 468, "type": "storage_class_specifier", "text": "__inline__", "parent": 467, "children": [469], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 17}}, {"id": 469, "type": "__inline__", "text": "__inline__", "parent": 468, "children": [], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 17}}, {"id": 470, "type": "sized_type_specifier", "text": "unsigned short int", "parent": 467, "children": [471, 472, 473], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 36}}, {"id": 471, "type": "unsigned", "text": "unsigned", "parent": 470, "children": [], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 26}}, {"id": 472, "type": "short", "text": "short", "parent": 470, "children": [], "start_point": {"row": 136, "column": 27}, "end_point": {"row": 136, "column": 32}}, {"id": 473, "type": "primitive_type", "text": "int", "parent": 470, "children": [], "start_point": {"row": 136, "column": 33}, "end_point": {"row": 136, "column": 36}}, {"id": 474, "type": "function_declarator", "text": "csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n\t\t__u32 len, unsigned short proto, unsigned int sum)", "parent": 467, "children": [475, 476], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 138, "column": 52}}, {"id": 475, "type": "identifier", "text": "csum_ipv6_magic", "parent": 474, "children": [], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 15}}, {"id": 476, "type": "parameter_list", "text": "(struct in6_addr *saddr, struct in6_addr *daddr,\n\t\t__u32 len, unsigned short proto, unsigned int sum)", "parent": 474, "children": [477, 484, 491, 494, 499], "start_point": {"row": 137, "column": 15}, "end_point": {"row": 138, "column": 52}}, {"id": 477, "type": "parameter_declaration", "text": "struct in6_addr *saddr", "parent": 476, "children": [478, 481], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 38}}, {"id": 478, "type": "struct_specifier", "text": "struct in6_addr", "parent": 477, "children": [479, 480], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 31}}, {"id": 479, "type": "struct", "text": "struct", "parent": 478, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 22}}, {"id": 480, "type": "type_identifier", "text": "in6_addr", "parent": 478, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 31}}, {"id": 481, "type": "pointer_declarator", "text": "*saddr", "parent": 477, "children": [482, 483], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 38}}, {"id": 482, "type": "*", "text": "*", "parent": 481, "children": [], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 33}}, {"id": 483, "type": "identifier", "text": "saddr", "parent": 481, "children": [], "start_point": {"row": 137, "column": 33}, "end_point": {"row": 137, "column": 38}}, {"id": 484, "type": "parameter_declaration", "text": "struct in6_addr *daddr", "parent": 476, "children": [485, 488], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 62}}, {"id": 485, "type": "struct_specifier", "text": "struct in6_addr", "parent": 484, "children": [486, 487], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 55}}, {"id": 486, "type": "struct", "text": "struct", "parent": 485, "children": [], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 46}}, {"id": 487, "type": "type_identifier", "text": "in6_addr", "parent": 485, "children": [], "start_point": {"row": 137, "column": 47}, "end_point": {"row": 137, "column": 55}}, {"id": 488, "type": "pointer_declarator", "text": "*daddr", "parent": 484, "children": [489, 490], "start_point": {"row": 137, "column": 56}, "end_point": {"row": 137, "column": 62}}, {"id": 489, "type": "*", "text": "*", "parent": 488, "children": [], "start_point": {"row": 137, "column": 56}, "end_point": {"row": 137, "column": 57}}, {"id": 490, "type": "identifier", "text": "daddr", "parent": 488, "children": [], "start_point": {"row": 137, "column": 57}, "end_point": {"row": 137, "column": 62}}, {"id": 491, "type": "parameter_declaration", "text": "__u32 len", "parent": 476, "children": [492, 493], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 11}}, {"id": 492, "type": "type_identifier", "text": "__u32", "parent": 491, "children": [], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 7}}, {"id": 493, "type": "identifier", "text": "len", "parent": 491, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 11}}, {"id": 494, "type": "parameter_declaration", "text": "unsigned short proto", "parent": 476, "children": [495, 498], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 33}}, {"id": 495, "type": "sized_type_specifier", "text": "unsigned short", "parent": 494, "children": [496, 497], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 27}}, {"id": 496, "type": "unsigned", "text": "unsigned", "parent": 495, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 21}}, {"id": 497, "type": "short", "text": "short", "parent": 495, "children": [], "start_point": {"row": 138, "column": 22}, "end_point": {"row": 138, "column": 27}}, {"id": 498, "type": "identifier", "text": "proto", "parent": 494, "children": [], "start_point": {"row": 138, "column": 28}, "end_point": {"row": 138, "column": 33}}, {"id": 499, "type": "parameter_declaration", "text": "unsigned int sum", "parent": 476, "children": [500, 503], "start_point": {"row": 138, "column": 35}, "end_point": {"row": 138, "column": 51}}, {"id": 500, "type": "sized_type_specifier", "text": "unsigned int", "parent": 499, "children": [501, 502], "start_point": {"row": 138, "column": 35}, "end_point": {"row": 138, "column": 47}}, {"id": 501, "type": "unsigned", "text": "unsigned", "parent": 500, "children": [], "start_point": {"row": 138, "column": 35}, "end_point": {"row": 138, "column": 43}}, {"id": 502, "type": "primitive_type", "text": "int", "parent": 500, "children": [], "start_point": {"row": 138, "column": 44}, "end_point": {"row": 138, "column": 47}}, {"id": 503, "type": "identifier", "text": "sum", "parent": 499, "children": [], "start_point": {"row": 138, "column": 48}, "end_point": {"row": 138, "column": 51}}, {"id": 504, "type": "declaration", "text": "register unsigned long tmp;", "parent": 467, "children": [505, 507, 510], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 28}}, {"id": 505, "type": "storage_class_specifier", "text": "register", "parent": 504, "children": [506], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 9}}, {"id": 506, "type": "register", "text": "register", "parent": 505, "children": [], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 9}}, {"id": 507, "type": "sized_type_specifier", "text": "unsigned long", "parent": 504, "children": [508, 509], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 23}}, {"id": 508, "type": "unsigned", "text": "unsigned", "parent": 507, "children": [], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 18}}, {"id": 509, "type": "long", "text": "long", "parent": 507, "children": [], "start_point": {"row": 140, "column": 19}, "end_point": {"row": 140, "column": 23}}, {"id": 510, "type": "identifier", "text": "tmp", "parent": 504, "children": [], "start_point": {"row": 140, "column": 24}, "end_point": {"row": 140, "column": 27}}, {"id": 511, "type": "gnu_asm_expression", "text": "__asm__(\"addl %2@,%0\\n\\t\"\n\t\t\"movel %2@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@,%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"addxl %4,%0\\n\\t\"\n\t\t\"clrl %1\\n\\t\"\n\t\t\"addxl %1,%0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"a\" (saddr), \"a\" (daddr), \"d\" (len + proto),\n\t\t \"0\" (sum))", "parent": 467, "children": [512, 513, 566, 573], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 161, "column": 14}}, {"id": 512, "type": "__asm__", "text": "__asm__", "parent": 511, "children": [], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 8}}, {"id": 513, "type": "concatenated_string", "text": "\"addl %2@,%0\\n\\t\"\n\t\t\"movel %2@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@,%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"addxl %4,%0\\n\\t\"\n\t\t\"clrl %1\\n\\t\"\n\t\t\"addxl %1,%0\"", "parent": 511, "children": [514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, 547, 550, 553, 556, 559, 562, 565], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 158, "column": 15}}, {"id": 514, "type": "string_literal", "text": "\"addl %2@,%0\\n\\t\"", "parent": 513, "children": [515, 516], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 26}}, {"id": 515, "type": "escape_sequence", "text": "\\n", "parent": 514, "children": [], "start_point": {"row": 141, "column": 21}, "end_point": {"row": 141, "column": 23}}, {"id": 516, "type": "escape_sequence", "text": "\\t", "parent": 514, "children": [], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 25}}, {"id": 517, "type": "string_literal", "text": "\"movel %2@(4),%1\\n\\t\"", "parent": 513, "children": [518, 519], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 23}}, {"id": 518, "type": "escape_sequence", "text": "\\n", "parent": 517, "children": [], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 20}}, {"id": 519, "type": "escape_sequence", "text": "\\t", "parent": 517, "children": [], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 22}}, {"id": 520, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [521, 522], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 19}}, {"id": 521, "type": "escape_sequence", "text": "\\n", "parent": 520, "children": [], "start_point": {"row": 143, "column": 14}, "end_point": {"row": 143, "column": 16}}, {"id": 522, "type": "escape_sequence", "text": "\\t", "parent": 520, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 18}}, {"id": 523, "type": "string_literal", "text": "\"movel %2@(8),%1\\n\\t\"", "parent": 513, "children": [524, 525], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 23}}, {"id": 524, "type": "escape_sequence", "text": "\\n", "parent": 523, "children": [], "start_point": {"row": 144, "column": 18}, "end_point": {"row": 144, "column": 20}}, {"id": 525, "type": "escape_sequence", "text": "\\t", "parent": 523, "children": [], "start_point": {"row": 144, "column": 20}, "end_point": {"row": 144, "column": 22}}, {"id": 526, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [527, 528], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 19}}, {"id": 527, "type": "escape_sequence", "text": "\\n", "parent": 526, "children": [], "start_point": {"row": 145, "column": 14}, "end_point": {"row": 145, "column": 16}}, {"id": 528, "type": "escape_sequence", "text": "\\t", "parent": 526, "children": [], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 18}}, {"id": 529, "type": "string_literal", "text": "\"movel %2@(12),%1\\n\\t\"", "parent": 513, "children": [530, 531], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 24}}, {"id": 530, "type": "escape_sequence", "text": "\\n", "parent": 529, "children": [], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 21}}, {"id": 531, "type": "escape_sequence", "text": "\\t", "parent": 529, "children": [], "start_point": {"row": 146, "column": 21}, "end_point": {"row": 146, "column": 23}}, {"id": 532, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [533, 534], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 19}}, {"id": 533, "type": "escape_sequence", "text": "\\n", "parent": 532, "children": [], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 16}}, {"id": 534, "type": "escape_sequence", "text": "\\t", "parent": 532, "children": [], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 18}}, {"id": 535, "type": "string_literal", "text": "\"movel %3@,%1\\n\\t\"", "parent": 513, "children": [536, 537], "start_point": {"row": 148, "column": 2}, "end_point": {"row": 148, "column": 20}}, {"id": 536, "type": "escape_sequence", "text": "\\n", "parent": 535, "children": [], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 17}}, {"id": 537, "type": "escape_sequence", "text": "\\t", "parent": 535, "children": [], "start_point": {"row": 148, "column": 17}, "end_point": {"row": 148, "column": 19}}, {"id": 538, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [539, 540], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 19}}, {"id": 539, "type": "escape_sequence", "text": "\\n", "parent": 538, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 16}}, {"id": 540, "type": "escape_sequence", "text": "\\t", "parent": 538, "children": [], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 18}}, {"id": 541, "type": "string_literal", "text": "\"movel %3@(4),%1\\n\\t\"", "parent": 513, "children": [542, 543], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 23}}, {"id": 542, "type": "escape_sequence", "text": "\\n", "parent": 541, "children": [], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 20}}, {"id": 543, "type": "escape_sequence", "text": "\\t", "parent": 541, "children": [], "start_point": {"row": 150, "column": 20}, "end_point": {"row": 150, "column": 22}}, {"id": 544, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [545, 546], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 19}}, {"id": 545, "type": "escape_sequence", "text": "\\n", "parent": 544, "children": [], "start_point": {"row": 151, "column": 14}, "end_point": {"row": 151, "column": 16}}, {"id": 546, "type": "escape_sequence", "text": "\\t", "parent": 544, "children": [], "start_point": {"row": 151, "column": 16}, "end_point": {"row": 151, "column": 18}}, {"id": 547, "type": "string_literal", "text": "\"movel %3@(8),%1\\n\\t\"", "parent": 513, "children": [548, 549], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 23}}, {"id": 548, "type": "escape_sequence", "text": "\\n", "parent": 547, "children": [], "start_point": {"row": 152, "column": 18}, "end_point": {"row": 152, "column": 20}}, {"id": 549, "type": "escape_sequence", "text": "\\t", "parent": 547, "children": [], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 22}}, {"id": 550, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [551, 552], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 19}}, {"id": 551, "type": "escape_sequence", "text": "\\n", "parent": 550, "children": [], "start_point": {"row": 153, "column": 14}, "end_point": {"row": 153, "column": 16}}, {"id": 552, "type": "escape_sequence", "text": "\\t", "parent": 550, "children": [], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 18}}, {"id": 553, "type": "string_literal", "text": "\"movel %3@(12),%1\\n\\t\"", "parent": 513, "children": [554, 555], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 24}}, {"id": 554, "type": "escape_sequence", "text": "\\n", "parent": 553, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 21}}, {"id": 555, "type": "escape_sequence", "text": "\\t", "parent": 553, "children": [], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 23}}, {"id": 556, "type": "string_literal", "text": "\"addxl %1,%0\\n\\t\"", "parent": 513, "children": [557, 558], "start_point": {"row": 155, "column": 2}, "end_point": {"row": 155, "column": 19}}, {"id": 557, "type": "escape_sequence", "text": "\\n", "parent": 556, "children": [], "start_point": {"row": 155, "column": 14}, "end_point": {"row": 155, "column": 16}}, {"id": 558, "type": "escape_sequence", "text": "\\t", "parent": 556, "children": [], "start_point": {"row": 155, "column": 16}, "end_point": {"row": 155, "column": 18}}, {"id": 559, "type": "string_literal", "text": "\"addxl %4,%0\\n\\t\"", "parent": 513, "children": [560, 561], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 156, "column": 19}}, {"id": 560, "type": "escape_sequence", "text": "\\n", "parent": 559, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 16}}, {"id": 561, "type": "escape_sequence", "text": "\\t", "parent": 559, "children": [], "start_point": {"row": 156, "column": 16}, "end_point": {"row": 156, "column": 18}}, {"id": 562, "type": "string_literal", "text": "\"clrl %1\\n\\t\"", "parent": 513, "children": [563, 564], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 15}}, {"id": 563, "type": "escape_sequence", "text": "\\n", "parent": 562, "children": [], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 12}}, {"id": 564, "type": "escape_sequence", "text": "\\t", "parent": 562, "children": [], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 14}}, {"id": 565, "type": "string_literal", "text": "\"addxl %1,%0\"", "parent": 513, "children": [], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 15}}, {"id": 566, "type": "gnu_asm_output_operand_list", "text": ": \"=&d\" (sum), \"=&d\" (tmp)", "parent": 511, "children": [567, 570], "start_point": {"row": 159, "column": 2}, "end_point": {"row": 159, "column": 28}}, {"id": 567, "type": "gnu_asm_output_operand", "text": "\"=&d\" (sum)", "parent": 566, "children": [568, 569], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 15}}, {"id": 568, "type": "string_literal", "text": "\"=&d\"", "parent": 567, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 9}}, {"id": 569, "type": "identifier", "text": "sum", "parent": 567, "children": [], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 14}}, {"id": 570, "type": "gnu_asm_output_operand", "text": "\"=&d\" (tmp)", "parent": 566, "children": [571, 572], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 28}}, {"id": 571, "type": "string_literal", "text": "\"=&d\"", "parent": 570, "children": [], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 22}}, {"id": 572, "type": "identifier", "text": "tmp", "parent": 570, "children": [], "start_point": {"row": 159, "column": 24}, "end_point": {"row": 159, "column": 27}}, {"id": 573, "type": "gnu_asm_input_operand_list", "text": ": \"a\" (saddr), \"a\" (daddr), \"d\" (len + proto),\n\t\t \"0\" (sum)", "parent": 511, "children": [574, 577, 580, 586], "start_point": {"row": 160, "column": 2}, "end_point": {"row": 161, "column": 13}}, {"id": 574, "type": "gnu_asm_input_operand", "text": "\"a\" (saddr)", "parent": 573, "children": [575, 576], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 15}}, {"id": 575, "type": "string_literal", "text": "\"a\"", "parent": 574, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 7}}, {"id": 576, "type": "identifier", "text": "saddr", "parent": 574, "children": [], "start_point": {"row": 160, "column": 9}, "end_point": {"row": 160, "column": 14}}, {"id": 577, "type": "gnu_asm_input_operand", "text": "\"a\" (daddr)", "parent": 573, "children": [578, 579], "start_point": {"row": 160, "column": 17}, "end_point": {"row": 160, "column": 28}}, {"id": 578, "type": "string_literal", "text": "\"a\"", "parent": 577, "children": [], "start_point": {"row": 160, "column": 17}, "end_point": {"row": 160, "column": 20}}, {"id": 579, "type": "identifier", "text": "daddr", "parent": 577, "children": [], "start_point": {"row": 160, "column": 22}, "end_point": {"row": 160, "column": 27}}, {"id": 580, "type": "gnu_asm_input_operand", "text": "\"d\" (len + proto)", "parent": 573, "children": [581, 582], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 47}}, {"id": 581, "type": "string_literal", "text": "\"d\"", "parent": 580, "children": [], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 33}}, {"id": 582, "type": "binary_expression", "text": "len + proto", "parent": 580, "children": [583, 584, 585], "start_point": {"row": 160, "column": 35}, "end_point": {"row": 160, "column": 46}}, {"id": 583, "type": "identifier", "text": "len", "parent": 582, "children": [], "start_point": {"row": 160, "column": 35}, "end_point": {"row": 160, "column": 38}}, {"id": 584, "type": "+", "text": "+", "parent": 582, "children": [], "start_point": {"row": 160, "column": 39}, "end_point": {"row": 160, "column": 40}}, {"id": 585, "type": "identifier", "text": "proto", "parent": 582, "children": [], "start_point": {"row": 160, "column": 41}, "end_point": {"row": 160, "column": 46}}, {"id": 586, "type": "gnu_asm_input_operand", "text": "\"0\" (sum)", "parent": 573, "children": [587, 588], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 13}}, {"id": 587, "type": "string_literal", "text": "\"0\"", "parent": 586, "children": [], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 7}}, {"id": 588, "type": "identifier", "text": "sum", "parent": 586, "children": [], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 161, "column": 12}}, {"id": 589, "type": "return_statement", "text": "return csum_fold(sum);", "parent": 467, "children": [590], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 23}}, {"id": 590, "type": "call_expression", "text": "csum_fold(sum)", "parent": 589, "children": [591, 592], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 22}}, {"id": 591, "type": "identifier", "text": "csum_fold", "parent": 590, "children": [], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 17}}, {"id": 592, "type": "argument_list", "text": "(sum)", "parent": 590, "children": [593], "start_point": {"row": 163, "column": 17}, "end_point": {"row": 163, "column": 22}}, {"id": 593, "type": "identifier", "text": "sum", "parent": 592, "children": [], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 21}}, {"id": 594, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 166, "column": 0}, "end_point": {"row": 166, "column": 6}}]}, "node_categories": {"declarations": {"functions": [10, 32, 57, 81, 94, 113, 119, 200, 206, 287, 293, 362, 369, 413, 419, 450, 467, 474], "variables": [6, 13, 20, 23, 28, 35, 40, 45, 48, 51, 60, 65, 70, 73, 76, 90, 97, 104, 122, 129, 134, 209, 247, 296, 301, 306, 311, 316, 372, 377, 382, 387, 392, 422, 429, 444, 453, 460, 477, 484, 491, 494, 499, 504], "classes": [52, 114, 201, 288, 363, 414, 445, 468, 478, 479, 485, 486, 505], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [142, 196, 220, 221, 222, 226, 227, 234, 235, 236, 240, 241, 255, 284, 321, 353, 398, 401, 433, 436, 511, 582, 590], "assignments": [217, 231], "loops": [], "conditionals": [0, 1, 2, 5, 7, 11, 14, 19, 22, 24, 27, 29, 33, 39, 44, 47, 50, 54, 58, 64, 69, 72, 75, 80, 83, 85, 86, 87, 88, 91, 95, 98, 103, 105, 108, 109, 110, 116, 120, 123, 128, 130, 133, 135, 139, 176, 179, 182, 186, 189, 192, 198, 199, 203, 207, 210, 213, 214, 215, 216, 218, 223, 228, 232, 237, 242, 248, 252, 254, 271, 274, 278, 281, 282, 286, 290, 294, 297, 300, 302, 305, 307, 310, 312, 315, 317, 320, 340, 343, 347, 350, 354, 356, 359, 361, 365, 370, 373, 376, 378, 381, 383, 386, 388, 391, 393, 396, 399, 402, 404, 405, 406, 407, 408, 409, 410, 416, 420, 423, 428, 431, 434, 437, 439, 440, 447, 451, 454, 459, 462, 463, 466, 470, 475, 480, 483, 487, 490, 492, 493, 495, 498, 500, 503, 507, 510, 569, 572, 576, 579, 583, 585, 588, 591, 593, 594], "returns": [195, 283, 360, 397, 432, 589], "exceptions": []}, "expressions": {"calls": [], "literals": [111, 141, 144, 145, 147, 149, 152, 155, 158, 161, 164, 167, 170, 175, 178, 181, 185, 188, 191, 194, 224, 230, 238, 244, 257, 258, 261, 264, 267, 270, 273, 277, 280, 323, 324, 327, 330, 333, 336, 339, 342, 346, 349, 352, 358, 411, 441, 513, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, 547, 550, 553, 556, 559, 562, 565, 568, 571, 575, 578, 581, 587], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 10, "universal_type": "function", "name": "len,", "text_snippet": "csum_partial(const unsigned char * buff, int len, unsigned int sum)"}, {"node_id": 32, "universal_type": "function", "name": "len,", "text_snippet": "csum_partial_copy(const char *src, char *dst, int len, int sum)"}, {"node_id": 57, "universal_type": "function", "name": "len,", "text_snippet": "csum_partial_copy_from_user(const char *src, char *dst,\n\t\t\t\t\t\tint len, int sum, int *csum_err)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "#define csum_partial_copy_nocheck(src, dst, len, sum)\t\\\n\tcsum_partial_copy((src), (dst), (len), (sum"}, {"node_id": 94, "universal_type": "function", "name": "ihl)", "text_snippet": "ip_fast_csum(unsigned char *iph, unsigned int ihl)"}, {"node_id": 113, "universal_type": "function", "name": "ihl)", "text_snippet": "static inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n\tunsigned int sum "}, {"node_id": 119, "universal_type": "function", "name": "ihl)", "text_snippet": "ip_fast_csum(unsigned char *iph, unsigned int ihl)"}, {"node_id": 200, "universal_type": "function", "name": "csum_fold", "text_snippet": "static inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n\tsum = (sum & 0xffff"}, {"node_id": 206, "universal_type": "function", "name": "sum)", "text_snippet": "csum_fold(unsigned int sum)"}, {"node_id": 287, "universal_type": "function", "name": "csum_tcpudp_nofold", "text_snippet": "static inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned sho"}, {"node_id": 293, "universal_type": "function", "name": "sum)", "text_snippet": "csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short "}, {"node_id": 362, "universal_type": "function", "name": "csum_tcpudp_magic", "text_snippet": "static inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigne"}, {"node_id": 369, "universal_type": "function", "name": "sum)", "text_snippet": "csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short p"}, {"node_id": 413, "universal_type": "function", "name": "len)", "text_snippet": "static inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n\treturn csum_fold (csu"}, {"node_id": 419, "universal_type": "function", "name": "len)", "text_snippet": "ip_compute_csum(unsigned char * buff, int len)"}, {"node_id": 450, "universal_type": "function", "name": "len)", "text_snippet": "ip_compute_csum(const unsigned char * buff, int len)"}, {"node_id": 467, "universal_type": "function", "name": "csum_ipv6_magic", "text_snippet": "static __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,"}, {"node_id": 474, "universal_type": "function", "name": "in6_addr", "text_snippet": "csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n\t\t__u32 len, unsigned short proto, u"}], "class_declarations": [{"node_id": 52, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 114, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 201, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 288, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 363, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 414, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 445, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 468, "universal_type": "class", "name": "unknown", "text_snippet": "__inline__"}, {"node_id": 478, "universal_type": "class", "name": "in6_addr", "text_snippet": "struct in6_addr"}, {"node_id": 479, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 485, "universal_type": "class", "name": "in6_addr", "text_snippet": "struct in6_addr"}, {"node_id": 486, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 505, "universal_type": "class", "name": "unknown", "text_snippet": "register"}], "import_statements": []}, "original_source_code": "#ifndef _M68K_CHECKSUM_H\n#define _M68K_CHECKSUM_H\n\n/*\n * computes the checksum of a memory block at buff, length len,\n * and adds in \"sum\" (32-bit)\n *\n * returns a 32-bit number suitable for feeding into itself\n * or csum_tcpudp_magic\n *\n * this function must be called with even lengths, except\n * for the last fragment, which may be odd\n *\n * it's best to have buff aligned on a 32-bit boundary\n */\nunsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);\n\n/*\n * the same as csum_partial, but copies from src while it\n * checksums\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nunsigned int csum_partial_copy(const char *src, char *dst, int len, int sum);\n\n\n/*\n * the same as csum_partial_copy, but copies from user space.\n *\n * here even more important to align src and dst on a 32-bit (or even\n * better 64-bit) boundary\n */\n\nextern unsigned int csum_partial_copy_from_user(const char *src, char *dst,\n\t\t\t\t\t\tint len, int sum, int *csum_err);\n\n#define csum_partial_copy_nocheck(src, dst, len, sum)\t\\\n\tcsum_partial_copy((src), (dst), (len), (sum))\n\nunsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl);\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\n/*\n *\tThis is a version of ip_compute_csum() optimized for IP headers,\n *\twhich always checksum on 4 octet boundaries.\n *\n */\nstatic inline unsigned short\nip_fast_csum(unsigned char *iph, unsigned int ihl)\n{\n\tunsigned int sum = 0;\n\n\t__asm__ (\"subqw #1,%2\\n\"\n\t\t \"1:\\t\"\n\t\t \"movel %1@+,%/d0\\n\\t\"\n\t\t \"addxl %/d0,%0\\n\\t\"\n\t\t \"dbra %2,1b\\n\\t\"\n\t\t \"movel %0,%/d0\\n\\t\"\n\t\t \"swap %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t \"clrw %/d0\\n\\t\"\n\t\t \"addxw %/d0,%0\\n\\t\"\n\t\t : \"=d\" (sum), \"=a\" (iph), \"=d\" (ihl)\n\t\t : \"0\" (sum), \"1\" (iph), \"2\" (ihl)\n\t\t : \"d0\");\n\treturn ~sum;\n}\n#endif\n\n/*\n *\tFold a partial checksum\n */\n\nstatic inline unsigned int csum_fold(unsigned int sum)\n{\n#ifdef CONFIG_COLDFIRE\n\tsum = (sum & 0xffff) + (sum >> 16);\n\tsum = (sum & 0xffff) + (sum >> 16);\n#else\n\tunsigned int tmp = sum;\n\t__asm__(\"swap %1\\n\\t\"\n\t\t\"addw %1, %0\\n\\t\"\n\t\t\"clrw %1\\n\\t\"\n\t\t\"addxw %1, %0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"0\" (sum), \"1\" (sum));\n#endif\n\treturn ~sum;\n}\n\n\n/*\n * computes the checksum of the TCP/UDP pseudo-header\n * returns a 16-bit checksum, already complemented\n */\n\nstatic inline unsigned int\ncsum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)\n{\n\t__asm__ (\"addl %1,%0\\n\\t\"\n\t\t \"addxl %4,%0\\n\\t\"\n\t\t \"addxl %5,%0\\n\\t\"\n\t\t \"clrl %1\\n\\t\"\n\t\t \"addxl %1,%0\"\n\t\t : \"=&d\" (sum), \"=&d\" (saddr)\n\t\t : \"0\" (daddr), \"1\" (saddr), \"d\" (len + proto),\n\t\t \"d\"(sum));\n\treturn sum;\n}\n\nstatic inline unsigned short int\ncsum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,\n\t\t unsigned short proto, unsigned int sum)\n{\n\treturn csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));\n}\n\n/*\n * this routine is used for miscellaneous IP-like checksums, mainly\n * in icmp.c\n */\n\n#if 0 /* DAVIDM - these are in arch/m68knommu/lib */\nstatic inline unsigned short\nip_compute_csum(unsigned char * buff, int len)\n{\n\treturn csum_fold (csum_partial(buff, len, 0));\n}\n#else\nextern unsigned short ip_compute_csum(const unsigned char * buff, int len);\n#endif\n\n#define _HAVE_ARCH_IPV6_CSUM\nstatic __inline__ unsigned short int\ncsum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr,\n\t\t__u32 len, unsigned short proto, unsigned int sum) \n{\n\tregister unsigned long tmp;\n\t__asm__(\"addl %2@,%0\\n\\t\"\n\t\t\"movel %2@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %2@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@,%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(4),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(8),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"movel %3@(12),%1\\n\\t\"\n\t\t\"addxl %1,%0\\n\\t\"\n\t\t\"addxl %4,%0\\n\\t\"\n\t\t\"clrl %1\\n\\t\"\n\t\t\"addxl %1,%0\"\n\t\t: \"=&d\" (sum), \"=&d\" (tmp)\n\t\t: \"a\" (saddr), \"a\" (daddr), \"d\" (len + proto),\n\t\t \"0\" (sum));\n\n\treturn csum_fold(sum);\n}\n\n#endif /* _M68K_CHECKSUM_H */\n"}
298
c
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000 #import "Xcode_13_0_XCTestCore_CDStructures.h" #import "Xcode_13_0_SharedHeader.h" #import <Foundation/Foundation.h> // // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // @interface XCTSymbolicationService : NSObject { } + (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)arg1 error:(id *)arg2; + (CDStruct_37ea9563)standardSymbolicationFunctions; + (void)pushSharedSymbolicationService:(id)arg1 forScope:(CDUnknownBlockType)arg2; + (void)setSharedService:(id)arg1; + (instancetype)sharedService; @end #endif
36.05
19
(translation_unit) "#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000\n\n#import "Xcode_13_0_XCTestCore_CDStructures.h"\n#import "Xcode_13_0_SharedHeader.h"\n#import <Foundation/Foundation.h>\n\n//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.\n//\n\n@interface XCTSymbolicationService : NSObject\n{\n}\n\n+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)arg1 error:(id *)arg2;\n+ (CDStruct_37ea9563)standardSymbolicationFunctions;\n+ (void)pushSharedSymbolicationService:(id)arg1 forScope:(CDUnknownBlockType)arg2;\n+ (void)setSharedService:(id)arg1;\n+ (instancetype)sharedService;\n\n@end\n\n#endif" (preproc_if) "#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000\n\n#import "Xcode_13_0_XCTestCore_CDStructures.h"\n#import "Xcode_13_0_SharedHeader.h"\n#import <Foundation/Foundation.h>\n\n//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.\n//\n\n@interface XCTSymbolicationService : NSObject\n{\n}\n\n+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)arg1 error:(id *)arg2;\n+ (CDStruct_37ea9563)standardSymbolicationFunctions;\n+ (void)pushSharedSymbolicationService:(id)arg1 forScope:(CDUnknownBlockType)arg2;\n+ (void)setSharedService:(id)arg1;\n+ (instancetype)sharedService;\n\n@end\n\n#endif" (#if) "#if" (binary_expression) "__IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000" (binary_expression) "__IPHONE_OS_VERSION_MAX_ALLOWED >= 150000" (identifier) "__IPHONE_OS_VERSION_MAX_ALLOWED" (>=) ">=" (number_literal) "150000" (&&) "&&" (binary_expression) "__IPHONE_OS_VERSION_MAX_ALLOWED < 160000" (identifier) "__IPHONE_OS_VERSION_MAX_ALLOWED" (<) "<" (number_literal) "160000" ( ) "\n\n" (preproc_call) "#import "Xcode_13_0_XCTestCore_CDStructures.h"\n" (preproc_directive) "#import" (preproc_arg) ""Xcode_13_0_XCTestCore_CDStructures.h"" (preproc_call) "#import "Xcode_13_0_SharedHeader.h"\n" (preproc_directive) "#import" (preproc_arg) ""Xcode_13_0_SharedHeader.h"" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (comment) "//" (comment) "// Generated by class-dump 3.5 (64 bit)." (comment) "//" (comment) "// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>." (comment) "//" (ERROR) "@" (ERROR) "@" (function_definition) "interface XCTSymbolicationService : NSObject\n{\n}" (type_identifier) "interface" (identifier) "XCTSymbolicationService" (ERROR) ": NSObject" (:) ":" (identifier) "NSObject" (compound_statement) "{\n}" ({) "{" (}) "}" (ERROR) "+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)" (unary_expression) "+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions" (+) "+" (cast_expression) "(_Bool)isSymbolicationAvailableForSymbolicationFunctions" (() "(" (type_descriptor) "_Bool" (type_identifier) "_Bool" ()) ")" (identifier) "isSymbolicationAvailableForSymbolicationFunctions" (:) ":" (() "(" (identifier) "CDStruct_37ea9563" ()) ")" (declaration) "arg1 error:(id *)arg2;" (type_identifier) "arg1" (identifier) "error" (ERROR) ":(id *)arg2" (:) ":" (() "(" (identifier) "id" (*) "*" ()) ")" (identifier) "arg2" (;) ";" (expression_statement) "+ (CDStruct_37ea9563)standardSymbolicationFunctions;" (unary_expression) "+ (CDStruct_37ea9563)standardSymbolicationFunctions" (+) "+" (cast_expression) "(CDStruct_37ea9563)standardSymbolicationFunctions" (() "(" (type_descriptor) "CDStruct_37ea9563" (type_identifier) "CDStruct_37ea9563" ()) ")" (identifier) "standardSymbolicationFunctions" (;) ";" (ERROR) "+ (void)pushSharedSymbolicationService:(id)" (unary_expression) "+ (void)pushSharedSymbolicationService" (+) "+" (cast_expression) "(void)pushSharedSymbolicationService" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "pushSharedSymbolicationService" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 forScope:(CDUnknownBlockType)arg2;" (type_identifier) "arg1" (ERROR) "forScope:(CDUnknownBlockType)" (identifier) "forScope" (:) ":" (() "(" (identifier) "CDUnknownBlockType" ()) ")" (identifier) "arg2" (;) ";" (expression_statement) "+ (void)setSharedService:(id)arg1;" (unary_expression) "+ (void)setSharedService" (+) "+" (cast_expression) "(void)setSharedService" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setSharedService" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "+ (instancetype)sharedService;" (unary_expression) "+ (instancetype)sharedService" (+) "+" (cast_expression) "(instancetype)sharedService" (() "(" (type_descriptor) "instancetype" (type_identifier) "instancetype" ()) ")" (identifier) "sharedService" (;) ";" (ERROR) "@" (ERROR) "@" (type_identifier) "end" (;) "" (#endif) "#endif"
127
10
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 36.05, "nodes": 82, "errors": 0, "source_hash": "3384a469c342a2600ff0eb0c2cdbd6f693fe7e48ef18769104e79e1835965f27", "categorized_nodes": 49}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_if", "text": "#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000\n\n#import \"Xcode_13_0_XCTestCore_CDStructures.h\"\n#import \"Xcode_13_0_SharedHeader.h\"\n#import <Foundation/Foundation.h>\n\n//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.\n//\n\n@interface XCTSymbolicationService : NSObject\n{\n}\n\n+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)arg1 error:(id *)arg2;\n+ (CDStruct_37ea9563)standardSymbolicationFunctions;\n+ (void)pushSharedSymbolicationService:(id)arg1 forScope:(CDUnknownBlockType)arg2;\n+ (void)setSharedService:(id)arg1;\n+ (instancetype)sharedService;\n\n@end\n\n#endif", "parent": null, "children": [1, 2, 12, 13, 16, 19, 22, 24, 29, 37, 50, 58, 79, 81], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 1, "type": "#if", "text": "#if", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 3}}, {"id": 2, "type": "binary_expression", "text": "__IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000", "parent": 0, "children": [3, 7, 8], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 89}}, {"id": 3, "type": "binary_expression", "text": "__IPHONE_OS_VERSION_MAX_ALLOWED >= 150000", "parent": 2, "children": [4, 5, 6], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 45}}, {"id": 4, "type": "identifier", "text": "__IPHONE_OS_VERSION_MAX_ALLOWED", "parent": 3, "children": [], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 35}}, {"id": 5, "type": ">=", "text": ">=", "parent": 3, "children": [], "start_point": {"row": 0, "column": 36}, "end_point": {"row": 0, "column": 38}}, {"id": 6, "type": "number_literal", "text": "150000", "parent": 3, "children": [], "start_point": {"row": 0, "column": 39}, "end_point": {"row": 0, "column": 45}}, {"id": 7, "type": "&&", "text": "&&", "parent": 2, "children": [], "start_point": {"row": 0, "column": 46}, "end_point": {"row": 0, "column": 48}}, {"id": 8, "type": "binary_expression", "text": "__IPHONE_OS_VERSION_MAX_ALLOWED < 160000", "parent": 2, "children": [9, 10, 11], "start_point": {"row": 0, "column": 49}, "end_point": {"row": 0, "column": 89}}, {"id": 9, "type": "identifier", "text": "__IPHONE_OS_VERSION_MAX_ALLOWED", "parent": 8, "children": [], "start_point": {"row": 0, "column": 49}, "end_point": {"row": 0, "column": 80}}, {"id": 10, "type": "<", "text": "<", "parent": 8, "children": [], "start_point": {"row": 0, "column": 81}, "end_point": {"row": 0, "column": 82}}, {"id": 11, "type": "number_literal", "text": "160000", "parent": 8, "children": [], "start_point": {"row": 0, "column": 83}, "end_point": {"row": 0, "column": 89}}, {"id": 12, "type": "\n", "text": "\n\n", "parent": 0, "children": [], "start_point": {"row": 0, "column": 89}, "end_point": {"row": 2, "column": 0}}, {"id": 13, "type": "preproc_call", "text": "#import \"Xcode_13_0_XCTestCore_CDStructures.h\"\n", "parent": 0, "children": [14, 15], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 14, "type": "preproc_directive", "text": "#import", "parent": 13, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 15, "type": "preproc_arg", "text": "\"Xcode_13_0_XCTestCore_CDStructures.h\"", "parent": 13, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 46}}, {"id": 16, "type": "preproc_call", "text": "#import \"Xcode_13_0_SharedHeader.h\"\n", "parent": 0, "children": [17, 18], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 17, "type": "preproc_directive", "text": "#import", "parent": 16, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 18, "type": "preproc_arg", "text": "\"Xcode_13_0_SharedHeader.h\"", "parent": 16, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 35}}, {"id": 19, "type": "preproc_call", "text": "#import <Foundation/Foundation.h>\n", "parent": 0, "children": [20, 21], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 20, "type": "preproc_directive", "text": "#import", "parent": 19, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 21, "type": "preproc_arg", "text": "<Foundation/Foundation.h>", "parent": 19, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 33}}, {"id": 22, "type": "ERROR", "text": "@", "parent": 0, "children": [23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 23, "type": "ERROR", "text": "@", "parent": 22, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 24, "type": "function_definition", "text": "interface XCTSymbolicationService : NSObject\n{\n}", "parent": 0, "children": [25, 26, 27], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 14, "column": 1}}, {"id": 25, "type": "type_identifier", "text": "interface", "parent": 24, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 26, "type": "identifier", "text": "XCTSymbolicationService", "parent": 24, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 34}}, {"id": 27, "type": "ERROR", "text": ": NSObject", "parent": 24, "children": [28], "start_point": {"row": 12, "column": 35}, "end_point": {"row": 12, "column": 45}}, {"id": 28, "type": "identifier", "text": "NSObject", "parent": 27, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 45}}, {"id": 29, "type": "ERROR", "text": "+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)", "parent": 0, "children": [30, 36], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 78}}, {"id": 30, "type": "unary_expression", "text": "+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions", "parent": 29, "children": [31, 32], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 58}}, {"id": 31, "type": "+", "text": "+", "parent": 30, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 32, "type": "cast_expression", "text": "(_Bool)isSymbolicationAvailableForSymbolicationFunctions", "parent": 30, "children": [33, 35], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 58}}, {"id": 33, "type": "type_descriptor", "text": "_Bool", "parent": 32, "children": [34], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 8}}, {"id": 34, "type": "type_identifier", "text": "_Bool", "parent": 33, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 8}}, {"id": 35, "type": "identifier", "text": "isSymbolicationAvailableForSymbolicationFunctions", "parent": 32, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 58}}, {"id": 36, "type": "identifier", "text": "CDStruct_37ea9563", "parent": 29, "children": [], "start_point": {"row": 16, "column": 60}, "end_point": {"row": 16, "column": 77}}, {"id": 37, "type": "declaration", "text": "arg1 error:(id *)arg2;", "parent": 0, "children": [38, 39, 40], "start_point": {"row": 16, "column": 78}, "end_point": {"row": 16, "column": 100}}, {"id": 38, "type": "type_identifier", "text": "arg1", "parent": 37, "children": [], "start_point": {"row": 16, "column": 78}, "end_point": {"row": 16, "column": 82}}, {"id": 39, "type": "identifier", "text": "error", "parent": 37, "children": [], "start_point": {"row": 16, "column": 83}, "end_point": {"row": 16, "column": 88}}, {"id": 40, "type": "ERROR", "text": ":(id *)arg2", "parent": 37, "children": [41, 42, 43], "start_point": {"row": 16, "column": 88}, "end_point": {"row": 16, "column": 99}}, {"id": 41, "type": "identifier", "text": "id", "parent": 40, "children": [], "start_point": {"row": 16, "column": 90}, "end_point": {"row": 16, "column": 92}}, {"id": 42, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 16, "column": 93}, "end_point": {"row": 16, "column": 94}}, {"id": 43, "type": "identifier", "text": "arg2", "parent": 40, "children": [], "start_point": {"row": 16, "column": 95}, "end_point": {"row": 16, "column": 99}}, {"id": 44, "type": "unary_expression", "text": "+ (CDStruct_37ea9563)standardSymbolicationFunctions", "parent": 0, "children": [45, 46], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 51}}, {"id": 45, "type": "+", "text": "+", "parent": 44, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 46, "type": "cast_expression", "text": "(CDStruct_37ea9563)standardSymbolicationFunctions", "parent": 44, "children": [47, 49], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 51}}, {"id": 47, "type": "type_descriptor", "text": "CDStruct_37ea9563", "parent": 46, "children": [48], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 20}}, {"id": 48, "type": "type_identifier", "text": "CDStruct_37ea9563", "parent": 47, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 20}}, {"id": 49, "type": "identifier", "text": "standardSymbolicationFunctions", "parent": 46, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 51}}, {"id": 50, "type": "ERROR", "text": "+ (void)pushSharedSymbolicationService:(id)", "parent": 0, "children": [51, 57], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 43}}, {"id": 51, "type": "unary_expression", "text": "+ (void)pushSharedSymbolicationService", "parent": 50, "children": [52, 53], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 38}}, {"id": 52, "type": "+", "text": "+", "parent": 51, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 53, "type": "cast_expression", "text": "(void)pushSharedSymbolicationService", "parent": 51, "children": [54, 56], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 38}}, {"id": 54, "type": "type_descriptor", "text": "void", "parent": 53, "children": [55], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 55, "type": "primitive_type", "text": "void", "parent": 54, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 7}}, {"id": 56, "type": "identifier", "text": "pushSharedSymbolicationService", "parent": 53, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 38}}, {"id": 57, "type": "identifier", "text": "id", "parent": 50, "children": [], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 42}}, {"id": 58, "type": "declaration", "text": "arg1 forScope:(CDUnknownBlockType)arg2;", "parent": 0, "children": [59, 60, 63], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 82}}, {"id": 59, "type": "type_identifier", "text": "arg1", "parent": 58, "children": [], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 47}}, {"id": 60, "type": "ERROR", "text": "forScope:(CDUnknownBlockType)", "parent": 58, "children": [61, 62], "start_point": {"row": 18, "column": 48}, "end_point": {"row": 18, "column": 77}}, {"id": 61, "type": "identifier", "text": "forScope", "parent": 60, "children": [], "start_point": {"row": 18, "column": 48}, "end_point": {"row": 18, "column": 56}}, {"id": 62, "type": "identifier", "text": "CDUnknownBlockType", "parent": 60, "children": [], "start_point": {"row": 18, "column": 58}, "end_point": {"row": 18, "column": 76}}, {"id": 63, "type": "identifier", "text": "arg2", "parent": 58, "children": [], "start_point": {"row": 18, "column": 77}, "end_point": {"row": 18, "column": 81}}, {"id": 64, "type": "unary_expression", "text": "+ (void)setSharedService", "parent": 0, "children": [65, 66], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 24}}, {"id": 65, "type": "+", "text": "+", "parent": 64, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 66, "type": "cast_expression", "text": "(void)setSharedService", "parent": 64, "children": [67, 69], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 24}}, {"id": 67, "type": "type_descriptor", "text": "void", "parent": 66, "children": [68], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 68, "type": "primitive_type", "text": "void", "parent": 67, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 7}}, {"id": 69, "type": "identifier", "text": "setSharedService", "parent": 66, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 24}}, {"id": 70, "type": "ERROR", "text": ":(id)arg1", "parent": 0, "children": [71, 72], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 33}}, {"id": 71, "type": "identifier", "text": "id", "parent": 70, "children": [], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 28}}, {"id": 72, "type": "identifier", "text": "arg1", "parent": 70, "children": [], "start_point": {"row": 19, "column": 29}, "end_point": {"row": 19, "column": 33}}, {"id": 73, "type": "unary_expression", "text": "+ (instancetype)sharedService", "parent": 0, "children": [74, 75], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 29}}, {"id": 74, "type": "+", "text": "+", "parent": 73, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 75, "type": "cast_expression", "text": "(instancetype)sharedService", "parent": 73, "children": [76, 78], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 29}}, {"id": 76, "type": "type_descriptor", "text": "instancetype", "parent": 75, "children": [77], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 15}}, {"id": 77, "type": "type_identifier", "text": "instancetype", "parent": 76, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 15}}, {"id": 78, "type": "identifier", "text": "sharedService", "parent": 75, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 29}}, {"id": 79, "type": "ERROR", "text": "@", "parent": 0, "children": [80], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 80, "type": "ERROR", "text": "@", "parent": 79, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 81, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}]}, "node_categories": {"declarations": {"functions": [24], "variables": [37, 58], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [2, 3, 8, 30, 32, 44, 46, 51, 53, 64, 66, 73, 75], "assignments": [], "loops": [], "conditionals": [0, 1, 4, 9, 25, 26, 28, 34, 35, 36, 38, 39, 41, 43, 48, 49, 56, 57, 59, 61, 62, 63, 69, 71, 72, 77, 78, 81], "returns": [], "exceptions": []}, "expressions": {"calls": [13, 16, 19], "literals": [6, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "XCTSymbolicationService", "text_snippet": "interface XCTSymbolicationService : NSObject\n{\n}"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 && __IPHONE_OS_VERSION_MAX_ALLOWED < 160000\n\n#import \"Xcode_13_0_XCTestCore_CDStructures.h\"\n#import \"Xcode_13_0_SharedHeader.h\"\n#import <Foundation/Foundation.h>\n\n//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.\n//\n\n@interface XCTSymbolicationService : NSObject\n{\n}\n\n+ (_Bool)isSymbolicationAvailableForSymbolicationFunctions:(CDStruct_37ea9563)arg1 error:(id *)arg2;\n+ (CDStruct_37ea9563)standardSymbolicationFunctions;\n+ (void)pushSharedSymbolicationService:(id)arg1 forScope:(CDUnknownBlockType)arg2;\n+ (void)setSharedService:(id)arg1;\n+ (instancetype)sharedService;\n\n@end\n\n#endif"}
299